@luigi-project/container 1.5.0-dev.202501101354 → 1.5.0-dev.202501101405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/package.json +1 -1
package/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/src/internal/disclose-version.js","../node_modules/svelte/src/version.js","../node_modules/svelte/src/constants.js","../node_modules/svelte/src/utils.js","../node_modules/esm-env/false.js","../node_modules/svelte/src/internal/shared/utils.js","../node_modules/svelte/src/internal/client/constants.js","../node_modules/svelte/src/internal/client/reactivity/equality.js","../node_modules/svelte/src/internal/client/errors.js","../node_modules/svelte/src/internal/client/reactivity/sources.js","../node_modules/svelte/src/internal/client/runtime.js","../node_modules/svelte/src/internal/client/warnings.js","../node_modules/svelte/src/internal/client/dom/hydration.js","../node_modules/svelte/src/internal/client/dev/ownership.js","../node_modules/svelte/src/internal/client/proxy.js","../node_modules/svelte/src/internal/client/dev/equality.js","../node_modules/svelte/src/internal/client/dom/operations.js","../node_modules/svelte/src/internal/client/reactivity/deriveds.js","../node_modules/svelte/src/internal/client/reactivity/effects.js","../node_modules/svelte/src/internal/client/dom/task.js","../node_modules/svelte/src/internal/shared/errors.js","../node_modules/svelte/src/internal/client/dev/elements.js","../node_modules/svelte/src/internal/client/dom/elements/events.js","../node_modules/svelte/src/internal/client/dom/template.js","../node_modules/svelte/src/internal/client/dom/reconciler.js","../node_modules/svelte/src/internal/client/render.js","../node_modules/svelte/src/internal/client/dev/legacy.js","../node_modules/svelte/src/internal/client/dom/blocks/if.js","../node_modules/svelte/src/internal/client/dom/elements/attributes.js","../node_modules/svelte/src/internal/client/dom/elements/bindings/this.js","../node_modules/svelte/src/index-client.js","../node_modules/svelte/src/internal/client/reactivity/store.js","../node_modules/svelte/src/internal/client/dom/elements/custom-element.js","../node_modules/svelte/src/internal/client/reactivity/props.js","../node_modules/svelte/src/internal/client/validate.js","../node_modules/svelte/src/legacy/legacy-client.js","../src/constants/internal-communication.ts","../src/constants/communication.ts","../src/utilities/helpers.ts","../src/services/container.service.ts","../src/api/container-api.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/LuigiContainer.svelte","../src/services/iframe-helpers.ts","../node_modules/svelte/src/internal/client/dom/elements/class.js","../node_modules/svelte/src/internal/client/dom/css.js","../src/LuigiCompoundContainer.svelte","../src/main.ts"],"sourcesContent":["import { PUBLIC_VERSION } from '../version.js';\n\nif (typeof window !== 'undefined')\n\t// @ts-ignore\n\t(window.__svelte ||= { v: new Set() }).v.add(PUBLIC_VERSION);\n","// generated during release, do not modify\n\n/**\n * The current version, as set in package.json.\n *\n * https://svelte.dev/docs/svelte-compiler#svelte-version\n * @type {string}\n */\nexport const VERSION = '5.14.4';\nexport const PUBLIC_VERSION = '5';\n","export const EACH_ITEM_REACTIVE = 1;\nexport const EACH_INDEX_REACTIVE = 1 << 1;\n/** See EachBlock interface metadata.is_controlled for an explanation what this is */\nexport const EACH_IS_CONTROLLED = 1 << 2;\nexport const EACH_IS_ANIMATED = 1 << 3;\nexport const EACH_ITEM_IMMUTABLE = 1 << 4;\n\nexport const PROPS_IS_IMMUTABLE = 1;\nexport const PROPS_IS_RUNES = 1 << 1;\nexport const PROPS_IS_UPDATED = 1 << 2;\nexport const PROPS_IS_BINDABLE = 1 << 3;\nexport const PROPS_IS_LAZY_INITIAL = 1 << 4;\n\nexport const TRANSITION_IN = 1;\nexport const TRANSITION_OUT = 1 << 1;\nexport const TRANSITION_GLOBAL = 1 << 2;\n\nexport const TEMPLATE_FRAGMENT = 1;\nexport const TEMPLATE_USE_IMPORT_NODE = 1 << 1;\n\nexport const HYDRATION_START = '[';\n/** used to indicate that an `{:else}...` block was rendered */\nexport const HYDRATION_START_ELSE = '[!';\nexport const HYDRATION_END = ']';\nexport const HYDRATION_ERROR = {};\n\nexport const ELEMENT_IS_NAMESPACED = 1;\nexport const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;\n\nexport const UNINITIALIZED = Symbol();\n\n// Dev-time component properties\nexport const FILENAME = Symbol('filename');\nexport const HMR = Symbol('hmr');\n\nexport const NAMESPACE_SVG = 'http://www.w3.org/2000/svg';\nexport const NAMESPACE_MATHML = 'http://www.w3.org/1998/Math/MathML';\n\n// we use a list of ignorable runtime warnings because not every runtime warning\n// can be ignored and we want to keep the validation for svelte-ignore in place\nexport const IGNORABLE_RUNTIME_WARNINGS = /** @type {const} */ ([\n\t'state_snapshot_uncloneable',\n\t'binding_property_non_reactive',\n\t'hydration_attribute_changed',\n\t'hydration_html_changed',\n\t'ownership_invalid_binding',\n\t'ownership_invalid_mutation'\n]);\n\n/**\n * Whitespace inside one of these elements will not result in\n * a whitespace node being created in any circumstances. (This\n * list is almost certainly very incomplete)\n * TODO this is currently unused\n */\nexport const ELEMENTS_WITHOUT_TEXT = ['audio', 'datalist', 'dl', 'optgroup', 'select', 'video'];\n","const regex_return_characters = /\\r/g;\n\n/**\n * @param {string} str\n * @returns {string}\n */\nexport function hash(str) {\n\tstr = str.replace(regex_return_characters, '');\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn (hash >>> 0).toString(36);\n}\n\nconst VOID_ELEMENT_NAMES = [\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'command',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'keygen',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr'\n];\n\n/**\n * Returns `true` if `name` is of a void element\n * @param {string} name\n */\nexport function is_void(name) {\n\treturn VOID_ELEMENT_NAMES.includes(name) || name.toLowerCase() === '!doctype';\n}\n\nconst RESERVED_WORDS = [\n\t'arguments',\n\t'await',\n\t'break',\n\t'case',\n\t'catch',\n\t'class',\n\t'const',\n\t'continue',\n\t'debugger',\n\t'default',\n\t'delete',\n\t'do',\n\t'else',\n\t'enum',\n\t'eval',\n\t'export',\n\t'extends',\n\t'false',\n\t'finally',\n\t'for',\n\t'function',\n\t'if',\n\t'implements',\n\t'import',\n\t'in',\n\t'instanceof',\n\t'interface',\n\t'let',\n\t'new',\n\t'null',\n\t'package',\n\t'private',\n\t'protected',\n\t'public',\n\t'return',\n\t'static',\n\t'super',\n\t'switch',\n\t'this',\n\t'throw',\n\t'true',\n\t'try',\n\t'typeof',\n\t'var',\n\t'void',\n\t'while',\n\t'with',\n\t'yield'\n];\n\n/**\n * Returns `true` if `word` is a reserved JavaScript keyword\n * @param {string} word\n */\nexport function is_reserved(word) {\n\treturn RESERVED_WORDS.includes(word);\n}\n\n/**\n * @param {string} name\n */\nexport function is_capture_event(name) {\n\treturn name.endsWith('capture') && name !== 'gotpointercapture' && name !== 'lostpointercapture';\n}\n\n/** List of Element events that will be delegated */\nconst DELEGATED_EVENTS = [\n\t'beforeinput',\n\t'click',\n\t'change',\n\t'dblclick',\n\t'contextmenu',\n\t'focusin',\n\t'focusout',\n\t'input',\n\t'keydown',\n\t'keyup',\n\t'mousedown',\n\t'mousemove',\n\t'mouseout',\n\t'mouseover',\n\t'mouseup',\n\t'pointerdown',\n\t'pointermove',\n\t'pointerout',\n\t'pointerover',\n\t'pointerup',\n\t'touchend',\n\t'touchmove',\n\t'touchstart'\n];\n\n/**\n * Returns `true` if `event_name` is a delegated event\n * @param {string} event_name\n */\nexport function is_delegated(event_name) {\n\treturn DELEGATED_EVENTS.includes(event_name);\n}\n\n/**\n * Attributes that are boolean, i.e. they are present or not present.\n */\nconst DOM_BOOLEAN_ATTRIBUTES = [\n\t'allowfullscreen',\n\t'async',\n\t'autofocus',\n\t'autoplay',\n\t'checked',\n\t'controls',\n\t'default',\n\t'disabled',\n\t'formnovalidate',\n\t'hidden',\n\t'indeterminate',\n\t'ismap',\n\t'loop',\n\t'multiple',\n\t'muted',\n\t'nomodule',\n\t'novalidate',\n\t'open',\n\t'playsinline',\n\t'readonly',\n\t'required',\n\t'reversed',\n\t'seamless',\n\t'selected',\n\t'webkitdirectory'\n];\n\n/**\n * Returns `true` if `name` is a boolean attribute\n * @param {string} name\n */\nexport function is_boolean_attribute(name) {\n\treturn DOM_BOOLEAN_ATTRIBUTES.includes(name);\n}\n\n/**\n * @type {Record<string, string>}\n * List of attribute names that should be aliased to their property names\n * because they behave differently between setting them as an attribute and\n * setting them as a property.\n */\nconst ATTRIBUTE_ALIASES = {\n\t// no `class: 'className'` because we handle that separately\n\tformnovalidate: 'formNoValidate',\n\tismap: 'isMap',\n\tnomodule: 'noModule',\n\tplaysinline: 'playsInline',\n\treadonly: 'readOnly',\n\tdefaultvalue: 'defaultValue',\n\tdefaultchecked: 'defaultChecked',\n\tsrcobject: 'srcObject'\n};\n\n/**\n * @param {string} name\n */\nexport function normalize_attribute(name) {\n\tname = name.toLowerCase();\n\treturn ATTRIBUTE_ALIASES[name] ?? name;\n}\n\nconst DOM_PROPERTIES = [\n\t...DOM_BOOLEAN_ATTRIBUTES,\n\t'formNoValidate',\n\t'isMap',\n\t'noModule',\n\t'playsInline',\n\t'readOnly',\n\t'value',\n\t'inert',\n\t'volume',\n\t'defaultValue',\n\t'defaultChecked',\n\t'srcObject'\n];\n\n/**\n * @param {string} name\n */\nexport function is_dom_property(name) {\n\treturn DOM_PROPERTIES.includes(name);\n}\n\nconst NON_STATIC_PROPERTIES = ['autofocus', 'muted', 'defaultValue', 'defaultChecked'];\n\n/**\n * Returns `true` if the given attribute cannot be set through the template\n * string, i.e. needs some kind of JavaScript handling to work.\n * @param {string} name\n */\nexport function cannot_be_set_statically(name) {\n\treturn NON_STATIC_PROPERTIES.includes(name);\n}\n\n/**\n * Subset of delegated events which should be passive by default.\n * These two are already passive via browser defaults on window, document and body.\n * But since\n * - we're delegating them\n * - they happen often\n * - they apply to mobile which is generally less performant\n * we're marking them as passive by default for other elements, too.\n */\nconst PASSIVE_EVENTS = ['touchstart', 'touchmove'];\n\n/**\n * Returns `true` if `name` is a passive event\n * @param {string} name\n */\nexport function is_passive_event(name) {\n\treturn PASSIVE_EVENTS.includes(name);\n}\n\nconst CONTENT_EDITABLE_BINDINGS = ['textContent', 'innerHTML', 'innerText'];\n\n/** @param {string} name */\nexport function is_content_editable_binding(name) {\n\treturn CONTENT_EDITABLE_BINDINGS.includes(name);\n}\n\nconst LOAD_ERROR_ELEMENTS = [\n\t'body',\n\t'embed',\n\t'iframe',\n\t'img',\n\t'link',\n\t'object',\n\t'script',\n\t'style',\n\t'track'\n];\n\n/**\n * Returns `true` if the element emits `load` and `error` events\n * @param {string} name\n */\nexport function is_load_error_element(name) {\n\treturn LOAD_ERROR_ELEMENTS.includes(name);\n}\n\nconst SVG_ELEMENTS = [\n\t'altGlyph',\n\t'altGlyphDef',\n\t'altGlyphItem',\n\t'animate',\n\t'animateColor',\n\t'animateMotion',\n\t'animateTransform',\n\t'circle',\n\t'clipPath',\n\t'color-profile',\n\t'cursor',\n\t'defs',\n\t'desc',\n\t'discard',\n\t'ellipse',\n\t'feBlend',\n\t'feColorMatrix',\n\t'feComponentTransfer',\n\t'feComposite',\n\t'feConvolveMatrix',\n\t'feDiffuseLighting',\n\t'feDisplacementMap',\n\t'feDistantLight',\n\t'feDropShadow',\n\t'feFlood',\n\t'feFuncA',\n\t'feFuncB',\n\t'feFuncG',\n\t'feFuncR',\n\t'feGaussianBlur',\n\t'feImage',\n\t'feMerge',\n\t'feMergeNode',\n\t'feMorphology',\n\t'feOffset',\n\t'fePointLight',\n\t'feSpecularLighting',\n\t'feSpotLight',\n\t'feTile',\n\t'feTurbulence',\n\t'filter',\n\t'font',\n\t'font-face',\n\t'font-face-format',\n\t'font-face-name',\n\t'font-face-src',\n\t'font-face-uri',\n\t'foreignObject',\n\t'g',\n\t'glyph',\n\t'glyphRef',\n\t'hatch',\n\t'hatchpath',\n\t'hkern',\n\t'image',\n\t'line',\n\t'linearGradient',\n\t'marker',\n\t'mask',\n\t'mesh',\n\t'meshgradient',\n\t'meshpatch',\n\t'meshrow',\n\t'metadata',\n\t'missing-glyph',\n\t'mpath',\n\t'path',\n\t'pattern',\n\t'polygon',\n\t'polyline',\n\t'radialGradient',\n\t'rect',\n\t'set',\n\t'solidcolor',\n\t'stop',\n\t'svg',\n\t'switch',\n\t'symbol',\n\t'text',\n\t'textPath',\n\t'tref',\n\t'tspan',\n\t'unknown',\n\t'use',\n\t'view',\n\t'vkern'\n];\n\n/** @param {string} name */\nexport function is_svg(name) {\n\treturn SVG_ELEMENTS.includes(name);\n}\n\nconst MATHML_ELEMENTS = [\n\t'annotation',\n\t'annotation-xml',\n\t'maction',\n\t'math',\n\t'merror',\n\t'mfrac',\n\t'mi',\n\t'mmultiscripts',\n\t'mn',\n\t'mo',\n\t'mover',\n\t'mpadded',\n\t'mphantom',\n\t'mprescripts',\n\t'mroot',\n\t'mrow',\n\t'ms',\n\t'mspace',\n\t'msqrt',\n\t'mstyle',\n\t'msub',\n\t'msubsup',\n\t'msup',\n\t'mtable',\n\t'mtd',\n\t'mtext',\n\t'mtr',\n\t'munder',\n\t'munderover',\n\t'semantics'\n];\n\n/** @param {string} name */\nexport function is_mathml(name) {\n\treturn MATHML_ELEMENTS.includes(name);\n}\n\nconst RUNES = /** @type {const} */ ([\n\t'$state',\n\t'$state.raw',\n\t'$state.snapshot',\n\t'$props',\n\t'$bindable',\n\t'$derived',\n\t'$derived.by',\n\t'$effect',\n\t'$effect.pre',\n\t'$effect.tracking',\n\t'$effect.root',\n\t'$inspect',\n\t'$inspect().with',\n\t'$inspect.trace',\n\t'$host'\n]);\n\n/**\n * @param {string} name\n * @returns {name is RUNES[number]}\n */\nexport function is_rune(name) {\n\treturn RUNES.includes(/** @type {RUNES[number]} */ (name));\n}\n\n/** List of elements that require raw contents and should not have SSR comments put in them */\nconst RAW_TEXT_ELEMENTS = /** @type {const} */ (['textarea', 'script', 'style', 'title']);\n\n/** @param {string} name */\nexport function is_raw_text_element(name) {\n\treturn RAW_TEXT_ELEMENTS.includes(/** @type {RAW_TEXT_ELEMENTS[number]} */ (name));\n}\n\n/**\n * Prevent devtools trying to make `location` a clickable link by inserting a zero-width space\n * @param {string | undefined} location\n */\nexport function sanitize_location(location) {\n\treturn location?.replace(/\\//g, '/\\u200b');\n}\n","export default false;\n","// Store the references to globals in case someone tries to monkey patch these, causing the below\n// to de-opt (this occurs often when using popular extensions).\nexport var is_array = Array.isArray;\nexport var array_from = Array.from;\nexport var object_keys = Object.keys;\nexport var define_property = Object.defineProperty;\nexport var get_descriptor = Object.getOwnPropertyDescriptor;\nexport var get_descriptors = Object.getOwnPropertyDescriptors;\nexport var object_prototype = Object.prototype;\nexport var array_prototype = Array.prototype;\nexport var get_prototype_of = Object.getPrototypeOf;\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nexport const noop = () => {};\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n\n/**\n * @template [T=any]\n * @param {any} value\n * @returns {value is PromiseLike<T>}\n */\nexport function is_promise(value) {\n\treturn typeof value?.then === 'function';\n}\n\n/** @param {Function} fn */\nexport function run(fn) {\n\treturn fn();\n}\n\n/** @param {Array<() => void>} arr */\nexport function run_all(arr) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tarr[i]();\n\t}\n}\n\n/**\n * TODO replace with Promise.withResolvers once supported widely enough\n * @template T\n */\nexport function deferred() {\n\t/** @type {(value: T) => void} */\n\tvar resolve;\n\n\t/** @type {(reason: any) => void} */\n\tvar reject;\n\n\t/** @type {Promise<T>} */\n\tvar promise = new Promise((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\n\t// @ts-expect-error\n\treturn { promise, resolve, reject };\n}\n\n/**\n * @template V\n * @param {V} value\n * @param {V | (() => V)} fallback\n * @param {boolean} [lazy]\n * @returns {V}\n */\nexport function fallback(value, fallback, lazy = false) {\n\treturn value === undefined\n\t\t? lazy\n\t\t\t? /** @type {() => V} */ (fallback)()\n\t\t\t: /** @type {V} */ (fallback)\n\t\t: value;\n}\n","export const DERIVED = 1 << 1;\nexport const EFFECT = 1 << 2;\nexport const RENDER_EFFECT = 1 << 3;\nexport const BLOCK_EFFECT = 1 << 4;\nexport const BRANCH_EFFECT = 1 << 5;\nexport const ROOT_EFFECT = 1 << 6;\nexport const BOUNDARY_EFFECT = 1 << 7;\nexport const UNOWNED = 1 << 8;\nexport const DISCONNECTED = 1 << 9;\nexport const CLEAN = 1 << 10;\nexport const DIRTY = 1 << 11;\nexport const MAYBE_DIRTY = 1 << 12;\nexport const INERT = 1 << 13;\nexport const DESTROYED = 1 << 14;\nexport const EFFECT_RAN = 1 << 15;\n/** 'Transparent' effects do not create a transition boundary */\nexport const EFFECT_TRANSPARENT = 1 << 16;\n/** Svelte 4 legacy mode props need to be handled with deriveds and be recognized elsewhere, hence the dedicated flag */\nexport const LEGACY_DERIVED_PROP = 1 << 17;\nexport const INSPECT_EFFECT = 1 << 18;\nexport const HEAD_EFFECT = 1 << 19;\nexport const EFFECT_HAS_DERIVED = 1 << 20;\n\nexport const STATE_SYMBOL = Symbol('$state');\nexport const STATE_SYMBOL_METADATA = Symbol('$state metadata');\nexport const LEGACY_PROPS = Symbol('legacy props');\nexport const LOADING_ATTR_SYMBOL = Symbol('');\n","/** @import { Equals } from '#client' */\n/** @type {Equals} */\nexport function equals(value) {\n\treturn value === this.v;\n}\n\n/**\n * @param {unknown} a\n * @param {unknown} b\n * @returns {boolean}\n */\nexport function safe_not_equal(a, b) {\n\treturn a != a\n\t\t? b == b\n\t\t: a !== b || (a !== null && typeof a === 'object') || typeof a === 'function';\n}\n\n/**\n * @param {unknown} a\n * @param {unknown} b\n * @returns {boolean}\n */\nexport function not_equal(a, b) {\n\treturn a !== b;\n}\n\n/** @type {Equals} */\nexport function safe_equals(value) {\n\treturn !safe_not_equal(value, this.v);\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\n/**\n * Using `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\n * @returns {never}\n */\nexport function bind_invalid_checkbox_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_invalid_checkbox_value\\nUsing \\`bind:value\\` together with a checkbox input is not allowed. Use \\`bind:checked\\` instead\\nhttps://svelte.dev/e/bind_invalid_checkbox_value`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_invalid_checkbox_value`);\n\t}\n}\n\n/**\n * Component %component% has an export named `%key%` that a consumer component is trying to access using `bind:%key%`, which is disallowed. Instead, use `bind:this` (e.g. `<%name% bind:this={component} />`) and then access the property on the bound component instance (e.g. `component.%key%`)\n * @param {string} component\n * @param {string} key\n * @param {string} name\n * @returns {never}\n */\nexport function bind_invalid_export(component, key, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_invalid_export\\nComponent ${component} has an export named \\`${key}\\` that a consumer component is trying to access using \\`bind:${key}\\`, which is disallowed. Instead, use \\`bind:this\\` (e.g. \\`<${name} bind:this={component} />\\`) and then access the property on the bound component instance (e.g. \\`component.${key}\\`)\\nhttps://svelte.dev/e/bind_invalid_export`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_invalid_export`);\n\t}\n}\n\n/**\n * A component is attempting to bind to a non-bindable property `%key%` belonging to %component% (i.e. `<%name% bind:%key%={...}>`). To mark a property as bindable: `let { %key% = $bindable() } = $props()`\n * @param {string} key\n * @param {string} component\n * @param {string} name\n * @returns {never}\n */\nexport function bind_not_bindable(key, component, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`bind_not_bindable\\nA component is attempting to bind to a non-bindable property \\`${key}\\` belonging to ${component} (i.e. \\`<${name} bind:${key}={...}>\\`). To mark a property as bindable: \\`let { ${key} = $bindable() } = $props()\\`\\nhttps://svelte.dev/e/bind_not_bindable`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/bind_not_bindable`);\n\t}\n}\n\n/**\n * %parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information\n * @param {string} parent\n * @param {string} method\n * @param {string} component\n * @returns {never}\n */\nexport function component_api_changed(parent, method, component) {\n\tif (DEV) {\n\t\tconst error = new Error(`component_api_changed\\n${parent} called \\`${method}\\` on an instance of ${component}, which is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information\\nhttps://svelte.dev/e/component_api_changed`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/component_api_changed`);\n\t}\n}\n\n/**\n * Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information\n * @param {string} component\n * @param {string} name\n * @returns {never}\n */\nexport function component_api_invalid_new(component, name) {\n\tif (DEV) {\n\t\tconst error = new Error(`component_api_invalid_new\\nAttempted to instantiate ${component} with \\`new ${name}\\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \\`compatibility.componentApi\\` compiler option to \\`4\\` to keep it working. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information\\nhttps://svelte.dev/e/component_api_invalid_new`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/component_api_invalid_new`);\n\t}\n}\n\n/**\n * A derived value cannot reference itself recursively\n * @returns {never}\n */\nexport function derived_references_self() {\n\tif (DEV) {\n\t\tconst error = new Error(`derived_references_self\\nA derived value cannot reference itself recursively\\nhttps://svelte.dev/e/derived_references_self`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/derived_references_self`);\n\t}\n}\n\n/**\n * Keyed each block has duplicate key `%value%` at indexes %a% and %b%\n * @param {string} a\n * @param {string} b\n * @param {string | undefined | null} [value]\n * @returns {never}\n */\nexport function each_key_duplicate(a, b, value) {\n\tif (DEV) {\n\t\tconst error = new Error(`each_key_duplicate\\n${value ? `Keyed each block has duplicate key \\`${value}\\` at indexes ${a} and ${b}` : `Keyed each block has duplicate key at indexes ${a} and ${b}`}\\nhttps://svelte.dev/e/each_key_duplicate`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/each_key_duplicate`);\n\t}\n}\n\n/**\n * `%rune%` cannot be used inside an effect cleanup function\n * @param {string} rune\n * @returns {never}\n */\nexport function effect_in_teardown(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_in_teardown\\n\\`${rune}\\` cannot be used inside an effect cleanup function\\nhttps://svelte.dev/e/effect_in_teardown`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_in_teardown`);\n\t}\n}\n\n/**\n * Effect cannot be created inside a `$derived` value that was not itself created inside an effect\n * @returns {never}\n */\nexport function effect_in_unowned_derived() {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_in_unowned_derived\\nEffect cannot be created inside a \\`$derived\\` value that was not itself created inside an effect\\nhttps://svelte.dev/e/effect_in_unowned_derived`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_in_unowned_derived`);\n\t}\n}\n\n/**\n * `%rune%` can only be used inside an effect (e.g. during component initialisation)\n * @param {string} rune\n * @returns {never}\n */\nexport function effect_orphan(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_orphan\\n\\`${rune}\\` can only be used inside an effect (e.g. during component initialisation)\\nhttps://svelte.dev/e/effect_orphan`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_orphan`);\n\t}\n}\n\n/**\n * Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops\n * @returns {never}\n */\nexport function effect_update_depth_exceeded() {\n\tif (DEV) {\n\t\tconst error = new Error(`effect_update_depth_exceeded\\nMaximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops\\nhttps://svelte.dev/e/effect_update_depth_exceeded`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);\n\t}\n}\n\n/**\n * Failed to hydrate the application\n * @returns {never}\n */\nexport function hydration_failed() {\n\tif (DEV) {\n\t\tconst error = new Error(`hydration_failed\\nFailed to hydrate the application\\nhttps://svelte.dev/e/hydration_failed`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/hydration_failed`);\n\t}\n}\n\n/**\n * Could not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\n * @returns {never}\n */\nexport function invalid_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_snippet\\nCould not \\`{@render}\\` snippet due to the expression being \\`null\\` or \\`undefined\\`. Consider using optional chaining \\`{@render snippet?.()}\\`\\nhttps://svelte.dev/e/invalid_snippet`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_snippet`);\n\t}\n}\n\n/**\n * `%name%(...)` cannot be used in runes mode\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_legacy_only(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_legacy_only\\n\\`${name}(...)\\` cannot be used in runes mode\\nhttps://svelte.dev/e/lifecycle_legacy_only`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_legacy_only`);\n\t}\n}\n\n/**\n * Cannot do `bind:%key%={undefined}` when `%key%` has a fallback value\n * @param {string} key\n * @returns {never}\n */\nexport function props_invalid_value(key) {\n\tif (DEV) {\n\t\tconst error = new Error(`props_invalid_value\\nCannot do \\`bind:${key}={undefined}\\` when \\`${key}\\` has a fallback value\\nhttps://svelte.dev/e/props_invalid_value`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/props_invalid_value`);\n\t}\n}\n\n/**\n * Rest element properties of `$props()` such as `%property%` are readonly\n * @param {string} property\n * @returns {never}\n */\nexport function props_rest_readonly(property) {\n\tif (DEV) {\n\t\tconst error = new Error(`props_rest_readonly\\nRest element properties of \\`$props()\\` such as \\`${property}\\` are readonly\\nhttps://svelte.dev/e/props_rest_readonly`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/props_rest_readonly`);\n\t}\n}\n\n/**\n * The `%rune%` rune is only available inside `.svelte` and `.svelte.js/ts` files\n * @param {string} rune\n * @returns {never}\n */\nexport function rune_outside_svelte(rune) {\n\tif (DEV) {\n\t\tconst error = new Error(`rune_outside_svelte\\nThe \\`${rune}\\` rune is only available inside \\`.svelte\\` and \\`.svelte.js/ts\\` files\\nhttps://svelte.dev/e/rune_outside_svelte`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/rune_outside_svelte`);\n\t}\n}\n\n/**\n * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\n * @returns {never}\n */\nexport function state_descriptors_fixed() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_descriptors_fixed\\nProperty descriptors defined on \\`$state\\` objects must contain \\`value\\` and always be \\`enumerable\\`, \\`configurable\\` and \\`writable\\`.\\nhttps://svelte.dev/e/state_descriptors_fixed`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_descriptors_fixed`);\n\t}\n}\n\n/**\n * Cannot set prototype of `$state` object\n * @returns {never}\n */\nexport function state_prototype_fixed() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_prototype_fixed\\nCannot set prototype of \\`$state\\` object\\nhttps://svelte.dev/e/state_prototype_fixed`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_prototype_fixed`);\n\t}\n}\n\n/**\n * Reading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state\n * @returns {never}\n */\nexport function state_unsafe_local_read() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_unsafe_local_read\\nReading state that was created inside the same derived is forbidden. Consider using \\`untrack\\` to read locally created state\\nhttps://svelte.dev/e/state_unsafe_local_read`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_unsafe_local_read`);\n\t}\n}\n\n/**\n * Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\n * @returns {never}\n */\nexport function state_unsafe_mutation() {\n\tif (DEV) {\n\t\tconst error = new Error(`state_unsafe_mutation\\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without \\`$state\\`\\nhttps://svelte.dev/e/state_unsafe_mutation`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/state_unsafe_mutation`);\n\t}\n}","/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */\nimport { DEV } from 'esm-env';\nimport {\n\tcomponent_context,\n\tactive_reaction,\n\tnew_deps,\n\tactive_effect,\n\tuntracked_writes,\n\tget,\n\tis_runes,\n\tschedule_effect,\n\tset_untracked_writes,\n\tset_signal_status,\n\tuntrack,\n\tincrement_version,\n\tupdate_effect,\n\tderived_sources,\n\tset_derived_sources,\n\tcheck_dirtiness,\n\tset_is_flushing_effect,\n\tis_flushing_effect\n} from '../runtime.js';\nimport { equals, safe_equals } from './equality.js';\nimport {\n\tCLEAN,\n\tDERIVED,\n\tDIRTY,\n\tBRANCH_EFFECT,\n\tINSPECT_EFFECT,\n\tUNOWNED,\n\tMAYBE_DIRTY,\n\tBLOCK_EFFECT\n} from '../constants.js';\nimport * as e from '../errors.js';\nimport { legacy_mode_flag } from '../../flags/index.js';\nimport { get_stack } from '../dev/tracing.js';\n\nexport let inspect_effects = new Set();\n\n/**\n * @param {Set<any>} v\n */\nexport function set_inspect_effects(v) {\n\tinspect_effects = v;\n}\n\n/**\n * @template V\n * @param {V} v\n * @param {Error | null} [stack]\n * @returns {Source<V>}\n */\nexport function source(v, stack) {\n\t/** @type {Value} */\n\tvar signal = {\n\t\tf: 0, // TODO ideally we could skip this altogether, but it causes type errors\n\t\tv,\n\t\treactions: null,\n\t\tequals,\n\t\tversion: 0\n\t};\n\n\tif (DEV) {\n\t\tsignal.created = stack ?? get_stack('CreatedAt');\n\t\tsignal.debug = null;\n\t}\n\n\treturn signal;\n}\n\n/**\n * @template V\n * @param {V} v\n */\nexport function state(v) {\n\treturn push_derived_source(source(v));\n}\n\n/**\n * @template V\n * @param {V} initial_value\n * @param {boolean} [immutable]\n * @returns {Source<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function mutable_source(initial_value, immutable = false) {\n\tconst s = source(initial_value);\n\tif (!immutable) {\n\t\ts.equals = safe_equals;\n\t}\n\n\t// bind the signal to the component context, in case we need to\n\t// track updates to trigger beforeUpdate/afterUpdate callbacks\n\tif (legacy_mode_flag && component_context !== null && component_context.l !== null) {\n\t\t(component_context.l.s ??= []).push(s);\n\t}\n\n\treturn s;\n}\n\n/**\n * @template V\n * @param {V} v\n * @param {boolean} [immutable]\n * @returns {Source<V>}\n */\nexport function mutable_state(v, immutable = false) {\n\treturn push_derived_source(mutable_source(v, immutable));\n}\n\n/**\n * @template V\n * @param {Source<V>} source\n */\n/*#__NO_SIDE_EFFECTS__*/\nfunction push_derived_source(source) {\n\tif (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) {\n\t\tif (derived_sources === null) {\n\t\t\tset_derived_sources([source]);\n\t\t} else {\n\t\t\tderived_sources.push(source);\n\t\t}\n\t}\n\n\treturn source;\n}\n\n/**\n * @template V\n * @param {Value<V>} source\n * @param {V} value\n */\nexport function mutate(source, value) {\n\tset(\n\t\tsource,\n\t\tuntrack(() => get(source))\n\t);\n\treturn value;\n}\n\n/**\n * @template V\n * @param {Source<V>} source\n * @param {V} value\n * @returns {V}\n */\nexport function set(source, value) {\n\tif (\n\t\tactive_reaction !== null &&\n\t\tis_runes() &&\n\t\t(active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 &&\n\t\t// If the source was created locally within the current derived, then\n\t\t// we allow the mutation.\n\t\t(derived_sources === null || !derived_sources.includes(source))\n\t) {\n\t\te.state_unsafe_mutation();\n\t}\n\n\treturn internal_set(source, value);\n}\n\n/**\n * @template V\n * @param {Source<V>} source\n * @param {V} value\n * @returns {V}\n */\nexport function internal_set(source, value) {\n\tif (!source.equals(value)) {\n\t\tsource.v = value;\n\t\tsource.version = increment_version();\n\n\t\tif (DEV) {\n\t\t\tsource.updated = get_stack('UpdatedAt');\n\t\t}\n\n\t\tmark_reactions(source, DIRTY);\n\n\t\t// If the current signal is running for the first time, it won't have any\n\t\t// reactions as we only allocate and assign the reactions after the signal\n\t\t// has fully executed. So in the case of ensuring it registers the reaction\n\t\t// properly for itself, we need to ensure the current effect actually gets\n\t\t// scheduled. i.e: `$effect(() => x++)`\n\t\tif (\n\t\t\tis_runes() &&\n\t\t\tactive_effect !== null &&\n\t\t\t(active_effect.f & CLEAN) !== 0 &&\n\t\t\t(active_effect.f & BRANCH_EFFECT) === 0\n\t\t) {\n\t\t\tif (new_deps !== null && new_deps.includes(source)) {\n\t\t\t\tset_signal_status(active_effect, DIRTY);\n\t\t\t\tschedule_effect(active_effect);\n\t\t\t} else {\n\t\t\t\tif (untracked_writes === null) {\n\t\t\t\t\tset_untracked_writes([source]);\n\t\t\t\t} else {\n\t\t\t\t\tuntracked_writes.push(source);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (DEV && inspect_effects.size > 0) {\n\t\t\tconst inspects = Array.from(inspect_effects);\n\t\t\tvar previously_flushing_effect = is_flushing_effect;\n\t\t\tset_is_flushing_effect(true);\n\t\t\ttry {\n\t\t\t\tfor (const effect of inspects) {\n\t\t\t\t\t// Mark clean inspect-effects as maybe dirty and then check their dirtiness\n\t\t\t\t\t// instead of just updating the effects - this way we avoid overfiring.\n\t\t\t\t\tif ((effect.f & CLEAN) !== 0) {\n\t\t\t\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t\t\t\t}\n\t\t\t\t\tif (check_dirtiness(effect)) {\n\t\t\t\t\t\tupdate_effect(effect);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tset_is_flushing_effect(previously_flushing_effect);\n\t\t\t}\n\t\t\tinspect_effects.clear();\n\t\t}\n\t}\n\n\treturn value;\n}\n\n/**\n * @param {Value} signal\n * @param {number} status should be DIRTY or MAYBE_DIRTY\n * @returns {void}\n */\nfunction mark_reactions(signal, status) {\n\tvar reactions = signal.reactions;\n\tif (reactions === null) return;\n\n\tvar runes = is_runes();\n\tvar length = reactions.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tvar reaction = reactions[i];\n\t\tvar flags = reaction.f;\n\n\t\t// Skip any effects that are already dirty\n\t\tif ((flags & DIRTY) !== 0) continue;\n\n\t\t// In legacy mode, skip the current effect to prevent infinite loops\n\t\tif (!runes && reaction === active_effect) continue;\n\n\t\t// Inspect effects need to run immediately, so that the stack trace makes sense\n\t\tif (DEV && (flags & INSPECT_EFFECT) !== 0) {\n\t\t\tinspect_effects.add(reaction);\n\t\t\tcontinue;\n\t\t}\n\n\t\tset_signal_status(reaction, status);\n\n\t\t// If the signal a) was previously clean or b) is an unowned derived, then mark it\n\t\tif ((flags & (CLEAN | UNOWNED)) !== 0) {\n\t\t\tif ((flags & DERIVED) !== 0) {\n\t\t\t\tmark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY);\n\t\t\t} else {\n\t\t\t\tschedule_effect(/** @type {Effect} */ (reaction));\n\t\t\t}\n\t\t}\n\t}\n}\n","/** @import { ComponentContext, Derived, Effect, Reaction, Signal, Source, Value } from '#client' */\nimport { DEV } from 'esm-env';\nimport { define_property, get_descriptors, get_prototype_of } from '../shared/utils.js';\nimport {\n\tdestroy_block_effect_children,\n\tdestroy_effect_children,\n\tdestroy_effect_deriveds,\n\teffect,\n\texecute_effect_teardown,\n\tunlink_effect\n} from './reactivity/effects.js';\nimport {\n\tEFFECT,\n\tRENDER_EFFECT,\n\tDIRTY,\n\tMAYBE_DIRTY,\n\tCLEAN,\n\tDERIVED,\n\tUNOWNED,\n\tDESTROYED,\n\tINERT,\n\tBRANCH_EFFECT,\n\tSTATE_SYMBOL,\n\tBLOCK_EFFECT,\n\tROOT_EFFECT,\n\tLEGACY_DERIVED_PROP,\n\tDISCONNECTED,\n\tBOUNDARY_EFFECT\n} from './constants.js';\nimport { flush_tasks } from './dom/task.js';\nimport { add_owner } from './dev/ownership.js';\nimport { internal_set, set, source } from './reactivity/sources.js';\nimport { destroy_derived, execute_derived, update_derived } from './reactivity/deriveds.js';\nimport * as e from './errors.js';\nimport { lifecycle_outside_component } from '../shared/errors.js';\nimport { FILENAME } from '../../constants.js';\nimport { legacy_mode_flag } from '../flags/index.js';\nimport { tracing_expressions, get_stack } from './dev/tracing.js';\n\nconst FLUSH_MICROTASK = 0;\nconst FLUSH_SYNC = 1;\n// Used for DEV time error handling\n/** @param {WeakSet<Error>} value */\nconst handled_errors = new WeakSet();\nexport let is_throwing_error = false;\n\n// Used for controlling the flush of effects.\nlet scheduler_mode = FLUSH_MICROTASK;\n// Used for handling scheduling\nlet is_micro_task_queued = false;\n\n/** @type {Effect | null} */\nlet last_scheduled_effect = null;\n\nexport let is_flushing_effect = false;\nexport let is_destroying_effect = false;\n\n/** @param {boolean} value */\nexport function set_is_flushing_effect(value) {\n\tis_flushing_effect = value;\n}\n\n/** @param {boolean} value */\nexport function set_is_destroying_effect(value) {\n\tis_destroying_effect = value;\n}\n\n// Handle effect queues\n\n/** @type {Effect[]} */\nlet queued_root_effects = [];\n\nlet flush_count = 0;\n/** @type {Effect[]} Stack of effects, dev only */\nlet dev_effect_stack = [];\n// Handle signal reactivity tree dependencies and reactions\n\n/** @type {null | Reaction} */\nexport let active_reaction = null;\n\n/** @param {null | Reaction} reaction */\nexport function set_active_reaction(reaction) {\n\tactive_reaction = reaction;\n}\n\n/** @type {null | Effect} */\nexport let active_effect = null;\n\n/** @param {null | Effect} effect */\nexport function set_active_effect(effect) {\n\tactive_effect = effect;\n}\n\n/**\n * When sources are created within a derived, we record them so that we can safely allow\n * local mutations to these sources without the side-effect error being invoked unnecessarily.\n * @type {null | Source[]}\n */\nexport let derived_sources = null;\n\n/**\n * @param {Source[] | null} sources\n */\nexport function set_derived_sources(sources) {\n\tderived_sources = sources;\n}\n\n/**\n * The dependencies of the reaction that is currently being executed. In many cases,\n * the dependencies are unchanged between runs, and so this will be `null` unless\n * and until a new dependency is accessed — we track this via `skipped_deps`\n * @type {null | Value[]}\n */\nexport let new_deps = null;\n\nlet skipped_deps = 0;\n\n/**\n * Tracks writes that the effect it's executed in doesn't listen to yet,\n * so that the dependency can be added to the effect later on if it then reads it\n * @type {null | Source[]}\n */\nexport let untracked_writes = null;\n\n/** @param {null | Source[]} value */\nexport function set_untracked_writes(value) {\n\tuntracked_writes = value;\n}\n\n/** @type {number} Used by sources and deriveds for handling updates to unowned deriveds it starts from 1 to differentiate between a created effect and a run one for tracing */\nlet current_version = 1;\n\n// If we are working with a get() chain that has no active container,\n// to prevent memory leaks, we skip adding the reaction.\nexport let skip_reaction = false;\n// Handle collecting all signals which are read during a specific time frame\n/** @type {Set<Value> | null} */\nexport let captured_signals = null;\n\n/** @param {Set<Value> | null} value */\nexport function set_captured_signals(value) {\n\tcaptured_signals = value;\n}\n\n// Handling runtime component context\n/** @type {ComponentContext | null} */\nexport let component_context = null;\n\n/** @param {ComponentContext | null} context */\nexport function set_component_context(context) {\n\tcomponent_context = context;\n}\n\n/**\n * The current component function. Different from current component context:\n * ```html\n * <!-- App.svelte -->\n * <Foo>\n * <Bar /> <!-- context == Foo.svelte, function == App.svelte -->\n * </Foo>\n * ```\n * @type {ComponentContext['function']}\n */\nexport let dev_current_component_function = null;\n\n/** @param {ComponentContext['function']} fn */\nexport function set_dev_current_component_function(fn) {\n\tdev_current_component_function = fn;\n}\n\nexport function increment_version() {\n\treturn ++current_version;\n}\n\n/** @returns {boolean} */\nexport function is_runes() {\n\treturn !legacy_mode_flag || (component_context !== null && component_context.l === null);\n}\n\n/**\n * Determines whether a derived or effect is dirty.\n * If it is MAYBE_DIRTY, will set the status to CLEAN\n * @param {Reaction} reaction\n * @returns {boolean}\n */\nexport function check_dirtiness(reaction) {\n\tvar flags = reaction.f;\n\n\tif ((flags & DIRTY) !== 0) {\n\t\treturn true;\n\t}\n\n\tif ((flags & MAYBE_DIRTY) !== 0) {\n\t\tvar dependencies = reaction.deps;\n\t\tvar is_unowned = (flags & UNOWNED) !== 0;\n\n\t\tif (dependencies !== null) {\n\t\t\tvar i;\n\n\t\t\tif ((flags & DISCONNECTED) !== 0) {\n\t\t\t\tfor (i = 0; i < dependencies.length; i++) {\n\t\t\t\t\t(dependencies[i].reactions ??= []).push(reaction);\n\t\t\t\t}\n\n\t\t\t\treaction.f ^= DISCONNECTED;\n\t\t\t}\n\n\t\t\tfor (i = 0; i < dependencies.length; i++) {\n\t\t\t\tvar dependency = dependencies[i];\n\n\t\t\t\tif (check_dirtiness(/** @type {Derived} */ (dependency))) {\n\t\t\t\t\tupdate_derived(/** @type {Derived} */ (dependency));\n\t\t\t\t}\n\n\t\t\t\t// If we are working with an unowned signal as part of an effect (due to !skip_reaction)\n\t\t\t\t// and the version hasn't changed, we still need to check that this reaction\n\t\t\t\t// is linked to the dependency source – otherwise future updates will not be caught.\n\t\t\t\tif (\n\t\t\t\t\tis_unowned &&\n\t\t\t\t\tactive_effect !== null &&\n\t\t\t\t\t!skip_reaction &&\n\t\t\t\t\t!dependency?.reactions?.includes(reaction)\n\t\t\t\t) {\n\t\t\t\t\t(dependency.reactions ??= []).push(reaction);\n\t\t\t\t}\n\n\t\t\t\tif (dependency.version > reaction.version) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Unowned signals should never be marked as clean unless they\n\t\t// are used within an active_effect without skip_reaction\n\t\tif (!is_unowned || (active_effect !== null && !skip_reaction)) {\n\t\t\tset_signal_status(reaction, CLEAN);\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * @param {unknown} error\n * @param {Effect} effect\n */\nfunction propagate_error(error, effect) {\n\t/** @type {Effect | null} */\n\tvar current = effect;\n\n\twhile (current !== null) {\n\t\tif ((current.f & BOUNDARY_EFFECT) !== 0) {\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tcurrent.fn(error);\n\t\t\t\treturn;\n\t\t\t} catch {\n\t\t\t\t// Remove boundary flag from effect\n\t\t\t\tcurrent.f ^= BOUNDARY_EFFECT;\n\t\t\t}\n\t\t}\n\n\t\tcurrent = current.parent;\n\t}\n\n\tis_throwing_error = false;\n\tthrow error;\n}\n\n/**\n * @param {Effect} effect\n */\nfunction should_rethrow_error(effect) {\n\treturn (\n\t\t(effect.f & DESTROYED) === 0 &&\n\t\t(effect.parent === null || (effect.parent.f & BOUNDARY_EFFECT) === 0)\n\t);\n}\n\nexport function reset_is_throwing_error() {\n\tis_throwing_error = false;\n}\n\n/**\n * @param {unknown} error\n * @param {Effect} effect\n * @param {Effect | null} previous_effect\n * @param {ComponentContext | null} component_context\n */\nexport function handle_error(error, effect, previous_effect, component_context) {\n\tif (is_throwing_error) {\n\t\tif (previous_effect === null) {\n\t\t\tis_throwing_error = false;\n\t\t}\n\n\t\tif (should_rethrow_error(effect)) {\n\t\t\tthrow error;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tif (previous_effect !== null) {\n\t\tis_throwing_error = true;\n\t}\n\n\tif (\n\t\t!DEV ||\n\t\tcomponent_context === null ||\n\t\t!(error instanceof Error) ||\n\t\thandled_errors.has(error)\n\t) {\n\t\tpropagate_error(error, effect);\n\t\treturn;\n\t}\n\n\thandled_errors.add(error);\n\n\tconst component_stack = [];\n\n\tconst effect_name = effect.fn?.name;\n\n\tif (effect_name) {\n\t\tcomponent_stack.push(effect_name);\n\t}\n\n\t/** @type {ComponentContext | null} */\n\tlet current_context = component_context;\n\n\twhile (current_context !== null) {\n\t\tif (DEV) {\n\t\t\t/** @type {string} */\n\t\t\tvar filename = current_context.function?.[FILENAME];\n\n\t\t\tif (filename) {\n\t\t\t\tconst file = filename.split('/').pop();\n\t\t\t\tcomponent_stack.push(file);\n\t\t\t}\n\t\t}\n\n\t\tcurrent_context = current_context.p;\n\t}\n\n\tconst indent = /Firefox/.test(navigator.userAgent) ? ' ' : '\\t';\n\tdefine_property(error, 'message', {\n\t\tvalue: error.message + `\\n${component_stack.map((name) => `\\n${indent}in ${name}`).join('')}\\n`\n\t});\n\tdefine_property(error, 'component_stack', {\n\t\tvalue: component_stack\n\t});\n\n\tconst stack = error.stack;\n\n\t// Filter out internal files from callstack\n\tif (stack) {\n\t\tconst lines = stack.split('\\n');\n\t\tconst new_lines = [];\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line = lines[i];\n\t\t\tif (line.includes('svelte/src/internal')) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnew_lines.push(line);\n\t\t}\n\t\tdefine_property(error, 'stack', {\n\t\t\tvalue: new_lines.join('\\n')\n\t\t});\n\t}\n\n\tpropagate_error(error, effect);\n\n\tif (should_rethrow_error(effect)) {\n\t\tthrow error;\n\t}\n}\n\n/**\n * @template V\n * @param {Reaction} reaction\n * @returns {V}\n */\nexport function update_reaction(reaction) {\n\tvar previous_deps = new_deps;\n\tvar previous_skipped_deps = skipped_deps;\n\tvar previous_untracked_writes = untracked_writes;\n\tvar previous_reaction = active_reaction;\n\tvar previous_skip_reaction = skip_reaction;\n\tvar prev_derived_sources = derived_sources;\n\tvar previous_component_context = component_context;\n\tvar flags = reaction.f;\n\n\tnew_deps = /** @type {null | Value[]} */ (null);\n\tskipped_deps = 0;\n\tuntracked_writes = null;\n\tactive_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null;\n\tskip_reaction = !is_flushing_effect && (flags & UNOWNED) !== 0;\n\tderived_sources = null;\n\tcomponent_context = reaction.ctx;\n\n\ttry {\n\t\tvar result = /** @type {Function} */ (0, reaction.fn)();\n\t\tvar deps = reaction.deps;\n\n\t\tif (new_deps !== null) {\n\t\t\tvar i;\n\n\t\t\tremove_reactions(reaction, skipped_deps);\n\n\t\t\tif (deps !== null && skipped_deps > 0) {\n\t\t\t\tdeps.length = skipped_deps + new_deps.length;\n\t\t\t\tfor (i = 0; i < new_deps.length; i++) {\n\t\t\t\t\tdeps[skipped_deps + i] = new_deps[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treaction.deps = deps = new_deps;\n\t\t\t}\n\n\t\t\tif (!skip_reaction) {\n\t\t\t\tfor (i = skipped_deps; i < deps.length; i++) {\n\t\t\t\t\t(deps[i].reactions ??= []).push(reaction);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (deps !== null && skipped_deps < deps.length) {\n\t\t\tremove_reactions(reaction, skipped_deps);\n\t\t\tdeps.length = skipped_deps;\n\t\t}\n\n\t\treturn result;\n\t} finally {\n\t\tnew_deps = previous_deps;\n\t\tskipped_deps = previous_skipped_deps;\n\t\tuntracked_writes = previous_untracked_writes;\n\t\tactive_reaction = previous_reaction;\n\t\tskip_reaction = previous_skip_reaction;\n\t\tderived_sources = prev_derived_sources;\n\t\tcomponent_context = previous_component_context;\n\t}\n}\n\n/**\n * @template V\n * @param {Reaction} signal\n * @param {Value<V>} dependency\n * @returns {void}\n */\nfunction remove_reaction(signal, dependency) {\n\tlet reactions = dependency.reactions;\n\tif (reactions !== null) {\n\t\tvar index = reactions.indexOf(signal);\n\t\tif (index !== -1) {\n\t\t\tvar new_length = reactions.length - 1;\n\t\t\tif (new_length === 0) {\n\t\t\t\treactions = dependency.reactions = null;\n\t\t\t} else {\n\t\t\t\t// Swap with last element and then remove.\n\t\t\t\treactions[index] = reactions[new_length];\n\t\t\t\treactions.pop();\n\t\t\t}\n\t\t}\n\t}\n\t// If the derived has no reactions, then we can disconnect it from the graph,\n\t// allowing it to either reconnect in the future, or be GC'd by the VM.\n\tif (\n\t\treactions === null &&\n\t\t(dependency.f & DERIVED) !== 0 &&\n\t\t// Destroying a child effect while updating a parent effect can cause a dependency to appear\n\t\t// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`\n\t\t// allows us to skip the expensive work of disconnecting and immediately reconnecting it\n\t\t(new_deps === null || !new_deps.includes(dependency))\n\t) {\n\t\tset_signal_status(dependency, MAYBE_DIRTY);\n\t\t// If we are working with a derived that is owned by an effect, then mark it as being\n\t\t// disconnected.\n\t\tif ((dependency.f & (UNOWNED | DISCONNECTED)) === 0) {\n\t\t\tdependency.f ^= DISCONNECTED;\n\t\t}\n\t\tremove_reactions(/** @type {Derived} **/ (dependency), 0);\n\t}\n}\n\n/**\n * @param {Reaction} signal\n * @param {number} start_index\n * @returns {void}\n */\nexport function remove_reactions(signal, start_index) {\n\tvar dependencies = signal.deps;\n\tif (dependencies === null) return;\n\n\tfor (var i = start_index; i < dependencies.length; i++) {\n\t\tremove_reaction(signal, dependencies[i]);\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @returns {void}\n */\nexport function update_effect(effect) {\n\tvar flags = effect.f;\n\n\tif ((flags & DESTROYED) !== 0) {\n\t\treturn;\n\t}\n\n\tset_signal_status(effect, CLEAN);\n\n\tvar previous_effect = active_effect;\n\tvar previous_component_context = component_context;\n\n\tactive_effect = effect;\n\n\tif (DEV) {\n\t\tvar previous_component_fn = dev_current_component_function;\n\t\tdev_current_component_function = effect.component_function;\n\t}\n\n\ttry {\n\t\tif ((flags & BLOCK_EFFECT) !== 0) {\n\t\t\tdestroy_block_effect_children(effect);\n\t\t} else {\n\t\t\tdestroy_effect_children(effect);\n\t\t}\n\t\tdestroy_effect_deriveds(effect);\n\n\t\texecute_effect_teardown(effect);\n\t\tvar teardown = update_reaction(effect);\n\t\teffect.teardown = typeof teardown === 'function' ? teardown : null;\n\t\teffect.version = current_version;\n\n\t\tif (DEV) {\n\t\t\tdev_effect_stack.push(effect);\n\t\t}\n\t} catch (error) {\n\t\thandle_error(error, effect, previous_effect, previous_component_context || effect.ctx);\n\t} finally {\n\t\tactive_effect = previous_effect;\n\n\t\tif (DEV) {\n\t\t\tdev_current_component_function = previous_component_fn;\n\t\t}\n\t}\n}\n\nfunction log_effect_stack() {\n\t// eslint-disable-next-line no-console\n\tconsole.error(\n\t\t'Last ten effects were: ',\n\t\tdev_effect_stack.slice(-10).map((d) => d.fn)\n\t);\n\tdev_effect_stack = [];\n}\n\nfunction infinite_loop_guard() {\n\tif (flush_count > 1000) {\n\t\tflush_count = 0;\n\t\ttry {\n\t\t\te.effect_update_depth_exceeded();\n\t\t} catch (error) {\n\t\t\tif (DEV) {\n\t\t\t\t// stack is garbage, ignore. Instead add a console.error message.\n\t\t\t\tdefine_property(error, 'stack', {\n\t\t\t\t\tvalue: ''\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Try and handle the error so it can be caught at a boundary, that's\n\t\t\t// if there's an effect available from when it was last scheduled\n\t\t\tif (last_scheduled_effect !== null) {\n\t\t\t\tif (DEV) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle_error(error, last_scheduled_effect, null, null);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t// Only log the effect stack if the error is re-thrown\n\t\t\t\t\t\tlog_effect_stack();\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandle_error(error, last_scheduled_effect, null, null);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (DEV) {\n\t\t\t\t\tlog_effect_stack();\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t}\n\tflush_count++;\n}\n\n/**\n * @param {Array<Effect>} root_effects\n * @returns {void}\n */\nfunction flush_queued_root_effects(root_effects) {\n\tvar length = root_effects.length;\n\tif (length === 0) {\n\t\treturn;\n\t}\n\tinfinite_loop_guard();\n\n\tvar previously_flushing_effect = is_flushing_effect;\n\tis_flushing_effect = true;\n\n\ttry {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar effect = root_effects[i];\n\n\t\t\tif ((effect.f & CLEAN) === 0) {\n\t\t\t\teffect.f ^= CLEAN;\n\t\t\t}\n\n\t\t\t/** @type {Effect[]} */\n\t\t\tvar collected_effects = [];\n\n\t\t\tprocess_effects(effect, collected_effects);\n\t\t\tflush_queued_effects(collected_effects);\n\t\t}\n\t} finally {\n\t\tis_flushing_effect = previously_flushing_effect;\n\t}\n}\n\n/**\n * @param {Array<Effect>} effects\n * @returns {void}\n */\nfunction flush_queued_effects(effects) {\n\tvar length = effects.length;\n\tif (length === 0) return;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tvar effect = effects[i];\n\n\t\tif ((effect.f & (DESTROYED | INERT)) === 0) {\n\t\t\ttry {\n\t\t\t\tif (check_dirtiness(effect)) {\n\t\t\t\t\tupdate_effect(effect);\n\n\t\t\t\t\t// Effects with no dependencies or teardown do not get added to the effect tree.\n\t\t\t\t\t// Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we\n\t\t\t\t\t// don't know if we need to keep them until they are executed. Doing the check\n\t\t\t\t\t// here (rather than in `update_effect`) allows us to skip the work for\n\t\t\t\t\t// immediate effects.\n\t\t\t\t\tif (effect.deps === null && effect.first === null && effect.nodes_start === null) {\n\t\t\t\t\t\tif (effect.teardown === null) {\n\t\t\t\t\t\t\t// remove this effect from the graph\n\t\t\t\t\t\t\tunlink_effect(effect);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// keep the effect in the graph, but free up some memory\n\t\t\t\t\t\t\teffect.fn = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\thandle_error(error, effect, null, effect.ctx);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction process_deferred() {\n\tis_micro_task_queued = false;\n\tif (flush_count > 1001) {\n\t\treturn;\n\t}\n\tconst previous_queued_root_effects = queued_root_effects;\n\tqueued_root_effects = [];\n\tflush_queued_root_effects(previous_queued_root_effects);\n\n\tif (!is_micro_task_queued) {\n\t\tflush_count = 0;\n\t\tlast_scheduled_effect = null;\n\t\tif (DEV) {\n\t\t\tdev_effect_stack = [];\n\t\t}\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @returns {void}\n */\nexport function schedule_effect(signal) {\n\tif (scheduler_mode === FLUSH_MICROTASK) {\n\t\tif (!is_micro_task_queued) {\n\t\t\tis_micro_task_queued = true;\n\t\t\tqueueMicrotask(process_deferred);\n\t\t}\n\t}\n\n\tlast_scheduled_effect = signal;\n\n\tvar effect = signal;\n\n\twhile (effect.parent !== null) {\n\t\teffect = effect.parent;\n\t\tvar flags = effect.f;\n\n\t\tif ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) {\n\t\t\tif ((flags & CLEAN) === 0) return;\n\t\t\teffect.f ^= CLEAN;\n\t\t}\n\t}\n\n\tqueued_root_effects.push(effect);\n}\n\n/**\n *\n * This function both runs render effects and collects user effects in topological order\n * from the starting effect passed in. Effects will be collected when they match the filtered\n * bitwise flag passed in only. The collected effects array will be populated with all the user\n * effects to be flushed.\n *\n * @param {Effect} effect\n * @param {Effect[]} collected_effects\n * @returns {void}\n */\nfunction process_effects(effect, collected_effects) {\n\tvar current_effect = effect.first;\n\tvar effects = [];\n\n\tmain_loop: while (current_effect !== null) {\n\t\tvar flags = current_effect.f;\n\t\tvar is_branch = (flags & BRANCH_EFFECT) !== 0;\n\t\tvar is_skippable_branch = is_branch && (flags & CLEAN) !== 0;\n\t\tvar sibling = current_effect.next;\n\n\t\tif (!is_skippable_branch && (flags & INERT) === 0) {\n\t\t\tif ((flags & RENDER_EFFECT) !== 0) {\n\t\t\t\tif (is_branch) {\n\t\t\t\t\tcurrent_effect.f ^= CLEAN;\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (check_dirtiness(current_effect)) {\n\t\t\t\t\t\t\tupdate_effect(current_effect);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\thandle_error(error, current_effect, null, current_effect.ctx);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar child = current_effect.first;\n\n\t\t\t\tif (child !== null) {\n\t\t\t\t\tcurrent_effect = child;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if ((flags & EFFECT) !== 0) {\n\t\t\t\teffects.push(current_effect);\n\t\t\t}\n\t\t}\n\n\t\tif (sibling === null) {\n\t\t\tlet parent = current_effect.parent;\n\n\t\t\twhile (parent !== null) {\n\t\t\t\tif (effect === parent) {\n\t\t\t\t\tbreak main_loop;\n\t\t\t\t}\n\t\t\t\tvar parent_sibling = parent.next;\n\t\t\t\tif (parent_sibling !== null) {\n\t\t\t\t\tcurrent_effect = parent_sibling;\n\t\t\t\t\tcontinue main_loop;\n\t\t\t\t}\n\t\t\t\tparent = parent.parent;\n\t\t\t}\n\t\t}\n\n\t\tcurrent_effect = sibling;\n\t}\n\n\t// We might be dealing with many effects here, far more than can be spread into\n\t// an array push call (callstack overflow). So let's deal with each effect in a loop.\n\tfor (var i = 0; i < effects.length; i++) {\n\t\tchild = effects[i];\n\t\tcollected_effects.push(child);\n\t\tprocess_effects(child, collected_effects);\n\t}\n}\n\n/**\n * Internal version of `flushSync` with the option to not flush previous effects.\n * Returns the result of the passed function, if given.\n * @param {() => any} [fn]\n * @returns {any}\n */\nexport function flush_sync(fn) {\n\tvar previous_scheduler_mode = scheduler_mode;\n\tvar previous_queued_root_effects = queued_root_effects;\n\n\ttry {\n\t\tinfinite_loop_guard();\n\n\t\t/** @type {Effect[]} */\n\t\tconst root_effects = [];\n\n\t\tscheduler_mode = FLUSH_SYNC;\n\t\tqueued_root_effects = root_effects;\n\t\tis_micro_task_queued = false;\n\n\t\tflush_queued_root_effects(previous_queued_root_effects);\n\n\t\tvar result = fn?.();\n\n\t\tflush_tasks();\n\t\tif (queued_root_effects.length > 0 || root_effects.length > 0) {\n\t\t\tflush_sync();\n\t\t}\n\n\t\tflush_count = 0;\n\t\tlast_scheduled_effect = null;\n\t\tif (DEV) {\n\t\t\tdev_effect_stack = [];\n\t\t}\n\n\t\treturn result;\n\t} finally {\n\t\tscheduler_mode = previous_scheduler_mode;\n\t\tqueued_root_effects = previous_queued_root_effects;\n\t}\n}\n\n/**\n * Returns a promise that resolves once any pending state changes have been applied.\n * @returns {Promise<void>}\n */\nexport async function tick() {\n\tawait Promise.resolve();\n\t// By calling flush_sync we guarantee that any pending state changes are applied after one tick.\n\t// TODO look into whether we can make flushing subsequent updates synchronously in the future.\n\tflush_sync();\n}\n\n/**\n * @template V\n * @param {Value<V>} signal\n * @returns {V}\n */\nexport function get(signal) {\n\tvar flags = signal.f;\n\tvar is_derived = (flags & DERIVED) !== 0;\n\n\t// If the derived is destroyed, just execute it again without retaining\n\t// its memoisation properties as the derived is stale\n\tif (is_derived && (flags & DESTROYED) !== 0) {\n\t\tvar value = execute_derived(/** @type {Derived} */ (signal));\n\t\t// Ensure the derived remains destroyed\n\t\tdestroy_derived(/** @type {Derived} */ (signal));\n\t\treturn value;\n\t}\n\n\tif (captured_signals !== null) {\n\t\tcaptured_signals.add(signal);\n\t}\n\n\t// Register the dependency on the current reaction signal.\n\tif (active_reaction !== null) {\n\t\tif (derived_sources !== null && derived_sources.includes(signal)) {\n\t\t\te.state_unsafe_local_read();\n\t\t}\n\t\tvar deps = active_reaction.deps;\n\n\t\t// If the signal is accessing the same dependencies in the same\n\t\t// order as it did last time, increment `skipped_deps`\n\t\t// rather than updating `new_deps`, which creates GC cost\n\t\tif (new_deps === null && deps !== null && deps[skipped_deps] === signal) {\n\t\t\tskipped_deps++;\n\t\t} else if (new_deps === null) {\n\t\t\tnew_deps = [signal];\n\t\t} else {\n\t\t\tnew_deps.push(signal);\n\t\t}\n\n\t\tif (\n\t\t\tuntracked_writes !== null &&\n\t\t\tactive_effect !== null &&\n\t\t\t(active_effect.f & CLEAN) !== 0 &&\n\t\t\t(active_effect.f & BRANCH_EFFECT) === 0 &&\n\t\t\tuntracked_writes.includes(signal)\n\t\t) {\n\t\t\tset_signal_status(active_effect, DIRTY);\n\t\t\tschedule_effect(active_effect);\n\t\t}\n\t} else if (is_derived && /** @type {Derived} */ (signal).deps === null) {\n\t\tvar derived = /** @type {Derived} */ (signal);\n\t\tvar parent = derived.parent;\n\t\tvar target = derived;\n\n\t\twhile (parent !== null) {\n\t\t\t// Attach the derived to the nearest parent effect, if there are deriveds\n\t\t\t// in between then we also need to attach them too\n\t\t\tif ((parent.f & DERIVED) !== 0) {\n\t\t\t\tvar parent_derived = /** @type {Derived} */ (parent);\n\n\t\t\t\ttarget = parent_derived;\n\t\t\t\tparent = parent_derived.parent;\n\t\t\t} else {\n\t\t\t\tvar parent_effect = /** @type {Effect} */ (parent);\n\n\t\t\t\tif (!parent_effect.deriveds?.includes(target)) {\n\t\t\t\t\t(parent_effect.deriveds ??= []).push(target);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (is_derived) {\n\t\tderived = /** @type {Derived} */ (signal);\n\n\t\tif (check_dirtiness(derived)) {\n\t\t\tupdate_derived(derived);\n\t\t}\n\t}\n\n\tif (\n\t\tDEV &&\n\t\ttracing_expressions !== null &&\n\t\tactive_reaction !== null &&\n\t\ttracing_expressions.reaction === active_reaction\n\t) {\n\t\t// Used when mapping state between special blocks like `each`\n\t\tif (signal.debug) {\n\t\t\tsignal.debug();\n\t\t} else if (signal.created) {\n\t\t\tvar entry = tracing_expressions.entries.get(signal);\n\n\t\t\tif (entry === undefined) {\n\t\t\t\tentry = { read: [] };\n\t\t\t\ttracing_expressions.entries.set(signal, entry);\n\t\t\t}\n\n\t\t\tentry.read.push(get_stack('TracedAt'));\n\t\t}\n\t}\n\n\treturn signal.v;\n}\n\n/**\n * Like `get`, but checks for `undefined`. Used for `var` declarations because they can be accessed before being declared\n * @template V\n * @param {Value<V> | undefined} signal\n * @returns {V | undefined}\n */\nexport function safe_get(signal) {\n\treturn signal && get(signal);\n}\n\n/**\n * Capture an array of all the signals that are read when `fn` is called\n * @template T\n * @param {() => T} fn\n */\nexport function capture_signals(fn) {\n\tvar previous_captured_signals = captured_signals;\n\tcaptured_signals = new Set();\n\n\tvar captured = captured_signals;\n\tvar signal;\n\n\ttry {\n\t\tuntrack(fn);\n\t\tif (previous_captured_signals !== null) {\n\t\t\tfor (signal of captured_signals) {\n\t\t\t\tprevious_captured_signals.add(signal);\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tcaptured_signals = previous_captured_signals;\n\t}\n\n\treturn captured;\n}\n\n/**\n * Invokes a function and captures all signals that are read during the invocation,\n * then invalidates them.\n * @param {() => any} fn\n */\nexport function invalidate_inner_signals(fn) {\n\tvar captured = capture_signals(() => untrack(fn));\n\n\tfor (var signal of captured) {\n\t\t// Go one level up because derived signals created as part of props in legacy mode\n\t\tif ((signal.f & LEGACY_DERIVED_PROP) !== 0) {\n\t\t\tfor (const dep of /** @type {Derived} */ (signal).deps || []) {\n\t\t\t\tif ((dep.f & DERIVED) === 0) {\n\t\t\t\t\t// Use internal_set instead of set here and below to avoid mutation validation\n\t\t\t\t\tinternal_set(dep, dep.v);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tinternal_set(signal, signal.v);\n\t\t}\n\t}\n}\n\n/**\n * When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect),\n * any state read inside `fn` will not be treated as a dependency.\n *\n * ```ts\n * $effect(() => {\n * // this will run when `data` changes, but not when `time` changes\n * save(data, {\n * timestamp: untrack(() => time)\n * });\n * });\n * ```\n * @template T\n * @param {() => T} fn\n * @returns {T}\n */\nexport function untrack(fn) {\n\tconst previous_reaction = active_reaction;\n\ttry {\n\t\tactive_reaction = null;\n\t\treturn fn();\n\t} finally {\n\t\tactive_reaction = previous_reaction;\n\t}\n}\n\nconst STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);\n\n/**\n * @param {Signal} signal\n * @param {number} status\n * @returns {void}\n */\nexport function set_signal_status(signal, status) {\n\tsignal.f = (signal.f & STATUS_MASK) | status;\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\tconst context_map = get_or_init_context_map('getContext');\n\tconst result = /** @type {T} */ (context_map.get(key));\n\n\tif (DEV) {\n\t\tconst fn = /** @type {ComponentContext} */ (component_context).function;\n\t\tif (fn) {\n\t\t\tadd_owner(result, fn, true);\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tconst context_map = get_or_init_context_map('setContext');\n\tcontext_map.set(key, context);\n\treturn context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\tconst context_map = get_or_init_context_map('hasContext');\n\treturn context_map.has(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\tconst context_map = get_or_init_context_map('getAllContexts');\n\n\tif (DEV) {\n\t\tconst fn = component_context?.function;\n\t\tif (fn) {\n\t\t\tfor (const value of context_map.values()) {\n\t\t\t\tadd_owner(value, fn, true);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn /** @type {T} */ (context_map);\n}\n\n/**\n * @param {string} name\n * @returns {Map<unknown, unknown>}\n */\nfunction get_or_init_context_map(name) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component(name);\n\t}\n\n\treturn (component_context.c ??= new Map(get_parent_context(component_context) || undefined));\n}\n\n/**\n * @param {ComponentContext} component_context\n * @returns {Map<unknown, unknown> | null}\n */\nfunction get_parent_context(component_context) {\n\tlet parent = component_context.p;\n\twhile (parent !== null) {\n\t\tconst context_map = parent.c;\n\t\tif (context_map !== null) {\n\t\t\treturn context_map;\n\t\t}\n\t\tparent = parent.p;\n\t}\n\treturn null;\n}\n\n/**\n * @template {number | bigint} T\n * @param {Value<T>} signal\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update(signal, d = 1) {\n\tvar value = get(signal);\n\tvar result = d === 1 ? value++ : value--;\n\n\tset(signal, value);\n\n\t// @ts-expect-error\n\treturn result;\n}\n\n/**\n * @template {number | bigint} T\n * @param {Value<T>} signal\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update_pre(signal, d = 1) {\n\tvar value = get(signal);\n\n\t// @ts-expect-error\n\treturn set(signal, d === 1 ? ++value : --value);\n}\n\n/**\n * @param {Record<string, unknown>} obj\n * @param {string[]} keys\n * @returns {Record<string, unknown>}\n */\nexport function exclude_from_object(obj, keys) {\n\t/** @type {Record<string, unknown>} */\n\tvar result = {};\n\n\tfor (var key in obj) {\n\t\tif (!keys.includes(key)) {\n\t\t\tresult[key] = obj[key];\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * @param {Record<string, unknown>} props\n * @param {any} runes\n * @param {Function} [fn]\n * @returns {void}\n */\nexport function push(props, runes = false, fn) {\n\tcomponent_context = {\n\t\tp: component_context,\n\t\tc: null,\n\t\te: null,\n\t\tm: false,\n\t\ts: props,\n\t\tx: null,\n\t\tl: null\n\t};\n\n\tif (legacy_mode_flag && !runes) {\n\t\tcomponent_context.l = {\n\t\t\ts: null,\n\t\t\tu: null,\n\t\t\tr1: [],\n\t\t\tr2: source(false)\n\t\t};\n\t}\n\n\tif (DEV) {\n\t\t// component function\n\t\tcomponent_context.function = fn;\n\t\tdev_current_component_function = fn;\n\t}\n}\n\n/**\n * @template {Record<string, any>} T\n * @param {T} [component]\n * @returns {T}\n */\nexport function pop(component) {\n\tconst context_stack_item = component_context;\n\tif (context_stack_item !== null) {\n\t\tif (component !== undefined) {\n\t\t\tcontext_stack_item.x = component;\n\t\t}\n\t\tconst component_effects = context_stack_item.e;\n\t\tif (component_effects !== null) {\n\t\t\tvar previous_effect = active_effect;\n\t\t\tvar previous_reaction = active_reaction;\n\t\t\tcontext_stack_item.e = null;\n\t\t\ttry {\n\t\t\t\tfor (var i = 0; i < component_effects.length; i++) {\n\t\t\t\t\tvar component_effect = component_effects[i];\n\t\t\t\t\tset_active_effect(component_effect.effect);\n\t\t\t\t\tset_active_reaction(component_effect.reaction);\n\t\t\t\t\teffect(component_effect.fn);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tset_active_effect(previous_effect);\n\t\t\t\tset_active_reaction(previous_reaction);\n\t\t\t}\n\t\t}\n\t\tcomponent_context = context_stack_item.p;\n\t\tif (DEV) {\n\t\t\tdev_current_component_function = context_stack_item.p?.function ?? null;\n\t\t}\n\t\tcontext_stack_item.m = true;\n\t}\n\t// Micro-optimization: Don't set .a above to the empty object\n\t// so it can be garbage-collected when the return here is unused\n\treturn component || /** @type {T} */ ({});\n}\n\n/**\n * Possibly traverse an object and read all its properties so that they're all reactive in case this is `$state`.\n * Does only check first level of an object for performance reasons (heuristic should be good for 99% of all cases).\n * @param {any} value\n * @returns {void}\n */\nexport function deep_read_state(value) {\n\tif (typeof value !== 'object' || !value || value instanceof EventTarget) {\n\t\treturn;\n\t}\n\n\tif (STATE_SYMBOL in value) {\n\t\tdeep_read(value);\n\t} else if (!Array.isArray(value)) {\n\t\tfor (let key in value) {\n\t\t\tconst prop = value[key];\n\t\t\tif (typeof prop === 'object' && prop && STATE_SYMBOL in prop) {\n\t\t\t\tdeep_read(prop);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Deeply traverse an object and read all its properties\n * so that they're all reactive in case this is `$state`\n * @param {any} value\n * @param {Set<any>} visited\n * @returns {void}\n */\nexport function deep_read(value, visited = new Set()) {\n\tif (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t// We don't want to traverse DOM elements\n\t\t!(value instanceof EventTarget) &&\n\t\t!visited.has(value)\n\t) {\n\t\tvisited.add(value);\n\t\t// When working with a possible SvelteDate, this\n\t\t// will ensure we capture changes to it.\n\t\tif (value instanceof Date) {\n\t\t\tvalue.getTime();\n\t\t}\n\t\tfor (let key in value) {\n\t\t\ttry {\n\t\t\t\tdeep_read(value[key], visited);\n\t\t\t} catch (e) {\n\t\t\t\t// continue\n\t\t\t}\n\t\t}\n\t\tconst proto = get_prototype_of(value);\n\t\tif (\n\t\t\tproto !== Object.prototype &&\n\t\t\tproto !== Array.prototype &&\n\t\t\tproto !== Map.prototype &&\n\t\t\tproto !== Set.prototype &&\n\t\t\tproto !== Date.prototype\n\t\t) {\n\t\t\tconst descriptors = get_descriptors(proto);\n\t\t\tfor (let key in descriptors) {\n\t\t\t\tconst get = descriptors[key].get;\n\t\t\t\tif (get) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tget.call(value);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t// continue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nif (DEV) {\n\t/**\n\t * @param {string} rune\n\t */\n\tfunction throw_rune_error(rune) {\n\t\tif (!(rune in globalThis)) {\n\t\t\t// TODO if people start adjusting the \"this can contain runes\" config through v-p-s more, adjust this message\n\t\t\t/** @type {any} */\n\t\t\tlet value; // let's hope noone modifies this global, but belts and braces\n\t\t\tObject.defineProperty(globalThis, rune, {\n\t\t\t\tconfigurable: true,\n\t\t\t\t// eslint-disable-next-line getter-return\n\t\t\t\tget: () => {\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\te.rune_outside_svelte(rune);\n\t\t\t\t},\n\t\t\t\tset: (v) => {\n\t\t\t\t\tvalue = v;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tthrow_rune_error('$state');\n\tthrow_rune_error('$effect');\n\tthrow_rune_error('$derived');\n\tthrow_rune_error('$inspect');\n\tthrow_rune_error('$props');\n\tthrow_rune_error('$bindable');\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\nvar bold = 'font-weight: bold';\nvar normal = 'font-weight: normal';\n\n/**\n * Assignment to `%property%` property (%location%) will evaluate to the right-hand side, not the value of `%property%` following the assignment. This may result in unexpected behaviour.\n * @param {string} property\n * @param {string} location\n */\nexport function assignment_value_stale(property, location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] assignment_value_stale\\n%cAssignment to \\`${property}\\` property (${location}) will evaluate to the right-hand side, not the value of \\`${property}\\` following the assignment. This may result in unexpected behaviour.\\nhttps://svelte.dev/e/assignment_value_stale`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/assignment_value_stale`);\n\t}\n}\n\n/**\n * `%binding%` (%location%) is binding to a non-reactive property\n * @param {string} binding\n * @param {string | undefined | null} [location]\n */\nexport function binding_property_non_reactive(binding, location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] binding_property_non_reactive\\n%c${location ? `\\`${binding}\\` (${location}) is binding to a non-reactive property` : `\\`${binding}\\` is binding to a non-reactive property`}\\nhttps://svelte.dev/e/binding_property_non_reactive`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/binding_property_non_reactive`);\n\t}\n}\n\n/**\n * Your `console.%method%` contained `$state` proxies. Consider using `$inspect(...)` or `$state.snapshot(...)` instead\n * @param {string} method\n */\nexport function console_log_state(method) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] console_log_state\\n%cYour \\`console.${method}\\` contained \\`$state\\` proxies. Consider using \\`$inspect(...)\\` or \\`$state.snapshot(...)\\` instead\\nhttps://svelte.dev/e/console_log_state`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/console_log_state`);\n\t}\n}\n\n/**\n * %handler% should be a function. Did you mean to %suggestion%?\n * @param {string} handler\n * @param {string} suggestion\n */\nexport function event_handler_invalid(handler, suggestion) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] event_handler_invalid\\n%c${handler} should be a function. Did you mean to ${suggestion}?\\nhttps://svelte.dev/e/event_handler_invalid`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/event_handler_invalid`);\n\t}\n}\n\n/**\n * The `%attribute%` attribute on `%html%` changed its value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value\n * @param {string} attribute\n * @param {string} html\n * @param {string} value\n */\nexport function hydration_attribute_changed(attribute, html, value) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] hydration_attribute_changed\\n%cThe \\`${attribute}\\` attribute on \\`${html}\\` changed its value between server and client renders. The client value, \\`${value}\\`, will be ignored in favour of the server value\\nhttps://svelte.dev/e/hydration_attribute_changed`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_attribute_changed`);\n\t}\n}\n\n/**\n * The value of an `{@html ...}` block %location% changed between server and client renders. The client value will be ignored in favour of the server value\n * @param {string | undefined | null} [location]\n */\nexport function hydration_html_changed(location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] hydration_html_changed\\n%c${location ? `The value of an \\`{@html ...}\\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : \"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value\"}\\nhttps://svelte.dev/e/hydration_html_changed`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_html_changed`);\n\t}\n}\n\n/**\n * Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%\n * @param {string | undefined | null} [location]\n */\nexport function hydration_mismatch(location) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] hydration_mismatch\\n%c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : \"Hydration failed because the initial UI does not match what was rendered on the server\"}\\nhttps://svelte.dev/e/hydration_mismatch`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/hydration_mismatch`);\n\t}\n}\n\n/**\n * The `render` function passed to `createRawSnippet` should return HTML for a single element\n */\nexport function invalid_raw_snippet_render() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] invalid_raw_snippet_render\\n%cThe \\`render\\` function passed to \\`createRawSnippet\\` should return HTML for a single element\\nhttps://svelte.dev/e/invalid_raw_snippet_render`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/invalid_raw_snippet_render`);\n\t}\n}\n\n/**\n * Detected a migrated `$:` reactive block in `%filename%` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an `$effect`.\n * @param {string} filename\n */\nexport function legacy_recursive_reactive_block(filename) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] legacy_recursive_reactive_block\\n%cDetected a migrated \\`$:\\` reactive block in \\`${filename}\\` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \\`$effect\\`.\\nhttps://svelte.dev/e/legacy_recursive_reactive_block`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/legacy_recursive_reactive_block`);\n\t}\n}\n\n/**\n * Tried to unmount a component that was not mounted\n */\nexport function lifecycle_double_unmount() {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] lifecycle_double_unmount\\n%cTried to unmount a component that was not mounted\\nhttps://svelte.dev/e/lifecycle_double_unmount`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/lifecycle_double_unmount`);\n\t}\n}\n\n/**\n * %parent% passed a value to %child% with `bind:`, but the value is owned by %owner%. Consider creating a binding between %owner% and %parent%\n * @param {string} parent\n * @param {string} child\n * @param {string} owner\n */\nexport function ownership_invalid_binding(parent, child, owner) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] ownership_invalid_binding\\n%c${parent} passed a value to ${child} with \\`bind:\\`, but the value is owned by ${owner}. Consider creating a binding between ${owner} and ${parent}\\nhttps://svelte.dev/e/ownership_invalid_binding`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/ownership_invalid_binding`);\n\t}\n}\n\n/**\n * %component% mutated a value owned by %owner%. This is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead\n * @param {string | undefined | null} [component]\n * @param {string | undefined | null} [owner]\n */\nexport function ownership_invalid_mutation(component, owner) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] ownership_invalid_mutation\\n%c${component ? `${component} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \\`bind:\\`, or use a callback instead` : \"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead\"}\\nhttps://svelte.dev/e/ownership_invalid_mutation`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/ownership_invalid_mutation`);\n\t}\n}\n\n/**\n * Reactive `$state(...)` proxies and the values they proxy have different identities. Because of this, comparisons with `%operator%` will produce unexpected results\n * @param {string} operator\n */\nexport function state_proxy_equality_mismatch(operator) {\n\tif (DEV) {\n\t\tconsole.warn(`%c[svelte] state_proxy_equality_mismatch\\n%cReactive \\`$state(...)\\` proxies and the values they proxy have different identities. Because of this, comparisons with \\`${operator}\\` will produce unexpected results\\nhttps://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`);\n\t}\n}","/** @import { TemplateNode } from '#client' */\n\nimport {\n\tHYDRATION_END,\n\tHYDRATION_ERROR,\n\tHYDRATION_START,\n\tHYDRATION_START_ELSE\n} from '../../../constants.js';\nimport * as w from '../warnings.js';\nimport { get_next_sibling } from './operations.js';\n\n/**\n * Use this variable to guard everything related to hydration code so it can be treeshaken out\n * if the user doesn't use the `hydrate` method and these code paths are therefore not needed.\n */\nexport let hydrating = false;\n\n/** @param {boolean} value */\nexport function set_hydrating(value) {\n\thydrating = value;\n}\n\n/**\n * The node that is currently being hydrated. This starts out as the first node inside the opening\n * <!--[--> comment, and updates each time a component calls `$.child(...)` or `$.sibling(...)`.\n * When entering a block (e.g. `{#if ...}`), `hydrate_node` is the block opening comment; by the\n * time we leave the block it is the closing comment, which serves as the block's anchor.\n * @type {TemplateNode}\n */\nexport let hydrate_node;\n\n/** @param {TemplateNode} node */\nexport function set_hydrate_node(node) {\n\tif (node === null) {\n\t\tw.hydration_mismatch();\n\t\tthrow HYDRATION_ERROR;\n\t}\n\n\treturn (hydrate_node = node);\n}\n\nexport function hydrate_next() {\n\treturn set_hydrate_node(/** @type {TemplateNode} */ (get_next_sibling(hydrate_node)));\n}\n\n/** @param {TemplateNode} node */\nexport function reset(node) {\n\tif (!hydrating) return;\n\n\t// If the node has remaining siblings, something has gone wrong\n\tif (get_next_sibling(hydrate_node) !== null) {\n\t\tw.hydration_mismatch();\n\t\tthrow HYDRATION_ERROR;\n\t}\n\n\thydrate_node = node;\n}\n\n/**\n * @param {HTMLTemplateElement} template\n */\nexport function hydrate_template(template) {\n\tif (hydrating) {\n\t\t// @ts-expect-error TemplateNode doesn't include DocumentFragment, but it's actually fine\n\t\thydrate_node = template.content;\n\t}\n}\n\nexport function next(count = 1) {\n\tif (hydrating) {\n\t\tvar i = count;\n\t\tvar node = hydrate_node;\n\n\t\twhile (i--) {\n\t\t\tnode = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\t}\n\n\t\thydrate_node = node;\n\t}\n}\n\n/**\n * Removes all nodes starting at `hydrate_node` up until the next hydration end comment\n */\nexport function remove_nodes() {\n\tvar depth = 0;\n\tvar node = hydrate_node;\n\n\twhile (true) {\n\t\tif (node.nodeType === 8) {\n\t\t\tvar data = /** @type {Comment} */ (node).data;\n\n\t\t\tif (data === HYDRATION_END) {\n\t\t\t\tif (depth === 0) return node;\n\t\t\t\tdepth -= 1;\n\t\t\t} else if (data === HYDRATION_START || data === HYDRATION_START_ELSE) {\n\t\t\t\tdepth += 1;\n\t\t\t}\n\t\t}\n\n\t\tvar next = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tnode.remove();\n\t\tnode = next;\n\t}\n}\n","/** @import { ProxyMetadata } from '#client' */\n/** @typedef {{ file: string, line: number, column: number }} Location */\n\nimport { STATE_SYMBOL_METADATA } from '../constants.js';\nimport { render_effect, user_pre_effect } from '../reactivity/effects.js';\nimport { dev_current_component_function } from '../runtime.js';\nimport { get_prototype_of } from '../../shared/utils.js';\nimport * as w from '../warnings.js';\nimport { FILENAME } from '../../../constants.js';\n\n/** @type {Record<string, Array<{ start: Location, end: Location, component: Function }>>} */\nconst boundaries = {};\n\nconst chrome_pattern = /at (?:.+ \\()?(.+):(\\d+):(\\d+)\\)?$/;\nconst firefox_pattern = /@(.+):(\\d+):(\\d+)$/;\n\nfunction get_stack() {\n\tconst stack = new Error().stack;\n\tif (!stack) return null;\n\n\tconst entries = [];\n\n\tfor (const line of stack.split('\\n')) {\n\t\tlet match = chrome_pattern.exec(line) ?? firefox_pattern.exec(line);\n\n\t\tif (match) {\n\t\t\tentries.push({\n\t\t\t\tfile: match[1],\n\t\t\t\tline: +match[2],\n\t\t\t\tcolumn: +match[3]\n\t\t\t});\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Determines which `.svelte` component is responsible for a given state change\n * @returns {Function | null}\n */\nexport function get_component() {\n\t// first 4 lines are svelte internals; adjust this number if we change the internal call stack\n\tconst stack = get_stack()?.slice(4);\n\tif (!stack) return null;\n\n\tfor (let i = 0; i < stack.length; i++) {\n\t\tconst entry = stack[i];\n\t\tconst modules = boundaries[entry.file];\n\t\tif (!modules) {\n\t\t\t// If the first entry is not a component, that means the modification very likely happened\n\t\t\t// within a .svelte.js file, possibly triggered by a component. Since these files are not part\n\t\t\t// of the bondaries/component context heuristic, we need to bail in this case, else we would\n\t\t\t// have false positives when the .svelte.ts file provides a state creator function, encapsulating\n\t\t\t// the state and its mutations, and is being called from a component other than the one who\n\t\t\t// called the state creator function.\n\t\t\tif (i === 0) return null;\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const module of modules) {\n\t\t\tif (module.end == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (module.start.line < entry.line && module.end.line > entry.line) {\n\t\t\t\treturn module.component;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nexport const ADD_OWNER = Symbol('ADD_OWNER');\n\n/**\n * Together with `mark_module_end`, this function establishes the boundaries of a `.svelte` file,\n * such that subsequent calls to `get_component` can tell us which component is responsible\n * for a given state change\n */\nexport function mark_module_start() {\n\tconst start = get_stack()?.[2];\n\n\tif (start) {\n\t\t(boundaries[start.file] ??= []).push({\n\t\t\tstart,\n\t\t\t// @ts-expect-error\n\t\t\tend: null,\n\t\t\t// @ts-expect-error we add the component at the end, since HMR will overwrite the function\n\t\t\tcomponent: null\n\t\t});\n\t}\n}\n\n/**\n * @param {Function} component\n */\nexport function mark_module_end(component) {\n\tconst end = get_stack()?.[2];\n\n\tif (end) {\n\t\tconst boundaries_file = boundaries[end.file];\n\t\tconst boundary = boundaries_file[boundaries_file.length - 1];\n\n\t\tboundary.end = end;\n\t\tboundary.component = component;\n\t}\n}\n\n/**\n * @param {any} object\n * @param {any} owner\n * @param {boolean} [global]\n * @param {boolean} [skip_warning]\n */\nexport function add_owner(object, owner, global = false, skip_warning = false) {\n\tif (object && !global) {\n\t\tconst component = dev_current_component_function;\n\t\tconst metadata = object[STATE_SYMBOL_METADATA];\n\t\tif (metadata && !has_owner(metadata, component)) {\n\t\t\tlet original = get_owner(metadata);\n\n\t\t\tif (owner[FILENAME] !== component[FILENAME] && !skip_warning) {\n\t\t\t\tw.ownership_invalid_binding(component[FILENAME], owner[FILENAME], original[FILENAME]);\n\t\t\t}\n\t\t}\n\t}\n\n\tadd_owner_to_object(object, owner, new Set());\n}\n\n/**\n * @param {() => unknown} get_object\n * @param {any} Component\n * @param {boolean} [skip_warning]\n */\nexport function add_owner_effect(get_object, Component, skip_warning = false) {\n\tuser_pre_effect(() => {\n\t\tadd_owner(get_object(), Component, false, skip_warning);\n\t});\n}\n\n/**\n * @param {ProxyMetadata | null} from\n * @param {ProxyMetadata} to\n */\nexport function widen_ownership(from, to) {\n\tif (to.owners === null) {\n\t\treturn;\n\t}\n\n\twhile (from) {\n\t\tif (from.owners === null) {\n\t\t\tto.owners = null;\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (const owner of from.owners) {\n\t\t\tto.owners.add(owner);\n\t\t}\n\n\t\tfrom = from.parent;\n\t}\n}\n\n/**\n * @param {any} object\n * @param {Function} owner\n * @param {Set<any>} seen\n */\nfunction add_owner_to_object(object, owner, seen) {\n\tconst metadata = /** @type {ProxyMetadata} */ (object?.[STATE_SYMBOL_METADATA]);\n\n\tif (metadata) {\n\t\t// this is a state proxy, add owner directly, if not globally shared\n\t\tif ('owners' in metadata && metadata.owners != null) {\n\t\t\tmetadata.owners.add(owner);\n\t\t}\n\t} else if (object && typeof object === 'object') {\n\t\tif (seen.has(object)) return;\n\t\tseen.add(object);\n\t\tif (ADD_OWNER in object && object[ADD_OWNER]) {\n\t\t\t// this is a class with state fields. we put this in a render effect\n\t\t\t// so that if state is replaced (e.g. `instance.name = { first, last }`)\n\t\t\t// the new state is also co-owned by the caller of `getContext`\n\t\t\trender_effect(() => {\n\t\t\t\tobject[ADD_OWNER](owner);\n\t\t\t});\n\t\t} else {\n\t\t\tvar proto = get_prototype_of(object);\n\n\t\t\tif (proto === Object.prototype) {\n\t\t\t\t// recurse until we find a state proxy\n\t\t\t\tfor (const key in object) {\n\t\t\t\t\tadd_owner_to_object(object[key], owner, seen);\n\t\t\t\t}\n\t\t\t} else if (proto === Array.prototype) {\n\t\t\t\t// recurse until we find a state proxy\n\t\t\t\tfor (let i = 0; i < object.length; i += 1) {\n\t\t\t\t\tadd_owner_to_object(object[i], owner, seen);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {ProxyMetadata} metadata\n * @param {Function} component\n * @returns {boolean}\n */\nfunction has_owner(metadata, component) {\n\tif (metadata.owners === null) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\tmetadata.owners.has(component) ||\n\t\t(metadata.parent !== null && has_owner(metadata.parent, component))\n\t);\n}\n\n/**\n * @param {ProxyMetadata} metadata\n * @returns {any}\n */\nfunction get_owner(metadata) {\n\treturn (\n\t\tmetadata?.owners?.values().next().value ??\n\t\tget_owner(/** @type {ProxyMetadata} */ (metadata.parent))\n\t);\n}\n\nlet skip = false;\n\n/**\n * @param {() => any} fn\n */\nexport function skip_ownership_validation(fn) {\n\tskip = true;\n\tfn();\n\tskip = false;\n}\n\n/**\n * @param {ProxyMetadata} metadata\n */\nexport function check_ownership(metadata) {\n\tif (skip) return;\n\n\tconst component = get_component();\n\n\tif (component && !has_owner(metadata, component)) {\n\t\tlet original = get_owner(metadata);\n\n\t\t// @ts-expect-error\n\t\tif (original[FILENAME] !== component[FILENAME]) {\n\t\t\t// @ts-expect-error\n\t\t\tw.ownership_invalid_mutation(component[FILENAME], original[FILENAME]);\n\t\t} else {\n\t\t\tw.ownership_invalid_mutation();\n\t\t}\n\t}\n}\n","/** @import { ProxyMetadata, ProxyStateObject, Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { get, component_context, active_effect } from './runtime.js';\nimport {\n\tarray_prototype,\n\tget_descriptor,\n\tget_prototype_of,\n\tis_array,\n\tobject_prototype\n} from '../shared/utils.js';\nimport { check_ownership, widen_ownership } from './dev/ownership.js';\nimport { source, set } from './reactivity/sources.js';\nimport { STATE_SYMBOL, STATE_SYMBOL_METADATA } from './constants.js';\nimport { UNINITIALIZED } from '../../constants.js';\nimport * as e from './errors.js';\nimport { get_stack } from './dev/tracing.js';\n\n/**\n * @template T\n * @param {T} value\n * @param {ProxyMetadata | null} [parent]\n * @param {Source<T>} [prev] dev mode only\n * @returns {T}\n */\nexport function proxy(value, parent = null, prev) {\n\t/** @type {Error | null} */\n\tvar stack = null;\n\tif (DEV) {\n\t\tstack = get_stack('CreatedAt');\n\t}\n\t// if non-proxyable, or is already a proxy, return `value`\n\tif (typeof value !== 'object' || value === null || STATE_SYMBOL in value) {\n\t\treturn value;\n\t}\n\n\tconst prototype = get_prototype_of(value);\n\n\tif (prototype !== object_prototype && prototype !== array_prototype) {\n\t\treturn value;\n\t}\n\n\t/** @type {Map<any, Source<any>>} */\n\tvar sources = new Map();\n\tvar is_proxied_array = is_array(value);\n\tvar version = source(0);\n\n\tif (is_proxied_array) {\n\t\t// We need to create the length source eagerly to ensure that\n\t\t// mutations to the array are properly synced with our proxy\n\t\tsources.set('length', source(/** @type {any[]} */ (value).length, stack));\n\t}\n\n\t/** @type {ProxyMetadata} */\n\tvar metadata;\n\n\tif (DEV) {\n\t\tmetadata = {\n\t\t\tparent,\n\t\t\towners: null\n\t\t};\n\n\t\tif (prev) {\n\t\t\t// Reuse owners from previous state; necessary because reassignment is not guaranteed to have correct component context.\n\t\t\t// If no previous proxy exists we play it safe and assume ownerless state\n\t\t\t// @ts-expect-error\n\t\t\tconst prev_owners = prev.v?.[STATE_SYMBOL_METADATA]?.owners;\n\t\t\tmetadata.owners = prev_owners ? new Set(prev_owners) : null;\n\t\t} else {\n\t\t\tmetadata.owners =\n\t\t\t\tparent === null\n\t\t\t\t\t? component_context !== null\n\t\t\t\t\t\t? new Set([component_context.function])\n\t\t\t\t\t\t: null\n\t\t\t\t\t: new Set();\n\t\t}\n\t}\n\n\treturn new Proxy(/** @type {any} */ (value), {\n\t\tdefineProperty(_, prop, descriptor) {\n\t\t\tif (\n\t\t\t\t!('value' in descriptor) ||\n\t\t\t\tdescriptor.configurable === false ||\n\t\t\t\tdescriptor.enumerable === false ||\n\t\t\t\tdescriptor.writable === false\n\t\t\t) {\n\t\t\t\t// we disallow non-basic descriptors, because unless they are applied to the\n\t\t\t\t// target object — which we avoid, so that state can be forked — we will run\n\t\t\t\t// afoul of the various invariants\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getOwnPropertyDescriptor#invariants\n\t\t\t\te.state_descriptors_fixed();\n\t\t\t}\n\n\t\t\tvar s = sources.get(prop);\n\n\t\t\tif (s === undefined) {\n\t\t\t\ts = source(descriptor.value, stack);\n\t\t\t\tsources.set(prop, s);\n\t\t\t} else {\n\t\t\t\tset(s, proxy(descriptor.value, metadata));\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tdeleteProperty(target, prop) {\n\t\t\tvar s = sources.get(prop);\n\n\t\t\tif (s === undefined) {\n\t\t\t\tif (prop in target) {\n\t\t\t\t\tsources.set(prop, source(UNINITIALIZED, stack));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// When working with arrays, we need to also ensure we update the length when removing\n\t\t\t\t// an indexed property\n\t\t\t\tif (is_proxied_array && typeof prop === 'string') {\n\t\t\t\t\tvar ls = /** @type {Source<number>} */ (sources.get('length'));\n\t\t\t\t\tvar n = Number(prop);\n\n\t\t\t\t\tif (Number.isInteger(n) && n < ls.v) {\n\t\t\t\t\t\tset(ls, n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tset(s, UNINITIALIZED);\n\t\t\t\tupdate_version(version);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\tget(target, prop, receiver) {\n\t\t\tif (DEV && prop === STATE_SYMBOL_METADATA) {\n\t\t\t\treturn metadata;\n\t\t\t}\n\n\t\t\tif (prop === STATE_SYMBOL) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar exists = prop in target;\n\n\t\t\t// create a source, but only if it's an own property and not a prototype property\n\t\t\tif (s === undefined && (!exists || get_descriptor(target, prop)?.writable)) {\n\t\t\t\ts = source(proxy(exists ? target[prop] : UNINITIALIZED, metadata), stack);\n\t\t\t\tsources.set(prop, s);\n\t\t\t}\n\n\t\t\tif (s !== undefined) {\n\t\t\t\tvar v = get(s);\n\n\t\t\t\t// In case of something like `foo = bar.map(...)`, foo would have ownership\n\t\t\t\t// of the array itself, while the individual items would have ownership\n\t\t\t\t// of the component that created bar. That means if we later do `foo[0].baz = 42`,\n\t\t\t\t// we could get a false-positive ownership violation, since the two proxies\n\t\t\t\t// are not connected to each other via the parent metadata relationship.\n\t\t\t\t// For this reason, we need to widen the ownership of the children\n\t\t\t\t// upon access when we detect they are not connected.\n\t\t\t\tif (DEV) {\n\t\t\t\t\t/** @type {ProxyMetadata | undefined} */\n\t\t\t\t\tvar prop_metadata = v?.[STATE_SYMBOL_METADATA];\n\t\t\t\t\tif (prop_metadata && prop_metadata?.parent !== metadata) {\n\t\t\t\t\t\twiden_ownership(metadata, prop_metadata);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn v === UNINITIALIZED ? undefined : v;\n\t\t\t}\n\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t},\n\n\t\tgetOwnPropertyDescriptor(target, prop) {\n\t\t\tvar descriptor = Reflect.getOwnPropertyDescriptor(target, prop);\n\n\t\t\tif (descriptor && 'value' in descriptor) {\n\t\t\t\tvar s = sources.get(prop);\n\t\t\t\tif (s) descriptor.value = get(s);\n\t\t\t} else if (descriptor === undefined) {\n\t\t\t\tvar source = sources.get(prop);\n\t\t\t\tvar value = source?.v;\n\n\t\t\t\tif (source !== undefined && value !== UNINITIALIZED) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\twritable: true\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn descriptor;\n\t\t},\n\n\t\thas(target, prop) {\n\t\t\tif (DEV && prop === STATE_SYMBOL_METADATA) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (prop === STATE_SYMBOL) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar has = (s !== undefined && s.v !== UNINITIALIZED) || Reflect.has(target, prop);\n\n\t\t\tif (\n\t\t\t\ts !== undefined ||\n\t\t\t\t(active_effect !== null && (!has || get_descriptor(target, prop)?.writable))\n\t\t\t) {\n\t\t\t\tif (s === undefined) {\n\t\t\t\t\ts = source(has ? proxy(target[prop], metadata) : UNINITIALIZED, stack);\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t}\n\n\t\t\t\tvar value = get(s);\n\t\t\t\tif (value === UNINITIALIZED) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn has;\n\t\t},\n\n\t\tset(target, prop, value, receiver) {\n\t\t\tvar s = sources.get(prop);\n\t\t\tvar has = prop in target;\n\n\t\t\t// variable.length = value -> clear all signals with index >= value\n\t\t\tif (is_proxied_array && prop === 'length') {\n\t\t\t\tfor (var i = value; i < /** @type {Source<number>} */ (s).v; i += 1) {\n\t\t\t\t\tvar other_s = sources.get(i + '');\n\t\t\t\t\tif (other_s !== undefined) {\n\t\t\t\t\t\tset(other_s, UNINITIALIZED);\n\t\t\t\t\t} else if (i in target) {\n\t\t\t\t\t\t// If the item exists in the original, we need to create a uninitialized source,\n\t\t\t\t\t\t// else a later read of the property would result in a source being created with\n\t\t\t\t\t\t// the value of the original item at that index.\n\t\t\t\t\t\tother_s = source(UNINITIALIZED, stack);\n\t\t\t\t\t\tsources.set(i + '', other_s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we haven't yet created a source for this property, we need to ensure\n\t\t\t// we do so otherwise if we read it later, then the write won't be tracked and\n\t\t\t// the heuristics of effects will be different vs if we had read the proxied\n\t\t\t// object property before writing to that property.\n\t\t\tif (s === undefined) {\n\t\t\t\tif (!has || get_descriptor(target, prop)?.writable) {\n\t\t\t\t\ts = source(undefined, stack);\n\t\t\t\t\tset(s, proxy(value, metadata));\n\t\t\t\t\tsources.set(prop, s);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thas = s.v !== UNINITIALIZED;\n\t\t\t\tset(s, proxy(value, metadata));\n\t\t\t}\n\n\t\t\tif (DEV) {\n\t\t\t\t/** @type {ProxyMetadata | undefined} */\n\t\t\t\tvar prop_metadata = value?.[STATE_SYMBOL_METADATA];\n\t\t\t\tif (prop_metadata && prop_metadata?.parent !== metadata) {\n\t\t\t\t\twiden_ownership(metadata, prop_metadata);\n\t\t\t\t}\n\t\t\t\tcheck_ownership(metadata);\n\t\t\t}\n\n\t\t\tvar descriptor = Reflect.getOwnPropertyDescriptor(target, prop);\n\n\t\t\t// Set the new value before updating any signals so that any listeners get the new value\n\t\t\tif (descriptor?.set) {\n\t\t\t\tdescriptor.set.call(receiver, value);\n\t\t\t}\n\n\t\t\tif (!has) {\n\t\t\t\t// If we have mutated an array directly, we might need to\n\t\t\t\t// signal that length has also changed. Do it before updating metadata\n\t\t\t\t// to ensure that iterating over the array as a result of a metadata update\n\t\t\t\t// will not cause the length to be out of sync.\n\t\t\t\tif (is_proxied_array && typeof prop === 'string') {\n\t\t\t\t\tvar ls = /** @type {Source<number>} */ (sources.get('length'));\n\t\t\t\t\tvar n = Number(prop);\n\n\t\t\t\t\tif (Number.isInteger(n) && n >= ls.v) {\n\t\t\t\t\t\tset(ls, n + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tupdate_version(version);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\townKeys(target) {\n\t\t\tget(version);\n\n\t\t\tvar own_keys = Reflect.ownKeys(target).filter((key) => {\n\t\t\t\tvar source = sources.get(key);\n\t\t\t\treturn source === undefined || source.v !== UNINITIALIZED;\n\t\t\t});\n\n\t\t\tfor (var [key, source] of sources) {\n\t\t\t\tif (source.v !== UNINITIALIZED && !(key in target)) {\n\t\t\t\t\town_keys.push(key);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn own_keys;\n\t\t},\n\n\t\tsetPrototypeOf() {\n\t\t\te.state_prototype_fixed();\n\t\t}\n\t});\n}\n\n/**\n * @param {Source<number>} signal\n * @param {1 | -1} [d]\n */\nfunction update_version(signal, d = 1) {\n\tset(signal, signal.v + d);\n}\n\n/**\n * @param {any} value\n */\nexport function get_proxied_value(value) {\n\tif (value !== null && typeof value === 'object' && STATE_SYMBOL in value) {\n\t\treturn value[STATE_SYMBOL];\n\t}\n\n\treturn value;\n}\n\n/**\n * @param {any} a\n * @param {any} b\n */\nexport function is(a, b) {\n\treturn Object.is(get_proxied_value(a), get_proxied_value(b));\n}\n","import * as w from '../warnings.js';\nimport { get_proxied_value } from '../proxy.js';\n\nexport function init_array_prototype_warnings() {\n\tconst array_prototype = Array.prototype;\n\t// The REPL ends up here over and over, and this prevents it from adding more and more patches\n\t// of the same kind to the prototype, which would slow down everything over time.\n\t// @ts-expect-error\n\tconst cleanup = Array.__svelte_cleanup;\n\tif (cleanup) {\n\t\tcleanup();\n\t}\n\n\tconst { indexOf, lastIndexOf, includes } = array_prototype;\n\n\tarray_prototype.indexOf = function (item, from_index) {\n\t\tconst index = indexOf.call(this, item, from_index);\n\n\t\tif (index === -1) {\n\t\t\tfor (let i = from_index ?? 0; i < this.length; i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.indexOf(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t};\n\n\tarray_prototype.lastIndexOf = function (item, from_index) {\n\t\t// we need to specify this.length - 1 because it's probably using something like\n\t\t// `arguments` inside so passing undefined is different from not passing anything\n\t\tconst index = lastIndexOf.call(this, item, from_index ?? this.length - 1);\n\n\t\tif (index === -1) {\n\t\t\tfor (let i = 0; i <= (from_index ?? this.length - 1); i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.lastIndexOf(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn index;\n\t};\n\n\tarray_prototype.includes = function (item, from_index) {\n\t\tconst has = includes.call(this, item, from_index);\n\n\t\tif (!has) {\n\t\t\tfor (let i = 0; i < this.length; i += 1) {\n\t\t\t\tif (get_proxied_value(this[i]) === item) {\n\t\t\t\t\tw.state_proxy_equality_mismatch('array.includes(...)');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn has;\n\t};\n\n\t// @ts-expect-error\n\tArray.__svelte_cleanup = () => {\n\t\tarray_prototype.indexOf = indexOf;\n\t\tarray_prototype.lastIndexOf = lastIndexOf;\n\t\tarray_prototype.includes = includes;\n\t};\n}\n\n/**\n * @param {any} a\n * @param {any} b\n * @param {boolean} equal\n * @returns {boolean}\n */\nexport function strict_equals(a, b, equal = true) {\n\t// try-catch needed because this tries to read properties of `a` and `b`,\n\t// which could be disallowed for example in a secure context\n\ttry {\n\t\tif ((a === b) !== (get_proxied_value(a) === get_proxied_value(b))) {\n\t\t\tw.state_proxy_equality_mismatch(equal ? '===' : '!==');\n\t\t}\n\t} catch {}\n\n\treturn (a === b) === equal;\n}\n\n/**\n * @param {any} a\n * @param {any} b\n * @param {boolean} equal\n * @returns {boolean}\n */\nexport function equals(a, b, equal = true) {\n\tif ((a == b) !== (get_proxied_value(a) == get_proxied_value(b))) {\n\t\tw.state_proxy_equality_mismatch(equal ? '==' : '!=');\n\t}\n\n\treturn (a == b) === equal;\n}\n","/** @import { TemplateNode } from '#client' */\nimport { hydrate_node, hydrating, set_hydrate_node } from './hydration.js';\nimport { DEV } from 'esm-env';\nimport { init_array_prototype_warnings } from '../dev/equality.js';\nimport { get_descriptor } from '../../shared/utils.js';\n\n// export these for reference in the compiled code, making global name deduplication unnecessary\n/** @type {Window} */\nexport var $window;\n\n/** @type {Document} */\nexport var $document;\n\n/** @type {() => Node | null} */\nvar first_child_getter;\n/** @type {() => Node | null} */\nvar next_sibling_getter;\n\n/**\n * Initialize these lazily to avoid issues when using the runtime in a server context\n * where these globals are not available while avoiding a separate server entry point\n */\nexport function init_operations() {\n\tif ($window !== undefined) {\n\t\treturn;\n\t}\n\n\t$window = window;\n\t$document = document;\n\n\tvar element_prototype = Element.prototype;\n\tvar node_prototype = Node.prototype;\n\n\t// @ts-ignore\n\tfirst_child_getter = get_descriptor(node_prototype, 'firstChild').get;\n\t// @ts-ignore\n\tnext_sibling_getter = get_descriptor(node_prototype, 'nextSibling').get;\n\n\t// the following assignments improve perf of lookups on DOM nodes\n\t// @ts-expect-error\n\telement_prototype.__click = undefined;\n\t// @ts-expect-error\n\telement_prototype.__className = '';\n\t// @ts-expect-error\n\telement_prototype.__attributes = null;\n\t// @ts-expect-error\n\telement_prototype.__styles = null;\n\t// @ts-expect-error\n\telement_prototype.__e = undefined;\n\n\t// @ts-expect-error\n\tText.prototype.__t = undefined;\n\n\tif (DEV) {\n\t\t// @ts-expect-error\n\t\telement_prototype.__svelte_meta = null;\n\n\t\tinit_array_prototype_warnings();\n\t}\n}\n\n/**\n * @param {string} value\n * @returns {Text}\n */\nexport function create_text(value = '') {\n\treturn document.createTextNode(value);\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n * @returns {Node | null}\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function get_first_child(node) {\n\treturn first_child_getter.call(node);\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n * @returns {Node | null}\n */\n/*@__NO_SIDE_EFFECTS__*/\nexport function get_next_sibling(node) {\n\treturn next_sibling_getter.call(node);\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @template {Node} N\n * @param {N} node\n * @param {boolean} is_text\n * @returns {Node | null}\n */\nexport function child(node, is_text) {\n\tif (!hydrating) {\n\t\treturn get_first_child(node);\n\t}\n\n\tvar child = /** @type {TemplateNode} */ (get_first_child(hydrate_node));\n\n\t// Child can be null if we have an element with a single child, like `<p>{text}</p>`, where `text` is empty\n\tif (child === null) {\n\t\tchild = hydrate_node.appendChild(create_text());\n\t} else if (is_text && child.nodeType !== 3) {\n\t\tvar text = create_text();\n\t\tchild?.before(text);\n\t\tset_hydrate_node(text);\n\t\treturn text;\n\t}\n\n\tset_hydrate_node(child);\n\treturn child;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {DocumentFragment | TemplateNode[]} fragment\n * @param {boolean} is_text\n * @returns {Node | null}\n */\nexport function first_child(fragment, is_text) {\n\tif (!hydrating) {\n\t\t// when not hydrating, `fragment` is a `DocumentFragment` (the result of calling `open_frag`)\n\t\tvar first = /** @type {DocumentFragment} */ (get_first_child(/** @type {Node} */ (fragment)));\n\n\t\t// TODO prevent user comments with the empty string when preserveComments is true\n\t\tif (first instanceof Comment && first.data === '') return get_next_sibling(first);\n\n\t\treturn first;\n\t}\n\n\t// if an {expression} is empty during SSR, there might be no\n\t// text node to hydrate — we must therefore create one\n\tif (is_text && hydrate_node?.nodeType !== 3) {\n\t\tvar text = create_text();\n\n\t\thydrate_node?.before(text);\n\t\tset_hydrate_node(text);\n\t\treturn text;\n\t}\n\n\treturn hydrate_node;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {TemplateNode} node\n * @param {number} count\n * @param {boolean} is_text\n * @returns {Node | null}\n */\nexport function sibling(node, count = 1, is_text = false) {\n\tlet next_sibling = hydrating ? hydrate_node : node;\n\tvar last_sibling;\n\n\twhile (count--) {\n\t\tlast_sibling = next_sibling;\n\t\tnext_sibling = /** @type {TemplateNode} */ (get_next_sibling(next_sibling));\n\t}\n\n\tif (!hydrating) {\n\t\treturn next_sibling;\n\t}\n\n\tvar type = next_sibling?.nodeType;\n\n\t// if a sibling {expression} is empty during SSR, there might be no\n\t// text node to hydrate — we must therefore create one\n\tif (is_text && type !== 3) {\n\t\tvar text = create_text();\n\t\t// If the next sibling is `null` and we're handling text then it's because\n\t\t// the SSR content was empty for the text, so we need to generate a new text\n\t\t// node and insert it after the last sibling\n\t\tif (next_sibling === null) {\n\t\t\tlast_sibling?.after(text);\n\t\t} else {\n\t\t\tnext_sibling.before(text);\n\t\t}\n\t\tset_hydrate_node(text);\n\t\treturn text;\n\t}\n\n\tset_hydrate_node(next_sibling);\n\treturn /** @type {TemplateNode} */ (next_sibling);\n}\n\n/**\n * @template {Node} N\n * @param {N} node\n * @returns {void}\n */\nexport function clear_text_content(node) {\n\tnode.textContent = '';\n}\n","/** @import { Derived, Effect } from '#client' */\nimport { DEV } from 'esm-env';\nimport {\n\tCLEAN,\n\tDERIVED,\n\tDESTROYED,\n\tDIRTY,\n\tEFFECT_HAS_DERIVED,\n\tMAYBE_DIRTY,\n\tUNOWNED\n} from '../constants.js';\nimport {\n\tactive_reaction,\n\tactive_effect,\n\tremove_reactions,\n\tset_signal_status,\n\tskip_reaction,\n\tupdate_reaction,\n\tincrement_version,\n\tset_active_effect,\n\tcomponent_context\n} from '../runtime.js';\nimport { equals, safe_equals } from './equality.js';\nimport * as e from '../errors.js';\nimport { destroy_effect } from './effects.js';\nimport { inspect_effects, set_inspect_effects } from './sources.js';\nimport { get_stack } from '../dev/tracing.js';\n\n/**\n * @template V\n * @param {() => V} fn\n * @returns {Derived<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function derived(fn) {\n\tvar flags = DERIVED | DIRTY;\n\n\tif (active_effect === null) {\n\t\tflags |= UNOWNED;\n\t} else {\n\t\t// Since deriveds are evaluated lazily, any effects created inside them are\n\t\t// created too late to ensure that the parent effect is added to the tree\n\t\tactive_effect.f |= EFFECT_HAS_DERIVED;\n\t}\n\n\tvar parent_derived =\n\t\tactive_reaction !== null && (active_reaction.f & DERIVED) !== 0\n\t\t\t? /** @type {Derived} */ (active_reaction)\n\t\t\t: null;\n\n\t/** @type {Derived<V>} */\n\tconst signal = {\n\t\tchildren: null,\n\t\tctx: component_context,\n\t\tdeps: null,\n\t\tequals,\n\t\tf: flags,\n\t\tfn,\n\t\treactions: null,\n\t\tv: /** @type {V} */ (null),\n\t\tversion: 0,\n\t\tparent: parent_derived ?? active_effect\n\t};\n\n\tif (DEV) {\n\t\tsignal.created = get_stack('CreatedAt');\n\t}\n\n\tif (parent_derived !== null) {\n\t\t(parent_derived.children ??= []).push(signal);\n\t}\n\n\treturn signal;\n}\n\n/**\n * @template V\n * @param {() => V} fn\n * @returns {Derived<V>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function derived_safe_equal(fn) {\n\tconst signal = derived(fn);\n\tsignal.equals = safe_equals;\n\treturn signal;\n}\n\n/**\n * @param {Derived} derived\n * @returns {void}\n */\nfunction destroy_derived_children(derived) {\n\tvar children = derived.children;\n\n\tif (children !== null) {\n\t\tderived.children = null;\n\n\t\tfor (var i = 0; i < children.length; i += 1) {\n\t\t\tvar child = children[i];\n\t\t\tif ((child.f & DERIVED) !== 0) {\n\t\t\t\tdestroy_derived(/** @type {Derived} */ (child));\n\t\t\t} else {\n\t\t\t\tdestroy_effect(/** @type {Effect} */ (child));\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * The currently updating deriveds, used to detect infinite recursion\n * in dev mode and provide a nicer error than 'too much recursion'\n * @type {Derived[]}\n */\nlet stack = [];\n\n/**\n * @param {Derived} derived\n * @returns {Effect | null}\n */\nfunction get_derived_parent_effect(derived) {\n\tvar parent = derived.parent;\n\twhile (parent !== null) {\n\t\tif ((parent.f & DERIVED) === 0) {\n\t\t\treturn /** @type {Effect} */ (parent);\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\treturn null;\n}\n\n/**\n * @template T\n * @param {Derived} derived\n * @returns {T}\n */\nexport function execute_derived(derived) {\n\tvar value;\n\tvar prev_active_effect = active_effect;\n\n\tset_active_effect(get_derived_parent_effect(derived));\n\n\tif (DEV) {\n\t\tlet prev_inspect_effects = inspect_effects;\n\t\tset_inspect_effects(new Set());\n\t\ttry {\n\t\t\tif (stack.includes(derived)) {\n\t\t\t\te.derived_references_self();\n\t\t\t}\n\n\t\t\tstack.push(derived);\n\n\t\t\tdestroy_derived_children(derived);\n\t\t\tvalue = update_reaction(derived);\n\t\t} finally {\n\t\t\tset_active_effect(prev_active_effect);\n\t\t\tset_inspect_effects(prev_inspect_effects);\n\t\t\tstack.pop();\n\t\t}\n\t} else {\n\t\ttry {\n\t\t\tdestroy_derived_children(derived);\n\t\t\tvalue = update_reaction(derived);\n\t\t} finally {\n\t\t\tset_active_effect(prev_active_effect);\n\t\t}\n\t}\n\n\treturn value;\n}\n\n/**\n * @param {Derived} derived\n * @returns {void}\n */\nexport function update_derived(derived) {\n\tvar value = execute_derived(derived);\n\tvar status =\n\t\t(skip_reaction || (derived.f & UNOWNED) !== 0) && derived.deps !== null ? MAYBE_DIRTY : CLEAN;\n\n\tset_signal_status(derived, status);\n\n\tif (!derived.equals(value)) {\n\t\tderived.v = value;\n\t\tderived.version = increment_version();\n\t}\n}\n\n/**\n * @param {Derived} derived\n * @returns {void}\n */\nexport function destroy_derived(derived) {\n\tdestroy_derived_children(derived);\n\tremove_reactions(derived, 0);\n\tset_signal_status(derived, DESTROYED);\n\n\tderived.v = derived.children = derived.deps = derived.ctx = derived.reactions = null;\n}\n","/** @import { ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */\nimport {\n\tcheck_dirtiness,\n\tcomponent_context,\n\tactive_effect,\n\tactive_reaction,\n\tdev_current_component_function,\n\tupdate_effect,\n\tget,\n\tis_destroying_effect,\n\tis_flushing_effect,\n\tremove_reactions,\n\tschedule_effect,\n\tset_active_reaction,\n\tset_is_destroying_effect,\n\tset_is_flushing_effect,\n\tset_signal_status,\n\tuntrack,\n\tskip_reaction\n} from '../runtime.js';\nimport {\n\tDIRTY,\n\tBRANCH_EFFECT,\n\tRENDER_EFFECT,\n\tEFFECT,\n\tDESTROYED,\n\tINERT,\n\tEFFECT_RAN,\n\tBLOCK_EFFECT,\n\tROOT_EFFECT,\n\tEFFECT_TRANSPARENT,\n\tDERIVED,\n\tUNOWNED,\n\tCLEAN,\n\tINSPECT_EFFECT,\n\tHEAD_EFFECT,\n\tMAYBE_DIRTY,\n\tEFFECT_HAS_DERIVED\n} from '../constants.js';\nimport { set } from './sources.js';\nimport * as e from '../errors.js';\nimport { DEV } from 'esm-env';\nimport { define_property } from '../../shared/utils.js';\nimport { get_next_sibling } from '../dom/operations.js';\nimport { destroy_derived } from './deriveds.js';\n\n/**\n * @param {'$effect' | '$effect.pre' | '$inspect'} rune\n */\nexport function validate_effect(rune) {\n\tif (active_effect === null && active_reaction === null) {\n\t\te.effect_orphan(rune);\n\t}\n\n\tif (active_reaction !== null && (active_reaction.f & UNOWNED) !== 0) {\n\t\te.effect_in_unowned_derived();\n\t}\n\n\tif (is_destroying_effect) {\n\t\te.effect_in_teardown(rune);\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {Effect} parent_effect\n */\nfunction push_effect(effect, parent_effect) {\n\tvar parent_last = parent_effect.last;\n\tif (parent_last === null) {\n\t\tparent_effect.last = parent_effect.first = effect;\n\t} else {\n\t\tparent_last.next = effect;\n\t\teffect.prev = parent_last;\n\t\tparent_effect.last = effect;\n\t}\n}\n\n/**\n * @param {number} type\n * @param {null | (() => void | (() => void))} fn\n * @param {boolean} sync\n * @param {boolean} push\n * @returns {Effect}\n */\nfunction create_effect(type, fn, sync, push = true) {\n\tvar is_root = (type & ROOT_EFFECT) !== 0;\n\tvar parent_effect = active_effect;\n\n\tif (DEV) {\n\t\t// Ensure the parent is never an inspect effect\n\t\twhile (parent_effect !== null && (parent_effect.f & INSPECT_EFFECT) !== 0) {\n\t\t\tparent_effect = parent_effect.parent;\n\t\t}\n\t}\n\n\t/** @type {Effect} */\n\tvar effect = {\n\t\tctx: component_context,\n\t\tdeps: null,\n\t\tderiveds: null,\n\t\tnodes_start: null,\n\t\tnodes_end: null,\n\t\tf: type | DIRTY,\n\t\tfirst: null,\n\t\tfn,\n\t\tlast: null,\n\t\tnext: null,\n\t\tparent: is_root ? null : parent_effect,\n\t\tprev: null,\n\t\tteardown: null,\n\t\ttransitions: null,\n\t\tversion: 0\n\t};\n\n\tif (DEV) {\n\t\teffect.component_function = dev_current_component_function;\n\t}\n\n\tif (sync) {\n\t\tvar previously_flushing_effect = is_flushing_effect;\n\n\t\ttry {\n\t\t\tset_is_flushing_effect(true);\n\t\t\tupdate_effect(effect);\n\t\t\teffect.f |= EFFECT_RAN;\n\t\t} catch (e) {\n\t\t\tdestroy_effect(effect);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tset_is_flushing_effect(previously_flushing_effect);\n\t\t}\n\t} else if (fn !== null) {\n\t\tschedule_effect(effect);\n\t}\n\n\t// if an effect has no dependencies, no DOM and no teardown function,\n\t// don't bother adding it to the effect tree\n\tvar inert =\n\t\tsync &&\n\t\teffect.deps === null &&\n\t\teffect.first === null &&\n\t\teffect.nodes_start === null &&\n\t\teffect.teardown === null &&\n\t\t(effect.f & EFFECT_HAS_DERIVED) === 0;\n\n\tif (!inert && !is_root && push) {\n\t\tif (parent_effect !== null) {\n\t\t\tpush_effect(effect, parent_effect);\n\t\t}\n\n\t\t// if we're in a derived, add the effect there too\n\t\tif (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) {\n\t\t\tvar derived = /** @type {Derived} */ (active_reaction);\n\t\t\t(derived.children ??= []).push(effect);\n\t\t}\n\t}\n\n\treturn effect;\n}\n\n/**\n * Internal representation of `$effect.tracking()`\n * @returns {boolean}\n */\nexport function effect_tracking() {\n\tif (active_reaction === null) {\n\t\treturn false;\n\t}\n\n\t// If it's skipped, that's because we're inside an unowned\n\t// that is not being tracked by another reaction\n\treturn !skip_reaction;\n}\n\n/**\n * @param {() => void} fn\n */\nexport function teardown(fn) {\n\tconst effect = create_effect(RENDER_EFFECT, null, false);\n\tset_signal_status(effect, CLEAN);\n\teffect.teardown = fn;\n\treturn effect;\n}\n\n/**\n * Internal representation of `$effect(...)`\n * @param {() => void | (() => void)} fn\n */\nexport function user_effect(fn) {\n\tvalidate_effect('$effect');\n\n\t// Non-nested `$effect(...)` in a component should be deferred\n\t// until the component is mounted\n\tvar defer =\n\t\tactive_effect !== null &&\n\t\t(active_effect.f & BRANCH_EFFECT) !== 0 &&\n\t\tcomponent_context !== null &&\n\t\t!component_context.m;\n\n\tif (DEV) {\n\t\tdefine_property(fn, 'name', {\n\t\t\tvalue: '$effect'\n\t\t});\n\t}\n\n\tif (defer) {\n\t\tvar context = /** @type {ComponentContext} */ (component_context);\n\t\t(context.e ??= []).push({\n\t\t\tfn,\n\t\t\teffect: active_effect,\n\t\t\treaction: active_reaction\n\t\t});\n\t} else {\n\t\tvar signal = effect(fn);\n\t\treturn signal;\n\t}\n}\n\n/**\n * Internal representation of `$effect.pre(...)`\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function user_pre_effect(fn) {\n\tvalidate_effect('$effect.pre');\n\tif (DEV) {\n\t\tdefine_property(fn, 'name', {\n\t\t\tvalue: '$effect.pre'\n\t\t});\n\t}\n\treturn render_effect(fn);\n}\n\n/** @param {() => void | (() => void)} fn */\nexport function inspect_effect(fn) {\n\treturn create_effect(INSPECT_EFFECT, fn, true);\n}\n\n/**\n * Internal representation of `$effect.root(...)`\n * @param {() => void | (() => void)} fn\n * @returns {() => void}\n */\nexport function effect_root(fn) {\n\tconst effect = create_effect(ROOT_EFFECT, fn, true);\n\n\treturn () => {\n\t\tdestroy_effect(effect);\n\t};\n}\n\n/**\n * An effect root whose children can transition out\n * @param {() => void} fn\n * @returns {(options?: { outro?: boolean }) => Promise<void>}\n */\nexport function component_root(fn) {\n\tconst effect = create_effect(ROOT_EFFECT, fn, true);\n\n\treturn (options = {}) => {\n\t\treturn new Promise((fulfil) => {\n\t\t\tif (options.outro) {\n\t\t\t\tpause_effect(effect, () => {\n\t\t\t\t\tdestroy_effect(effect);\n\t\t\t\t\tfulfil(undefined);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdestroy_effect(effect);\n\t\t\t\tfulfil(undefined);\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function effect(fn) {\n\treturn create_effect(EFFECT, fn, false);\n}\n\n/**\n * Internal representation of `$: ..`\n * @param {() => any} deps\n * @param {() => void | (() => void)} fn\n */\nexport function legacy_pre_effect(deps, fn) {\n\tvar context = /** @type {ComponentContextLegacy} */ (component_context);\n\n\t/** @type {{ effect: null | Effect, ran: boolean }} */\n\tvar token = { effect: null, ran: false };\n\tcontext.l.r1.push(token);\n\n\ttoken.effect = render_effect(() => {\n\t\tdeps();\n\n\t\t// If this legacy pre effect has already run before the end of the reset, then\n\t\t// bail out to emulate the same behavior.\n\t\tif (token.ran) return;\n\n\t\ttoken.ran = true;\n\t\tset(context.l.r2, true);\n\t\tuntrack(fn);\n\t});\n}\n\nexport function legacy_pre_effect_reset() {\n\tvar context = /** @type {ComponentContextLegacy} */ (component_context);\n\n\trender_effect(() => {\n\t\tif (!get(context.l.r2)) return;\n\n\t\t// Run dirty `$:` statements\n\t\tfor (var token of context.l.r1) {\n\t\t\tvar effect = token.effect;\n\n\t\t\t// If the effect is CLEAN, then make it MAYBE_DIRTY. This ensures we traverse through\n\t\t\t// the effects dependencies and correctly ensure each dependency is up-to-date.\n\t\t\tif ((effect.f & CLEAN) !== 0) {\n\t\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t\t}\n\n\t\t\tif (check_dirtiness(effect)) {\n\t\t\t\tupdate_effect(effect);\n\t\t\t}\n\n\t\t\ttoken.ran = false;\n\t\t}\n\n\t\tcontext.l.r2.v = false; // set directly to avoid rerunning this effect\n\t});\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function render_effect(fn) {\n\treturn create_effect(RENDER_EFFECT, fn, true);\n}\n\n/**\n * @param {() => void | (() => void)} fn\n * @returns {Effect}\n */\nexport function template_effect(fn) {\n\tif (DEV) {\n\t\tdefine_property(fn, 'name', {\n\t\t\tvalue: '{expression}'\n\t\t});\n\t}\n\treturn block(fn);\n}\n\n/**\n * @param {(() => void)} fn\n * @param {number} flags\n */\nexport function block(fn, flags = 0) {\n\treturn create_effect(RENDER_EFFECT | BLOCK_EFFECT | flags, fn, true);\n}\n\n/**\n * @param {(() => void)} fn\n * @param {boolean} [push]\n */\nexport function branch(fn, push = true) {\n\treturn create_effect(RENDER_EFFECT | BRANCH_EFFECT, fn, true, push);\n}\n\n/**\n * @param {Effect} effect\n */\nexport function execute_effect_teardown(effect) {\n\tvar teardown = effect.teardown;\n\tif (teardown !== null) {\n\t\tconst previously_destroying_effect = is_destroying_effect;\n\t\tconst previous_reaction = active_reaction;\n\t\tset_is_destroying_effect(true);\n\t\tset_active_reaction(null);\n\t\ttry {\n\t\t\tteardown.call(null);\n\t\t} finally {\n\t\t\tset_is_destroying_effect(previously_destroying_effect);\n\t\t\tset_active_reaction(previous_reaction);\n\t\t}\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @returns {void}\n */\nexport function destroy_effect_deriveds(signal) {\n\tvar deriveds = signal.deriveds;\n\n\tif (deriveds !== null) {\n\t\tsignal.deriveds = null;\n\n\t\tfor (var i = 0; i < deriveds.length; i += 1) {\n\t\t\tdestroy_derived(deriveds[i]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @param {boolean} remove_dom\n * @returns {void}\n */\nexport function destroy_effect_children(signal, remove_dom = false) {\n\tvar effect = signal.first;\n\tsignal.first = signal.last = null;\n\n\twhile (effect !== null) {\n\t\tvar next = effect.next;\n\t\tdestroy_effect(effect, remove_dom);\n\t\teffect = next;\n\t}\n}\n\n/**\n * @param {Effect} signal\n * @returns {void}\n */\nexport function destroy_block_effect_children(signal) {\n\tvar effect = signal.first;\n\n\twhile (effect !== null) {\n\t\tvar next = effect.next;\n\t\tif ((effect.f & BRANCH_EFFECT) === 0) {\n\t\t\tdestroy_effect(effect);\n\t\t}\n\t\teffect = next;\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {boolean} [remove_dom]\n * @returns {void}\n */\nexport function destroy_effect(effect, remove_dom = true) {\n\tvar removed = false;\n\n\tif ((remove_dom || (effect.f & HEAD_EFFECT) !== 0) && effect.nodes_start !== null) {\n\t\t/** @type {TemplateNode | null} */\n\t\tvar node = effect.nodes_start;\n\t\tvar end = effect.nodes_end;\n\n\t\twhile (node !== null) {\n\t\t\t/** @type {TemplateNode | null} */\n\t\t\tvar next = node === end ? null : /** @type {TemplateNode} */ (get_next_sibling(node));\n\n\t\t\tnode.remove();\n\t\t\tnode = next;\n\t\t}\n\n\t\tremoved = true;\n\t}\n\n\tdestroy_effect_children(effect, remove_dom && !removed);\n\tdestroy_effect_deriveds(effect);\n\tremove_reactions(effect, 0);\n\tset_signal_status(effect, DESTROYED);\n\n\tvar transitions = effect.transitions;\n\n\tif (transitions !== null) {\n\t\tfor (const transition of transitions) {\n\t\t\ttransition.stop();\n\t\t}\n\t}\n\n\texecute_effect_teardown(effect);\n\n\tvar parent = effect.parent;\n\n\t// If the parent doesn't have any children, then skip this work altogether\n\tif (parent !== null && parent.first !== null) {\n\t\tunlink_effect(effect);\n\t}\n\n\tif (DEV) {\n\t\teffect.component_function = null;\n\t}\n\n\t// `first` and `child` are nulled out in destroy_effect_children\n\t// we don't null out `parent` so that error propagation can work correctly\n\teffect.next =\n\t\teffect.prev =\n\t\teffect.teardown =\n\t\teffect.ctx =\n\t\teffect.deps =\n\t\teffect.fn =\n\t\teffect.nodes_start =\n\t\teffect.nodes_end =\n\t\t\tnull;\n}\n\n/**\n * Detach an effect from the effect tree, freeing up memory and\n * reducing the amount of work that happens on subsequent traversals\n * @param {Effect} effect\n */\nexport function unlink_effect(effect) {\n\tvar parent = effect.parent;\n\tvar prev = effect.prev;\n\tvar next = effect.next;\n\n\tif (prev !== null) prev.next = next;\n\tif (next !== null) next.prev = prev;\n\n\tif (parent !== null) {\n\t\tif (parent.first === effect) parent.first = next;\n\t\tif (parent.last === effect) parent.last = prev;\n\t}\n}\n\n/**\n * When a block effect is removed, we don't immediately destroy it or yank it\n * out of the DOM, because it might have transitions. Instead, we 'pause' it.\n * It stays around (in memory, and in the DOM) until outro transitions have\n * completed, and if the state change is reversed then we _resume_ it.\n * A paused effect does not update, and the DOM subtree becomes inert.\n * @param {Effect} effect\n * @param {() => void} [callback]\n */\nexport function pause_effect(effect, callback) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\n\tpause_children(effect, transitions, true);\n\n\trun_out_transitions(transitions, () => {\n\t\tdestroy_effect(effect);\n\t\tif (callback) callback();\n\t});\n}\n\n/**\n * @param {TransitionManager[]} transitions\n * @param {() => void} fn\n */\nexport function run_out_transitions(transitions, fn) {\n\tvar remaining = transitions.length;\n\tif (remaining > 0) {\n\t\tvar check = () => --remaining || fn();\n\t\tfor (var transition of transitions) {\n\t\t\ttransition.out(check);\n\t\t}\n\t} else {\n\t\tfn();\n\t}\n}\n\n/**\n * @param {Effect} effect\n * @param {TransitionManager[]} transitions\n * @param {boolean} local\n */\nexport function pause_children(effect, transitions, local) {\n\tif ((effect.f & INERT) !== 0) return;\n\teffect.f ^= INERT;\n\n\tif (effect.transitions !== null) {\n\t\tfor (const transition of effect.transitions) {\n\t\t\tif (transition.is_global || local) {\n\t\t\t\ttransitions.push(transition);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar child = effect.first;\n\n\twhile (child !== null) {\n\t\tvar sibling = child.next;\n\t\tvar transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0;\n\t\t// TODO we don't need to call pause_children recursively with a linked list in place\n\t\t// it's slightly more involved though as we have to account for `transparent` changing\n\t\t// through the tree.\n\t\tpause_children(child, transitions, transparent ? local : false);\n\t\tchild = sibling;\n\t}\n}\n\n/**\n * The opposite of `pause_effect`. We call this if (for example)\n * `x` becomes falsy then truthy: `{#if x}...{/if}`\n * @param {Effect} effect\n */\nexport function resume_effect(effect) {\n\tresume_children(effect, true);\n}\n\n/**\n * @param {Effect} effect\n * @param {boolean} local\n */\nfunction resume_children(effect, local) {\n\tif ((effect.f & INERT) === 0) return;\n\n\t// If a dependency of this effect changed while it was paused,\n\t// apply the change now\n\tif (check_dirtiness(effect)) {\n\t\tupdate_effect(effect);\n\t}\n\n\t// Ensure we toggle the flag after possibly updating the effect so that\n\t// each block logic can correctly operate on inert items\n\teffect.f ^= INERT;\n\n\tvar child = effect.first;\n\n\twhile (child !== null) {\n\t\tvar sibling = child.next;\n\t\tvar transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0;\n\t\t// TODO we don't need to call resume_children recursively with a linked list in place\n\t\t// it's slightly more involved though as we have to account for `transparent` changing\n\t\t// through the tree.\n\t\tresume_children(child, transparent ? local : false);\n\t\tchild = sibling;\n\t}\n\n\tif (effect.transitions !== null) {\n\t\tfor (const transition of effect.transitions) {\n\t\t\tif (transition.is_global || local) {\n\t\t\t\ttransition.in();\n\t\t\t}\n\t\t}\n\t}\n}\n","import { run_all } from '../../shared/utils.js';\n\n// Fallback for when requestIdleCallback is not available\nexport const request_idle_callback =\n\ttypeof requestIdleCallback === 'undefined'\n\t\t? (/** @type {() => void} */ cb) => setTimeout(cb, 1)\n\t\t: requestIdleCallback;\n\nlet is_micro_task_queued = false;\nlet is_idle_task_queued = false;\n\n/** @type {Array<() => void>} */\nlet current_queued_micro_tasks = [];\n/** @type {Array<() => void>} */\nlet current_queued_idle_tasks = [];\n\nfunction process_micro_tasks() {\n\tis_micro_task_queued = false;\n\tconst tasks = current_queued_micro_tasks.slice();\n\tcurrent_queued_micro_tasks = [];\n\trun_all(tasks);\n}\n\nfunction process_idle_tasks() {\n\tis_idle_task_queued = false;\n\tconst tasks = current_queued_idle_tasks.slice();\n\tcurrent_queued_idle_tasks = [];\n\trun_all(tasks);\n}\n\n/**\n * @param {() => void} fn\n */\nexport function queue_micro_task(fn) {\n\tif (!is_micro_task_queued) {\n\t\tis_micro_task_queued = true;\n\t\tqueueMicrotask(process_micro_tasks);\n\t}\n\tcurrent_queued_micro_tasks.push(fn);\n}\n\n/**\n * @param {() => void} fn\n */\nexport function queue_idle_task(fn) {\n\tif (!is_idle_task_queued) {\n\t\tis_idle_task_queued = true;\n\t\trequest_idle_callback(process_idle_tasks);\n\t}\n\tcurrent_queued_idle_tasks.push(fn);\n}\n\n/**\n * Synchronously run any queued tasks.\n */\nexport function flush_tasks() {\n\tif (is_micro_task_queued) {\n\t\tprocess_micro_tasks();\n\t}\n\tif (is_idle_task_queued) {\n\t\tprocess_idle_tasks();\n\t}\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\n/**\n * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\n * @returns {never}\n */\nexport function invalid_default_snippet() {\n\tif (DEV) {\n\t\tconst error = new Error(`invalid_default_snippet\\nCannot use \\`{@render children(...)}\\` if the parent component uses \\`let:\\` directives. Consider using a named snippet instead\\nhttps://svelte.dev/e/invalid_default_snippet`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/invalid_default_snippet`);\n\t}\n}\n\n/**\n * `%name%(...)` can only be used during component initialisation\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_outside_component(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`lifecycle_outside_component\\n\\`${name}(...)\\` can only be used during component initialisation\\nhttps://svelte.dev/e/lifecycle_outside_component`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/lifecycle_outside_component`);\n\t}\n}\n\n/**\n * `%name%` is not a store with a `subscribe` method\n * @param {string} name\n * @returns {never}\n */\nexport function store_invalid_shape(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`store_invalid_shape\\n\\`${name}\\` is not a store with a \\`subscribe\\` method\\nhttps://svelte.dev/e/store_invalid_shape`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/store_invalid_shape`);\n\t}\n}\n\n/**\n * The `this` prop on `<svelte:element>` must be a string, if defined\n * @returns {never}\n */\nexport function svelte_element_invalid_this_value() {\n\tif (DEV) {\n\t\tconst error = new Error(`svelte_element_invalid_this_value\\nThe \\`this\\` prop on \\`<svelte:element>\\` must be a string, if defined\\nhttps://svelte.dev/e/svelte_element_invalid_this_value`);\n\n\t\terror.name = 'Svelte error';\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);\n\t}\n}","/** @import { SourceLocation } from '#shared' */\nimport { HYDRATION_END, HYDRATION_START, HYDRATION_START_ELSE } from '../../../constants.js';\nimport { hydrating } from '../dom/hydration.js';\n\n/**\n * @param {any} fn\n * @param {string} filename\n * @param {SourceLocation[]} locations\n * @returns {any}\n */\nexport function add_locations(fn, filename, locations) {\n\treturn (/** @type {any[]} */ ...args) => {\n\t\tconst dom = fn(...args);\n\n\t\tvar node = hydrating ? dom : dom.nodeType === 11 ? dom.firstChild : dom;\n\t\tassign_locations(node, filename, locations);\n\n\t\treturn dom;\n\t};\n}\n\n/**\n * @param {Element} element\n * @param {string} filename\n * @param {SourceLocation} location\n */\nfunction assign_location(element, filename, location) {\n\t// @ts-expect-error\n\telement.__svelte_meta = {\n\t\tloc: { file: filename, line: location[0], column: location[1] }\n\t};\n\n\tif (location[2]) {\n\t\tassign_locations(element.firstChild, filename, location[2]);\n\t}\n}\n\n/**\n * @param {Node | null} node\n * @param {string} filename\n * @param {SourceLocation[]} locations\n */\nfunction assign_locations(node, filename, locations) {\n\tvar i = 0;\n\tvar depth = 0;\n\n\twhile (node && i < locations.length) {\n\t\tif (hydrating && node.nodeType === 8) {\n\t\t\tvar comment = /** @type {Comment} */ (node);\n\t\t\tif (comment.data === HYDRATION_START || comment.data === HYDRATION_START_ELSE) depth += 1;\n\t\t\telse if (comment.data[0] === HYDRATION_END) depth -= 1;\n\t\t}\n\n\t\tif (depth === 0 && node.nodeType === 1) {\n\t\t\tassign_location(/** @type {Element} */ (node), filename, locations[i++]);\n\t\t}\n\n\t\tnode = node.nextSibling;\n\t}\n}\n","/** @import { Location } from 'locate-character' */\nimport { teardown } from '../../reactivity/effects.js';\nimport { define_property, is_array } from '../../../shared/utils.js';\nimport { hydrating } from '../hydration.js';\nimport { queue_micro_task } from '../task.js';\nimport { FILENAME } from '../../../../constants.js';\nimport * as w from '../../warnings.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\nimport { without_reactive_context } from './bindings/shared.js';\n\n/** @type {Set<string>} */\nexport const all_registered_events = new Set();\n\n/** @type {Set<(events: Array<string>) => void>} */\nexport const root_event_handles = new Set();\n\n/**\n * SSR adds onload and onerror attributes to catch those events before the hydration.\n * This function detects those cases, removes the attributes and replays the events.\n * @param {HTMLElement} dom\n */\nexport function replay_events(dom) {\n\tif (!hydrating) return;\n\n\tif (dom.onload) {\n\t\tdom.removeAttribute('onload');\n\t}\n\tif (dom.onerror) {\n\t\tdom.removeAttribute('onerror');\n\t}\n\t// @ts-expect-error\n\tconst event = dom.__e;\n\tif (event !== undefined) {\n\t\t// @ts-expect-error\n\t\tdom.__e = undefined;\n\t\tqueueMicrotask(() => {\n\t\t\tif (dom.isConnected) {\n\t\t\t\tdom.dispatchEvent(event);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @param {string} event_name\n * @param {EventTarget} dom\n * @param {EventListener} handler\n * @param {AddEventListenerOptions} options\n */\nexport function create_event(event_name, dom, handler, options) {\n\t/**\n\t * @this {EventTarget}\n\t */\n\tfunction target_handler(/** @type {Event} */ event) {\n\t\tif (!options.capture) {\n\t\t\t// Only call in the bubble phase, else delegated events would be called before the capturing events\n\t\t\thandle_event_propagation.call(dom, event);\n\t\t}\n\t\tif (!event.cancelBubble) {\n\t\t\treturn without_reactive_context(() => {\n\t\t\t\treturn handler.call(this, event);\n\t\t\t});\n\t\t}\n\t}\n\n\t// Chrome has a bug where pointer events don't work when attached to a DOM element that has been cloned\n\t// with cloneNode() and the DOM element is disconnected from the document. To ensure the event works, we\n\t// defer the attachment till after it's been appended to the document. TODO: remove this once Chrome fixes\n\t// this bug. The same applies to wheel events and touch events.\n\tif (\n\t\tevent_name.startsWith('pointer') ||\n\t\tevent_name.startsWith('touch') ||\n\t\tevent_name === 'wheel'\n\t) {\n\t\tqueue_micro_task(() => {\n\t\t\tdom.addEventListener(event_name, target_handler, options);\n\t\t});\n\t} else {\n\t\tdom.addEventListener(event_name, target_handler, options);\n\t}\n\n\treturn target_handler;\n}\n\n/**\n * Attaches an event handler to an element and returns a function that removes the handler. Using this\n * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively\n * (with attributes like `onclick`), which use event delegation for performance reasons\n *\n * @param {EventTarget} element\n * @param {string} type\n * @param {EventListener} handler\n * @param {AddEventListenerOptions} [options]\n */\nexport function on(element, type, handler, options = {}) {\n\tvar target_handler = create_event(type, element, handler, options);\n\n\treturn () => {\n\t\telement.removeEventListener(type, target_handler, options);\n\t};\n}\n\n/**\n * @param {string} event_name\n * @param {Element} dom\n * @param {EventListener} handler\n * @param {boolean} capture\n * @param {boolean} [passive]\n * @returns {void}\n */\nexport function event(event_name, dom, handler, capture, passive) {\n\tvar options = { capture, passive };\n\tvar target_handler = create_event(event_name, dom, handler, options);\n\n\t// @ts-ignore\n\tif (dom === document.body || dom === window || dom === document) {\n\t\tteardown(() => {\n\t\t\tdom.removeEventListener(event_name, target_handler, options);\n\t\t});\n\t}\n}\n\n/**\n * @param {Array<string>} events\n * @returns {void}\n */\nexport function delegate(events) {\n\tfor (var i = 0; i < events.length; i++) {\n\t\tall_registered_events.add(events[i]);\n\t}\n\n\tfor (var fn of root_event_handles) {\n\t\tfn(events);\n\t}\n}\n\n/**\n * @this {EventTarget}\n * @param {Event} event\n * @returns {void}\n */\nexport function handle_event_propagation(event) {\n\tvar handler_element = this;\n\tvar owner_document = /** @type {Node} */ (handler_element).ownerDocument;\n\tvar event_name = event.type;\n\tvar path = event.composedPath?.() || [];\n\tvar current_target = /** @type {null | Element} */ (path[0] || event.target);\n\n\t// composedPath contains list of nodes the event has propagated through.\n\t// We check __root to skip all nodes below it in case this is a\n\t// parent of the __root node, which indicates that there's nested\n\t// mounted apps. In this case we don't want to trigger events multiple times.\n\tvar path_idx = 0;\n\n\t// @ts-expect-error is added below\n\tvar handled_at = event.__root;\n\n\tif (handled_at) {\n\t\tvar at_idx = path.indexOf(handled_at);\n\t\tif (\n\t\t\tat_idx !== -1 &&\n\t\t\t(handler_element === document || handler_element === /** @type {any} */ (window))\n\t\t) {\n\t\t\t// This is the fallback document listener or a window listener, but the event was already handled\n\t\t\t// -> ignore, but set handle_at to document/window so that we're resetting the event\n\t\t\t// chain in case someone manually dispatches the same event object again.\n\t\t\t// @ts-expect-error\n\t\t\tevent.__root = handler_element;\n\t\t\treturn;\n\t\t}\n\n\t\t// We're deliberately not skipping if the index is higher, because\n\t\t// someone could create an event programmatically and emit it multiple times,\n\t\t// in which case we want to handle the whole propagation chain properly each time.\n\t\t// (this will only be a false negative if the event is dispatched multiple times and\n\t\t// the fallback document listener isn't reached in between, but that's super rare)\n\t\tvar handler_idx = path.indexOf(handler_element);\n\t\tif (handler_idx === -1) {\n\t\t\t// handle_idx can theoretically be -1 (happened in some JSDOM testing scenarios with an event listener on the window object)\n\t\t\t// so guard against that, too, and assume that everything was handled at this point.\n\t\t\treturn;\n\t\t}\n\n\t\tif (at_idx <= handler_idx) {\n\t\t\tpath_idx = at_idx;\n\t\t}\n\t}\n\n\tcurrent_target = /** @type {Element} */ (path[path_idx] || event.target);\n\t// there can only be one delegated event per element, and we either already handled the current target,\n\t// or this is the very first target in the chain which has a non-delegated listener, in which case it's safe\n\t// to handle a possible delegated event on it later (through the root delegation listener for example).\n\tif (current_target === handler_element) return;\n\n\t// Proxy currentTarget to correct target\n\tdefine_property(event, 'currentTarget', {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn current_target || owner_document;\n\t\t}\n\t});\n\n\t// This started because of Chromium issue https://chromestatus.com/feature/5128696823545856,\n\t// where removal or moving of of the DOM can cause sync `blur` events to fire, which can cause logic\n\t// to run inside the current `active_reaction`, which isn't what we want at all. However, on reflection,\n\t// it's probably best that all event handled by Svelte have this behaviour, as we don't really want\n\t// an event handler to run in the context of another reaction or effect.\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\n\ttry {\n\t\t/**\n\t\t * @type {unknown}\n\t\t */\n\t\tvar throw_error;\n\t\t/**\n\t\t * @type {unknown[]}\n\t\t */\n\t\tvar other_errors = [];\n\n\t\twhile (current_target !== null) {\n\t\t\t/** @type {null | Element} */\n\t\t\tvar parent_element =\n\t\t\t\tcurrent_target.assignedSlot ||\n\t\t\t\tcurrent_target.parentNode ||\n\t\t\t\t/** @type {any} */ (current_target).host ||\n\t\t\t\tnull;\n\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tvar delegated = current_target['__' + event_name];\n\n\t\t\t\tif (delegated !== undefined && !(/** @type {any} */ (current_target).disabled)) {\n\t\t\t\t\tif (is_array(delegated)) {\n\t\t\t\t\t\tvar [fn, ...data] = delegated;\n\t\t\t\t\t\tfn.apply(current_target, [event, ...data]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdelegated.call(current_target, event);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (throw_error) {\n\t\t\t\t\tother_errors.push(error);\n\t\t\t\t} else {\n\t\t\t\t\tthrow_error = error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (event.cancelBubble || parent_element === handler_element || parent_element === null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_target = parent_element;\n\t\t}\n\n\t\tif (throw_error) {\n\t\t\tfor (let error of other_errors) {\n\t\t\t\t// Throw the rest of the errors, one-by-one on a microtask\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow throw_error;\n\t\t}\n\t} finally {\n\t\t// @ts-expect-error is used above\n\t\tevent.__root = handler_element;\n\t\t// @ts-ignore remove proxy on currentTarget\n\t\tdelete event.currentTarget;\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * In dev, warn if an event handler is not a function, as it means the\n * user probably called the handler or forgot to add a `() =>`\n * @param {() => (event: Event, ...args: any) => void} thunk\n * @param {EventTarget} element\n * @param {[Event, ...any]} args\n * @param {any} component\n * @param {[number, number]} [loc]\n * @param {boolean} [remove_parens]\n */\nexport function apply(\n\tthunk,\n\telement,\n\targs,\n\tcomponent,\n\tloc,\n\thas_side_effects = false,\n\tremove_parens = false\n) {\n\tlet handler;\n\tlet error;\n\n\ttry {\n\t\thandler = thunk();\n\t} catch (e) {\n\t\terror = e;\n\t}\n\n\tif (typeof handler === 'function') {\n\t\thandler.apply(element, args);\n\t} else if (has_side_effects || handler != null || error) {\n\t\tconst filename = component?.[FILENAME];\n\t\tconst location = loc ? ` at ${filename}:${loc[0]}:${loc[1]}` : ` in ${filename}`;\n\n\t\tconst event_name = args[0].type;\n\t\tconst description = `\\`${event_name}\\` handler${location}`;\n\t\tconst suggestion = remove_parens ? 'remove the trailing `()`' : 'add a leading `() =>`';\n\n\t\tw.event_handler_invalid(description, suggestion);\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n","/** @import { Effect, TemplateNode } from '#client' */\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from './hydration.js';\nimport { create_text, get_first_child } from './operations.js';\nimport { create_fragment_from_html } from './reconciler.js';\nimport { active_effect } from '../runtime.js';\nimport { TEMPLATE_FRAGMENT, TEMPLATE_USE_IMPORT_NODE } from '../../../constants.js';\n\n/**\n * @param {TemplateNode} start\n * @param {TemplateNode | null} end\n */\nexport function assign_nodes(start, end) {\n\tvar effect = /** @type {Effect} */ (active_effect);\n\tif (effect.nodes_start === null) {\n\t\teffect.nodes_start = start;\n\t\teffect.nodes_end = end;\n\t}\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function template(content, flags) {\n\tvar is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0;\n\tvar use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0;\n\n\t/** @type {Node} */\n\tvar node;\n\n\t/**\n\t * Whether or not the first item is a text/element node. If not, we need to\n\t * create an additional comment node to act as `effect.nodes.start`\n\t */\n\tvar has_start = !content.startsWith('<!>');\n\n\treturn () => {\n\t\tif (hydrating) {\n\t\t\tassign_nodes(hydrate_node, null);\n\t\t\treturn hydrate_node;\n\t\t}\n\n\t\tif (node === undefined) {\n\t\t\tnode = create_fragment_from_html(has_start ? content : '<!>' + content);\n\t\t\tif (!is_fragment) node = /** @type {Node} */ (get_first_child(node));\n\t\t}\n\n\t\tvar clone = /** @type {TemplateNode} */ (\n\t\t\tuse_import_node ? document.importNode(node, true) : node.cloneNode(true)\n\t\t);\n\n\t\tif (is_fragment) {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_first_child(clone));\n\t\t\tvar end = /** @type {TemplateNode} */ (clone.lastChild);\n\n\t\t\tassign_nodes(start, end);\n\t\t} else {\n\t\t\tassign_nodes(clone, clone);\n\t\t}\n\n\t\treturn clone;\n\t};\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function template_with_script(content, flags) {\n\tvar fn = template(content, flags);\n\treturn () => run_scripts(/** @type {Element | DocumentFragment} */ (fn()));\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @param {'svg' | 'math'} ns\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function ns_template(content, flags, ns = 'svg') {\n\t/**\n\t * Whether or not the first item is a text/element node. If not, we need to\n\t * create an additional comment node to act as `effect.nodes.start`\n\t */\n\tvar has_start = !content.startsWith('<!>');\n\n\tvar is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0;\n\tvar wrapped = `<${ns}>${has_start ? content : '<!>' + content}</${ns}>`;\n\n\t/** @type {Element | DocumentFragment} */\n\tvar node;\n\n\treturn () => {\n\t\tif (hydrating) {\n\t\t\tassign_nodes(hydrate_node, null);\n\t\t\treturn hydrate_node;\n\t\t}\n\n\t\tif (!node) {\n\t\t\tvar fragment = /** @type {DocumentFragment} */ (create_fragment_from_html(wrapped));\n\t\t\tvar root = /** @type {Element} */ (get_first_child(fragment));\n\n\t\t\tif (is_fragment) {\n\t\t\t\tnode = document.createDocumentFragment();\n\t\t\t\twhile (get_first_child(root)) {\n\t\t\t\t\tnode.appendChild(/** @type {Node} */ (get_first_child(root)));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode = /** @type {Element} */ (get_first_child(root));\n\t\t\t}\n\t\t}\n\n\t\tvar clone = /** @type {TemplateNode} */ (node.cloneNode(true));\n\n\t\tif (is_fragment) {\n\t\t\tvar start = /** @type {TemplateNode} */ (get_first_child(clone));\n\t\t\tvar end = /** @type {TemplateNode} */ (clone.lastChild);\n\n\t\t\tassign_nodes(start, end);\n\t\t} else {\n\t\t\tassign_nodes(clone, clone);\n\t\t}\n\n\t\treturn clone;\n\t};\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function svg_template_with_script(content, flags) {\n\tvar fn = ns_template(content, flags);\n\treturn () => run_scripts(/** @type {Element | DocumentFragment} */ (fn()));\n}\n\n/**\n * @param {string} content\n * @param {number} flags\n * @returns {() => Node | Node[]}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function mathml_template(content, flags) {\n\treturn ns_template(content, flags, 'math');\n}\n\n/**\n * Creating a document fragment from HTML that contains script tags will not execute\n * the scripts. We need to replace the script tags with new ones so that they are executed.\n * @param {Element | DocumentFragment} node\n * @returns {Node | Node[]}\n */\nfunction run_scripts(node) {\n\t// scripts were SSR'd, in which case they will run\n\tif (hydrating) return node;\n\n\tconst is_fragment = node.nodeType === 11;\n\tconst scripts =\n\t\t/** @type {HTMLElement} */ (node).tagName === 'SCRIPT'\n\t\t\t? [/** @type {HTMLScriptElement} */ (node)]\n\t\t\t: node.querySelectorAll('script');\n\tconst effect = /** @type {Effect} */ (active_effect);\n\n\tfor (const script of scripts) {\n\t\tconst clone = document.createElement('script');\n\t\tfor (var attribute of script.attributes) {\n\t\t\tclone.setAttribute(attribute.name, attribute.value);\n\t\t}\n\n\t\tclone.textContent = script.textContent;\n\n\t\t// The script has changed - if it's at the edges, the effect now points at dead nodes\n\t\tif (is_fragment ? node.firstChild === script : node === script) {\n\t\t\teffect.nodes_start = clone;\n\t\t}\n\t\tif (is_fragment ? node.lastChild === script : node === script) {\n\t\t\teffect.nodes_end = clone;\n\t\t}\n\n\t\tscript.replaceWith(clone);\n\t}\n\treturn node;\n}\n\n/**\n * Don't mark this as side-effect-free, hydration needs to walk all nodes\n * @param {any} value\n */\nexport function text(value = '') {\n\tif (!hydrating) {\n\t\tvar t = create_text(value + '');\n\t\tassign_nodes(t, t);\n\t\treturn t;\n\t}\n\n\tvar node = hydrate_node;\n\n\tif (node.nodeType !== 3) {\n\t\t// if an {expression} is empty during SSR, we need to insert an empty text node\n\t\tnode.before((node = create_text()));\n\t\tset_hydrate_node(node);\n\t}\n\n\tassign_nodes(node, node);\n\treturn node;\n}\n\nexport function comment() {\n\t// we're not delegating to `template` here for performance reasons\n\tif (hydrating) {\n\t\tassign_nodes(hydrate_node, null);\n\t\treturn hydrate_node;\n\t}\n\n\tvar frag = document.createDocumentFragment();\n\tvar start = document.createComment('');\n\tvar anchor = create_text();\n\tfrag.append(start, anchor);\n\n\tassign_nodes(start, anchor);\n\n\treturn frag;\n}\n\n/**\n * Assign the created (or in hydration mode, traversed) dom elements to the current block\n * and insert the elements into the dom (in client mode).\n * @param {Text | Comment | Element} anchor\n * @param {DocumentFragment | Element} dom\n */\nexport function append(anchor, dom) {\n\tif (hydrating) {\n\t\t/** @type {Effect} */ (active_effect).nodes_end = hydrate_node;\n\t\thydrate_next();\n\t\treturn;\n\t}\n\n\tif (anchor === null) {\n\t\t// edge case — void `<svelte:element>` with content\n\t\treturn;\n\t}\n\n\tanchor.before(/** @type {Node} */ (dom));\n}\n","/** @param {string} html */\nexport function create_fragment_from_html(html) {\n\tvar elem = document.createElement('template');\n\telem.innerHTML = html;\n\treturn elem.content;\n}\n","/** @import { ComponentContext, Effect, TemplateNode } from '#client' */\n/** @import { Component, ComponentType, SvelteComponent, MountOptions } from '../../index.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling,\n\tinit_operations\n} from './dom/operations.js';\nimport { HYDRATION_END, HYDRATION_ERROR, HYDRATION_START } from '../../constants.js';\nimport { push, pop, component_context, active_effect } from './runtime.js';\nimport { component_root, branch } from './reactivity/effects.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tset_hydrate_node,\n\tset_hydrating\n} from './dom/hydration.js';\nimport { array_from } from '../shared/utils.js';\nimport {\n\tall_registered_events,\n\thandle_event_propagation,\n\troot_event_handles\n} from './dom/elements/events.js';\nimport { reset_head_anchor } from './dom/blocks/svelte-head.js';\nimport * as w from './warnings.js';\nimport * as e from './errors.js';\nimport { assign_nodes } from './dom/template.js';\nimport { is_passive_event } from '../../utils.js';\n\n/**\n * This is normally true — block effects should run their intro transitions —\n * but is false during hydration (unless `options.intro` is `true`) and\n * when creating the children of a `<svelte:element>` that just changed tag\n */\nexport let should_intro = true;\n\n/** @param {boolean} value */\nexport function set_should_intro(value) {\n\tshould_intro = value;\n}\n\n/**\n * @param {Element} text\n * @param {string} value\n * @returns {void}\n */\nexport function set_text(text, value) {\n\t// For objects, we apply string coercion (which might make things like $state array references in the template reactive) before diffing\n\tvar str = value == null ? '' : typeof value === 'object' ? value + '' : value;\n\t// @ts-expect-error\n\tif (str !== (text.__t ??= text.nodeValue)) {\n\t\t// @ts-expect-error\n\t\ttext.__t = str;\n\t\ttext.nodeValue = str == null ? '' : str + '';\n\t}\n}\n\n/**\n * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.\n * Transitions will play during the initial render unless the `intro` option is set to `false`.\n *\n * @template {Record<string, any>} Props\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component\n * @param {MountOptions<Props>} options\n * @returns {Exports}\n */\nexport function mount(component, options) {\n\treturn _mount(component, options);\n}\n\n/**\n * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component\n *\n * @template {Record<string, any>} Props\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component\n * @param {{} extends Props ? {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops?: Props;\n * \t\tevents?: Record<string, (e: any) => any>;\n * \tcontext?: Map<any, any>;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n * \t} : {\n * \t\ttarget: Document | Element | ShadowRoot;\n * \t\tprops: Props;\n * \t\tevents?: Record<string, (e: any) => any>;\n * \tcontext?: Map<any, any>;\n * \t\tintro?: boolean;\n * \t\trecover?: boolean;\n * \t}} options\n * @returns {Exports}\n */\nexport function hydrate(component, options) {\n\tinit_operations();\n\toptions.intro = options.intro ?? false;\n\tconst target = options.target;\n\tconst was_hydrating = hydrating;\n\tconst previous_hydrate_node = hydrate_node;\n\n\ttry {\n\t\tvar anchor = /** @type {TemplateNode} */ (get_first_child(target));\n\t\twhile (\n\t\t\tanchor &&\n\t\t\t(anchor.nodeType !== 8 || /** @type {Comment} */ (anchor).data !== HYDRATION_START)\n\t\t) {\n\t\t\tanchor = /** @type {TemplateNode} */ (get_next_sibling(anchor));\n\t\t}\n\n\t\tif (!anchor) {\n\t\t\tthrow HYDRATION_ERROR;\n\t\t}\n\n\t\tset_hydrating(true);\n\t\tset_hydrate_node(/** @type {Comment} */ (anchor));\n\t\thydrate_next();\n\n\t\tconst instance = _mount(component, { ...options, anchor });\n\n\t\tif (\n\t\t\thydrate_node === null ||\n\t\t\thydrate_node.nodeType !== 8 ||\n\t\t\t/** @type {Comment} */ (hydrate_node).data !== HYDRATION_END\n\t\t) {\n\t\t\tw.hydration_mismatch();\n\t\t\tthrow HYDRATION_ERROR;\n\t\t}\n\n\t\tset_hydrating(false);\n\n\t\treturn /** @type {Exports} */ (instance);\n\t} catch (error) {\n\t\tif (error === HYDRATION_ERROR) {\n\t\t\tif (options.recover === false) {\n\t\t\t\te.hydration_failed();\n\t\t\t}\n\n\t\t\t// If an error occured above, the operations might not yet have been initialised.\n\t\t\tinit_operations();\n\t\t\tclear_text_content(target);\n\n\t\t\tset_hydrating(false);\n\t\t\treturn mount(component, options);\n\t\t}\n\n\t\tthrow error;\n\t} finally {\n\t\tset_hydrating(was_hydrating);\n\t\tset_hydrate_node(previous_hydrate_node);\n\t\treset_head_anchor();\n\t}\n}\n\n/** @type {Map<string, number>} */\nconst document_listeners = new Map();\n\n/**\n * @template {Record<string, any>} Exports\n * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component\n * @param {MountOptions} options\n * @returns {Exports}\n */\nfunction _mount(Component, { target, anchor, props = {}, events, context, intro = true }) {\n\tinit_operations();\n\n\tvar registered_events = new Set();\n\n\t/** @param {Array<string>} events */\n\tvar event_handle = (events) => {\n\t\tfor (var i = 0; i < events.length; i++) {\n\t\t\tvar event_name = events[i];\n\n\t\t\tif (registered_events.has(event_name)) continue;\n\t\t\tregistered_events.add(event_name);\n\n\t\t\tvar passive = is_passive_event(event_name);\n\n\t\t\t// Add the event listener to both the container and the document.\n\t\t\t// The container listener ensures we catch events from within in case\n\t\t\t// the outer content stops propagation of the event.\n\t\t\ttarget.addEventListener(event_name, handle_event_propagation, { passive });\n\n\t\t\tvar n = document_listeners.get(event_name);\n\n\t\t\tif (n === undefined) {\n\t\t\t\t// The document listener ensures we catch events that originate from elements that were\n\t\t\t\t// manually moved outside of the container (e.g. via manual portals).\n\t\t\t\tdocument.addEventListener(event_name, handle_event_propagation, { passive });\n\t\t\t\tdocument_listeners.set(event_name, 1);\n\t\t\t} else {\n\t\t\t\tdocument_listeners.set(event_name, n + 1);\n\t\t\t}\n\t\t}\n\t};\n\n\tevent_handle(array_from(all_registered_events));\n\troot_event_handles.add(event_handle);\n\n\t/** @type {Exports} */\n\t// @ts-expect-error will be defined because the render effect runs synchronously\n\tvar component = undefined;\n\n\tvar unmount = component_root(() => {\n\t\tvar anchor_node = anchor ?? target.appendChild(create_text());\n\n\t\tbranch(() => {\n\t\t\tif (context) {\n\t\t\t\tpush({});\n\t\t\t\tvar ctx = /** @type {ComponentContext} */ (component_context);\n\t\t\t\tctx.c = context;\n\t\t\t}\n\n\t\t\tif (events) {\n\t\t\t\t// We can't spread the object or else we'd lose the state proxy stuff, if it is one\n\t\t\t\t/** @type {any} */ (props).$$events = events;\n\t\t\t}\n\n\t\t\tif (hydrating) {\n\t\t\t\tassign_nodes(/** @type {TemplateNode} */ (anchor_node), null);\n\t\t\t}\n\n\t\t\tshould_intro = intro;\n\t\t\t// @ts-expect-error the public typings are not what the actual function looks like\n\t\t\tcomponent = Component(anchor_node, props) || {};\n\t\t\tshould_intro = true;\n\n\t\t\tif (hydrating) {\n\t\t\t\t/** @type {Effect} */ (active_effect).nodes_end = hydrate_node;\n\t\t\t}\n\n\t\t\tif (context) {\n\t\t\t\tpop();\n\t\t\t}\n\t\t});\n\n\t\treturn () => {\n\t\t\tfor (var event_name of registered_events) {\n\t\t\t\ttarget.removeEventListener(event_name, handle_event_propagation);\n\n\t\t\t\tvar n = /** @type {number} */ (document_listeners.get(event_name));\n\n\t\t\t\tif (--n === 0) {\n\t\t\t\t\tdocument.removeEventListener(event_name, handle_event_propagation);\n\t\t\t\t\tdocument_listeners.delete(event_name);\n\t\t\t\t} else {\n\t\t\t\t\tdocument_listeners.set(event_name, n);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\troot_event_handles.delete(event_handle);\n\n\t\t\tif (anchor_node !== anchor) {\n\t\t\t\tanchor_node.parentNode?.removeChild(anchor_node);\n\t\t\t}\n\t\t};\n\t});\n\n\tmounted_components.set(component, unmount);\n\treturn component;\n}\n\n/**\n * References of the components that were mounted or hydrated.\n * Uses a `WeakMap` to avoid memory leaks.\n */\nlet mounted_components = new WeakMap();\n\n/**\n * Unmounts a component that was previously mounted using `mount` or `hydrate`.\n *\n * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.\n *\n * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).\n *\n * ```js\n * import { mount, unmount } from 'svelte';\n * import App from './App.svelte';\n *\n * const app = mount(App, { target: document.body });\n *\n * // later...\n * unmount(app, { outro: true });\n * ```\n * @param {Record<string, any>} component\n * @param {{ outro?: boolean }} [options]\n * @returns {Promise<void>}\n */\nexport function unmount(component, options) {\n\tconst fn = mounted_components.get(component);\n\n\tif (fn) {\n\t\tmounted_components.delete(component);\n\t\treturn fn(options);\n\t}\n\n\tif (DEV) {\n\t\tw.lifecycle_double_unmount();\n\t}\n\n\treturn Promise.resolve();\n}\n","import * as e from '../errors.js';\nimport { component_context } from '../runtime.js';\nimport { FILENAME } from '../../../constants.js';\nimport { get_component } from './ownership.js';\n\n/** @param {Function & { [FILENAME]: string }} target */\nexport function check_target(target) {\n\tif (target) {\n\t\te.component_api_invalid_new(target[FILENAME] ?? 'a component', target.name);\n\t}\n}\n\nexport function legacy_api() {\n\tconst component = component_context?.function;\n\n\t/** @param {string} method */\n\tfunction error(method) {\n\t\t// @ts-expect-error\n\t\tconst parent = get_component()?.[FILENAME] ?? 'Something';\n\t\te.component_api_changed(parent, method, component[FILENAME]);\n\t}\n\n\treturn {\n\t\t$destroy: () => error('$destroy()'),\n\t\t$on: () => error('$on(...)'),\n\t\t$set: () => error('$set(...)')\n\t};\n}\n","/** @import { Effect, TemplateNode } from '#client' */\nimport { EFFECT_TRANSPARENT } from '../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tremove_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport { block, branch, pause_effect, resume_effect } from '../../reactivity/effects.js';\nimport { HYDRATION_START_ELSE, UNINITIALIZED } from '../../../../constants.js';\n\n/**\n * @param {TemplateNode} node\n * @param {(branch: (fn: (anchor: Node) => void, flag?: boolean) => void) => void} fn\n * @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local'\n * @returns {void}\n */\nexport function if_block(node, fn, elseif = false) {\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\tvar anchor = node;\n\n\t/** @type {Effect | null} */\n\tvar consequent_effect = null;\n\n\t/** @type {Effect | null} */\n\tvar alternate_effect = null;\n\n\t/** @type {UNINITIALIZED | boolean | null} */\n\tvar condition = UNINITIALIZED;\n\n\tvar flags = elseif ? EFFECT_TRANSPARENT : 0;\n\n\tvar has_branch = false;\n\n\tconst set_branch = (/** @type {(anchor: Node) => void} */ fn, flag = true) => {\n\t\thas_branch = true;\n\t\tupdate_branch(flag, fn);\n\t};\n\n\tconst update_branch = (\n\t\t/** @type {boolean | null} */ new_condition,\n\t\t/** @type {null | ((anchor: Node) => void)} */ fn\n\t) => {\n\t\tif (condition === (condition = new_condition)) return;\n\n\t\t/** Whether or not there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tconst is_else = /** @type {Comment} */ (anchor).data === HYDRATION_START_ELSE;\n\n\t\t\tif (!!condition === is_else) {\n\t\t\t\t// Hydration mismatch: remove everything inside the anchor and start fresh.\n\t\t\t\t// This could happen with `{#if browser}...{/if}`, for example\n\t\t\t\tanchor = remove_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\tif (condition) {\n\t\t\tif (consequent_effect) {\n\t\t\t\tresume_effect(consequent_effect);\n\t\t\t} else if (fn) {\n\t\t\t\tconsequent_effect = branch(() => fn(anchor));\n\t\t\t}\n\n\t\t\tif (alternate_effect) {\n\t\t\t\tpause_effect(alternate_effect, () => {\n\t\t\t\t\talternate_effect = null;\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tif (alternate_effect) {\n\t\t\t\tresume_effect(alternate_effect);\n\t\t\t} else if (fn) {\n\t\t\t\talternate_effect = branch(() => fn(anchor));\n\t\t\t}\n\n\t\t\tif (consequent_effect) {\n\t\t\t\tpause_effect(consequent_effect, () => {\n\t\t\t\t\tconsequent_effect = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\t};\n\n\tblock(() => {\n\t\thas_branch = false;\n\t\tfn(set_branch);\n\t\tif (!has_branch) {\n\t\t\tupdate_branch(null, null);\n\t\t}\n\t}, flags);\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n","import { DEV } from 'esm-env';\nimport { hydrating } from '../hydration.js';\nimport { get_descriptors, get_prototype_of } from '../../../shared/utils.js';\nimport { create_event, delegate } from './events.js';\nimport { add_form_reset_listener, autofocus } from './misc.js';\nimport * as w from '../../warnings.js';\nimport { LOADING_ATTR_SYMBOL } from '../../constants.js';\nimport { queue_idle_task } from '../task.js';\nimport { is_capture_event, is_delegated, normalize_attribute } from '../../../../utils.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\n\n/**\n * The value/checked attribute in the template actually corresponds to the defaultValue property, so we need\n * to remove it upon hydration to avoid a bug when someone resets the form value.\n * @param {HTMLInputElement} input\n * @returns {void}\n */\nexport function remove_input_defaults(input) {\n\tif (!hydrating) return;\n\n\tvar already_removed = false;\n\n\t// We try and remove the default attributes later, rather than sync during hydration.\n\t// Doing it sync during hydration has a negative impact on performance, but deferring the\n\t// work in an idle task alleviates this greatly. If a form reset event comes in before\n\t// the idle callback, then we ensure the input defaults are cleared just before.\n\tvar remove_defaults = () => {\n\t\tif (already_removed) return;\n\t\talready_removed = true;\n\n\t\t// Remove the attributes but preserve the values\n\t\tif (input.hasAttribute('value')) {\n\t\t\tvar value = input.value;\n\t\t\tset_attribute(input, 'value', null);\n\t\t\tinput.value = value;\n\t\t}\n\n\t\tif (input.hasAttribute('checked')) {\n\t\t\tvar checked = input.checked;\n\t\t\tset_attribute(input, 'checked', null);\n\t\t\tinput.checked = checked;\n\t\t}\n\t};\n\n\t// @ts-expect-error\n\tinput.__on_r = remove_defaults;\n\tqueue_idle_task(remove_defaults);\n\tadd_form_reset_listener();\n}\n\n/**\n * @param {Element} element\n * @param {any} value\n */\nexport function set_value(element, value) {\n\t// @ts-expect-error\n\tvar attributes = (element.__attributes ??= {});\n\n\tif (\n\t\tattributes.value ===\n\t\t\t(attributes.value =\n\t\t\t\t// treat null and undefined the same for the initial value\n\t\t\t\tvalue ?? undefined) ||\n\t\t// @ts-expect-error\n\t\t// `progress` elements always need their value set when its `0`\n\t\t(element.value === value && (value !== 0 || element.nodeName !== 'PROGRESS'))\n\t) {\n\t\treturn;\n\t}\n\n\t// @ts-expect-error\n\telement.value = value;\n}\n\n/**\n * @param {Element} element\n * @param {boolean} checked\n */\nexport function set_checked(element, checked) {\n\t// @ts-expect-error\n\tvar attributes = (element.__attributes ??= {});\n\n\tif (\n\t\tattributes.checked ===\n\t\t(attributes.checked =\n\t\t\t// treat null and undefined the same for the initial value\n\t\t\tchecked ?? undefined)\n\t) {\n\t\treturn;\n\t}\n\n\t// @ts-expect-error\n\telement.checked = checked;\n}\n\n/**\n * Sets the `selected` attribute on an `option` element.\n * Not set through the property because that doesn't reflect to the DOM,\n * which means it wouldn't be taken into account when a form is reset.\n * @param {HTMLOptionElement} element\n * @param {boolean} selected\n */\nexport function set_selected(element, selected) {\n\tif (selected) {\n\t\t// The selected option could've changed via user selection, and\n\t\t// setting the value without this check would set it back.\n\t\tif (!element.hasAttribute('selected')) {\n\t\t\telement.setAttribute('selected', '');\n\t\t}\n\t} else {\n\t\telement.removeAttribute('selected');\n\t}\n}\n\n/**\n * Applies the default checked property without influencing the current checked property.\n * @param {HTMLInputElement} element\n * @param {boolean} checked\n */\nexport function set_default_checked(element, checked) {\n\tconst existing_value = element.checked;\n\telement.defaultChecked = checked;\n\telement.checked = existing_value;\n}\n\n/**\n * Applies the default value property without influencing the current value property.\n * @param {HTMLInputElement | HTMLTextAreaElement} element\n * @param {string} value\n */\nexport function set_default_value(element, value) {\n\tconst existing_value = element.value;\n\telement.defaultValue = value;\n\telement.value = existing_value;\n}\n\n/**\n * @param {Element} element\n * @param {string} attribute\n * @param {string | null} value\n * @param {boolean} [skip_warning]\n */\nexport function set_attribute(element, attribute, value, skip_warning) {\n\t// @ts-expect-error\n\tvar attributes = (element.__attributes ??= {});\n\n\tif (hydrating) {\n\t\tattributes[attribute] = element.getAttribute(attribute);\n\n\t\tif (\n\t\t\tattribute === 'src' ||\n\t\t\tattribute === 'srcset' ||\n\t\t\t(attribute === 'href' && element.nodeName === 'LINK')\n\t\t) {\n\t\t\tif (!skip_warning) {\n\t\t\t\tcheck_src_in_dev_hydration(element, attribute, value ?? '');\n\t\t\t}\n\n\t\t\t// If we reset these attributes, they would result in another network request, which we want to avoid.\n\t\t\t// We assume they are the same between client and server as checking if they are equal is expensive\n\t\t\t// (we can't just compare the strings as they can be different between client and server but result in the\n\t\t\t// same url, so we would need to create hidden anchor elements to compare them)\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (attributes[attribute] === (attributes[attribute] = value)) return;\n\n\tif (attribute === 'style' && '__styles' in element) {\n\t\t// reset styles to force style: directive to update\n\t\telement.__styles = {};\n\t}\n\n\tif (attribute === 'loading') {\n\t\t// @ts-expect-error\n\t\telement[LOADING_ATTR_SYMBOL] = value;\n\t}\n\n\tif (value == null) {\n\t\telement.removeAttribute(attribute);\n\t} else if (typeof value !== 'string' && get_setters(element).includes(attribute)) {\n\t\t// @ts-ignore\n\t\telement[attribute] = value;\n\t} else {\n\t\telement.setAttribute(attribute, value);\n\t}\n}\n\n/**\n * @param {Element} dom\n * @param {string} attribute\n * @param {string} value\n */\nexport function set_xlink_attribute(dom, attribute, value) {\n\tdom.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @param {string} prop\n * @param {any} value\n */\nexport function set_custom_element_data(node, prop, value) {\n\t// We need to ensure that setting custom element props, which can\n\t// invoke lifecycle methods on other custom elements, does not also\n\t// associate those lifecycle methods with the current active reaction\n\t// or effect\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\ttry {\n\t\tif (\n\t\t\t// Don't compute setters for custom elements while they aren't registered yet,\n\t\t\t// because during their upgrade/instantiation they might add more setters.\n\t\t\t// Instead, fall back to a simple \"an object, then set as property\" heuristic.\n\t\t\tsetters_cache.has(node.nodeName) || customElements.get(node.tagName.toLowerCase())\n\t\t\t\t? get_setters(node).includes(prop)\n\t\t\t\t: value && typeof value === 'object'\n\t\t) {\n\t\t\t// @ts-expect-error\n\t\t\tnode[prop] = value;\n\t\t} else {\n\t\t\t// We did getters etc checks already, stringify before passing to set_attribute\n\t\t\t// to ensure it doesn't invoke the same logic again, and potentially populating\n\t\t\t// the setters cache too early.\n\t\t\tset_attribute(node, prop, value == null ? value : String(value));\n\t\t}\n\t} finally {\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * Spreads attributes onto a DOM element, taking into account the currently set attributes\n * @param {Element & ElementCSSInlineStyle} element\n * @param {Record<string, any> | undefined} prev\n * @param {Record<string, any>} next New attributes - this function mutates this object\n * @param {string} [css_hash]\n * @param {boolean} [preserve_attribute_case]\n * @param {boolean} [is_custom_element]\n * @param {boolean} [skip_warning]\n * @returns {Record<string, any>}\n */\nexport function set_attributes(\n\telement,\n\tprev,\n\tnext,\n\tcss_hash,\n\tpreserve_attribute_case = false,\n\tis_custom_element = false,\n\tskip_warning = false\n) {\n\tvar current = prev || {};\n\tvar is_option_element = element.tagName === 'OPTION';\n\n\tfor (var key in prev) {\n\t\tif (!(key in next)) {\n\t\t\tnext[key] = null;\n\t\t}\n\t}\n\n\tif (css_hash !== undefined) {\n\t\tnext.class = next.class ? next.class + ' ' + css_hash : css_hash;\n\t}\n\n\tvar setters = get_setters(element);\n\n\t// @ts-expect-error\n\tvar attributes = /** @type {Record<string, unknown>} **/ (element.__attributes ??= {});\n\n\t// since key is captured we use const\n\tfor (const key in next) {\n\t\t// let instead of var because referenced in a closure\n\t\tlet value = next[key];\n\n\t\t// Up here because we want to do this for the initial value, too, even if it's undefined,\n\t\t// and this wouldn't be reached in case of undefined because of the equality check below\n\t\tif (is_option_element && key === 'value' && value == null) {\n\t\t\t// The <option> element is a special case because removing the value attribute means\n\t\t\t// the value is set to the text content of the option element, and setting the value\n\t\t\t// to null or undefined means the value is set to the string \"null\" or \"undefined\".\n\t\t\t// To align with how we handle this case in non-spread-scenarios, this logic is needed.\n\t\t\t// There's a super-edge-case bug here that is left in in favor of smaller code size:\n\t\t\t// Because of the \"set missing props to null\" logic above, we can't differentiate\n\t\t\t// between a missing value and an explicitly set value of null or undefined. That means\n\t\t\t// that once set, the value attribute of an <option> element can't be removed. This is\n\t\t\t// a very rare edge case, and removing the attribute altogether isn't possible either\n\t\t\t// for the <option value={undefined}> case, so we're not losing any functionality here.\n\t\t\t// @ts-ignore\n\t\t\telement.value = element.__value = '';\n\t\t\tcurrent[key] = value;\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar prev_value = current[key];\n\t\tif (value === prev_value) continue;\n\n\t\tcurrent[key] = value;\n\n\t\tvar prefix = key[0] + key[1]; // this is faster than key.slice(0, 2)\n\t\tif (prefix === '$$') continue;\n\n\t\tif (prefix === 'on') {\n\t\t\t/** @type {{ capture?: true }} */\n\t\t\tconst opts = {};\n\t\t\tconst event_handle_key = '$$' + key;\n\t\t\tlet event_name = key.slice(2);\n\t\t\tvar delegated = is_delegated(event_name);\n\n\t\t\tif (is_capture_event(event_name)) {\n\t\t\t\tevent_name = event_name.slice(0, -7);\n\t\t\t\topts.capture = true;\n\t\t\t}\n\n\t\t\tif (!delegated && prev_value) {\n\t\t\t\t// Listening to same event but different handler -> our handle function below takes care of this\n\t\t\t\t// If we were to remove and add listeners in this case, it could happen that the event is \"swallowed\"\n\t\t\t\t// (the browser seems to not know yet that a new one exists now) and doesn't reach the handler\n\t\t\t\t// https://github.com/sveltejs/svelte/issues/11903\n\t\t\t\tif (value != null) continue;\n\n\t\t\t\telement.removeEventListener(event_name, current[event_handle_key], opts);\n\t\t\t\tcurrent[event_handle_key] = null;\n\t\t\t}\n\n\t\t\tif (value != null) {\n\t\t\t\tif (!delegated) {\n\t\t\t\t\t/**\n\t\t\t\t\t * @this {any}\n\t\t\t\t\t * @param {Event} evt\n\t\t\t\t\t */\n\t\t\t\t\tfunction handle(evt) {\n\t\t\t\t\t\tcurrent[key].call(this, evt);\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent[event_handle_key] = create_event(event_name, element, handle, opts);\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\telement[`__${event_name}`] = value;\n\t\t\t\t\tdelegate([event_name]);\n\t\t\t\t}\n\t\t\t} else if (delegated) {\n\t\t\t\t// @ts-ignore\n\t\t\t\telement[`__${event_name}`] = undefined;\n\t\t\t}\n\t\t} else if (key === 'style' && value != null) {\n\t\t\telement.style.cssText = value + '';\n\t\t} else if (key === 'autofocus') {\n\t\t\tautofocus(/** @type {HTMLElement} */ (element), Boolean(value));\n\t\t} else if (key === '__value' || (key === 'value' && value != null)) {\n\t\t\t// @ts-ignore\n\t\t\telement.value = element[key] = element.__value = value;\n\t\t} else if (key === 'selected' && is_option_element) {\n\t\t\tset_selected(/** @type {HTMLOptionElement} */ (element), value);\n\t\t} else {\n\t\t\tvar name = key;\n\t\t\tif (!preserve_attribute_case) {\n\t\t\t\tname = normalize_attribute(name);\n\t\t\t}\n\n\t\t\tvar is_default = name === 'defaultValue' || name === 'defaultChecked';\n\n\t\t\tif (value == null && !is_custom_element && !is_default) {\n\t\t\t\tattributes[key] = null;\n\n\t\t\t\tif (name === 'value' || name === 'checked') {\n\t\t\t\t\t// removing value/checked also removes defaultValue/defaultChecked — preserve\n\t\t\t\t\tlet input = /** @type {HTMLInputElement} */ (element);\n\n\t\t\t\t\tif (name === 'value') {\n\t\t\t\t\t\tlet prev = input.defaultValue;\n\t\t\t\t\t\tinput.removeAttribute(name);\n\t\t\t\t\t\tinput.defaultValue = prev;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet prev = input.defaultChecked;\n\t\t\t\t\t\tinput.removeAttribute(name);\n\t\t\t\t\t\tinput.defaultChecked = prev;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\telement.removeAttribute(key);\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tis_default ||\n\t\t\t\t(setters.includes(name) && (is_custom_element || typeof value !== 'string'))\n\t\t\t) {\n\t\t\t\t// @ts-ignore\n\t\t\t\telement[name] = value;\n\t\t\t} else if (typeof value !== 'function') {\n\t\t\t\tif (hydrating && (name === 'src' || name === 'href' || name === 'srcset')) {\n\t\t\t\t\tif (!skip_warning) check_src_in_dev_hydration(element, name, value ?? '');\n\t\t\t\t} else {\n\t\t\t\t\tset_attribute(element, name, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (key === 'style' && '__styles' in element) {\n\t\t\t// reset styles to force style: directive to update\n\t\t\telement.__styles = {};\n\t\t}\n\t}\n\n\treturn current;\n}\n\n/** @type {Map<string, string[]>} */\nvar setters_cache = new Map();\n\n/** @param {Element} element */\nfunction get_setters(element) {\n\tvar setters = setters_cache.get(element.nodeName);\n\tif (setters) return setters;\n\tsetters_cache.set(element.nodeName, (setters = []));\n\n\tvar descriptors;\n\tvar proto = element; // In the case of custom elements there might be setters on the instance\n\tvar element_proto = Element.prototype;\n\n\t// Stop at Element, from there on there's only unnecessary setters we're not interested in\n\t// Do not use contructor.name here as that's unreliable in some browser environments\n\twhile (element_proto !== proto) {\n\t\tdescriptors = get_descriptors(proto);\n\n\t\tfor (var key in descriptors) {\n\t\t\tif (descriptors[key].set) {\n\t\t\t\tsetters.push(key);\n\t\t\t}\n\t\t}\n\n\t\tproto = get_prototype_of(proto);\n\t}\n\n\treturn setters;\n}\n\n/**\n * @param {any} element\n * @param {string} attribute\n * @param {string} value\n */\nfunction check_src_in_dev_hydration(element, attribute, value) {\n\tif (!DEV) return;\n\tif (attribute === 'srcset' && srcset_url_equal(element, value)) return;\n\tif (src_url_equal(element.getAttribute(attribute) ?? '', value)) return;\n\n\tw.hydration_attribute_changed(\n\t\tattribute,\n\t\telement.outerHTML.replace(element.innerHTML, element.innerHTML && '...'),\n\t\tString(value)\n\t);\n}\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nfunction src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\treturn new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element\n * @param {string} srcset\n * @returns {boolean}\n */\nfunction srcset_url_equal(element, srcset) {\n\tvar element_urls = split_srcset(element.srcset);\n\tvar urls = split_srcset(srcset);\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/**\n * @param {HTMLImageElement} element\n * @returns {void}\n */\nexport function handle_lazy_img(element) {\n\t// If we're using an image that has a lazy loading attribute, we need to apply\n\t// the loading and src after the img element has been appended to the document.\n\t// Otherwise the lazy behaviour will not work due to our cloneNode heuristic for\n\t// templates.\n\tif (!hydrating && element.loading === 'lazy') {\n\t\tvar src = element.src;\n\t\t// @ts-expect-error\n\t\telement[LOADING_ATTR_SYMBOL] = null;\n\t\telement.loading = 'eager';\n\t\telement.removeAttribute('src');\n\t\trequestAnimationFrame(() => {\n\t\t\t// @ts-expect-error\n\t\t\tif (element[LOADING_ATTR_SYMBOL] !== 'eager') {\n\t\t\t\telement.loading = 'lazy';\n\t\t\t}\n\t\t\telement.src = src;\n\t\t});\n\t}\n}\n","import { STATE_SYMBOL } from '../../../constants.js';\nimport { effect, render_effect } from '../../../reactivity/effects.js';\nimport { untrack } from '../../../runtime.js';\nimport { queue_micro_task } from '../../task.js';\n\n/**\n * @param {any} bound_value\n * @param {Element} element_or_component\n * @returns {boolean}\n */\nfunction is_bound_this(bound_value, element_or_component) {\n\treturn (\n\t\tbound_value === element_or_component || bound_value?.[STATE_SYMBOL] === element_or_component\n\t);\n}\n\n/**\n * @param {any} element_or_component\n * @param {(value: unknown, ...parts: unknown[]) => void} update\n * @param {(...parts: unknown[]) => unknown} get_value\n * @param {() => unknown[]} [get_parts] Set if the this binding is used inside an each block,\n * \t\t\t\t\t\t\t\t\t\treturns all the parts of the each block context that are used in the expression\n * @returns {void}\n */\nexport function bind_this(element_or_component = {}, update, get_value, get_parts) {\n\teffect(() => {\n\t\t/** @type {unknown[]} */\n\t\tvar old_parts;\n\n\t\t/** @type {unknown[]} */\n\t\tvar parts;\n\n\t\trender_effect(() => {\n\t\t\told_parts = parts;\n\t\t\t// We only track changes to the parts, not the value itself to avoid unnecessary reruns.\n\t\t\tparts = get_parts?.() || [];\n\n\t\t\tuntrack(() => {\n\t\t\t\tif (element_or_component !== get_value(...parts)) {\n\t\t\t\t\tupdate(element_or_component, ...parts);\n\t\t\t\t\t// If this is an effect rerun (cause: each block context changes), then nullfiy the binding at\n\t\t\t\t\t// the previous position if it isn't already taken over by a different effect.\n\t\t\t\t\tif (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) {\n\t\t\t\t\t\tupdate(null, ...old_parts);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\t// We cannot use effects in the teardown phase, we we use a microtask instead.\n\t\t\tqueue_micro_task(() => {\n\t\t\t\tif (parts && is_bound_this(get_value(...parts), element_or_component)) {\n\t\t\t\t\tupdate(null, ...parts);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t});\n\n\treturn element_or_component;\n}\n","/** @import { ComponentContext, ComponentContextLegacy } from '#client' */\n/** @import { EventDispatcher } from './index.js' */\n/** @import { NotFunction } from './internal/types.js' */\nimport { component_context, flush_sync, untrack } from './internal/client/runtime.js';\nimport { is_array } from './internal/shared/utils.js';\nimport { user_effect } from './internal/client/index.js';\nimport * as e from './internal/client/errors.js';\nimport { lifecycle_outside_component } from './internal/shared/errors.js';\nimport { legacy_mode_flag } from './internal/flags/index.js';\n\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.\n *\n * `onMount` does not run inside [server-side components](https://svelte.dev/docs/svelte/svelte-server#render).\n *\n * @template T\n * @param {() => NotFunction<T> | Promise<NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onMount');\n\t}\n\n\tif (legacy_mode_flag && component_context.l !== null) {\n\t\tinit_update_callbacks(component_context).m.push(fn);\n\t} else {\n\t\tuser_effect(() => {\n\t\t\tconst cleanup = untrack(fn);\n\t\t\tif (typeof cleanup === 'function') return /** @type {() => void} */ (cleanup);\n\t\t});\n\t}\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('onDestroy');\n\t}\n\n\tonMount(() => () => untrack(fn));\n}\n\n/**\n * @template [T=any]\n * @param {string} type\n * @param {T} [detail]\n * @param {any}params_0\n * @returns {CustomEvent<T>}\n */\nfunction create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: never; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)\n * @template {Record<string, any>} [EventMap = any]\n * @returns {EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\tlifecycle_outside_component('createEventDispatcher');\n\t}\n\n\treturn (type, detail, options) => {\n\t\tconst events = /** @type {Record<string, Function | Function[]>} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {any} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = create_custom_event(/** @type {string} */ (type), detail, options);\n\t\t\tfor (const fn of callbacks) {\n\t\t\t\tfn.call(active_component_context.x, event);\n\t\t\t}\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n// TODO mark beforeUpdate and afterUpdate as deprecated in Svelte 6\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`.\n *\n * In runes mode use `$effect.pre` instead.\n *\n * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('beforeUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('beforeUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).b.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`.\n *\n * In runes mode use `$effect` instead.\n *\n * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead\n * @param {() => void} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tif (component_context === null) {\n\t\tlifecycle_outside_component('afterUpdate');\n\t}\n\n\tif (component_context.l === null) {\n\t\te.lifecycle_legacy_only('afterUpdate');\n\t}\n\n\tinit_update_callbacks(component_context).a.push(fn);\n}\n\n/**\n * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate\n * @param {ComponentContext} context\n */\nfunction init_update_callbacks(context) {\n\tvar l = /** @type {ComponentContextLegacy} */ (context).l;\n\treturn (l.u ??= { a: [], b: [], m: [] });\n}\n\n/**\n * Synchronously flushes any pending state changes and those that result from it.\n * @param {() => void} [fn]\n * @returns {void}\n */\nexport function flushSync(fn) {\n\tflush_sync(fn);\n}\n\nexport { hydrate, mount, unmount } from './internal/client/render.js';\n\nexport {\n\tgetContext,\n\tgetAllContexts,\n\thasContext,\n\tsetContext,\n\ttick,\n\tuntrack\n} from './internal/client/runtime.js';\n\nexport { createRawSnippet } from './internal/client/dom/blocks/snippet.js';\n","/** @import { StoreReferencesContainer } from '#client' */\n/** @import { Store } from '#shared' */\nimport { subscribe_to_store } from '../../../store/utils.js';\nimport { noop } from '../../shared/utils.js';\nimport { get } from '../runtime.js';\nimport { teardown } from './effects.js';\nimport { mutable_source, set } from './sources.js';\n\n/**\n * Whether or not the prop currently being read is a store binding, as in\n * `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in\n * runes mode, and skip `binding_property_non_reactive` validation\n */\nlet is_store_binding = false;\n\n/**\n * Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy\n * signal that will be updated when the store is. The store references container is needed to\n * track reassignments to stores and to track the correct component context.\n * @template V\n * @param {Store<V> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n * @returns {V}\n */\nexport function store_get(store, store_name, stores) {\n\tconst entry = (stores[store_name] ??= {\n\t\tstore: null,\n\t\tsource: mutable_source(undefined),\n\t\tunsubscribe: noop\n\t});\n\n\tif (entry.store !== store) {\n\t\tentry.unsubscribe();\n\t\tentry.store = store ?? null;\n\n\t\tif (store == null) {\n\t\t\tentry.source.v = undefined; // see synchronous callback comment below\n\t\t\tentry.unsubscribe = noop;\n\t\t} else {\n\t\t\tvar is_synchronous_callback = true;\n\n\t\t\tentry.unsubscribe = subscribe_to_store(store, (v) => {\n\t\t\t\tif (is_synchronous_callback) {\n\t\t\t\t\t// If the first updates to the store value (possibly multiple of them) are synchronously\n\t\t\t\t\t// inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value\n\t\t\t\t\tentry.source.v = v;\n\t\t\t\t} else {\n\t\t\t\t\tset(entry.source, v);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tis_synchronous_callback = false;\n\t\t}\n\t}\n\n\treturn get(entry.source);\n}\n\n/**\n * Unsubscribe from a store if it's not the same as the one in the store references container.\n * We need this in addition to `store_get` because someone could unsubscribe from a store but\n * then never subscribe to the new one (if any), causing the subscription to stay open wrongfully.\n * @param {Store<any> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n */\nexport function store_unsub(store, store_name, stores) {\n\t/** @type {StoreReferencesContainer[''] | undefined} */\n\tlet entry = stores[store_name];\n\n\tif (entry && entry.store !== store) {\n\t\t// Don't reset store yet, so that store_get above can resubscribe to new store if necessary\n\t\tentry.unsubscribe();\n\t\tentry.unsubscribe = noop;\n\t}\n\n\treturn store;\n}\n\n/**\n * Sets the new value of a store and returns that value.\n * @template V\n * @param {Store<V>} store\n * @param {V} value\n * @returns {V}\n */\nexport function store_set(store, value) {\n\tstore.set(value);\n\treturn value;\n}\n\n/**\n * @param {StoreReferencesContainer} stores\n * @param {string} store_name\n */\nexport function invalidate_store(stores, store_name) {\n\tvar entry = stores[store_name];\n\tif (entry.store !== null) {\n\t\tstore_set(entry.store, entry.source.v);\n\t}\n}\n\n/**\n * Unsubscribes from all auto-subscribed stores on destroy\n * @returns {StoreReferencesContainer}\n */\nexport function setup_stores() {\n\t/** @type {StoreReferencesContainer} */\n\tconst stores = {};\n\n\tteardown(() => {\n\t\tfor (var store_name in stores) {\n\t\t\tconst ref = stores[store_name];\n\t\t\tref.unsubscribe();\n\t\t}\n\t});\n\n\treturn stores;\n}\n\n/**\n * Updates a store with a new value.\n * @param {Store<V>} store the store to update\n * @param {any} expression the expression that mutates the store\n * @param {V} new_value the new store value\n * @template V\n */\nexport function store_mutate(store, expression, new_value) {\n\tstore.set(new_value);\n\treturn expression;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store(store, store_value, d = 1) {\n\tstore.set(store_value + d);\n\treturn store_value;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_store(store, store_value, d = 1) {\n\tconst value = store_value + d;\n\tstore.set(value);\n\treturn value;\n}\n\n/**\n * Called inside prop getters to communicate that the prop is a store binding\n */\nexport function mark_store_binding() {\n\tis_store_binding = true;\n}\n\n/**\n * Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.\n * Used to prevent `binding_property_non_reactive` validation false positives and\n * ensure that these props are treated as mutable even in runes mode\n * @template T\n * @param {() => T} fn\n * @returns {[T, boolean]}\n */\nexport function capture_store_binding(fn) {\n\tvar previous_is_store_binding = is_store_binding;\n\n\ttry {\n\t\tis_store_binding = false;\n\t\treturn [fn(), is_store_binding];\n\t} finally {\n\t\tis_store_binding = previous_is_store_binding;\n\t}\n}\n","import { createClassComponent } from '../../../../legacy/legacy-client.js';\nimport { destroy_effect, effect_root, render_effect } from '../../reactivity/effects.js';\nimport { append } from '../template.js';\nimport { define_property, get_descriptor, object_keys } from '../../../shared/utils.js';\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n\n/** @type {any} */\nlet SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** @type {any} The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** @type {Record<string, any>} Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\t\t/** @type {any} The managed render effect for reflecting attributes */\n\t\t$$me;\n\n\t\t/**\n\t\t * @param {*} $$componentCtor\n\t\t * @param {*} $$slots\n\t\t * @param {*} use_shadow_dom\n\t\t */\n\t\tconstructor($$componentCtor, $$slots, use_shadow_dom) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\t\t\tif (use_shadow_dom) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @param {string} type\n\t\t * @param {EventListenerOrEventListenerObject} listener\n\t\t * @param {boolean | AddEventListenerOptions} [options]\n\t\t */\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\t/**\n\t\t * @param {string} type\n\t\t * @param {EventListenerOrEventListenerObject} listener\n\t\t * @param {boolean | AddEventListenerOptions} [options]\n\t\t */\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/** @param {string} name */\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\t/**\n\t\t\t\t\t * @param {Element} anchor\n\t\t\t\t\t */\n\t\t\t\t\treturn (anchor) => {\n\t\t\t\t\t\tconst slot = document.createElement('slot');\n\t\t\t\t\t\tif (name !== 'default') slot.name = name;\n\n\t\t\t\t\t\tappend(anchor, slot);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t/** @type {Record<string, any>} */\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\tif (name === 'default' && !this.$$d.children) {\n\t\t\t\t\t\t\tthis.$$d.children = create_slot(name);\n\t\t\t\t\t\t\t$$slots.default = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$$slots[name] = create_slot(name);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = createClassComponent({\n\t\t\t\t\tcomponent: this.$$ctor,\n\t\t\t\t\ttarget: this.shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$host: this\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tthis.$$me = effect_root(() => {\n\t\t\t\t\trender_effect(() => {\n\t\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\t\tfor (const key of object_keys(this.$$c)) {\n\t\t\t\t\t\t\tif (!this.$$p_d[key]?.reflect) continue;\n\t\t\t\t\t\t\tthis.$$d[key] = this.$$c[key];\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$$r = false;\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\n\t\t/**\n\t\t * @param {string} attr\n\t\t * @param {string} _oldValue\n\t\t * @param {string} newValue\n\t\t */\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn && this.$$c) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$me();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * @param {string} attribute_name\n\t\t */\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tobject_keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @param {HTMLElement} element\n */\nfunction get_custom_elements_slots(element) {\n\t/** @type {Record<string, true>} */\n\tconst result = {};\n\telement.childNodes.forEach((node) => {\n\t\tresult[/** @type {Element} node */ (node).slot || 'default'] = true;\n\t});\n\treturn result;\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {any} Component A Svelte component function\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} exports Explicitly exported values, other than props\n * @param {boolean} use_shadow_dom Whether to use shadow DOM\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\texports,\n\tuse_shadow_dom,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, use_shadow_dom);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn object_keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tobject_keys(props_definition).forEach((prop) => {\n\t\tdefine_property(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tvar component = this.$$c;\n\n\t\t\t\tif (component) {\n\t\t\t\t\t// // If the instance has an accessor, use that instead\n\t\t\t\t\tvar setter = get_descriptor(component, prop)?.get;\n\n\t\t\t\t\tif (setter) {\n\t\t\t\t\t\tcomponent[prop] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcomponent.$set({ [prop]: value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\texports.forEach((property) => {\n\t\tdefine_property(Class.prototype, property, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[property];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ Class;\n\treturn Class;\n}\n","/** @import { Source } from './types.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tPROPS_IS_BINDABLE,\n\tPROPS_IS_IMMUTABLE,\n\tPROPS_IS_LAZY_INITIAL,\n\tPROPS_IS_RUNES,\n\tPROPS_IS_UPDATED\n} from '../../../constants.js';\nimport { get_descriptor, is_function } from '../../shared/utils.js';\nimport { mutable_source, set, source } from './sources.js';\nimport { derived, derived_safe_equal } from './deriveds.js';\nimport {\n\tactive_effect,\n\tget,\n\tcaptured_signals,\n\tset_active_effect,\n\tuntrack,\n\tupdate\n} from '../runtime.js';\nimport { safe_equals } from './equality.js';\nimport * as e from '../errors.js';\nimport {\n\tBRANCH_EFFECT,\n\tLEGACY_DERIVED_PROP,\n\tLEGACY_PROPS,\n\tROOT_EFFECT,\n\tSTATE_SYMBOL\n} from '../constants.js';\nimport { proxy } from '../proxy.js';\nimport { capture_store_binding } from './store.js';\nimport { legacy_mode_flag } from '../../flags/index.js';\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_prop(fn, d = 1) {\n\tconst value = fn();\n\tfn(value + d);\n\treturn value;\n}\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_prop(fn, d = 1) {\n\tconst value = fn() + d;\n\tfn(value);\n\treturn value;\n}\n\n/**\n * The proxy handler for rest props (i.e. `const { x, ...rest } = $props()`).\n * Is passed the full `$$props` object and excludes the named props.\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}\n */\nconst rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\treturn target.props[key];\n\t},\n\tset(target, key) {\n\t\tif (DEV) {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.props_rest_readonly(`${target.name}.${String(key)}`);\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @param {string} [name]\n * @returns {Record<string, unknown>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function rest_props(props, exclude, name) {\n\treturn new Proxy(\n\t\tDEV ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude },\n\t\trest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for legacy $$restProps and $$props\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, special: Record<string | symbol, (v?: unknown) => unknown>, version: Source<number> }>}}\n */\nconst legacy_rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tget(target.version);\n\t\treturn key in target.special ? target.special[key]() : target.props[key];\n\t},\n\tset(target, key, value) {\n\t\tif (!(key in target.special)) {\n\t\t\t// Handle props that can temporarily get out of sync with the parent\n\t\t\t/** @type {Record<string, (v?: unknown) => unknown>} */\n\t\t\ttarget.special[key] = prop(\n\t\t\t\t{\n\t\t\t\t\tget [key]() {\n\t\t\t\t\t\treturn target.props[key];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t/** @type {string} */ (key),\n\t\t\t\tPROPS_IS_UPDATED\n\t\t\t);\n\t\t}\n\n\t\ttarget.special[key](value);\n\t\tupdate(target.version); // $$props is coarse-grained: when $$props.x is updated, usages of $$props.y etc are also rerun\n\t\treturn true;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\tdeleteProperty(target, key) {\n\t\t// Svelte 4 allowed for deletions on $$restProps\n\t\tif (target.exclude.includes(key)) return true;\n\t\ttarget.exclude.push(key);\n\t\tupdate(target.version);\n\t\treturn true;\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @returns {Record<string, unknown>}\n */\nexport function legacy_rest_props(props, exclude) {\n\treturn new Proxy({ props, exclude, special: {}, version: source(0) }, legacy_rest_props_handler);\n}\n\n/**\n * The proxy handler for spread props. Handles the incoming array of props\n * that looks like `() => { dynamic: props }, { static: prop }, ..` and wraps\n * them so that the whole thing is passed to the component as the `$$props` argument.\n * @template {Record<string | symbol, unknown>} T\n * @type {ProxyHandler<{ props: Array<T | (() => T)> }>}}\n */\nconst spread_props_handler = {\n\tget(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) return p[key];\n\t\t}\n\t},\n\tset(target, key, value) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tconst desc = get_descriptor(p, key);\n\t\t\tif (desc && desc.set) {\n\t\t\t\tdesc.set(value);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) {\n\t\t\t\tconst descriptor = get_descriptor(p, key);\n\t\t\t\tif (descriptor && !descriptor.configurable) {\n\t\t\t\t\t// Prevent a \"Non-configurability Report Error\": The target is an array, it does\n\t\t\t\t\t// not actually contain this property. If it is now described as non-configurable,\n\t\t\t\t\t// the proxy throws a validation error. Setting it to true avoids that.\n\t\t\t\t\tdescriptor.configurable = true;\n\t\t\t\t}\n\t\t\t\treturn descriptor;\n\t\t\t}\n\t\t}\n\t},\n\thas(target, key) {\n\t\t// To prevent a false positive `is_entry_props` in the `prop` function\n\t\tif (key === STATE_SYMBOL || key === LEGACY_PROPS) return false;\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (p != null && key in p) return true;\n\t\t}\n\n\t\treturn false;\n\t},\n\townKeys(target) {\n\t\t/** @type {Array<string | symbol>} */\n\t\tconst keys = [];\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tfor (const key in p) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\t\t}\n\n\t\treturn keys;\n\t}\n};\n\n/**\n * @param {Array<Record<string, unknown> | (() => Record<string, unknown>)>} props\n * @returns {any}\n */\nexport function spread_props(...props) {\n\treturn new Proxy({ props }, spread_props_handler);\n}\n\n/**\n * @template T\n * @param {() => T} fn\n * @returns {T}\n */\nfunction with_parent_branch(fn) {\n\tvar effect = active_effect;\n\tvar previous_effect = active_effect;\n\n\twhile (effect !== null && (effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) {\n\t\teffect = effect.parent;\n\t}\n\ttry {\n\t\tset_active_effect(effect);\n\t\treturn fn();\n\t} finally {\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * This function is responsible for synchronizing a possibly bound prop with the inner component state.\n * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.\n * @template V\n * @param {Record<string, unknown>} props\n * @param {string} key\n * @param {number} flags\n * @param {V | (() => V)} [fallback]\n * @returns {(() => V | ((arg: V) => V) | ((arg: V, mutation: boolean) => V))}\n */\nexport function prop(props, key, flags, fallback) {\n\tvar immutable = (flags & PROPS_IS_IMMUTABLE) !== 0;\n\tvar runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;\n\tvar bindable = (flags & PROPS_IS_BINDABLE) !== 0;\n\tvar lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;\n\tvar is_store_sub = false;\n\tvar prop_value;\n\n\tif (bindable) {\n\t\t[prop_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));\n\t} else {\n\t\tprop_value = /** @type {V} */ (props[key]);\n\t}\n\n\t// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`\n\t// or `createClassComponent(Component, props)`\n\tvar is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;\n\n\tvar setter =\n\t\tget_descriptor(props, key)?.set ??\n\t\t(is_entry_props && bindable && key in props ? (v) => (props[key] = v) : undefined);\n\n\tvar fallback_value = /** @type {V} */ (fallback);\n\tvar fallback_dirty = true;\n\tvar fallback_used = false;\n\n\tvar get_fallback = () => {\n\t\tfallback_used = true;\n\t\tif (fallback_dirty) {\n\t\t\tfallback_dirty = false;\n\t\t\tif (lazy) {\n\t\t\t\tfallback_value = untrack(/** @type {() => V} */ (fallback));\n\t\t\t} else {\n\t\t\t\tfallback_value = /** @type {V} */ (fallback);\n\t\t\t}\n\t\t}\n\n\t\treturn fallback_value;\n\t};\n\n\tif (prop_value === undefined && fallback !== undefined) {\n\t\tif (setter && runes) {\n\t\t\te.props_invalid_value(key);\n\t\t}\n\n\t\tprop_value = get_fallback();\n\t\tif (setter) setter(prop_value);\n\t}\n\n\t/** @type {() => V} */\n\tvar getter;\n\tif (runes) {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\t\t\tif (value === undefined) return get_fallback();\n\t\t\tfallback_dirty = true;\n\t\t\tfallback_used = false;\n\t\t\treturn value;\n\t\t};\n\t} else {\n\t\t// Svelte 4 did not trigger updates when a primitive value was updated to the same value.\n\t\t// Replicate that behavior through using a derived\n\t\tvar derived_getter = with_parent_branch(() =>\n\t\t\t(immutable ? derived : derived_safe_equal)(() => /** @type {V} */ (props[key]))\n\t\t);\n\t\tderived_getter.f |= LEGACY_DERIVED_PROP;\n\t\tgetter = () => {\n\t\t\tvar value = get(derived_getter);\n\t\t\tif (value !== undefined) fallback_value = /** @type {V} */ (undefined);\n\t\t\treturn value === undefined ? fallback_value : value;\n\t\t};\n\t}\n\n\t// easy mode — prop is never written to\n\tif ((flags & PROPS_IS_UPDATED) === 0) {\n\t\treturn getter;\n\t}\n\n\t// intermediate mode — prop is written to, but the parent component had\n\t// `bind:foo` which means we can just call `$$props.foo = value` directly\n\tif (setter) {\n\t\tvar legacy_parent = props.$$legacy;\n\t\treturn function (/** @type {any} */ value, /** @type {boolean} */ mutation) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\t// We don't want to notify if the value was mutated and the parent is in runes mode.\n\t\t\t\t// In that case the state proxy (if it exists) should take care of the notification.\n\t\t\t\t// If the parent is not in runes mode, we need to notify on mutation, too, that the prop\n\t\t\t\t// has changed because the parent will not be able to detect the change otherwise.\n\t\t\t\tif (!runes || !mutation || legacy_parent || is_store_sub) {\n\t\t\t\t\t/** @type {Function} */ (setter)(mutation ? getter() : value);\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t} else {\n\t\t\t\treturn getter();\n\t\t\t}\n\t\t};\n\t}\n\n\t// hard mode. this is where it gets ugly — the value in the child should\n\t// synchronize with the parent, but it should also be possible to temporarily\n\t// set the value to something else locally.\n\tvar from_child = false;\n\tvar was_from_child = false;\n\n\t// The derived returns the current value. The underlying mutable\n\t// source is written to from various places to persist this value.\n\tvar inner_current_value = mutable_source(prop_value);\n\tvar current_value = with_parent_branch(() =>\n\t\tderived(() => {\n\t\t\tvar parent_value = getter();\n\t\t\tvar child_value = get(inner_current_value);\n\n\t\t\tif (from_child) {\n\t\t\t\tfrom_child = false;\n\t\t\t\twas_from_child = true;\n\t\t\t\treturn child_value;\n\t\t\t}\n\n\t\t\twas_from_child = false;\n\t\t\treturn (inner_current_value.v = parent_value);\n\t\t})\n\t);\n\n\tif (!immutable) current_value.equals = safe_equals;\n\n\treturn function (/** @type {any} */ value, /** @type {boolean} */ mutation) {\n\t\t// legacy nonsense — need to ensure the source is invalidated when necessary\n\t\t// also needed for when handling inspect logic so we can inspect the correct source signal\n\t\tif (captured_signals !== null) {\n\t\t\t// set this so that we don't reset to the parent value if `d`\n\t\t\t// is invalidated because of `invalidate_inner_signals` (rather\n\t\t\t// than because the parent or child value changed)\n\t\t\tfrom_child = was_from_child;\n\t\t\t// invoke getters so that signals are picked up by `invalidate_inner_signals`\n\t\t\tgetter();\n\t\t\tget(inner_current_value);\n\t\t}\n\n\t\tif (arguments.length > 0) {\n\t\t\tconst new_value = mutation ? get(current_value) : runes && bindable ? proxy(value) : value;\n\n\t\t\tif (!current_value.equals(new_value)) {\n\t\t\t\tfrom_child = true;\n\t\t\t\tset(inner_current_value, new_value);\n\t\t\t\t// To ensure the fallback value is consistent when used with proxies, we\n\t\t\t\t// update the local fallback_value, but only if the fallback is actively used\n\t\t\t\tif (fallback_used && fallback_value !== undefined) {\n\t\t\t\t\tfallback_value = new_value;\n\t\t\t\t}\n\t\t\t\tuntrack(() => get(current_value)); // force a synchronisation immediately\n\t\t\t}\n\n\t\t\treturn value;\n\t\t}\n\t\treturn get(current_value);\n\t};\n}\n","import { dev_current_component_function } from './runtime.js';\nimport { get_descriptor, is_array } from '../shared/utils.js';\nimport * as e from './errors.js';\nimport { FILENAME } from '../../constants.js';\nimport { render_effect } from './reactivity/effects.js';\nimport * as w from './warnings.js';\nimport { capture_store_binding } from './reactivity/store.js';\n\n/**\n * @param {() => any} collection\n * @param {(item: any, index: number) => string} key_fn\n * @returns {void}\n */\nexport function validate_each_keys(collection, key_fn) {\n\trender_effect(() => {\n\t\tconst keys = new Map();\n\t\tconst maybe_array = collection();\n\t\tconst array = is_array(maybe_array)\n\t\t\t? maybe_array\n\t\t\t: maybe_array == null\n\t\t\t\t? []\n\t\t\t\t: Array.from(maybe_array);\n\t\tconst length = array.length;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tconst key = key_fn(array[i], i);\n\t\t\tif (keys.has(key)) {\n\t\t\t\tconst a = String(keys.get(key));\n\t\t\t\tconst b = String(i);\n\n\t\t\t\t/** @type {string | null} */\n\t\t\t\tlet k = String(key);\n\t\t\t\tif (k.startsWith('[object ')) k = null;\n\n\t\t\t\te.each_key_duplicate(a, b, k);\n\t\t\t}\n\t\t\tkeys.set(key, i);\n\t\t}\n\t});\n}\n\n/**\n * @param {Record<string, any>} $$props\n * @param {string[]} bindable\n * @param {string[]} exports\n * @param {Function & { [FILENAME]: string }} component\n */\nexport function validate_prop_bindings($$props, bindable, exports, component) {\n\tfor (const key in $$props) {\n\t\tvar setter = get_descriptor($$props, key)?.set;\n\t\tvar name = component.name;\n\n\t\tif (setter) {\n\t\t\tif (exports.includes(key)) {\n\t\t\t\te.bind_invalid_export(component[FILENAME], key, name);\n\t\t\t}\n\n\t\t\tif (!bindable.includes(key)) {\n\t\t\t\te.bind_not_bindable(key, component[FILENAME], name);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {string} binding\n * @param {() => Record<string, any>} get_object\n * @param {() => string} get_property\n * @param {number} line\n * @param {number} column\n */\nexport function validate_binding(binding, get_object, get_property, line, column) {\n\tvar warned = false;\n\n\tvar filename = dev_current_component_function?.[FILENAME];\n\n\trender_effect(() => {\n\t\tif (warned) return;\n\n\t\tvar [object, is_store_sub] = capture_store_binding(get_object);\n\n\t\tif (is_store_sub) return;\n\n\t\tvar property = get_property();\n\n\t\tvar ran = false;\n\n\t\t// by making the (possibly false, but it would be an extreme edge case) assumption\n\t\t// that a getter has a corresponding setter, we can determine if a property is\n\t\t// reactive by seeing if this effect has dependencies\n\t\tvar effect = render_effect(() => {\n\t\t\tif (ran) return;\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tobject[property];\n\t\t});\n\n\t\tran = true;\n\n\t\tif (effect.deps === null) {\n\t\t\tvar location = `${filename}:${line}:${column}`;\n\t\t\tw.binding_property_non_reactive(binding, location);\n\n\t\t\twarned = true;\n\t\t}\n\t});\n}\n","/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */\nimport { DIRTY, LEGACY_PROPS, MAYBE_DIRTY } from '../internal/client/constants.js';\nimport { user_pre_effect } from '../internal/client/reactivity/effects.js';\nimport { mutable_source, set } from '../internal/client/reactivity/sources.js';\nimport { hydrate, mount, unmount } from '../internal/client/render.js';\nimport {\n\tactive_effect,\n\tcomponent_context,\n\tdev_current_component_function,\n\tflush_sync,\n\tget,\n\tset_signal_status\n} from '../internal/client/runtime.js';\nimport { lifecycle_outside_component } from '../internal/shared/errors.js';\nimport { define_property, is_array } from '../internal/shared/utils.js';\nimport * as w from '../internal/client/warnings.js';\nimport { DEV } from 'esm-env';\nimport { FILENAME } from '../constants.js';\n\n/**\n * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.\n *\n * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n *\n * @template {Record<string, any>} Props\n * @template {Record<string, any>} Exports\n * @template {Record<string, any>} Events\n * @template {Record<string, any>} Slots\n *\n * @param {ComponentConstructorOptions<Props> & {\n * \tcomponent: ComponentType<SvelteComponent<Props, Events, Slots>> | Component<Props>;\n * }} options\n * @returns {SvelteComponent<Props, Events, Slots> & Exports}\n */\nexport function createClassComponent(options) {\n\t// @ts-expect-error $$prop_def etc are not actually defined\n\treturn new Svelte4Component(options);\n}\n\n/**\n * Takes the component function and returns a Svelte 4 compatible component constructor.\n *\n * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n *\n * @template {Record<string, any>} Props\n * @template {Record<string, any>} Exports\n * @template {Record<string, any>} Events\n * @template {Record<string, any>} Slots\n *\n * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component\n * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}\n */\nexport function asClassComponent(component) {\n\t// @ts-expect-error $$prop_def etc are not actually defined\n\treturn class extends Svelte4Component {\n\t\t/** @param {any} options */\n\t\tconstructor(options) {\n\t\t\tsuper({\n\t\t\t\tcomponent,\n\t\t\t\t...options\n\t\t\t});\n\t\t}\n\t};\n}\n\n/**\n * Support using the component as both a class and function during the transition period\n * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType\n */\n\nclass Svelte4Component {\n\t/** @type {any} */\n\t#events;\n\n\t/** @type {Record<string, any>} */\n\t#instance;\n\n\t/**\n\t * @param {ComponentConstructorOptions & {\n\t * component: any;\n\t * }} options\n\t */\n\tconstructor(options) {\n\t\tvar sources = new Map();\n\n\t\t/**\n\t\t * @param {string | symbol} key\n\t\t * @param {unknown} value\n\t\t */\n\t\tvar add_source = (key, value) => {\n\t\t\tvar s = mutable_source(value);\n\t\t\tsources.set(key, s);\n\t\t\treturn s;\n\t\t};\n\n\t\t// Replicate coarse-grained props through a proxy that has a version source for\n\t\t// each property, which is incremented on updates to the property itself. Do not\n\t\t// use our $state proxy because that one has fine-grained reactivity.\n\t\tconst props = new Proxy(\n\t\t\t{ ...(options.props || {}), $$events: {} },\n\t\t\t{\n\t\t\t\tget(target, prop) {\n\t\t\t\t\treturn get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));\n\t\t\t\t},\n\t\t\t\thas(target, prop) {\n\t\t\t\t\t// Necessary to not throw \"invalid binding\" validation errors on the component side\n\t\t\t\t\tif (prop === LEGACY_PROPS) return true;\n\n\t\t\t\t\tget(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));\n\t\t\t\t\treturn Reflect.has(target, prop);\n\t\t\t\t},\n\t\t\t\tset(target, prop, value) {\n\t\t\t\t\tset(sources.get(prop) ?? add_source(prop, value), value);\n\t\t\t\t\treturn Reflect.set(target, prop, value);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.#instance = (options.hydrate ? hydrate : mount)(options.component, {\n\t\t\ttarget: options.target,\n\t\t\tanchor: options.anchor,\n\t\t\tprops,\n\t\t\tcontext: options.context,\n\t\t\tintro: options.intro ?? false,\n\t\t\trecover: options.recover\n\t\t});\n\n\t\t// We don't flush_sync for custom element wrappers or if the user doesn't want it\n\t\tif (!options?.props?.$$host || options.sync === false) {\n\t\t\tflush_sync();\n\t\t}\n\n\t\tthis.#events = props.$$events;\n\n\t\tfor (const key of Object.keys(this.#instance)) {\n\t\t\tif (key === '$set' || key === '$destroy' || key === '$on') continue;\n\t\t\tdefine_property(this, key, {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.#instance[key];\n\t\t\t\t},\n\t\t\t\t/** @param {any} value */\n\t\t\t\tset(value) {\n\t\t\t\t\tthis.#instance[key] = value;\n\t\t\t\t},\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t}\n\n\t\tthis.#instance.$set = /** @param {Record<string, any>} next */ (next) => {\n\t\t\tObject.assign(props, next);\n\t\t};\n\n\t\tthis.#instance.$destroy = () => {\n\t\t\tunmount(this.#instance);\n\t\t};\n\t}\n\n\t/** @param {Record<string, any>} props */\n\t$set(props) {\n\t\tthis.#instance.$set(props);\n\t}\n\n\t/**\n\t * @param {string} event\n\t * @param {(...args: any[]) => any} callback\n\t * @returns {any}\n\t */\n\t$on(event, callback) {\n\t\tthis.#events[event] = this.#events[event] || [];\n\n\t\t/** @param {any[]} args */\n\t\tconst cb = (...args) => callback.call(this, ...args);\n\t\tthis.#events[event].push(cb);\n\t\treturn () => {\n\t\t\tthis.#events[event] = this.#events[event].filter(/** @param {any} fn */ (fn) => fn !== cb);\n\t\t};\n\t}\n\n\t$destroy() {\n\t\tthis.#instance.$destroy();\n\t}\n}\n\n/**\n * Runs the given function once immediately on the server, and works like `$effect.pre` on the client.\n *\n * @deprecated Use this only as a temporary solution to migrate your component code to Svelte 5.\n * @param {() => void | (() => void)} fn\n * @returns {void}\n */\nexport function run(fn) {\n\tuser_pre_effect(() => {\n\t\tfn();\n\t\tvar effect = /** @type {import('#client').Effect} */ (active_effect);\n\t\t// If the effect is immediately made dirty again, mark it as maybe dirty to emulate legacy behaviour\n\t\tif ((effect.f & DIRTY) !== 0) {\n\t\t\tlet filename = \"a file (we can't know which one)\";\n\t\t\tif (DEV) {\n\t\t\t\t// @ts-ignore\n\t\t\t\tfilename = dev_current_component_function?.[FILENAME] ?? filename;\n\t\t\t}\n\t\t\tw.legacy_recursive_reactive_block(filename);\n\t\t\tset_signal_status(effect, MAYBE_DIRTY);\n\t\t}\n\t});\n}\n\n/**\n * Function to mimic the multiple listeners available in svelte 4\n * @deprecated\n * @param {EventListener[]} handlers\n * @returns {EventListener}\n */\nexport function handlers(...handlers) {\n\treturn function (event) {\n\t\tconst { stopImmediatePropagation } = event;\n\t\tlet stopped = false;\n\n\t\tevent.stopImmediatePropagation = () => {\n\t\t\tstopped = true;\n\t\t\tstopImmediatePropagation.call(event);\n\t\t};\n\n\t\tconst errors = [];\n\n\t\tfor (const handler of handlers) {\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error `this` is not typed\n\t\t\t\thandler?.call(this, event);\n\t\t\t} catch (e) {\n\t\t\t\terrors.push(e);\n\t\t\t}\n\n\t\t\tif (stopped) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfor (let error of errors) {\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t};\n}\n\n/**\n * Function to create a `bubble` function that mimic the behavior of `on:click` without handler available in svelte 4.\n * @deprecated Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5.\n */\nexport function createBubbler() {\n\tconst active_component_context = component_context;\n\tif (active_component_context === null) {\n\t\tlifecycle_outside_component('createBubbler');\n\t}\n\n\treturn (/**@type {string}*/ type) => (/**@type {Event}*/ event) => {\n\t\tconst events = /** @type {Record<string, Function | Function[]>} */ (\n\t\t\tactive_component_context.s.$$events\n\t\t)?.[/** @type {any} */ (type)];\n\n\t\tif (events) {\n\t\t\tconst callbacks = is_array(events) ? events.slice() : [events];\n\t\t\tfor (const fn of callbacks) {\n\t\t\t\tfn.call(active_component_context.x, event);\n\t\t\t}\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\nexport {\n\tonce,\n\tpreventDefault,\n\tself,\n\tstopImmediatePropagation,\n\tstopPropagation,\n\ttrusted,\n\tpassive,\n\tnonpassive\n} from '../internal/client/dom/legacy/event-modifiers.js';\n","export namespace LuigiInternalMessageID {\n /**\n * A message emmitted from the Microfrontend when a custom message is sent\n */\n export const CUSTOM_MESSAGE = 'custom';\n /**\n * A message emmitted from the Microfrontend when the context data is sent\n */\n export const GET_CONTEXT = 'luigi.get-context';\n /**\n * A message sent to the microfrontend from parent with the context upon init\n */\n export const SEND_CONTEXT_HANDSHAKE = 'luigi.init';\n\n /**\n * A message sent from the Microfrontend when the context data has been received properly\n */\n export const CONTEXT_RECEIVED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend when a navigation request is sent\n */\n export const NAVIGATION_REQUEST = 'luigi.navigation.open';\n /**\n * A message emmitted from the Microfrontend when a request to show an alert is sent\n */\n export const ALERT_REQUEST = 'luigi.ux.alert.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular alert\n */\n export const ALERT_CLOSED = 'luigi.ux.alert.hide';\n /**\n * A message emmitted from the Microfrontend when it is first initialized\n */\n export const INITIALIZED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend to request adding search parameters to the URL\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'luigi.addSearchParams';\n /**\n * A message emmitted from the Microfrontend to request adding node parameters to the URL\n */\n export const ADD_NODE_PARAMS_REQUEST = 'luigi.addNodeParams';\n /**\n * A message emmitted from the Microfrontend when a request to show an confirmation modal is sent\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'luigi.ux.confirmationModal.show';\n /**\n * A message emmitted from the Microfrontend when a request to show loading indicator is sent\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'luigi.show-loading-indicator';\n /**\n * A message emmitted from the Microfrontend when a request to hide the loading indicator is sent\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'luigi.hide-loading-indicator';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the current locale is sent\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'luigi.ux.set-current-locale';\n\n /**\n * A message emmitted from the Microfrontend when a request to modify the local storage is sent\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'storage';\n\n /**\n * A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'luigi-runtime-error-handling';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent\n */\n export const SET_ANCHOR_LINK_REQUEST = 'luigi.setAnchor';\n\n /**\n * A message emmitted from the Microfrontend when a request to set third party cookies is sent\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'luigi.third-party-cookie';\n\n /**\n * A message emmitted from the Microfrontend when a request to navigate back is sent\n */\n export const BACK_NAVIGATION_REQUEST = 'luigi.navigation.back';\n\n /**\n * A message emmitted from the Microfrontend when a request to receive the current app route is sent\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'luigi.navigation.currentRoute';\n\n /**\n * A message sent to the Microfrontend with the payload being the context being sent\n */\n export const SEND_CONTEXT_OBJECT = 'luigi.navigate';\n\n /**\n * A message emmitted from the Microfrontend to report that the navigation is completed is sent\n */\n export const NAVIGATION_COMPLETED_REPORT = 'luigi.navigate.ok';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal path parameters is sent\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'luigi.navigation.updateModalDataPath';\n\n /**\n * A message emmitted from the Microfrontend when a request to check on the validity of a path is sent\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'luigi.navigation.pathExists';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent\n */\n export const SET_DIRTY_STATUS_REQUEST = 'luigi.set-page-dirty';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'token auth' is sent\n */\n export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued';\n}\n","export namespace Events {\n /**\n * Event fired when the micro frontend sends a custom message.\n */\n export const CUSTOM_MESSAGE = 'custom-message';\n\n /**\n * Event fired when the micro frontend requests the context data.\n */\n export const GET_CONTEXT_REQUEST = 'get-context-request';\n\n /**\n * Event fired when a navigation has been requested by the micro frontend.\n */\n export const NAVIGATION_REQUEST = 'navigation-request';\n\n /**\n * Event fired when the micro frontend requests to show an alert.\n */\n export const ALERT_REQUEST = 'show-alert-request';\n\n /**\n * Event fired when the micro frontend requests to close an alert.\n */\n export const ALERT_CLOSED = 'close-alert-request';\n\n /**\n * Event fired when the micro frontend has been initialized.\n */\n export const INITIALIZED = 'initialized';\n\n /**\n * Event fired when the micro frontend requests the addition of search parameters to the URL.\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';\n\n /**\n * Event fired when the micro frontend requests the addition of node parameters to the URL.\n */\n export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';\n\n /**\n * Event fired when the micro frontend requests to show a confirmation modal.\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';\n\n /**\n * Event fired when the micro frontend requests to show a loading indicator.\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';\n\n /**\n * Event fired when the micro frontend requests to hide the loading indicator.\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';\n\n /**\n * Event fired when the micro frontend requests to set the current locale.\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';\n\n /**\n * Event fired when the micro frontend requests to modify the local storage.\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';\n\n /**\n * Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';\n\n /**\n * Event fired when the micro frontend requests to set the anchor of the URL.\n */\n export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';\n\n /**\n * Event fired when the micro frontend requests to set third-party cookies.\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';\n\n /**\n * Event fired when the micro frontend requests to navigate back.\n */\n export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';\n\n /**\n * Event fired when the micro frontend requests the current app route.\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';\n\n /**\n * Event fired to report that the micro frontend's navigation has completed.\n */\n export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';\n\n /**\n * Event fired when the micro frontend requests to update the modal path parameters.\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';\n\n /**\n * Event fired when the micro frontend requests to check the validity of a path.\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';\n\n /**\n * Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes.\n */\n export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';\n\n /**\n * Event fired when the micro frontend requests to set the view group data.\n */\n export const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';\n\n /**\n * Event fired when the micro frontend requests to set the document title.\n */\n export const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';\n\n /**\n * Event fired when the micro frontend requests to open the user settings.\n */\n export const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';\n\n /**\n * Event fired when the micro frontend requests to close the user settings.\n */\n export const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';\n\n /**\n * Event fired when the micro frontend requests to collapse left side navigation.\n */\n export const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';\n\n /**\n * Event fired when the micro frontend requests to update the top navigation.\n */\n export const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';\n\n /**\n * Event fired when the micro frontend requests to check if the path exists.\n */\n export const PATH_EXISTS_REQUEST = 'path-exists-request';\n\n /**\n * Event fired when the micro frontend requests to navigate back.\n */\n export const GO_BACK_REQUEST = 'go-back-request';\n\n /**\n * Event fired when the micro frontend requests to check if there are any preserved views.\n */\n export const HAS_BACK_REQUEST = 'has-back-request';\n\n /**\n * Event fired when the micro frontend requests to remove the backdrop.\n */\n export const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';\n}\n","export class GenericHelpersClass {\n /**\n * DUPLICATE: Duplicate of 'core/src/utilities/helpers/generic-helpers.js > isFunction'\n * Keep one in the end\n *\n * Checks if input is a function.\n * @param {Function} functionToCheck function to check\n * @returns {boolean}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n isFunction(functionToCheck: (arg: any) => void): boolean {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';\n }\n\n /**\n * Checks if input is an object.\n * @param {Object} objectToCheck mixed\n * @returns {boolean}\n */\n isObject(objectToCheck: object): boolean {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Checks whether web component is an attribute or property. In case of attribute, it returns the parsed value.\n * @param {Object | boolean | string} webcomponent value can either be an object, boolean or a stringified object, e.g webcomponent='{\"selfregistered\":\"true\"}'\n * @returns {Object | boolean} webcomponent returns the parsed webcomponent value.\n */\n checkWebcomponentValue(webcomponent: object | boolean | string): object | boolean {\n if (typeof webcomponent === 'string') {\n return JSON.parse(webcomponent);\n } else if (typeof webcomponent === 'boolean' || typeof webcomponent === 'object') {\n return webcomponent;\n } else {\n console.warn('Webcomponent value has a wrong type.');\n return false;\n }\n }\n\n /**\n * Resolves the context to an object. If the context is a string, it attempts to parse\n * it as JSON. If parsing fails JSON parse error will be thrown.\n * @param {Object | string} context - The context to be resolved.\n * @returns {Object} The resolved context as an object.\n */\n resolveContext(context: object | string): object {\n return context ? (typeof context === 'string' ? JSON.parse(context) : context) : {};\n }\n}\n\nexport const GenericHelperFunctions = new GenericHelpersClass();\n","import { Events } from '../constants/communication';\nimport type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { GenericHelperFunctions } from '../utilities/helpers';\n\nexport class ContainerService {\n /**\n * Checks if the given HTML element is visible in the DOM by considering both\n * its width/height and any client rectangles it may have.\n *\n * @param {HTMLElement} component - The HTML element to check for visibility.\n * @returns {boolean} Returns true if the element is visible, otherwise false.\n */\n isVisible(component: HTMLElement): boolean {\n return !!(component.offsetWidth || component.offsetHeight || component.getClientRects().length);\n }\n\n /**\n * Sends a message to the iframe either with the custom keyword or any other message name\n * @param iframeHandle the iframe to send the message to\n * @param msg the message to be sent\n * @param msgName the optional message name\n */\n sendCustomMessageToIframe(iframeHandle: IframeHandle, msg: object, msgName?: string) {\n const messageName = msgName || 'custom';\n\n if (iframeHandle.iframe.contentWindow) {\n const iframeUrl = new URL(iframeHandle.iframe.src);\n\n if (messageName === 'custom') {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, data: msg }, iframeUrl.origin);\n } else {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, ...msg }, iframeUrl.origin);\n }\n } else {\n console.error('Message target could not be resolved');\n }\n }\n\n /**\n * Dispatch an event to the given target container\n * @param {string} msg the event message\n * @param {ContainerElement} targetCnt the targeted HTML element onto which the event is dispatched\n * @param {Object} data custom data added to the event to be dispatched\n * @param {Function} callback\n * @param {string} callbackName\n */\n dispatch(\n msg: string,\n targetCnt: ContainerElement,\n data: object | string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback?: (arg?: any) => void,\n callbackName?: string\n ): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const customEvent: any = new CustomEvent(msg, { detail: data });\n\n if (callback && GenericHelperFunctions.isFunction(callback) && callbackName) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customEvent[callbackName] = (data: any) => {\n callback(data);\n };\n }\n\n targetCnt.dispatchEvent(customEvent);\n }\n\n /**\n * Retrieves the target container based on the event source.\n *\n * @param event The event object representing the source of the container.\n * @returns {ContainerElement | undefined} The target container object or undefined if not found.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getTargetContainer(event: any): ContainerElement | undefined {\n let cnt: ContainerElement | undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (globalThis as any).__luigi_container_manager.container.forEach((element: ContainerElement) => {\n if (element.iframeHandle?.iframe && element.iframeHandle.iframe.contentWindow === event.source) {\n cnt = element;\n }\n });\n\n return cnt;\n }\n\n /**\n * Initializes the Luigi Container Manager responsible for managing communication\n * between microfrontends and dispatching events accordingly. Also adds 'message' listener to the window object with\n * the defined messageListener list\n * @returns __luigi_container_manager which has the added container array and message listeners\n */\n getContainerManager() {\n /* eslint-disable */\n if (!(globalThis as any).__luigi_container_manager) {\n (globalThis as any).__luigi_container_manager = {\n container: [],\n messageListener: (event: any) => {\n // Handle incoming messages and dispatch events based on the message type\n // (Custom messages, navigation requests, alert requests, etc.)\n const targetCnt = this.getTargetContainer(event);\n const target = targetCnt?.iframeHandle?.iframe?.contentWindow;\n\n if (target && target === event.source) {\n // messages emitted from microfrontends\n const msg = event.data.msg;\n\n // dispatch an event depending on message\n switch (msg) {\n case LuigiInternalMessageID.CUSTOM_MESSAGE:\n {\n const evData = event.data.data;\n const id = evData.id;\n\n delete evData.id;\n this.dispatch(Events.CUSTOM_MESSAGE, targetCnt, {\n id: id,\n _metaData: {},\n data: evData\n });\n }\n break;\n case LuigiInternalMessageID.GET_CONTEXT:\n // Automatically send a luigi.init message to complete the initial handshake with the microfrontend\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE,\n context: targetCnt.context || {},\n internal: {\n thirdPartyCookieCheck: {\n disabled: targetCnt.skipCookieCheck === 'true'\n }\n },\n authData: targetCnt.authData || {}\n },\n event.origin\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_REQUEST:\n this.dispatch(Events.NAVIGATION_REQUEST, targetCnt, event.data.params);\n break;\n case LuigiInternalMessageID.ALERT_REQUEST:\n this.dispatch(Events.ALERT_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.INITIALIZED:\n this.dispatch(Events.INITIALIZED, targetCnt, event.data.params);\n break;\n case LuigiInternalMessageID.ADD_SEARCH_PARAMS_REQUEST:\n this.dispatch(Events.ADD_SEARCH_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n });\n break;\n case LuigiInternalMessageID.ADD_NODE_PARAMS_REQUEST:\n this.dispatch(Events.ADD_NODE_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n });\n break;\n case LuigiInternalMessageID.SHOW_CONFIRMATION_MODAL_REQUEST:\n this.dispatch(Events.SHOW_CONFIRMATION_MODAL_REQUEST, targetCnt, event.data.data);\n break;\n case LuigiInternalMessageID.SHOW_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.SHOW_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.HIDE_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.HIDE_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_CURRENT_LOCALE_REQUEST:\n this.dispatch(Events.SET_CURRENT_LOCALE_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.LOCAL_STORAGE_SET_REQUEST:\n this.dispatch(Events.LOCAL_STORAGE_SET_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.RUNTIME_ERROR_HANDLING_REQUEST:\n this.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_ANCHOR_LINK_REQUEST:\n this.dispatch(Events.SET_ANCHOR_LINK_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_THIRD_PARTY_COOKIES_REQUEST:\n this.dispatch(Events.SET_THIRD_PARTY_COOKIES_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.BACK_NAVIGATION_REQUEST:\n this.dispatch(Events.BACK_NAVIGATION_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.GET_CURRENT_ROUTE_REQUEST:\n this.dispatch(Events.GET_CURRENT_ROUTE_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.NAVIGATION_COMPLETED_REPORT:\n this.dispatch(Events.NAVIGATION_COMPLETED_REPORT, targetCnt, event);\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_PATH_DATA_REQUEST:\n this.dispatch(Events.UPDATE_MODAL_PATH_DATA_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.CHECK_PATH_EXISTS_REQUEST:\n this.dispatch(Events.CHECK_PATH_EXISTS_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_DIRTY_STATUS_REQUEST:\n this.dispatch(Events.SET_DIRTY_STATUS_REQUEST, targetCnt, event);\n break;\n }\n }\n }\n };\n window.addEventListener('message', (globalThis as any).__luigi_container_manager.messageListener);\n }\n\n return (globalThis as any).__luigi_container_manager;\n /* eslint-enable */\n }\n\n /**\n * Adds thisComponent's object reference the the __luigi_container_manager container list\n *\n * @param {HTMLElement} thisComponent - The HTML element that represents the current rendered container (thisComponent)\n */\n registerContainer(thisComponent: HTMLElement): void {\n this.getContainerManager().container.push(thisComponent);\n }\n}\n\nexport const containerService = new ContainerService();\n","import type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { containerService } from '../services/container.service';\n\nexport class ContainerAPIFunctions {\n /**\n * Updates the context of the microfrontend by sending a message to the iframe that sets the context of the microfrontend\n * @param contextObj The context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateContext = (contextObj: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context: contextObj,\n internal: internalParameter,\n // set withoutSync to true for the container case to avoid browser history changes from luigi client\n withoutSync: true\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update context on inexisting iframe');\n }\n };\n\n /**\n * Updates route of the microfrontend by sending a message to the iframe that sets new view URL\n * @param viewUrl new view URL\n * @param context context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateViewUrl = (viewUrl: string, context: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context,\n internal: internalParameter,\n withoutSync: false,\n viewUrl\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update route on inexisting iframe');\n }\n };\n\n /**\n * Updates the auth data of the microfrontend by sending a message to the iframe that sets the authData of the microfrontend\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param authData the authData object being sent to the microfrontend\n */\n updateAuthData = (iframeHandle: IframeHandle, authData: object) => {\n if (iframeHandle && authData) {\n containerService.sendCustomMessageToIframe(iframeHandle, { authData }, LuigiInternalMessageID.AUTH_SET_TOKEN);\n } else {\n console.warn('Attempting to update auth data on inexisting iframe or authData');\n }\n };\n\n /**\n * Send a custom message to the referenced iframe or web component\n * @param id a string containing the message id\n * @param mainComponent a reference to the web component to be affected\n * @param isWebcomponent predicate showing if currently referencing a web component or not\n * @param iframeHandle a reference to the iframe to be affected\n * @param data data to be sent alongside the custom message\n */\n sendCustomMessage = (\n id: string,\n mainComponent: ContainerElement,\n isWebcomponent: boolean,\n iframeHandle: IframeHandle,\n data?: object\n ) => {\n if (isWebcomponent && mainComponent._luigi_mfe_webcomponent) {\n containerService.dispatch(id, mainComponent._luigi_mfe_webcomponent, data || {});\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const msg: Record<string, any> = { ...data };\n\n if (msg.id) {\n console.warn('Property \"id\" is reserved and can not be used in custom message data');\n }\n\n msg.id = id;\n containerService.sendCustomMessageToIframe(iframeHandle, msg);\n }\n };\n\n /**\n * Send a message to the microfrontend notifying the alert has been closed\n * @param id the id of the alert being closed\n * @param dismissKey the dismiss key being sent if any\n * @param iframeHandle the handle of the iframe to send the message to\n */\n closeAlert(id: string, dismissKey: string, iframeHandle: IframeHandle) {\n containerService.sendCustomMessageToIframe(iframeHandle, { id, dismissKey }, LuigiInternalMessageID.ALERT_CLOSED);\n }\n}\n\nexport const ContainerAPI = new ContainerAPIFunctions();\n","import type {\n LayoutConfig,\n NavNodeListener,\n RendererConfig,\n RendererLayout,\n RendererObject,\n RendererUseProps\n} from '../constants/container.model';\n\n/**\n * Default compound renderer.\n */\nexport class DefaultCompoundRenderer {\n rendererObject!: RendererObject;\n config: RendererConfig;\n\n constructor(rendererObj?: RendererObject) {\n if (rendererObj) {\n this.rendererObject = rendererObj;\n this.config = rendererObj.config || {};\n } else {\n this.config = {};\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n return document.createElement('div');\n }\n\n createCompoundItemContainer(layoutConfig?: object): HTMLDivElement {\n return document.createElement('div');\n }\n\n attachCompoundItem(compoundCnt: HTMLElement, compoundItemCnt: HTMLElement): void {\n compoundCnt.appendChild(compoundItemCnt);\n }\n}\n\n/**\n * Compound Renderer for custom rendering as defined in luigi config.\n */\nexport class CustomCompoundRenderer extends DefaultCompoundRenderer {\n superRenderer!: DefaultCompoundRenderer;\n\n constructor(rendererObj: RendererObject) {\n super(rendererObj || { use: {} });\n\n if (rendererObj && rendererObj.use && (rendererObj.use as RendererUseProps).extends) {\n this.superRenderer = resolveRenderer({\n use: (rendererObj.use as RendererUseProps).extends,\n config: rendererObj.config\n });\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n if (typeof (this.rendererObject.use as RendererUseProps).createCompoundContainer === 'function') {\n // @ts-ignore\n return this.rendererObject.use.createCompoundContainer(this.config, this.superRenderer);\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundContainer();\n }\n return super.createCompoundContainer();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n createCompoundItemContainer(layoutConfig: any): HTMLDivElement {\n if (typeof (this.rendererObject.use as RendererUseProps).createCompoundItemContainer === 'function') {\n // @ts-ignore\n return this.rendererObject.use.createCompoundItemContainer(layoutConfig, this.config, this.superRenderer);\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundItemContainer(layoutConfig);\n }\n\n return super.createCompoundItemContainer(layoutConfig);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attachCompoundItem(compoundCnt: any, compoundItemCnt: any): void {\n if (typeof (this.rendererObject.use as RendererUseProps).attachCompoundItem === 'function') {\n // @ts-ignore\n this.rendererObject.use.attachCompoundItem(compoundCnt, compoundItemCnt, this.superRenderer);\n } else if (this.superRenderer) {\n this.superRenderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n } else {\n super.attachCompoundItem(compoundCnt, compoundItemCnt);\n }\n }\n}\n\n/**\n * Compound Renderer for a css grid compound view.\n */\nexport class GridCompoundRenderer extends DefaultCompoundRenderer {\n createCompoundContainer(): HTMLDivElement {\n const containerClass = '__lui_compound_' + new Date().getTime();\n const compoundCnt = document.createElement('div');\n let mediaQueries = '';\n\n compoundCnt.classList.add(containerClass);\n\n if (this.config.layouts) {\n this.config.layouts.forEach((el: RendererLayout) => {\n if (el.minWidth || el.maxWidth) {\n let mq = '@media only screen ';\n\n if (el.minWidth != null) {\n mq += `and (min-width: ${el.minWidth}px) `;\n }\n\n if (el.maxWidth != null) {\n mq += `and (max-width: ${el.maxWidth}px) `;\n }\n\n mq += `{\n .${containerClass} {\n grid-template-columns: ${el.columns || 'auto'};\n grid-template-rows: ${el.rows || 'auto'};\n grid-gap: ${el.gap || '0'};\n }\n }\n `;\n mediaQueries += mq;\n }\n });\n }\n\n compoundCnt.innerHTML = /* html */ `\n <style scoped>\n .${containerClass} {\n display: grid;\n grid-template-columns: ${this.config.columns || 'auto'};\n grid-template-rows: ${this.config.rows || 'auto'};\n grid-gap: ${this.config.gap || '0'};\n min-height: ${this.config.minHeight || 'auto'};\n }\n ${mediaQueries}\n </style>\n `;\n return compoundCnt;\n }\n\n createCompoundItemContainer(layoutConfig: LayoutConfig): HTMLDivElement {\n const config = layoutConfig || {};\n const compoundItemCnt = document.createElement('div');\n\n compoundItemCnt.setAttribute('style', `grid-row: ${config.row || 'auto'}; grid-column: ${config.column || 'auto'}`);\n compoundItemCnt.classList.add('lui-compoundItemCnt');\n\n return compoundItemCnt;\n }\n}\n\n/**\n * Returns the compound renderer class for a given config.\n * If no specific one is found, {DefaultCompoundRenderer} is returned.\n *\n * @param {*} rendererConfig the renderer config object defined in luigi config\n */\nexport const resolveRenderer = (rendererConfig: RendererObject) => {\n const rendererDef: string | RendererUseProps | undefined = rendererConfig.use;\n\n if (!rendererDef) {\n return new DefaultCompoundRenderer(rendererConfig);\n } else if (rendererDef === 'grid') {\n return new GridCompoundRenderer(rendererConfig);\n } else if (\n (rendererDef as RendererUseProps).createCompoundContainer ||\n (rendererDef as RendererUseProps).createCompoundItemContainer ||\n (rendererDef as RendererUseProps).attachCompoundItem\n ) {\n return new CustomCompoundRenderer(rendererConfig);\n }\n\n return new DefaultCompoundRenderer(rendererConfig);\n};\n\n/**\n * Registers event listeners defined at the navNode.\n *\n * @param {*} eventbusListeners a map of event listener arrays with event id as key\n * @param {*} navNode the web component node configuration object\n * @param {*} nodeId the web component node id\n * @param {*} wcElement the web component element - optional\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const registerEventListeners = (eventbusListeners: any, navNode: any, nodeId: string, wcElement?: any) => {\n if (navNode?.eventListeners) {\n navNode.eventListeners.forEach((el: NavNodeListener) => {\n const evID = el.source + '.' + el.name;\n const listenerList = eventbusListeners[evID];\n const listenerInfo = {\n wcElementId: nodeId,\n wcElement: wcElement,\n action: el.action,\n converter: el.dataConverter\n };\n\n if (listenerList) {\n listenerList.push(listenerInfo);\n } else {\n eventbusListeners[evID] = [listenerInfo];\n }\n });\n }\n};\n\n/**\n * Desanitization of an object\n * @param {Object} paramsMap\n * @returns\n */\nexport const deSanitizeParamsMap = (paramsMap: object) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return Object.entries(paramsMap).reduce((sanitizedMap: any, paramPair: any) => {\n sanitizedMap[deSanitizeParam(paramPair[0])] = deSanitizeParam(paramPair[1]);\n\n return sanitizedMap;\n }, {});\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deSanitizeParam(value: any): string {\n const desani = String(value)\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('"', '\"')\n .replaceAll(''', \"'\")\n .replaceAll('/', '/');\n\n return desani;\n}\n","/* eslint no-prototype-builtins: 0 */\nimport {\n DefaultCompoundRenderer,\n resolveRenderer,\n registerEventListeners,\n deSanitizeParamsMap\n} from './web-component-helpers';\nimport { ContainerService } from './container.service';\nimport { Events } from '../constants/communication';\nimport type {\n ContainerElement,\n LayoutConfig,\n WebComponentNode,\n WebComponentRenderer\n} from '../constants/container.model';\n\n/** Methods for dealing with web components based micro frontend handling */\nexport class WebComponentService {\n containerService: ContainerService;\n thisComponent!: ContainerElement;\n\n constructor() {\n this.containerService = new ContainerService();\n }\n\n dynamicImport(viewUrl: string) {\n // Object.freeze() used as potential marker for bundlers other than webpack\n return Object.freeze(import(/* webpackIgnore: true */ viewUrl));\n }\n\n processViewUrl(viewUrl: string, data?: object): string {\n return viewUrl;\n }\n\n /**\n * Attaches a web component with tagname wc_id and adds it to wcItemContainer,\n * if attached to wc_container\n *\n * @param wc_id a tagname that is used when creating the web component element\n * @param wcItemPlaceholder placeholder for web component container\n * @param wc_container web component container element\n * @param ctx context to be passed to the web component\n * @param viewUrl url to render content from\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n attachWC(\n wc_id: string,\n wcItemPlaceholder: HTMLDivElement,\n wc_container: ContainerElement,\n ctx: object,\n viewUrl: string,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n if (wc_container && wc_container.contains(wcItemPlaceholder)) {\n const wc = document.createElement(wc_id);\n\n if (nodeId) {\n wc.setAttribute('nodeId', nodeId);\n }\n\n wc.setAttribute('lui_web_component', 'true');\n\n this.initWC(wc, wc_id, wc_container, viewUrl, ctx, nodeId, isCompoundChild);\n wc_container.replaceChild(wc, wcItemPlaceholder);\n\n if (wc_container._luigi_node) {\n wc_container._luigi_mfe_webcomponent = wc;\n }\n\n wc_container.dispatchEvent(new Event('wc_ready'));\n }\n }\n\n /**\n * Function that uses the current instance of the containerService to dispatch a Luigi event to the current instance of the container\n * that is 'thisComponent'\n * @param msg the message to be delivered\n * @param data the data to be sent\n * @param callback the callback function to be called\n */\n dispatchLuigiEvent(msg: string, data: object | string, callback?: () => void) {\n this.containerService.dispatch(msg, this.thisComponent, data, callback);\n }\n\n /**\n * This function is used to create the Luigi Client API for the web-component-based micro frontend.\n * As the function expands with more functionality, it might be moved to a separate class.\n *\n * The client API here should be a reflection of the Core WC Client api from core/src/services/web-components.js\n *\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param wc_id a tagname that is used when creating the web component element\n * @param component\n * @param isCompoundChild defines if rendered mf is a compound child or not\n * @returns an object with the Luigi Client API\n */\n createClientAPI(\n eventBusElement: ContainerElement,\n nodeId: string,\n wc_id: string,\n component: HTMLElement,\n isCompoundChild?: boolean\n ) {\n return {\n linkManager: () => {\n let fromContext: string | null = null;\n let fromClosestContext = false;\n let fromVirtualTreeRoot = false;\n let fromParent = false;\n let nodeParams = {};\n\n const linkManagerInstance = {\n navigate: (route: string, settings = {}) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams,\n ...settings\n };\n this.dispatchLuigiEvent(Events.NAVIGATION_REQUEST, {\n link: route,\n ...options\n });\n },\n navigateToIntent: (semanticSlug: string, params = {}): void => {\n let newPath = '#?intent=';\n\n newPath += semanticSlug;\n\n if (params && Object.keys(params)?.length) {\n const paramList = Object.entries(params);\n\n // append parameters to the path if any\n if (paramList.length > 0) {\n newPath += '?';\n\n for (const [key, value] of paramList) {\n newPath += key + '=' + value + '&';\n }\n\n // trim potential excessive ampersand & at the end\n newPath = newPath.slice(0, -1);\n }\n }\n\n linkManagerInstance.navigate(newPath);\n },\n fromClosestContext: () => {\n fromClosestContext = true;\n return linkManagerInstance;\n },\n fromContext: (navigationContext: string) => {\n fromContext = navigationContext;\n return linkManagerInstance;\n },\n fromVirtualTreeRoot: () => {\n fromVirtualTreeRoot = true;\n return linkManagerInstance;\n },\n fromParent: () => {\n fromParent = true;\n return linkManagerInstance;\n },\n getCurrentRoute: () => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.GET_CURRENT_ROUTE_REQUEST,\n this.thisComponent,\n { ...options },\n (route) => {\n if (route) {\n resolve(route);\n } else {\n reject('No current route received.');\n }\n },\n 'callback'\n );\n });\n },\n withParams: (params: object) => {\n nodeParams = params;\n return linkManagerInstance;\n },\n updateTopNavigation: (): void => {\n this.dispatchLuigiEvent(Events.UPDATE_TOP_NAVIGATION_REQUEST, {});\n },\n pathExists: () => {\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.PATH_EXISTS_REQUEST,\n this.thisComponent,\n {},\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n },\n 'callback'\n );\n });\n },\n openAsDrawer: (route: string, drawerSettings = {}) => {\n linkManagerInstance.navigate(route, { drawer: drawerSettings });\n },\n openAsModal: (route: string, modalSettings = {}) => {\n linkManagerInstance.navigate(route, { modal: modalSettings });\n },\n openAsSplitView: (route: string, splitViewSettings = {}) => {\n linkManagerInstance.navigate(route, {\n splitView: splitViewSettings\n });\n },\n goBack: (goBackContext: object) => {\n this.dispatchLuigiEvent(Events.GO_BACK_REQUEST, goBackContext);\n },\n hasBack: () => {\n return false;\n }\n };\n\n return linkManagerInstance;\n },\n uxManager: () => {\n return {\n showAlert: (alertSettings: object) => {\n this.dispatchLuigiEvent(Events.ALERT_REQUEST, alertSettings);\n },\n showConfirmationModal: (settings: object) => {\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n this.thisComponent,\n settings,\n (data) => {\n if (data) {\n resolve(data);\n } else {\n reject(new Error('No data'));\n }\n },\n 'callback'\n );\n });\n },\n getCurrentTheme: (): string | undefined => {\n return this.thisComponent.theme;\n },\n closeUserSettings: () => {\n this.dispatchLuigiEvent(Events.CLOSE_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n openUserSettings: () => {\n this.dispatchLuigiEvent(Events.OPEN_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n collapseLeftSideNav: () => {\n this.dispatchLuigiEvent(Events.COLLAPSE_LEFT_NAV_REQUEST, {});\n },\n getDirtyStatus: () => {\n return this.thisComponent.dirtyStatus || false;\n },\n getDocumentTitle: () => {\n return this.thisComponent.documentTitle;\n },\n setDocumentTitle: (title: string) => {\n this.dispatchLuigiEvent(Events.SET_DOCUMENT_TITLE_REQUEST, title);\n },\n removeBackdrop: () => {\n this.dispatchLuigiEvent(Events.REMOVE_BACKDROP_REQUEST, {});\n },\n hideAppLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n }\n };\n },\n getCurrentLocale: (): string | undefined => {\n return this.thisComponent.locale;\n },\n getActiveFeatureToggles: (): string[] => {\n return this.thisComponent.activeFeatureToggleList || [];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n publishEvent: (ev: any) => {\n if (eventBusElement && eventBusElement.eventBus) {\n // compound component use case only\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n }\n\n const payload = {\n id: ev.type,\n _metaData: {\n nodeId,\n wc_id,\n src: component\n },\n data: ev.detail\n };\n\n this.dispatchLuigiEvent(Events.CUSTOM_MESSAGE, payload);\n },\n luigiClientInit: () => {\n this.dispatchLuigiEvent(Events.INITIALIZED, {});\n },\n addNodeParams: (params: object, keepBrowserHistory: boolean) => {\n if (isCompoundChild) {\n return;\n }\n\n this.dispatchLuigiEvent(Events.ADD_NODE_PARAMS_REQUEST, {\n params,\n keepBrowserHistory\n });\n },\n getNodeParams: (shouldDesanitise: boolean): object => {\n if (isCompoundChild) {\n return {};\n }\n\n if (shouldDesanitise) {\n return deSanitizeParamsMap(this.thisComponent.nodeParams);\n }\n\n return this.thisComponent.nodeParams || {};\n },\n setAnchor: (anchor: string) => {\n if (isCompoundChild) {\n return;\n }\n\n this.dispatchLuigiEvent(Events.SET_ANCHOR_LINK_REQUEST, anchor);\n },\n getAnchor: (): string => {\n return this.thisComponent.anchor || '';\n },\n getCoreSearchParams: (): object => {\n return this.thisComponent.searchParams || {};\n },\n getPathParams: (): object => {\n return this.thisComponent.pathParams || {};\n },\n getClientPermissions: (): object => {\n return this.thisComponent.clientPermissions || {};\n },\n getUserSettings: (): object => {\n return this.thisComponent.userSettings || {};\n },\n setViewGroupData: (data: object) => {\n this.dispatchLuigiEvent(Events.SET_VIEW_GROUP_DATA_REQUEST, data);\n }\n };\n }\n\n /**\n * Attaches Client Api to web component\n * if __postProcess defined allow for custom setting of clientApi when developers want to decide how to add it to their mf\n * otherwise just attach it to the wc webcomponent alongside the context directly.\n *\n * @param wc web component to attach to\n * @param wc_id a tagname that is used when creating the web component element\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param viewUrl url to render content from\n * @param ctx context to be passed to the web component\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n initWC(\n wc: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n wc_id: string,\n eventBusElement: ContainerElement,\n viewUrl: string,\n ctx: object,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n const clientAPI = this.createClientAPI(eventBusElement, nodeId, wc_id, wc, isCompoundChild);\n\n if (wc.__postProcess) {\n const url =\n new URL(document.baseURI).origin === new URL(viewUrl, document.baseURI).origin\n ? new URL('./', new URL(viewUrl, document.baseURI))\n : new URL('./', viewUrl);\n\n wc.__postProcess(ctx, clientAPI, url.origin + url.pathname);\n } else {\n wc.context = ctx;\n wc.LuigiClient = clientAPI;\n }\n }\n\n /**\n * Generates a unique web component id (tagname) based on the viewUrl\n * returns a string that can be used as part of a tagname, only alphanumeric\n * characters and no whitespaces.\n */\n generateWCId(viewUrl: string): string {\n let charRep = '';\n const normalizedViewUrl = new URL(viewUrl, encodeURI(location.href)).href;\n\n for (let i = 0; i < normalizedViewUrl.length; i++) {\n charRep += normalizedViewUrl.charCodeAt(i).toString(16);\n }\n\n return 'luigi-wc-' + charRep;\n }\n\n /**\n * Does a module import from viewUrl and defines a new web component\n * with the default export of the module or the first export extending HTMLElement if no default is\n * specified.\n * @param viewUrl url to render content from\n * @param wc_id a tagname that is used when creating the web component element\n * @returns a promise that gets resolved after successfull import\n */\n registerWCFromUrl(viewUrl: string, wc_id: string): Promise<unknown> {\n const i18nViewUrl = this.processViewUrl(viewUrl);\n\n return new Promise((resolve, reject) => {\n if (this.checkWCUrl(i18nViewUrl)) {\n this.dynamicImport(i18nViewUrl)\n .then((module) => {\n try {\n if (!window.customElements.get(wc_id)) {\n let cmpClazz = module.default;\n\n if (!HTMLElement.isPrototypeOf(cmpClazz)) {\n const props = Object.keys(module);\n\n for (let i = 0; i < props.length; i++) {\n cmpClazz = module[props[i]];\n\n if (HTMLElement.isPrototypeOf(cmpClazz)) {\n break;\n }\n }\n }\n\n window.customElements.define(wc_id, cmpClazz);\n }\n resolve(1);\n } catch (err) {\n reject(err);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } else {\n const message = `Error: View URL '${i18nViewUrl}' not allowed to be included`;\n reject(message);\n }\n });\n }\n\n /**\n * Handles the import of self registered web component bundles, i.e. the web component\n * is added to the customElements registry by the bundle code rather than by luigi.\n *\n * @param {*} node the corresponding navigation node\n * @param {*} viewUrl the source of the wc bundle\n * @param {*} onload callback function executed after script attached and loaded\n */\n includeSelfRegisteredWCFromUrl(node: WebComponentNode, viewUrl: string, onload: () => void) {\n if (this.checkWCUrl(viewUrl)) {\n /** Append reg function to luigi object if not present */\n if (!this.containerService.getContainerManager()._registerWebcomponent) {\n this.containerService.getContainerManager()._registerWebcomponent = (\n srcString: string,\n el: CustomElementConstructor\n ) => {\n window.customElements.define(this.generateWCId(srcString), el);\n };\n }\n\n // @ts-ignore\n if (!window.Luigi) {\n // @ts-ignore\n window.Luigi = {};\n // @ts-ignore\n if (!window.Luigi._registerWebcomponent) {\n // @ts-ignore\n window.Luigi._registerWebcomponent = (src, element) => {\n this.containerService.getContainerManager()._registerWebcomponent(src, element);\n };\n }\n }\n\n const scriptTag = document.createElement('script');\n\n scriptTag.setAttribute('src', viewUrl);\n\n if (node?.webcomponent?.type === 'module') {\n scriptTag.setAttribute('type', 'module');\n }\n\n scriptTag.setAttribute('defer', 'true');\n scriptTag.addEventListener('load', () => {\n onload();\n });\n document.body.appendChild(scriptTag);\n } else {\n console.warn(`View URL '${viewUrl}' not allowed to be included`);\n }\n }\n\n /**\n * Checks if a url is allowed to be included, based on 'navigation.validWebcomponentUrls' in luigi config.\n * Returns true, if allowed.\n *\n * @param {*} url the url string to check\n */\n checkWCUrl(url: string): boolean {\n // if (url.indexOf('://') > 0 || url.trim().indexOf('//') === 0) {\n // const ur = new URL(url);\n // if (ur.host === window.location.host) {\n // return true; // same host is okay\n // }\n\n // const valids = LuigiConfig.getConfigValue('navigation.validWebcomponentUrls');\n // if (valids && valids.length > 0) {\n // for (let el of valids) {\n // try {\n // if (new RegExp(el).test(url)) {\n // return true;\n // }\n // } catch (e) {\n // console.error(e);\n // }\n // }\n // }\n // return false;\n // }\n // relative URL is okay\n // if (url === 'test.js') {\n // return false;\n // }\n\n return true;\n }\n\n /**\n * Adds a web component defined by viewUrl to the wc_container and sets the node context.\n * If the web component is not defined yet, it gets imported.\n *\n * @param viewUrl url to render content from\n * @param wc_container web component container element\n * @param context luigi context\n * @param node node to operate on\n * @param nodeId id identifying the node\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n renderWebComponent(\n viewUrl: string,\n wc_container: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n context: object,\n node: WebComponentNode,\n nodeId?: string,\n isCompoundChild?: boolean\n ) {\n const i18nViewUrl = this.processViewUrl(viewUrl, { context });\n const wc_id = node?.webcomponent?.tagName || this.generateWCId(i18nViewUrl);\n const wcItemPlaceholder = document.createElement('div');\n\n wc_container.appendChild(wcItemPlaceholder);\n wc_container._luigi_node = node;\n\n if (window.customElements.get(wc_id)) {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId || '', isCompoundChild);\n } else {\n /** Custom import function, if defined */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).luigiWCFn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).luigiWCFn(i18nViewUrl, wc_id, wcItemPlaceholder, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId || '', isCompoundChild);\n });\n } else if (node?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(node, i18nViewUrl, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId || '', isCompoundChild);\n });\n } else {\n this.registerWCFromUrl(i18nViewUrl, wc_id)\n .then(() => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId || '', isCompoundChild);\n })\n .catch((error) => {\n console.warn('ERROR =>', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n }\n }\n\n /**\n * Creates a compound container according to the given renderer.\n * Returns a promise that gets resolved with the created container DOM element.\n *\n * @param {DefaultCompoundRenderer} renderer\n */\n createCompoundContainerAsync(\n renderer: WebComponentRenderer,\n ctx: object,\n navNode: WebComponentNode\n ): Promise<HTMLElement> {\n return new Promise((resolve, reject) => {\n if (renderer.viewUrl) {\n try {\n const wc_id = navNode?.webcomponent?.tagName || this.generateWCId(renderer.viewUrl);\n if (navNode?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(navNode, renderer.viewUrl, () => {\n const wc = document.createElement(wc_id);\n\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl || '', ctx, '_root');\n resolve(wc);\n });\n } else {\n this.registerWCFromUrl(renderer.viewUrl, wc_id)\n .then(() => {\n const wc = document.createElement(wc_id);\n\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl || '', ctx, '_root');\n resolve(wc);\n })\n .catch((error) => {\n console.warn('Error: ', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n } catch (error) {\n reject(error);\n }\n } else {\n // @ts-ignore\n resolve(renderer.createCompoundContainer());\n }\n });\n }\n\n /**\n * Responsible for rendering web component compounds based on a renderer or a nesting\n * micro frontend.\n *\n * @param {*} navNode the navigation node defining the compound\n * @param {ContainerElement} wc_container the web component container dom element\n * @param {*} context the luigi node context\n */\n renderWebComponentCompound(\n navNode: WebComponentNode,\n wc_container: ContainerElement,\n context: object\n ): Promise<ContainerElement> {\n let renderer;\n\n if (navNode.webcomponent && navNode.viewUrl) {\n renderer = new DefaultCompoundRenderer();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (renderer as any).viewUrl = this.processViewUrl(navNode.viewUrl, { context });\n renderer.createCompoundItemContainer = (layoutConfig: LayoutConfig) => {\n const cnt = document.createElement('div');\n\n if (layoutConfig?.slot) {\n cnt.setAttribute('slot', layoutConfig.slot);\n }\n\n return cnt;\n };\n } else if (navNode.compound?.renderer) {\n renderer = resolveRenderer(navNode.compound.renderer);\n }\n\n renderer = renderer || new DefaultCompoundRenderer();\n\n return new Promise((resolve) => {\n this.createCompoundContainerAsync(renderer, context, navNode)\n .then((compoundCnt: ContainerElement) => {\n wc_container._luigi_mfe_webcomponent = compoundCnt;\n wc_container._luigi_node = navNode;\n\n const ebListeners = {};\n\n /* eslint-disable */\n compoundCnt.eventBus = {\n listeners: ebListeners,\n onPublishEvent: (event: any, srcNodeId: any, wcId: any) => {\n const listeners = (ebListeners as any)[srcNodeId + '.' + event.type] || [];\n\n listeners.push(...((ebListeners as any)['*.' + event.type] || []));\n\n listeners.forEach((listenerInfo: any) => {\n const target =\n listenerInfo.wcElement || compoundCnt.querySelector('[nodeId=' + listenerInfo.wcElementId + ']');\n\n if (target) {\n target.dispatchEvent(\n new CustomEvent(listenerInfo.action, {\n detail: listenerInfo.converter ? listenerInfo.converter(event.detail) : event.detail\n })\n );\n } else {\n console.debug('Could not find event target', listenerInfo);\n }\n });\n }\n };\n\n navNode.compound?.children?.forEach((wc: any, index: number) => {\n const ctx = { ...context, ...wc.context };\n const compoundItemCnt = renderer.createCompoundItemContainer(wc.layoutConfig);\n\n (compoundItemCnt as any).eventBus = compoundCnt.eventBus;\n renderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n\n const nodeId = wc.id || 'gen_' + index;\n\n this.renderWebComponent(wc.viewUrl, compoundItemCnt, ctx, wc, nodeId, true);\n registerEventListeners(ebListeners, wc, nodeId);\n });\n /* eslint-enable */\n\n wc_container.appendChild(compoundCnt);\n // listener for nesting wc\n registerEventListeners(ebListeners, navNode.compound, '_root', compoundCnt);\n resolve(compoundCnt);\n })\n .catch((error) => {\n // dispatch an error event to be handled core sid\n console.warn('Error: ', error);\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n });\n }\n}\n","<svelte:options\n customElement={{\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n allowRules: { type: 'Array', reflect: false, attribute: 'allow-rules' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n authData: { type: 'Object', reflect: false, attribute: 'auth-data' },\n clientPermissions: { type: 'Object', reflect: false, attribute: 'client-permissions' },\n context: { type: 'String', reflect: true, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n label: { type: 'String', reflect: false, attribute: 'label' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n sandboxRules: { type: 'Array', reflect: false, attribute: 'sandbox-rules' },\n searchParams: { type: 'Object', reflect: false, attribute: 'search-params' },\n skipCookieCheck: { type: 'String', reflect: false, attribute: 'skip-cookie-check' },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: { type: 'Object', reflect: false, attribute: 'user-settings' },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n\n return class extends customElementConstructor {\n sendCustomMessage = notInitFn('sendCustomMessage');\n updateContext = notInitFn('updateContext');\n updateViewUrl = notInitFn('updateViewUrl');\n closeAlert = notInitFn('closeAlert');\n attributeChangedCallback(name, oldValue, newValue) {\n if (this.containerInitialized) {\n if (name === 'context') {\n if (oldValue !== newValue) {\n this.updateContext(JSON.parse(newValue));\n }\n }\n\n if (name === 'auth-data') {\n ContainerAPI.updateAuthData(this.iframeHandle, JSON.parse(newValue));\n }\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import { ContainerAPI } from './api/container-api';\n import { Events } from './constants/communication';\n import type { IframeHandle, ContainerElement } from './constants/container.model';\n import { containerService } from './services/container.service';\n import { getAllowRules } from './services/iframe-helpers';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n interface Props {\n activeFeatureToggleList: string[];\n allowRules: string[];\n anchor: string;\n authData: any;\n clientPermissions: any;\n context: string;\n deferInit: boolean;\n dirtyStatus: boolean;\n documentTitle: string;\n hasBack: boolean;\n label: string;\n locale: string;\n noShadow: boolean;\n nodeParams: any;\n pathParams: any;\n sandboxRules: string[];\n searchParams: any;\n skipCookieCheck: 'false' | 'true';\n skipInitCheck: boolean;\n theme: string;\n userSettings: any;\n viewurl: string;\n webcomponent: any;\n }\n /* eslint-enable */\n\n let {\n activeFeatureToggleList,\n allowRules,\n anchor,\n authData,\n clientPermissions,\n context = $bindable(),\n deferInit,\n dirtyStatus,\n documentTitle,\n hasBack,\n label,\n locale,\n noShadow,\n nodeParams,\n pathParams,\n sandboxRules,\n searchParams,\n skipCookieCheck,\n skipInitCheck,\n theme,\n userSettings,\n viewurl,\n webcomponent\n }: Props = $props();\n\n let containerInitialized = $state(false);\n let mainComponent: ContainerElement;\n\n const iframeHandle: IframeHandle = $state({});\n const webcomponentService = new WebComponentService();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (containerInitialized) {\n return;\n }\n\n thisComponent.sendCustomMessage = (id: string, data?: object) => {\n ContainerAPI.sendCustomMessage(\n id,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n !!webcomponent,\n iframeHandle,\n data\n );\n };\n\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n context = JSON.stringify(contextObj);\n\n if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent.context = contextObj;\n } else {\n ContainerAPI.updateContext(contextObj, internal, iframeHandle);\n }\n };\n\n thisComponent.closeAlert = (id: string, dismissKey: string) => {\n ContainerAPI.closeAlert(id, dismissKey, iframeHandle);\n };\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n\n const ctx = GenericHelperFunctions.resolveContext(context);\n\n thisComponent.updateViewUrl = (viewUrl: string, internal?: object) => {\n if (viewUrl?.length) {\n ContainerAPI.updateViewUrl(viewUrl, GenericHelperFunctions.resolveContext(context), internal, iframeHandle);\n }\n };\n\n if (webcomponent && webcomponent != 'false') {\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n\n const webComponentValue = GenericHelperFunctions.checkWebcomponentValue(webcomponent);\n\n webcomponentService.renderWebComponent(\n viewurl,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n ctx,\n typeof webComponentValue === 'object' ? { webcomponent: webComponentValue } : {}\n );\n } else {\n if (!thisComponent.getNoShadow()) {\n // removing mainComponent\n thisComponent.innerHTML = '';\n\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n\n shadow.append(mainComponent);\n }\n }\n\n if (skipInitCheck) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent).addEventListener('wc_ready', () => {\n if (\n !(thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent?.deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n }\n\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any = mainComponent.parentNode;\n\n thisComponent.iframeHandle = iframeHandle;\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n\n if (!deferInit) {\n initialize(thisComponent);\n }\n });\n\n onDestroy(async () => {});\n</script>\n\n<main bind:this={mainComponent} class={webcomponent ? undefined : 'lui-isolated'}>\n {#if containerInitialized}\n {#if !webcomponent || webcomponent === 'false'}\n <style>\n main.lui-isolated,\n .lui-isolated iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n </style>\n <iframe\n bind:this={iframeHandle.iframe}\n src={viewurl}\n title={label}\n allow={getAllowRules(allowRules)}\n sandbox={sandboxRules ? sandboxRules.join(' ') : undefined}\n ></iframe>\n {/if}\n {/if}\n</main>\n","/**\n * Retrieves the allow rules for iframes and modifies them according to w3c standard conditions.\n * @param {string[]} allowRules - An array of allow rules.\n * @returns {string|undefined} The modified allow rules joined as a single string, or undefined if allowRules is falsy.\n */\nexport const getAllowRules = (allowRules: string[]): string | undefined => {\n if (!allowRules) return undefined;\n\n const rules = allowRules;\n\n rules.forEach((rule, index) => {\n rules[index] = rule + (rule.indexOf(';') != -1 ? '' : ';');\n rules[index] = allowRules[index].replaceAll('\"', \"'\");\n });\n\n return rules.join(' ');\n};\n","import { hydrating } from '../hydration.js';\n\n/**\n * @param {SVGElement} dom\n * @param {string} value\n * @returns {void}\n */\nexport function set_svg_class(dom, value) {\n\t// @ts-expect-error need to add __className to patched prototype\n\tvar prev_class_name = dom.__className;\n\tvar next_class_name = to_class(value);\n\n\tif (hydrating && dom.getAttribute('class') === next_class_name) {\n\t\t// In case of hydration don't reset the class as it's already correct.\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t} else if (\n\t\tprev_class_name !== next_class_name ||\n\t\t(hydrating && dom.getAttribute('class') !== next_class_name)\n\t) {\n\t\tif (next_class_name === '') {\n\t\t\tdom.removeAttribute('class');\n\t\t} else {\n\t\t\tdom.setAttribute('class', next_class_name);\n\t\t}\n\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t}\n}\n\n/**\n * @param {MathMLElement} dom\n * @param {string} value\n * @returns {void}\n */\nexport function set_mathml_class(dom, value) {\n\t// @ts-expect-error need to add __className to patched prototype\n\tvar prev_class_name = dom.__className;\n\tvar next_class_name = to_class(value);\n\n\tif (hydrating && dom.getAttribute('class') === next_class_name) {\n\t\t// In case of hydration don't reset the class as it's already correct.\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t} else if (\n\t\tprev_class_name !== next_class_name ||\n\t\t(hydrating && dom.getAttribute('class') !== next_class_name)\n\t) {\n\t\tif (next_class_name === '') {\n\t\t\tdom.removeAttribute('class');\n\t\t} else {\n\t\t\tdom.setAttribute('class', next_class_name);\n\t\t}\n\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t}\n}\n\n/**\n * @param {HTMLElement} dom\n * @param {string} value\n * @returns {void}\n */\nexport function set_class(dom, value) {\n\t// @ts-expect-error need to add __className to patched prototype\n\tvar prev_class_name = dom.__className;\n\tvar next_class_name = to_class(value);\n\n\tif (hydrating && dom.className === next_class_name) {\n\t\t// In case of hydration don't reset the class as it's already correct.\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t} else if (\n\t\tprev_class_name !== next_class_name ||\n\t\t(hydrating && dom.className !== next_class_name)\n\t) {\n\t\t// Removing the attribute when the value is only an empty string causes\n\t\t// peformance issues vs simply making the className an empty string. So\n\t\t// we should only remove the class if the the value is nullish.\n\t\tif (value == null) {\n\t\t\tdom.removeAttribute('class');\n\t\t} else {\n\t\t\tdom.className = next_class_name;\n\t\t}\n\n\t\t// @ts-expect-error need to add __className to patched prototype\n\t\tdom.__className = next_class_name;\n\t}\n}\n\n/**\n * @template V\n * @param {V} value\n * @returns {string | V}\n */\nfunction to_class(value) {\n\treturn value == null ? '' : value;\n}\n\n/**\n * @param {Element} dom\n * @param {string} class_name\n * @param {boolean} value\n * @returns {void}\n */\nexport function toggle_class(dom, class_name, value) {\n\tif (value) {\n\t\tif (dom.classList.contains(class_name)) return;\n\t\tdom.classList.add(class_name);\n\t} else {\n\t\tif (!dom.classList.contains(class_name)) return;\n\t\tdom.classList.remove(class_name);\n\t}\n}\n","import { DEV } from 'esm-env';\nimport { queue_micro_task } from './task.js';\nimport { register_style } from '../dev/css.js';\n\n/**\n * @param {Node} anchor\n * @param {{ hash: string, code: string }} css\n */\nexport function append_styles(anchor, css) {\n\t// Use `queue_micro_task` to ensure `anchor` is in the DOM, otherwise getRootNode() will yield wrong results\n\tqueue_micro_task(() => {\n\t\tvar root = anchor.getRootNode();\n\n\t\tvar target = /** @type {ShadowRoot} */ (root).host\n\t\t\t? /** @type {ShadowRoot} */ (root)\n\t\t\t: /** @type {Document} */ (root).head ?? /** @type {Document} */ (root.ownerDocument).head;\n\n\t\t// Always querying the DOM is roughly the same perf as additionally checking for presence in a map first assuming\n\t\t// that you'll get cache hits half of the time, so we just always query the dom for simplicity and code savings.\n\t\tif (!target.querySelector('#' + css.hash)) {\n\t\t\tconst style = document.createElement('style');\n\t\t\tstyle.id = css.hash;\n\t\t\tstyle.textContent = css.code;\n\n\t\t\ttarget.appendChild(style);\n\n\t\t\tif (DEV) {\n\t\t\t\tregister_style(css.hash, style);\n\t\t\t}\n\t\t}\n\t});\n}\n","<svelte:options\n customElement={{\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n clientPermissions: {\n type: 'Object',\n reflect: false,\n attribute: 'client-permissions'\n },\n compoundConfig: {\n type: 'Object',\n reflect: false,\n attribute: 'compound-config'\n },\n context: { type: 'String', reflect: true, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow', reflect: false },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n searchParams: {\n type: 'Object',\n reflect: false,\n attribute: 'search-params'\n },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: {\n type: 'Object',\n reflect: false,\n attribute: 'user-settings'\n },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n\n return class extends customElementConstructor {\n updateContext = notInitFn('updateContext');\n attributeChangedCallback(name, oldValue, newValue) {\n if (this.containerInitialized && name === 'context') {\n if (oldValue !== newValue) {\n this.updateContext(JSON.parse(newValue));\n }\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { Events } from './constants/communication';\n import type { ContainerElement } from './constants/container.model';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n interface Props {\n activeFeatureToggleList: string[];\n anchor: string;\n clientPermissions: any;\n compoundConfig: any;\n context: string;\n deferInit: boolean;\n dirtyStatus: boolean;\n documentTitle: string;\n hasBack: boolean;\n locale: string;\n noShadow: boolean;\n nodeParams: any;\n pathParams: any;\n searchParams: any;\n skipInitCheck: boolean;\n theme: string;\n userSettings: any;\n viewurl: string;\n webcomponent: any;\n }\n /* eslint-enable */\n\n let {\n activeFeatureToggleList,\n anchor,\n clientPermissions,\n compoundConfig,\n context = $bindable(),\n deferInit = $bindable(),\n dirtyStatus,\n documentTitle,\n hasBack,\n locale,\n noShadow,\n nodeParams,\n pathParams,\n searchParams,\n skipInitCheck,\n theme,\n userSettings,\n viewurl,\n webcomponent\n }: Props = $props();\n\n let containerInitialized = $state(false);\n let mainComponent: ContainerElement;\n let eventBusElement: ContainerElement;\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!compoundConfig || containerInitialized) {\n return;\n }\n\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n const rootElement = thisComponent.getNoShadow() ? thisComponent : mainComponent;\n\n rootElement._luigi_mfe_webcomponent.context = contextObj;\n context = JSON.stringify(contextObj);\n\n const compoundChildrenQueryElement = rootElement._luigi_mfe_webcomponent;\n\n if (compoundChildrenQueryElement) {\n const compoundChildren = compoundChildrenQueryElement.querySelectorAll('[lui_web_component]');\n\n compoundChildren?.forEach((item) => {\n const ctx = item.context || {};\n\n item.context = Object.assign(ctx, contextObj);\n });\n }\n };\n\n const ctx = GenericHelperFunctions.resolveContext(context);\n\n deferInit = false;\n\n const node = {\n compound: compoundConfig,\n viewUrl: viewurl,\n webcomponent: GenericHelperFunctions.checkWebcomponentValue(webcomponent) || true\n };\n\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n\n webcomponentService\n .renderWebComponentCompound(node, thisComponent.getNoShadow() ? thisComponent : mainComponent, ctx)\n .then((compCnt: ContainerElement) => {\n eventBusElement = compCnt;\n\n if (skipInitCheck || !node.viewUrl) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (eventBusElement.LuigiClient && !eventBusElement.deferLuigiClientWCInit) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any =\n mainComponent.getRootNode() === document\n ? mainComponent.parentNode\n : (mainComponent.getRootNode() as ShadowRoot).host;\n\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n\n if (!deferInit) {\n initialize(thisComponent);\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n });\n</script>\n\n<main bind:this={mainComponent}></main>\n\n<style>\n main {\n width: 100%;\n height: 100%;\n border: none;\n }\n</style>\n","import type { Component } from 'svelte';\nimport LuigiContainer from './LuigiContainer.svelte';\nimport LuigiCompoundContainer from './LuigiCompoundContainer.svelte';\nimport { Events } from './constants/communication';\nexport { default as LuigiContainer } from './LuigiContainer.svelte';\nexport { default as LuigiCompoundContainer } from './LuigiCompoundContainer.svelte';\nexport type { PathExistsEvent } from './constants/event-type';\n\nexport default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', (LuigiContainer as Component).element as CustomElementConstructor);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define(\n 'luigi-compound-container',\n (LuigiCompoundContainer as Component).element as CustomElementConstructor\n );\n}\n"],"names":["window","__svelte","v","Set","add","HYDRATION_START_ELSE","HYDRATION_ERROR","UNINITIALIZED","Symbol","FILENAME","PASSIVE_EVENTS","is_array","Array","isArray","array_from","from","object_keys","Object","keys","define_property","defineProperty","get_descriptor","getOwnPropertyDescriptor","get_descriptors","getOwnPropertyDescriptors","object_prototype","prototype","array_prototype","get_prototype_of","getPrototypeOf","BRANCH_EFFECT","ROOT_EFFECT","UNOWNED","DISCONNECTED","CLEAN","DIRTY","MAYBE_DIRTY","INERT","DESTROYED","EFFECT_TRANSPARENT","EFFECT_HAS_DERIVED","STATE_SYMBOL","LEGACY_PROPS","LOADING_ATTR_SYMBOL","equals","value","this","safe_equals","a","b","bind_invalid_export","component","key","name","Error","bind_not_bindable","source","stack","f","reactions","version","state","active_reaction","derived_sources","push","push_derived_source","mutable_source","initial_value","immutable","s","set","includes","e.state_unsafe_mutation","increment_version","mark_reactions","active_effect","new_deps","set_signal_status","schedule_effect","untracked_writes","set_untracked_writes","internal_set","signal","status","length","i","reaction","flags","hydration_mismatch","location","console","warn","state_proxy_equality_mismatch","operator","hydrate_node","hydrating","set_hydrating","set_hydrate_node","node","w.hydration_mismatch","hydrate_next","get_next_sibling","boundaries","chrome_pattern","firefox_pattern","get_stack","entries","line","split","match","exec","file","column","mark_module_start","start","end","mark_module_end","boundaries_file","boundary","proxy","parent","prev","metadata","sources","Map","is_proxied_array","Proxy","_","prop","descriptor","configurable","enumerable","writable","e.state_descriptors_fixed","get","undefined","deleteProperty","target","ls","n","Number","isInteger","update_version","receiver","exists","Reflect","has","other_s","call","ownKeys","own_keys","filter","setPrototypeOf","e.state_prototype_fixed","d","get_proxied_value","strict_equals","equal","w.state_proxy_equality_mismatch","$window","first_child_getter","next_sibling_getter","init_operations","element_prototype","Element","node_prototype","Node","__click","__className","__attributes","__styles","__e","Text","__t","create_text","document","createTextNode","get_first_child","first_child","fragment","is_text","first","Comment","data","destroy_derived_children","derived","children","child","destroy_derived","destroy_effect","execute_derived","prev_active_effect","set_active_effect","get_derived_parent_effect","update_reaction","update_derived","skip_reaction","deps","remove_reactions","ctx","validate_effect","rune","e.effect_orphan","e.effect_in_unowned_derived","is_destroying_effect","e.effect_in_teardown","create_effect","type","fn","sync","is_root","parent_effect","effect","component_context","deriveds","nodes_start","nodes_end","last","next","teardown","transitions","previously_flushing_effect","is_flushing_effect","set_is_flushing_effect","update_effect","e","parent_last","push_effect","render_effect","template_effect","block","RENDER_EFFECT","branch","execute_effect_teardown","previously_destroying_effect","previous_reaction","set_is_destroying_effect","set_active_reaction","destroy_effect_deriveds","destroy_effect_children","remove_dom","removed","remove","transition","stop","unlink_effect","pause_effect","callback","pause_children","remaining","check","out","run_out_transitions","local","is_global","sibling","resume_effect","resume_children","check_dirtiness","in","is_micro_task_queued","current_queued_micro_tasks","process_micro_tasks","tasks","slice","arr","run_all","queue_micro_task","queueMicrotask","lifecycle_outside_component","FLUSH_MICROTASK","is_throwing_error","scheduler_mode","last_scheduled_effect","queued_root_effects","flush_count","skipped_deps","current_version","dependencies","is_unowned","dependency","handle_error","error","previous_effect","should_rethrow_error","current","propagate_error","previous_deps","previous_skipped_deps","previous_untracked_writes","previous_skip_reaction","prev_derived_sources","previous_component_context","result","remove_reaction","index","indexOf","new_length","pop","start_index","destroy_block_effect_children","infinite_loop_guard","e.effect_update_depth_exceeded","flush_queued_root_effects","root_effects","collected_effects","process_effects","flush_queued_effects","effects","process_deferred","previous_queued_root_effects","current_effect","main_loop","is_branch","is_skippable_branch","parent_sibling","flush_sync","previous_scheduler_mode","is_derived","e.state_unsafe_local_read","untrack","STATUS_MASK","props","runes","p","c","m","x","l","context_stack_item","component_effects","component_effect","add_locations","filename","locations","args","dom","assign_locations","nodeType","firstChild","assign_location","element","__svelte_meta","loc","depth","comment","nextSibling","all_registered_events","root_event_handles","handle_event_propagation","event","handler_element","owner_document","ownerDocument","event_name","path","composedPath","current_target","path_idx","handled_at","__root","at_idx","handler_idx","throw_error","other_errors","parent_element","assignedSlot","parentNode","host","delegated","apply","cancelBubble","currentTarget","assign_nodes","template","content","is_fragment","use_import_node","has_start","startsWith","html","elem","createElement","innerHTML","clone","importNode","cloneNode","append","anchor","before","mount","options","_mount","hydrate","intro","was_hydrating","previous_hydrate_node","instance","recover","e.hydration_failed","textContent","document_listeners","Component","events","context","registered_events","event_handle","passive","addEventListener","unmount","Promise","fulfil","outro","component_root","anchor_node","appendChild","$$events","removeEventListener","delete","removeChild","mounted_components","WeakMap","check_target","e.component_api_invalid_new","legacy_api","function","method","entry","modules","module","get_component","e.component_api_changed","$destroy","$on","$set","if_block","elseif","consequent_effect","alternate_effect","condition","has_branch","set_branch","flag","update_branch","new_condition","mismatch","is_else","remove_nodes","set_attribute","attribute","skip_warning","attributes","getAttribute","nodeName","removeAttribute","descriptors","setters","setters_cache","proto","element_proto","get_setters","setAttribute","is_bound_this","bound_value","element_or_component","bind_this","update","get_value","get_parts","old_parts","parts","onMount","user_effect","cleanup","SvelteElement","is_store_binding","capture_store_binding","previous_is_store_binding","fallback","prop_value","bindable","lazy","is_store_sub","getter","is_entry_props","setter","fallback_value","fallback_dirty","fallback_used","get_fallback","e.props_invalid_value","legacy_parent","$$legacy","mutation","arguments","from_child","inner_current_value","current_value","with_parent_branch","DERIVED","parent_derived","parent_value","child_value","new_value","validate_prop_bindings","$$props","exports","e.bind_invalid_export","e.bind_not_bindable","validate_binding","binding","get_object","get_property","warned","object","property","ran","Svelte4Component","constructor","add_source","$$host","assign","resolve","cb","get_custom_element_value","props_definition","transform","JSON","stringify","parse","create_custom_element","slots","use_shadow_dom","extend","Class","super","$$p_d","observedAttributes","map","toLowerCase","forEach","$$c","$$d","LuigiInternalMessageID","Events","HTMLElement","$$ctor","$$s","$$cn","$$r","$$l","$$l_u","$$me","$$componentCtor","$$slots","attachShadow","mode","listener","unsub","connectedCallback","create_slot","slot","existing_slots","childNodes","get_custom_elements_slots","default","$$g_p","shadowRoot","effect_root","reflect","attribute_value","attributeChangedCallback","attr","_oldValue","newValue","disconnectedCallback","then","attribute_name","find","CUSTOM_MESSAGE","GET_CONTEXT","SEND_CONTEXT_HANDSHAKE","CONTEXT_RECEIVED","NAVIGATION_REQUEST","ALERT_REQUEST","ALERT_CLOSED","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","SHOW_LOADING_INDICATOR_REQUEST","HIDE_LOADING_INDICATOR_REQUEST","SET_CURRENT_LOCALE_REQUEST","LOCAL_STORAGE_SET_REQUEST","RUNTIME_ERROR_HANDLING_REQUEST","SET_ANCHOR_LINK_REQUEST","SET_THIRD_PARTY_COOKIES_REQUEST","BACK_NAVIGATION_REQUEST","GET_CURRENT_ROUTE_REQUEST","SEND_CONTEXT_OBJECT","NAVIGATION_COMPLETED_REPORT","UPDATE_MODAL_PATH_DATA_REQUEST","CHECK_PATH_EXISTS_REQUEST","SET_DIRTY_STATUS_REQUEST","AUTH_SET_TOKEN","GET_CONTEXT_REQUEST","SET_VIEW_GROUP_DATA_REQUEST","SET_DOCUMENT_TITLE_REQUEST","OPEN_USER_SETTINGS_REQUEST","CLOSE_USER_SETTINGS_REQUEST","COLLAPSE_LEFT_NAV_REQUEST","UPDATE_TOP_NAVIGATION_REQUEST","PATH_EXISTS_REQUEST","GO_BACK_REQUEST","HAS_BACK_REQUEST","REMOVE_BACKDROP_REQUEST","GenericHelperFunctions","isFunction","functionToCheck","toString","isObject","objectToCheck","checkWebcomponentValue","webcomponent","resolveContext","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","msgName","messageName","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","dispatch","targetCnt","callbackName","customEvent","CustomEvent","detail","dispatchEvent","getTargetContainer","cnt","globalThis","__luigi_container_manager","container","getContainerManager","messageListener","evData","id","_metaData","internal","thirdPartyCookieCheck","disabled","skipCookieCheck","authData","params","keepBrowserHistory","registerContainer","thisComponent","containerService","ContainerAPI","updateContext","contextObj","internalParameter","withoutSync","updateViewUrl","viewUrl","updateAuthData","sendCustomMessage","mainComponent","isWebcomponent","_luigi_mfe_webcomponent","closeAlert","dismissKey","DefaultCompoundRenderer","rendererObj","rendererObject","config","createCompoundContainer","createCompoundItemContainer","layoutConfig","attachCompoundItem","compoundCnt","compoundItemCnt","CustomCompoundRenderer","use","extends","superRenderer","resolveRenderer","GridCompoundRenderer","containerClass","Date","getTime","mediaQueries","classList","layouts","el","minWidth","maxWidth","mq","columns","rows","gap","minHeight","row","rendererConfig","rendererDef","registerEventListeners","eventbusListeners","navNode","nodeId","wcElement","eventListeners","evID","listenerList","listenerInfo","wcElementId","action","converter","dataConverter","deSanitizeParam","String","replaceAll","WebComponentService","dynamicImport","freeze","import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","isCompoundChild","contains","wc","initWC","replaceChild","_luigi_node","Event","dispatchLuigiEvent","createClientAPI","eventBusElement","linkManager","fromContext","fromClosestContext","fromVirtualTreeRoot","fromParent","nodeParams","linkManagerInstance","navigate","route","settings","link","navigateToIntent","semanticSlug","newPath","paramList","navigationContext","getCurrentRoute","reject","withParams","updateTopNavigation","pathExists","openAsDrawer","drawerSettings","drawer","openAsModal","modalSettings","modal","openAsSplitView","splitViewSettings","splitView","goBack","goBackContext","hasBack","uxManager","showAlert","alertSettings","showConfirmationModal","getCurrentTheme","theme","closeUserSettings","userSettings","openUserSettings","collapseLeftSideNav","getDirtyStatus","dirtyStatus","getDocumentTitle","documentTitle","setDocumentTitle","title","removeBackdrop","hideAppLoadingIndicator","getCurrentLocale","locale","getActiveFeatureToggles","activeFeatureToggleList","publishEvent","ev","eventBus","onPublishEvent","payload","luigiClientInit","addNodeParams","getNodeParams","shouldDesanitise","paramsMap","reduce","sanitizedMap","paramPair","setAnchor","getAnchor","getCoreSearchParams","searchParams","getPathParams","pathParams","getClientPermissions","clientPermissions","getUserSettings","setViewGroupData","clientAPI","__postProcess","url","baseURI","pathname","LuigiClient","generateWCId","charRep","normalizedViewUrl","encodeURI","href","charCodeAt","registerWCFromUrl","i18nViewUrl","checkWCUrl","customElements","cmpClazz","isPrototypeOf","define","err","catch","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","Luigi","scriptTag","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","compound","ebListeners","listeners","srcNodeId","wcId","querySelector","debug","$.prop","allowRules","deferInit","label","noShadow","sandboxRules","skipInitCheck","viewurl","containerInitialized","$.state","$.proxy","webcomponentService","initialize","getNoShadow","$.get","$.equals","webComponentValue","$.strict_equals","initialized","setTimeout","deferLuigiClientWCInit","$.set","async","init","frag","createDocumentFragment","createComment","count","next_sibling","last_sibling","text","after","$.template_effect","$.set_attribute","rules","rule","join","getAllowRules","$.bind_this","$$value","$$render","consequent","consequent_1","main","prev_class_name","next_class_name","to_class","className","customElementConstructor","notInitFn","oldValue","hasAttribute","css","root","getRootNode","head","hash","style","code","compoundConfig","rootElement","compoundChildrenQueryElement","compoundChildren","querySelectorAll","item","compCnt","LuigiContainer","LuigiCompoundContainer"],"mappings":"AAEsB,oBAAXA,SAETA,OAAOC,WAAa,CAAEC,EAAG,IAAIC,MAASD,EAAEE,ICKZ,KCFvB,MAeMC,EAAuB,KAEvBC,EAAkB,CAAE,EAKpBC,EAAgBC,SAGhBC,EAAWD,OAAO,YC0NzBE,EAAiB,CAAC,aAAc,aC1PtC,ICEWC,EAAWC,MAAMC,QACjBC,EAAaF,MAAMG,KACnBC,EAAcC,OAAOC,KACrBC,EAAkBF,OAAOG,eACzBC,EAAiBJ,OAAOK,yBACxBC,EAAkBN,OAAOO,0BACzBC,EAAmBR,OAAOS,UAC1BC,EAAkBf,MAAMc,UACxBE,EAAmBX,OAAOY,eCV9B,MAIMC,EAAgB,GAChBC,EAAc,GAEdC,EAAU,IACVC,EAAe,IACfC,EAAQ,KACRC,EAAQ,KACRC,EAAc,KACdC,EAAQ,KACRC,EAAY,MAGZC,EAAqB,MAKrBC,EAAqB,GAAK,GAE1BC,EAAejC,OAAO,UAEtBkC,EAAelC,OAAO,gBACtBmC,EAAsBnC,OAAO,ICxBnC,SAASoC,EAAOC,GACtB,OAAOA,IA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yBACzDhO,EAAc8N,aAAc,EAC5BP,EAAoBtI,mBAAmB5M,GAAO0C,YAAW,CAAA,OAI/DkT,EAAAb,GAAuB,GACvBpN,EAAcoN,sBAAuB,CAAI,EAG3CxZ,IAAOsa,UAEC,MAAAlO,EACJ6N,EAAAlN,EAAcuP,cAAkB9uB,UAC5Buf,EAAcvT,WACbuT,EAAcuP,cAA6B7iB,KAElD2S,EAAcmO,KAAI,KAChBX,EAAWxN,EAAa,EAGrB8M,KACHU,EAAWxN,GAGbC,EAAiBF,kBAAkBC,GACnCuN,EAAoBvN,cAAgBA,CAAa,sBAIpCkP,GAAAK,GAAAJ,GAAAxO,UAAAA,qoEA3KJiP,iBAMcA,EACnBzP,eANezmB,GAEb,IAAAqC,QAAQC,KAAKtC,EAAO,yFAINm2B,CAAU,iBAC1B,wBAAA7V,CAAyBtgB,EAAMo2B,EAAU3V,GACnChhB,KAAKi0B,sBAAiC,YAAT1zB,GAC3Bo2B,IAAa3V,GACfhhB,KAAKgnB,cAAc/I,KAAKE,MAAM6C,IAKpC,WAAAsT,GACS,OAAAt0B,KAAK42B,aAAa,cAAgB52B,KAAK6zB,aCjDxD,IAAA3U,GAAeA,GAEV4S,eAAetsB,IAAI,oBACtBssB,eAAeG,OAAO,kBAAoB0F,GAA6BplB,SAGpEuf,eAAetsB,IAAI,6BACtBssB,eAAeG,OACb,2BACC2F,GAAqCrlB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,45,46]}
|
|
1
|
+
{"version":3,"file":"bundle.js","sources":["../node_modules/svelte/src/runtime/internal/utils.js","../node_modules/svelte/src/runtime/internal/lifecycle.js","../node_modules/svelte/src/runtime/internal/dom.js","../node_modules/svelte/src/runtime/internal/scheduler.js","../node_modules/svelte/src/runtime/internal/transitions.js","../node_modules/svelte/src/runtime/internal/Component.js","../src/constants/internal-communication.ts","../src/constants/communication.ts","../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../src/utilities/helpers.ts","../src/services/container.service.ts","../src/api/container-api.ts","../src/services/iframe-helpers.ts","../src/services/web-component-helpers.ts","../src/services/webcomponents.service.ts","../src/LuigiContainer.svelte","../src/LuigiCompoundContainer.svelte","../src/main.ts"],"sourcesContent":["/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike<any>}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable<T>} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n","import { custom_event } from './dom.js';\n\nexport let current_component;\n\n/** @returns {void} */\nexport function set_current_component(component) {\n\tcurrent_component = component;\n}\n\nexport function get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#beforeupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.\n *\n * `onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs/svelte#onmount\n * @template T\n * @param {() => import('./private.js').NotFunction<T> | Promise<import('./private.js').NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#afterupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs/svelte#ondestroy\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: never; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * https://svelte.dev/docs/svelte#createeventdispatcher\n * @template {Record<string, any>} [EventMap=any]\n * @returns {import('./public.js').EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst component = get_current_component();\n\treturn (type, detail, { cancelable = false } = {}) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(/** @type {string} */ (type), detail, { cancelable });\n\t\t\tcallbacks.slice().forEach((fn) => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#setcontext\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n\treturn context;\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#getcontext\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs/svelte#getallcontexts\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\treturn get_current_component().$$.context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#hascontext\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\n/**\n * @param component\n * @param event\n * @returns {void}\n */\nexport function bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\tif (callbacks) {\n\t\t// @ts-ignore\n\t\tcallbacks.slice().forEach((fn) => fn.call(this, event));\n\t}\n}\n","import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n\n\tlet children = /** @type {ArrayLike<NodeEx2>} */ (target.childNodes);\n\t// If target is <head>, there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick<T, Exclude<keyof T, K>>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick<T, Exclude<keyof T, K>>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record<string, unknown>} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent<T>}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for <template> may be provided as #document-fragment(11) */ else\n\t\t\t\tthis.e = element(\n\t\t\t\t\t/** @type {keyof HTMLElementTagNameMap} */ (\n\t\t\t\t\t\ttarget.nodeType === 11 ? 'TEMPLATE' : target.nodeName\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tthis.t =\n\t\t\t\ttarget.tagName !== 'TEMPLATE'\n\t\t\t\t\t? target\n\t\t\t\t\t: /** @type {HTMLTemplateElement} */ (target).content;\n\t\t\tthis.c(html);\n\t\t}\n\t\tthis.i(anchor);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(\n\t\t\tthis.e.nodeName === 'TEMPLATE' ? this.e.content.childNodes : this.e.childNodes\n\t\t);\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\t/**\n\t * @returns {void} */\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nexport class HtmlTagHydration extends HtmlTag {\n\t/** @type {Element[]} hydration claimed nodes */\n\tl = undefined;\n\n\tconstructor(is_svg = false, claimed_nodes) {\n\t\tsuper(is_svg);\n\t\tthis.e = this.n = null;\n\t\tthis.l = claimed_nodes;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tif (this.l) {\n\t\t\tthis.n = this.l;\n\t\t} else {\n\t\t\tsuper.c(html);\n\t\t}\n\t}\n\n\t/**\n\t * @returns {void} */\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert_hydration(this.t, this.n[i], anchor);\n\t\t}\n\t}\n}\n\n/**\n * @param {NamedNodeMap} attributes\n * @returns {{}}\n */\nexport function attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t'&': '&',\n\t'<': '<'\n};\n\nconst regex_attribute_characters_to_escape = /[\"&<]/g;\n\n/**\n * Note that the attribute itself should be surrounded in double quotes\n * @param {any} attribute\n */\nfunction escape_attribute(attribute) {\n\treturn String(attribute).replace(regex_attribute_characters_to_escape, (match) => escaped[match]);\n}\n\n/**\n * @param {Record<string, string>} attributes\n */\nexport function stringify_spread(attributes) {\n\tlet str = ' ';\n\tfor (const key in attributes) {\n\t\tif (attributes[key] != null) {\n\t\t\tstr += `${key}=\"${escape_attribute(attributes[key])}\" `;\n\t\t}\n\t}\n\n\treturn str;\n}\n\n/**\n * @param {HTMLElement} element\n * @returns {{}}\n */\nexport function get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach(\n\t\t/** @param {Element} node */ (node) => {\n\t\t\tresult[node.slot || 'default'] = true;\n\t\t}\n\t);\n\treturn result;\n}\n\nexport function construct_svelte_component(component, props) {\n\treturn new component(props);\n}\n\n/**\n * @typedef {Node & {\n * \tclaim_order?: number;\n * \thydrate_init?: true;\n * \tactual_end_child?: NodeEx;\n * \tchildNodes: NodeListOf<NodeEx>;\n * }} NodeEx\n */\n\n/** @typedef {ChildNode & NodeEx} ChildNodeEx */\n\n/** @typedef {NodeEx & { claim_order: number }} NodeEx2 */\n\n/**\n * @typedef {ChildNodeEx[] & {\n * \tclaim_info?: {\n * \t\tlast_index: number;\n * \t\ttotal_claimed: number;\n * \t};\n * }} ChildNodeArray\n */\n","import { run_all } from './utils.js';\nimport { current_component, set_current_component } from './lifecycle.js';\n\nexport const dirty_components = [];\nexport const intros = { enabled: false };\nexport const binding_callbacks = [];\n\nlet render_callbacks = [];\n\nconst flush_callbacks = [];\n\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\n\nlet update_scheduled = false;\n\n/** @returns {void} */\nexport function schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\n/** @returns {Promise<void>} */\nexport function tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\n/** @returns {void} */\nexport function add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\n/** @returns {void} */\nexport function add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\n\nlet flushidx = 0; // Do *not* move this inside the flush() function\n\n/** @returns {void} */\nexport function flush() {\n\t// Do not reenter flush while dirty components are updated, as this can\n\t// result in an infinite loop. Instead, let the inner flush handle it.\n\t// Reentrancy is ok afterwards for bindings etc.\n\tif (flushidx !== 0) {\n\t\treturn;\n\t}\n\tconst saved_component = current_component;\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\ttry {\n\t\t\twhile (flushidx < dirty_components.length) {\n\t\t\t\tconst component = dirty_components[flushidx];\n\t\t\t\tflushidx++;\n\t\t\t\tset_current_component(component);\n\t\t\t\tupdate(component.$$);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// reset dirty state to not end up in a deadlocked state and then rethrow\n\t\t\tdirty_components.length = 0;\n\t\t\tflushidx = 0;\n\t\t\tthrow e;\n\t\t}\n\t\tset_current_component(null);\n\t\tdirty_components.length = 0;\n\t\tflushidx = 0;\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\tupdate_scheduled = false;\n\tseen_callbacks.clear();\n\tset_current_component(saved_component);\n}\n\n/** @returns {void} */\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function flush_render_callbacks(fns) {\n\tconst filtered = [];\n\tconst targets = [];\n\trender_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));\n\ttargets.forEach((c) => c());\n\trender_callbacks = filtered;\n}\n","import { identity as linear, is_function, noop, run_all } from './utils.js';\nimport { now } from './environment.js';\nimport { loop } from './loop.js';\nimport { create_rule, delete_rule } from './style_manager.js';\nimport { custom_event } from './dom.js';\nimport { add_render_callback } from './scheduler.js';\n\n/**\n * @type {Promise<void> | null}\n */\nlet promise;\n\n/**\n * @returns {Promise<void>}\n */\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\treturn promise;\n}\n\n/**\n * @param {Element} node\n * @param {INTRO | OUTRO | boolean} direction\n * @param {'start' | 'end'} kind\n * @returns {void}\n */\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\n\n/**\n * @type {Outro}\n */\nlet outros;\n\n/**\n * @returns {void} */\nexport function group_outros() {\n\toutros = {\n\t\tr: 0,\n\t\tc: [],\n\t\tp: outros // parent group\n\t};\n}\n\n/**\n * @returns {void} */\nexport function check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} [local]\n * @returns {void}\n */\nexport function transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\n/**\n * @param {import('./private.js').Fragment} block\n * @param {0 | 1} local\n * @param {0 | 1} [detach]\n * @param {() => void} [callback]\n * @returns {void}\n */\nexport function transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\tblock.o(local);\n\t} else if (callback) {\n\t\tcallback();\n\t}\n}\n\n/**\n * @type {import('../transition/public.js').TransitionConfig}\n */\nconst null_transition = { duration: 0 };\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ start(): void; invalidate(): void; end(): void; }}\n */\nexport function create_in_transition(node, fn, params) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'in' };\n\tlet config = fn(node, params, options);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\t/**\n\t * @returns {void} */\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tif (task) task.abort();\n\t\trunning = true;\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\t\ttask = loop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\t\t\t\t\tdispatch(node, true, 'end');\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn (running = false);\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\tlet started = false;\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\t\t\tstarted = true;\n\t\t\tdelete_rule(node);\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config(options);\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @returns {{ end(reset: any): void; }}\n */\nexport function create_out_transition(node, fn, params) {\n\t/** @type {TransitionOptions} */\n\tconst options = { direction: 'out' };\n\tlet config = fn(node, params, options);\n\tlet running = true;\n\tlet animation_name;\n\tconst group = outros;\n\tgroup.r += 1;\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tif ('inert' in node) {\n\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\tnode.inert = true;\n\t\t}\n\n\t\tloop((now) => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\t\t\t\t\tdispatch(node, false, 'end');\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config(options);\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && 'inert' in node) {\n\t\t\t\tnode.inert = original_inert_value;\n\t\t\t}\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {TransitionFn} fn\n * @param {any} params\n * @param {boolean} intro\n * @returns {{ run(b: 0 | 1): void; end(): void; }}\n */\nexport function create_bidirectional_transition(node, fn, params, intro) {\n\t/**\n\t * @type {TransitionOptions} */\n\tconst options = { direction: 'both' };\n\tlet config = fn(node, params, options);\n\tlet t = intro ? 0 : 1;\n\n\t/**\n\t * @type {Program | null} */\n\tlet running_program = null;\n\n\t/**\n\t * @type {PendingProgram | null} */\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\t/** @type {boolean} */\n\tlet original_inert_value;\n\n\t/**\n\t * @returns {void} */\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\t/**\n\t * @param {PendingProgram} program\n\t * @param {number} duration\n\t * @returns {Program}\n\t */\n\tfunction init(program, duration) {\n\t\tconst d = /** @type {Program['d']} */ (program.b - t);\n\t\tduration *= Math.abs(d);\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\t/**\n\t * @param {INTRO | OUTRO} b\n\t * @returns {void}\n\t */\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = linear,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\t/**\n\t\t * @type {PendingProgram} */\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif ('inert' in node) {\n\t\t\tif (b) {\n\t\t\t\tif (original_inert_value !== undefined) {\n\t\t\t\t\t// aborted/reversed outro — restore previous inert value\n\t\t\t\t\tnode.inert = original_inert_value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toriginal_inert_value = /** @type {HTMLElement} */ (node).inert;\n\t\t\t\tnode.inert = true;\n\t\t\t}\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\t\t\tif (b) tick(0, 1);\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\t\t\tloop((now) => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tt,\n\t\t\t\t\t\t\trunning_program.b,\n\t\t\t\t\t\t\trunning_program.duration,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\teasing,\n\t\t\t\t\t\t\tconfig.css\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick((t = running_program.b), 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\tconst opts = { direction: b ? 'in' : 'out' };\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config(opts);\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\n/** @typedef {1} INTRO */\n/** @typedef {0} OUTRO */\n/** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */\n/** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */\n\n/**\n * @typedef {Object} Outro\n * @property {number} r\n * @property {Function[]} c\n * @property {Object} p\n */\n\n/**\n * @typedef {Object} PendingProgram\n * @property {number} start\n * @property {INTRO|OUTRO} b\n * @property {Outro} [group]\n */\n\n/**\n * @typedef {Object} Program\n * @property {number} a\n * @property {INTRO|OUTRO} b\n * @property {1|-1} d\n * @property {number} duration\n * @property {number} start\n * @property {number} end\n * @property {Outro} [group]\n */\n","import {\n\tadd_render_callback,\n\tflush,\n\tflush_render_callbacks,\n\tschedule_update,\n\tdirty_components\n} from './scheduler.js';\nimport { current_component, set_current_component } from './lifecycle.js';\nimport { blank_object, is_empty, is_function, run, run_all, noop } from './utils.js';\nimport {\n\tchildren,\n\tdetach,\n\tstart_hydrating,\n\tend_hydrating,\n\tget_custom_elements_slots,\n\tinsert,\n\telement,\n\tattr\n} from './dom.js';\nimport { transition_in } from './transitions.js';\n\n/** @returns {void} */\nexport function bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\n/** @returns {void} */\nexport function create_component(block) {\n\tblock && block.c();\n}\n\n/** @returns {void} */\nexport function claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\n/** @returns {void} */\nexport function mount_component(component, target, anchor) {\n\tconst { fragment, after_update } = component.$$;\n\tfragment && fragment.m(target, anchor);\n\t// onMount happens before the initial afterUpdate\n\tadd_render_callback(() => {\n\t\tconst new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n\t\t// if the component was destroyed immediately\n\t\t// it will update the `$$.on_destroy` reference to `null`.\n\t\t// the destructured on_destroy may still reference to the old array\n\t\tif (component.$$.on_destroy) {\n\t\t\tcomponent.$$.on_destroy.push(...new_on_destroy);\n\t\t} else {\n\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t// most likely as a result of a binding initialising\n\t\t\trun_all(new_on_destroy);\n\t\t}\n\t\tcomponent.$$.on_mount = [];\n\t});\n\tafter_update.forEach(add_render_callback);\n}\n\n/** @returns {void} */\nexport function destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\tflush_render_callbacks($$.after_update);\n\t\trun_all($$.on_destroy);\n\t\t$$.fragment && $$.fragment.d(detaching);\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\n/** @returns {void} */\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= 1 << i % 31;\n}\n\n// TODO: Document the other params\n/**\n * @param {SvelteComponent} component\n * @param {import('./public.js').ComponentConstructorOptions} options\n *\n * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.\n * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.\n * This will be the `add_css` function from the compiled component.\n *\n * @returns {void}\n */\nexport function init(\n\tcomponent,\n\toptions,\n\tinstance,\n\tcreate_fragment,\n\tnot_equal,\n\tprops,\n\tappend_styles = null,\n\tdirty = [-1]\n) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\t/** @type {import('./private.js').T$$} */\n\tconst $$ = (component.$$ = {\n\t\tfragment: null,\n\t\tctx: [],\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t});\n\tappend_styles && append_styles($$.root);\n\tlet ready = false;\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\t\tif ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) {\n\t\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t })\n\t\t: [];\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tstart_hydrating();\n\t\t\t// TODO: what is the correct type here?\n\t\t\t// @ts-expect-error\n\t\t\tconst nodes = children(options.target);\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor);\n\t\tend_hydrating();\n\t\tflush();\n\t}\n\tset_current_component(parent_component);\n}\n\nexport let SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, Function[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<Function, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\n\t\tconstructor($$componentCtor, $$slots, use_shadow_dom) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\t\t\tif (use_shadow_dom) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t}\n\t\t}\n\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tlet node;\n\t\t\t\t\t\tconst obj = {\n\t\t\t\t\t\t\tc: function create() {\n\t\t\t\t\t\t\t\tnode = element('slot');\n\t\t\t\t\t\t\t\tif (name !== 'default') {\n\t\t\t\t\t\t\t\t\tattr(node, 'name', name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @param {HTMLElement} target\n\t\t\t\t\t\t\t * @param {HTMLElement} [anchor]\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tm: function mount(target, anchor) {\n\t\t\t\t\t\t\t\tinsert(target, node, anchor);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\td: function destroy(detaching) {\n\t\t\t\t\t\t\t\tif (detaching) {\n\t\t\t\t\t\t\t\t\tdetach(node);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\t$$slots[name] = [create_slot(name)];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = new this.$$ctor({\n\t\t\t\t\ttarget: this.shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$scope: {\n\t\t\t\t\t\t\tctx: []\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tconst reflect_attributes = () => {\n\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t\tthis.$$d[key] = this.$$c.$$.ctx[this.$$c.$$.props[key]];\n\t\t\t\t\t\tif (this.$$p_d[key].reflect) {\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.$$r = false;\n\t\t\t\t};\n\t\t\t\tthis.$$c.$$.after_update.push(reflect_attributes);\n\t\t\t\treflect_attributes(); // once initially because after_update is added too late for first render\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn && this.$$c) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tObject.keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {import('./public.js').ComponentType} Component A Svelte component constructor\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} accessors Other accessors besides the ones for props the component has\n * @param {boolean} use_shadow_dom Whether to use shadow DOM\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\taccessors,\n\tuse_shadow_dom,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, use_shadow_dom);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn Object.keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tObject.keys(props_definition).forEach((prop) => {\n\t\tObject.defineProperty(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tthis.$$c?.$set({ [prop]: value });\n\t\t\t}\n\t\t});\n\t});\n\taccessors.forEach((accessor) => {\n\t\tObject.defineProperty(Class.prototype, accessor, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[accessor];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ (Class);\n\treturn Class;\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n *\n * @template {Record<string, any>} [Props=any]\n * @template {Record<string, any>} [Events=any]\n */\nexport class SvelteComponent {\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$ = undefined;\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$set = undefined;\n\n\t/** @returns {void} */\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t/**\n\t * @template {Extract<keyof Events, string>} K\n\t * @param {K} type\n\t * @param {((e: Events[K]) => void) | null | undefined} callback\n\t * @returns {() => void}\n\t */\n\t$on(type, callback) {\n\t\tif (!is_function(callback)) {\n\t\t\treturn noop;\n\t\t}\n\t\tconst callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);\n\t\tcallbacks.push(callback);\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t/**\n\t * @param {Partial<Props>} props\n\t * @returns {void}\n\t */\n\t$set(props) {\n\t\tif (this.$$set && !is_empty(props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set(props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n","export namespace LuigiInternalMessageID {\n /**\n * A message emmitted from the Microfrontend when a custom message is sent\n */\n export const CUSTOM_MESSAGE = 'custom';\n /**\n * A message emmitted from the Microfrontend when the context data is sent\n */\n export const GET_CONTEXT = 'luigi.get-context';\n /**\n * A message sent to the microfrontend from parent with the context upon init\n */\n export const SEND_CONTEXT_HANDSHAKE = 'luigi.init';\n\n /**\n * A message sent from the Microfrontend when the context data has been received properly\n */\n export const CONTEXT_RECEIVED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend when a navigation request is sent\n */\n export const NAVIGATION_REQUEST = 'luigi.navigation.open';\n /**\n * A message emmitted from the Microfrontend when a request to show an alert is sent\n */\n export const ALERT_REQUEST = 'luigi.ux.alert.show';\n /**\n * A message sent to the microfrontend to notify closing of a particular alert\n */\n export const ALERT_CLOSED = 'luigi.ux.alert.hide';\n /**\n * A message emmitted from the Microfrontend when it is first initialized\n */\n export const INITIALIZED = 'luigi.init.ok';\n /**\n * A message emmitted from the Microfrontend to request adding search parameters to the URL\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'luigi.addSearchParams';\n /**\n * A message emmitted from the Microfrontend to request adding node parameters to the URL\n */\n export const ADD_NODE_PARAMS_REQUEST = 'luigi.addNodeParams';\n /**\n * A message emmitted from the Microfrontend when a request to show an confirmation modal is sent\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'luigi.ux.confirmationModal.show';\n /**\n * A message emmitted from the Microfrontend when a request to show loading indicator is sent\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'luigi.show-loading-indicator';\n /**\n * A message emmitted from the Microfrontend when a request to hide the loading indicator is sent\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'luigi.hide-loading-indicator';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the current locale is sent\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'luigi.ux.set-current-locale';\n\n /**\n * A message emmitted from the Microfrontend when a request to modify the local storage is sent\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'storage';\n\n /**\n * A message emmitted from the Microfrontend when a request to handle an error that happened during the runtime on the microfrontend is sent\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'luigi-runtime-error-handling';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the anchor of the URL is sent\n */\n export const SET_ANCHOR_LINK_REQUEST = 'luigi.setAnchor';\n\n /**\n * A message emmitted from the Microfrontend when a request to set third party cookies is sent\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'luigi.third-party-cookie';\n\n /**\n * A message emmitted from the Microfrontend when a request to navigate back is sent\n */\n export const BACK_NAVIGATION_REQUEST = 'luigi.navigation.back';\n\n /**\n * A message emmitted from the Microfrontend when a request to receive the current app route is sent\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'luigi.navigation.currentRoute';\n\n /**\n * A message sent to the Microfrontend with the payload being the context being sent\n */\n export const SEND_CONTEXT_OBJECT = 'luigi.navigate';\n\n /**\n * A message emmitted from the Microfrontend to report that the navigation is completed is sent\n */\n export const NAVIGATION_COMPLETED_REPORT = 'luigi.navigate.ok';\n\n /**\n * A message emmitted from the Microfrontend when a request to update the modal path parameters is sent\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'luigi.navigation.updateModalDataPath';\n\n /**\n * A message emmitted from the Microfrontend when a request to check on the validity of a path is sent\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'luigi.navigation.pathExists';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'dirty status' (ex: avoid closing if usaved changes) is sent\n */\n export const SET_DIRTY_STATUS_REQUEST = 'luigi.set-page-dirty';\n\n /**\n * A message emmitted from the Microfrontend when a request to set the 'token auth' is sent\n */\n export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued';\n}\n","export namespace Events {\n /**\n * Event fired when the micro frontend sends a custom message.\n */\n export const CUSTOM_MESSAGE = 'custom-message';\n\n /**\n * Event fired when the micro frontend requests the context data.\n */\n export const GET_CONTEXT_REQUEST = 'get-context-request';\n\n /**\n * Event fired when a navigation has been requested by the micro frontend.\n */\n export const NAVIGATION_REQUEST = 'navigation-request';\n\n /**\n * Event fired when the micro frontend requests to show an alert.\n */\n export const ALERT_REQUEST = 'show-alert-request';\n\n /**\n * Event fired when the micro frontend requests to close an alert.\n */\n export const ALERT_CLOSED = 'close-alert-request';\n\n /**\n * Event fired when the micro frontend has been initialized.\n */\n export const INITIALIZED = 'initialized';\n\n /**\n * Event fired when the micro frontend requests the addition of search parameters to the URL.\n */\n export const ADD_SEARCH_PARAMS_REQUEST = 'add-search-params-request';\n\n /**\n * Event fired when the micro frontend requests the addition of node parameters to the URL.\n */\n export const ADD_NODE_PARAMS_REQUEST = 'add-node-params-request';\n\n /**\n * Event fired when the micro frontend requests to show a confirmation modal.\n */\n export const SHOW_CONFIRMATION_MODAL_REQUEST = 'show-confirmation-modal-request';\n\n /**\n * Event fired when the micro frontend requests to show a loading indicator.\n */\n export const SHOW_LOADING_INDICATOR_REQUEST = 'show-loading-indicator-request';\n\n /**\n * Event fired when the micro frontend requests to hide the loading indicator.\n */\n export const HIDE_LOADING_INDICATOR_REQUEST = 'hide-loading-indicator-request';\n\n /**\n * Event fired when the micro frontend requests to set the current locale.\n */\n export const SET_CURRENT_LOCALE_REQUEST = 'set-current-locale-request';\n\n /**\n * Event fired when the micro frontend requests to modify the local storage.\n */\n export const LOCAL_STORAGE_SET_REQUEST = 'set-storage-request';\n\n /**\n * Event fired when the micro frontend requests to handle errors that might happen during the runtime of the micro frontend.\n */\n export const RUNTIME_ERROR_HANDLING_REQUEST = 'runtime-error-handling-request';\n\n /**\n * Event fired when the micro frontend requests to set the anchor of the URL.\n */\n export const SET_ANCHOR_LINK_REQUEST = 'set-anchor-request';\n\n /**\n * Event fired when the micro frontend requests to set third-party cookies.\n */\n export const SET_THIRD_PARTY_COOKIES_REQUEST = 'set-third-party-cookies-request';\n\n /**\n * Event fired when the micro frontend requests to navigate back.\n */\n export const BACK_NAVIGATION_REQUEST = 'navigate-back-request';\n\n /**\n * Event fired when the micro frontend requests the current app route.\n */\n export const GET_CURRENT_ROUTE_REQUEST = 'get-current-route-request';\n\n /**\n * Event fired to report that the micro frontend's navigation has completed.\n */\n export const NAVIGATION_COMPLETED_REPORT = 'report-navigation-completed-request';\n\n /**\n * Event fired when the micro frontend requests to update the modal path parameters.\n */\n export const UPDATE_MODAL_PATH_DATA_REQUEST = 'update-modal-path-data-request';\n\n /**\n * Event fired when the micro frontend requests to check the validity of a path.\n */\n export const CHECK_PATH_EXISTS_REQUEST = 'check-path-exists-request';\n\n /**\n * Event fired when the micro frontend requests to set the 'dirty status' which, for example, avoids closing when there are any unsaved changes.\n */\n export const SET_DIRTY_STATUS_REQUEST = 'set-dirty-status-request';\n\n /**\n * Event fired when the micro frontend requests to set the view group data.\n */\n export const SET_VIEW_GROUP_DATA_REQUEST = 'set-viewgroup-data-request';\n\n /**\n * Event fired when the micro frontend requests to set the document title.\n */\n export const SET_DOCUMENT_TITLE_REQUEST = 'set-document-title-request';\n\n /**\n * Event fired when the micro frontend requests to open the user settings.\n */\n export const OPEN_USER_SETTINGS_REQUEST = 'open-user-settings-request';\n\n /**\n * Event fired when the micro frontend requests to close the user settings.\n */\n export const CLOSE_USER_SETTINGS_REQUEST = 'close-user-settings-request';\n\n /**\n * Event fired when the micro frontend requests to collapse left side navigation.\n */\n export const COLLAPSE_LEFT_NAV_REQUEST = 'collapse-leftnav-request';\n\n /**\n * Event fired when the micro frontend requests to update the top navigation.\n */\n export const UPDATE_TOP_NAVIGATION_REQUEST = 'update-top-navigation-request';\n\n /**\n * Event fired when the micro frontend requests to check if the path exists.\n */\n export const PATH_EXISTS_REQUEST = 'path-exists-request';\n\n /**\n * Event fired when the micro frontend requests to navigate back.\n */\n export const GO_BACK_REQUEST = 'go-back-request';\n\n /**\n * Event fired when the micro frontend requests to check if there are any preserved views.\n */\n export const HAS_BACK_REQUEST = 'has-back-request';\n\n /**\n * Event fired when the micro frontend requests to remove the backdrop.\n */\n export const REMOVE_BACKDROP_REQUEST = 'remove-backdrop-request';\n}\n","import { PUBLIC_VERSION } from '../../../shared/version.js';\n\nif (typeof window !== 'undefined')\n\t// @ts-ignore\n\t(window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);\n","// generated during release, do not modify\n\n/**\n * The current version, as set in package.json.\n *\n * https://svelte.dev/docs/svelte-compiler#svelte-version\n * @type {string}\n */\nexport const VERSION = '4.2.19';\nexport const PUBLIC_VERSION = '4';\n","export class GenericHelpersClass {\n /**\n * DUPLICATE: Duplicate of 'core/src/utilities/helpers/generic-helpers.js > isFunction'\n * Keep one in the end\n *\n * Checks if input is a function.\n * @param {Function} functionToCheck function to check\n * @returns {boolean}\n */\n isFunction(functionToCheck: (arg) => void): boolean {\n return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';\n }\n\n /**\n * Checks if input is an object.\n * @param {Object} objectToCheck mixed\n * @returns {boolean}\n */\n isObject(objectToCheck: object): boolean {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Checks whether web component is an attribute or property. In case of attribute, it returns the parsed value.\n * @param {Object | boolean | string} webcomponent value can either be an object, boolean or a stringified object, e.g webcomponent='{\"selfregistered\":\"true\"}'\n * @returns {Object | boolean} webcomponent returns the parsed webcomponent value.\n */\n checkWebcomponentValue(webcomponent: object | boolean | string): object | boolean {\n if (typeof webcomponent === 'string') {\n return JSON.parse(webcomponent);\n } else if (typeof webcomponent === 'boolean' || typeof webcomponent === 'object') {\n return webcomponent;\n } else {\n console.warn('Webcomponent value has a wrong type.');\n }\n }\n\n /**\n * Resolves the context to an object. If the context is a string, it attempts to parse\n * it as JSON. If parsing fails JSON parse error will be thrown.\n * @param {Object | string} context - The context to be resolved.\n * @returns {Object} The resolved context as an object.\n */\n resolveContext(context: object | string): object {\n return context ? (typeof context === 'string' ? JSON.parse(context) : context) : {};\n }\n}\n\nexport const GenericHelperFunctions = new GenericHelpersClass();\n","import { Events } from '../constants/communication';\nimport type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { GenericHelperFunctions } from '../utilities/helpers';\n\nexport class ContainerService {\n /**\n * Checks if the given HTML element is visible in the DOM by considering both\n * its width/height and any client rectangles it may have.\n *\n * @param {HTMLElement} component - The HTML element to check for visibility.\n * @returns {boolean} Returns true if the element is visible, otherwise false.\n */\n isVisible(component: HTMLElement): boolean {\n return !!(component.offsetWidth || component.offsetHeight || component.getClientRects().length);\n }\n\n /**\n * Sends a message to the iframe either with the custom keyword or any other message name\n * @param iframeHandle the iframe to send the message to\n * @param msg the message to be sent\n * @param msgName the optional message name\n */\n sendCustomMessageToIframe(iframeHandle: IframeHandle, msg: object, msgName?: string) {\n const messageName = msgName || 'custom';\n\n if (iframeHandle.iframe.contentWindow) {\n const iframeUrl = new URL(iframeHandle.iframe.src);\n if (messageName === 'custom') {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, data: msg }, iframeUrl.origin);\n } else {\n iframeHandle.iframe.contentWindow.postMessage({ msg: messageName, ...msg }, iframeUrl.origin);\n }\n } else {\n console.error('Message target could not be resolved');\n }\n }\n\n /**\n * Dispatch an event to the given target container\n * @param {string} msg the event message\n * @param {ContainerElement} targetCnt the targeted HTML element onto which the event is dispatched\n * @param {Object} data custom data added to the event to be dispatched\n * @param {Function} callback\n * @param {string} callbackName\n */\n dispatch(\n msg: string,\n targetCnt: ContainerElement,\n data: object,\n callback?: (arg?) => void,\n callbackName?: string\n ): void {\n const customEvent = new CustomEvent(msg, { detail: data });\n\n if (callback && GenericHelperFunctions.isFunction(callback) && callbackName) {\n customEvent[callbackName] = (data) => {\n callback(data);\n };\n }\n\n targetCnt.dispatchEvent(customEvent);\n }\n\n /**\n * Retrieves the target container based on the event source.\n *\n * @param event The event object representing the source of the container.\n * @returns {ContainerElement | undefined} The target container object or undefined if not found.\n */\n getTargetContainer(event): ContainerElement | undefined {\n let cnt;\n\n globalThis.__luigi_container_manager.container.forEach((element) => {\n if (element.iframeHandle?.iframe && element.iframeHandle.iframe.contentWindow === event.source) {\n cnt = element;\n }\n });\n\n return cnt;\n }\n\n /**\n * Initializes the Luigi Container Manager responsible for managing communication\n * between microfrontends and dispatching events accordingly. Also adds 'message' listener to the window object with\n * the defined messageListener list\n * @returns __luigi_container_manager which has the added container array and message listeners\n */\n getContainerManager() {\n if (!globalThis.__luigi_container_manager) {\n globalThis.__luigi_container_manager = {\n container: [],\n messageListener: (event) => {\n // Handle incoming messages and dispatch events based on the message type\n // (Custom messages, navigation requests, alert requests, etc.)\n const targetCnt = this.getTargetContainer(event);\n const target = targetCnt?.iframeHandle?.iframe?.contentWindow;\n if (target && target === event.source) {\n // messages emitted from microfrontends\n const msg = event.data.msg;\n\n // dispatch an event depending on message\n switch (msg) {\n case LuigiInternalMessageID.CUSTOM_MESSAGE:\n {\n const evData = event.data.data;\n const id = evData.id;\n delete evData.id;\n this.dispatch(Events.CUSTOM_MESSAGE, targetCnt, {\n id: id,\n _metaData: {},\n data: evData\n });\n }\n break;\n case LuigiInternalMessageID.GET_CONTEXT:\n // Automatically send a luigi.init message to complete the initial handshake with the microfrontend\n target.postMessage(\n {\n msg: LuigiInternalMessageID.SEND_CONTEXT_HANDSHAKE,\n context: targetCnt.context || {},\n internal: {\n thirdPartyCookieCheck: {\n disabled: targetCnt.skipCookieCheck === 'true'\n }\n },\n authData: targetCnt.authData || {}\n },\n event.origin\n );\n break;\n case LuigiInternalMessageID.NAVIGATION_REQUEST:\n this.dispatch(Events.NAVIGATION_REQUEST, targetCnt, event.data.params);\n break;\n case LuigiInternalMessageID.ALERT_REQUEST:\n this.dispatch(Events.ALERT_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.INITIALIZED:\n this.dispatch(Events.INITIALIZED, targetCnt, event.data.params);\n break;\n case LuigiInternalMessageID.ADD_SEARCH_PARAMS_REQUEST:\n this.dispatch(Events.ADD_SEARCH_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n });\n break;\n case LuigiInternalMessageID.ADD_NODE_PARAMS_REQUEST:\n this.dispatch(Events.ADD_NODE_PARAMS_REQUEST, targetCnt, {\n data: event.data.data,\n keepBrowserHistory: event.data.keepBrowserHistory\n });\n break;\n case LuigiInternalMessageID.SHOW_CONFIRMATION_MODAL_REQUEST:\n this.dispatch(Events.SHOW_CONFIRMATION_MODAL_REQUEST, targetCnt, event.data.data);\n break;\n case LuigiInternalMessageID.SHOW_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.SHOW_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.HIDE_LOADING_INDICATOR_REQUEST:\n this.dispatch(Events.HIDE_LOADING_INDICATOR_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_CURRENT_LOCALE_REQUEST:\n this.dispatch(Events.SET_CURRENT_LOCALE_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.LOCAL_STORAGE_SET_REQUEST:\n this.dispatch(Events.LOCAL_STORAGE_SET_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.RUNTIME_ERROR_HANDLING_REQUEST:\n this.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_ANCHOR_LINK_REQUEST:\n this.dispatch(Events.SET_ANCHOR_LINK_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_THIRD_PARTY_COOKIES_REQUEST:\n this.dispatch(Events.SET_THIRD_PARTY_COOKIES_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.BACK_NAVIGATION_REQUEST:\n this.dispatch(Events.BACK_NAVIGATION_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.GET_CURRENT_ROUTE_REQUEST:\n this.dispatch(Events.GET_CURRENT_ROUTE_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.NAVIGATION_COMPLETED_REPORT:\n this.dispatch(Events.NAVIGATION_COMPLETED_REPORT, targetCnt, event);\n break;\n case LuigiInternalMessageID.UPDATE_MODAL_PATH_DATA_REQUEST:\n this.dispatch(Events.UPDATE_MODAL_PATH_DATA_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.CHECK_PATH_EXISTS_REQUEST:\n this.dispatch(Events.CHECK_PATH_EXISTS_REQUEST, targetCnt, event);\n break;\n case LuigiInternalMessageID.SET_DIRTY_STATUS_REQUEST:\n this.dispatch(Events.SET_DIRTY_STATUS_REQUEST, targetCnt, event);\n break;\n }\n }\n }\n };\n window.addEventListener('message', globalThis.__luigi_container_manager.messageListener);\n }\n\n return globalThis.__luigi_container_manager;\n }\n\n /**\n * Adds thisComponent's object reference the the __luigi_container_manager container list\n *\n * @param {HTMLElement} thisComponent - The HTML element that represents the current rendered container (thisComponent)\n */\n registerContainer(thisComponent: HTMLElement): void {\n this.getContainerManager().container.push(thisComponent);\n }\n}\n\nexport const containerService = new ContainerService();\n","import type { IframeHandle, ContainerElement } from '../constants/container.model';\nimport { LuigiInternalMessageID } from '../constants/internal-communication';\nimport { containerService } from '../services/container.service';\n\nexport class ContainerAPIFunctions {\n /**\n * Updates the context of the microfrontend by sending a message to the iframe that sets the context of the microfrontend\n * @param contextObj The context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateContext = (contextObj: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context: contextObj,\n internal: internalParameter,\n // set withoutSync to true for the container case to avoid browser history changes from luigi client\n withoutSync: true\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update context on inexisting iframe');\n }\n };\n\n /**\n * Updates route of the microfrontend by sending a message to the iframe that sets new view URL\n * @param viewUrl new view URL\n * @param context context data\n * @param internal internal luigi legacy data\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n */\n updateViewUrl = (viewUrl: string, context: object, internal?: object, iframeHandle?: IframeHandle) => {\n if (iframeHandle) {\n const internalParameter = internal || {};\n containerService.sendCustomMessageToIframe(\n iframeHandle,\n {\n context,\n internal: internalParameter,\n withoutSync: false,\n viewUrl\n },\n LuigiInternalMessageID.SEND_CONTEXT_OBJECT\n );\n } else {\n console.warn('Attempting to update route on inexisting iframe');\n }\n };\n\n /**\n * Updates the auth data of the microfrontend by sending a message to the iframe that sets the authData of the microfrontend\n * @param iframeHandle a reference to the iframe that is needed to send a message to it internally\n * @param authData the authData object being sent to the microfrontend\n */\n updateAuthData = (iframeHandle: IframeHandle, authData: object) => {\n if (iframeHandle && authData) {\n containerService.sendCustomMessageToIframe(iframeHandle, { authData }, LuigiInternalMessageID.AUTH_SET_TOKEN);\n } else {\n console.warn('Attempting to update auth data on inexisting iframe or authData');\n }\n };\n\n /**\n * Send a custom message to the referenced iframe or web component\n * @param id a string containing the message id\n * @param mainComponent a reference to the web component to be affected\n * @param isWebcomponent predicate showing if currently referencing a web component or not\n * @param iframeHandle a reference to the iframe to be affected\n * @param data data to be sent alongside the custom message\n */\n sendCustomMessage = (\n id: string,\n mainComponent: ContainerElement,\n isWebcomponent: boolean,\n iframeHandle: IframeHandle,\n data?: object\n ) => {\n if (isWebcomponent && mainComponent._luigi_mfe_webcomponent) {\n containerService.dispatch(id, mainComponent._luigi_mfe_webcomponent, data);\n } else {\n const msg = { ...data };\n if (msg['id']) {\n console.warn('Property \"id\" is reserved and can not be used in custom message data');\n }\n msg['id'] = id;\n containerService.sendCustomMessageToIframe(iframeHandle, msg);\n }\n };\n\n /**\n * Send a message to the microfrontend notifying the alert has been closed\n * @param id the id of the alert being closed\n * @param dismissKey the dismiss key being sent if any\n * @param iframeHandle the handle of the iframe to send the message to\n */\n closeAlert(id: string, dismissKey: string, iframeHandle: IframeHandle) {\n containerService.sendCustomMessageToIframe(iframeHandle, { id, dismissKey }, LuigiInternalMessageID.ALERT_CLOSED);\n }\n}\n\nexport const ContainerAPI = new ContainerAPIFunctions();\n","/**\n * Retrieves the allow rules for iframes and modifies them according to w3c standard conditions.\n * @param {string[]} allowRules - An array of allow rules.\n * @returns {string|undefined} The modified allow rules joined as a single string, or undefined if allowRules is falsy.\n */\nexport const getAllowRules = (allowRules: string[]) => {\n if (!allowRules) return undefined;\n const rules = allowRules;\n rules.forEach((rule, index) => {\n rules[index] = rule + (rule.indexOf(';') != -1 ? '' : ';');\n rules[index] = allowRules[index].replaceAll('\"', \"'\");\n });\n return rules.join(' ');\n};\n","import type {\n LayoutConfig,\n RendererConfig,\n RendererLayout,\n RendererObject,\n RendererUseProps\n} from '../constants/container.model';\n\n/**\n * Default compound renderer.\n */\nexport class DefaultCompoundRenderer {\n rendererObject: RendererObject;\n config: RendererConfig;\n\n constructor(rendererObj?: RendererObject) {\n if (rendererObj) {\n this.rendererObject = rendererObj;\n this.config = rendererObj.config || {};\n } else {\n this.config = {};\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n return document.createElement('div');\n }\n\n createCompoundItemContainer(layoutConfig?: object): HTMLDivElement {\n return document.createElement('div');\n }\n\n attachCompoundItem(compoundCnt: HTMLElement, compoundItemCnt: HTMLElement): void {\n compoundCnt.appendChild(compoundItemCnt);\n }\n}\n\n/**\n * Compound Renderer for custom rendering as defined in luigi config.\n */\nexport class CustomCompoundRenderer extends DefaultCompoundRenderer {\n superRenderer: DefaultCompoundRenderer;\n\n constructor(rendererObj: RendererObject) {\n super(rendererObj || { use: {} });\n if (rendererObj && rendererObj.use && (rendererObj.use as RendererUseProps).extends) {\n this.superRenderer = resolveRenderer({\n use: (rendererObj.use as RendererUseProps).extends,\n config: rendererObj.config\n });\n }\n }\n\n createCompoundContainer(): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundContainer(this.config, this.superRenderer);\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundContainer();\n }\n return super.createCompoundContainer();\n }\n\n createCompoundItemContainer(layoutConfig): HTMLDivElement {\n if ((this.rendererObject.use as RendererUseProps).createCompoundItemContainer) {\n return (this.rendererObject.use as RendererUseProps).createCompoundItemContainer(\n layoutConfig,\n this.config,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n return this.superRenderer.createCompoundItemContainer(layoutConfig);\n }\n return super.createCompoundItemContainer(layoutConfig);\n }\n\n attachCompoundItem(compoundCnt, compoundItemCnt): void {\n if ((this.rendererObject.use as RendererUseProps).attachCompoundItem) {\n (this.rendererObject.use as RendererUseProps).attachCompoundItem(\n compoundCnt,\n compoundItemCnt,\n this.superRenderer\n );\n } else if (this.superRenderer) {\n this.superRenderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n } else {\n super.attachCompoundItem(compoundCnt, compoundItemCnt);\n }\n }\n}\n\n/**\n * Compound Renderer for a css grid compound view.\n */\nexport class GridCompoundRenderer extends DefaultCompoundRenderer {\n createCompoundContainer(): HTMLDivElement {\n const containerClass = '__lui_compound_' + new Date().getTime();\n const compoundCnt = document.createElement('div');\n compoundCnt.classList.add(containerClass);\n let mediaQueries = '';\n\n if (this.config.layouts) {\n this.config.layouts.forEach((el: RendererLayout) => {\n if (el.minWidth || el.maxWidth) {\n let mq = '@media only screen ';\n if (el.minWidth != null) {\n mq += `and (min-width: ${el.minWidth}px) `;\n }\n if (el.maxWidth != null) {\n mq += `and (max-width: ${el.maxWidth}px) `;\n }\n\n mq += `{\n .${containerClass} {\n grid-template-columns: ${el.columns || 'auto'};\n grid-template-rows: ${el.rows || 'auto'};\n grid-gap: ${el.gap || '0'};\n }\n }\n `;\n mediaQueries += mq;\n }\n });\n }\n\n compoundCnt.innerHTML = /* html */ `\n <style scoped>\n .${containerClass} {\n display: grid;\n grid-template-columns: ${this.config.columns || 'auto'};\n grid-template-rows: ${this.config.rows || 'auto'};\n grid-gap: ${this.config.gap || '0'};\n min-height: ${this.config.minHeight || 'auto'};\n }\n ${mediaQueries}\n </style>\n `;\n return compoundCnt;\n }\n\n createCompoundItemContainer(layoutConfig: LayoutConfig): HTMLDivElement {\n const config = layoutConfig || {};\n const compoundItemCnt = document.createElement('div');\n compoundItemCnt.setAttribute('style', `grid-row: ${config.row || 'auto'}; grid-column: ${config.column || 'auto'}`);\n compoundItemCnt.classList.add('lui-compoundItemCnt');\n return compoundItemCnt;\n }\n}\n\n/**\n * Returns the compound renderer class for a given config.\n * If no specific one is found, {DefaultCompoundRenderer} is returned.\n *\n * @param {*} rendererConfig the renderer config object defined in luigi config\n */\nexport const resolveRenderer = (rendererConfig: RendererObject) => {\n const rendererDef: RendererUseProps | string = rendererConfig.use;\n if (!rendererDef) {\n return new DefaultCompoundRenderer(rendererConfig);\n } else if (rendererDef === 'grid') {\n return new GridCompoundRenderer(rendererConfig);\n } else if (\n (rendererDef as RendererUseProps).createCompoundContainer ||\n (rendererDef as RendererUseProps).createCompoundItemContainer ||\n (rendererDef as RendererUseProps).attachCompoundItem\n ) {\n return new CustomCompoundRenderer(rendererConfig);\n }\n return new DefaultCompoundRenderer(rendererConfig);\n};\n\n/**\n * Registers event listeners defined at the navNode.\n *\n * @param {*} eventbusListeners a map of event listener arrays with event id as key\n * @param {*} navNode the web component node configuration object\n * @param {*} nodeId the web component node id\n * @param {*} wcElement the web component element - optional\n */\nexport const registerEventListeners = (eventbusListeners, navNode, nodeId: string, wcElement?) => {\n if (navNode?.eventListeners) {\n navNode.eventListeners.forEach((el) => {\n const evID = el.source + '.' + el.name;\n const listenerList = eventbusListeners[evID];\n const listenerInfo = {\n wcElementId: nodeId,\n wcElement: wcElement,\n action: el.action,\n converter: el.dataConverter\n };\n\n if (listenerList) {\n listenerList.push(listenerInfo);\n } else {\n eventbusListeners[evID] = [listenerInfo];\n }\n });\n }\n};\n\n/**\n * Desanitization of an object\n * @param {Object} paramsMap\n * @returns\n */\nexport const deSanitizeParamsMap = (paramsMap) => {\n return Object.entries(paramsMap).reduce((sanitizedMap, paramPair) => {\n sanitizedMap[deSanitizeParam(paramPair[0])] = deSanitizeParam(paramPair[1]);\n return sanitizedMap;\n }, {});\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deSanitizeParam(value: any): string {\n const desani = String(value)\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('"', '\"')\n .replaceAll(''', \"'\")\n .replaceAll('/', '/');\n return desani;\n}\n","/* eslint no-prototype-builtins: 0 */\nimport {\n DefaultCompoundRenderer,\n resolveRenderer,\n registerEventListeners,\n deSanitizeParamsMap\n} from './web-component-helpers';\nimport { ContainerService } from './container.service';\nimport { Events } from '../constants/communication';\nimport type {\n ContainerElement,\n LayoutConfig,\n WebComponentNode,\n WebComponentRenderer\n} from '../constants/container.model';\n\n/** Methods for dealing with web components based micro frontend handling */\nexport class WebComponentService {\n containerService: ContainerService;\n thisComponent: ContainerElement;\n\n constructor() {\n this.containerService = new ContainerService();\n }\n\n dynamicImport(viewUrl: string) {\n // Object.freeze() used as potential marker for bundlers other than webpack\n return Object.freeze(import(/* webpackIgnore: true */ viewUrl));\n }\n\n processViewUrl(viewUrl: string, data?: object): string {\n return viewUrl;\n }\n\n /**\n * Attaches a web component with tagname wc_id and adds it to wcItemContainer,\n * if attached to wc_container\n *\n * @param wc_id a tagname that is used when creating the web component element\n * @param wcItemPlaceholder placeholder for web component container\n * @param wc_container web component container element\n * @param ctx context to be passed to the web component\n * @param viewUrl url to render content from\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n attachWC(\n wc_id: string,\n wcItemPlaceholder: HTMLDivElement,\n wc_container: ContainerElement,\n ctx: object,\n viewUrl: string,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n if (wc_container && wc_container.contains(wcItemPlaceholder)) {\n const wc = document.createElement(wc_id);\n if (nodeId) {\n wc.setAttribute('nodeId', nodeId);\n }\n wc.setAttribute('lui_web_component', 'true');\n\n this.initWC(wc, wc_id, wc_container, viewUrl, ctx, nodeId, isCompoundChild);\n wc_container.replaceChild(wc, wcItemPlaceholder);\n if (wc_container._luigi_node) {\n wc_container._luigi_mfe_webcomponent = wc;\n }\n wc_container.dispatchEvent(new Event('wc_ready'));\n }\n }\n\n /**\n * Function that uses the current instance of the containerService to dispatch a Luigi event to the current instance of the container\n * that is 'thisComponent'\n * @param msg the message to be delivered\n * @param data the data to be sent\n * @param callback the callback function to be called\n */\n dispatchLuigiEvent(msg: string, data: object, callback?: () => void) {\n this.containerService.dispatch(msg, this.thisComponent, data, callback);\n }\n\n /**\n * This function is used to create the Luigi Client API for the web-component-based micro frontend.\n * As the function expands with more functionality, it might be moved to a separate class.\n *\n * The client API here should be a reflection of the Core WC Client api from core/src/services/web-components.js\n *\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param wc_id a tagname that is used when creating the web component element\n * @param component\n * @param isCompoundChild defines if rendered mf is a compound child or not\n * @returns an object with the Luigi Client API\n */\n createClientAPI(\n eventBusElement: ContainerElement,\n nodeId: string,\n wc_id: string,\n component: HTMLElement,\n isCompoundChild?: boolean\n ) {\n return {\n linkManager: () => {\n let fromContext = null;\n let fromClosestContext = false;\n let fromVirtualTreeRoot = false;\n let fromParent = false;\n let nodeParams = {};\n\n const linkManagerInstance = {\n navigate: (route, settings = {}) => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams,\n ...settings\n };\n this.dispatchLuigiEvent(Events.NAVIGATION_REQUEST, {\n link: route,\n ...options\n });\n },\n navigateToIntent: (semanticSlug: string, params = {}): void => {\n let newPath = '#?intent=';\n\n newPath += semanticSlug;\n\n if (params && Object.keys(params)?.length) {\n const paramList = Object.entries(params);\n\n // append parameters to the path if any\n if (paramList.length > 0) {\n newPath += '?';\n\n for (const [key, value] of paramList) {\n newPath += key + '=' + value + '&';\n }\n\n // trim potential excessive ampersand & at the end\n newPath = newPath.slice(0, -1);\n }\n }\n\n linkManagerInstance.navigate(newPath);\n },\n fromClosestContext: () => {\n fromClosestContext = true;\n return linkManagerInstance;\n },\n fromContext: (navigationContext) => {\n fromContext = navigationContext;\n return linkManagerInstance;\n },\n fromVirtualTreeRoot: () => {\n fromVirtualTreeRoot = true;\n return linkManagerInstance;\n },\n fromParent: () => {\n fromParent = true;\n return linkManagerInstance;\n },\n getCurrentRoute: () => {\n const options = {\n fromContext,\n fromClosestContext,\n fromVirtualTreeRoot,\n fromParent,\n nodeParams\n };\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.GET_CURRENT_ROUTE_REQUEST,\n this.thisComponent,\n { ...options },\n (route) => {\n if (route) {\n resolve(route);\n } else {\n reject('No current route received.');\n }\n },\n 'callback'\n );\n });\n },\n withParams: (params) => {\n nodeParams = params;\n return linkManagerInstance;\n },\n updateTopNavigation: (): void => {\n this.dispatchLuigiEvent(Events.UPDATE_TOP_NAVIGATION_REQUEST, {});\n },\n pathExists: () => {\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.PATH_EXISTS_REQUEST,\n this.thisComponent,\n {},\n (exists) => {\n if (exists) {\n resolve(true);\n } else {\n reject(false);\n }\n },\n 'callback'\n );\n });\n },\n openAsDrawer: (route, drawerSettings = {}) => {\n linkManagerInstance.navigate(route, { drawer: drawerSettings });\n },\n openAsModal: (route, modalSettings = {}) => {\n linkManagerInstance.navigate(route, { modal: modalSettings });\n },\n openAsSplitView: (route, splitViewSettings = {}) => {\n linkManagerInstance.navigate(route, {\n splitView: splitViewSettings\n });\n },\n goBack: (goBackContext) => {\n this.dispatchLuigiEvent(Events.GO_BACK_REQUEST, goBackContext);\n },\n hasBack: () => {\n return false;\n }\n };\n return linkManagerInstance;\n },\n uxManager: () => {\n return {\n showAlert: (alertSettings) => {\n this.dispatchLuigiEvent(Events.ALERT_REQUEST, alertSettings);\n },\n showConfirmationModal: (settings) => {\n return new Promise((resolve, reject) => {\n this.containerService.dispatch(\n Events.SHOW_CONFIRMATION_MODAL_REQUEST,\n this.thisComponent,\n settings,\n (data) => {\n if (data) {\n resolve(data);\n } else {\n reject(new Error('No data'));\n }\n },\n 'callback'\n );\n });\n },\n getCurrentTheme: (): string | undefined => {\n return this.thisComponent.theme;\n },\n closeUserSettings: () => {\n this.dispatchLuigiEvent(Events.CLOSE_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n openUserSettings: () => {\n this.dispatchLuigiEvent(Events.OPEN_USER_SETTINGS_REQUEST, this.thisComponent.userSettings);\n },\n collapseLeftSideNav: () => {\n this.dispatchLuigiEvent(Events.COLLAPSE_LEFT_NAV_REQUEST, {});\n },\n getDirtyStatus: () => {\n return this.thisComponent.dirtyStatus || false;\n },\n getDocumentTitle: () => {\n return this.thisComponent.documentTitle;\n },\n setDocumentTitle: (title) => {\n this.dispatchLuigiEvent(Events.SET_DOCUMENT_TITLE_REQUEST, title);\n },\n removeBackdrop: () => {\n this.dispatchLuigiEvent(Events.REMOVE_BACKDROP_REQUEST, {});\n },\n hideAppLoadingIndicator: () => {\n this.dispatchLuigiEvent(Events.HIDE_LOADING_INDICATOR_REQUEST, {});\n }\n };\n },\n getCurrentLocale: (): string | undefined => {\n return this.thisComponent.locale;\n },\n getActiveFeatureToggles: (): string[] => {\n return this.thisComponent.activeFeatureToggleList || [];\n },\n publishEvent: (ev) => {\n if (eventBusElement && eventBusElement.eventBus) {\n // compound component use case only\n eventBusElement.eventBus.onPublishEvent(ev, nodeId, wc_id);\n }\n const payload = {\n id: ev.type,\n _metaData: {\n nodeId,\n wc_id,\n src: component\n },\n data: ev.detail\n };\n this.dispatchLuigiEvent(Events.CUSTOM_MESSAGE, payload);\n },\n luigiClientInit: () => {\n this.dispatchLuigiEvent(Events.INITIALIZED, {});\n },\n addNodeParams: (params, keepBrowserHistory) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.ADD_NODE_PARAMS_REQUEST, {\n params,\n keepBrowserHistory\n });\n },\n getNodeParams: (shouldDesanitise: boolean): object => {\n if (isCompoundChild) {\n return {};\n }\n if (shouldDesanitise) {\n return deSanitizeParamsMap(this.thisComponent.nodeParams);\n }\n return this.thisComponent.nodeParams || {};\n },\n setAnchor: (anchor) => {\n if (isCompoundChild) {\n return;\n }\n this.dispatchLuigiEvent(Events.SET_ANCHOR_LINK_REQUEST, anchor);\n },\n getAnchor: (): string => {\n return this.thisComponent.anchor || '';\n },\n getCoreSearchParams: (): object => {\n return this.thisComponent.searchParams || {};\n },\n getPathParams: (): object => {\n return this.thisComponent.pathParams || {};\n },\n getClientPermissions: (): object => {\n return this.thisComponent.clientPermissions || {};\n },\n getUserSettings: (): object => {\n return this.thisComponent.userSettings || {};\n },\n setViewGroupData: (data) => {\n this.dispatchLuigiEvent(Events.SET_VIEW_GROUP_DATA_REQUEST, data);\n }\n };\n }\n\n /**\n * Attaches Client Api to web component\n * if __postProcess defined allow for custom setting of clientApi when developers want to decide how to add it to their mf\n * otherwise just attach it to the wc webcomponent alongside the context directly.\n *\n * @param wc web component to attach to\n * @param wc_id a tagname that is used when creating the web component element\n * @param eventBusElement the event bus to be used for cross web component communication, i.e.: for compound micro frontends container scenario\n * @param viewUrl url to render content from\n * @param ctx context to be passed to the web component\n * @param nodeId refers to an attribute of the web component to be identified from the rest\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n initWC(\n wc: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n wc_id: string,\n eventBusElement: ContainerElement,\n viewUrl: string,\n ctx: object,\n nodeId: string,\n isCompoundChild?: boolean\n ) {\n const clientAPI = this.createClientAPI(eventBusElement, nodeId, wc_id, wc, isCompoundChild);\n\n if (wc.__postProcess) {\n const url =\n new URL(document.baseURI).origin === new URL(viewUrl, document.baseURI).origin\n ? new URL('./', new URL(viewUrl, document.baseURI))\n : new URL('./', viewUrl);\n wc.__postProcess(ctx, clientAPI, url.origin + url.pathname);\n } else {\n wc.context = ctx;\n wc.LuigiClient = clientAPI;\n }\n }\n\n /**\n * Generates a unique web component id (tagname) based on the viewUrl\n * returns a string that can be used as part of a tagname, only alphanumeric\n * characters and no whitespaces.\n */\n generateWCId(viewUrl: string): string {\n let charRep = '';\n const normalizedViewUrl = new URL(viewUrl, encodeURI(location.href)).href;\n for (let i = 0; i < normalizedViewUrl.length; i++) {\n charRep += normalizedViewUrl.charCodeAt(i).toString(16);\n }\n return 'luigi-wc-' + charRep;\n }\n\n /**\n * Does a module import from viewUrl and defines a new web component\n * with the default export of the module or the first export extending HTMLElement if no default is\n * specified.\n * @param viewUrl url to render content from\n * @param wc_id a tagname that is used when creating the web component element\n * @returns a promise that gets resolved after successfull import\n */\n registerWCFromUrl(viewUrl: string, wc_id: string): Promise<unknown> {\n const i18nViewUrl = this.processViewUrl(viewUrl);\n return new Promise((resolve, reject) => {\n if (this.checkWCUrl(i18nViewUrl)) {\n this.dynamicImport(i18nViewUrl)\n .then((module) => {\n try {\n if (!window.customElements.get(wc_id)) {\n let cmpClazz = module.default;\n if (!HTMLElement.isPrototypeOf(cmpClazz)) {\n const props = Object.keys(module);\n for (let i = 0; i < props.length; i++) {\n cmpClazz = module[props[i]];\n if (HTMLElement.isPrototypeOf(cmpClazz)) {\n break;\n }\n }\n }\n window.customElements.define(wc_id, cmpClazz);\n }\n resolve(1);\n } catch (err) {\n reject(err);\n }\n })\n .catch((err) => {\n reject(err);\n });\n } else {\n const message = `Error: View URL '${i18nViewUrl}' not allowed to be included`;\n reject(message);\n }\n });\n }\n\n /**\n * Handles the import of self registered web component bundles, i.e. the web component\n * is added to the customElements registry by the bundle code rather than by luigi.\n *\n * @param {*} node the corresponding navigation node\n * @param {*} viewUrl the source of the wc bundle\n * @param {*} onload callback function executed after script attached and loaded\n */\n includeSelfRegisteredWCFromUrl(node: WebComponentNode, viewUrl: string, onload: () => void) {\n if (this.checkWCUrl(viewUrl)) {\n /** Append reg function to luigi object if not present */\n if (!this.containerService.getContainerManager()._registerWebcomponent) {\n this.containerService.getContainerManager()._registerWebcomponent = (srcString, el) => {\n window.customElements.define(this.generateWCId(srcString), el);\n };\n }\n // @ts-ignore\n if (!window.Luigi) {\n // @ts-ignore\n window.Luigi = {};\n // @ts-ignore\n if (!window.Luigi._registerWebcomponent) {\n // @ts-ignore\n window.Luigi._registerWebcomponent = (src, element) => {\n this.containerService.getContainerManager()._registerWebcomponent(src, element);\n };\n }\n }\n const scriptTag = document.createElement('script');\n scriptTag.setAttribute('src', viewUrl);\n if (node.webcomponent.type === 'module') {\n scriptTag.setAttribute('type', 'module');\n }\n scriptTag.setAttribute('defer', 'true');\n scriptTag.addEventListener('load', () => {\n onload();\n });\n document.body.appendChild(scriptTag);\n } else {\n console.warn(`View URL '${viewUrl}' not allowed to be included`);\n }\n }\n\n /**\n * Checks if a url is allowed to be included, based on 'navigation.validWebcomponentUrls' in luigi config.\n * Returns true, if allowed.\n *\n * @param {*} url the url string to check\n */\n checkWCUrl(url: string): boolean {\n // if (url.indexOf('://') > 0 || url.trim().indexOf('//') === 0) {\n // const ur = new URL(url);\n // if (ur.host === window.location.host) {\n // return true; // same host is okay\n // }\n\n // const valids = LuigiConfig.getConfigValue('navigation.validWebcomponentUrls');\n // if (valids && valids.length > 0) {\n // for (let el of valids) {\n // try {\n // if (new RegExp(el).test(url)) {\n // return true;\n // }\n // } catch (e) {\n // console.error(e);\n // }\n // }\n // }\n // return false;\n // }\n // relative URL is okay\n // if (url === 'test.js') {\n // return false;\n // }\n return true;\n }\n\n /**\n * Adds a web component defined by viewUrl to the wc_container and sets the node context.\n * If the web component is not defined yet, it gets imported.\n *\n * @param viewUrl url to render content from\n * @param wc_container web component container element\n * @param context luigi context\n * @param node node to operate on\n * @param nodeId id identifying the node\n * @param isCompoundChild defines if rendered mf is a compound child or not\n */\n renderWebComponent(\n viewUrl: string,\n wc_container: HTMLElement | any, // eslint-disable-line @typescript-eslint/no-explicit-any\n context: object,\n node: WebComponentNode,\n nodeId?: string,\n isCompoundChild?: boolean\n ) {\n const i18nViewUrl = this.processViewUrl(viewUrl, { context });\n const wc_id = node?.webcomponent?.tagName || this.generateWCId(i18nViewUrl);\n const wcItemPlaceholder = document.createElement('div');\n wc_container.appendChild(wcItemPlaceholder);\n wc_container._luigi_node = node;\n\n if (window.customElements.get(wc_id)) {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n } else {\n /** Custom import function, if defined */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((window as any).luigiWCFn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).luigiWCFn(i18nViewUrl, wc_id, wcItemPlaceholder, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else if (node?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(node, i18nViewUrl, () => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n });\n } else {\n this.registerWCFromUrl(i18nViewUrl, wc_id)\n .then(() => {\n this.attachWC(wc_id, wcItemPlaceholder, wc_container, context, i18nViewUrl, nodeId, isCompoundChild);\n })\n .catch((error) => {\n console.warn('ERROR =>', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n }\n }\n\n /**\n * Creates a compound container according to the given renderer.\n * Returns a promise that gets resolved with the created container DOM element.\n *\n * @param {DefaultCompoundRenderer} renderer\n */\n createCompoundContainerAsync(\n renderer: WebComponentRenderer,\n ctx: object,\n navNode: WebComponentNode\n ): Promise<HTMLElement> {\n return new Promise((resolve, reject) => {\n if (renderer.viewUrl) {\n try {\n const wc_id = navNode?.webcomponent?.tagName || this.generateWCId(renderer.viewUrl);\n if (navNode?.webcomponent?.selfRegistered) {\n this.includeSelfRegisteredWCFromUrl(navNode, renderer.viewUrl, () => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n });\n } else {\n this.registerWCFromUrl(renderer.viewUrl, wc_id)\n .then(() => {\n const wc = document.createElement(wc_id);\n wc.setAttribute('lui_web_component', 'true');\n this.initWC(wc, wc_id, wc, renderer.viewUrl, ctx, '_root');\n resolve(wc);\n })\n .catch((error) => {\n console.warn('Error: ', error);\n // dispatch an error event to be handled core side\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n }\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(renderer.createCompoundContainer());\n }\n });\n }\n\n /**\n * Responsible for rendering web component compounds based on a renderer or a nesting\n * micro frontend.\n *\n * @param {*} navNode the navigation node defining the compound\n * @param {ContainerElement} wc_container the web component container dom element\n * @param {*} context the luigi node context\n */\n renderWebComponentCompound(\n navNode: WebComponentNode,\n wc_container: ContainerElement,\n context: object\n ): Promise<ContainerElement> {\n let renderer;\n if (navNode.webcomponent && navNode.viewUrl) {\n renderer = new DefaultCompoundRenderer();\n renderer.viewUrl = this.processViewUrl(navNode.viewUrl, { context });\n renderer.createCompoundItemContainer = (layoutConfig: LayoutConfig) => {\n const cnt = document.createElement('div');\n if (layoutConfig?.slot) {\n cnt.setAttribute('slot', layoutConfig.slot);\n }\n return cnt;\n };\n } else if (navNode.compound?.renderer) {\n renderer = resolveRenderer(navNode.compound.renderer);\n }\n\n renderer = renderer || new DefaultCompoundRenderer();\n return new Promise((resolve) => {\n this.createCompoundContainerAsync(renderer, context, navNode)\n .then((compoundCnt: ContainerElement) => {\n wc_container._luigi_mfe_webcomponent = compoundCnt;\n wc_container._luigi_node = navNode;\n const ebListeners = {};\n compoundCnt.eventBus = {\n listeners: ebListeners,\n onPublishEvent: (event, srcNodeId, wcId) => {\n const listeners = ebListeners[srcNodeId + '.' + event.type] || [];\n listeners.push(...(ebListeners['*.' + event.type] || []));\n\n listeners.forEach((listenerInfo) => {\n const target =\n listenerInfo.wcElement || compoundCnt.querySelector('[nodeId=' + listenerInfo.wcElementId + ']');\n if (target) {\n target.dispatchEvent(\n new CustomEvent(listenerInfo.action, {\n detail: listenerInfo.converter ? listenerInfo.converter(event.detail) : event.detail\n })\n );\n } else {\n console.debug('Could not find event target', listenerInfo);\n }\n });\n }\n };\n navNode.compound?.children?.forEach((wc, index) => {\n const ctx = { ...context, ...wc.context };\n const compoundItemCnt = renderer.createCompoundItemContainer(wc.layoutConfig);\n\n compoundItemCnt.eventBus = compoundCnt.eventBus;\n renderer.attachCompoundItem(compoundCnt, compoundItemCnt);\n\n const nodeId = wc.id || 'gen_' + index;\n this.renderWebComponent(wc.viewUrl, compoundItemCnt, ctx, wc, nodeId, true);\n registerEventListeners(ebListeners, wc, nodeId);\n });\n wc_container.appendChild(compoundCnt);\n // listener for nesting wc\n registerEventListeners(ebListeners, navNode.compound, '_root', compoundCnt);\n resolve(compoundCnt);\n })\n .catch((error) => {\n // dispatch an error event to be handled core sid\n console.warn('Error: ', error);\n this.containerService.dispatch(Events.RUNTIME_ERROR_HANDLING_REQUEST, this.thisComponent, error);\n });\n });\n }\n}\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n allowRules: { type: 'Array', reflect: false, attribute: 'allow-rules' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n authData: { type: 'Object', reflect: false, attribute: 'auth-data' },\n clientPermissions: { type: 'Object', reflect: false, attribute: 'client-permissions' },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n label: { type: 'String', reflect: false, attribute: 'label' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow' },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n sandboxRules: { type: 'Array', reflect: false, attribute: 'sandbox-rules' },\n searchParams: { type: 'Object', reflect: false, attribute: 'search-params' },\n skipCookieCheck: { type: 'String', reflect: false, attribute: 'skip-cookie-check' },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: { type: 'Object', reflect: false, attribute: 'user-settings' },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n\n return class extends customElementConstructor {\n sendCustomMessage = notInitFn('sendCustomMessage');\n updateContext = notInitFn('updateContext');\n updateViewUrl = notInitFn('updateViewUrl');\n closeAlert = notInitFn('closeAlert');\n attributeChangedCallback(name, oldValue, newValue) {\n if (this.containerInitialized) {\n if (name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n if (name === 'auth-data') {\n ContainerAPI.updateAuthData(this.iframeHandle, JSON.parse(newValue));\n }\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import { ContainerAPI } from './api/container-api';\n import { Events } from './constants/communication';\n import type { IframeHandle, ContainerElement } from './constants/container.model';\n import { containerService } from './services/container.service';\n import { getAllowRules } from './services/iframe-helpers';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let allowRules: string[];\n export let anchor: string;\n export let authData: any;\n export let clientPermissions: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let label: string;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let sandboxRules: string[];\n export let searchParams: any;\n export let skipCookieCheck: 'false' | 'true';\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n const iframeHandle: IframeHandle = {};\n let mainComponent: ContainerElement;\n let containerInitialized = false;\n\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n allowRules &&\n anchor &&\n authData &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n sandboxRules &&\n searchParams &&\n skipCookieCheck &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!containerInitialized) {\n thisComponent.sendCustomMessage = (id: string, data?: object) => {\n ContainerAPI.sendCustomMessage(\n id,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n !!webcomponent,\n iframeHandle,\n data\n );\n };\n\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n context = contextObj;\n if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent.context = contextObj;\n } else {\n ContainerAPI.updateContext(contextObj, internal, iframeHandle);\n }\n };\n\n thisComponent.closeAlert = (id: string, dismissKey: string) => {\n ContainerAPI.closeAlert(id, dismissKey, iframeHandle);\n };\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n\n const ctx = GenericHelperFunctions.resolveContext(context);\n\n thisComponent.updateViewUrl = (viewUrl: string, internal?: object) => {\n if (viewUrl?.length) {\n ContainerAPI.updateViewUrl(viewUrl, GenericHelperFunctions.resolveContext(context), internal, iframeHandle);\n }\n };\n\n if (webcomponent && webcomponent != 'false') {\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n const webComponentValue = GenericHelperFunctions.checkWebcomponentValue(webcomponent);\n webcomponentService.renderWebComponent(\n viewurl,\n thisComponent.getNoShadow() ? thisComponent : mainComponent,\n ctx,\n typeof webComponentValue === 'object' ? { webcomponent: webComponentValue } : {}\n );\n } else {\n if (!thisComponent.getNoShadow()) {\n // removeing mainComponent\n thisComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n }\n }\n if (skipInitCheck) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (webcomponent) {\n (thisComponent.getNoShadow() ? thisComponent : mainComponent).addEventListener('wc_ready', () => {\n if (\n !(thisComponent.getNoShadow() ? thisComponent : mainComponent)._luigi_mfe_webcomponent?.deferLuigiClientWCInit\n ) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n }\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n }\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any = mainComponent.parentNode;\n thisComponent.iframeHandle = iframeHandle;\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit) {\n initialize(thisComponent);\n }\n });\n\n onDestroy(async () => {});\n</script>\n\n<main bind:this={mainComponent} class={webcomponent ? undefined : 'lui-isolated'}>\n {#if containerInitialized}\n {#if !webcomponent || webcomponent === 'false'}\n <style>\n main.lui-isolated,\n .lui-isolated iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n main.lui-isolated {\n line-height: 0;\n }\n </style>\n <iframe\n bind:this={iframeHandle.iframe}\n src={viewurl}\n title={label}\n allow={getAllowRules(allowRules)}\n sandbox={sandboxRules ? sandboxRules.join(' ') : undefined}\n />\n {/if}\n {/if}\n</main>\n","<svelte:options\n customElement={{\n tag: null,\n shadow: 'none',\n props: {\n activeFeatureToggleList: { type: 'Array', reflect: false, attribute: 'active-feature-toggle-list' },\n anchor: { type: 'String', reflect: false, attribute: 'anchor' },\n clientPermissions: {\n type: 'Object',\n reflect: false,\n attribute: 'client-permissions'\n },\n compoundConfig: {\n type: 'Object',\n reflect: false,\n attribute: 'compound-config'\n },\n context: { type: 'String', reflect: false, attribute: 'context' },\n deferInit: { type: 'Boolean', attribute: 'defer-init' },\n dirtyStatus: { type: 'Boolean', reflect: false, attribute: 'dirty-status' },\n documentTitle: { type: 'String', reflect: false, attribute: 'document-title' },\n hasBack: { type: 'Boolean', reflect: false, attribute: 'has-back' },\n locale: { type: 'String', reflect: false, attribute: 'locale' },\n noShadow: { type: 'Boolean', attribute: 'no-shadow', reflect: false },\n nodeParams: { type: 'Object', reflect: false, attribute: 'node-params' },\n pathParams: { type: 'Object', reflect: false, attribute: 'path-params' },\n searchParams: {\n type: 'Object',\n reflect: false,\n attribute: 'search-params'\n },\n skipInitCheck: { type: 'Boolean', reflect: false, attribute: 'skip-init-check' },\n theme: { type: 'String', reflect: false, attribute: 'theme' },\n userSettings: {\n type: 'Object',\n reflect: false,\n attribute: 'user-settings'\n },\n viewurl: { type: 'String', reflect: false, attribute: 'viewurl' },\n webcomponent: { type: 'String', reflect: false, attribute: 'webcomponent' }\n },\n extend: (customElementConstructor) => {\n let notInitFn = (name) => {\n return () =>\n console.warn(name + \" can't be called on luigi-container before its micro frontend is attached to the DOM.\");\n };\n return class extends customElementConstructor {\n updateContext = notInitFn('updateContext');\n attributeChangedCallback(name, oldValue, newValue) {\n if (this.containerInitialized && name === 'context') {\n this.updateContext(JSON.parse(newValue));\n }\n }\n\n getNoShadow() {\n return this.hasAttribute('no-shadow') || this.noShadow;\n }\n };\n }\n }}\n/>\n\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { Events } from './constants/communication';\n import type { ContainerElement } from './constants/container.model';\n import { ContainerService } from './services/container.service';\n import { WebComponentService } from './services/webcomponents.service';\n import { GenericHelperFunctions } from './utilities/helpers';\n\n /* eslint-disable */\n export let activeFeatureToggleList: string[];\n export let anchor: string;\n export let clientPermissions: any;\n export let compoundConfig: any;\n export let context: string;\n export let deferInit: boolean;\n export let dirtyStatus: boolean;\n export let documentTitle: string;\n export let hasBack: boolean;\n export let locale: string;\n export let noShadow: boolean;\n export let nodeParams: any;\n export let pathParams: any;\n export let searchParams: any;\n export let skipInitCheck: boolean;\n export let theme: string;\n export let userSettings: any;\n export let viewurl: string;\n export let webcomponent: any;\n /* eslint-enable */\n\n let containerInitialized = false;\n let mainComponent: ContainerElement;\n let eventBusElement: ContainerElement;\n\n const containerService = new ContainerService();\n const webcomponentService = new WebComponentService();\n\n // Only needed for get rid of \"unused export property\" svelte compiler warnings\n export const unwarn = () => {\n return (\n activeFeatureToggleList &&\n anchor &&\n clientPermissions &&\n dirtyStatus &&\n documentTitle &&\n hasBack &&\n locale &&\n noShadow &&\n nodeParams &&\n pathParams &&\n searchParams &&\n skipInitCheck &&\n theme &&\n userSettings\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const initialize = (thisComponent: any) => {\n if (!compoundConfig || containerInitialized) {\n return;\n }\n thisComponent.updateContext = (contextObj: object, internal?: object) => {\n const rootElement = thisComponent.getNoShadow() ? thisComponent : mainComponent;\n rootElement._luigi_mfe_webcomponent.context = contextObj;\n context = contextObj;\n\n const compoundChildrenQueryElement = rootElement._luigi_mfe_webcomponent;\n if (compoundChildrenQueryElement) {\n const compoundChildren = compoundChildrenQueryElement.querySelectorAll('[lui_web_component]');\n compoundChildren?.forEach((item) => {\n const ctx = item.context || {};\n item.context = Object.assign(ctx, contextObj);\n });\n }\n };\n const ctx = GenericHelperFunctions.resolveContext(context);\n deferInit = false;\n\n const node = {\n compound: compoundConfig,\n viewUrl: viewurl,\n webcomponent: GenericHelperFunctions.checkWebcomponentValue(webcomponent) || true\n };\n if (!thisComponent.getNoShadow()) {\n mainComponent.innerHTML = '';\n const shadow = thisComponent.attachShadow({ mode: 'open' });\n shadow.append(mainComponent);\n } else {\n // removing mainComponent\n thisComponent.innerHTML = '';\n }\n webcomponentService\n .renderWebComponentCompound(node, thisComponent.getNoShadow() ? thisComponent : mainComponent, ctx)\n .then((compCnt: ContainerElement) => {\n eventBusElement = compCnt;\n if (skipInitCheck || !node.viewUrl) {\n thisComponent.initialized = true;\n setTimeout(() => {\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n });\n } else if (eventBusElement.LuigiClient && !eventBusElement.deferLuigiClientWCInit) {\n thisComponent.initialized = true;\n webcomponentService.dispatchLuigiEvent(Events.INITIALIZED, {});\n }\n });\n containerInitialized = true;\n thisComponent.containerInitialized = true;\n };\n\n onMount(async () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const thisComponent: any =\n mainComponent.getRootNode() === document\n ? mainComponent.parentNode\n : (mainComponent.getRootNode() as ShadowRoot).host;\n\n thisComponent.init = () => {\n initialize(thisComponent);\n };\n if (!deferInit) {\n initialize(thisComponent);\n }\n\n containerService.registerContainer(thisComponent);\n webcomponentService.thisComponent = thisComponent;\n });\n</script>\n\n<main bind:this={mainComponent} />\n\n<style>\n main {\n width: 100%;\n height: 100%;\n border: none;\n }\n</style>\n","import type { ComponentType } from 'svelte';\nimport LuigiContainer from './LuigiContainer.svelte';\nimport LuigiCompoundContainer from './LuigiCompoundContainer.svelte';\nimport { Events } from './constants/communication';\nexport { default as LuigiContainer } from './LuigiContainer.svelte';\nexport { default as LuigiCompoundContainer } from './LuigiCompoundContainer.svelte';\nexport type { PathExistsEvent } from './constants/event-type';\n\nexport default Events;\n\nif (!customElements.get('luigi-container')) {\n customElements.define('luigi-container', (LuigiContainer as ComponentType).element);\n}\n\nif (!customElements.get('luigi-compound-container')) {\n customElements.define('luigi-compound-container', (LuigiCompoundContainer as ComponentType).element);\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append_styles","target","style_sheet_id","styles","append_styles_to","node","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","appendChild","append","head","sheet","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","name","text","data","createTextNode","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_current_component","component","get_current_component","Error","onMount","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","length","update","e","pop","i","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","destroy_component","detaching","filtered","targets","c","indexOf","flush_render_callbacks","on_destroy","d","make_dirty","then","fill","init","options","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","block","delete","local","m","new_on_destroy","map","filter","mount_component","SvelteElement","get_custom_element_value","prop","props_definition","transform","type","JSON","stringify","parse","create_custom_element","Component","slots","accessors","use_shadow_dom","extend","Class","constructor","super","this","$$p_d","observedAttributes","keys","key","toLowerCase","defineProperty","prototype","get","$$c","$$d","set","$set","accessor","HTMLElement","$$ctor","$$s","$$cn","$$r","$$l","$$l_u","$$componentCtor","$$slots","attachShadow","mode","addEventListener","listener","unsub","$on","removeEventListener","connectedCallback","create_slot","existing_slots","result","slot","get_custom_elements_slots","attributes","$$g_p","undefined","shadowRoot","$$scope","reflect_attributes","reflect","attribute_value","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","attribute_name","find","SvelteComponent","$$set","index","splice","obj","LuigiInternalMessageID","Events","window","__svelte","v","CUSTOM_MESSAGE","GET_CONTEXT","SEND_CONTEXT_HANDSHAKE","CONTEXT_RECEIVED","NAVIGATION_REQUEST","ALERT_REQUEST","ALERT_CLOSED","INITIALIZED","ADD_SEARCH_PARAMS_REQUEST","ADD_NODE_PARAMS_REQUEST","SHOW_CONFIRMATION_MODAL_REQUEST","SHOW_LOADING_INDICATOR_REQUEST","HIDE_LOADING_INDICATOR_REQUEST","SET_CURRENT_LOCALE_REQUEST","LOCAL_STORAGE_SET_REQUEST","RUNTIME_ERROR_HANDLING_REQUEST","SET_ANCHOR_LINK_REQUEST","SET_THIRD_PARTY_COOKIES_REQUEST","BACK_NAVIGATION_REQUEST","GET_CURRENT_ROUTE_REQUEST","SEND_CONTEXT_OBJECT","NAVIGATION_COMPLETED_REPORT","UPDATE_MODAL_PATH_DATA_REQUEST","CHECK_PATH_EXISTS_REQUEST","SET_DIRTY_STATUS_REQUEST","AUTH_SET_TOKEN","GET_CONTEXT_REQUEST","SET_VIEW_GROUP_DATA_REQUEST","SET_DOCUMENT_TITLE_REQUEST","OPEN_USER_SETTINGS_REQUEST","CLOSE_USER_SETTINGS_REQUEST","COLLAPSE_LEFT_NAV_REQUEST","UPDATE_TOP_NAVIGATION_REQUEST","PATH_EXISTS_REQUEST","GO_BACK_REQUEST","HAS_BACK_REQUEST","REMOVE_BACKDROP_REQUEST","GenericHelperFunctions","isFunction","functionToCheck","toString","call","isObject","objectToCheck","isArray","checkWebcomponentValue","webcomponent","console","warn","resolveContext","ContainerService","isVisible","offsetWidth","offsetHeight","getClientRects","sendCustomMessageToIframe","iframeHandle","msg","msgName","messageName","iframe","contentWindow","iframeUrl","URL","src","postMessage","origin","error","dispatch","targetCnt","callbackName","customEvent","CustomEvent","detail","dispatchEvent","getTargetContainer","event","cnt","globalThis","__luigi_container_manager","container","source","getContainerManager","messageListener","evData","_metaData","internal","thirdPartyCookieCheck","disabled","skipCookieCheck","authData","params","keepBrowserHistory","registerContainer","thisComponent","containerService","ContainerAPI","updateContext","contextObj","internalParameter","withoutSync","updateViewUrl","viewUrl","updateAuthData","sendCustomMessage","mainComponent","isWebcomponent","_luigi_mfe_webcomponent","closeAlert","dismissKey","getAllowRules","allowRules","rules","rule","replaceAll","join","DefaultCompoundRenderer","rendererObj","rendererObject","config","createCompoundContainer","createCompoundItemContainer","layoutConfig","attachCompoundItem","compoundCnt","compoundItemCnt","CustomCompoundRenderer","use","extends","superRenderer","resolveRenderer","GridCompoundRenderer","containerClass","Date","getTime","classList","mediaQueries","layouts","el","minWidth","maxWidth","mq","columns","rows","gap","innerHTML","minHeight","row","column","rendererConfig","rendererDef","registerEventListeners","eventbusListeners","navNode","nodeId","wcElement","eventListeners","evID","listenerList","listenerInfo","wcElementId","action","converter","dataConverter","deSanitizeParam","String","WebComponentService","dynamicImport","freeze","import","processViewUrl","attachWC","wc_id","wcItemPlaceholder","wc_container","isCompoundChild","contains","wc","initWC","replaceChild","_luigi_node","Event","dispatchLuigiEvent","createClientAPI","eventBusElement","linkManager","fromContext","fromClosestContext","fromVirtualTreeRoot","fromParent","nodeParams","linkManagerInstance","navigate","route","settings","link","navigateToIntent","semanticSlug","newPath","paramList","entries","slice","navigationContext","getCurrentRoute","reject","withParams","updateTopNavigation","pathExists","exists","openAsDrawer","drawerSettings","drawer","openAsModal","modalSettings","modal","openAsSplitView","splitViewSettings","splitView","goBack","goBackContext","hasBack","uxManager","showAlert","alertSettings","showConfirmationModal","getCurrentTheme","theme","closeUserSettings","userSettings","openUserSettings","collapseLeftSideNav","getDirtyStatus","dirtyStatus","getDocumentTitle","documentTitle","setDocumentTitle","title","removeBackdrop","hideAppLoadingIndicator","getCurrentLocale","locale","getActiveFeatureToggles","activeFeatureToggleList","publishEvent","ev","eventBus","onPublishEvent","payload","luigiClientInit","addNodeParams","getNodeParams","shouldDesanitise","paramsMap","reduce","sanitizedMap","paramPair","setAnchor","getAnchor","getCoreSearchParams","searchParams","getPathParams","pathParams","getClientPermissions","clientPermissions","getUserSettings","setViewGroupData","clientAPI","__postProcess","baseURI","pathname","LuigiClient","generateWCId","charRep","normalizedViewUrl","encodeURI","location","charCodeAt","registerWCFromUrl","i18nViewUrl","checkWCUrl","module","customElements","cmpClazz","default","isPrototypeOf","define","err","catch","includeSelfRegisteredWCFromUrl","onload","_registerWebcomponent","srcString","Luigi","scriptTag","body","renderWebComponent","tagName","luigiWCFn","selfRegistered","createCompoundContainerAsync","renderer","renderWebComponentCompound","compound","ebListeners","listeners","srcNodeId","wcId","querySelector","debug","create_if_block_1","iframe_src_value","iframe_allow_value","create_if_block","main","$$props","deferInit","label","noShadow","sandboxRules","skipInitCheck","viewurl","containerInitialized","webcomponentService","initialize","getNoShadow","$$invalidate","webComponentValue","initialized","setTimeout","deferLuigiClientWCInit","async","$$value","compoundConfig","rootElement","compoundChildrenQueryElement","compoundChildren","querySelectorAll","item","assign","compCnt","customElementConstructor","notInitFn","oldValue","hasAttribute","LuigiContainer","LuigiCompoundContainer"],"mappings":"AACO,SAASA,IAAS,CAsClB,SAASC,EAAIC,GACnB,OAAOA,GACR,CAEO,SAASC,IACf,OAAOC,OAAOC,OAAO,KACtB,CAMO,SAASC,EAAQC,GACvBA,EAAIC,QAAQP,EACb,CAMO,SAASQ,EAAYC,GAC3B,MAAwB,mBAAVA,CACf,CAGO,SAASC,EAAeC,EAAGC,GACjC,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAMD,GAAkB,iBAANA,GAAgC,mBAANA,CAC5E,CAEA,IAAIE,EClEOC,EDyEJ,SAASC,EAAcC,EAAaC,GAC1C,OAAID,IAAgBC,IACfJ,IACJA,EAAuBK,SAASC,cAAc,MAG/CN,EAAqBO,KAAOH,EACrBD,IAAgBH,EAAqBO,KAC7C,CEqEO,SAASC,EAAcC,EAAQC,EAAgBC,GACrD,MAAMC,EAaA,SAA4BC,GAClC,IAAKA,EAAM,OAAOR,SAClB,MAAMS,EAAOD,EAAKE,YAAcF,EAAKE,cAAgBF,EAAKG,cAC1D,GAAIF,GAAkC,EAAOG,KAC5C,OAAA,EAED,OAAOJ,EAAKG,aACb,CApB0BE,CAAmBT,GAC5C,IAAKG,EAAiBO,eAAeT,GAAiB,CACrD,MAAMU,EAAQC,EAAQ,SACtBD,EAAME,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