reflex_behaviors 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../node_modules/turbo_ready/app/javascript/methods/dispatch.js", "../../../node_modules/alpinejs/dist/module.esm.js", "../../../node_modules/@alpinejs/morph/dist/module.esm.js", "../../../node_modules/turbo_ready/app/javascript/methods/mutate.js", "../../../node_modules/turbo_ready/app/javascript/invoke.js", "../../../node_modules/turbo_ready/app/javascript/index.js", "../../../node_modules/turbo_reflex/app/javascript/meta.js", "../../../node_modules/turbo_reflex/app/javascript/events.js", "../../../node_modules/turbo_reflex/app/javascript/state/observable.js", "../../../node_modules/turbo_reflex/app/javascript/state/index.js", "../../../node_modules/turbo_reflex/app/javascript/renderer.js", "../../../node_modules/turbo_reflex/app/javascript/activity.js", "../../../node_modules/turbo_reflex/app/javascript/lifecycle.js", "../../../node_modules/turbo_reflex/app/javascript/turbo.js", "../../../node_modules/turbo_reflex/app/javascript/schema.js", "../../../node_modules/turbo_reflex/app/javascript/delegates.js", "../../../node_modules/turbo_reflex/app/javascript/elements.js", "../../../node_modules/turbo_reflex/app/javascript/drivers/form.js", "../../../node_modules/turbo_reflex/app/javascript/urls.js", "../../../node_modules/turbo_reflex/app/javascript/drivers/frame.js", "../../../node_modules/turbo_reflex/app/javascript/drivers/method.js", "../../../node_modules/turbo_reflex/app/javascript/drivers/window.js", "../../../node_modules/turbo_reflex/app/javascript/drivers/index.js", "../../../node_modules/turbo_reflex/app/javascript/logger.js", "../../../node_modules/turbo_reflex/app/javascript/uuids.js", "../../../node_modules/turbo_reflex/app/javascript/index.js", "../../javascript/elements/reflex_element.js", "../../javascript/elements/toggle_target_element.js", "../../javascript/utils/dom.js", "../../javascript/devtools/elements/devtool_element.js", "../../javascript/devtools/elements/supervisor_element.js", "../../javascript/devtools/elements/tooltip_element.js", "../../javascript/devtools/dependencies.js", "../../javascript/devtools/supervisor.js", "../../javascript/devtools/toggle.js", "../../javascript/elements/toggle_trigger_element.js", "../../javascript/elements/index.js", "../../javascript/devtools/index.js", "../../javascript/index.js"],
4
- "sourcesContent": ["function dispatch (targets, name, options = {}) {\n const evt = new CustomEvent(name, options)\n targets.forEach(t => t.dispatchEvent(evt))\n}\n\nexport default dispatch\n", "// packages/alpinejs/src/scheduler.js\nvar flushPending = false;\nvar flushing = false;\nvar queue = [];\nfunction scheduler(callback) {\n queueJob(callback);\n}\nfunction queueJob(job) {\n if (!queue.includes(job))\n queue.push(job);\n queueFlush();\n}\nfunction dequeueJob(job) {\n let index = queue.indexOf(job);\n if (index !== -1)\n queue.splice(index, 1);\n}\nfunction queueFlush() {\n if (!flushing && !flushPending) {\n flushPending = true;\n queueMicrotask(flushJobs);\n }\n}\nfunction flushJobs() {\n flushPending = false;\n flushing = true;\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n flushing = false;\n}\n\n// packages/alpinejs/src/reactivity.js\nvar reactive;\nvar effect;\nvar release;\nvar raw;\nvar shouldSchedule = true;\nfunction disableEffectScheduling(callback) {\n shouldSchedule = false;\n callback();\n shouldSchedule = true;\n}\nfunction setReactivityEngine(engine) {\n reactive = engine.reactive;\n release = engine.release;\n effect = (callback) => engine.effect(callback, {scheduler: (task) => {\n if (shouldSchedule) {\n scheduler(task);\n } else {\n task();\n }\n }});\n raw = engine.raw;\n}\nfunction overrideEffect(override) {\n effect = override;\n}\nfunction elementBoundEffect(el) {\n let cleanup2 = () => {\n };\n let wrappedEffect = (callback) => {\n let effectReference = effect(callback);\n if (!el._x_effects) {\n el._x_effects = new Set();\n el._x_runEffects = () => {\n el._x_effects.forEach((i) => i());\n };\n }\n el._x_effects.add(effectReference);\n cleanup2 = () => {\n if (effectReference === void 0)\n return;\n el._x_effects.delete(effectReference);\n release(effectReference);\n };\n return effectReference;\n };\n return [wrappedEffect, () => {\n cleanup2();\n }];\n}\n\n// packages/alpinejs/src/mutation.js\nvar onAttributeAddeds = [];\nvar onElRemoveds = [];\nvar onElAddeds = [];\nfunction onElAdded(callback) {\n onElAddeds.push(callback);\n}\nfunction onElRemoved(el, callback) {\n if (typeof callback === \"function\") {\n if (!el._x_cleanups)\n el._x_cleanups = [];\n el._x_cleanups.push(callback);\n } else {\n callback = el;\n onElRemoveds.push(callback);\n }\n}\nfunction onAttributesAdded(callback) {\n onAttributeAddeds.push(callback);\n}\nfunction onAttributeRemoved(el, name, callback) {\n if (!el._x_attributeCleanups)\n el._x_attributeCleanups = {};\n if (!el._x_attributeCleanups[name])\n el._x_attributeCleanups[name] = [];\n el._x_attributeCleanups[name].push(callback);\n}\nfunction cleanupAttributes(el, names) {\n if (!el._x_attributeCleanups)\n return;\n Object.entries(el._x_attributeCleanups).forEach(([name, value]) => {\n if (names === void 0 || names.includes(name)) {\n value.forEach((i) => i());\n delete el._x_attributeCleanups[name];\n }\n });\n}\nvar observer = new MutationObserver(onMutate);\nvar currentlyObserving = false;\nfunction startObservingMutations() {\n observer.observe(document, {subtree: true, childList: true, attributes: true, attributeOldValue: true});\n currentlyObserving = true;\n}\nfunction stopObservingMutations() {\n flushObserver();\n observer.disconnect();\n currentlyObserving = false;\n}\nvar recordQueue = [];\nvar willProcessRecordQueue = false;\nfunction flushObserver() {\n recordQueue = recordQueue.concat(observer.takeRecords());\n if (recordQueue.length && !willProcessRecordQueue) {\n willProcessRecordQueue = true;\n queueMicrotask(() => {\n processRecordQueue();\n willProcessRecordQueue = false;\n });\n }\n}\nfunction processRecordQueue() {\n onMutate(recordQueue);\n recordQueue.length = 0;\n}\nfunction mutateDom(callback) {\n if (!currentlyObserving)\n return callback();\n stopObservingMutations();\n let result = callback();\n startObservingMutations();\n return result;\n}\nvar isCollecting = false;\nvar deferredMutations = [];\nfunction deferMutations() {\n isCollecting = true;\n}\nfunction flushAndStopDeferringMutations() {\n isCollecting = false;\n onMutate(deferredMutations);\n deferredMutations = [];\n}\nfunction onMutate(mutations) {\n if (isCollecting) {\n deferredMutations = deferredMutations.concat(mutations);\n return;\n }\n let addedNodes = [];\n let removedNodes = [];\n let addedAttributes = new Map();\n let removedAttributes = new Map();\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].target._x_ignoreMutationObserver)\n continue;\n if (mutations[i].type === \"childList\") {\n mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node));\n mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node));\n }\n if (mutations[i].type === \"attributes\") {\n let el = mutations[i].target;\n let name = mutations[i].attributeName;\n let oldValue = mutations[i].oldValue;\n let add2 = () => {\n if (!addedAttributes.has(el))\n addedAttributes.set(el, []);\n addedAttributes.get(el).push({name, value: el.getAttribute(name)});\n };\n let remove = () => {\n if (!removedAttributes.has(el))\n removedAttributes.set(el, []);\n removedAttributes.get(el).push(name);\n };\n if (el.hasAttribute(name) && oldValue === null) {\n add2();\n } else if (el.hasAttribute(name)) {\n remove();\n add2();\n } else {\n remove();\n }\n }\n }\n removedAttributes.forEach((attrs, el) => {\n cleanupAttributes(el, attrs);\n });\n addedAttributes.forEach((attrs, el) => {\n onAttributeAddeds.forEach((i) => i(el, attrs));\n });\n for (let node of removedNodes) {\n if (addedNodes.includes(node))\n continue;\n onElRemoveds.forEach((i) => i(node));\n if (node._x_cleanups) {\n while (node._x_cleanups.length)\n node._x_cleanups.pop()();\n }\n }\n addedNodes.forEach((node) => {\n node._x_ignoreSelf = true;\n node._x_ignore = true;\n });\n for (let node of addedNodes) {\n if (removedNodes.includes(node))\n continue;\n if (!node.isConnected)\n continue;\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n onElAddeds.forEach((i) => i(node));\n node._x_ignore = true;\n node._x_ignoreSelf = true;\n }\n addedNodes.forEach((node) => {\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n });\n addedNodes = null;\n removedNodes = null;\n addedAttributes = null;\n removedAttributes = null;\n}\n\n// packages/alpinejs/src/scope.js\nfunction scope(node) {\n return mergeProxies(closestDataStack(node));\n}\nfunction addScopeToNode(node, data2, referenceNode) {\n node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)];\n return () => {\n node._x_dataStack = node._x_dataStack.filter((i) => i !== data2);\n };\n}\nfunction refreshScope(element, scope2) {\n let existingScope = element._x_dataStack[0];\n Object.entries(scope2).forEach(([key, value]) => {\n existingScope[key] = value;\n });\n}\nfunction closestDataStack(node) {\n if (node._x_dataStack)\n return node._x_dataStack;\n if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) {\n return closestDataStack(node.host);\n }\n if (!node.parentNode) {\n return [];\n }\n return closestDataStack(node.parentNode);\n}\nfunction mergeProxies(objects) {\n let thisProxy = new Proxy({}, {\n ownKeys: () => {\n return Array.from(new Set(objects.flatMap((i) => Object.keys(i))));\n },\n has: (target, name) => {\n return objects.some((obj) => obj.hasOwnProperty(name));\n },\n get: (target, name) => {\n return (objects.find((obj) => {\n if (obj.hasOwnProperty(name)) {\n let descriptor = Object.getOwnPropertyDescriptor(obj, name);\n if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) {\n return true;\n }\n if ((descriptor.get || descriptor.set) && descriptor.enumerable) {\n let getter = descriptor.get;\n let setter = descriptor.set;\n let property = descriptor;\n getter = getter && getter.bind(thisProxy);\n setter = setter && setter.bind(thisProxy);\n if (getter)\n getter._x_alreadyBound = true;\n if (setter)\n setter._x_alreadyBound = true;\n Object.defineProperty(obj, name, {\n ...property,\n get: getter,\n set: setter\n });\n }\n return true;\n }\n return false;\n }) || {})[name];\n },\n set: (target, name, value) => {\n let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name));\n if (closestObjectWithKey) {\n closestObjectWithKey[name] = value;\n } else {\n objects[objects.length - 1][name] = value;\n }\n return true;\n }\n });\n return thisProxy;\n}\n\n// packages/alpinejs/src/interceptor.js\nfunction initInterceptors(data2) {\n let isObject2 = (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null;\n let recurse = (obj, basePath = \"\") => {\n Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, {value, enumerable}]) => {\n if (enumerable === false || value === void 0)\n return;\n let path = basePath === \"\" ? key : `${basePath}.${key}`;\n if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n obj[key] = value.initialize(data2, path, key);\n } else {\n if (isObject2(value) && value !== obj && !(value instanceof Element)) {\n recurse(value, path);\n }\n }\n });\n };\n return recurse(data2);\n}\nfunction interceptor(callback, mutateObj = () => {\n}) {\n let obj = {\n initialValue: void 0,\n _x_interceptor: true,\n initialize(data2, path, key) {\n return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key);\n }\n };\n mutateObj(obj);\n return (initialValue) => {\n if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n let initialize = obj.initialize.bind(obj);\n obj.initialize = (data2, path, key) => {\n let innerValue = initialValue.initialize(data2, path, key);\n obj.initialValue = innerValue;\n return initialize(data2, path, key);\n };\n } else {\n obj.initialValue = initialValue;\n }\n return obj;\n };\n}\nfunction get(obj, path) {\n return path.split(\".\").reduce((carry, segment) => carry[segment], obj);\n}\nfunction set(obj, path, value) {\n if (typeof path === \"string\")\n path = path.split(\".\");\n if (path.length === 1)\n obj[path[0]] = value;\n else if (path.length === 0)\n throw error;\n else {\n if (obj[path[0]])\n return set(obj[path[0]], path.slice(1), value);\n else {\n obj[path[0]] = {};\n return set(obj[path[0]], path.slice(1), value);\n }\n }\n}\n\n// packages/alpinejs/src/magics.js\nvar magics = {};\nfunction magic(name, callback) {\n magics[name] = callback;\n}\nfunction injectMagics(obj, el) {\n Object.entries(magics).forEach(([name, callback]) => {\n Object.defineProperty(obj, `$${name}`, {\n get() {\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n utilities = {interceptor, ...utilities};\n onElRemoved(el, cleanup2);\n return callback(el, utilities);\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/utils/error.js\nfunction tryCatch(el, expression, callback, ...args) {\n try {\n return callback(...args);\n } catch (e) {\n handleError(e, el, expression);\n }\n}\nfunction handleError(error2, el, expression = void 0) {\n Object.assign(error2, {el, expression});\n console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n setTimeout(() => {\n throw error2;\n }, 0);\n}\n\n// packages/alpinejs/src/evaluator.js\nvar shouldAutoEvaluateFunctions = true;\nfunction dontAutoEvaluateFunctions(callback) {\n let cache = shouldAutoEvaluateFunctions;\n shouldAutoEvaluateFunctions = false;\n callback();\n shouldAutoEvaluateFunctions = cache;\n}\nfunction evaluate(el, expression, extras = {}) {\n let result;\n evaluateLater(el, expression)((value) => result = value, extras);\n return result;\n}\nfunction evaluateLater(...args) {\n return theEvaluatorFunction(...args);\n}\nvar theEvaluatorFunction = normalEvaluator;\nfunction setEvaluator(newEvaluator) {\n theEvaluatorFunction = newEvaluator;\n}\nfunction normalEvaluator(el, expression) {\n let overriddenMagics = {};\n injectMagics(overriddenMagics, el);\n let dataStack = [overriddenMagics, ...closestDataStack(el)];\n if (typeof expression === \"function\") {\n return generateEvaluatorFromFunction(dataStack, expression);\n }\n let evaluator = generateEvaluatorFromString(dataStack, expression, el);\n return tryCatch.bind(null, el, expression, evaluator);\n}\nfunction generateEvaluatorFromFunction(dataStack, func) {\n return (receiver = () => {\n }, {scope: scope2 = {}, params = []} = {}) => {\n let result = func.apply(mergeProxies([scope2, ...dataStack]), params);\n runIfTypeOfFunction(receiver, result);\n };\n}\nvar evaluatorMemo = {};\nfunction generateFunctionFromString(expression, el) {\n if (evaluatorMemo[expression]) {\n return evaluatorMemo[expression];\n }\n let AsyncFunction = Object.getPrototypeOf(async function() {\n }).constructor;\n let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression) || /^(let|const)\\s/.test(expression) ? `(() => { ${expression} })()` : expression;\n const safeAsyncFunction = () => {\n try {\n return new AsyncFunction([\"__self\", \"scope\"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`);\n } catch (error2) {\n handleError(error2, el, expression);\n return Promise.resolve();\n }\n };\n let func = safeAsyncFunction();\n evaluatorMemo[expression] = func;\n return func;\n}\nfunction generateEvaluatorFromString(dataStack, expression, el) {\n let func = generateFunctionFromString(expression, el);\n return (receiver = () => {\n }, {scope: scope2 = {}, params = []} = {}) => {\n func.result = void 0;\n func.finished = false;\n let completeScope = mergeProxies([scope2, ...dataStack]);\n if (typeof func === \"function\") {\n let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression));\n if (func.finished) {\n runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n func.result = void 0;\n } else {\n promise.then((result) => {\n runIfTypeOfFunction(receiver, result, completeScope, params, el);\n }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0);\n }\n }\n };\n}\nfunction runIfTypeOfFunction(receiver, value, scope2, params, el) {\n if (shouldAutoEvaluateFunctions && typeof value === \"function\") {\n let result = value.apply(scope2, params);\n if (result instanceof Promise) {\n result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value));\n } else {\n receiver(result);\n }\n } else {\n receiver(value);\n }\n}\n\n// packages/alpinejs/src/directives.js\nvar prefixAsString = \"x-\";\nfunction prefix(subject = \"\") {\n return prefixAsString + subject;\n}\nfunction setPrefix(newPrefix) {\n prefixAsString = newPrefix;\n}\nvar directiveHandlers = {};\nfunction directive(name, callback) {\n directiveHandlers[name] = callback;\n}\nfunction directives(el, attributes, originalAttributeOverride) {\n attributes = Array.from(attributes);\n if (el._x_virtualDirectives) {\n let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({name, value}));\n let staticAttributes = attributesOnly(vAttributes);\n vAttributes = vAttributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n attributes = attributes.concat(vAttributes);\n }\n let transformedAttributeMap = {};\n let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority);\n return directives2.map((directive2) => {\n return getDirectiveHandler(el, directive2);\n });\n}\nfunction attributesOnly(attributes) {\n return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));\n}\nvar isDeferringHandlers = false;\nvar directiveHandlerStacks = new Map();\nvar currentHandlerStackKey = Symbol();\nfunction deferHandlingDirectives(callback) {\n isDeferringHandlers = true;\n let key = Symbol();\n currentHandlerStackKey = key;\n directiveHandlerStacks.set(key, []);\n let flushHandlers = () => {\n while (directiveHandlerStacks.get(key).length)\n directiveHandlerStacks.get(key).shift()();\n directiveHandlerStacks.delete(key);\n };\n let stopDeferring = () => {\n isDeferringHandlers = false;\n flushHandlers();\n };\n callback(flushHandlers);\n stopDeferring();\n}\nfunction getElementBoundUtilities(el) {\n let cleanups = [];\n let cleanup2 = (callback) => cleanups.push(callback);\n let [effect3, cleanupEffect] = elementBoundEffect(el);\n cleanups.push(cleanupEffect);\n let utilities = {\n Alpine: alpine_default,\n effect: effect3,\n cleanup: cleanup2,\n evaluateLater: evaluateLater.bind(evaluateLater, el),\n evaluate: evaluate.bind(evaluate, el)\n };\n let doCleanup = () => cleanups.forEach((i) => i());\n return [utilities, doCleanup];\n}\nfunction getDirectiveHandler(el, directive2) {\n let noop = () => {\n };\n let handler3 = directiveHandlers[directive2.type] || noop;\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n onAttributeRemoved(el, directive2.original, cleanup2);\n let fullHandler = () => {\n if (el._x_ignore || el._x_ignoreSelf)\n return;\n handler3.inline && handler3.inline(el, directive2, utilities);\n handler3 = handler3.bind(handler3, el, directive2, utilities);\n isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3();\n };\n fullHandler.runCleanups = cleanup2;\n return fullHandler;\n}\nvar startingWith = (subject, replacement) => ({name, value}) => {\n if (name.startsWith(subject))\n name = name.replace(subject, replacement);\n return {name, value};\n};\nvar into = (i) => i;\nfunction toTransformedAttributes(callback = () => {\n}) {\n return ({name, value}) => {\n let {name: newName, value: newValue} = attributeTransformers.reduce((carry, transform) => {\n return transform(carry);\n }, {name, value});\n if (newName !== name)\n callback(newName, name);\n return {name: newName, value: newValue};\n };\n}\nvar attributeTransformers = [];\nfunction mapAttributes(callback) {\n attributeTransformers.push(callback);\n}\nfunction outNonAlpineAttributes({name}) {\n return alpineAttributeRegex().test(name);\n}\nvar alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\\\b`);\nfunction toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n return ({name, value}) => {\n let typeMatch = name.match(alpineAttributeRegex());\n let valueMatch = name.match(/:([a-zA-Z0-9\\-:]+)/);\n let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n return {\n type: typeMatch ? typeMatch[1] : null,\n value: valueMatch ? valueMatch[1] : null,\n modifiers: modifiers.map((i) => i.replace(\".\", \"\")),\n expression: value,\n original\n };\n };\n}\nvar DEFAULT = \"DEFAULT\";\nvar directiveOrder = [\n \"ignore\",\n \"ref\",\n \"data\",\n \"id\",\n \"radio\",\n \"tabs\",\n \"switch\",\n \"disclosure\",\n \"menu\",\n \"listbox\",\n \"list\",\n \"item\",\n \"combobox\",\n \"bind\",\n \"init\",\n \"for\",\n \"mask\",\n \"model\",\n \"modelable\",\n \"transition\",\n \"show\",\n \"if\",\n DEFAULT,\n \"teleport\"\n];\nfunction byPriority(a, b) {\n let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type;\n let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type;\n return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);\n}\n\n// packages/alpinejs/src/utils/dispatch.js\nfunction dispatch(el, name, detail = {}) {\n el.dispatchEvent(new CustomEvent(name, {\n detail,\n bubbles: true,\n composed: true,\n cancelable: true\n }));\n}\n\n// packages/alpinejs/src/nextTick.js\nvar tickStack = [];\nvar isHolding = false;\nfunction nextTick(callback = () => {\n}) {\n queueMicrotask(() => {\n isHolding || setTimeout(() => {\n releaseNextTicks();\n });\n });\n return new Promise((res) => {\n tickStack.push(() => {\n callback();\n res();\n });\n });\n}\nfunction releaseNextTicks() {\n isHolding = false;\n while (tickStack.length)\n tickStack.shift()();\n}\nfunction holdNextTicks() {\n isHolding = true;\n}\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n Array.from(el.children).forEach((el2) => walk(el2, callback));\n return;\n }\n let skip = false;\n callback(el, () => skip = true);\n if (skip)\n return;\n let node = el.firstElementChild;\n while (node) {\n walk(node, callback, false);\n node = node.nextElementSibling;\n }\n}\n\n// packages/alpinejs/src/utils/warn.js\nfunction warn(message, ...args) {\n console.warn(`Alpine Warning: ${message}`, ...args);\n}\n\n// packages/alpinejs/src/lifecycle.js\nfunction start() {\n if (!document.body)\n warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n dispatch(document, \"alpine:init\");\n dispatch(document, \"alpine:initializing\");\n startObservingMutations();\n onElAdded((el) => initTree(el, walk));\n onElRemoved((el) => destroyTree(el));\n onAttributesAdded((el, attrs) => {\n directives(el, attrs).forEach((handle) => handle());\n });\n let outNestedComponents = (el) => !closestRoot(el.parentElement, true);\n Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {\n initTree(el);\n });\n dispatch(document, \"alpine:initialized\");\n}\nvar rootSelectorCallbacks = [];\nvar initSelectorCallbacks = [];\nfunction rootSelectors() {\n return rootSelectorCallbacks.map((fn) => fn());\n}\nfunction allSelectors() {\n return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn());\n}\nfunction addRootSelector(selectorCallback) {\n rootSelectorCallbacks.push(selectorCallback);\n}\nfunction addInitSelector(selectorCallback) {\n initSelectorCallbacks.push(selectorCallback);\n}\nfunction closestRoot(el, includeInitSelectors = false) {\n return findClosest(el, (element) => {\n const selectors = includeInitSelectors ? allSelectors() : rootSelectors();\n if (selectors.some((selector) => element.matches(selector)))\n return true;\n });\n}\nfunction findClosest(el, callback) {\n if (!el)\n return;\n if (callback(el))\n return el;\n if (el._x_teleportBack)\n el = el._x_teleportBack;\n if (!el.parentElement)\n return;\n return findClosest(el.parentElement, callback);\n}\nfunction isRoot(el) {\n return rootSelectors().some((selector) => el.matches(selector));\n}\nfunction initTree(el, walker = walk) {\n deferHandlingDirectives(() => {\n walker(el, (el2, skip) => {\n directives(el2, el2.attributes).forEach((handle) => handle());\n el2._x_ignore && skip();\n });\n });\n}\nfunction destroyTree(root) {\n walk(root, (el) => cleanupAttributes(el));\n}\n\n// packages/alpinejs/src/utils/classes.js\nfunction setClasses(el, value) {\n if (Array.isArray(value)) {\n return setClassesFromString(el, value.join(\" \"));\n } else if (typeof value === \"object\" && value !== null) {\n return setClassesFromObject(el, value);\n } else if (typeof value === \"function\") {\n return setClasses(el, value());\n }\n return setClassesFromString(el, value);\n}\nfunction setClassesFromString(el, classString) {\n let split = (classString2) => classString2.split(\" \").filter(Boolean);\n let missingClasses = (classString2) => classString2.split(\" \").filter((i) => !el.classList.contains(i)).filter(Boolean);\n let addClassesAndReturnUndo = (classes) => {\n el.classList.add(...classes);\n return () => {\n el.classList.remove(...classes);\n };\n };\n classString = classString === true ? classString = \"\" : classString || \"\";\n return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction setClassesFromObject(el, classObject) {\n let split = (classString) => classString.split(\" \").filter(Boolean);\n let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? split(classString) : false).filter(Boolean);\n let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? split(classString) : false).filter(Boolean);\n let added = [];\n let removed = [];\n forRemove.forEach((i) => {\n if (el.classList.contains(i)) {\n el.classList.remove(i);\n removed.push(i);\n }\n });\n forAdd.forEach((i) => {\n if (!el.classList.contains(i)) {\n el.classList.add(i);\n added.push(i);\n }\n });\n return () => {\n removed.forEach((i) => el.classList.add(i));\n added.forEach((i) => el.classList.remove(i));\n };\n}\n\n// packages/alpinejs/src/utils/styles.js\nfunction setStyles(el, value) {\n if (typeof value === \"object\" && value !== null) {\n return setStylesFromObject(el, value);\n }\n return setStylesFromString(el, value);\n}\nfunction setStylesFromObject(el, value) {\n let previousStyles = {};\n Object.entries(value).forEach(([key, value2]) => {\n previousStyles[key] = el.style[key];\n if (!key.startsWith(\"--\")) {\n key = kebabCase(key);\n }\n el.style.setProperty(key, value2);\n });\n setTimeout(() => {\n if (el.style.length === 0) {\n el.removeAttribute(\"style\");\n }\n });\n return () => {\n setStyles(el, previousStyles);\n };\n}\nfunction setStylesFromString(el, value) {\n let cache = el.getAttribute(\"style\", value);\n el.setAttribute(\"style\", value);\n return () => {\n el.setAttribute(\"style\", cache || \"\");\n };\n}\nfunction kebabCase(subject) {\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n// packages/alpinejs/src/utils/once.js\nfunction once(callback, fallback = () => {\n}) {\n let called = false;\n return function() {\n if (!called) {\n called = true;\n callback.apply(this, arguments);\n } else {\n fallback.apply(this, arguments);\n }\n };\n}\n\n// packages/alpinejs/src/directives/x-transition.js\ndirective(\"transition\", (el, {value, modifiers, expression}, {evaluate: evaluate2}) => {\n if (typeof expression === \"function\")\n expression = evaluate2(expression);\n if (!expression) {\n registerTransitionsFromHelper(el, modifiers, value);\n } else {\n registerTransitionsFromClassString(el, expression, value);\n }\n});\nfunction registerTransitionsFromClassString(el, classString, stage) {\n registerTransitionObject(el, setClasses, \"\");\n let directiveStorageMap = {\n enter: (classes) => {\n el._x_transition.enter.during = classes;\n },\n \"enter-start\": (classes) => {\n el._x_transition.enter.start = classes;\n },\n \"enter-end\": (classes) => {\n el._x_transition.enter.end = classes;\n },\n leave: (classes) => {\n el._x_transition.leave.during = classes;\n },\n \"leave-start\": (classes) => {\n el._x_transition.leave.start = classes;\n },\n \"leave-end\": (classes) => {\n el._x_transition.leave.end = classes;\n }\n };\n directiveStorageMap[stage](classString);\n}\nfunction registerTransitionsFromHelper(el, modifiers, stage) {\n registerTransitionObject(el, setStyles);\n let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\"enter\"].includes(stage);\n let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\"leave\"].includes(stage);\n if (modifiers.includes(\"in\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index < modifiers.indexOf(\"out\"));\n }\n if (modifiers.includes(\"out\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index > modifiers.indexOf(\"out\"));\n }\n let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n let wantsScale = wantsAll || modifiers.includes(\"scale\");\n let opacityValue = wantsOpacity ? 0 : 1;\n let scaleValue = wantsScale ? modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n let delay = modifierValue(modifiers, \"delay\", 0);\n let origin = modifierValue(modifiers, \"origin\", \"center\");\n let property = \"opacity, transform\";\n let durationIn = modifierValue(modifiers, \"duration\", 150) / 1e3;\n let durationOut = modifierValue(modifiers, \"duration\", 75) / 1e3;\n let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n if (transitioningIn) {\n el._x_transition.enter.during = {\n transformOrigin: origin,\n transitionDelay: delay,\n transitionProperty: property,\n transitionDuration: `${durationIn}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.enter.start = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n el._x_transition.enter.end = {\n opacity: 1,\n transform: `scale(1)`\n };\n }\n if (transitioningOut) {\n el._x_transition.leave.during = {\n transformOrigin: origin,\n transitionDelay: delay,\n transitionProperty: property,\n transitionDuration: `${durationOut}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.leave.start = {\n opacity: 1,\n transform: `scale(1)`\n };\n el._x_transition.leave.end = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n }\n}\nfunction registerTransitionObject(el, setFunction, defaultValue = {}) {\n if (!el._x_transition)\n el._x_transition = {\n enter: {during: defaultValue, start: defaultValue, end: defaultValue},\n leave: {during: defaultValue, start: defaultValue, end: defaultValue},\n in(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.enter.during,\n start: this.enter.start,\n end: this.enter.end\n }, before, after);\n },\n out(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.leave.during,\n start: this.leave.start,\n end: this.leave.end\n }, before, after);\n }\n };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n const nextTick2 = document.visibilityState === \"visible\" ? requestAnimationFrame : setTimeout;\n let clickAwayCompatibleShow = () => nextTick2(show);\n if (value) {\n if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) {\n el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n } else {\n el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n }\n return;\n }\n el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => {\n el._x_transition.out(() => {\n }, () => resolve(hide));\n el._x_transitioning.beforeCancel(() => reject({isFromCancelledTransition: true}));\n }) : Promise.resolve(hide);\n queueMicrotask(() => {\n let closest = closestHide(el);\n if (closest) {\n if (!closest._x_hideChildren)\n closest._x_hideChildren = [];\n closest._x_hideChildren.push(el);\n } else {\n nextTick2(() => {\n let hideAfterChildren = (el2) => {\n let carry = Promise.all([\n el2._x_hidePromise,\n ...(el2._x_hideChildren || []).map(hideAfterChildren)\n ]).then(([i]) => i());\n delete el2._x_hidePromise;\n delete el2._x_hideChildren;\n return carry;\n };\n hideAfterChildren(el).catch((e) => {\n if (!e.isFromCancelledTransition)\n throw e;\n });\n });\n }\n });\n};\nfunction closestHide(el) {\n let parent = el.parentNode;\n if (!parent)\n return;\n return parent._x_hidePromise ? parent : closestHide(parent);\n}\nfunction transition(el, setFunction, {during, start: start2, end} = {}, before = () => {\n}, after = () => {\n}) {\n if (el._x_transitioning)\n el._x_transitioning.cancel();\n if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n before();\n after();\n return;\n }\n let undoStart, undoDuring, undoEnd;\n performTransition(el, {\n start() {\n undoStart = setFunction(el, start2);\n },\n during() {\n undoDuring = setFunction(el, during);\n },\n before,\n end() {\n undoStart();\n undoEnd = setFunction(el, end);\n },\n after,\n cleanup() {\n undoDuring();\n undoEnd();\n }\n });\n}\nfunction performTransition(el, stages) {\n let interrupted, reachedBefore, reachedEnd;\n let finish = once(() => {\n mutateDom(() => {\n interrupted = true;\n if (!reachedBefore)\n stages.before();\n if (!reachedEnd) {\n stages.end();\n releaseNextTicks();\n }\n stages.after();\n if (el.isConnected)\n stages.cleanup();\n delete el._x_transitioning;\n });\n });\n el._x_transitioning = {\n beforeCancels: [],\n beforeCancel(callback) {\n this.beforeCancels.push(callback);\n },\n cancel: once(function() {\n while (this.beforeCancels.length) {\n this.beforeCancels.shift()();\n }\n ;\n finish();\n }),\n finish\n };\n mutateDom(() => {\n stages.start();\n stages.during();\n });\n holdNextTicks();\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n if (duration === 0)\n duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n mutateDom(() => {\n stages.before();\n });\n reachedBefore = true;\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n mutateDom(() => {\n stages.end();\n });\n releaseNextTicks();\n setTimeout(el._x_transitioning.finish, duration + delay);\n reachedEnd = true;\n });\n });\n}\nfunction modifierValue(modifiers, key, fallback) {\n if (modifiers.indexOf(key) === -1)\n return fallback;\n const rawValue = modifiers[modifiers.indexOf(key) + 1];\n if (!rawValue)\n return fallback;\n if (key === \"scale\") {\n if (isNaN(rawValue))\n return fallback;\n }\n if (key === \"duration\") {\n let match = rawValue.match(/([0-9]+)ms/);\n if (match)\n return match[1];\n }\n if (key === \"origin\") {\n if ([\"top\", \"right\", \"left\", \"center\", \"bottom\"].includes(modifiers[modifiers.indexOf(key) + 2])) {\n return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(\" \");\n }\n }\n return rawValue;\n}\n\n// packages/alpinejs/src/clone.js\nvar isCloning = false;\nfunction skipDuringClone(callback, fallback = () => {\n}) {\n return (...args) => isCloning ? fallback(...args) : callback(...args);\n}\nfunction clone(oldEl, newEl) {\n if (!newEl._x_dataStack)\n newEl._x_dataStack = oldEl._x_dataStack;\n isCloning = true;\n dontRegisterReactiveSideEffects(() => {\n cloneTree(newEl);\n });\n isCloning = false;\n}\nfunction cloneTree(el) {\n let hasRunThroughFirstEl = false;\n let shallowWalker = (el2, callback) => {\n walk(el2, (el3, skip) => {\n if (hasRunThroughFirstEl && isRoot(el3))\n return skip();\n hasRunThroughFirstEl = true;\n callback(el3, skip);\n });\n };\n initTree(el, shallowWalker);\n}\nfunction dontRegisterReactiveSideEffects(callback) {\n let cache = effect;\n overrideEffect((callback2, el) => {\n let storedEffect = cache(callback2);\n release(storedEffect);\n return () => {\n };\n });\n callback();\n overrideEffect(cache);\n}\n\n// packages/alpinejs/src/utils/bind.js\nfunction bind(el, name, value, modifiers = []) {\n if (!el._x_bindings)\n el._x_bindings = reactive({});\n el._x_bindings[name] = value;\n name = modifiers.includes(\"camel\") ? camelCase(name) : name;\n switch (name) {\n case \"value\":\n bindInputValue(el, value);\n break;\n case \"style\":\n bindStyles(el, value);\n break;\n case \"class\":\n bindClasses(el, value);\n break;\n default:\n bindAttribute(el, name, value);\n break;\n }\n}\nfunction bindInputValue(el, value) {\n if (el.type === \"radio\") {\n if (el.attributes.value === void 0) {\n el.value = value;\n }\n if (window.fromModel) {\n el.checked = checkedAttrLooseCompare(el.value, value);\n }\n } else if (el.type === \"checkbox\") {\n if (Number.isInteger(value)) {\n el.value = value;\n } else if (!Number.isInteger(value) && !Array.isArray(value) && typeof value !== \"boolean\" && ![null, void 0].includes(value)) {\n el.value = String(value);\n } else {\n if (Array.isArray(value)) {\n el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value));\n } else {\n el.checked = !!value;\n }\n }\n } else if (el.tagName === \"SELECT\") {\n updateSelect(el, value);\n } else {\n if (el.value === value)\n return;\n el.value = value;\n }\n}\nfunction bindClasses(el, value) {\n if (el._x_undoAddedClasses)\n el._x_undoAddedClasses();\n el._x_undoAddedClasses = setClasses(el, value);\n}\nfunction bindStyles(el, value) {\n if (el._x_undoAddedStyles)\n el._x_undoAddedStyles();\n el._x_undoAddedStyles = setStyles(el, value);\n}\nfunction bindAttribute(el, name, value) {\n if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) {\n el.removeAttribute(name);\n } else {\n if (isBooleanAttr(name))\n value = name;\n setIfChanged(el, name, value);\n }\n}\nfunction setIfChanged(el, attrName, value) {\n if (el.getAttribute(attrName) != value) {\n el.setAttribute(attrName, value);\n }\n}\nfunction updateSelect(el, value) {\n const arrayWrappedValue = [].concat(value).map((value2) => {\n return value2 + \"\";\n });\n Array.from(el.options).forEach((option) => {\n option.selected = arrayWrappedValue.includes(option.value);\n });\n}\nfunction camelCase(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction checkedAttrLooseCompare(valueA, valueB) {\n return valueA == valueB;\n}\nfunction isBooleanAttr(attrName) {\n const booleanAttributes = [\n \"disabled\",\n \"checked\",\n \"required\",\n \"readonly\",\n \"hidden\",\n \"open\",\n \"selected\",\n \"autofocus\",\n \"itemscope\",\n \"multiple\",\n \"novalidate\",\n \"allowfullscreen\",\n \"allowpaymentrequest\",\n \"formnovalidate\",\n \"autoplay\",\n \"controls\",\n \"loop\",\n \"muted\",\n \"playsinline\",\n \"default\",\n \"ismap\",\n \"reversed\",\n \"async\",\n \"defer\",\n \"nomodule\"\n ];\n return booleanAttributes.includes(attrName);\n}\nfunction attributeShouldntBePreservedIfFalsy(name) {\n return ![\"aria-pressed\", \"aria-checked\", \"aria-expanded\", \"aria-selected\"].includes(name);\n}\nfunction getBinding(el, name, fallback) {\n if (el._x_bindings && el._x_bindings[name] !== void 0)\n return el._x_bindings[name];\n let attr = el.getAttribute(name);\n if (attr === null)\n return typeof fallback === \"function\" ? fallback() : fallback;\n if (attr === \"\")\n return true;\n if (isBooleanAttr(name)) {\n return !![name, \"true\"].includes(attr);\n }\n return attr;\n}\n\n// packages/alpinejs/src/utils/debounce.js\nfunction debounce(func, wait) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n\n// packages/alpinejs/src/utils/throttle.js\nfunction throttle(func, limit) {\n let inThrottle;\n return function() {\n let context = this, args = arguments;\n if (!inThrottle) {\n func.apply(context, args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n };\n}\n\n// packages/alpinejs/src/plugin.js\nfunction plugin(callback) {\n callback(alpine_default);\n}\n\n// packages/alpinejs/src/store.js\nvar stores = {};\nvar isReactive = false;\nfunction store(name, value) {\n if (!isReactive) {\n stores = reactive(stores);\n isReactive = true;\n }\n if (value === void 0) {\n return stores[name];\n }\n stores[name] = value;\n if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") {\n stores[name].init();\n }\n initInterceptors(stores[name]);\n}\nfunction getStores() {\n return stores;\n}\n\n// packages/alpinejs/src/binds.js\nvar binds = {};\nfunction bind2(name, bindings) {\n let getBindings = typeof bindings !== \"function\" ? () => bindings : bindings;\n if (name instanceof Element) {\n applyBindingsObject(name, getBindings());\n } else {\n binds[name] = getBindings;\n }\n}\nfunction injectBindingProviders(obj) {\n Object.entries(binds).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback(...args);\n };\n }\n });\n });\n return obj;\n}\nfunction applyBindingsObject(el, obj, original) {\n let cleanupRunners = [];\n while (cleanupRunners.length)\n cleanupRunners.pop()();\n let attributes = Object.entries(obj).map(([name, value]) => ({name, value}));\n let staticAttributes = attributesOnly(attributes);\n attributes = attributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n directives(el, attributes, original).map((handle) => {\n cleanupRunners.push(handle.runCleanups);\n handle();\n });\n}\n\n// packages/alpinejs/src/datas.js\nvar datas = {};\nfunction data(name, callback) {\n datas[name] = callback;\n}\nfunction injectDataProviders(obj, context) {\n Object.entries(datas).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback.bind(context)(...args);\n };\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/alpine.js\nvar Alpine = {\n get reactive() {\n return reactive;\n },\n get release() {\n return release;\n },\n get effect() {\n return effect;\n },\n get raw() {\n return raw;\n },\n version: \"3.10.5\",\n flushAndStopDeferringMutations,\n dontAutoEvaluateFunctions,\n disableEffectScheduling,\n setReactivityEngine,\n closestDataStack,\n skipDuringClone,\n addRootSelector,\n addInitSelector,\n addScopeToNode,\n deferMutations,\n mapAttributes,\n evaluateLater,\n setEvaluator,\n mergeProxies,\n findClosest,\n closestRoot,\n interceptor,\n transition,\n setStyles,\n mutateDom,\n directive,\n throttle,\n debounce,\n evaluate,\n initTree,\n nextTick,\n prefixed: prefix,\n prefix: setPrefix,\n plugin,\n magic,\n store,\n start,\n clone,\n bound: getBinding,\n $data: scope,\n data,\n bind: bind2\n};\nvar alpine_default = Alpine;\n\n// node_modules/@vue/shared/dist/shared.esm-bundler.js\nfunction makeMap(str, expectsLowerCase) {\n const map = Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\nvar PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `HYDRATE_EVENTS`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\nvar slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\nvar specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nvar isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);\nvar EMPTY_OBJ = true ? Object.freeze({}) : {};\nvar EMPTY_ARR = true ? Object.freeze([]) : [];\nvar extend = Object.assign;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hasOwn = (val, key) => hasOwnProperty.call(val, key);\nvar isArray = Array.isArray;\nvar isMap = (val) => toTypeString(val) === \"[object Map]\";\nvar isString = (val) => typeof val === \"string\";\nvar isSymbol = (val) => typeof val === \"symbol\";\nvar isObject = (val) => val !== null && typeof val === \"object\";\nvar objectToString = Object.prototype.toString;\nvar toTypeString = (value) => objectToString.call(value);\nvar toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nvar isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nvar cacheStringFunction = (fn) => {\n const cache = Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nvar capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\nvar toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);\nvar hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue);\n\n// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\nvar targetMap = new WeakMap();\nvar effectStack = [];\nvar activeEffect;\nvar ITERATE_KEY = Symbol(true ? \"iterate\" : \"\");\nvar MAP_KEY_ITERATE_KEY = Symbol(true ? \"Map key iterate\" : \"\");\nfunction isEffect(fn) {\n return fn && fn._isEffect === true;\n}\nfunction effect2(fn, options = EMPTY_OBJ) {\n if (isEffect(fn)) {\n fn = fn.raw;\n }\n const effect3 = createReactiveEffect(fn, options);\n if (!options.lazy) {\n effect3();\n }\n return effect3;\n}\nfunction stop(effect3) {\n if (effect3.active) {\n cleanup(effect3);\n if (effect3.options.onStop) {\n effect3.options.onStop();\n }\n effect3.active = false;\n }\n}\nvar uid = 0;\nfunction createReactiveEffect(fn, options) {\n const effect3 = function reactiveEffect() {\n if (!effect3.active) {\n return fn();\n }\n if (!effectStack.includes(effect3)) {\n cleanup(effect3);\n try {\n enableTracking();\n effectStack.push(effect3);\n activeEffect = effect3;\n return fn();\n } finally {\n effectStack.pop();\n resetTracking();\n activeEffect = effectStack[effectStack.length - 1];\n }\n }\n };\n effect3.id = uid++;\n effect3.allowRecurse = !!options.allowRecurse;\n effect3._isEffect = true;\n effect3.active = true;\n effect3.raw = fn;\n effect3.deps = [];\n effect3.options = options;\n return effect3;\n}\nfunction cleanup(effect3) {\n const {deps} = effect3;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect3);\n }\n deps.length = 0;\n }\n}\nvar shouldTrack = true;\nvar trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (!shouldTrack || activeEffect === void 0) {\n return;\n }\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = new Set());\n }\n if (!dep.has(activeEffect)) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (activeEffect.options.onTrack) {\n activeEffect.options.onTrack({\n effect: activeEffect,\n target,\n type,\n key\n });\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n const effects = new Set();\n const add2 = (effectsToAdd) => {\n if (effectsToAdd) {\n effectsToAdd.forEach((effect3) => {\n if (effect3 !== activeEffect || effect3.allowRecurse) {\n effects.add(effect3);\n }\n });\n }\n };\n if (type === \"clear\") {\n depsMap.forEach(add2);\n } else if (key === \"length\" && isArray(target)) {\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 >= newValue) {\n add2(dep);\n }\n });\n } else {\n if (key !== void 0) {\n add2(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n add2(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n add2(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const run = (effect3) => {\n if (effect3.options.onTrigger) {\n effect3.options.onTrigger({\n effect: effect3,\n target,\n key,\n type,\n newValue,\n oldValue,\n oldTarget\n });\n }\n if (effect3.options.scheduler) {\n effect3.options.scheduler(effect3);\n } else {\n effect3();\n }\n };\n effects.forEach(run);\n}\nvar isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nvar builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));\nvar get2 = /* @__PURE__ */ createGetter();\nvar shallowGet = /* @__PURE__ */ createGetter(false, true);\nvar readonlyGet = /* @__PURE__ */ createGetter(true);\nvar shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);\nvar arrayInstrumentations = {};\n[\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n const method = Array.prototype[key];\n arrayInstrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = method.apply(arr, args);\n if (res === -1 || res === false) {\n return method.apply(arr, args.map(toRaw));\n } else {\n return res;\n }\n };\n});\n[\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n const method = Array.prototype[key];\n arrayInstrumentations[key] = function(...args) {\n pauseTracking();\n const res = method.apply(this, args);\n resetTracking();\n return res;\n };\n});\nfunction createGetter(isReadonly = false, shallow = false) {\n return function get3(target, key, receiver) {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\" && receiver === (isReadonly ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n const shouldUnwrap = !targetIsArray || !isIntegerKey(key);\n return shouldUnwrap ? res.value : res;\n }\n if (isObject(res)) {\n return isReadonly ? readonly(res) : reactive2(res);\n }\n return res;\n };\n}\nvar set2 = /* @__PURE__ */ createSetter();\nvar shallowSet = /* @__PURE__ */ createSetter(true);\nfunction createSetter(shallow = false) {\n return function set3(target, key, value, receiver) {\n let oldValue = target[key];\n if (!shallow) {\n value = toRaw(value);\n oldValue = toRaw(oldValue);\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n };\n}\nfunction deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n}\nfunction ownKeys(target) {\n track(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n return Reflect.ownKeys(target);\n}\nvar mutableHandlers = {\n get: get2,\n set: set2,\n deleteProperty,\n has,\n ownKeys\n};\nvar readonlyHandlers = {\n get: readonlyGet,\n set(target, key) {\n if (true) {\n console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n },\n deleteProperty(target, key) {\n if (true) {\n console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n }\n};\nvar shallowReactiveHandlers = extend({}, mutableHandlers, {\n get: shallowGet,\n set: shallowSet\n});\nvar shallowReadonlyHandlers = extend({}, readonlyHandlers, {\n get: shallowReadonlyGet\n});\nvar toReactive = (value) => isObject(value) ? reactive2(value) : value;\nvar toReadonly = (value) => isObject(value) ? readonly(value) : value;\nvar toShallow = (value) => value;\nvar getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"get\", key);\n }\n !isReadonly && track(rawTarget, \"get\", rawKey);\n const {has: has2} = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has$1(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"has\", key);\n }\n !isReadonly && track(rawTarget, \"has\", rawKey);\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set$1(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const {has: has2, get: get3} = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const {has: has2, get: get3} = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3 ? get3.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n return {\n next() {\n const {value, done} = innerIterator.next();\n return done ? {value, done} : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (true) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\n }\n return type === \"delete\" ? false : this;\n };\n}\nvar mutableInstrumentations = {\n get(key) {\n return get$1(this, key);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n};\nvar shallowInstrumentations = {\n get(key) {\n return get$1(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n};\nvar readonlyInstrumentations = {\n get(key) {\n return get$1(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n};\nvar shallowReadonlyInstrumentations = {\n get(key) {\n return get$1(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n};\nvar iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\niteratorMethods.forEach((method) => {\n mutableInstrumentations[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations[method] = createIterableMethod(method, true, false);\n shallowInstrumentations[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\n});\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n };\n}\nvar mutableCollectionHandlers = {\n get: createInstrumentationGetter(false, false)\n};\nvar shallowCollectionHandlers = {\n get: createInstrumentationGetter(false, true)\n};\nvar readonlyCollectionHandlers = {\n get: createInstrumentationGetter(true, false)\n};\nvar shallowReadonlyCollectionHandlers = {\n get: createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);\n }\n}\nvar reactiveMap = new WeakMap();\nvar shallowReactiveMap = new WeakMap();\nvar readonlyMap = new WeakMap();\nvar shallowReadonlyMap = new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));\n}\nfunction reactive2(target) {\n if (target && target[\"__v_isReadonly\"]) {\n return target;\n }\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n}\nfunction readonly(target) {\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n}\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (true) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0) {\n return target;\n }\n const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction toRaw(observed) {\n return observed && toRaw(observed[\"__v_raw\"]) || observed;\n}\nfunction isRef(r) {\n return Boolean(r && r.__v_isRef === true);\n}\n\n// packages/alpinejs/src/magics/$nextTick.js\nmagic(\"nextTick\", () => nextTick);\n\n// packages/alpinejs/src/magics/$dispatch.js\nmagic(\"dispatch\", (el) => dispatch.bind(dispatch, el));\n\n// packages/alpinejs/src/magics/$watch.js\nmagic(\"watch\", (el, {evaluateLater: evaluateLater2, effect: effect3}) => (key, callback) => {\n let evaluate2 = evaluateLater2(key);\n let firstTime = true;\n let oldValue;\n let effectReference = effect3(() => evaluate2((value) => {\n JSON.stringify(value);\n if (!firstTime) {\n queueMicrotask(() => {\n callback(value, oldValue);\n oldValue = value;\n });\n } else {\n oldValue = value;\n }\n firstTime = false;\n }));\n el._x_effects.delete(effectReference);\n});\n\n// packages/alpinejs/src/magics/$store.js\nmagic(\"store\", getStores);\n\n// packages/alpinejs/src/magics/$data.js\nmagic(\"data\", (el) => scope(el));\n\n// packages/alpinejs/src/magics/$root.js\nmagic(\"root\", (el) => closestRoot(el));\n\n// packages/alpinejs/src/magics/$refs.js\nmagic(\"refs\", (el) => {\n if (el._x_refs_proxy)\n return el._x_refs_proxy;\n el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));\n return el._x_refs_proxy;\n});\nfunction getArrayOfRefObject(el) {\n let refObjects = [];\n let currentEl = el;\n while (currentEl) {\n if (currentEl._x_refs)\n refObjects.push(currentEl._x_refs);\n currentEl = currentEl.parentNode;\n }\n return refObjects;\n}\n\n// packages/alpinejs/src/ids.js\nvar globalIdMemo = {};\nfunction findAndIncrementId(name) {\n if (!globalIdMemo[name])\n globalIdMemo[name] = 0;\n return ++globalIdMemo[name];\n}\nfunction closestIdRoot(el, name) {\n return findClosest(el, (element) => {\n if (element._x_ids && element._x_ids[name])\n return true;\n });\n}\nfunction setIdRoot(el, name) {\n if (!el._x_ids)\n el._x_ids = {};\n if (!el._x_ids[name])\n el._x_ids[name] = findAndIncrementId(name);\n}\n\n// packages/alpinejs/src/magics/$id.js\nmagic(\"id\", (el) => (name, key = null) => {\n let root = closestIdRoot(el, name);\n let id = root ? root._x_ids[name] : findAndIncrementId(name);\n return key ? `${name}-${id}-${key}` : `${name}-${id}`;\n});\n\n// packages/alpinejs/src/magics/$el.js\nmagic(\"el\", (el) => el);\n\n// packages/alpinejs/src/magics/index.js\nwarnMissingPluginMagic(\"Focus\", \"focus\", \"focus\");\nwarnMissingPluginMagic(\"Persist\", \"persist\", \"persist\");\nfunction warnMissingPluginMagic(name, magicName, slug) {\n magic(magicName, (el) => warn(`You can't use [$${directiveName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/directives/x-modelable.js\ndirective(\"modelable\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let func = evaluateLater2(expression);\n let innerGet = () => {\n let result;\n func((i) => result = i);\n return result;\n };\n let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);\n let innerSet = (val) => evaluateInnerSet(() => {\n }, {scope: {__placeholder: val}});\n let initialValue = innerGet();\n innerSet(initialValue);\n queueMicrotask(() => {\n if (!el._x_model)\n return;\n el._x_removeModelListeners[\"default\"]();\n let outerGet = el._x_model.get;\n let outerSet = el._x_model.set;\n effect3(() => innerSet(outerGet()));\n effect3(() => outerSet(innerGet()));\n });\n});\n\n// packages/alpinejs/src/directives/x-teleport.js\ndirective(\"teleport\", (el, {expression}, {cleanup: cleanup2}) => {\n if (el.tagName.toLowerCase() !== \"template\")\n warn(\"x-teleport can only be used on a <template> tag\", el);\n let target = document.querySelector(expression);\n if (!target)\n warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n let clone2 = el.content.cloneNode(true).firstElementChild;\n el._x_teleport = clone2;\n clone2._x_teleportBack = el;\n if (el._x_forwardEvents) {\n el._x_forwardEvents.forEach((eventName) => {\n clone2.addEventListener(eventName, (e) => {\n e.stopPropagation();\n el.dispatchEvent(new e.constructor(e.type, e));\n });\n });\n }\n addScopeToNode(clone2, {}, el);\n mutateDom(() => {\n target.appendChild(clone2);\n initTree(clone2);\n clone2._x_ignore = true;\n });\n cleanup2(() => clone2.remove());\n});\n\n// packages/alpinejs/src/directives/x-ignore.js\nvar handler = () => {\n};\nhandler.inline = (el, {modifiers}, {cleanup: cleanup2}) => {\n modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n cleanup2(() => {\n modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n });\n};\ndirective(\"ignore\", handler);\n\n// packages/alpinejs/src/directives/x-effect.js\ndirective(\"effect\", (el, {expression}, {effect: effect3}) => effect3(evaluateLater(el, expression)));\n\n// packages/alpinejs/src/utils/on.js\nfunction on(el, event, modifiers, callback) {\n let listenerTarget = el;\n let handler3 = (e) => callback(e);\n let options = {};\n let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e);\n if (modifiers.includes(\"dot\"))\n event = dotSyntax(event);\n if (modifiers.includes(\"camel\"))\n event = camelCase2(event);\n if (modifiers.includes(\"passive\"))\n options.passive = true;\n if (modifiers.includes(\"capture\"))\n options.capture = true;\n if (modifiers.includes(\"window\"))\n listenerTarget = window;\n if (modifiers.includes(\"document\"))\n listenerTarget = document;\n if (modifiers.includes(\"prevent\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.preventDefault();\n next(e);\n });\n if (modifiers.includes(\"stop\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.stopPropagation();\n next(e);\n });\n if (modifiers.includes(\"self\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.target === el && next(e);\n });\n if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n listenerTarget = document;\n handler3 = wrapHandler(handler3, (next, e) => {\n if (el.contains(e.target))\n return;\n if (e.target.isConnected === false)\n return;\n if (el.offsetWidth < 1 && el.offsetHeight < 1)\n return;\n if (el._x_isShown === false)\n return;\n next(e);\n });\n }\n if (modifiers.includes(\"once\")) {\n handler3 = wrapHandler(handler3, (next, e) => {\n next(e);\n listenerTarget.removeEventListener(event, handler3, options);\n });\n }\n handler3 = wrapHandler(handler3, (next, e) => {\n if (isKeyEvent(event)) {\n if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n return;\n }\n }\n next(e);\n });\n if (modifiers.includes(\"debounce\")) {\n let nextModifier = modifiers[modifiers.indexOf(\"debounce\") + 1] || \"invalid-wait\";\n let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n handler3 = debounce(handler3, wait);\n }\n if (modifiers.includes(\"throttle\")) {\n let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n handler3 = throttle(handler3, wait);\n }\n listenerTarget.addEventListener(event, handler3, options);\n return () => {\n listenerTarget.removeEventListener(event, handler3, options);\n };\n}\nfunction dotSyntax(subject) {\n return subject.replace(/-/g, \".\");\n}\nfunction camelCase2(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction isNumeric(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction kebabCase2(subject) {\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction isKeyEvent(event) {\n return [\"keydown\", \"keyup\"].includes(event);\n}\nfunction isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n let keyModifiers = modifiers.filter((i) => {\n return ![\"window\", \"document\", \"prevent\", \"stop\", \"once\"].includes(i);\n });\n if (keyModifiers.includes(\"debounce\")) {\n let debounceIndex = keyModifiers.indexOf(\"debounce\");\n keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n }\n if (keyModifiers.length === 0)\n return false;\n if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\n const systemKeyModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\", \"cmd\", \"super\"];\n const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier) => keyModifiers.includes(modifier));\n keyModifiers = keyModifiers.filter((i) => !selectedSystemKeyModifiers.includes(i));\n if (selectedSystemKeyModifiers.length > 0) {\n const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => {\n if (modifier === \"cmd\" || modifier === \"super\")\n modifier = \"meta\";\n return e[`${modifier}Key`];\n });\n if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n if (keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\n }\n }\n return true;\n}\nfunction keyToModifiers(key) {\n if (!key)\n return [];\n key = kebabCase2(key);\n let modifierToKeyMap = {\n ctrl: \"control\",\n slash: \"/\",\n space: \"-\",\n spacebar: \"-\",\n cmd: \"meta\",\n esc: \"escape\",\n up: \"arrow-up\",\n down: \"arrow-down\",\n left: \"arrow-left\",\n right: \"arrow-right\",\n period: \".\",\n equal: \"=\"\n };\n modifierToKeyMap[key] = key;\n return Object.keys(modifierToKeyMap).map((modifier) => {\n if (modifierToKeyMap[modifier] === key)\n return modifier;\n }).filter((modifier) => modifier);\n}\n\n// packages/alpinejs/src/directives/x-model.js\ndirective(\"model\", (el, {modifiers, expression}, {effect: effect3, cleanup: cleanup2}) => {\n let evaluate2 = evaluateLater(el, expression);\n let assignmentExpression = `${expression} = rightSideOfExpression($event, ${expression})`;\n let evaluateAssignment = evaluateLater(el, assignmentExpression);\n var event = el.tagName.toLowerCase() === \"select\" || [\"checkbox\", \"radio\"].includes(el.type) || modifiers.includes(\"lazy\") ? \"change\" : \"input\";\n let assigmentFunction = generateAssignmentFunction(el, modifiers, expression);\n let removeListener = on(el, event, modifiers, (e) => {\n evaluateAssignment(() => {\n }, {scope: {\n $event: e,\n rightSideOfExpression: assigmentFunction\n }});\n });\n if (!el._x_removeModelListeners)\n el._x_removeModelListeners = {};\n el._x_removeModelListeners[\"default\"] = removeListener;\n cleanup2(() => el._x_removeModelListeners[\"default\"]());\n let evaluateSetModel = evaluateLater(el, `${expression} = __placeholder`);\n el._x_model = {\n get() {\n let result;\n evaluate2((value) => result = value);\n return result;\n },\n set(value) {\n evaluateSetModel(() => {\n }, {scope: {__placeholder: value}});\n }\n };\n el._x_forceModelUpdate = () => {\n evaluate2((value) => {\n if (value === void 0 && expression.match(/\\./))\n value = \"\";\n window.fromModel = true;\n mutateDom(() => bind(el, \"value\", value));\n delete window.fromModel;\n });\n };\n effect3(() => {\n if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el))\n return;\n el._x_forceModelUpdate();\n });\n});\nfunction generateAssignmentFunction(el, modifiers, expression) {\n if (el.type === \"radio\") {\n mutateDom(() => {\n if (!el.hasAttribute(\"name\"))\n el.setAttribute(\"name\", expression);\n });\n }\n return (event, currentValue) => {\n return mutateDom(() => {\n if (event instanceof CustomEvent && event.detail !== void 0) {\n return event.detail || event.target.value;\n } else if (el.type === \"checkbox\") {\n if (Array.isArray(currentValue)) {\n let newValue = modifiers.includes(\"number\") ? safeParseNumber(event.target.value) : event.target.value;\n return event.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue));\n } else {\n return event.target.checked;\n }\n } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n return modifiers.includes(\"number\") ? Array.from(event.target.selectedOptions).map((option) => {\n let rawValue = option.value || option.text;\n return safeParseNumber(rawValue);\n }) : Array.from(event.target.selectedOptions).map((option) => {\n return option.value || option.text;\n });\n } else {\n let rawValue = event.target.value;\n return modifiers.includes(\"number\") ? safeParseNumber(rawValue) : modifiers.includes(\"trim\") ? rawValue.trim() : rawValue;\n }\n });\n };\n}\nfunction safeParseNumber(rawValue) {\n let number = rawValue ? parseFloat(rawValue) : null;\n return isNumeric2(number) ? number : rawValue;\n}\nfunction checkedAttrLooseCompare2(valueA, valueB) {\n return valueA == valueB;\n}\nfunction isNumeric2(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-cloak.js\ndirective(\"cloak\", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix(\"cloak\")))));\n\n// packages/alpinejs/src/directives/x-init.js\naddInitSelector(() => `[${prefix(\"init\")}]`);\ndirective(\"init\", skipDuringClone((el, {expression}, {evaluate: evaluate2}) => {\n if (typeof expression === \"string\") {\n return !!expression.trim() && evaluate2(expression, {}, false);\n }\n return evaluate2(expression, {}, false);\n}));\n\n// packages/alpinejs/src/directives/x-text.js\ndirective(\"text\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.textContent = value;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-html.js\ndirective(\"html\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.innerHTML = value;\n el._x_ignoreSelf = true;\n initTree(el);\n delete el._x_ignoreSelf;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-bind.js\nmapAttributes(startingWith(\":\", into(prefix(\"bind:\"))));\ndirective(\"bind\", (el, {value, modifiers, expression, original}, {effect: effect3}) => {\n if (!value) {\n let bindingProviders = {};\n injectBindingProviders(bindingProviders);\n let getBindings = evaluateLater(el, expression);\n getBindings((bindings) => {\n applyBindingsObject(el, bindings, original);\n }, {scope: bindingProviders});\n return;\n }\n if (value === \"key\")\n return storeKeyForXFor(el, expression);\n let evaluate2 = evaluateLater(el, expression);\n effect3(() => evaluate2((result) => {\n if (result === void 0 && typeof expression === \"string\" && expression.match(/\\./)) {\n result = \"\";\n }\n mutateDom(() => bind(el, value, result, modifiers));\n }));\n});\nfunction storeKeyForXFor(el, expression) {\n el._x_keyExpression = expression;\n}\n\n// packages/alpinejs/src/directives/x-data.js\naddRootSelector(() => `[${prefix(\"data\")}]`);\ndirective(\"data\", skipDuringClone((el, {expression}, {cleanup: cleanup2}) => {\n expression = expression === \"\" ? \"{}\" : expression;\n let magicContext = {};\n injectMagics(magicContext, el);\n let dataProviderContext = {};\n injectDataProviders(dataProviderContext, magicContext);\n let data2 = evaluate(el, expression, {scope: dataProviderContext});\n if (data2 === void 0)\n data2 = {};\n injectMagics(data2, el);\n let reactiveData = reactive(data2);\n initInterceptors(reactiveData);\n let undo = addScopeToNode(el, reactiveData);\n reactiveData[\"init\"] && evaluate(el, reactiveData[\"init\"]);\n cleanup2(() => {\n reactiveData[\"destroy\"] && evaluate(el, reactiveData[\"destroy\"]);\n undo();\n });\n}));\n\n// packages/alpinejs/src/directives/x-show.js\ndirective(\"show\", (el, {modifiers, expression}, {effect: effect3}) => {\n let evaluate2 = evaluateLater(el, expression);\n if (!el._x_doHide)\n el._x_doHide = () => {\n mutateDom(() => {\n el.style.setProperty(\"display\", \"none\", modifiers.includes(\"important\") ? \"important\" : void 0);\n });\n };\n if (!el._x_doShow)\n el._x_doShow = () => {\n mutateDom(() => {\n if (el.style.length === 1 && el.style.display === \"none\") {\n el.removeAttribute(\"style\");\n } else {\n el.style.removeProperty(\"display\");\n }\n });\n };\n let hide = () => {\n el._x_doHide();\n el._x_isShown = false;\n };\n let show = () => {\n el._x_doShow();\n el._x_isShown = true;\n };\n let clickAwayCompatibleShow = () => setTimeout(show);\n let toggle = once((value) => value ? show() : hide(), (value) => {\n if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") {\n el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n } else {\n value ? clickAwayCompatibleShow() : hide();\n }\n });\n let oldValue;\n let firstTime = true;\n effect3(() => evaluate2((value) => {\n if (!firstTime && value === oldValue)\n return;\n if (modifiers.includes(\"immediate\"))\n value ? clickAwayCompatibleShow() : hide();\n toggle(value);\n oldValue = value;\n firstTime = false;\n }));\n});\n\n// packages/alpinejs/src/directives/x-for.js\ndirective(\"for\", (el, {expression}, {effect: effect3, cleanup: cleanup2}) => {\n let iteratorNames = parseForExpression(expression);\n let evaluateItems = evaluateLater(el, iteratorNames.items);\n let evaluateKey = evaluateLater(el, el._x_keyExpression || \"index\");\n el._x_prevKeys = [];\n el._x_lookup = {};\n effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey));\n cleanup2(() => {\n Object.values(el._x_lookup).forEach((el2) => el2.remove());\n delete el._x_prevKeys;\n delete el._x_lookup;\n });\n});\nfunction loop(el, iteratorNames, evaluateItems, evaluateKey) {\n let isObject2 = (i) => typeof i === \"object\" && !Array.isArray(i);\n let templateEl = el;\n evaluateItems((items) => {\n if (isNumeric3(items) && items >= 0) {\n items = Array.from(Array(items).keys(), (i) => i + 1);\n }\n if (items === void 0)\n items = [];\n let lookup = el._x_lookup;\n let prevKeys = el._x_prevKeys;\n let scopes = [];\n let keys = [];\n if (isObject2(items)) {\n items = Object.entries(items).map(([key, value]) => {\n let scope2 = getIterationScopeVariables(iteratorNames, value, key, items);\n evaluateKey((value2) => keys.push(value2), {scope: {index: key, ...scope2}});\n scopes.push(scope2);\n });\n } else {\n for (let i = 0; i < items.length; i++) {\n let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items);\n evaluateKey((value) => keys.push(value), {scope: {index: i, ...scope2}});\n scopes.push(scope2);\n }\n }\n let adds = [];\n let moves = [];\n let removes = [];\n let sames = [];\n for (let i = 0; i < prevKeys.length; i++) {\n let key = prevKeys[i];\n if (keys.indexOf(key) === -1)\n removes.push(key);\n }\n prevKeys = prevKeys.filter((key) => !removes.includes(key));\n let lastKey = \"template\";\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n let prevIndex = prevKeys.indexOf(key);\n if (prevIndex === -1) {\n prevKeys.splice(i, 0, key);\n adds.push([lastKey, i]);\n } else if (prevIndex !== i) {\n let keyInSpot = prevKeys.splice(i, 1)[0];\n let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];\n prevKeys.splice(i, 0, keyForSpot);\n prevKeys.splice(prevIndex, 0, keyInSpot);\n moves.push([keyInSpot, keyForSpot]);\n } else {\n sames.push(key);\n }\n lastKey = key;\n }\n for (let i = 0; i < removes.length; i++) {\n let key = removes[i];\n if (!!lookup[key]._x_effects) {\n lookup[key]._x_effects.forEach(dequeueJob);\n }\n lookup[key].remove();\n lookup[key] = null;\n delete lookup[key];\n }\n for (let i = 0; i < moves.length; i++) {\n let [keyInSpot, keyForSpot] = moves[i];\n let elInSpot = lookup[keyInSpot];\n let elForSpot = lookup[keyForSpot];\n let marker = document.createElement(\"div\");\n mutateDom(() => {\n elForSpot.after(marker);\n elInSpot.after(elForSpot);\n elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);\n marker.before(elInSpot);\n elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);\n marker.remove();\n });\n refreshScope(elForSpot, scopes[keys.indexOf(keyForSpot)]);\n }\n for (let i = 0; i < adds.length; i++) {\n let [lastKey2, index] = adds[i];\n let lastEl = lastKey2 === \"template\" ? templateEl : lookup[lastKey2];\n if (lastEl._x_currentIfEl)\n lastEl = lastEl._x_currentIfEl;\n let scope2 = scopes[index];\n let key = keys[index];\n let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n addScopeToNode(clone2, reactive(scope2), templateEl);\n mutateDom(() => {\n lastEl.after(clone2);\n initTree(clone2);\n });\n if (typeof key === \"object\") {\n warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n }\n lookup[key] = clone2;\n }\n for (let i = 0; i < sames.length; i++) {\n refreshScope(lookup[sames[i]], scopes[keys.indexOf(sames[i])]);\n }\n templateEl._x_prevKeys = keys;\n });\n}\nfunction parseForExpression(expression) {\n let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n let forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n let inMatch = expression.match(forAliasRE);\n if (!inMatch)\n return;\n let res = {};\n res.items = inMatch[2].trim();\n let item = inMatch[1].replace(stripParensRE, \"\").trim();\n let iteratorMatch = item.match(forIteratorRE);\n if (iteratorMatch) {\n res.item = item.replace(forIteratorRE, \"\").trim();\n res.index = iteratorMatch[1].trim();\n if (iteratorMatch[2]) {\n res.collection = iteratorMatch[2].trim();\n }\n } else {\n res.item = item;\n }\n return res;\n}\nfunction getIterationScopeVariables(iteratorNames, item, index, items) {\n let scopeVariables = {};\n if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name, i) => {\n scopeVariables[name] = item[i];\n });\n } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name) => {\n scopeVariables[name] = item[name];\n });\n } else {\n scopeVariables[iteratorNames.item] = item;\n }\n if (iteratorNames.index)\n scopeVariables[iteratorNames.index] = index;\n if (iteratorNames.collection)\n scopeVariables[iteratorNames.collection] = items;\n return scopeVariables;\n}\nfunction isNumeric3(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-ref.js\nfunction handler2() {\n}\nhandler2.inline = (el, {expression}, {cleanup: cleanup2}) => {\n let root = closestRoot(el);\n if (!root._x_refs)\n root._x_refs = {};\n root._x_refs[expression] = el;\n cleanup2(() => delete root._x_refs[expression]);\n};\ndirective(\"ref\", handler2);\n\n// packages/alpinejs/src/directives/x-if.js\ndirective(\"if\", (el, {expression}, {effect: effect3, cleanup: cleanup2}) => {\n let evaluate2 = evaluateLater(el, expression);\n let show = () => {\n if (el._x_currentIfEl)\n return el._x_currentIfEl;\n let clone2 = el.content.cloneNode(true).firstElementChild;\n addScopeToNode(clone2, {}, el);\n mutateDom(() => {\n el.after(clone2);\n initTree(clone2);\n });\n el._x_currentIfEl = clone2;\n el._x_undoIf = () => {\n walk(clone2, (node) => {\n if (!!node._x_effects) {\n node._x_effects.forEach(dequeueJob);\n }\n });\n clone2.remove();\n delete el._x_currentIfEl;\n };\n return clone2;\n };\n let hide = () => {\n if (!el._x_undoIf)\n return;\n el._x_undoIf();\n delete el._x_undoIf;\n };\n effect3(() => evaluate2((value) => {\n value ? show() : hide();\n }));\n cleanup2(() => el._x_undoIf && el._x_undoIf());\n});\n\n// packages/alpinejs/src/directives/x-id.js\ndirective(\"id\", (el, {expression}, {evaluate: evaluate2}) => {\n let names = evaluate2(expression);\n names.forEach((name) => setIdRoot(el, name));\n});\n\n// packages/alpinejs/src/directives/x-on.js\nmapAttributes(startingWith(\"@\", into(prefix(\"on:\"))));\ndirective(\"on\", skipDuringClone((el, {value, modifiers, expression}, {cleanup: cleanup2}) => {\n let evaluate2 = expression ? evaluateLater(el, expression) : () => {\n };\n if (el.tagName.toLowerCase() === \"template\") {\n if (!el._x_forwardEvents)\n el._x_forwardEvents = [];\n if (!el._x_forwardEvents.includes(value))\n el._x_forwardEvents.push(value);\n }\n let removeListener = on(el, value, modifiers, (e) => {\n evaluate2(() => {\n }, {scope: {$event: e}, params: [e]});\n });\n cleanup2(() => removeListener());\n}));\n\n// packages/alpinejs/src/directives/index.js\nwarnMissingPluginDirective(\"Collapse\", \"collapse\", \"collapse\");\nwarnMissingPluginDirective(\"Intersect\", \"intersect\", \"intersect\");\nwarnMissingPluginDirective(\"Focus\", \"trap\", \"focus\");\nwarnMissingPluginDirective(\"Mask\", \"mask\", \"mask\");\nfunction warnMissingPluginDirective(name, directiveName2, slug) {\n directive(directiveName2, (el) => warn(`You can't use [x-${directiveName2}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/index.js\nalpine_default.setEvaluator(normalEvaluator);\nalpine_default.setReactivityEngine({reactive: reactive2, effect: effect2, release: stop, raw: toRaw});\nvar src_default = alpine_default;\n\n// packages/alpinejs/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default\n};\n", "// packages/morph/src/dom.js\nvar DomManager = class {\n el = void 0;\n constructor(el) {\n this.el = el;\n }\n traversals = {\n first: \"firstElementChild\",\n next: \"nextElementSibling\",\n parent: \"parentElement\"\n };\n nodes() {\n this.traversals = {\n first: \"firstChild\",\n next: \"nextSibling\",\n parent: \"parentNode\"\n };\n return this;\n }\n first() {\n return this.teleportTo(this.el[this.traversals[\"first\"]]);\n }\n next() {\n return this.teleportTo(this.teleportBack(this.el[this.traversals[\"next\"]]));\n }\n before(insertee) {\n this.el[this.traversals[\"parent\"]].insertBefore(insertee, this.el);\n return insertee;\n }\n replace(replacement) {\n this.el[this.traversals[\"parent\"]].replaceChild(replacement, this.el);\n return replacement;\n }\n append(appendee) {\n this.el.appendChild(appendee);\n return appendee;\n }\n teleportTo(el) {\n if (!el)\n return el;\n if (el._x_teleport)\n return el._x_teleport;\n return el;\n }\n teleportBack(el) {\n if (!el)\n return el;\n if (el._x_teleportBack)\n return el._x_teleportBack;\n return el;\n }\n};\nfunction dom(el) {\n return new DomManager(el);\n}\nfunction createElement(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.firstElementChild;\n}\nfunction textOrComment(el) {\n return el.nodeType === 3 || el.nodeType === 8;\n}\n\n// packages/morph/src/morph.js\nvar resolveStep = () => {\n};\nvar logger = () => {\n};\nasync function morph(from, toHtml, options) {\n let fromEl;\n let toEl;\n let key, lookahead, updating, updated, removing, removed, adding, added, debug;\n function breakpoint(message) {\n if (!debug)\n return;\n logger((message || \"\").replace(\"\\n\", \"\\\\n\"), fromEl, toEl);\n return new Promise((resolve) => resolveStep = () => resolve());\n }\n function assignOptions(options2 = {}) {\n let defaultGetKey = (el) => el.getAttribute(\"key\");\n let noop = () => {\n };\n updating = options2.updating || noop;\n updated = options2.updated || noop;\n removing = options2.removing || noop;\n removed = options2.removed || noop;\n adding = options2.adding || noop;\n added = options2.added || noop;\n key = options2.key || defaultGetKey;\n lookahead = options2.lookahead || false;\n debug = options2.debug || false;\n }\n async function patch(from2, to) {\n if (differentElementNamesTypesOrKeys(from2, to)) {\n let result = patchElement(from2, to);\n await breakpoint(\"Swap elements\");\n return result;\n }\n let updateChildrenOnly = false;\n if (shouldSkip(updating, from2, to, () => updateChildrenOnly = true))\n return;\n window.Alpine && initializeAlpineOnTo(from2, to, () => updateChildrenOnly = true);\n if (textOrComment(to)) {\n await patchNodeValue(from2, to);\n updated(from2, to);\n return;\n }\n if (!updateChildrenOnly) {\n await patchAttributes(from2, to);\n }\n updated(from2, to);\n await patchChildren(from2, to);\n }\n function differentElementNamesTypesOrKeys(from2, to) {\n return from2.nodeType != to.nodeType || from2.nodeName != to.nodeName || getKey(from2) != getKey(to);\n }\n function patchElement(from2, to) {\n if (shouldSkip(removing, from2))\n return;\n let toCloned = to.cloneNode(true);\n if (shouldSkip(adding, toCloned))\n return;\n dom(from2).replace(toCloned);\n removed(from2);\n added(toCloned);\n }\n async function patchNodeValue(from2, to) {\n let value = to.nodeValue;\n if (from2.nodeValue !== value) {\n from2.nodeValue = value;\n await breakpoint(\"Change text node to: \" + value);\n }\n }\n async function patchAttributes(from2, to) {\n if (from2._x_isShown && !to._x_isShown) {\n return;\n }\n if (!from2._x_isShown && to._x_isShown) {\n return;\n }\n let domAttributes = Array.from(from2.attributes);\n let toAttributes = Array.from(to.attributes);\n for (let i = domAttributes.length - 1; i >= 0; i--) {\n let name = domAttributes[i].name;\n if (!to.hasAttribute(name)) {\n from2.removeAttribute(name);\n await breakpoint(\"Remove attribute\");\n }\n }\n for (let i = toAttributes.length - 1; i >= 0; i--) {\n let name = toAttributes[i].name;\n let value = toAttributes[i].value;\n if (from2.getAttribute(name) !== value) {\n from2.setAttribute(name, value);\n await breakpoint(`Set [${name}] attribute to: \"${value}\"`);\n }\n }\n }\n async function patchChildren(from2, to) {\n let domChildren = from2.childNodes;\n let toChildren = to.childNodes;\n let toKeyToNodeMap = keyToMap(toChildren);\n let domKeyDomNodeMap = keyToMap(domChildren);\n let currentTo = dom(to).nodes().first();\n let currentFrom = dom(from2).nodes().first();\n let domKeyHoldovers = {};\n while (currentTo) {\n let toKey = getKey(currentTo);\n let domKey = getKey(currentFrom);\n if (!currentFrom) {\n if (toKey && domKeyHoldovers[toKey]) {\n let holdover = domKeyHoldovers[toKey];\n dom(from2).append(holdover);\n currentFrom = holdover;\n await breakpoint(\"Add element (from key)\");\n } else {\n let added2 = addNodeTo(currentTo, from2) || {};\n await breakpoint(\"Add element: \" + (added2.outerHTML || added2.nodeValue));\n currentTo = dom(currentTo).nodes().next();\n continue;\n }\n }\n if (lookahead) {\n let nextToElementSibling = dom(currentTo).next();\n let found = false;\n while (!found && nextToElementSibling) {\n if (currentFrom.isEqualNode(nextToElementSibling)) {\n found = true;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKey = getKey(currentFrom);\n await breakpoint(\"Move element (lookahead)\");\n }\n nextToElementSibling = dom(nextToElementSibling).next();\n }\n }\n if (toKey !== domKey) {\n if (!toKey && domKey) {\n domKeyHoldovers[domKey] = currentFrom;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKeyHoldovers[domKey].remove();\n currentFrom = dom(currentFrom).nodes().next();\n currentTo = dom(currentTo).nodes().next();\n await breakpoint('No \"to\" key');\n continue;\n }\n if (toKey && !domKey) {\n if (domKeyDomNodeMap[toKey]) {\n currentFrom = dom(currentFrom).replace(domKeyDomNodeMap[toKey]);\n await breakpoint('No \"from\" key');\n }\n }\n if (toKey && domKey) {\n domKeyHoldovers[domKey] = currentFrom;\n let domKeyNode = domKeyDomNodeMap[toKey];\n if (domKeyNode) {\n currentFrom = dom(currentFrom).replace(domKeyNode);\n await breakpoint('Move \"from\" key');\n } else {\n domKeyHoldovers[domKey] = currentFrom;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKeyHoldovers[domKey].remove();\n currentFrom = dom(currentFrom).next();\n currentTo = dom(currentTo).next();\n await breakpoint(\"Swap elements with keys\");\n continue;\n }\n }\n }\n let currentFromNext = currentFrom && dom(currentFrom).nodes().next();\n await patch(currentFrom, currentTo);\n currentTo = currentTo && dom(currentTo).nodes().next();\n currentFrom = currentFromNext;\n }\n let removals = [];\n while (currentFrom) {\n if (!shouldSkip(removing, currentFrom))\n removals.push(currentFrom);\n currentFrom = dom(currentFrom).nodes().next();\n }\n while (removals.length) {\n let domForRemoval = removals.shift();\n domForRemoval.remove();\n await breakpoint(\"remove el\");\n removed(domForRemoval);\n }\n }\n function getKey(el) {\n return el && el.nodeType === 1 && key(el);\n }\n function keyToMap(els) {\n let map = {};\n els.forEach((el) => {\n let theKey = getKey(el);\n if (theKey) {\n map[theKey] = el;\n }\n });\n return map;\n }\n function addNodeTo(node, parent) {\n if (!shouldSkip(adding, node)) {\n let clone = node.cloneNode(true);\n dom(parent).append(clone);\n added(clone);\n return clone;\n }\n return null;\n }\n function addNodeBefore(node, beforeMe) {\n if (!shouldSkip(adding, node)) {\n let clone = node.cloneNode(true);\n dom(beforeMe).before(clone);\n added(clone);\n return clone;\n }\n return beforeMe;\n }\n assignOptions(options);\n fromEl = from;\n toEl = createElement(toHtml);\n if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {\n toEl._x_dataStack = window.Alpine.closestDataStack(from);\n toEl._x_dataStack && window.Alpine.clone(from, toEl);\n }\n await breakpoint();\n await patch(from, toEl);\n fromEl = void 0;\n toEl = void 0;\n return from;\n}\nmorph.step = () => resolveStep();\nmorph.log = (theLogger) => {\n logger = theLogger;\n};\nfunction shouldSkip(hook, ...args) {\n let skip = false;\n hook(...args, () => skip = true);\n return skip;\n}\nfunction initializeAlpineOnTo(from, to, childrenOnly) {\n if (from.nodeType !== 1)\n return;\n if (from._x_dataStack) {\n window.Alpine.clone(from, to);\n }\n}\n\n// packages/morph/src/index.js\nfunction src_default(Alpine) {\n Alpine.morph = morph;\n}\n\n// packages/morph/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n morph\n};\n", "import alpine from 'alpinejs'\nimport morph from '@alpinejs/morph'\n\nalpine.plugin(morph)\n\nconst input = /INPUT/i\nconst inputTypes = /date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i\nconst textarea = /TEXTAREA/i\n\nfunction updating (el, toEl, childrenOnly, skip) {\n if (el.nodeType !== Node.ELEMENT_NODE) return\n if (el !== document.activeElement) return\n\n const protect =\n el.tagName.match(textarea) ||\n (el.tagName.match(input) && el.getAttribute('type').match(inputTypes))\n\n if (protect) return skip()\n}\n\nfunction mutate (elements, html) {\n elements.forEach(element => alpine.morph(element, html, { updating }))\n}\n\nexport default mutate\n", "import dispatch from './methods/dispatch'\nimport mutate from './methods/mutate'\n\nfunction perform (method, args, receivers) {\n // dispatch / dispatchEvent\n if (method.match(/^dispatch(Event)?$/))\n return dispatch(receivers, args[0], args[1] || {})\n\n // morph / mutate\n if (method.match(/^morph|mutate$/)) return mutate(receivers, args[0])\n\n // property assignment\n if (method.endsWith('='))\n return receivers.forEach(r => (r[method.slice(0, -1).trim()] = args[0]))\n\n // method invocation\n receivers.forEach(r => r[method].apply(r, args))\n}\n\nfunction invoke () {\n const payload = JSON.parse(this.templateContent.textContent)\n const { id, selector, receiver, method, args } = payload\n let receivers = [self]\n if (selector) receivers = Array.from(document.querySelectorAll(selector))\n\n if (receiver) {\n receivers = receivers.map(r => {\n let context = r\n const chain = receiver.split('.')\n while (chain.length > 0) context = context[chain.shift()]\n return context\n })\n }\n\n perform(method, args, receivers)\n}\n\nexport default invoke\n", "import invoke from './invoke'\n\nif (!self['Turbo'])\n throw new Error(\n '`Turbo` is not defined! Be sure to import `turbo_ready` after `@hotwired/turbo` or `@hotwired/turbo-rails`.'\n )\n\nif (!Turbo['StreamActions'])\n throw new Error(\n '`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.'\n )\n\nTurbo.StreamActions.invoke = invoke\nself.TurboReady = { StreamActions: { invoke } }\n\nconsole.info(\n 'TurboReady has initialized and has registered new stream actions with Turbo.'\n)\n", "class Meta {\n get element () {\n return document.querySelector('meta[name=\"turbo-reflex\"]')\n }\n\n get token () {\n return this.element.getAttribute('content')\n }\n\n get busy () {\n return this.element.dataset.busy === 'true'\n }\n\n set busy (value) {\n return (this.element.dataset.busy = !!value)\n }\n}\n\nexport default new Meta()\n", "export const lifecycleEvents = {\n start: 'turbo-reflex:start',\n success: 'turbo-reflex:success',\n finish: 'turbo-reflex:finish',\n abort: 'turbo-reflex:abort',\n clientError: 'turbo-reflex:client-error',\n serverError: 'turbo-reflex:server-error'\n}\n\nexport const stateEvents = {\n stateLoad: 'turbo-reflex:state-load',\n stateChange: 'turbo-reflex:state-change'\n}\n\nexport const allEvents = { ...lifecycleEvents, ...stateEvents }\n\nexport function dispatch (name, target = document, detail = {}, raise = false) {\n try {\n target = target || document\n const event = new CustomEvent(name, {\n detail,\n cancelable: false,\n bubbles: true\n })\n target.dispatchEvent(event)\n } catch (error) {\n if (raise) throw error\n dispatch(lifecycleEvents.clientError, target, { error, ...detail }, true)\n }\n}\n", "import meta from '../meta'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet head\n\nfunction observable (object, parent = null) {\n if (!object || typeof object !== 'object') return object\n\n const proxy = new Proxy(object, {\n deleteProperty (target, key) {\n delete target[key]\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n },\n\n set (target, key, value, receiver) {\n target[key] = observable(value, this)\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n }\n })\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => (object[index] = observable(value, proxy)))\n } else if (typeof object === 'object') {\n for (const [key, value] of Object.entries(object))\n object[key] = observable(value, proxy)\n }\n\n if (!parent) head = proxy\n return proxy\n}\n\nexport default observable\n", "import meta from '../meta'\nimport observable from './observable'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet loadedState, currentState, changedState\nlet loadStateTimeout\n\nfunction loadState () {\n if (!meta.element) return loadStateLater()\n const json = atob(meta.element.dataset.state)\n changedState = {}\n currentState = observable(JSON.parse(json))\n loadedState = { ...currentState }\n delete meta.element.dataset.clientStateChange\n setTimeout(() =>\n dispatch(events.stateLoad, meta.element, { state: currentState })\n )\n}\n\nfunction loadStateLater () {\n clearTimeout(loadStateTimeout)\n loadStateTimeout = setTimeout(loadState, 10)\n}\n\nif (!loadedState) loadState()\n\naddEventListener('DOMContentLoaded', loadStateLater)\naddEventListener('load', loadStateLater)\naddEventListener('turbo:load', loadStateLater)\naddEventListener('turbo:frame-load', loadStateLater)\naddEventListener('turbo-reflex:success', loadStateLater)\n\naddEventListener(events.stateChange, event => {\n changedState = {}\n for (const [key, value] of Object.entries(currentState))\n if (loadedState[key] !== value) changedState[key] = value\n meta.element.dataset.clientStateChange = true\n meta.element.dataset.state = btoa(JSON.stringify(currentState))\n})\n\nexport default {\n events,\n\n get current () {\n return currentState\n },\n\n get delta () {\n return changedState\n },\n\n // The UI state changes are split into chunks and sent to the server in an HTTP request header.\n // Max size for an HTTP header is around 4k or 4,000 bytes.\n // A Base64 character is an 8-bit-padded ASCII character... or 1 byte\n //\n // SEE: lib/state.rb - for info on how `state` is serialized/deserialized\n get payloadChunks () {\n return btoa(JSON.stringify(currentState)).match(/.{1,2000}/g)\n }\n}\n", "function replaceDocument (content) {\n const head = '<html'\n const tail = '</html'\n const headIndex = content.indexOf(head)\n const tailIndex = content.lastIndexOf(tail)\n if (headIndex >= 0 && tailIndex >= 0) {\n const html = content.slice(content.indexOf('>', headIndex) + 1, tailIndex)\n document.documentElement.innerHTML = html\n }\n}\n\nfunction append (content) {\n document.body.insertAdjacentHTML('beforeend', content)\n}\n\nexport default { append, replaceDocument }\n", "const active = {}\n\nfunction add (payload) {\n active[payload.id] = payload\n}\n\nfunction remove (id) {\n delete active[id]\n}\n\nexport default {\n add,\n remove,\n get reflexes () {\n return [...Object.values(active)]\n },\n get length () {\n return Object.keys(active).length\n }\n}\n", "import activity from './activity'\nimport { dispatch, lifecycleEvents as events } from './events'\n\nfunction finish (event) {\n event.detail.endedAt = new Date().getTime()\n event.detail.milliseconds = event.detail.endedAt - event.detail.startedAt\n setTimeout(() => dispatch(events.finish, event.target, event.detail), 20)\n}\n\naddEventListener(events.serverError, finish)\naddEventListener(events.success, finish)\naddEventListener(events.finish, event => activity.remove(event.detail.id), true)\n\nexport default { events }\n", "import meta from './meta'\nimport state from './state'\nimport renderer from './renderer'\nimport { dispatch } from './events'\nimport lifecycle from './lifecycle'\n\nconst frameSources = {}\n\n// fires before making a turbo HTTP request\naddEventListener('turbo:before-fetch-request', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchOptions } = event.detail\n\n // reflex invoked and busy\n if (meta.busy) {\n let acceptHeaders = [\n 'text/vnd.turbo-reflex.html',\n fetchOptions.headers['Accept']\n ]\n acceptHeaders = acceptHeaders\n .filter(entry => entry && entry.trim().length > 0)\n .join(', ')\n fetchOptions.headers['Accept'] = acceptHeaders\n fetchOptions.headers['TurboReflex-Token'] = meta.token\n }\n\n // always send state\n state.payloadChunks.forEach((chunk, i) => {\n fetchOptions.headers[\n `TurboReflex-State-${i.toString().padStart(4, '0')}`\n ] = chunk\n })\n})\n\n// fires after receiving a turbo HTTP response\naddEventListener('turbo:before-fetch-response', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchResponse: response } = event.detail\n\n if (frame) frameSources[frame.id] = frame.src\n\n if (response.header('TurboReflex')) {\n if (response.statusCode < 200 || response.statusCode > 399) {\n const error = `Server returned a ${response.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`\n dispatch(\n lifecycle.events.clientError,\n document,\n { ...event.detail, error },\n true\n )\n }\n\n if (response.header('TurboReflex') === 'Append') {\n event.preventDefault()\n response.responseText.then(content => renderer.append(content))\n }\n }\n})\n\n// fires when a frame element is navigated and finishes loading\naddEventListener('turbo:frame-load', event => {\n const frame = event.target.closest('turbo-frame')\n frame.dataset.turboReflexSrc =\n frameSources[frame.id] || frame.src || frame.dataset.turboReflexSrc\n delete frameSources[frame.id]\n})\n", "const schema = {\n frameAttribute: 'data-turbo-frame',\n methodAttribute: 'data-turbo-method',\n reflexAttribute: 'data-turbo-reflex'\n}\n\nexport default { ...schema }\n", "const events = {}\nlet eventListener\n\nfunction register (eventName, selectors) {\n events[eventName] = selectors\n document.addEventListener(eventName, eventListener, true)\n}\n\nfunction getRegisteredEventNameForElement (element) {\n return Object.keys(events).find(eventName => {\n return !!events[eventName].find(selector =>\n Array.from(document.querySelectorAll(selector)).find(el => el === element)\n )\n })\n}\n\nfunction isRegisteredForElement (eventName, element) {\n return eventName === getRegisteredEventNameForElement(element)\n}\n\nexport default {\n events,\n register,\n isRegisteredForElement,\n set handler (fn) {\n eventListener = fn\n }\n}\n", "import schema from './schema'\nimport lifecycle from './lifecycle'\n\nfunction findClosestReflex (element) {\n return element.closest(`[${schema.reflexAttribute}]`)\n}\n\nfunction findClosestFrame (element) {\n return element.closest('turbo-frame')\n}\n\nfunction assignElementValueToPayload (element, payload = {}) {\n if (element.tagName.toLowerCase() !== 'select')\n return (payload.value = element.value || null)\n\n if (!element.multiple)\n return (payload.value = element.options[element.selectedIndex].value)\n\n payload.values = Array.from(element.options).reduce((memo, option) => {\n if (option.selected) memo.push(option.value)\n return memo\n }, [])\n}\n\nfunction buildAttributePayload (element) {\n const payload = Array.from(element.attributes).reduce((memo, attr) => {\n let value = attr.value\n memo[attr.name] = value\n return memo\n }, {})\n\n payload.tag = element.tagName\n payload.checked = !!element.checked\n payload.disabled = !!element.disabled\n assignElementValueToPayload(element, payload)\n\n // reduce payload size to keep URL length smaller\n delete payload.class\n delete payload.action\n delete payload.href\n delete payload[schema.reflexAttribute]\n delete payload[schema.frameAttribute]\n\n return payload\n}\n\nexport default {\n buildAttributePayload,\n findClosestReflex,\n findClosestFrame\n}\n", "import meta from '../meta'\n\nfunction invokeReflex (form, payload = {}) {\n payload.token = meta.token\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = 'turbo_reflex'\n input.value = JSON.stringify(payload)\n form.appendChild(input)\n}\n\nexport default { invokeReflex }\n", "function build (urlString, payload = {}) {\n const a = document.createElement('a')\n a.href = urlString\n const url = new URL(a)\n url.searchParams.set('turbo_reflex', JSON.stringify(payload))\n return url\n}\n\nexport default { build }\n", "import urls from '../urls'\n\nfunction invokeReflex (frame, payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n frame.src = urls.build(src, payload)\n}\n\nexport default { invokeReflex }\n", "import urls from '../urls'\n\nfunction invokeReflex (element, payload = {}) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n delete payload.href\n element.setAttribute('href', urls.build(src, payload))\n}\n\nexport default { invokeReflex }\n", "import meta from '../meta'\nimport state from '../state'\nimport { dispatch } from '../events'\nimport lifecycle from '../lifecycle'\nimport urls from '../urls'\nimport renderer from '../renderer'\n\nfunction aborted (event) {\n const xhr = event.target\n dispatch(lifecycle.events.abort, document, { xhr, ...event.detail })\n}\n\nfunction errored (event) {\n const xhr = event.target\n\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n\n const error = `Server returned a ${xhr.status} status code! TurboReflex requires 2XX-3XX status codes.`\n\n dispatch(\n lifecycle.events.clientError,\n document,\n { xhr, ...event.detail, error },\n true\n )\n}\n\nfunction loaded (event) {\n const xhr = event.target\n if (xhr.status < 200 || xhr.status > 399) return errored(event)\n const content = xhr.responseText\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n}\n\nfunction invokeReflex (payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n\n try {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', urls.build(src, payload), true)\n xhr.setRequestHeader(\n 'Accept',\n 'text/vnd.turbo-reflex.html, text/html, application/xhtml+xml'\n )\n xhr.setRequestHeader('TurboReflex-Token', meta.token)\n state.payloadChunks.forEach((chunk, i) =>\n xhr.setRequestHeader(\n `TurboReflex-State-${i.toString().padStart(4, '0')}`,\n chunk\n )\n )\n\n xhr.addEventListener('abort', aborted)\n xhr.addEventListener('error', errored)\n xhr.addEventListener('load', loaded)\n xhr.send()\n } catch (ex) {\n const message = `Unexpected error sending HTTP request! ${ex.message}`\n errored(ex, { detail: { message } })\n }\n}\n\nexport default { invokeReflex }\n", "import elements from '../elements'\nimport formDriver from './form'\nimport frameDriver from './frame'\nimport methodDriver from './method'\nimport windowDriver from './window'\n\nfunction src (element, frame) {\n frame = frame || { dataset: {} }\n return (\n element.href || frame.src || frame.dataset.turboReflexSrc || location.href\n )\n}\n\nfunction find (element) {\n let frame = elements.findClosestFrame(element)\n const { turboFrame, turboMethod } = element.dataset\n\n if (element.tagName.toLowerCase() === 'form')\n return {\n name: 'form',\n reason: 'Element is a form.',\n frame,\n src: element.action,\n invokeReflex: formDriver.invokeReflex\n }\n\n if (turboMethod && turboMethod.length > 0)\n return {\n name: 'method',\n reason: 'Element defines data-turbo-method.',\n frame,\n src: element.href,\n invokeReflex: methodDriver.invokeReflex\n }\n\n // element targets a frame that is not _self\n if (turboFrame && turboFrame !== '_self') {\n frame = document.getElementById(turboFrame)\n return {\n name: 'frame',\n reason: 'element targets a frame that is not _self',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n }\n\n // element does NOT target a frame or targets _self and is contained by a frame\n if ((!turboFrame || turboFrame === '_self') && frame)\n return {\n name: 'frame',\n reason:\n 'element does NOT target a frame or targets _self and is contained by a frame',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n\n // element matches one or more of the following conditions\n // - targets _top\n // - does NOT target a frame\n // - is NOT contained by a frame\n return {\n name: 'window',\n reason:\n 'element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)',\n frame: null,\n src: src(element),\n invokeReflex: windowDriver.invokeReflex\n }\n}\n\nexport default { find }\n", "import { allEvents as events } from './events'\n\nlet currentLevel = 'unknown'\n\nconst logLevels = {\n debug: Object.values(events),\n info: Object.values(events),\n warn: [events.abort, events.clientError, events.serverError],\n error: [events.clientError, events.serverError],\n unknown: []\n}\n\nObject.values(events).forEach(name => {\n addEventListener(name, event => {\n if (logLevels[currentLevel].includes(event.type)) {\n const level = currentLevel === 'debug' ? 'log' : currentLevel\n console[level](event.type, { target: event.target, detail: event.detail })\n }\n })\n})\n\nexport default {\n get level () {\n return currentLevel\n },\n set level (value) {\n if (!Object.keys(logLevels).includes(value)) value = 'unknown'\n return (currentLevel = value)\n }\n}\n", "function v4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n}\n\nexport default { v4 }\n", "import 'turbo_ready'\nimport './turbo'\nimport schema from './schema'\nimport { dispatch, allEvents as events } from './events'\nimport activity from './activity'\nimport delegates from './delegates'\nimport drivers from './drivers'\nimport meta from './meta'\nimport elements from './elements'\nimport lifecycle from './lifecycle'\nimport logger from './logger'\nimport state from './state'\nimport urls from './urls'\nimport uuids from './uuids'\n\nfunction invokeReflex (event) {\n let element\n let payload = {}\n\n try {\n element = elements.findClosestReflex(event.target)\n if (!element) return\n if (!delegates.isRegisteredForElement(event.type, element)) return\n\n const driver = drivers.find(element)\n\n // payload sent to server (also used for lifecycle event.detail)\n payload = {\n id: `reflex-${uuids.v4()}`,\n name: element.dataset.turboReflex,\n driver: driver.name,\n src: driver.src,\n frameId: driver.frame ? driver.frame.id : null,\n elementId: element.id.length > 0 ? element.id : null,\n elementAttributes: elements.buildAttributePayload(element),\n startedAt: new Date().getTime()\n }\n\n activity.add(payload)\n dispatch(lifecycle.events.start, element, payload)\n\n if (['frame', 'window'].includes(driver.name)) event.preventDefault()\n\n meta.busy = true\n setTimeout(() => (meta.busy = false), 10)\n\n switch (driver.name) {\n case 'method':\n return driver.invokeReflex(element, payload)\n case 'form':\n return driver.invokeReflex(element, payload)\n case 'frame':\n return driver.invokeReflex(driver.frame, payload)\n case 'window':\n return driver.invokeReflex(payload)\n }\n } catch (error) {\n dispatch(lifecycle.events.clientError, element, {\n error,\n ...payload\n })\n }\n}\n\n// wire things up and setup defaults for event delegation\ndelegates.handler = invokeReflex\ndelegates.register('change', [\n `input[${schema.reflexAttribute}]`,\n `select[${schema.reflexAttribute}]`,\n `textarea[${schema.reflexAttribute}]`\n])\n// delegates.register('mousedown', [\n// `[${schema.reflexAttribute}][${schema.methodAttribute}]`\n// ])\ndelegates.register('submit', [`form[${schema.reflexAttribute}]`])\ndelegates.register('click', [`[${schema.reflexAttribute}]`])\n\nself.TurboReflex = {\n logger,\n schema,\n registerEventDelegate: delegates.register,\n get eventDelegates () {\n return { ...delegates.events }\n },\n get events () {\n return { ...events }\n },\n get state () {\n return state.current\n },\n // delta of state changes made on the client\n get stateDelta () {\n return state.delta\n }\n}\n\nexport default self.TurboReflex\n", "export default class ReflexElement extends HTMLElement {\n constructor () {\n super()\n this.devtool = 'unknown'\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = '<slot></slot>'\n }\n\n connectedCallback () {\n this.ensureId()\n this.dataset.elementOrigin = 'hopsoft/reflex_behaviors'\n }\n\n ensureId () {\n if (this.id.trim().length) return\n this.id = `${this.tagName}-${this.uuidv4()}`.toLowerCase()\n }\n\n // SEE: https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid\n uuidv4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n }\n\n get viewStack () {\n if (!this.dataset.viewStack) return []\n return JSON.parse(this.dataset.viewStack)\n }\n\n get partial () {\n return this.viewStack[0]\n }\n}\n", "import ReflexElement from './reflex_element'\n\nexport default class ToggleTargetElement extends ReflexElement {}\n", "export function template (html) {\n let template = document.createElement('template')\n template.innerHTML = html\n return template\n}\n\nexport function appendHTML (html, parent) {\n parent = parent || document.body\n const clone = template(html).content.cloneNode(true)\n const child = clone.querySelector('*')\n return parent.appendChild(child)\n}\n\nexport function addHighlight (element, options = {}) {\n if (!element) return\n removeHighlight(element)\n let { outline, outlineOffset } = options\n\n outline = outline || 'dashed 3px red'\n outlineOffset = outlineOffset || '0px'\n\n element.originalStyles = element.originalStyles || {\n display: element.style.display,\n minHeight: element.style.minHeight,\n minWidth: element.style.minWidth,\n outline: element.style.outline,\n outlineOffset: element.style.outlineOffset\n }\n\n if (\n getComputedStyle(element).display.match(/^inline$/i) &&\n element.offsetWidth === 0 &&\n element.offsetHeight === 0\n ) {\n element.style.display = 'inline-block'\n element.style.minHeight = '2px'\n element.style.minWidth = '2px'\n }\n element.style.outline = outline\n element.style.outlineOffset = outlineOffset\n element.dataset.reflexBehaviorsHighlight = true\n}\n\nexport function removeHighlight (element) {\n if (!element) return\n if (element.originalStyles) {\n for (const [key, value] of Object.entries(element.originalStyles))\n value ? (element.style[key] = value) : (element.style[key] = '')\n delete element.originalStyles\n }\n delete element.dataset.reflexBehaviorsHighlight\n}\n\nexport function coordinates (element) {\n const rect = element.getBoundingClientRect()\n return {\n left: rect.left + window.scrollX,\n top: rect.top + window.scrollY,\n width: element.offsetWidth,\n height: element.offsetHeight\n }\n}\n", "export default class DevtoolElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.labelElement.addEventListener('click', event => {\n event.preventDefault()\n this.toggle()\n })\n this.checkboxElement.addEventListener('change', event =>\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n )\n }\n\n toggle () {\n this.checked ? this.uncheck() : this.check()\n }\n\n check () {\n this.checkboxElement.checked = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n uncheck () {\n this.checkboxElement.checked = false\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n get name () {\n return this.getAttribute('name')\n }\n\n get checked () {\n return this.checkboxElement.checked\n }\n\n get checkboxElement () {\n return this.shadowRoot.querySelector('input')\n }\n\n get labelElement () {\n return this.shadowRoot.querySelector('label')\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <input name=\"checkbox\" type=\"checkbox\">\n <label for=\"checkbox\"><slot name=\"label\"></slot></label>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host, :host * {\n cursor: pointer;\n }\n\n div {\n display: flex;\n position: relative;\n top: -1px;\n }\n\n input:checked + label{\n font-weight: bold;\n }\n\n label {\n color: indigo;\n }\n `\n }\n}\n", "import { appendHTML } from '../../utils/dom'\n\nexport default class SupervisorElement extends HTMLElement {\n constructor () {\n super()\n this.enabledDevtools = {}\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.shadowRoot.querySelector('button').addEventListener('click', () =>\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-close', {\n bubbles: true\n })\n )\n )\n\n this.addEventListener('change', event => {\n const devtoolElement = event.target\n const { checked, name } = devtoolElement\n checked ? this.enableDevtool(name) : this.disableDevtool(name)\n })\n }\n\n enableDevtool (name) {\n if (this.enabledDevtools[name]) return\n this.enabledDevtools[name] = true\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtool-enable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n disableDevtool (name) {\n if (!this.enabledDevtools[name]) return\n delete this.enabledDevtools[name]\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtool-disable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n close () {\n this.devtoolElements.forEach(el => {\n if (el.checked) el.uncheck()\n })\n this.remove()\n }\n\n get devtoolElements () {\n return this.querySelectorAll('[slot=\"devtool\"]')\n }\n\n get closeElement () {\n return this.querySelector('button')\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <label>ReflexBehaviors</label>\n <slot name=\"devtool\"></slot>\n <button>\u2715</button>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host {\n background-color: lavender;\n border-radius: 15px;\n bottom: 20px;\n display: block;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n left: 50%;\n outline-offset: 1px;\n outline: solid 3px indigo;\n padding: 5px 10px;\n position: fixed;\n transform: translateX(-50%);\n z-index: 8999;\n }\n\n * {\n -webkit-user-select: none;\n font-family: helvetica, sans-serif;\n font-size: 1rem;\n user-select: none;\n }\n\n label {\n color: indigo;\n cursor: grab;\n opacity: 0.5;\n }\n\n div {\n display: flex;\n gap: 0 5px;\n position: relative;\n }\n\n button {\n background-color: thistle;\n border-radius: 50%;\n border: none;\n color: indigo;\n cursor: pointer;\n font-size: 10px;\n height: 18px;\n line-height: 18px;\n margin: 0 -5px 0 10px;\n outline: solid 1px indigo;\n padding: 0 2px;\n position: relative;\n top: 1px;\n width: 18px;\n opacity: 0.5;\n }\n\n button:hover {\n opacity: 1;\n }\n `\n }\n}\n", "export default class TooltipElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n }\n\n get color () {\n return this.getAttribute('color') || 'darkslategray'\n }\n\n get backgroundColor () {\n return this.getAttribute('background-color') || 'gainsboro'\n }\n\n get position () {\n return this.getAttribute('position') || 'top'\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <slot name=\"title\"></slot>\n <slot name=\"content-top\"></slot>\n <slot name=\"content\"></slot>\n <slot name=\"content-bottom\"></slot>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host {\n display: block;\n position: absolute;\n z-index: 8999;\n }\n\n * {\n color: ${this.color}\n font-size: 1rem;\n }\n\n div {\n background-color: ${this.backgroundColor};\n border-radius: 15px;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n font-family: monospace;\n min-height: 30px;\n min-width: 100px;\n opacity: 0.9;\n outline-offset: 1px;\n outline: dashed 3px ${this.color};\n padding: 8px 12px 8px 12px;\n position: relative;\n white-space: nowrap;\n }\n\n slot[name=\"title\"] {\n border-bottom: dotted 1px ${this.color};\n color: ${this.color};\n display: inline-block;\n font-weight: bold;\n margin-bottom: 8px;\n padding-bottom: 8px;\n width: 100%;\n }\n\n slot[name=\"content-top\"] {\n color: ${this.color};\n font-weight: normal;\n opacity: 0.7;\n }\n\n slot[name=\"content\"] {\n color: ${this.color};\n font-weight: normal;\n opacity: 0.7;\n }\n\n slot[name=\"content-bottom\"] {\n color: red;\n font-weight: normal;\n opacity: 0.7;\n }\n `\n }\n}\n", "const added = []\n\nconst dependencies = {\n LeaderLine: {\n src:\n 'https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js',\n integrity:\n 'sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==',\n global: 'LeaderLine'\n },\n\n PlainDraggable: {\n src:\n 'https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js',\n global: 'PlainDraggable'\n }\n}\n\nfunction exists (dependency) {\n if (dependency.global && self[dependency.global]) return true\n if (document.querySelector(`[src='${dependency.src}']`)) return true\n return added.includes(dependency)\n}\n\nfunction add (dependency) {\n if (exists(dependency)) return\n added.push(dependency)\n\n const { src, integrity } = dependency\n const script = document.createElement('script')\n script.setAttribute('src', src)\n script.setAttribute('crossorigin', 'anonymous')\n script.setAttribute('referrerpolicy', 'no-referrer')\n if (integrity) script.setAttribute('integrity', integrity)\n document.head.appendChild(script)\n}\n\nfunction remove (dependency) {\n if (!added.includes(dependency)) return\n added.splice(added.indexOf(dependency), 1)\n\n const { src } = dependency\n const el = document.querySelector(`script[src='${src}']`)\n if (el) el.remove()\n if (dependency.global && self[dependency.global])\n self[dependency.global] = null\n}\n\nfunction removeAll () {\n ;[...added].forEach(dependency => remove(dependency))\n}\n\nexport default { ...dependencies, add, remove, removeAll }\n", "import { appendHTML } from '../utils/dom'\nimport DevtoolElement from './elements/devtool_element'\nimport SupervisorElement from './elements/supervisor_element'\nimport TooltipElement from './elements/tooltip_element'\nimport dependencies from './dependencies'\n\ncustomElements.define('reflex-behaviors-devtool', DevtoolElement)\ncustomElements.define('reflex-behaviors-devtool-supervisor', SupervisorElement)\ncustomElements.define('reflex-behaviors-devools-tooltip', TooltipElement)\n\nlet supervisorElement\n\nfunction makeDraggable () {\n if (!supervisorElement) return\n try {\n new PlainDraggable(supervisorElement)\n } catch {\n setTimeout(makeDraggable, 200)\n }\n}\n\nfunction stop () {\n if (stopped()) return\n supervisorElement.close()\n supervisorElement.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-stop', {\n bubbles: true\n })\n )\n supervisorElement = null\n dependencies.removeAll()\n}\n\nfunction start () {\n if (started()) return\n dependencies.add(dependencies.LeaderLine)\n dependencies.add(dependencies.PlainDraggable)\n supervisorElement = appendHTML(\n '<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>'\n )\n setTimeout(makeDraggable, 200)\n supervisorElement.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-start', {\n bubbles: true\n })\n )\n}\n\nfunction restart () {\n const enabledList = supervisorElement\n ? Object.keys(supervisorElement.enabledDevtools)\n : []\n\n stop()\n start()\n\n supervisorElement.devtoolElements.forEach(el => {\n if (enabledList.includes(el.name)) el.check()\n })\n}\n\nfunction started () {\n return !!supervisorElement\n}\n\nfunction stopped () {\n return !started()\n}\n\nlet restartTimeout\nfunction debouncedRestart () {\n clearTimeout(restartTimeout)\n restartTimeout = setTimeout(restart, 25)\n}\n\nfunction autoRestart () {\n if (started()) debouncedRestart()\n}\n\naddEventListener('turbo:load', autoRestart)\naddEventListener('turbo-frame:load', autoRestart)\naddEventListener('turbo-reflex:success', autoRestart)\naddEventListener('turbo-reflex:finish', autoRestart)\naddEventListener('reflex-behaviors:devtools-close', stop)\n\nfunction register (name, label) {\n if (!supervisorElement) return\n return appendHTML(\n `\n <reflex-behaviors-devtool name=\"${name}\" slot=\"devtool\">\n <span slot=\"label\">${label}</span>\n </reflex-behaviors-devtool>\n `,\n supervisorElement\n )\n}\n\nfunction enabled (name) {\n if (!supervisorElement) return false\n return supervisorElement.enabledDevtools[name]\n}\n\nexport default {\n enabled,\n register,\n start,\n stop,\n restart: debouncedRestart,\n get started () {\n return started()\n },\n get stopped () {\n return stopped()\n }\n}\n", "import {\n appendHTML,\n addHighlight,\n coordinates,\n removeHighlight\n} from '../utils/dom'\nimport supervisor from './supervisor'\n\nlet activeToggle\n\ndocument.addEventListener('reflex-behaviors:devtools-start', () =>\n supervisor.register('toggle', 'toggles<small>(trigger/target)</small>')\n)\n\nfunction appendTooltip (title, content, options = {}) {\n let { backgroundColor, color, position } = options\n color = color || 'white'\n position = position || 'top'\n return appendHTML(`\n <reflex-behaviors-devools-tooltip position=\"${position}\" background-color=\"${backgroundColor}\" color=\"${color}\">\n <div slot='title'>${title}</div>\n ${content}\n </reflex-behaviors-devools-tooltip>\n `)\n}\n\nexport default class ToggleDevtool {\n constructor (trigger) {\n this.name = 'toggle'\n this.reflex = trigger.dataset.turboReflex\n this.trigger = trigger\n this.target = trigger.target\n\n document.addEventListener('reflex-behaviors:devtool-enable', event => {\n const { name } = event.detail\n if (name === this.name) {\n addHighlight(this.trigger, {\n outline: '3px dashed blueviolet',\n outlineOffset: '2px'\n })\n }\n })\n\n document.addEventListener('reflex-behaviors:devtool-disable', event => {\n const { name } = event.detail\n if (name === this.name) removeHighlight(this.trigger)\n })\n\n addEventListener('click', event => {\n if (event.target.closest('reflex-behaviors-devools-tooltip')) return\n this.hide(true)\n })\n\n addEventListener('turbo:load', () => this.hide(true))\n addEventListener('turbo-frame:load', () => this.hide(true))\n addEventListener('turbo-reflex:success', () => this.hide(true))\n addEventListener('turbo-reflex:finish', () => this.hide(true))\n }\n\n get enabled () {\n return supervisor.enabled(this.name)\n }\n\n show () {\n if (!this.enabled) return\n if (activeToggle === this) return\n activeToggle = this\n this.hide()\n\n addHighlight(this.target, {\n outline: '3px dashed darkcyan',\n outlineOffset: '-2px'\n })\n\n addHighlight(this.renderingElement, {\n outline: '3px dashed chocolate',\n outlineOffset: '3px'\n })\n\n const renderingTooltip = this.createRenderingTooltip()\n const targetTooltip = this.createTargetTooltip()\n this.createTriggerTooltip(targetTooltip, renderingTooltip)\n\n document\n .querySelectorAll('.leader-line')\n .forEach(el => (el.style.zIndex = 100000))\n\n const data = {\n rendering: { partial: null, id: null },\n trigger: { partial: null, id: null },\n target: { partial: null, id: null }\n }\n\n if (this.renderingPartial) data.rendering.partial = this.renderingPartial\n if (this.renderingElement) data.rendering.id = this.renderingElement.id\n\n if (this.trigger)\n data.trigger = { partial: this.trigger.partial, id: this.trigger.id }\n\n if (this.target)\n data.target = { partial: this.target.partial, id: this.target.id }\n else if (this.trigger)\n data.target.id = `No element matches the targeted DOM id: ${this.trigger.controls}`\n\n console.table(data)\n }\n\n hide (clearActiveToggle) {\n document.querySelectorAll('.leader-line').forEach(el => el.remove())\n document\n .querySelectorAll('reflex-behaviors-devools-tooltip')\n .forEach(el => el.remove())\n\n document\n .querySelectorAll('[data-reflex-behaviors-highlight]')\n .forEach(el => {\n if (!el.tagName.match(/toggle-trigger/i)) removeHighlight(el)\n })\n\n if (clearActiveToggle) activeToggle = null\n }\n\n createRenderingTooltip () {\n if (!this.renderingElement) return\n const title = `RENDERING (id: ${this.renderingElement.id || 'unknown'})`\n const content = `<div slot=\"content\">partial: ${this.renderingPartial}</div>`\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lightyellow',\n color: 'chocolate'\n })\n\n const coords = coordinates(this.renderingElement)\n const top = Math.ceil(\n coords.top + coords.height / 2 - tooltip.offsetHeight / 2\n )\n const left = Math.ceil(coords.left + coords.width + 100)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.renderingElement, {\n ...this.leaderLineOptions,\n color: 'chocolate'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTargetTooltip () {\n if (!this.target) return\n if (!this.target.viewStack) return\n\n const title = `TARGET (id: ${this.target.id})`\n const content = this.target.viewStack\n .reverse()\n .map((view, index) => {\n return this.trigger.sharedViews.includes(view)\n ? `<div slot=\"content-top\">${index + 1}. ${view}</div>`\n : `<div slot=\"content-bottom\">${index + 1}. ${view}</div>`\n }, this)\n .join('')\n\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lightcyan',\n color: 'darkcyan',\n position: 'bottom'\n })\n\n const coords = coordinates(this.target)\n const top = Math.ceil(coords.top + tooltip.offsetHeight)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.target, {\n ...this.leaderLineOptions,\n color: 'darkcyan'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTriggerTooltip (targetTooltip, renderingTooltip) {\n if (!this.trigger) return\n const title = `TRIGGER (controls: ${this.trigger.controls})`\n const content = this.trigger.viewStack\n .reverse()\n .map((view, index) => {\n return this.trigger.sharedViews.includes(view)\n ? `<div slot=\"content-top\">${index + 1}. ${view}</div>`\n : `<div slot=\"content-bottom\">${index + 1}. ${view}</div>`\n }, this)\n .join('')\n\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lavender',\n color: 'blueviolet'\n })\n\n const coords = coordinates(this.trigger)\n const top = Math.ceil(coords.top - tooltip.offsetHeight * 2)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(this.trigger, tooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet'\n })\n\n tooltip.lineToTarget = new LeaderLine(tooltip, targetTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: 'toggles',\n size: 2.1\n })\n\n tooltip.lineToRendering = new LeaderLine(tooltip, renderingTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: 'renders',\n size: 2.1\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n tooltip.drag.onMove = () => {\n tooltip.line.position()\n tooltip.lineToTarget.position()\n tooltip.lineToRendering.position()\n }\n targetTooltip.drag.onMove = () => {\n targetTooltip.line.position()\n tooltip.lineToTarget.position()\n tooltip.lineToRendering.position()\n }\n renderingTooltip.drag.onMove = () => {\n renderingTooltip.line.position()\n tooltip.lineToTarget.position()\n tooltip.lineToRendering.position()\n }\n return tooltip\n }\n\n get renderingPartial () {\n let partial = this.trigger ? this.trigger.renderingPartial : null\n partial = partial || (this.target ? this.target.renderingPartial : null)\n return partial\n }\n\n get renderingElement () {\n let element = this.trigger ? this.trigger.renderingElement : null\n element = element || (this.target ? this.target.renderingElement : null)\n return element\n }\n\n get leaderLineOptions () {\n return {\n dash: { animation: true },\n dropShadow: { opacity: 0.3 },\n endPlug: 'arrow3',\n endPlugSize: 1.7,\n size: 3,\n startPlug: 'disc',\n startPlugSize: 1\n }\n }\n}\n", "import ReflexElement from './reflex_element'\nimport DevtoolSupervisor from '../devtools/supervisor'\nimport ToggleDevtool from '../devtools/toggle'\n\nexport default class ToggleTriggerElement extends ReflexElement {\n connectedCallback () {\n super.connectedCallback()\n const mouseenter = () => this.devtool.show()\n\n document.addEventListener('reflex-behaviors:devtools-start', () => {\n this.devtool = new ToggleDevtool(this)\n this.addEventListener('mouseenter', mouseenter)\n })\n\n document.addEventListener('reflex-behaviors:devtools-stop', () => {\n this.removeEventListener('mouseenter', mouseenter)\n delete this.devtool\n })\n\n if (DevtoolSupervisor.started) DevtoolSupervisor.restart()\n }\n\n collapse () {\n try {\n this.target.remove()\n this.setAttribute('aria-expanded', false)\n } catch (error) {\n console.error('Failed to collapse toggle-trigger target!', error)\n }\n }\n\n get sharedViews () {\n if (!this.target) return []\n if (!this.target.viewStack) return []\n const reducer = (memo, view) => {\n if (this.target.viewStack.includes(view)) memo.push(view)\n return memo\n }\n return this.viewStack.reduce(reducer.bind(this), [])\n }\n\n get renderingInfo () {\n if (!this.dataset.render) return {}\n return JSON.parse(this.dataset.render)\n }\n\n get renderingPartial () {\n return this.renderingInfo.partial\n }\n\n get renderingElement () {\n const { id } = this.renderingInfo\n if (!id) return null\n return document.getElementById(id)\n }\n\n get expanded () {\n return this.getAttribute('aria-expanded') === 'true'\n }\n\n get controls () {\n return this.getAttribute('aria-controls')\n }\n\n get target () {\n return document.getElementById(this.controls)\n }\n\n get active () {\n return this.getAttribute('data-active') === 'true'\n }\n\n set active (value) {\n this.setAttribute('data-active', !!value)\n }\n}\n\naddEventListener(\n TurboReflex.events.start,\n event => (event.target.active = true)\n)\naddEventListener(\n TurboReflex.events.success,\n event => (event.target.active = false)\n)\naddEventListener(\n TurboReflex.events.finish,\n event => (event.target.active = false)\n)\n\naddEventListener('click', event => {\n if (event.target.tagName.match(/reflex-behaviors-devtool/i)) return\n setTimeout(() => {\n const selector =\n 'toggle-trigger[aria-controls][aria-expanded=\"true\"][data-auto-collapse=\"true\"]'\n document.querySelectorAll(selector).forEach(trigger => trigger.collapse())\n })\n})\n", "import ToggleTargetElement from './toggle_target_element'\nimport ToggleTriggerElement from './toggle_trigger_element'\n\ncustomElements.define('toggle-target', ToggleTargetElement)\ncustomElements.define('toggle-trigger', ToggleTriggerElement)\n", "import supervisor from './supervisor'\n\nconst { restart, start, stop } = supervisor\n\nexport default { restart, start, stop }\n", "import 'turbo_reflex'\nimport './elements'\nimport devtools from './devtools'\n\nself.ReflexBehaviors = { devtools }\n"],
5
- "mappings": "AAAA,SAASA,GAAUC,EAASC,EAAMC,EAAU,CAAC,EAAG,CAC9C,IAAMC,EAAM,IAAI,YAAYF,EAAMC,CAAO,EACzCF,EAAQ,QAAQI,GAAKA,EAAE,cAAcD,CAAG,CAAC,CAC3C,CAEA,IAAOE,GAAQN,GCJf,IAAIO,GAAe,GACfC,GAAW,GACXC,GAAQ,CAAC,EACb,SAASC,GAAUC,EAAU,CAC3BC,GAASD,CAAQ,CACnB,CACA,SAASC,GAASC,EAAK,CAChBJ,GAAM,SAASI,CAAG,GACrBJ,GAAM,KAAKI,CAAG,EAChBC,GAAW,CACb,CACA,SAASC,GAAWF,EAAK,CACvB,IAAIG,EAAQP,GAAM,QAAQI,CAAG,EACzBG,IAAU,IACZP,GAAM,OAAOO,EAAO,CAAC,CACzB,CACA,SAASF,IAAa,CAChB,CAACN,IAAY,CAACD,KAChBA,GAAe,GACf,eAAeU,EAAS,EAE5B,CACA,SAASA,IAAY,CACnBV,GAAe,GACfC,GAAW,GACX,QAASU,EAAI,EAAGA,EAAIT,GAAM,OAAQS,IAChCT,GAAMS,GAAG,EAEXT,GAAM,OAAS,EACfD,GAAW,EACb,CAGA,IAAIW,GACAC,GACAC,GACAC,GACAC,GAAiB,GACrB,SAASC,GAAwBb,EAAU,CACzCY,GAAiB,GACjBZ,EAAS,EACTY,GAAiB,EACnB,CACA,SAASE,GAAoBC,EAAQ,CACnCP,GAAWO,EAAO,SAClBL,GAAUK,EAAO,QACjBN,GAAUT,GAAae,EAAO,OAAOf,EAAU,CAAC,UAAYgB,GAAS,CAC/DJ,GACFb,GAAUiB,CAAI,EAEdA,EAAK,CAET,CAAC,CAAC,EACFL,GAAMI,EAA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C9C,CAEA,IAAI,OAAQC,EAAO,CACjB,KAAK,aAAa,cAAe,CAAC,CAACA,CAAK,CAC1C,CACF,EAEA,iBACE,YAAY,OAAO,MACnBC,GAAUA,EAAM,OAAO,OAAS,EAClC,EACA,iBACE,YAAY,OAAO,QACnBA,GAAUA,EAAM,OAAO,OAAS,EAClC,EACA,iBACE,YAAY,OAAO,OACnBA,GAAUA,EAAM,OAAO,OAAS,EAClC,EAEA,iBAAiB,QAASA,GAAS,CAC7BA,EAAM,OAAO,QAAQ,MAAM,2BAA2B,GAC1D,WAAW,IAAM,CACf,IAAMC,EACJ,iFACF,SAAS,iBAAiBA,CAAQ,EAAE,QAAQC,GAAWA,EAAQ,SAAS,CAAC,CAC3E,CAAC,CACH,CAAC,EC9FD,eAAe,OAAO,gBAAiBC,EAAmB,EAC1D,eAAe,OAAO,iBAAkBC,EAAoB,ECF5D,GAAM,CAAE,QAAAC,GAAS,MAAAC,GAAO,KAAAC,EAAK,EAAIC,EAE1BC,GAAQ,CAAE,QAAAJ,GAAS,MAAAC,GAAO,KAAAC,EAAK,ECAtC,KAAK,gBAAkB,CAAE,SAAAG,EAAS",
6
- "names": ["dispatch", "targets", "name", "options", "evt", "t", "dispatch_default", "flushPending", "flushing", "queue", "scheduler", "callback", "queueJob", "job", "queueFlush", "dequeueJob", "index", "flushJobs", "i", "reactive", "effect", "release", "raw", "shouldSchedule", "disableEffectScheduling", "setReactivityEngine", "engine", "task", "overrideEffect", "override", "elementBoundEffect", "el", "cleanup2", "effectReference", "onAttributeAddeds", "onElRemoveds", "onElAddeds", "onElAdded", "onElRemoved", "onAttributesAdded", "onAttributeRemoved", "name", "cleanupAttributes", "names", "value", "observer", "onMutate", "currentlyObserving", "startObservingMutations", "stopObservingMutations", "flushObserver", "recordQueue", "willProcessRecordQueue", "processRecordQueue", "mutateDom", "result", "isCollecting", "deferredMutations", "deferMutations", "flushAndStopDeferringMutations", "mutations", "addedNodes", "removedNodes", "addedAttributes", "removedAttributes", "node", "oldValue", "add2", "remove", "attrs", "scope", "mergeProxies", "closestDataStack", "addScopeToNode", "data2", "referenceNode", "refreshScope", "element", "scope2", "existingScope", "key", "objects", "thisProxy", "target", "obj", "descriptor", "getter", "setter", "property", "closestObjectWithKey", "initInterceptors", "isObject2", "val", "recurse", "basePath", "enumerable", "path", "interceptor", "mutateObj", "get", "set", "initialValue", "initialize", "innerValue", "carry", "segment", "magics", "magic", "injectMagics", "utilities", "getElementBoundUtilities", "tryCatch", "expression", "args", "e", "handleError", "error2", "shouldAutoEvaluateFunctions", "dontAutoEvaluateFunctions", "cache", "evaluate", "extras", "evaluateLater", "theEvaluatorFunction", "normalEvaluator", "setEvaluator", "newEvaluator", "overriddenMagics", "dataStack", "generateEvaluatorFromFunction", "evaluator", "generateEvaluatorFromString", "func", "receiver", "params", "runIfTypeOfFunction", "evaluatorMemo", "generateFunctionFromString", "AsyncFunction", "rightSideSafeExpression", "completeScope", "promise", "prefixAsString", "prefix", "subject", "setPrefix", "newPrefix", "directiveHandlers", "directive", "directives", "attributes", "originalAttributeOverride", "vAttributes", "staticAttributes", "attributesOnly", "attribute", "attr", "transformedAttributeMap", "toTransformedAttributes", "newName", "oldName", "outNonAlpineAttributes", "toParsedDirectives", "byPriority", "directive2", "getDirectiveHandler", "isDeferringHandlers", "directiveHandlerStacks", "currentHandlerStackKey", "deferHandlingDirectives", "flushHandlers", "stopDeferring", "cleanups", "effect3", "cleanupEffect", "alpine_default", "noop", "handler3", "fullHandler", "startingWith", "replacement", "into", "newValue", "attributeTransformers", "transform", "mapAttributes", "alpineAttributeRegex", "typeMatch", "valueMatch", "modifiers", "original", "DEFAULT", "directiveOrder", "a", "b", "typeA", "typeB", "dispatch", "detail", "tickStack", "isHolding", "nextTick", "releaseNextTicks", "res", "holdNextTicks", "walk", "el2", "skip", "warn", "message", "start", "initTree", "destroyTree", "handle", "outNestedComponents", "closestRoot", "allSelectors", "rootSelectorCallbacks", "initSelectorCallbacks", "rootSelectors", "fn", "addRootSelector", "selectorCallback", "addInitSelector", "includeInitSelectors", "findClosest", "selector", "isRoot", "walker", "root", "setClasses", "setClassesFromString", "setClassesFromObject", "classString", "split", "classString2", "missingClasses", "addClassesAndReturnUndo", "classes", "classObject", "forAdd", "bool", "forRemove", "added", "removed", "setStyles", "setStylesFromObject", "setStylesFromString", "previousStyles", "value2", "kebabCase", "once", "fallback", "called", "evaluate2", "registerTransitionsFromClassString", "registerTransitionsFromHelper", "stage", "registerTransitionObject", "doesntSpecify", "transitioningIn", "transitioningOut", "wantsAll", "wantsOpacity", "wantsScale", "opacityValue", "scaleValue", "modifierValue", "delay", "origin", "durationIn", "durationOut", "easing", "setFunction", "defaultValue", "before", "after", "transition", "show", "hide", "nextTick2", "clickAwayCompatibleShow", "resolve", "reject", "closest", "closestHide", "hideAfterChildren", "parent", "during", "start2", "end", "undoStart", "undoDuring", "undoEnd", "performTransition", "stages", "interrupted", "reachedBefore", "reachedEnd", "finish", "duration", "rawValue", "match", "isCloning", "skipDuringClone", "clone", "oldEl", "newEl", "dontRegisterReactiveSideEffects", "cloneTree", "hasRunThroughFirstEl", "el3", "callback2", "storedEffect", "bind", "camelCase", "bindInputValue", "bindStyles", "bindClasses", "bindAttribute", "checkedAttrLooseCompare", "updateSelect", "attributeShouldntBePreservedIfFalsy", "isBooleanAttr", "setIfChanged", "attrName", "arrayWrappedValue", "option", "char", "valueA", "valueB", "getBinding", "debounce", "wait", "timeout", "context", "later", "throttle", "limit", "inThrottle", "plugin", "stores", "isReactive", "store", "getStores", "binds", "bind2", "bindings", "getBindings", "applyBindingsObject", "injectBindingProviders", "cleanupRunners", "datas", "data", "injectDataProviders", "Alpine", "makeMap", "str", "expectsLowerCase", "map", "list", "specialBooleanAttrs", "isBooleanAttr2", "makeMap", "EMPTY_OBJ", "EMPTY_ARR", "extend", "hasOwnProperty", "hasOwn", "val", "key", "isArray", "isMap", "toTypeString", "isString", "isSymbol", "isObject", "objectToString", "value", "toRawType", "isIntegerKey", "cacheStringFunction", "fn", "cache", "str", "camelizeRE", "camelize", "_", "c", "hyphenateRE", "hyphenate", "capitalize", "toHandlerKey", "hasChanged", "oldValue", "targetMap", "effectStack", "activeEffect", "ITERATE_KEY", "MAP_KEY_ITERATE_KEY", "isEffect", "effect2", "options", "effect3", "createReactiveEffect", "stop", "cleanup", "uid", "enableTracking", "resetTracking", "deps", "i", "shouldTrack", "trackStack", "pauseTracking", "last", "track", "target", "type", "depsMap", "dep", "trigger", "newValue", "oldTarget", "effects", "add2", "effectsToAdd", "key2", "run", "isNonTrackableKeys", "builtInSymbols", "get2", "createGetter", "shallowGet", "readonlyGet", "shallowReadonlyGet", "arrayInstrumentations", "method", "args", "arr", "toRaw", "l", "res", "isReadonly", "shallow", "receiver", "shallowReadonlyMap", "readonlyMap", "shallowReactiveMap", "reactiveMap", "targetIsArray", "isRef", "readonly", "reactive2", "set2", "createSetter", "shallowSet", "hadKey", "result", "deleteProperty", "has", "ownKeys", "mutableHandlers", "readonlyHandlers", "shallowReactiveHandlers", "shallowReadonlyHandlers", "toReactive", "toReadonly", "toShallow", "getProto", "v", "get$1", "isShallow", "rawTarget", "rawKey", "has2", "wrap", "has$1", "size", "add", "set$1", "get3", "checkIdentityKeys", "deleteEntry", "clear", "hadItems", "createForEach", "callback", "thisArg", "observed", "createIterableMethod", "targetIsMap", "isPair", "isKeyOnly", "innerIterator", "done", "createReadonlyMethod", "mutableInstrumentations", "shallowInstrumentations", "readonlyInstrumentations", "shallowReadonlyInstrumentations", "iteratorMethods", "createInstrumentationGetter", "instrumentations", "mutableCollectionHandlers", "shallowCollectionHandlers", "readonlyCollectionHandlers", "shallowReadonlyCollectionHandlers", "targetTypeMap", "rawType", "getTargetType", "createReactiveObject", "baseHandlers", "collectionHandlers", "proxyMap", "existingProxy", "targetType", "proxy", "r", "magic", "nextTick", "el", "dispatch", "evaluateLater2", "evaluate2", "firstTime", "effectReference", "getStores", "scope", "closestRoot", "mergeProxies", "getArrayOfRefObject", "refObjects", "currentEl", "globalIdMemo", "findAndIncrementId", "name", "closestIdRoot", "findClosest", "element", "setIdRoot", "root", "id", "warnMissingPluginMagic", "magicName", "slug", "warn", "directive", "expression", "func", "innerGet", "evaluateInnerSet", "innerSet", "initialValue", "outerGet", "outerSet", "cleanup2", "clone2", "eventName", "e", "addScopeToNode", "mutateDom", "initTree", "handler", "modifiers", "evaluateLater", "on", "event", "listenerTarget", "handler3", "wrapHandler", "callback2", "wrapper", "dotSyntax", "camelCase2", "next", "isKeyEvent", "isListeningForASpecificKeyThatHasntBeenPressed", "nextModifier", "wait", "isNumeric", "debounce", "throttle", "subject", "match", "char", "kebabCase2", "keyModifiers", "debounceIndex", "keyToModifiers", "selectedSystemKeyModifiers", "modifier", "modifierToKeyMap", "assignmentExpression", "evaluateAssignment", "assigmentFunction", "generateAssignmentFunction", "removeListener", "evaluateSetModel", "bind", "currentValue", "safeParseNumber", "el2", "checkedAttrLooseCompare2", "option", "rawValue", "number", "isNumeric2", "valueA", "valueB", "prefix", "addInitSelector", "skipDuringClone", "mapAttributes", "startingWith", "into", "original", "bindingProviders", "injectBindingProviders", "bindings", "applyBindingsObject", "storeKeyForXFor", "addRootSelector", "magicContext", "injectMagics", "dataProviderContext", "injectDataProviders", "data2", "evaluate", "reactiveData", "reactive", "initInterceptors", "undo", "hide", "show", "clickAwayCompatibleShow", "toggle", "once", "iteratorNames", "parseForExpression", "evaluateItems", "evaluateKey", "loop", "isObject2", "templateEl", "items", "isNumeric3", "lookup", "prevKeys", "scopes", "keys", "scope2", "getIterationScopeVariables", "value2", "adds", "moves", "removes", "sames", "lastKey", "prevIndex", "keyInSpot", "keyForSpot", "dequeueJob", "elInSpot", "elForSpot", "marker", "refreshScope", "lastKey2", "index", "lastEl", "forIteratorRE", "stripParensRE", "forAliasRE", "inMatch", "item", "iteratorMatch", "scopeVariables", "handler2", "walk", "node", "warnMissingPluginDirective", "directiveName2", "alpine_default", "normalEvaluator", "src_default", "module_default", "DomManager", "el", "insertee", "replacement", "appendee", "dom", "createElement", "html", "template", "textOrComment", "resolveStep", "logger", "morph", "from", "toHtml", "options", "fromEl", "toEl", "key", "lookahead", "updating", "updated", "removing", "removed", "adding", "added", "debug", "breakpoint", "message", "resolve", "assignOptions", "options2", "defaultGetKey", "noop", "patch", "from2", "to", "differentElementNamesTypesOrKeys", "result", "patchElement", "updateChildrenOnly", "shouldSkip", "initializeAlpineOnTo", "patchNodeValue", "patchAttributes", "patchChildren", "getKey", "toCloned", "value", "domAttributes", "toAttributes", "i", "name", "domChildren", "toChildren", "toKeyToNodeMap", "keyToMap", "domKeyDomNodeMap", "currentTo", "currentFrom", "domKeyHoldovers", "toKey", "domKey", "holdover", "added2", "addNodeTo", "nextToElementSibling", "found", "addNodeBefore", "domKeyNode", "currentFromNext", "removals", "domForRemoval", "els", "map", "theKey", "node", "parent", "clone", "beforeMe", "theLogger", "hook", "args", "skip", "childrenOnly", "src_default", "Alpine", "module_default", "module_default", "input", "inputTypes", "textarea", "updating", "el", "toEl", "childrenOnly", "skip", "mutate", "elements", "html", "element", "mutate_default", "perform", "method", "args", "receivers", "dispatch_default", "mutate_default", "r", "invoke", "payload", "id", "selector", "receiver", "context", "chain", "invoke_default", "invoke_default", "Meta", "value", "meta_default", "lifecycleEvents", "stateEvents", "allEvents", "dispatch", "name", "target", "detail", "raise", "event", "error", "head", "observable", "object", "parent", "proxy", "target", "key", "dispatch", "stateEvents", "meta_default", "value", "receiver", "index", "observable_default", "loadedState", "currentState", "changedState", "loadStateTimeout", "loadState", "meta_default", "loadStateLater", "json", "observable_default", "dispatch", "stateEvents", "event", "key", "value", "state_default", "replaceDocument", "content", "head", "tail", "headIndex", "tailIndex", "html", "append", "renderer_default", "active", "add", "payload", "remove", "id", "activity_default", "finish", "event", "dispatch", "lifecycleEvents", "activity_default", "lifecycle_default", "frameSources", "event", "frame", "fetchOptions", "meta_default", "acceptHeaders", "entry", "state_default", "chunk", "response", "error", "dispatch", "lifecycle_default", "content", "renderer_default", "schema", "schema_default", "events", "eventListener", "register", "eventName", "selectors", "getRegisteredEventNameForElement", "element", "selector", "el", "isRegisteredForElement", "delegates_default", "fn", "findClosestReflex", "element", "schema_default", "findClosestFrame", "assignElementValueToPayload", "payload", "memo", "option", "buildAttributePayload", "attr", "value", "elements_default", "invokeReflex", "form", "payload", "meta_default", "input", "form_default", "build", "urlString", "payload", "a", "url", "urls_default", "invokeReflex", "frame", "payload", "src", "urls_default", "frame_default", "invokeReflex", "element", "payload", "src", "urls_default", "method_default", "aborted", "event", "xhr", "dispatch", "lifecycle_default", "errored", "renderer_default", "error", "loaded", "content", "invokeReflex", "payload", "src", "urls_default", "meta_default", "state_default", "chunk", "ex", "message", "window_default", "src", "element", "frame", "find", "elements_default", "turboFrame", "turboMethod", "form_default", "method_default", "frame_default", "window_default", "drivers_default", "currentLevel", "logLevels", "allEvents", "name", "event", "logger_default", "value", "v4", "c", "uuids_default", "invokeReflex", "event", "element", "payload", "elements_default", "delegates_default", "driver", "drivers_default", "uuids_default", "activity_default", "dispatch", "lifecycle_default", "meta_default", "error", "schema_default", "logger_default", "allEvents", "state_default", "javascript_default", "ReflexElement", "c", "ToggleTargetElement", "ReflexElement", "template", "html", "appendHTML", "parent", "child", "addHighlight", "element", "options", "removeHighlight", "outline", "outlineOffset", "key", "value", "coordinates", "rect", "DevtoolElement", "event", "SupervisorElement", "event", "devtoolElement", "checked", "name", "el", "TooltipElement", "added", "dependencies", "exists", "dependency", "add", "src", "integrity", "script", "remove", "el", "removeAll", "dependencies_default", "DevtoolElement", "SupervisorElement", "TooltipElement", "supervisorElement", "makeDraggable", "stop", "stopped", "dependencies_default", "start", "started", "appendHTML", "restart", "enabledList", "el", "restartTimeout", "debouncedRestart", "autoRestart", "register", "name", "label", "enabled", "supervisor_default", "activeToggle", "supervisor_default", "appendTooltip", "title", "content", "options", "backgroundColor", "color", "position", "appendHTML", "ToggleDevtool", "trigger", "event", "name", "addHighlight", "removeHighlight", "renderingTooltip", "targetTooltip", "el", "data", "clearActiveToggle", "tooltip", "coords", "coordinates", "top", "left", "view", "index", "partial", "element", "ToggleTriggerElement", "ReflexElement", "mouseenter", "ToggleDevtool", "supervisor_default", "error", "reducer", "memo", "view", "id", "value", "event", "selector", "trigger", "ToggleTargetElement", "ToggleTriggerElement", "restart", "start", "stop", "supervisor_default", "devtools_default", "devtools_default"]
4
+ "sourcesContent": ["function dispatch (targets, name, options = {}) {\n const evt = new CustomEvent(name, options)\n targets.forEach(t => t.dispatchEvent(evt))\n}\n\nexport default dispatch\n", "// packages/alpinejs/src/scheduler.js\nvar flushPending = false;\nvar flushing = false;\nvar queue = [];\nfunction scheduler(callback) {\n queueJob(callback);\n}\nfunction queueJob(job) {\n if (!queue.includes(job))\n queue.push(job);\n queueFlush();\n}\nfunction dequeueJob(job) {\n let index = queue.indexOf(job);\n if (index !== -1)\n queue.splice(index, 1);\n}\nfunction queueFlush() {\n if (!flushing && !flushPending) {\n flushPending = true;\n queueMicrotask(flushJobs);\n }\n}\nfunction flushJobs() {\n flushPending = false;\n flushing = true;\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n flushing = false;\n}\n\n// packages/alpinejs/src/reactivity.js\nvar reactive;\nvar effect;\nvar release;\nvar raw;\nvar shouldSchedule = true;\nfunction disableEffectScheduling(callback) {\n shouldSchedule = false;\n callback();\n shouldSchedule = true;\n}\nfunction setReactivityEngine(engine) {\n reactive = engine.reactive;\n release = engine.release;\n effect = (callback) => engine.effect(callback, {scheduler: (task) => {\n if (shouldSchedule) {\n scheduler(task);\n } else {\n task();\n }\n }});\n raw = engine.raw;\n}\nfunction overrideEffect(override) {\n effect = override;\n}\nfunction elementBoundEffect(el) {\n let cleanup2 = () => {\n };\n let wrappedEffect = (callback) => {\n let effectReference = effect(callback);\n if (!el._x_effects) {\n el._x_effects = new Set();\n el._x_runEffects = () => {\n el._x_effects.forEach((i) => i());\n };\n }\n el._x_effects.add(effectReference);\n cleanup2 = () => {\n if (effectReference === void 0)\n return;\n el._x_effects.delete(effectReference);\n release(effectReference);\n };\n return effectReference;\n };\n return [wrappedEffect, () => {\n cleanup2();\n }];\n}\n\n// packages/alpinejs/src/mutation.js\nvar onAttributeAddeds = [];\nvar onElRemoveds = [];\nvar onElAddeds = [];\nfunction onElAdded(callback) {\n onElAddeds.push(callback);\n}\nfunction onElRemoved(el, callback) {\n if (typeof callback === \"function\") {\n if (!el._x_cleanups)\n el._x_cleanups = [];\n el._x_cleanups.push(callback);\n } else {\n callback = el;\n onElRemoveds.push(callback);\n }\n}\nfunction onAttributesAdded(callback) {\n onAttributeAddeds.push(callback);\n}\nfunction onAttributeRemoved(el, name, callback) {\n if (!el._x_attributeCleanups)\n el._x_attributeCleanups = {};\n if (!el._x_attributeCleanups[name])\n el._x_attributeCleanups[name] = [];\n el._x_attributeCleanups[name].push(callback);\n}\nfunction cleanupAttributes(el, names) {\n if (!el._x_attributeCleanups)\n return;\n Object.entries(el._x_attributeCleanups).forEach(([name, value]) => {\n if (names === void 0 || names.includes(name)) {\n value.forEach((i) => i());\n delete el._x_attributeCleanups[name];\n }\n });\n}\nvar observer = new MutationObserver(onMutate);\nvar currentlyObserving = false;\nfunction startObservingMutations() {\n observer.observe(document, {subtree: true, childList: true, attributes: true, attributeOldValue: true});\n currentlyObserving = true;\n}\nfunction stopObservingMutations() {\n flushObserver();\n observer.disconnect();\n currentlyObserving = false;\n}\nvar recordQueue = [];\nvar willProcessRecordQueue = false;\nfunction flushObserver() {\n recordQueue = recordQueue.concat(observer.takeRecords());\n if (recordQueue.length && !willProcessRecordQueue) {\n willProcessRecordQueue = true;\n queueMicrotask(() => {\n processRecordQueue();\n willProcessRecordQueue = false;\n });\n }\n}\nfunction processRecordQueue() {\n onMutate(recordQueue);\n recordQueue.length = 0;\n}\nfunction mutateDom(callback) {\n if (!currentlyObserving)\n return callback();\n stopObservingMutations();\n let result = callback();\n startObservingMutations();\n return result;\n}\nvar isCollecting = false;\nvar deferredMutations = [];\nfunction deferMutations() {\n isCollecting = true;\n}\nfunction flushAndStopDeferringMutations() {\n isCollecting = false;\n onMutate(deferredMutations);\n deferredMutations = [];\n}\nfunction onMutate(mutations) {\n if (isCollecting) {\n deferredMutations = deferredMutations.concat(mutations);\n return;\n }\n let addedNodes = [];\n let removedNodes = [];\n let addedAttributes = new Map();\n let removedAttributes = new Map();\n for (let i = 0; i < mutations.length; i++) {\n if (mutations[i].target._x_ignoreMutationObserver)\n continue;\n if (mutations[i].type === \"childList\") {\n mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node));\n mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node));\n }\n if (mutations[i].type === \"attributes\") {\n let el = mutations[i].target;\n let name = mutations[i].attributeName;\n let oldValue = mutations[i].oldValue;\n let add2 = () => {\n if (!addedAttributes.has(el))\n addedAttributes.set(el, []);\n addedAttributes.get(el).push({name, value: el.getAttribute(name)});\n };\n let remove = () => {\n if (!removedAttributes.has(el))\n removedAttributes.set(el, []);\n removedAttributes.get(el).push(name);\n };\n if (el.hasAttribute(name) && oldValue === null) {\n add2();\n } else if (el.hasAttribute(name)) {\n remove();\n add2();\n } else {\n remove();\n }\n }\n }\n removedAttributes.forEach((attrs, el) => {\n cleanupAttributes(el, attrs);\n });\n addedAttributes.forEach((attrs, el) => {\n onAttributeAddeds.forEach((i) => i(el, attrs));\n });\n for (let node of removedNodes) {\n if (addedNodes.includes(node))\n continue;\n onElRemoveds.forEach((i) => i(node));\n if (node._x_cleanups) {\n while (node._x_cleanups.length)\n node._x_cleanups.pop()();\n }\n }\n addedNodes.forEach((node) => {\n node._x_ignoreSelf = true;\n node._x_ignore = true;\n });\n for (let node of addedNodes) {\n if (removedNodes.includes(node))\n continue;\n if (!node.isConnected)\n continue;\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n onElAddeds.forEach((i) => i(node));\n node._x_ignore = true;\n node._x_ignoreSelf = true;\n }\n addedNodes.forEach((node) => {\n delete node._x_ignoreSelf;\n delete node._x_ignore;\n });\n addedNodes = null;\n removedNodes = null;\n addedAttributes = null;\n removedAttributes = null;\n}\n\n// packages/alpinejs/src/scope.js\nfunction scope(node) {\n return mergeProxies(closestDataStack(node));\n}\nfunction addScopeToNode(node, data2, referenceNode) {\n node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)];\n return () => {\n node._x_dataStack = node._x_dataStack.filter((i) => i !== data2);\n };\n}\nfunction refreshScope(element, scope2) {\n let existingScope = element._x_dataStack[0];\n Object.entries(scope2).forEach(([key, value]) => {\n existingScope[key] = value;\n });\n}\nfunction closestDataStack(node) {\n if (node._x_dataStack)\n return node._x_dataStack;\n if (typeof ShadowRoot === \"function\" && node instanceof ShadowRoot) {\n return closestDataStack(node.host);\n }\n if (!node.parentNode) {\n return [];\n }\n return closestDataStack(node.parentNode);\n}\nfunction mergeProxies(objects) {\n let thisProxy = new Proxy({}, {\n ownKeys: () => {\n return Array.from(new Set(objects.flatMap((i) => Object.keys(i))));\n },\n has: (target, name) => {\n return objects.some((obj) => obj.hasOwnProperty(name));\n },\n get: (target, name) => {\n return (objects.find((obj) => {\n if (obj.hasOwnProperty(name)) {\n let descriptor = Object.getOwnPropertyDescriptor(obj, name);\n if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) {\n return true;\n }\n if ((descriptor.get || descriptor.set) && descriptor.enumerable) {\n let getter = descriptor.get;\n let setter = descriptor.set;\n let property = descriptor;\n getter = getter && getter.bind(thisProxy);\n setter = setter && setter.bind(thisProxy);\n if (getter)\n getter._x_alreadyBound = true;\n if (setter)\n setter._x_alreadyBound = true;\n Object.defineProperty(obj, name, {\n ...property,\n get: getter,\n set: setter\n });\n }\n return true;\n }\n return false;\n }) || {})[name];\n },\n set: (target, name, value) => {\n let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name));\n if (closestObjectWithKey) {\n closestObjectWithKey[name] = value;\n } else {\n objects[objects.length - 1][name] = value;\n }\n return true;\n }\n });\n return thisProxy;\n}\n\n// packages/alpinejs/src/interceptor.js\nfunction initInterceptors(data2) {\n let isObject2 = (val) => typeof val === \"object\" && !Array.isArray(val) && val !== null;\n let recurse = (obj, basePath = \"\") => {\n Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, {value, enumerable}]) => {\n if (enumerable === false || value === void 0)\n return;\n let path = basePath === \"\" ? key : `${basePath}.${key}`;\n if (typeof value === \"object\" && value !== null && value._x_interceptor) {\n obj[key] = value.initialize(data2, path, key);\n } else {\n if (isObject2(value) && value !== obj && !(value instanceof Element)) {\n recurse(value, path);\n }\n }\n });\n };\n return recurse(data2);\n}\nfunction interceptor(callback, mutateObj = () => {\n}) {\n let obj = {\n initialValue: void 0,\n _x_interceptor: true,\n initialize(data2, path, key) {\n return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key);\n }\n };\n mutateObj(obj);\n return (initialValue) => {\n if (typeof initialValue === \"object\" && initialValue !== null && initialValue._x_interceptor) {\n let initialize = obj.initialize.bind(obj);\n obj.initialize = (data2, path, key) => {\n let innerValue = initialValue.initialize(data2, path, key);\n obj.initialValue = innerValue;\n return initialize(data2, path, key);\n };\n } else {\n obj.initialValue = initialValue;\n }\n return obj;\n };\n}\nfunction get(obj, path) {\n return path.split(\".\").reduce((carry, segment) => carry[segment], obj);\n}\nfunction set(obj, path, value) {\n if (typeof path === \"string\")\n path = path.split(\".\");\n if (path.length === 1)\n obj[path[0]] = value;\n else if (path.length === 0)\n throw error;\n else {\n if (obj[path[0]])\n return set(obj[path[0]], path.slice(1), value);\n else {\n obj[path[0]] = {};\n return set(obj[path[0]], path.slice(1), value);\n }\n }\n}\n\n// packages/alpinejs/src/magics.js\nvar magics = {};\nfunction magic(name, callback) {\n magics[name] = callback;\n}\nfunction injectMagics(obj, el) {\n Object.entries(magics).forEach(([name, callback]) => {\n Object.defineProperty(obj, `$${name}`, {\n get() {\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n utilities = {interceptor, ...utilities};\n onElRemoved(el, cleanup2);\n return callback(el, utilities);\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/utils/error.js\nfunction tryCatch(el, expression, callback, ...args) {\n try {\n return callback(...args);\n } catch (e) {\n handleError(e, el, expression);\n }\n}\nfunction handleError(error2, el, expression = void 0) {\n Object.assign(error2, {el, expression});\n console.warn(`Alpine Expression Error: ${error2.message}\n\n${expression ? 'Expression: \"' + expression + '\"\\n\\n' : \"\"}`, el);\n setTimeout(() => {\n throw error2;\n }, 0);\n}\n\n// packages/alpinejs/src/evaluator.js\nvar shouldAutoEvaluateFunctions = true;\nfunction dontAutoEvaluateFunctions(callback) {\n let cache = shouldAutoEvaluateFunctions;\n shouldAutoEvaluateFunctions = false;\n callback();\n shouldAutoEvaluateFunctions = cache;\n}\nfunction evaluate(el, expression, extras = {}) {\n let result;\n evaluateLater(el, expression)((value) => result = value, extras);\n return result;\n}\nfunction evaluateLater(...args) {\n return theEvaluatorFunction(...args);\n}\nvar theEvaluatorFunction = normalEvaluator;\nfunction setEvaluator(newEvaluator) {\n theEvaluatorFunction = newEvaluator;\n}\nfunction normalEvaluator(el, expression) {\n let overriddenMagics = {};\n injectMagics(overriddenMagics, el);\n let dataStack = [overriddenMagics, ...closestDataStack(el)];\n if (typeof expression === \"function\") {\n return generateEvaluatorFromFunction(dataStack, expression);\n }\n let evaluator = generateEvaluatorFromString(dataStack, expression, el);\n return tryCatch.bind(null, el, expression, evaluator);\n}\nfunction generateEvaluatorFromFunction(dataStack, func) {\n return (receiver = () => {\n }, {scope: scope2 = {}, params = []} = {}) => {\n let result = func.apply(mergeProxies([scope2, ...dataStack]), params);\n runIfTypeOfFunction(receiver, result);\n };\n}\nvar evaluatorMemo = {};\nfunction generateFunctionFromString(expression, el) {\n if (evaluatorMemo[expression]) {\n return evaluatorMemo[expression];\n }\n let AsyncFunction = Object.getPrototypeOf(async function() {\n }).constructor;\n let rightSideSafeExpression = /^[\\n\\s]*if.*\\(.*\\)/.test(expression) || /^(let|const)\\s/.test(expression) ? `(() => { ${expression} })()` : expression;\n const safeAsyncFunction = () => {\n try {\n return new AsyncFunction([\"__self\", \"scope\"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`);\n } catch (error2) {\n handleError(error2, el, expression);\n return Promise.resolve();\n }\n };\n let func = safeAsyncFunction();\n evaluatorMemo[expression] = func;\n return func;\n}\nfunction generateEvaluatorFromString(dataStack, expression, el) {\n let func = generateFunctionFromString(expression, el);\n return (receiver = () => {\n }, {scope: scope2 = {}, params = []} = {}) => {\n func.result = void 0;\n func.finished = false;\n let completeScope = mergeProxies([scope2, ...dataStack]);\n if (typeof func === \"function\") {\n let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression));\n if (func.finished) {\n runIfTypeOfFunction(receiver, func.result, completeScope, params, el);\n func.result = void 0;\n } else {\n promise.then((result) => {\n runIfTypeOfFunction(receiver, result, completeScope, params, el);\n }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0);\n }\n }\n };\n}\nfunction runIfTypeOfFunction(receiver, value, scope2, params, el) {\n if (shouldAutoEvaluateFunctions && typeof value === \"function\") {\n let result = value.apply(scope2, params);\n if (result instanceof Promise) {\n result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value));\n } else {\n receiver(result);\n }\n } else {\n receiver(value);\n }\n}\n\n// packages/alpinejs/src/directives.js\nvar prefixAsString = \"x-\";\nfunction prefix(subject = \"\") {\n return prefixAsString + subject;\n}\nfunction setPrefix(newPrefix) {\n prefixAsString = newPrefix;\n}\nvar directiveHandlers = {};\nfunction directive(name, callback) {\n directiveHandlers[name] = callback;\n}\nfunction directives(el, attributes, originalAttributeOverride) {\n attributes = Array.from(attributes);\n if (el._x_virtualDirectives) {\n let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({name, value}));\n let staticAttributes = attributesOnly(vAttributes);\n vAttributes = vAttributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n attributes = attributes.concat(vAttributes);\n }\n let transformedAttributeMap = {};\n let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority);\n return directives2.map((directive2) => {\n return getDirectiveHandler(el, directive2);\n });\n}\nfunction attributesOnly(attributes) {\n return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));\n}\nvar isDeferringHandlers = false;\nvar directiveHandlerStacks = new Map();\nvar currentHandlerStackKey = Symbol();\nfunction deferHandlingDirectives(callback) {\n isDeferringHandlers = true;\n let key = Symbol();\n currentHandlerStackKey = key;\n directiveHandlerStacks.set(key, []);\n let flushHandlers = () => {\n while (directiveHandlerStacks.get(key).length)\n directiveHandlerStacks.get(key).shift()();\n directiveHandlerStacks.delete(key);\n };\n let stopDeferring = () => {\n isDeferringHandlers = false;\n flushHandlers();\n };\n callback(flushHandlers);\n stopDeferring();\n}\nfunction getElementBoundUtilities(el) {\n let cleanups = [];\n let cleanup2 = (callback) => cleanups.push(callback);\n let [effect3, cleanupEffect] = elementBoundEffect(el);\n cleanups.push(cleanupEffect);\n let utilities = {\n Alpine: alpine_default,\n effect: effect3,\n cleanup: cleanup2,\n evaluateLater: evaluateLater.bind(evaluateLater, el),\n evaluate: evaluate.bind(evaluate, el)\n };\n let doCleanup = () => cleanups.forEach((i) => i());\n return [utilities, doCleanup];\n}\nfunction getDirectiveHandler(el, directive2) {\n let noop = () => {\n };\n let handler3 = directiveHandlers[directive2.type] || noop;\n let [utilities, cleanup2] = getElementBoundUtilities(el);\n onAttributeRemoved(el, directive2.original, cleanup2);\n let fullHandler = () => {\n if (el._x_ignore || el._x_ignoreSelf)\n return;\n handler3.inline && handler3.inline(el, directive2, utilities);\n handler3 = handler3.bind(handler3, el, directive2, utilities);\n isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3();\n };\n fullHandler.runCleanups = cleanup2;\n return fullHandler;\n}\nvar startingWith = (subject, replacement) => ({name, value}) => {\n if (name.startsWith(subject))\n name = name.replace(subject, replacement);\n return {name, value};\n};\nvar into = (i) => i;\nfunction toTransformedAttributes(callback = () => {\n}) {\n return ({name, value}) => {\n let {name: newName, value: newValue} = attributeTransformers.reduce((carry, transform) => {\n return transform(carry);\n }, {name, value});\n if (newName !== name)\n callback(newName, name);\n return {name: newName, value: newValue};\n };\n}\nvar attributeTransformers = [];\nfunction mapAttributes(callback) {\n attributeTransformers.push(callback);\n}\nfunction outNonAlpineAttributes({name}) {\n return alpineAttributeRegex().test(name);\n}\nvar alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\\\b`);\nfunction toParsedDirectives(transformedAttributeMap, originalAttributeOverride) {\n return ({name, value}) => {\n let typeMatch = name.match(alpineAttributeRegex());\n let valueMatch = name.match(/:([a-zA-Z0-9\\-:]+)/);\n let modifiers = name.match(/\\.[^.\\]]+(?=[^\\]]*$)/g) || [];\n let original = originalAttributeOverride || transformedAttributeMap[name] || name;\n return {\n type: typeMatch ? typeMatch[1] : null,\n value: valueMatch ? valueMatch[1] : null,\n modifiers: modifiers.map((i) => i.replace(\".\", \"\")),\n expression: value,\n original\n };\n };\n}\nvar DEFAULT = \"DEFAULT\";\nvar directiveOrder = [\n \"ignore\",\n \"ref\",\n \"data\",\n \"id\",\n \"radio\",\n \"tabs\",\n \"switch\",\n \"disclosure\",\n \"menu\",\n \"listbox\",\n \"list\",\n \"item\",\n \"combobox\",\n \"bind\",\n \"init\",\n \"for\",\n \"mask\",\n \"model\",\n \"modelable\",\n \"transition\",\n \"show\",\n \"if\",\n DEFAULT,\n \"teleport\"\n];\nfunction byPriority(a, b) {\n let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type;\n let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type;\n return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB);\n}\n\n// packages/alpinejs/src/utils/dispatch.js\nfunction dispatch(el, name, detail = {}) {\n el.dispatchEvent(new CustomEvent(name, {\n detail,\n bubbles: true,\n composed: true,\n cancelable: true\n }));\n}\n\n// packages/alpinejs/src/nextTick.js\nvar tickStack = [];\nvar isHolding = false;\nfunction nextTick(callback = () => {\n}) {\n queueMicrotask(() => {\n isHolding || setTimeout(() => {\n releaseNextTicks();\n });\n });\n return new Promise((res) => {\n tickStack.push(() => {\n callback();\n res();\n });\n });\n}\nfunction releaseNextTicks() {\n isHolding = false;\n while (tickStack.length)\n tickStack.shift()();\n}\nfunction holdNextTicks() {\n isHolding = true;\n}\n\n// packages/alpinejs/src/utils/walk.js\nfunction walk(el, callback) {\n if (typeof ShadowRoot === \"function\" && el instanceof ShadowRoot) {\n Array.from(el.children).forEach((el2) => walk(el2, callback));\n return;\n }\n let skip = false;\n callback(el, () => skip = true);\n if (skip)\n return;\n let node = el.firstElementChild;\n while (node) {\n walk(node, callback, false);\n node = node.nextElementSibling;\n }\n}\n\n// packages/alpinejs/src/utils/warn.js\nfunction warn(message, ...args) {\n console.warn(`Alpine Warning: ${message}`, ...args);\n}\n\n// packages/alpinejs/src/lifecycle.js\nfunction start() {\n if (!document.body)\n warn(\"Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?\");\n dispatch(document, \"alpine:init\");\n dispatch(document, \"alpine:initializing\");\n startObservingMutations();\n onElAdded((el) => initTree(el, walk));\n onElRemoved((el) => destroyTree(el));\n onAttributesAdded((el, attrs) => {\n directives(el, attrs).forEach((handle) => handle());\n });\n let outNestedComponents = (el) => !closestRoot(el.parentElement, true);\n Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {\n initTree(el);\n });\n dispatch(document, \"alpine:initialized\");\n}\nvar rootSelectorCallbacks = [];\nvar initSelectorCallbacks = [];\nfunction rootSelectors() {\n return rootSelectorCallbacks.map((fn) => fn());\n}\nfunction allSelectors() {\n return rootSelectorCallbacks.concat(initSelectorCallbacks).map((fn) => fn());\n}\nfunction addRootSelector(selectorCallback) {\n rootSelectorCallbacks.push(selectorCallback);\n}\nfunction addInitSelector(selectorCallback) {\n initSelectorCallbacks.push(selectorCallback);\n}\nfunction closestRoot(el, includeInitSelectors = false) {\n return findClosest(el, (element) => {\n const selectors = includeInitSelectors ? allSelectors() : rootSelectors();\n if (selectors.some((selector) => element.matches(selector)))\n return true;\n });\n}\nfunction findClosest(el, callback) {\n if (!el)\n return;\n if (callback(el))\n return el;\n if (el._x_teleportBack)\n el = el._x_teleportBack;\n if (!el.parentElement)\n return;\n return findClosest(el.parentElement, callback);\n}\nfunction isRoot(el) {\n return rootSelectors().some((selector) => el.matches(selector));\n}\nfunction initTree(el, walker = walk) {\n deferHandlingDirectives(() => {\n walker(el, (el2, skip) => {\n directives(el2, el2.attributes).forEach((handle) => handle());\n el2._x_ignore && skip();\n });\n });\n}\nfunction destroyTree(root) {\n walk(root, (el) => cleanupAttributes(el));\n}\n\n// packages/alpinejs/src/utils/classes.js\nfunction setClasses(el, value) {\n if (Array.isArray(value)) {\n return setClassesFromString(el, value.join(\" \"));\n } else if (typeof value === \"object\" && value !== null) {\n return setClassesFromObject(el, value);\n } else if (typeof value === \"function\") {\n return setClasses(el, value());\n }\n return setClassesFromString(el, value);\n}\nfunction setClassesFromString(el, classString) {\n let split = (classString2) => classString2.split(\" \").filter(Boolean);\n let missingClasses = (classString2) => classString2.split(\" \").filter((i) => !el.classList.contains(i)).filter(Boolean);\n let addClassesAndReturnUndo = (classes) => {\n el.classList.add(...classes);\n return () => {\n el.classList.remove(...classes);\n };\n };\n classString = classString === true ? classString = \"\" : classString || \"\";\n return addClassesAndReturnUndo(missingClasses(classString));\n}\nfunction setClassesFromObject(el, classObject) {\n let split = (classString) => classString.split(\" \").filter(Boolean);\n let forAdd = Object.entries(classObject).flatMap(([classString, bool]) => bool ? split(classString) : false).filter(Boolean);\n let forRemove = Object.entries(classObject).flatMap(([classString, bool]) => !bool ? split(classString) : false).filter(Boolean);\n let added = [];\n let removed = [];\n forRemove.forEach((i) => {\n if (el.classList.contains(i)) {\n el.classList.remove(i);\n removed.push(i);\n }\n });\n forAdd.forEach((i) => {\n if (!el.classList.contains(i)) {\n el.classList.add(i);\n added.push(i);\n }\n });\n return () => {\n removed.forEach((i) => el.classList.add(i));\n added.forEach((i) => el.classList.remove(i));\n };\n}\n\n// packages/alpinejs/src/utils/styles.js\nfunction setStyles(el, value) {\n if (typeof value === \"object\" && value !== null) {\n return setStylesFromObject(el, value);\n }\n return setStylesFromString(el, value);\n}\nfunction setStylesFromObject(el, value) {\n let previousStyles = {};\n Object.entries(value).forEach(([key, value2]) => {\n previousStyles[key] = el.style[key];\n if (!key.startsWith(\"--\")) {\n key = kebabCase(key);\n }\n el.style.setProperty(key, value2);\n });\n setTimeout(() => {\n if (el.style.length === 0) {\n el.removeAttribute(\"style\");\n }\n });\n return () => {\n setStyles(el, previousStyles);\n };\n}\nfunction setStylesFromString(el, value) {\n let cache = el.getAttribute(\"style\", value);\n el.setAttribute(\"style\", value);\n return () => {\n el.setAttribute(\"style\", cache || \"\");\n };\n}\nfunction kebabCase(subject) {\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n// packages/alpinejs/src/utils/once.js\nfunction once(callback, fallback = () => {\n}) {\n let called = false;\n return function() {\n if (!called) {\n called = true;\n callback.apply(this, arguments);\n } else {\n fallback.apply(this, arguments);\n }\n };\n}\n\n// packages/alpinejs/src/directives/x-transition.js\ndirective(\"transition\", (el, {value, modifiers, expression}, {evaluate: evaluate2}) => {\n if (typeof expression === \"function\")\n expression = evaluate2(expression);\n if (!expression) {\n registerTransitionsFromHelper(el, modifiers, value);\n } else {\n registerTransitionsFromClassString(el, expression, value);\n }\n});\nfunction registerTransitionsFromClassString(el, classString, stage) {\n registerTransitionObject(el, setClasses, \"\");\n let directiveStorageMap = {\n enter: (classes) => {\n el._x_transition.enter.during = classes;\n },\n \"enter-start\": (classes) => {\n el._x_transition.enter.start = classes;\n },\n \"enter-end\": (classes) => {\n el._x_transition.enter.end = classes;\n },\n leave: (classes) => {\n el._x_transition.leave.during = classes;\n },\n \"leave-start\": (classes) => {\n el._x_transition.leave.start = classes;\n },\n \"leave-end\": (classes) => {\n el._x_transition.leave.end = classes;\n }\n };\n directiveStorageMap[stage](classString);\n}\nfunction registerTransitionsFromHelper(el, modifiers, stage) {\n registerTransitionObject(el, setStyles);\n let doesntSpecify = !modifiers.includes(\"in\") && !modifiers.includes(\"out\") && !stage;\n let transitioningIn = doesntSpecify || modifiers.includes(\"in\") || [\"enter\"].includes(stage);\n let transitioningOut = doesntSpecify || modifiers.includes(\"out\") || [\"leave\"].includes(stage);\n if (modifiers.includes(\"in\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index < modifiers.indexOf(\"out\"));\n }\n if (modifiers.includes(\"out\") && !doesntSpecify) {\n modifiers = modifiers.filter((i, index) => index > modifiers.indexOf(\"out\"));\n }\n let wantsAll = !modifiers.includes(\"opacity\") && !modifiers.includes(\"scale\");\n let wantsOpacity = wantsAll || modifiers.includes(\"opacity\");\n let wantsScale = wantsAll || modifiers.includes(\"scale\");\n let opacityValue = wantsOpacity ? 0 : 1;\n let scaleValue = wantsScale ? modifierValue(modifiers, \"scale\", 95) / 100 : 1;\n let delay = modifierValue(modifiers, \"delay\", 0);\n let origin = modifierValue(modifiers, \"origin\", \"center\");\n let property = \"opacity, transform\";\n let durationIn = modifierValue(modifiers, \"duration\", 150) / 1e3;\n let durationOut = modifierValue(modifiers, \"duration\", 75) / 1e3;\n let easing = `cubic-bezier(0.4, 0.0, 0.2, 1)`;\n if (transitioningIn) {\n el._x_transition.enter.during = {\n transformOrigin: origin,\n transitionDelay: delay,\n transitionProperty: property,\n transitionDuration: `${durationIn}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.enter.start = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n el._x_transition.enter.end = {\n opacity: 1,\n transform: `scale(1)`\n };\n }\n if (transitioningOut) {\n el._x_transition.leave.during = {\n transformOrigin: origin,\n transitionDelay: delay,\n transitionProperty: property,\n transitionDuration: `${durationOut}s`,\n transitionTimingFunction: easing\n };\n el._x_transition.leave.start = {\n opacity: 1,\n transform: `scale(1)`\n };\n el._x_transition.leave.end = {\n opacity: opacityValue,\n transform: `scale(${scaleValue})`\n };\n }\n}\nfunction registerTransitionObject(el, setFunction, defaultValue = {}) {\n if (!el._x_transition)\n el._x_transition = {\n enter: {during: defaultValue, start: defaultValue, end: defaultValue},\n leave: {during: defaultValue, start: defaultValue, end: defaultValue},\n in(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.enter.during,\n start: this.enter.start,\n end: this.enter.end\n }, before, after);\n },\n out(before = () => {\n }, after = () => {\n }) {\n transition(el, setFunction, {\n during: this.leave.during,\n start: this.leave.start,\n end: this.leave.end\n }, before, after);\n }\n };\n}\nwindow.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {\n const nextTick2 = document.visibilityState === \"visible\" ? requestAnimationFrame : setTimeout;\n let clickAwayCompatibleShow = () => nextTick2(show);\n if (value) {\n if (el._x_transition && (el._x_transition.enter || el._x_transition.leave)) {\n el._x_transition.enter && (Object.entries(el._x_transition.enter.during).length || Object.entries(el._x_transition.enter.start).length || Object.entries(el._x_transition.enter.end).length) ? el._x_transition.in(show) : clickAwayCompatibleShow();\n } else {\n el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();\n }\n return;\n }\n el._x_hidePromise = el._x_transition ? new Promise((resolve, reject) => {\n el._x_transition.out(() => {\n }, () => resolve(hide));\n el._x_transitioning.beforeCancel(() => reject({isFromCancelledTransition: true}));\n }) : Promise.resolve(hide);\n queueMicrotask(() => {\n let closest = closestHide(el);\n if (closest) {\n if (!closest._x_hideChildren)\n closest._x_hideChildren = [];\n closest._x_hideChildren.push(el);\n } else {\n nextTick2(() => {\n let hideAfterChildren = (el2) => {\n let carry = Promise.all([\n el2._x_hidePromise,\n ...(el2._x_hideChildren || []).map(hideAfterChildren)\n ]).then(([i]) => i());\n delete el2._x_hidePromise;\n delete el2._x_hideChildren;\n return carry;\n };\n hideAfterChildren(el).catch((e) => {\n if (!e.isFromCancelledTransition)\n throw e;\n });\n });\n }\n });\n};\nfunction closestHide(el) {\n let parent = el.parentNode;\n if (!parent)\n return;\n return parent._x_hidePromise ? parent : closestHide(parent);\n}\nfunction transition(el, setFunction, {during, start: start2, end} = {}, before = () => {\n}, after = () => {\n}) {\n if (el._x_transitioning)\n el._x_transitioning.cancel();\n if (Object.keys(during).length === 0 && Object.keys(start2).length === 0 && Object.keys(end).length === 0) {\n before();\n after();\n return;\n }\n let undoStart, undoDuring, undoEnd;\n performTransition(el, {\n start() {\n undoStart = setFunction(el, start2);\n },\n during() {\n undoDuring = setFunction(el, during);\n },\n before,\n end() {\n undoStart();\n undoEnd = setFunction(el, end);\n },\n after,\n cleanup() {\n undoDuring();\n undoEnd();\n }\n });\n}\nfunction performTransition(el, stages) {\n let interrupted, reachedBefore, reachedEnd;\n let finish = once(() => {\n mutateDom(() => {\n interrupted = true;\n if (!reachedBefore)\n stages.before();\n if (!reachedEnd) {\n stages.end();\n releaseNextTicks();\n }\n stages.after();\n if (el.isConnected)\n stages.cleanup();\n delete el._x_transitioning;\n });\n });\n el._x_transitioning = {\n beforeCancels: [],\n beforeCancel(callback) {\n this.beforeCancels.push(callback);\n },\n cancel: once(function() {\n while (this.beforeCancels.length) {\n this.beforeCancels.shift()();\n }\n ;\n finish();\n }),\n finish\n };\n mutateDom(() => {\n stages.start();\n stages.during();\n });\n holdNextTicks();\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n let duration = Number(getComputedStyle(el).transitionDuration.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n let delay = Number(getComputedStyle(el).transitionDelay.replace(/,.*/, \"\").replace(\"s\", \"\")) * 1e3;\n if (duration === 0)\n duration = Number(getComputedStyle(el).animationDuration.replace(\"s\", \"\")) * 1e3;\n mutateDom(() => {\n stages.before();\n });\n reachedBefore = true;\n requestAnimationFrame(() => {\n if (interrupted)\n return;\n mutateDom(() => {\n stages.end();\n });\n releaseNextTicks();\n setTimeout(el._x_transitioning.finish, duration + delay);\n reachedEnd = true;\n });\n });\n}\nfunction modifierValue(modifiers, key, fallback) {\n if (modifiers.indexOf(key) === -1)\n return fallback;\n const rawValue = modifiers[modifiers.indexOf(key) + 1];\n if (!rawValue)\n return fallback;\n if (key === \"scale\") {\n if (isNaN(rawValue))\n return fallback;\n }\n if (key === \"duration\") {\n let match = rawValue.match(/([0-9]+)ms/);\n if (match)\n return match[1];\n }\n if (key === \"origin\") {\n if ([\"top\", \"right\", \"left\", \"center\", \"bottom\"].includes(modifiers[modifiers.indexOf(key) + 2])) {\n return [rawValue, modifiers[modifiers.indexOf(key) + 2]].join(\" \");\n }\n }\n return rawValue;\n}\n\n// packages/alpinejs/src/clone.js\nvar isCloning = false;\nfunction skipDuringClone(callback, fallback = () => {\n}) {\n return (...args) => isCloning ? fallback(...args) : callback(...args);\n}\nfunction clone(oldEl, newEl) {\n if (!newEl._x_dataStack)\n newEl._x_dataStack = oldEl._x_dataStack;\n isCloning = true;\n dontRegisterReactiveSideEffects(() => {\n cloneTree(newEl);\n });\n isCloning = false;\n}\nfunction cloneTree(el) {\n let hasRunThroughFirstEl = false;\n let shallowWalker = (el2, callback) => {\n walk(el2, (el3, skip) => {\n if (hasRunThroughFirstEl && isRoot(el3))\n return skip();\n hasRunThroughFirstEl = true;\n callback(el3, skip);\n });\n };\n initTree(el, shallowWalker);\n}\nfunction dontRegisterReactiveSideEffects(callback) {\n let cache = effect;\n overrideEffect((callback2, el) => {\n let storedEffect = cache(callback2);\n release(storedEffect);\n return () => {\n };\n });\n callback();\n overrideEffect(cache);\n}\n\n// packages/alpinejs/src/utils/bind.js\nfunction bind(el, name, value, modifiers = []) {\n if (!el._x_bindings)\n el._x_bindings = reactive({});\n el._x_bindings[name] = value;\n name = modifiers.includes(\"camel\") ? camelCase(name) : name;\n switch (name) {\n case \"value\":\n bindInputValue(el, value);\n break;\n case \"style\":\n bindStyles(el, value);\n break;\n case \"class\":\n bindClasses(el, value);\n break;\n default:\n bindAttribute(el, name, value);\n break;\n }\n}\nfunction bindInputValue(el, value) {\n if (el.type === \"radio\") {\n if (el.attributes.value === void 0) {\n el.value = value;\n }\n if (window.fromModel) {\n el.checked = checkedAttrLooseCompare(el.value, value);\n }\n } else if (el.type === \"checkbox\") {\n if (Number.isInteger(value)) {\n el.value = value;\n } else if (!Number.isInteger(value) && !Array.isArray(value) && typeof value !== \"boolean\" && ![null, void 0].includes(value)) {\n el.value = String(value);\n } else {\n if (Array.isArray(value)) {\n el.checked = value.some((val) => checkedAttrLooseCompare(val, el.value));\n } else {\n el.checked = !!value;\n }\n }\n } else if (el.tagName === \"SELECT\") {\n updateSelect(el, value);\n } else {\n if (el.value === value)\n return;\n el.value = value;\n }\n}\nfunction bindClasses(el, value) {\n if (el._x_undoAddedClasses)\n el._x_undoAddedClasses();\n el._x_undoAddedClasses = setClasses(el, value);\n}\nfunction bindStyles(el, value) {\n if (el._x_undoAddedStyles)\n el._x_undoAddedStyles();\n el._x_undoAddedStyles = setStyles(el, value);\n}\nfunction bindAttribute(el, name, value) {\n if ([null, void 0, false].includes(value) && attributeShouldntBePreservedIfFalsy(name)) {\n el.removeAttribute(name);\n } else {\n if (isBooleanAttr(name))\n value = name;\n setIfChanged(el, name, value);\n }\n}\nfunction setIfChanged(el, attrName, value) {\n if (el.getAttribute(attrName) != value) {\n el.setAttribute(attrName, value);\n }\n}\nfunction updateSelect(el, value) {\n const arrayWrappedValue = [].concat(value).map((value2) => {\n return value2 + \"\";\n });\n Array.from(el.options).forEach((option) => {\n option.selected = arrayWrappedValue.includes(option.value);\n });\n}\nfunction camelCase(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction checkedAttrLooseCompare(valueA, valueB) {\n return valueA == valueB;\n}\nfunction isBooleanAttr(attrName) {\n const booleanAttributes = [\n \"disabled\",\n \"checked\",\n \"required\",\n \"readonly\",\n \"hidden\",\n \"open\",\n \"selected\",\n \"autofocus\",\n \"itemscope\",\n \"multiple\",\n \"novalidate\",\n \"allowfullscreen\",\n \"allowpaymentrequest\",\n \"formnovalidate\",\n \"autoplay\",\n \"controls\",\n \"loop\",\n \"muted\",\n \"playsinline\",\n \"default\",\n \"ismap\",\n \"reversed\",\n \"async\",\n \"defer\",\n \"nomodule\"\n ];\n return booleanAttributes.includes(attrName);\n}\nfunction attributeShouldntBePreservedIfFalsy(name) {\n return ![\"aria-pressed\", \"aria-checked\", \"aria-expanded\", \"aria-selected\"].includes(name);\n}\nfunction getBinding(el, name, fallback) {\n if (el._x_bindings && el._x_bindings[name] !== void 0)\n return el._x_bindings[name];\n let attr = el.getAttribute(name);\n if (attr === null)\n return typeof fallback === \"function\" ? fallback() : fallback;\n if (attr === \"\")\n return true;\n if (isBooleanAttr(name)) {\n return !![name, \"true\"].includes(attr);\n }\n return attr;\n}\n\n// packages/alpinejs/src/utils/debounce.js\nfunction debounce(func, wait) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n\n// packages/alpinejs/src/utils/throttle.js\nfunction throttle(func, limit) {\n let inThrottle;\n return function() {\n let context = this, args = arguments;\n if (!inThrottle) {\n func.apply(context, args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n };\n}\n\n// packages/alpinejs/src/plugin.js\nfunction plugin(callback) {\n callback(alpine_default);\n}\n\n// packages/alpinejs/src/store.js\nvar stores = {};\nvar isReactive = false;\nfunction store(name, value) {\n if (!isReactive) {\n stores = reactive(stores);\n isReactive = true;\n }\n if (value === void 0) {\n return stores[name];\n }\n stores[name] = value;\n if (typeof value === \"object\" && value !== null && value.hasOwnProperty(\"init\") && typeof value.init === \"function\") {\n stores[name].init();\n }\n initInterceptors(stores[name]);\n}\nfunction getStores() {\n return stores;\n}\n\n// packages/alpinejs/src/binds.js\nvar binds = {};\nfunction bind2(name, bindings) {\n let getBindings = typeof bindings !== \"function\" ? () => bindings : bindings;\n if (name instanceof Element) {\n applyBindingsObject(name, getBindings());\n } else {\n binds[name] = getBindings;\n }\n}\nfunction injectBindingProviders(obj) {\n Object.entries(binds).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback(...args);\n };\n }\n });\n });\n return obj;\n}\nfunction applyBindingsObject(el, obj, original) {\n let cleanupRunners = [];\n while (cleanupRunners.length)\n cleanupRunners.pop()();\n let attributes = Object.entries(obj).map(([name, value]) => ({name, value}));\n let staticAttributes = attributesOnly(attributes);\n attributes = attributes.map((attribute) => {\n if (staticAttributes.find((attr) => attr.name === attribute.name)) {\n return {\n name: `x-bind:${attribute.name}`,\n value: `\"${attribute.value}\"`\n };\n }\n return attribute;\n });\n directives(el, attributes, original).map((handle) => {\n cleanupRunners.push(handle.runCleanups);\n handle();\n });\n}\n\n// packages/alpinejs/src/datas.js\nvar datas = {};\nfunction data(name, callback) {\n datas[name] = callback;\n}\nfunction injectDataProviders(obj, context) {\n Object.entries(datas).forEach(([name, callback]) => {\n Object.defineProperty(obj, name, {\n get() {\n return (...args) => {\n return callback.bind(context)(...args);\n };\n },\n enumerable: false\n });\n });\n return obj;\n}\n\n// packages/alpinejs/src/alpine.js\nvar Alpine = {\n get reactive() {\n return reactive;\n },\n get release() {\n return release;\n },\n get effect() {\n return effect;\n },\n get raw() {\n return raw;\n },\n version: \"3.10.5\",\n flushAndStopDeferringMutations,\n dontAutoEvaluateFunctions,\n disableEffectScheduling,\n setReactivityEngine,\n closestDataStack,\n skipDuringClone,\n addRootSelector,\n addInitSelector,\n addScopeToNode,\n deferMutations,\n mapAttributes,\n evaluateLater,\n setEvaluator,\n mergeProxies,\n findClosest,\n closestRoot,\n interceptor,\n transition,\n setStyles,\n mutateDom,\n directive,\n throttle,\n debounce,\n evaluate,\n initTree,\n nextTick,\n prefixed: prefix,\n prefix: setPrefix,\n plugin,\n magic,\n store,\n start,\n clone,\n bound: getBinding,\n $data: scope,\n data,\n bind: bind2\n};\nvar alpine_default = Alpine;\n\n// node_modules/@vue/shared/dist/shared.esm-bundler.js\nfunction makeMap(str, expectsLowerCase) {\n const map = Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\nvar PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `HYDRATE_EVENTS`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\nvar slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\nvar specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nvar isBooleanAttr2 = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);\nvar EMPTY_OBJ = true ? Object.freeze({}) : {};\nvar EMPTY_ARR = true ? Object.freeze([]) : [];\nvar extend = Object.assign;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar hasOwn = (val, key) => hasOwnProperty.call(val, key);\nvar isArray = Array.isArray;\nvar isMap = (val) => toTypeString(val) === \"[object Map]\";\nvar isString = (val) => typeof val === \"string\";\nvar isSymbol = (val) => typeof val === \"symbol\";\nvar isObject = (val) => val !== null && typeof val === \"object\";\nvar objectToString = Object.prototype.toString;\nvar toTypeString = (value) => objectToString.call(value);\nvar toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nvar isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nvar cacheStringFunction = (fn) => {\n const cache = Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nvar capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));\nvar toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);\nvar hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue);\n\n// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\nvar targetMap = new WeakMap();\nvar effectStack = [];\nvar activeEffect;\nvar ITERATE_KEY = Symbol(true ? \"iterate\" : \"\");\nvar MAP_KEY_ITERATE_KEY = Symbol(true ? \"Map key iterate\" : \"\");\nfunction isEffect(fn) {\n return fn && fn._isEffect === true;\n}\nfunction effect2(fn, options = EMPTY_OBJ) {\n if (isEffect(fn)) {\n fn = fn.raw;\n }\n const effect3 = createReactiveEffect(fn, options);\n if (!options.lazy) {\n effect3();\n }\n return effect3;\n}\nfunction stop(effect3) {\n if (effect3.active) {\n cleanup(effect3);\n if (effect3.options.onStop) {\n effect3.options.onStop();\n }\n effect3.active = false;\n }\n}\nvar uid = 0;\nfunction createReactiveEffect(fn, options) {\n const effect3 = function reactiveEffect() {\n if (!effect3.active) {\n return fn();\n }\n if (!effectStack.includes(effect3)) {\n cleanup(effect3);\n try {\n enableTracking();\n effectStack.push(effect3);\n activeEffect = effect3;\n return fn();\n } finally {\n effectStack.pop();\n resetTracking();\n activeEffect = effectStack[effectStack.length - 1];\n }\n }\n };\n effect3.id = uid++;\n effect3.allowRecurse = !!options.allowRecurse;\n effect3._isEffect = true;\n effect3.active = true;\n effect3.raw = fn;\n effect3.deps = [];\n effect3.options = options;\n return effect3;\n}\nfunction cleanup(effect3) {\n const {deps} = effect3;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect3);\n }\n deps.length = 0;\n }\n}\nvar shouldTrack = true;\nvar trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (!shouldTrack || activeEffect === void 0) {\n return;\n }\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = new Set());\n }\n if (!dep.has(activeEffect)) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (activeEffect.options.onTrack) {\n activeEffect.options.onTrack({\n effect: activeEffect,\n target,\n type,\n key\n });\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n const effects = new Set();\n const add2 = (effectsToAdd) => {\n if (effectsToAdd) {\n effectsToAdd.forEach((effect3) => {\n if (effect3 !== activeEffect || effect3.allowRecurse) {\n effects.add(effect3);\n }\n });\n }\n };\n if (type === \"clear\") {\n depsMap.forEach(add2);\n } else if (key === \"length\" && isArray(target)) {\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 >= newValue) {\n add2(dep);\n }\n });\n } else {\n if (key !== void 0) {\n add2(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n add2(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n add2(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n add2(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n add2(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const run = (effect3) => {\n if (effect3.options.onTrigger) {\n effect3.options.onTrigger({\n effect: effect3,\n target,\n key,\n type,\n newValue,\n oldValue,\n oldTarget\n });\n }\n if (effect3.options.scheduler) {\n effect3.options.scheduler(effect3);\n } else {\n effect3();\n }\n };\n effects.forEach(run);\n}\nvar isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nvar builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key) => Symbol[key]).filter(isSymbol));\nvar get2 = /* @__PURE__ */ createGetter();\nvar shallowGet = /* @__PURE__ */ createGetter(false, true);\nvar readonlyGet = /* @__PURE__ */ createGetter(true);\nvar shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);\nvar arrayInstrumentations = {};\n[\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n const method = Array.prototype[key];\n arrayInstrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = method.apply(arr, args);\n if (res === -1 || res === false) {\n return method.apply(arr, args.map(toRaw));\n } else {\n return res;\n }\n };\n});\n[\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n const method = Array.prototype[key];\n arrayInstrumentations[key] = function(...args) {\n pauseTracking();\n const res = method.apply(this, args);\n resetTracking();\n return res;\n };\n});\nfunction createGetter(isReadonly = false, shallow = false) {\n return function get3(target, key, receiver) {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\" && receiver === (isReadonly ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n const shouldUnwrap = !targetIsArray || !isIntegerKey(key);\n return shouldUnwrap ? res.value : res;\n }\n if (isObject(res)) {\n return isReadonly ? readonly(res) : reactive2(res);\n }\n return res;\n };\n}\nvar set2 = /* @__PURE__ */ createSetter();\nvar shallowSet = /* @__PURE__ */ createSetter(true);\nfunction createSetter(shallow = false) {\n return function set3(target, key, value, receiver) {\n let oldValue = target[key];\n if (!shallow) {\n value = toRaw(value);\n oldValue = toRaw(oldValue);\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n };\n}\nfunction deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n}\nfunction ownKeys(target) {\n track(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n return Reflect.ownKeys(target);\n}\nvar mutableHandlers = {\n get: get2,\n set: set2,\n deleteProperty,\n has,\n ownKeys\n};\nvar readonlyHandlers = {\n get: readonlyGet,\n set(target, key) {\n if (true) {\n console.warn(`Set operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n },\n deleteProperty(target, key) {\n if (true) {\n console.warn(`Delete operation on key \"${String(key)}\" failed: target is readonly.`, target);\n }\n return true;\n }\n};\nvar shallowReactiveHandlers = extend({}, mutableHandlers, {\n get: shallowGet,\n set: shallowSet\n});\nvar shallowReadonlyHandlers = extend({}, readonlyHandlers, {\n get: shallowReadonlyGet\n});\nvar toReactive = (value) => isObject(value) ? reactive2(value) : value;\nvar toReadonly = (value) => isObject(value) ? readonly(value) : value;\nvar toShallow = (value) => value;\nvar getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get$1(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"get\", key);\n }\n !isReadonly && track(rawTarget, \"get\", rawKey);\n const {has: has2} = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has$1(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (key !== rawKey) {\n !isReadonly && track(rawTarget, \"has\", key);\n }\n !isReadonly && track(rawTarget, \"has\", rawKey);\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set$1(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const {has: has2, get: get3} = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const {has: has2, get: get3} = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (true) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get3 ? get3.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n return {\n next() {\n const {value, done} = innerIterator.next();\n return done ? {value, done} : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (true) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));\n }\n return type === \"delete\" ? false : this;\n };\n}\nvar mutableInstrumentations = {\n get(key) {\n return get$1(this, key);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n};\nvar shallowInstrumentations = {\n get(key) {\n return get$1(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has: has$1,\n add,\n set: set$1,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n};\nvar readonlyInstrumentations = {\n get(key) {\n return get$1(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n};\nvar shallowReadonlyInstrumentations = {\n get(key) {\n return get$1(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has$1.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n};\nvar iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\niteratorMethods.forEach((method) => {\n mutableInstrumentations[method] = createIterableMethod(method, false, false);\n readonlyInstrumentations[method] = createIterableMethod(method, true, false);\n shallowInstrumentations[method] = createIterableMethod(method, false, true);\n shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);\n});\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n };\n}\nvar mutableCollectionHandlers = {\n get: createInstrumentationGetter(false, false)\n};\nvar shallowCollectionHandlers = {\n get: createInstrumentationGetter(false, true)\n};\nvar readonlyCollectionHandlers = {\n get: createInstrumentationGetter(true, false)\n};\nvar shallowReadonlyCollectionHandlers = {\n get: createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);\n }\n}\nvar reactiveMap = new WeakMap();\nvar shallowReactiveMap = new WeakMap();\nvar readonlyMap = new WeakMap();\nvar shallowReadonlyMap = new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));\n}\nfunction reactive2(target) {\n if (target && target[\"__v_isReadonly\"]) {\n return target;\n }\n return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n}\nfunction readonly(target) {\n return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n}\nfunction createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (true) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0) {\n return target;\n }\n const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction toRaw(observed) {\n return observed && toRaw(observed[\"__v_raw\"]) || observed;\n}\nfunction isRef(r) {\n return Boolean(r && r.__v_isRef === true);\n}\n\n// packages/alpinejs/src/magics/$nextTick.js\nmagic(\"nextTick\", () => nextTick);\n\n// packages/alpinejs/src/magics/$dispatch.js\nmagic(\"dispatch\", (el) => dispatch.bind(dispatch, el));\n\n// packages/alpinejs/src/magics/$watch.js\nmagic(\"watch\", (el, {evaluateLater: evaluateLater2, effect: effect3}) => (key, callback) => {\n let evaluate2 = evaluateLater2(key);\n let firstTime = true;\n let oldValue;\n let effectReference = effect3(() => evaluate2((value) => {\n JSON.stringify(value);\n if (!firstTime) {\n queueMicrotask(() => {\n callback(value, oldValue);\n oldValue = value;\n });\n } else {\n oldValue = value;\n }\n firstTime = false;\n }));\n el._x_effects.delete(effectReference);\n});\n\n// packages/alpinejs/src/magics/$store.js\nmagic(\"store\", getStores);\n\n// packages/alpinejs/src/magics/$data.js\nmagic(\"data\", (el) => scope(el));\n\n// packages/alpinejs/src/magics/$root.js\nmagic(\"root\", (el) => closestRoot(el));\n\n// packages/alpinejs/src/magics/$refs.js\nmagic(\"refs\", (el) => {\n if (el._x_refs_proxy)\n return el._x_refs_proxy;\n el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));\n return el._x_refs_proxy;\n});\nfunction getArrayOfRefObject(el) {\n let refObjects = [];\n let currentEl = el;\n while (currentEl) {\n if (currentEl._x_refs)\n refObjects.push(currentEl._x_refs);\n currentEl = currentEl.parentNode;\n }\n return refObjects;\n}\n\n// packages/alpinejs/src/ids.js\nvar globalIdMemo = {};\nfunction findAndIncrementId(name) {\n if (!globalIdMemo[name])\n globalIdMemo[name] = 0;\n return ++globalIdMemo[name];\n}\nfunction closestIdRoot(el, name) {\n return findClosest(el, (element) => {\n if (element._x_ids && element._x_ids[name])\n return true;\n });\n}\nfunction setIdRoot(el, name) {\n if (!el._x_ids)\n el._x_ids = {};\n if (!el._x_ids[name])\n el._x_ids[name] = findAndIncrementId(name);\n}\n\n// packages/alpinejs/src/magics/$id.js\nmagic(\"id\", (el) => (name, key = null) => {\n let root = closestIdRoot(el, name);\n let id = root ? root._x_ids[name] : findAndIncrementId(name);\n return key ? `${name}-${id}-${key}` : `${name}-${id}`;\n});\n\n// packages/alpinejs/src/magics/$el.js\nmagic(\"el\", (el) => el);\n\n// packages/alpinejs/src/magics/index.js\nwarnMissingPluginMagic(\"Focus\", \"focus\", \"focus\");\nwarnMissingPluginMagic(\"Persist\", \"persist\", \"persist\");\nfunction warnMissingPluginMagic(name, magicName, slug) {\n magic(magicName, (el) => warn(`You can't use [$${directiveName}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/directives/x-modelable.js\ndirective(\"modelable\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let func = evaluateLater2(expression);\n let innerGet = () => {\n let result;\n func((i) => result = i);\n return result;\n };\n let evaluateInnerSet = evaluateLater2(`${expression} = __placeholder`);\n let innerSet = (val) => evaluateInnerSet(() => {\n }, {scope: {__placeholder: val}});\n let initialValue = innerGet();\n innerSet(initialValue);\n queueMicrotask(() => {\n if (!el._x_model)\n return;\n el._x_removeModelListeners[\"default\"]();\n let outerGet = el._x_model.get;\n let outerSet = el._x_model.set;\n effect3(() => innerSet(outerGet()));\n effect3(() => outerSet(innerGet()));\n });\n});\n\n// packages/alpinejs/src/directives/x-teleport.js\ndirective(\"teleport\", (el, {expression}, {cleanup: cleanup2}) => {\n if (el.tagName.toLowerCase() !== \"template\")\n warn(\"x-teleport can only be used on a <template> tag\", el);\n let target = document.querySelector(expression);\n if (!target)\n warn(`Cannot find x-teleport element for selector: \"${expression}\"`);\n let clone2 = el.content.cloneNode(true).firstElementChild;\n el._x_teleport = clone2;\n clone2._x_teleportBack = el;\n if (el._x_forwardEvents) {\n el._x_forwardEvents.forEach((eventName) => {\n clone2.addEventListener(eventName, (e) => {\n e.stopPropagation();\n el.dispatchEvent(new e.constructor(e.type, e));\n });\n });\n }\n addScopeToNode(clone2, {}, el);\n mutateDom(() => {\n target.appendChild(clone2);\n initTree(clone2);\n clone2._x_ignore = true;\n });\n cleanup2(() => clone2.remove());\n});\n\n// packages/alpinejs/src/directives/x-ignore.js\nvar handler = () => {\n};\nhandler.inline = (el, {modifiers}, {cleanup: cleanup2}) => {\n modifiers.includes(\"self\") ? el._x_ignoreSelf = true : el._x_ignore = true;\n cleanup2(() => {\n modifiers.includes(\"self\") ? delete el._x_ignoreSelf : delete el._x_ignore;\n });\n};\ndirective(\"ignore\", handler);\n\n// packages/alpinejs/src/directives/x-effect.js\ndirective(\"effect\", (el, {expression}, {effect: effect3}) => effect3(evaluateLater(el, expression)));\n\n// packages/alpinejs/src/utils/on.js\nfunction on(el, event, modifiers, callback) {\n let listenerTarget = el;\n let handler3 = (e) => callback(e);\n let options = {};\n let wrapHandler = (callback2, wrapper) => (e) => wrapper(callback2, e);\n if (modifiers.includes(\"dot\"))\n event = dotSyntax(event);\n if (modifiers.includes(\"camel\"))\n event = camelCase2(event);\n if (modifiers.includes(\"passive\"))\n options.passive = true;\n if (modifiers.includes(\"capture\"))\n options.capture = true;\n if (modifiers.includes(\"window\"))\n listenerTarget = window;\n if (modifiers.includes(\"document\"))\n listenerTarget = document;\n if (modifiers.includes(\"prevent\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.preventDefault();\n next(e);\n });\n if (modifiers.includes(\"stop\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.stopPropagation();\n next(e);\n });\n if (modifiers.includes(\"self\"))\n handler3 = wrapHandler(handler3, (next, e) => {\n e.target === el && next(e);\n });\n if (modifiers.includes(\"away\") || modifiers.includes(\"outside\")) {\n listenerTarget = document;\n handler3 = wrapHandler(handler3, (next, e) => {\n if (el.contains(e.target))\n return;\n if (e.target.isConnected === false)\n return;\n if (el.offsetWidth < 1 && el.offsetHeight < 1)\n return;\n if (el._x_isShown === false)\n return;\n next(e);\n });\n }\n if (modifiers.includes(\"once\")) {\n handler3 = wrapHandler(handler3, (next, e) => {\n next(e);\n listenerTarget.removeEventListener(event, handler3, options);\n });\n }\n handler3 = wrapHandler(handler3, (next, e) => {\n if (isKeyEvent(event)) {\n if (isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers)) {\n return;\n }\n }\n next(e);\n });\n if (modifiers.includes(\"debounce\")) {\n let nextModifier = modifiers[modifiers.indexOf(\"debounce\") + 1] || \"invalid-wait\";\n let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n handler3 = debounce(handler3, wait);\n }\n if (modifiers.includes(\"throttle\")) {\n let nextModifier = modifiers[modifiers.indexOf(\"throttle\") + 1] || \"invalid-wait\";\n let wait = isNumeric(nextModifier.split(\"ms\")[0]) ? Number(nextModifier.split(\"ms\")[0]) : 250;\n handler3 = throttle(handler3, wait);\n }\n listenerTarget.addEventListener(event, handler3, options);\n return () => {\n listenerTarget.removeEventListener(event, handler3, options);\n };\n}\nfunction dotSyntax(subject) {\n return subject.replace(/-/g, \".\");\n}\nfunction camelCase2(subject) {\n return subject.toLowerCase().replace(/-(\\w)/g, (match, char) => char.toUpperCase());\n}\nfunction isNumeric(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\nfunction kebabCase2(subject) {\n return subject.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[_\\s]/, \"-\").toLowerCase();\n}\nfunction isKeyEvent(event) {\n return [\"keydown\", \"keyup\"].includes(event);\n}\nfunction isListeningForASpecificKeyThatHasntBeenPressed(e, modifiers) {\n let keyModifiers = modifiers.filter((i) => {\n return ![\"window\", \"document\", \"prevent\", \"stop\", \"once\"].includes(i);\n });\n if (keyModifiers.includes(\"debounce\")) {\n let debounceIndex = keyModifiers.indexOf(\"debounce\");\n keyModifiers.splice(debounceIndex, isNumeric((keyModifiers[debounceIndex + 1] || \"invalid-wait\").split(\"ms\")[0]) ? 2 : 1);\n }\n if (keyModifiers.length === 0)\n return false;\n if (keyModifiers.length === 1 && keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\n const systemKeyModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\", \"cmd\", \"super\"];\n const selectedSystemKeyModifiers = systemKeyModifiers.filter((modifier) => keyModifiers.includes(modifier));\n keyModifiers = keyModifiers.filter((i) => !selectedSystemKeyModifiers.includes(i));\n if (selectedSystemKeyModifiers.length > 0) {\n const activelyPressedKeyModifiers = selectedSystemKeyModifiers.filter((modifier) => {\n if (modifier === \"cmd\" || modifier === \"super\")\n modifier = \"meta\";\n return e[`${modifier}Key`];\n });\n if (activelyPressedKeyModifiers.length === selectedSystemKeyModifiers.length) {\n if (keyToModifiers(e.key).includes(keyModifiers[0]))\n return false;\n }\n }\n return true;\n}\nfunction keyToModifiers(key) {\n if (!key)\n return [];\n key = kebabCase2(key);\n let modifierToKeyMap = {\n ctrl: \"control\",\n slash: \"/\",\n space: \"-\",\n spacebar: \"-\",\n cmd: \"meta\",\n esc: \"escape\",\n up: \"arrow-up\",\n down: \"arrow-down\",\n left: \"arrow-left\",\n right: \"arrow-right\",\n period: \".\",\n equal: \"=\"\n };\n modifierToKeyMap[key] = key;\n return Object.keys(modifierToKeyMap).map((modifier) => {\n if (modifierToKeyMap[modifier] === key)\n return modifier;\n }).filter((modifier) => modifier);\n}\n\n// packages/alpinejs/src/directives/x-model.js\ndirective(\"model\", (el, {modifiers, expression}, {effect: effect3, cleanup: cleanup2}) => {\n let evaluate2 = evaluateLater(el, expression);\n let assignmentExpression = `${expression} = rightSideOfExpression($event, ${expression})`;\n let evaluateAssignment = evaluateLater(el, assignmentExpression);\n var event = el.tagName.toLowerCase() === \"select\" || [\"checkbox\", \"radio\"].includes(el.type) || modifiers.includes(\"lazy\") ? \"change\" : \"input\";\n let assigmentFunction = generateAssignmentFunction(el, modifiers, expression);\n let removeListener = on(el, event, modifiers, (e) => {\n evaluateAssignment(() => {\n }, {scope: {\n $event: e,\n rightSideOfExpression: assigmentFunction\n }});\n });\n if (!el._x_removeModelListeners)\n el._x_removeModelListeners = {};\n el._x_removeModelListeners[\"default\"] = removeListener;\n cleanup2(() => el._x_removeModelListeners[\"default\"]());\n let evaluateSetModel = evaluateLater(el, `${expression} = __placeholder`);\n el._x_model = {\n get() {\n let result;\n evaluate2((value) => result = value);\n return result;\n },\n set(value) {\n evaluateSetModel(() => {\n }, {scope: {__placeholder: value}});\n }\n };\n el._x_forceModelUpdate = () => {\n evaluate2((value) => {\n if (value === void 0 && expression.match(/\\./))\n value = \"\";\n window.fromModel = true;\n mutateDom(() => bind(el, \"value\", value));\n delete window.fromModel;\n });\n };\n effect3(() => {\n if (modifiers.includes(\"unintrusive\") && document.activeElement.isSameNode(el))\n return;\n el._x_forceModelUpdate();\n });\n});\nfunction generateAssignmentFunction(el, modifiers, expression) {\n if (el.type === \"radio\") {\n mutateDom(() => {\n if (!el.hasAttribute(\"name\"))\n el.setAttribute(\"name\", expression);\n });\n }\n return (event, currentValue) => {\n return mutateDom(() => {\n if (event instanceof CustomEvent && event.detail !== void 0) {\n return event.detail || event.target.value;\n } else if (el.type === \"checkbox\") {\n if (Array.isArray(currentValue)) {\n let newValue = modifiers.includes(\"number\") ? safeParseNumber(event.target.value) : event.target.value;\n return event.target.checked ? currentValue.concat([newValue]) : currentValue.filter((el2) => !checkedAttrLooseCompare2(el2, newValue));\n } else {\n return event.target.checked;\n }\n } else if (el.tagName.toLowerCase() === \"select\" && el.multiple) {\n return modifiers.includes(\"number\") ? Array.from(event.target.selectedOptions).map((option) => {\n let rawValue = option.value || option.text;\n return safeParseNumber(rawValue);\n }) : Array.from(event.target.selectedOptions).map((option) => {\n return option.value || option.text;\n });\n } else {\n let rawValue = event.target.value;\n return modifiers.includes(\"number\") ? safeParseNumber(rawValue) : modifiers.includes(\"trim\") ? rawValue.trim() : rawValue;\n }\n });\n };\n}\nfunction safeParseNumber(rawValue) {\n let number = rawValue ? parseFloat(rawValue) : null;\n return isNumeric2(number) ? number : rawValue;\n}\nfunction checkedAttrLooseCompare2(valueA, valueB) {\n return valueA == valueB;\n}\nfunction isNumeric2(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-cloak.js\ndirective(\"cloak\", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix(\"cloak\")))));\n\n// packages/alpinejs/src/directives/x-init.js\naddInitSelector(() => `[${prefix(\"init\")}]`);\ndirective(\"init\", skipDuringClone((el, {expression}, {evaluate: evaluate2}) => {\n if (typeof expression === \"string\") {\n return !!expression.trim() && evaluate2(expression, {}, false);\n }\n return evaluate2(expression, {}, false);\n}));\n\n// packages/alpinejs/src/directives/x-text.js\ndirective(\"text\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.textContent = value;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-html.js\ndirective(\"html\", (el, {expression}, {effect: effect3, evaluateLater: evaluateLater2}) => {\n let evaluate2 = evaluateLater2(expression);\n effect3(() => {\n evaluate2((value) => {\n mutateDom(() => {\n el.innerHTML = value;\n el._x_ignoreSelf = true;\n initTree(el);\n delete el._x_ignoreSelf;\n });\n });\n });\n});\n\n// packages/alpinejs/src/directives/x-bind.js\nmapAttributes(startingWith(\":\", into(prefix(\"bind:\"))));\ndirective(\"bind\", (el, {value, modifiers, expression, original}, {effect: effect3}) => {\n if (!value) {\n let bindingProviders = {};\n injectBindingProviders(bindingProviders);\n let getBindings = evaluateLater(el, expression);\n getBindings((bindings) => {\n applyBindingsObject(el, bindings, original);\n }, {scope: bindingProviders});\n return;\n }\n if (value === \"key\")\n return storeKeyForXFor(el, expression);\n let evaluate2 = evaluateLater(el, expression);\n effect3(() => evaluate2((result) => {\n if (result === void 0 && typeof expression === \"string\" && expression.match(/\\./)) {\n result = \"\";\n }\n mutateDom(() => bind(el, value, result, modifiers));\n }));\n});\nfunction storeKeyForXFor(el, expression) {\n el._x_keyExpression = expression;\n}\n\n// packages/alpinejs/src/directives/x-data.js\naddRootSelector(() => `[${prefix(\"data\")}]`);\ndirective(\"data\", skipDuringClone((el, {expression}, {cleanup: cleanup2}) => {\n expression = expression === \"\" ? \"{}\" : expression;\n let magicContext = {};\n injectMagics(magicContext, el);\n let dataProviderContext = {};\n injectDataProviders(dataProviderContext, magicContext);\n let data2 = evaluate(el, expression, {scope: dataProviderContext});\n if (data2 === void 0)\n data2 = {};\n injectMagics(data2, el);\n let reactiveData = reactive(data2);\n initInterceptors(reactiveData);\n let undo = addScopeToNode(el, reactiveData);\n reactiveData[\"init\"] && evaluate(el, reactiveData[\"init\"]);\n cleanup2(() => {\n reactiveData[\"destroy\"] && evaluate(el, reactiveData[\"destroy\"]);\n undo();\n });\n}));\n\n// packages/alpinejs/src/directives/x-show.js\ndirective(\"show\", (el, {modifiers, expression}, {effect: effect3}) => {\n let evaluate2 = evaluateLater(el, expression);\n if (!el._x_doHide)\n el._x_doHide = () => {\n mutateDom(() => {\n el.style.setProperty(\"display\", \"none\", modifiers.includes(\"important\") ? \"important\" : void 0);\n });\n };\n if (!el._x_doShow)\n el._x_doShow = () => {\n mutateDom(() => {\n if (el.style.length === 1 && el.style.display === \"none\") {\n el.removeAttribute(\"style\");\n } else {\n el.style.removeProperty(\"display\");\n }\n });\n };\n let hide = () => {\n el._x_doHide();\n el._x_isShown = false;\n };\n let show = () => {\n el._x_doShow();\n el._x_isShown = true;\n };\n let clickAwayCompatibleShow = () => setTimeout(show);\n let toggle = once((value) => value ? show() : hide(), (value) => {\n if (typeof el._x_toggleAndCascadeWithTransitions === \"function\") {\n el._x_toggleAndCascadeWithTransitions(el, value, show, hide);\n } else {\n value ? clickAwayCompatibleShow() : hide();\n }\n });\n let oldValue;\n let firstTime = true;\n effect3(() => evaluate2((value) => {\n if (!firstTime && value === oldValue)\n return;\n if (modifiers.includes(\"immediate\"))\n value ? clickAwayCompatibleShow() : hide();\n toggle(value);\n oldValue = value;\n firstTime = false;\n }));\n});\n\n// packages/alpinejs/src/directives/x-for.js\ndirective(\"for\", (el, {expression}, {effect: effect3, cleanup: cleanup2}) => {\n let iteratorNames = parseForExpression(expression);\n let evaluateItems = evaluateLater(el, iteratorNames.items);\n let evaluateKey = evaluateLater(el, el._x_keyExpression || \"index\");\n el._x_prevKeys = [];\n el._x_lookup = {};\n effect3(() => loop(el, iteratorNames, evaluateItems, evaluateKey));\n cleanup2(() => {\n Object.values(el._x_lookup).forEach((el2) => el2.remove());\n delete el._x_prevKeys;\n delete el._x_lookup;\n });\n});\nfunction loop(el, iteratorNames, evaluateItems, evaluateKey) {\n let isObject2 = (i) => typeof i === \"object\" && !Array.isArray(i);\n let templateEl = el;\n evaluateItems((items) => {\n if (isNumeric3(items) && items >= 0) {\n items = Array.from(Array(items).keys(), (i) => i + 1);\n }\n if (items === void 0)\n items = [];\n let lookup = el._x_lookup;\n let prevKeys = el._x_prevKeys;\n let scopes = [];\n let keys = [];\n if (isObject2(items)) {\n items = Object.entries(items).map(([key, value]) => {\n let scope2 = getIterationScopeVariables(iteratorNames, value, key, items);\n evaluateKey((value2) => keys.push(value2), {scope: {index: key, ...scope2}});\n scopes.push(scope2);\n });\n } else {\n for (let i = 0; i < items.length; i++) {\n let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items);\n evaluateKey((value) => keys.push(value), {scope: {index: i, ...scope2}});\n scopes.push(scope2);\n }\n }\n let adds = [];\n let moves = [];\n let removes = [];\n let sames = [];\n for (let i = 0; i < prevKeys.length; i++) {\n let key = prevKeys[i];\n if (keys.indexOf(key) === -1)\n removes.push(key);\n }\n prevKeys = prevKeys.filter((key) => !removes.includes(key));\n let lastKey = \"template\";\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n let prevIndex = prevKeys.indexOf(key);\n if (prevIndex === -1) {\n prevKeys.splice(i, 0, key);\n adds.push([lastKey, i]);\n } else if (prevIndex !== i) {\n let keyInSpot = prevKeys.splice(i, 1)[0];\n let keyForSpot = prevKeys.splice(prevIndex - 1, 1)[0];\n prevKeys.splice(i, 0, keyForSpot);\n prevKeys.splice(prevIndex, 0, keyInSpot);\n moves.push([keyInSpot, keyForSpot]);\n } else {\n sames.push(key);\n }\n lastKey = key;\n }\n for (let i = 0; i < removes.length; i++) {\n let key = removes[i];\n if (!!lookup[key]._x_effects) {\n lookup[key]._x_effects.forEach(dequeueJob);\n }\n lookup[key].remove();\n lookup[key] = null;\n delete lookup[key];\n }\n for (let i = 0; i < moves.length; i++) {\n let [keyInSpot, keyForSpot] = moves[i];\n let elInSpot = lookup[keyInSpot];\n let elForSpot = lookup[keyForSpot];\n let marker = document.createElement(\"div\");\n mutateDom(() => {\n elForSpot.after(marker);\n elInSpot.after(elForSpot);\n elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);\n marker.before(elInSpot);\n elInSpot._x_currentIfEl && elInSpot.after(elInSpot._x_currentIfEl);\n marker.remove();\n });\n refreshScope(elForSpot, scopes[keys.indexOf(keyForSpot)]);\n }\n for (let i = 0; i < adds.length; i++) {\n let [lastKey2, index] = adds[i];\n let lastEl = lastKey2 === \"template\" ? templateEl : lookup[lastKey2];\n if (lastEl._x_currentIfEl)\n lastEl = lastEl._x_currentIfEl;\n let scope2 = scopes[index];\n let key = keys[index];\n let clone2 = document.importNode(templateEl.content, true).firstElementChild;\n addScopeToNode(clone2, reactive(scope2), templateEl);\n mutateDom(() => {\n lastEl.after(clone2);\n initTree(clone2);\n });\n if (typeof key === \"object\") {\n warn(\"x-for key cannot be an object, it must be a string or an integer\", templateEl);\n }\n lookup[key] = clone2;\n }\n for (let i = 0; i < sames.length; i++) {\n refreshScope(lookup[sames[i]], scopes[keys.indexOf(sames[i])]);\n }\n templateEl._x_prevKeys = keys;\n });\n}\nfunction parseForExpression(expression) {\n let forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\n let stripParensRE = /^\\s*\\(|\\)\\s*$/g;\n let forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+([\\s\\S]*)/;\n let inMatch = expression.match(forAliasRE);\n if (!inMatch)\n return;\n let res = {};\n res.items = inMatch[2].trim();\n let item = inMatch[1].replace(stripParensRE, \"\").trim();\n let iteratorMatch = item.match(forIteratorRE);\n if (iteratorMatch) {\n res.item = item.replace(forIteratorRE, \"\").trim();\n res.index = iteratorMatch[1].trim();\n if (iteratorMatch[2]) {\n res.collection = iteratorMatch[2].trim();\n }\n } else {\n res.item = item;\n }\n return res;\n}\nfunction getIterationScopeVariables(iteratorNames, item, index, items) {\n let scopeVariables = {};\n if (/^\\[.*\\]$/.test(iteratorNames.item) && Array.isArray(item)) {\n let names = iteratorNames.item.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name, i) => {\n scopeVariables[name] = item[i];\n });\n } else if (/^\\{.*\\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === \"object\") {\n let names = iteratorNames.item.replace(\"{\", \"\").replace(\"}\", \"\").split(\",\").map((i) => i.trim());\n names.forEach((name) => {\n scopeVariables[name] = item[name];\n });\n } else {\n scopeVariables[iteratorNames.item] = item;\n }\n if (iteratorNames.index)\n scopeVariables[iteratorNames.index] = index;\n if (iteratorNames.collection)\n scopeVariables[iteratorNames.collection] = items;\n return scopeVariables;\n}\nfunction isNumeric3(subject) {\n return !Array.isArray(subject) && !isNaN(subject);\n}\n\n// packages/alpinejs/src/directives/x-ref.js\nfunction handler2() {\n}\nhandler2.inline = (el, {expression}, {cleanup: cleanup2}) => {\n let root = closestRoot(el);\n if (!root._x_refs)\n root._x_refs = {};\n root._x_refs[expression] = el;\n cleanup2(() => delete root._x_refs[expression]);\n};\ndirective(\"ref\", handler2);\n\n// packages/alpinejs/src/directives/x-if.js\ndirective(\"if\", (el, {expression}, {effect: effect3, cleanup: cleanup2}) => {\n let evaluate2 = evaluateLater(el, expression);\n let show = () => {\n if (el._x_currentIfEl)\n return el._x_currentIfEl;\n let clone2 = el.content.cloneNode(true).firstElementChild;\n addScopeToNode(clone2, {}, el);\n mutateDom(() => {\n el.after(clone2);\n initTree(clone2);\n });\n el._x_currentIfEl = clone2;\n el._x_undoIf = () => {\n walk(clone2, (node) => {\n if (!!node._x_effects) {\n node._x_effects.forEach(dequeueJob);\n }\n });\n clone2.remove();\n delete el._x_currentIfEl;\n };\n return clone2;\n };\n let hide = () => {\n if (!el._x_undoIf)\n return;\n el._x_undoIf();\n delete el._x_undoIf;\n };\n effect3(() => evaluate2((value) => {\n value ? show() : hide();\n }));\n cleanup2(() => el._x_undoIf && el._x_undoIf());\n});\n\n// packages/alpinejs/src/directives/x-id.js\ndirective(\"id\", (el, {expression}, {evaluate: evaluate2}) => {\n let names = evaluate2(expression);\n names.forEach((name) => setIdRoot(el, name));\n});\n\n// packages/alpinejs/src/directives/x-on.js\nmapAttributes(startingWith(\"@\", into(prefix(\"on:\"))));\ndirective(\"on\", skipDuringClone((el, {value, modifiers, expression}, {cleanup: cleanup2}) => {\n let evaluate2 = expression ? evaluateLater(el, expression) : () => {\n };\n if (el.tagName.toLowerCase() === \"template\") {\n if (!el._x_forwardEvents)\n el._x_forwardEvents = [];\n if (!el._x_forwardEvents.includes(value))\n el._x_forwardEvents.push(value);\n }\n let removeListener = on(el, value, modifiers, (e) => {\n evaluate2(() => {\n }, {scope: {$event: e}, params: [e]});\n });\n cleanup2(() => removeListener());\n}));\n\n// packages/alpinejs/src/directives/index.js\nwarnMissingPluginDirective(\"Collapse\", \"collapse\", \"collapse\");\nwarnMissingPluginDirective(\"Intersect\", \"intersect\", \"intersect\");\nwarnMissingPluginDirective(\"Focus\", \"trap\", \"focus\");\nwarnMissingPluginDirective(\"Mask\", \"mask\", \"mask\");\nfunction warnMissingPluginDirective(name, directiveName2, slug) {\n directive(directiveName2, (el) => warn(`You can't use [x-${directiveName2}] without first installing the \"${name}\" plugin here: https://alpinejs.dev/plugins/${slug}`, el));\n}\n\n// packages/alpinejs/src/index.js\nalpine_default.setEvaluator(normalEvaluator);\nalpine_default.setReactivityEngine({reactive: reactive2, effect: effect2, release: stop, raw: toRaw});\nvar src_default = alpine_default;\n\n// packages/alpinejs/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default\n};\n", "// packages/morph/src/dom.js\nvar DomManager = class {\n el = void 0;\n constructor(el) {\n this.el = el;\n }\n traversals = {\n first: \"firstElementChild\",\n next: \"nextElementSibling\",\n parent: \"parentElement\"\n };\n nodes() {\n this.traversals = {\n first: \"firstChild\",\n next: \"nextSibling\",\n parent: \"parentNode\"\n };\n return this;\n }\n first() {\n return this.teleportTo(this.el[this.traversals[\"first\"]]);\n }\n next() {\n return this.teleportTo(this.teleportBack(this.el[this.traversals[\"next\"]]));\n }\n before(insertee) {\n this.el[this.traversals[\"parent\"]].insertBefore(insertee, this.el);\n return insertee;\n }\n replace(replacement) {\n this.el[this.traversals[\"parent\"]].replaceChild(replacement, this.el);\n return replacement;\n }\n append(appendee) {\n this.el.appendChild(appendee);\n return appendee;\n }\n teleportTo(el) {\n if (!el)\n return el;\n if (el._x_teleport)\n return el._x_teleport;\n return el;\n }\n teleportBack(el) {\n if (!el)\n return el;\n if (el._x_teleportBack)\n return el._x_teleportBack;\n return el;\n }\n};\nfunction dom(el) {\n return new DomManager(el);\n}\nfunction createElement(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.firstElementChild;\n}\nfunction textOrComment(el) {\n return el.nodeType === 3 || el.nodeType === 8;\n}\n\n// packages/morph/src/morph.js\nvar resolveStep = () => {\n};\nvar logger = () => {\n};\nasync function morph(from, toHtml, options) {\n let fromEl;\n let toEl;\n let key, lookahead, updating, updated, removing, removed, adding, added, debug;\n function breakpoint(message) {\n if (!debug)\n return;\n logger((message || \"\").replace(\"\\n\", \"\\\\n\"), fromEl, toEl);\n return new Promise((resolve) => resolveStep = () => resolve());\n }\n function assignOptions(options2 = {}) {\n let defaultGetKey = (el) => el.getAttribute(\"key\");\n let noop = () => {\n };\n updating = options2.updating || noop;\n updated = options2.updated || noop;\n removing = options2.removing || noop;\n removed = options2.removed || noop;\n adding = options2.adding || noop;\n added = options2.added || noop;\n key = options2.key || defaultGetKey;\n lookahead = options2.lookahead || false;\n debug = options2.debug || false;\n }\n async function patch(from2, to) {\n if (differentElementNamesTypesOrKeys(from2, to)) {\n let result = patchElement(from2, to);\n await breakpoint(\"Swap elements\");\n return result;\n }\n let updateChildrenOnly = false;\n if (shouldSkip(updating, from2, to, () => updateChildrenOnly = true))\n return;\n window.Alpine && initializeAlpineOnTo(from2, to, () => updateChildrenOnly = true);\n if (textOrComment(to)) {\n await patchNodeValue(from2, to);\n updated(from2, to);\n return;\n }\n if (!updateChildrenOnly) {\n await patchAttributes(from2, to);\n }\n updated(from2, to);\n await patchChildren(from2, to);\n }\n function differentElementNamesTypesOrKeys(from2, to) {\n return from2.nodeType != to.nodeType || from2.nodeName != to.nodeName || getKey(from2) != getKey(to);\n }\n function patchElement(from2, to) {\n if (shouldSkip(removing, from2))\n return;\n let toCloned = to.cloneNode(true);\n if (shouldSkip(adding, toCloned))\n return;\n dom(from2).replace(toCloned);\n removed(from2);\n added(toCloned);\n }\n async function patchNodeValue(from2, to) {\n let value = to.nodeValue;\n if (from2.nodeValue !== value) {\n from2.nodeValue = value;\n await breakpoint(\"Change text node to: \" + value);\n }\n }\n async function patchAttributes(from2, to) {\n if (from2._x_isShown && !to._x_isShown) {\n return;\n }\n if (!from2._x_isShown && to._x_isShown) {\n return;\n }\n let domAttributes = Array.from(from2.attributes);\n let toAttributes = Array.from(to.attributes);\n for (let i = domAttributes.length - 1; i >= 0; i--) {\n let name = domAttributes[i].name;\n if (!to.hasAttribute(name)) {\n from2.removeAttribute(name);\n await breakpoint(\"Remove attribute\");\n }\n }\n for (let i = toAttributes.length - 1; i >= 0; i--) {\n let name = toAttributes[i].name;\n let value = toAttributes[i].value;\n if (from2.getAttribute(name) !== value) {\n from2.setAttribute(name, value);\n await breakpoint(`Set [${name}] attribute to: \"${value}\"`);\n }\n }\n }\n async function patchChildren(from2, to) {\n let domChildren = from2.childNodes;\n let toChildren = to.childNodes;\n let toKeyToNodeMap = keyToMap(toChildren);\n let domKeyDomNodeMap = keyToMap(domChildren);\n let currentTo = dom(to).nodes().first();\n let currentFrom = dom(from2).nodes().first();\n let domKeyHoldovers = {};\n while (currentTo) {\n let toKey = getKey(currentTo);\n let domKey = getKey(currentFrom);\n if (!currentFrom) {\n if (toKey && domKeyHoldovers[toKey]) {\n let holdover = domKeyHoldovers[toKey];\n dom(from2).append(holdover);\n currentFrom = holdover;\n await breakpoint(\"Add element (from key)\");\n } else {\n let added2 = addNodeTo(currentTo, from2) || {};\n await breakpoint(\"Add element: \" + (added2.outerHTML || added2.nodeValue));\n currentTo = dom(currentTo).nodes().next();\n continue;\n }\n }\n if (lookahead) {\n let nextToElementSibling = dom(currentTo).next();\n let found = false;\n while (!found && nextToElementSibling) {\n if (currentFrom.isEqualNode(nextToElementSibling)) {\n found = true;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKey = getKey(currentFrom);\n await breakpoint(\"Move element (lookahead)\");\n }\n nextToElementSibling = dom(nextToElementSibling).next();\n }\n }\n if (toKey !== domKey) {\n if (!toKey && domKey) {\n domKeyHoldovers[domKey] = currentFrom;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKeyHoldovers[domKey].remove();\n currentFrom = dom(currentFrom).nodes().next();\n currentTo = dom(currentTo).nodes().next();\n await breakpoint('No \"to\" key');\n continue;\n }\n if (toKey && !domKey) {\n if (domKeyDomNodeMap[toKey]) {\n currentFrom = dom(currentFrom).replace(domKeyDomNodeMap[toKey]);\n await breakpoint('No \"from\" key');\n }\n }\n if (toKey && domKey) {\n domKeyHoldovers[domKey] = currentFrom;\n let domKeyNode = domKeyDomNodeMap[toKey];\n if (domKeyNode) {\n currentFrom = dom(currentFrom).replace(domKeyNode);\n await breakpoint('Move \"from\" key');\n } else {\n domKeyHoldovers[domKey] = currentFrom;\n currentFrom = addNodeBefore(currentTo, currentFrom);\n domKeyHoldovers[domKey].remove();\n currentFrom = dom(currentFrom).next();\n currentTo = dom(currentTo).next();\n await breakpoint(\"Swap elements with keys\");\n continue;\n }\n }\n }\n let currentFromNext = currentFrom && dom(currentFrom).nodes().next();\n await patch(currentFrom, currentTo);\n currentTo = currentTo && dom(currentTo).nodes().next();\n currentFrom = currentFromNext;\n }\n let removals = [];\n while (currentFrom) {\n if (!shouldSkip(removing, currentFrom))\n removals.push(currentFrom);\n currentFrom = dom(currentFrom).nodes().next();\n }\n while (removals.length) {\n let domForRemoval = removals.shift();\n domForRemoval.remove();\n await breakpoint(\"remove el\");\n removed(domForRemoval);\n }\n }\n function getKey(el) {\n return el && el.nodeType === 1 && key(el);\n }\n function keyToMap(els) {\n let map = {};\n els.forEach((el) => {\n let theKey = getKey(el);\n if (theKey) {\n map[theKey] = el;\n }\n });\n return map;\n }\n function addNodeTo(node, parent) {\n if (!shouldSkip(adding, node)) {\n let clone = node.cloneNode(true);\n dom(parent).append(clone);\n added(clone);\n return clone;\n }\n return null;\n }\n function addNodeBefore(node, beforeMe) {\n if (!shouldSkip(adding, node)) {\n let clone = node.cloneNode(true);\n dom(beforeMe).before(clone);\n added(clone);\n return clone;\n }\n return beforeMe;\n }\n assignOptions(options);\n fromEl = from;\n toEl = createElement(toHtml);\n if (window.Alpine && window.Alpine.closestDataStack && !from._x_dataStack) {\n toEl._x_dataStack = window.Alpine.closestDataStack(from);\n toEl._x_dataStack && window.Alpine.clone(from, toEl);\n }\n await breakpoint();\n await patch(from, toEl);\n fromEl = void 0;\n toEl = void 0;\n return from;\n}\nmorph.step = () => resolveStep();\nmorph.log = (theLogger) => {\n logger = theLogger;\n};\nfunction shouldSkip(hook, ...args) {\n let skip = false;\n hook(...args, () => skip = true);\n return skip;\n}\nfunction initializeAlpineOnTo(from, to, childrenOnly) {\n if (from.nodeType !== 1)\n return;\n if (from._x_dataStack) {\n window.Alpine.clone(from, to);\n }\n}\n\n// packages/morph/src/index.js\nfunction src_default(Alpine) {\n Alpine.morph = morph;\n}\n\n// packages/morph/builds/module.js\nvar module_default = src_default;\nexport {\n module_default as default,\n morph\n};\n", "import alpine from 'alpinejs'\nimport morph from '@alpinejs/morph'\n\nalpine.plugin(morph)\n\nconst input = /INPUT/i\nconst inputTypes = /date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i\nconst textarea = /TEXTAREA/i\n\nfunction updating (el, toEl, childrenOnly, skip) {\n if (el.nodeType !== Node.ELEMENT_NODE) return\n if (el !== document.activeElement) return\n\n const protect =\n el.tagName.match(textarea) ||\n (el.tagName.match(input) && el.getAttribute('type').match(inputTypes))\n\n if (protect) return skip()\n}\n\nfunction mutate (elements, html) {\n elements.forEach(element => alpine.morph(element, html, { updating }))\n}\n\nexport default mutate\n", "import dispatch from './methods/dispatch'\nimport mutate from './methods/mutate'\n\nfunction perform (method, args, receivers) {\n // dispatch / dispatchEvent\n if (method.match(/^dispatch(Event)?$/))\n return dispatch(receivers, args[0], args[1] || {})\n\n // morph / mutate\n if (method.match(/^morph|mutate$/)) return mutate(receivers, args[0])\n\n // property assignment\n if (method.endsWith('='))\n return receivers.forEach(r => (r[method.slice(0, -1).trim()] = args[0]))\n\n // method invocation\n receivers.forEach(r => r[method].apply(r, args))\n}\n\nfunction invoke () {\n const payload = JSON.parse(this.templateContent.textContent)\n const { id, selector, receiver, method, args } = payload\n let receivers = [self]\n if (selector) receivers = Array.from(document.querySelectorAll(selector))\n\n if (receiver) {\n receivers = receivers.map(r => {\n let context = r\n const chain = receiver.split('.')\n while (chain.length > 0) context = context[chain.shift()]\n return context\n })\n }\n\n perform(method, args, receivers)\n}\n\nexport default invoke\n", "import invoke from './invoke'\n\nif (!self['Turbo'])\n throw new Error(\n '`Turbo` is not defined! Be sure to import `turbo_ready` after `@hotwired/turbo` or `@hotwired/turbo-rails`.'\n )\n\nif (!Turbo['StreamActions'])\n throw new Error(\n '`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.'\n )\n\nTurbo.StreamActions.invoke = invoke\nself.TurboReady = { StreamActions: { invoke } }\n\nconsole.info(\n 'TurboReady has initialized and has registered new stream actions with Turbo.'\n)\n", "class Meta {\n get element () {\n return document.querySelector('meta[name=\"turbo-reflex\"]')\n }\n\n get token () {\n return this.element.getAttribute('content')\n }\n\n get busy () {\n return this.element.dataset.busy === 'true'\n }\n\n set busy (value) {\n return (this.element.dataset.busy = !!value)\n }\n}\n\nexport default new Meta()\n", "export const lifecycleEvents = {\n start: 'turbo-reflex:start',\n success: 'turbo-reflex:success',\n finish: 'turbo-reflex:finish',\n abort: 'turbo-reflex:abort',\n clientError: 'turbo-reflex:client-error',\n serverError: 'turbo-reflex:server-error'\n}\n\nexport const stateEvents = {\n stateLoad: 'turbo-reflex:state-load',\n stateChange: 'turbo-reflex:state-change'\n}\n\nexport const allEvents = { ...lifecycleEvents, ...stateEvents }\n\nexport function dispatch (name, target = document, detail = {}, raise = false) {\n try {\n target = target || document\n const event = new CustomEvent(name, {\n detail,\n cancelable: false,\n bubbles: true\n })\n target.dispatchEvent(event)\n } catch (error) {\n if (raise) throw error\n dispatch(lifecycleEvents.clientError, target, { error, ...detail }, true)\n }\n}\n", "import meta from '../meta'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet head\n\nfunction observable (object, parent = null) {\n if (!object || typeof object !== 'object') return object\n\n const proxy = new Proxy(object, {\n deleteProperty (target, key) {\n delete target[key]\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n },\n\n set (target, key, value, receiver) {\n target[key] = observable(value, this)\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n }\n })\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => (object[index] = observable(value, proxy)))\n } else if (typeof object === 'object') {\n for (const [key, value] of Object.entries(object))\n object[key] = observable(value, proxy)\n }\n\n if (!parent) head = proxy\n return proxy\n}\n\nexport default observable\n", "import meta from '../meta'\nimport observable from './observable'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet loadedState, currentState, changedState\nlet loadStateTimeout\n\nfunction loadState () {\n if (!meta.element) return loadStateLater()\n const json = atob(meta.element.dataset.state)\n changedState = {}\n currentState = observable(JSON.parse(json))\n loadedState = { ...currentState }\n delete meta.element.dataset.clientStateChange\n setTimeout(() =>\n dispatch(events.stateLoad, meta.element, { state: currentState })\n )\n}\n\nfunction loadStateLater () {\n clearTimeout(loadStateTimeout)\n loadStateTimeout = setTimeout(loadState, 10)\n}\n\nif (!loadedState) loadState()\n\naddEventListener('DOMContentLoaded', loadStateLater)\naddEventListener('load', loadStateLater)\naddEventListener('turbo:load', loadStateLater)\naddEventListener('turbo:frame-load', loadStateLater)\naddEventListener('turbo-reflex:success', loadStateLater)\n\naddEventListener(events.stateChange, event => {\n changedState = {}\n for (const [key, value] of Object.entries(currentState))\n if (loadedState[key] !== value) changedState[key] = value\n meta.element.dataset.clientStateChange = true\n meta.element.dataset.state = btoa(JSON.stringify(currentState))\n})\n\nexport default {\n events,\n\n get current () {\n return currentState\n },\n\n get delta () {\n return changedState\n },\n\n // The UI state changes are split into chunks and sent to the server in an HTTP request header.\n // Max size for an HTTP header is around 4k or 4,000 bytes.\n // A Base64 character is an 8-bit-padded ASCII character... or 1 byte\n //\n // SEE: lib/state.rb - for info on how `state` is serialized/deserialized\n get payloadChunks () {\n return btoa(JSON.stringify(currentState)).match(/.{1,2000}/g)\n }\n}\n", "function replaceDocument (content) {\n const head = '<html'\n const tail = '</html'\n const headIndex = content.indexOf(head)\n const tailIndex = content.lastIndexOf(tail)\n if (headIndex >= 0 && tailIndex >= 0) {\n const html = content.slice(content.indexOf('>', headIndex) + 1, tailIndex)\n document.documentElement.innerHTML = html\n }\n}\n\nfunction append (content) {\n document.body.insertAdjacentHTML('beforeend', content)\n}\n\nexport default { append, replaceDocument }\n", "const active = {}\n\nfunction add (payload) {\n active[payload.id] = payload\n}\n\nfunction remove (id) {\n delete active[id]\n}\n\nexport default {\n add,\n remove,\n get reflexes () {\n return [...Object.values(active)]\n },\n get length () {\n return Object.keys(active).length\n }\n}\n", "import activity from './activity'\nimport { dispatch, lifecycleEvents as events } from './events'\n\nfunction finish (event) {\n event.detail.endedAt = new Date().getTime()\n event.detail.milliseconds = event.detail.endedAt - event.detail.startedAt\n setTimeout(() => dispatch(events.finish, event.target, event.detail), 20)\n}\n\naddEventListener(events.serverError, finish)\naddEventListener(events.success, finish)\naddEventListener(events.finish, event => activity.remove(event.detail.id), true)\n\nexport default { events }\n", "import meta from './meta'\nimport state from './state'\nimport renderer from './renderer'\nimport { dispatch } from './events'\nimport lifecycle from './lifecycle'\n\nconst frameSources = {}\n\n// fires before making a turbo HTTP request\naddEventListener('turbo:before-fetch-request', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchOptions } = event.detail\n\n // reflex invoked and busy\n if (meta.busy) {\n let acceptHeaders = [\n 'text/vnd.turbo-reflex.html',\n fetchOptions.headers['Accept']\n ]\n acceptHeaders = acceptHeaders\n .filter(entry => entry && entry.trim().length > 0)\n .join(', ')\n fetchOptions.headers['Accept'] = acceptHeaders\n fetchOptions.headers['TurboReflex-Token'] = meta.token\n }\n\n // always send state\n state.payloadChunks.forEach((chunk, i) => {\n fetchOptions.headers[\n `TurboReflex-State-${i.toString().padStart(4, '0')}`\n ] = chunk\n })\n})\n\n// fires after receiving a turbo HTTP response\naddEventListener('turbo:before-fetch-response', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchResponse: response } = event.detail\n\n if (frame) frameSources[frame.id] = frame.src\n\n if (response.header('TurboReflex')) {\n if (response.statusCode < 200 || response.statusCode > 399) {\n const error = `Server returned a ${response.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`\n dispatch(\n lifecycle.events.clientError,\n document,\n { ...event.detail, error },\n true\n )\n }\n\n if (response.header('TurboReflex') === 'Append') {\n event.preventDefault()\n response.responseText.then(content => renderer.append(content))\n }\n }\n})\n\n// fires when a frame element is navigated and finishes loading\naddEventListener('turbo:frame-load', event => {\n const frame = event.target.closest('turbo-frame')\n frame.dataset.turboReflexSrc =\n frameSources[frame.id] || frame.src || frame.dataset.turboReflexSrc\n delete frameSources[frame.id]\n})\n", "const schema = {\n frameAttribute: 'data-turbo-frame',\n methodAttribute: 'data-turbo-method',\n reflexAttribute: 'data-turbo-reflex'\n}\n\nexport default { ...schema }\n", "const events = {}\nlet eventListener\n\nfunction register (eventName, selectors) {\n events[eventName] = selectors\n document.addEventListener(eventName, eventListener, true)\n}\n\nfunction getRegisteredEventNameForElement (element) {\n return Object.keys(events).find(eventName => {\n return !!events[eventName].find(selector =>\n Array.from(document.querySelectorAll(selector)).find(el => el === element)\n )\n })\n}\n\nfunction isRegisteredForElement (eventName, element) {\n return eventName === getRegisteredEventNameForElement(element)\n}\n\nexport default {\n events,\n register,\n isRegisteredForElement,\n set handler (fn) {\n eventListener = fn\n }\n}\n", "import schema from './schema'\nimport lifecycle from './lifecycle'\n\nfunction findClosestReflex (element) {\n return element.closest(`[${schema.reflexAttribute}]`)\n}\n\nfunction findClosestFrame (element) {\n return element.closest('turbo-frame')\n}\n\nfunction assignElementValueToPayload (element, payload = {}) {\n if (element.tagName.toLowerCase() !== 'select')\n return (payload.value = element.value || null)\n\n if (!element.multiple)\n return (payload.value = element.options[element.selectedIndex].value)\n\n payload.values = Array.from(element.options).reduce((memo, option) => {\n if (option.selected) memo.push(option.value)\n return memo\n }, [])\n}\n\nfunction buildAttributePayload (element) {\n const payload = Array.from(element.attributes).reduce((memo, attr) => {\n let value = attr.value\n memo[attr.name] = value\n return memo\n }, {})\n\n payload.tag = element.tagName\n payload.checked = !!element.checked\n payload.disabled = !!element.disabled\n assignElementValueToPayload(element, payload)\n\n // reduce payload size to keep URL length smaller\n delete payload.class\n delete payload.action\n delete payload.href\n delete payload[schema.reflexAttribute]\n delete payload[schema.frameAttribute]\n\n return payload\n}\n\nexport default {\n buildAttributePayload,\n findClosestReflex,\n findClosestFrame\n}\n", "import meta from '../meta'\n\nfunction invokeReflex (form, payload = {}) {\n payload.token = meta.token\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = 'turbo_reflex'\n input.value = JSON.stringify(payload)\n form.appendChild(input)\n}\n\nexport default { invokeReflex }\n", "function build (urlString, payload = {}) {\n const a = document.createElement('a')\n a.href = urlString\n const url = new URL(a)\n url.searchParams.set('turbo_reflex', JSON.stringify(payload))\n return url\n}\n\nexport default { build }\n", "import urls from '../urls'\n\nfunction invokeReflex (frame, payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n frame.src = urls.build(src, payload)\n}\n\nexport default { invokeReflex }\n", "import urls from '../urls'\n\nfunction invokeReflex (element, payload = {}) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n delete payload.href\n element.setAttribute('href', urls.build(src, payload))\n}\n\nexport default { invokeReflex }\n", "import meta from '../meta'\nimport state from '../state'\nimport { dispatch } from '../events'\nimport lifecycle from '../lifecycle'\nimport urls from '../urls'\nimport renderer from '../renderer'\n\nfunction aborted (event) {\n const xhr = event.target\n dispatch(lifecycle.events.abort, document, { xhr, ...event.detail })\n}\n\nfunction errored (event) {\n const xhr = event.target\n\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n\n const error = `Server returned a ${xhr.status} status code! TurboReflex requires 2XX-3XX status codes.`\n\n dispatch(\n lifecycle.events.clientError,\n document,\n { xhr, ...event.detail, error },\n true\n )\n}\n\nfunction loaded (event) {\n const xhr = event.target\n if (xhr.status < 200 || xhr.status > 399) return errored(event)\n const content = xhr.responseText\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n}\n\nfunction invokeReflex (payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n\n try {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', urls.build(src, payload), true)\n xhr.setRequestHeader(\n 'Accept',\n 'text/vnd.turbo-reflex.html, text/html, application/xhtml+xml'\n )\n xhr.setRequestHeader('TurboReflex-Token', meta.token)\n state.payloadChunks.forEach((chunk, i) =>\n xhr.setRequestHeader(\n `TurboReflex-State-${i.toString().padStart(4, '0')}`,\n chunk\n )\n )\n\n xhr.addEventListener('abort', aborted)\n xhr.addEventListener('error', errored)\n xhr.addEventListener('load', loaded)\n xhr.send()\n } catch (ex) {\n const message = `Unexpected error sending HTTP request! ${ex.message}`\n errored(ex, { detail: { message } })\n }\n}\n\nexport default { invokeReflex }\n", "import elements from '../elements'\nimport formDriver from './form'\nimport frameDriver from './frame'\nimport methodDriver from './method'\nimport windowDriver from './window'\n\nfunction src (element, frame) {\n frame = frame || { dataset: {} }\n return (\n element.href || frame.src || frame.dataset.turboReflexSrc || location.href\n )\n}\n\nfunction find (element) {\n let frame = elements.findClosestFrame(element)\n const { turboFrame, turboMethod } = element.dataset\n\n if (element.tagName.toLowerCase() === 'form')\n return {\n name: 'form',\n reason: 'Element is a form.',\n frame,\n src: element.action,\n invokeReflex: formDriver.invokeReflex\n }\n\n if (turboMethod && turboMethod.length > 0)\n return {\n name: 'method',\n reason: 'Element defines data-turbo-method.',\n frame,\n src: element.href,\n invokeReflex: methodDriver.invokeReflex\n }\n\n // element targets a frame that is not _self\n if (turboFrame && turboFrame !== '_self') {\n frame = document.getElementById(turboFrame)\n return {\n name: 'frame',\n reason: 'element targets a frame that is not _self',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n }\n\n // element does NOT target a frame or targets _self and is contained by a frame\n if ((!turboFrame || turboFrame === '_self') && frame)\n return {\n name: 'frame',\n reason:\n 'element does NOT target a frame or targets _self and is contained by a frame',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n\n // element matches one or more of the following conditions\n // - targets _top\n // - does NOT target a frame\n // - is NOT contained by a frame\n return {\n name: 'window',\n reason:\n 'element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)',\n frame: null,\n src: src(element),\n invokeReflex: windowDriver.invokeReflex\n }\n}\n\nexport default { find }\n", "import { allEvents as events } from './events'\n\nlet currentLevel = 'unknown'\n\nconst logLevels = {\n debug: Object.values(events),\n info: Object.values(events),\n warn: [events.abort, events.clientError, events.serverError],\n error: [events.clientError, events.serverError],\n unknown: []\n}\n\nObject.values(events).forEach(name => {\n addEventListener(name, event => {\n if (logLevels[currentLevel].includes(event.type)) {\n const level = currentLevel === 'debug' ? 'log' : currentLevel\n console[level](event.type, { target: event.target, detail: event.detail })\n }\n })\n})\n\nexport default {\n get level () {\n return currentLevel\n },\n set level (value) {\n if (!Object.keys(logLevels).includes(value)) value = 'unknown'\n return (currentLevel = value)\n }\n}\n", "function v4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n}\n\nexport default { v4 }\n", "import 'turbo_ready'\nimport './turbo'\nimport schema from './schema'\nimport { dispatch, allEvents as events } from './events'\nimport activity from './activity'\nimport delegates from './delegates'\nimport drivers from './drivers'\nimport meta from './meta'\nimport elements from './elements'\nimport lifecycle from './lifecycle'\nimport logger from './logger'\nimport state from './state'\nimport urls from './urls'\nimport uuids from './uuids'\n\nfunction invokeReflex (event) {\n let element\n let payload = {}\n\n try {\n element = elements.findClosestReflex(event.target)\n if (!element) return\n if (!delegates.isRegisteredForElement(event.type, element)) return\n\n const driver = drivers.find(element)\n\n // payload sent to server (also used for lifecycle event.detail)\n payload = {\n id: `reflex-${uuids.v4()}`,\n name: element.dataset.turboReflex,\n driver: driver.name,\n src: driver.src,\n frameId: driver.frame ? driver.frame.id : null,\n elementId: element.id.length > 0 ? element.id : null,\n elementAttributes: elements.buildAttributePayload(element),\n startedAt: new Date().getTime()\n }\n\n activity.add(payload)\n dispatch(lifecycle.events.start, element, payload)\n\n if (['frame', 'window'].includes(driver.name)) event.preventDefault()\n\n meta.busy = true\n setTimeout(() => (meta.busy = false), 10)\n\n switch (driver.name) {\n case 'method':\n return driver.invokeReflex(element, payload)\n case 'form':\n return driver.invokeReflex(element, payload)\n case 'frame':\n return driver.invokeReflex(driver.frame, payload)\n case 'window':\n return driver.invokeReflex(payload)\n }\n } catch (error) {\n dispatch(lifecycle.events.clientError, element, {\n error,\n ...payload\n })\n }\n}\n\n// wire things up and setup defaults for event delegation\ndelegates.handler = invokeReflex\ndelegates.register('change', [\n `input[${schema.reflexAttribute}]`,\n `select[${schema.reflexAttribute}]`,\n `textarea[${schema.reflexAttribute}]`\n])\n// delegates.register('mousedown', [\n// `[${schema.reflexAttribute}][${schema.methodAttribute}]`\n// ])\ndelegates.register('submit', [`form[${schema.reflexAttribute}]`])\ndelegates.register('click', [`[${schema.reflexAttribute}]`])\n\nself.TurboReflex = {\n logger,\n schema,\n registerEventDelegate: delegates.register,\n get eventDelegates () {\n return { ...delegates.events }\n },\n get events () {\n return { ...events }\n },\n get state () {\n return state.current\n },\n // delta of state changes made on the client\n get stateDelta () {\n return state.delta\n }\n}\n\nexport default self.TurboReflex\n", "export default class ReflexElement extends HTMLElement {\n constructor () {\n super()\n this.devtool = 'unknown'\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = '<slot></slot>'\n }\n\n connectedCallback () {\n this.ensureId()\n this.dataset.elementOrigin = 'hopsoft/reflex_behaviors'\n }\n\n ensureId () {\n if (this.id.trim().length) return\n this.id = `${this.tagName}-${this.uuidv4()}`.toLowerCase()\n }\n\n // SEE: https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid\n uuidv4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n }\n\n get viewStack () {\n if (!this.dataset.viewStack) return []\n return JSON.parse(this.dataset.viewStack)\n }\n\n get partial () {\n return this.viewStack[0]\n }\n}\n", "import ReflexElement from './reflex_element'\n\nexport default class ToggleTargetElement extends ReflexElement {}\n", "export function template (html) {\n let template = document.createElement('template')\n template.innerHTML = html\n return template\n}\n\nexport function appendHTML (html, parent) {\n parent = parent || document.body\n const clone = template(html).content.cloneNode(true)\n const child = clone.querySelector('*')\n return parent.appendChild(child)\n}\n\nexport function addHighlight (element, options = {}) {\n if (!element) return\n removeHighlight(element)\n let { outline, outlineOffset } = options\n\n outline = outline || 'dashed 3px red'\n outlineOffset = outlineOffset || '0px'\n\n element.originalStyles = element.originalStyles || {\n display: element.style.display,\n minHeight: element.style.minHeight,\n minWidth: element.style.minWidth,\n outline: element.style.outline,\n outlineOffset: element.style.outlineOffset\n }\n\n if (\n getComputedStyle(element).display.match(/^inline$/i) &&\n element.offsetWidth === 0 &&\n element.offsetHeight === 0\n ) {\n element.style.display = 'inline-block'\n element.style.minHeight = '2px'\n element.style.minWidth = '2px'\n }\n element.style.outline = outline\n element.style.outlineOffset = outlineOffset\n element.dataset.reflexBehaviorsHighlight = true\n}\n\nexport function removeHighlight (element) {\n if (!element) return\n if (element.originalStyles) {\n for (const [key, value] of Object.entries(element.originalStyles))\n value ? (element.style[key] = value) : (element.style[key] = '')\n delete element.originalStyles\n }\n delete element.dataset.reflexBehaviorsHighlight\n}\n\nexport function coordinates (element) {\n if (!element) return {}\n const rect = element.getBoundingClientRect()\n return {\n left: rect.left + window.scrollX,\n top: rect.top + window.scrollY,\n width: element.offsetWidth,\n height: element.offsetHeight\n }\n}\n", "export default class DevtoolElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.labelElement.addEventListener('click', event => {\n event.preventDefault()\n this.toggle()\n })\n this.checkboxElement.addEventListener('change', event =>\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n )\n }\n\n toggle () {\n this.checked ? this.uncheck() : this.check()\n }\n\n check () {\n this.checkboxElement.checked = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n uncheck () {\n this.checkboxElement.checked = false\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }))\n }\n\n get name () {\n return this.getAttribute('name')\n }\n\n get checked () {\n return this.checkboxElement.checked\n }\n\n get checkboxElement () {\n return this.shadowRoot.querySelector('input')\n }\n\n get labelElement () {\n return this.shadowRoot.querySelector('label')\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <input name=\"checkbox\" type=\"checkbox\">\n <label for=\"checkbox\"><slot name=\"label\"></slot></label>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host, :host * {\n cursor: pointer;\n }\n\n div {\n display: flex;\n position: relative;\n top: -1px;\n }\n\n input:checked + label{\n font-weight: bold;\n }\n\n label {\n color: indigo;\n }\n `\n }\n}\n", "import { appendHTML } from '../../utils/dom'\n\nexport default class SupervisorElement extends HTMLElement {\n constructor () {\n super()\n this.enabledDevtools = {}\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n this.shadowRoot.querySelector('button').addEventListener('click', () =>\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-close', {\n bubbles: true\n })\n )\n )\n\n this.addEventListener('change', event => {\n const devtoolElement = event.target\n const { checked, name } = devtoolElement\n checked ? this.enableDevtool(name) : this.disableDevtool(name)\n })\n }\n\n enableDevtool (name) {\n if (this.enabledDevtools[name]) return\n this.enabledDevtools[name] = true\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtool-enable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n disableDevtool (name) {\n if (!this.enabledDevtools[name]) return\n delete this.enabledDevtools[name]\n this.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtool-disable', {\n bubbles: true,\n detail: { name: name }\n })\n )\n }\n\n close () {\n this.devtoolElements.forEach(el => {\n if (el.checked) el.uncheck()\n })\n this.remove()\n }\n\n get devtoolElements () {\n return this.querySelectorAll('[slot=\"devtool\"]')\n }\n\n get closeElement () {\n return this.querySelector('button')\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <label>ReflexBehaviors</label>\n <slot name=\"devtool\"></slot>\n <button>\u2715</button>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host {\n background-color: lavender;\n border-radius: 15px;\n bottom: 20px;\n display: block;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n left: 50%;\n outline-offset: 1px;\n outline: solid 3px indigo;\n padding: 5px 10px;\n position: fixed;\n transform: translateX(-50%);\n z-index: 8999;\n }\n\n * {\n -webkit-user-select: none;\n font-family: helvetica, sans-serif;\n font-size: 1rem;\n user-select: none;\n }\n\n label {\n color: indigo;\n cursor: grab;\n opacity: 0.5;\n }\n\n div {\n display: flex;\n gap: 0 5px;\n position: relative;\n }\n\n button {\n background-color: thistle;\n border-radius: 50%;\n border: none;\n color: indigo;\n cursor: pointer;\n font-size: 10px;\n height: 18px;\n line-height: 18px;\n margin: 0 -5px 0 10px;\n outline: solid 1px indigo;\n padding: 0 2px;\n position: relative;\n top: 1px;\n width: 18px;\n opacity: 0.5;\n }\n\n button:hover {\n opacity: 1;\n }\n `\n }\n}\n", "export default class TooltipElement extends HTMLElement {\n constructor () {\n super()\n this.attachShadow({ mode: 'open' })\n this.shadowRoot.innerHTML = this.html\n }\n\n get color () {\n return this.getAttribute('color') || 'darkslategray'\n }\n\n get backgroundColor () {\n return this.getAttribute('background-color') || 'gainsboro'\n }\n\n get position () {\n return this.getAttribute('position') || 'top'\n }\n\n get html () {\n return `\n <style>${this.stylesheet}</style>\n <div>\n <slot name=\"title\"></slot>\n <slot name=\"content-top\"></slot>\n <slot name=\"content\"></slot>\n <slot name=\"content-bottom\"></slot>\n </div>\n `\n }\n\n get stylesheet () {\n return `\n :host {\n display: block;\n position: absolute;\n z-index: 8999;\n }\n\n * {\n color: ${this.color}\n font-size: 1rem;\n }\n\n div {\n background-color: ${this.backgroundColor};\n border-radius: 15px;\n filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));\n font-family: monospace;\n min-height: 30px;\n min-width: 100px;\n opacity: 0.9;\n outline-offset: 1px;\n outline: dashed 3px ${this.color};\n padding: 8px 12px 8px 12px;\n position: relative;\n white-space: nowrap;\n }\n\n slot[name=\"title\"] {\n border-bottom: dotted 1px ${this.color};\n color: ${this.color};\n display: inline-block;\n font-weight: bold;\n margin-bottom: 8px;\n padding-bottom: 8px;\n width: 100%;\n }\n\n slot[name=\"content-top\"] {\n color: ${this.color};\n font-weight: normal;\n opacity: 0.7;\n }\n\n slot[name=\"content\"] {\n color: ${this.color};\n font-weight: normal;\n opacity: 0.7;\n }\n\n slot[name=\"content-bottom\"] {\n color: red;\n font-weight: normal;\n opacity: 0.7;\n }\n `\n }\n}\n", "const added = []\n\nconst dependencies = {\n LeaderLine: {\n src:\n 'https://cdnjs.cloudflare.com/ajax/libs/leader-line/1.0.7/leader-line.min.js',\n integrity:\n 'sha512-0dNdzMjpT6pJdFGF1DwybFCfm3K/lzHhxaMXC/92J9/DZujHlqYFqmhTOAoD0o+LkeEsVK2ar/ESs7/Q2B6wJg==',\n global: 'LeaderLine'\n },\n\n PlainDraggable: {\n src:\n 'https://cdn.jsdelivr.net/npm/plain-draggable@2.5.14/plain-draggable.min.js',\n global: 'PlainDraggable'\n }\n}\n\nfunction exists (dependency) {\n if (dependency.global && self[dependency.global]) return true\n if (document.querySelector(`[src='${dependency.src}']`)) return true\n return added.includes(dependency)\n}\n\nfunction add (dependency) {\n if (exists(dependency)) return\n added.push(dependency)\n\n const { src, integrity } = dependency\n const script = document.createElement('script')\n script.setAttribute('src', src)\n script.setAttribute('crossorigin', 'anonymous')\n script.setAttribute('referrerpolicy', 'no-referrer')\n if (integrity) script.setAttribute('integrity', integrity)\n document.head.appendChild(script)\n}\n\nfunction remove (dependency) {\n if (!added.includes(dependency)) return\n added.splice(added.indexOf(dependency), 1)\n\n const { src } = dependency\n const el = document.querySelector(`script[src='${src}']`)\n if (el) el.remove()\n if (dependency.global && self[dependency.global])\n self[dependency.global] = null\n}\n\nfunction removeAll () {\n ;[...added].forEach(dependency => remove(dependency))\n}\n\nexport default { ...dependencies, add, remove, removeAll }\n", "import { appendHTML } from '../utils/dom'\nimport DevtoolElement from './elements/devtool_element'\nimport SupervisorElement from './elements/supervisor_element'\nimport TooltipElement from './elements/tooltip_element'\nimport dependencies from './dependencies'\n\ncustomElements.define('reflex-behaviors-devtool', DevtoolElement)\ncustomElements.define('reflex-behaviors-devtool-supervisor', SupervisorElement)\ncustomElements.define('reflex-behaviors-devools-tooltip', TooltipElement)\n\nlet supervisorElement\n\nfunction makeDraggable () {\n if (!supervisorElement) return\n try {\n new PlainDraggable(supervisorElement)\n } catch {\n setTimeout(makeDraggable, 200)\n }\n}\n\nfunction stop () {\n if (stopped()) return\n supervisorElement.close()\n supervisorElement.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-stop', {\n bubbles: true\n })\n )\n supervisorElement = null\n dependencies.removeAll()\n}\n\nfunction start () {\n if (started()) return\n dependencies.add(dependencies.LeaderLine)\n dependencies.add(dependencies.PlainDraggable)\n supervisorElement = appendHTML(\n '<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>'\n )\n setTimeout(makeDraggable, 200)\n supervisorElement.dispatchEvent(\n new CustomEvent('reflex-behaviors:devtools-start', {\n bubbles: true\n })\n )\n}\n\nfunction restart () {\n const enabledList = supervisorElement\n ? Object.keys(supervisorElement.enabledDevtools)\n : []\n\n stop()\n start()\n\n supervisorElement.devtoolElements.forEach(el => {\n if (enabledList.includes(el.name)) el.check()\n })\n}\n\nfunction started () {\n return !!supervisorElement\n}\n\nfunction stopped () {\n return !started()\n}\n\nlet restartTimeout\nfunction debouncedRestart () {\n clearTimeout(restartTimeout)\n restartTimeout = setTimeout(restart, 25)\n}\n\nfunction autoRestart () {\n if (started()) debouncedRestart()\n}\n\naddEventListener('turbo:load', autoRestart)\naddEventListener('turbo-frame:load', autoRestart)\naddEventListener('turbo-reflex:success', autoRestart)\naddEventListener('turbo-reflex:finish', autoRestart)\naddEventListener('reflex-behaviors:devtools-close', stop)\n\nfunction register (name, label) {\n if (!supervisorElement) return\n return appendHTML(\n `\n <reflex-behaviors-devtool name=\"${name}\" slot=\"devtool\">\n <span slot=\"label\">${label}</span>\n </reflex-behaviors-devtool>\n `,\n supervisorElement\n )\n}\n\nfunction enabled (name) {\n if (!supervisorElement) return false\n return supervisorElement.enabledDevtools[name]\n}\n\nexport default {\n enabled,\n register,\n start,\n stop,\n restart: debouncedRestart,\n get started () {\n return started()\n },\n get stopped () {\n return stopped()\n }\n}\n", "import {\n appendHTML,\n addHighlight,\n coordinates,\n removeHighlight\n} from '../utils/dom'\nimport supervisor from './supervisor'\n\nlet activeToggle\n\ndocument.addEventListener('reflex-behaviors:devtools-start', () =>\n supervisor.register('toggle', 'toggles<small>(trigger/target)</small>')\n)\n\nfunction appendTooltip (title, content, options = {}) {\n let { backgroundColor, color, position } = options\n color = color || 'white'\n position = position || 'top'\n return appendHTML(`\n <reflex-behaviors-devools-tooltip position=\"${position}\" background-color=\"${backgroundColor}\" color=\"${color}\">\n <div slot='title'>${title}</div>\n ${content}\n </reflex-behaviors-devools-tooltip>\n `)\n}\n\nexport default class ToggleDevtool {\n constructor (trigger) {\n this.name = 'toggle'\n this.reflex = trigger.dataset.turboReflex\n this.trigger = trigger\n this.target = trigger.target\n\n document.addEventListener('reflex-behaviors:devtool-enable', event => {\n const { name } = event.detail\n if (name === this.name) {\n addHighlight(this.trigger, {\n outline: '3px dashed blueviolet',\n outlineOffset: '2px'\n })\n }\n })\n\n document.addEventListener('reflex-behaviors:devtool-disable', event => {\n const { name } = event.detail\n if (name === this.name) removeHighlight(this.trigger)\n })\n\n let hideTimeout\n const debouncedHide = () => {\n clearTimeout(hideTimeout)\n hideTimeout = setTimeout(this.hide(true), 25)\n }\n\n addEventListener('click', event => {\n if (event.target.closest('reflex-behaviors-devools-tooltip')) return\n debouncedHide()\n })\n\n addEventListener('turbo:load', debouncedHide)\n addEventListener('turbo-frame:load', debouncedHide)\n addEventListener('turbo-reflex:success', debouncedHide)\n addEventListener('turbo-reflex:finish', debouncedHide)\n }\n\n get enabled () {\n return supervisor.enabled(this.name)\n }\n\n show () {\n if (!this.enabled) return\n if (activeToggle === this) return\n activeToggle = this\n this.hide()\n\n addHighlight(this.target, {\n outline: '3px dashed darkcyan',\n outlineOffset: '-2px'\n })\n\n addHighlight(this.trigger.renderingElement, {\n outline: '3px dashed chocolate',\n outlineOffset: '3px'\n })\n\n const renderingTooltip = this.createRenderingTooltip()\n const targetTooltip = this.createTargetTooltip()\n this.createTriggerTooltip(targetTooltip, renderingTooltip)\n\n document\n .querySelectorAll('.leader-line')\n .forEach(el => (el.style.zIndex = 100000))\n\n const data = {\n rendering: {\n partial: this.trigger.renderingPartial,\n id: this.trigger.renderingInfo.id,\n status: this.trigger.renderingElement ? 'OK' : 'Not Found'\n },\n trigger: { partial: null, id: null, status: 'Not Found' },\n target: { partial: null, id: null, status: 'Not Found' }\n }\n\n if (this.trigger)\n data.trigger = {\n partial: this.trigger.partial,\n id: this.trigger.id,\n status: 'OK'\n }\n\n if (this.target)\n data.target = {\n partial: this.target.partial,\n id: this.target.id,\n status: 'OK'\n }\n\n console.table(data)\n }\n\n hide (clearActiveToggle) {\n document.querySelectorAll('.leader-line').forEach(el => el.remove())\n document\n .querySelectorAll('reflex-behaviors-devools-tooltip')\n .forEach(el => el.remove())\n\n document\n .querySelectorAll('[data-reflex-behaviors-highlight]')\n .forEach(el => {\n if (!el.tagName.match(/toggle-trigger/i)) removeHighlight(el)\n })\n\n if (clearActiveToggle) activeToggle = null\n }\n\n createRenderingTooltip () {\n if (!this.trigger.renderingElement)\n return console.debug(\n `Unable to create the rendering tooltip! No element matches the DOM id: '${this.trigger.renderingInfo.id}'`\n )\n\n const title = `RENDERING (id: ${this.trigger.renderingElement.id ||\n 'unknown'})`\n const content = `<div slot=\"content\">partial: ${this.trigger.renderingPartial}</div>`\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lightyellow',\n color: 'chocolate'\n })\n\n const coords = coordinates(this.trigger.renderingElement)\n const top = Math.ceil(\n coords.top + coords.height / 2 - tooltip.offsetHeight / 2\n )\n const left = Math.ceil(coords.left + coords.width + 100)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.trigger.renderingElement, {\n ...this.leaderLineOptions,\n color: 'chocolate'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTargetTooltip () {\n if (!this.target)\n return console.debug(\n `Unable to create the target tooltip! No element matches the DOM id: '${this.trigger.controls}'`\n )\n\n const title = `TARGET (id: ${this.target.id})`\n const content = this.target.viewStack\n .reverse()\n .map((view, index) => {\n return this.trigger.sharedViews.includes(view)\n ? `<div slot=\"content-top\">${index + 1}. ${view}</div>`\n : `<div slot=\"content-bottom\">${index + 1}. ${view}</div>`\n }, this)\n .join('')\n\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lightcyan',\n color: 'darkcyan',\n position: 'bottom'\n })\n\n const coords = coordinates(this.target)\n const top = Math.ceil(coords.top + tooltip.offsetHeight)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(tooltip, this.target, {\n ...this.leaderLineOptions,\n color: 'darkcyan'\n })\n\n tooltip.drag = new PlainDraggable(tooltip)\n return tooltip\n }\n\n createTriggerTooltip (targetTooltip, renderingTooltip) {\n if (!this.trigger) return\n const title = `TRIGGER (controls: ${this.trigger.controls})`\n const content = this.trigger.viewStack\n .reverse()\n .map((view, index) => {\n return this.trigger.sharedViews.includes(view)\n ? `<div slot=\"content-top\">${index + 1}. ${view}</div>`\n : `<div slot=\"content-bottom\">${index + 1}. ${view}</div>`\n }, this)\n .join('')\n\n const tooltip = appendTooltip(title, content, {\n backgroundColor: 'lavender',\n color: 'blueviolet'\n })\n\n const coords = coordinates(this.trigger)\n const top = Math.ceil(coords.top - tooltip.offsetHeight * 2)\n const left = Math.ceil(coords.left + coords.width + tooltip.offsetWidth / 3)\n tooltip.style.top = `${top}px`\n tooltip.style.left = `${left}px`\n\n tooltip.line = new LeaderLine(this.trigger, tooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet'\n })\n\n if (targetTooltip) {\n tooltip.lineToTarget = new LeaderLine(tooltip, targetTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: 'toggles',\n size: 2.1\n })\n\n targetTooltip.drag.onMove = () => {\n targetTooltip.line.position()\n tooltip.lineToTarget.position()\n tooltip.lineToRendering.position()\n }\n }\n\n if (renderingTooltip) {\n tooltip.lineToRendering = new LeaderLine(tooltip, renderingTooltip, {\n ...this.leaderLineOptions,\n color: 'blueviolet',\n middleLabel: 'renders',\n size: 2.1\n })\n\n renderingTooltip.drag.onMove = () => {\n renderingTooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n tooltip.lineToRendering.position()\n }\n }\n\n tooltip.drag = new PlainDraggable(tooltip)\n tooltip.drag.onMove = () => {\n tooltip.line.position()\n if (tooltip.lineToTarget) tooltip.lineToTarget.position()\n if (tooltip.lineToRendering) tooltip.lineToRendering.position()\n }\n\n return tooltip\n }\n\n get leaderLineOptions () {\n return {\n dash: { animation: true },\n dropShadow: { opacity: 0.3 },\n endPlug: 'arrow3',\n endPlugSize: 1.7,\n size: 3,\n startPlug: 'disc',\n startPlugSize: 1\n }\n }\n}\n", "import ReflexElement from './reflex_element'\nimport DevtoolSupervisor from '../devtools/supervisor'\nimport ToggleDevtool from '../devtools/toggle'\n\nexport default class ToggleTriggerElement extends ReflexElement {\n connectedCallback () {\n super.connectedCallback()\n const mouseenter = () => this.devtool.show()\n\n document.addEventListener('reflex-behaviors:devtools-start', () => {\n this.devtool = new ToggleDevtool(this)\n this.addEventListener('mouseenter', mouseenter)\n })\n\n document.addEventListener('reflex-behaviors:devtools-stop', () => {\n this.removeEventListener('mouseenter', mouseenter)\n delete this.devtool\n })\n\n if (DevtoolSupervisor.started) DevtoolSupervisor.restart()\n }\n\n collapse () {\n try {\n this.target.remove()\n this.setAttribute('aria-expanded', false)\n } catch (error) {\n console.error('Failed to collapse toggle-trigger target!', error)\n }\n }\n\n get sharedViews () {\n if (!this.target) return []\n if (!this.target.viewStack) return []\n const reducer = (memo, view) => {\n if (this.target.viewStack.includes(view)) memo.push(view)\n return memo\n }\n return this.viewStack.reduce(reducer.bind(this), [])\n }\n\n get renderingInfo () {\n if (!this.dataset.render) return {}\n return JSON.parse(this.dataset.render)\n }\n\n get renderingPartial () {\n return this.renderingInfo.partial\n }\n\n get renderingElement () {\n const { id } = this.renderingInfo\n if (!id) return null\n return document.getElementById(id)\n }\n\n get expanded () {\n return this.getAttribute('aria-expanded') === 'true'\n }\n\n get controls () {\n return this.getAttribute('aria-controls')\n }\n\n get target () {\n return document.getElementById(this.controls)\n }\n\n get active () {\n return this.getAttribute('data-active') === 'true'\n }\n\n set active (value) {\n this.setAttribute('data-active', !!value)\n }\n}\n\naddEventListener(\n TurboReflex.events.start,\n event => (event.target.active = true)\n)\naddEventListener(\n TurboReflex.events.success,\n event => (event.target.active = false)\n)\naddEventListener(\n TurboReflex.events.finish,\n event => (event.target.active = false)\n)\n\naddEventListener('click', event => {\n if (event.target.tagName.match(/reflex-behaviors-devtool/i)) return\n setTimeout(() => {\n const selector =\n 'toggle-trigger[aria-controls][aria-expanded=\"true\"][data-auto-collapse=\"true\"]'\n document.querySelectorAll(selector).forEach(trigger => trigger.collapse())\n })\n})\n", "import ToggleTargetElement from './toggle_target_element'\nimport ToggleTriggerElement from './toggle_trigger_element'\n\ncustomElements.define('toggle-target', ToggleTargetElement)\ncustomElements.define('toggle-trigger', ToggleTriggerElement)\n", "import supervisor from './supervisor'\n\nconst { restart, start, stop } = supervisor\n\nexport default { restart, start, stop }\n", "import 'turbo_reflex'\nimport './elements'\nimport devtools from './devtools'\n\nself.ReflexBehaviors = { devtools }\n"],
5
+ "mappings": "AAAA,SAASA,GAAUC,EAASC,EAAMC,EAAU,CAAC,EAAG,CAC9C,IAAMC,EAAM,IAAI,YAAYF,EAAMC,CAAO,EACzCF,EAAQ,QAAQI,GAAKA,EAAE,cAAcD,CAAG,CAAC,CAC3C,CAEA,IAAOE,GAAQN,GCJf,IAAIO,GAAe,GACfC,GAAW,GACXC,GAAQ,CAAC,EACb,SAASC,GAAUC,EAAU,CAC3BC,GAASD,CAAQ,CACnB,CACA,SAASC,GAASC,EAAK,CAChBJ,GAAM,SAASI,CAAG,GACrBJ,GAAM,KAAKI,CAAG,EAChBC,GAAW,CACb,CACA,SAASC,GAAWF,EAAK,CACvB,IAAIG,EAAQP,GAAM,QAAQI,CAAG,EACzBG,IAAU,IACZP,GAAM,OAAOO,EAAO,CAAC,CACzB,CACA,SAASF,IAAa,CAChB,CAACN,IAAY,CAACD,KAChBA,GAAe,GACf,eAAeU,EAAS,EAE5B,CACA,SAASA,IAAY,CACnBV,GAAe,GACfC,GAAW,GACX,QAASU,EAAI,EAAGA,EAAIT,GAAM,OAAQS,IAChCT,GAAMS,GAAG,EAEXT,GAAM,OAAS,EACfD,GAAW,EACb,CAGA,IAAIW,GACAC,GACAC,GACAC,GACAC,GAAiB,G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AAY,CACd,OAAO,KAAK,aAAa,eAAe,CAC1C,CAEA,IAAI,QAAU,CACZ,OAAO,SAAS,eAAe,KAAK,QAAQ,CAC9C,CAEA,IAAI,QAAU,CACZ,OAAO,KAAK,aAAa,aAAa,IAAM,MAC9C,CAEA,IAAI,OAAQC,EAAO,CACjB,KAAK,aAAa,cAAe,CAAC,CAACA,CAAK,CAC1C,CACF,EAEA,iBACE,YAAY,OAAO,MACnBC,GAAUA,EAAM,OAAO,OAAS,EAClC,EACA,iBACE,YAAY,OAAO,QACnBA,GAAUA,EAAM,OAAO,OAAS,EAClC,EACA,iBACE,YAAY,OAAO,OACnBA,GAAUA,EAAM,OAAO,OAAS,EAClC,EAEA,iBAAiB,QAASA,GAAS,CAC7BA,EAAM,OAAO,QAAQ,MAAM,2BAA2B,GAC1D,WAAW,IAAM,CACf,IAAMC,EACJ,iFACF,SAAS,iBAAiBA,CAAQ,EAAE,QAAQC,GAAWA,EAAQ,SAAS,CAAC,CAC3E,CAAC,CACH,CAAC,EC9FD,eAAe,OAAO,gBAAiBC,EAAmB,EAC1D,eAAe,OAAO,iBAAkBC,EAAoB,ECF5D,GAAM,CAAE,QAAAC,GAAS,MAAAC,GAAO,KAAAC,EAAK,EAAIC,EAE1BC,GAAQ,CAAE,QAAAJ,GAAS,MAAAC,GAAO,KAAAC,EAAK,ECAtC,KAAK,gBAAkB,CAAE,SAAAG,EAAS",
6
+ "names": ["dispatch", "targets", "name", "options", "evt", "t", "dispatch_default", "flushPending", "flushing", "queue", "scheduler", "callback", "queueJob", "job", "queueFlush", "dequeueJob", "index", "flushJobs", "i", "reactive", "effect", "release", "raw", "shouldSchedule", "disableEffectScheduling", "setReactivityEngine", "engine", "task", "overrideEffect", "override", "elementBoundEffect", "el", "cleanup2", "effectReference", "onAttributeAddeds", "onElRemoveds", "onElAddeds", "onElAdded", "onElRemoved", "onAttributesAdded", "onAttributeRemoved", "name", "cleanupAttributes", "names", "value", "observer", "onMutate", "currentlyObserving", "startObservingMutations", "stopObservingMutations", "flushObserver", "recordQueue", "willProcessRecordQueue", "processRecordQueue", "mutateDom", "result", "isCollecting", "deferredMutations", "deferMutations", "flushAndStopDeferringMutations", "mutations", "addedNodes", "removedNodes", "addedAttributes", "removedAttributes", "node", "oldValue", "add2", "remove", "attrs", "scope", "mergeProxies", "closestDataStack", "addScopeToNode", "data2", "referenceNode", "refreshScope", "element", "scope2", "existingScope", "key", "objects", "thisProxy", "target", "obj", "descriptor", "getter", "setter", "property", "closestObjectWithKey", "initInterceptors", "isObject2", "val", "recurse", "basePath", "enumerable", "path", "interceptor", "mutateObj", "get", "set", "initialValue", "initialize", "innerValue", "carry", "segment", "magics", "magic", "injectMagics", "utilities", "getElementBoundUtilities", "tryCatch", "expression", "args", "e", "handleError", "error2", "shouldAutoEvaluateFunctions", "dontAutoEvaluateFunctions", "cache", "evaluate", "extras", "evaluateLater", "theEvaluatorFunction", "normalEvaluator", "setEvaluator", "newEvaluator", "overriddenMagics", "dataStack", "generateEvaluatorFromFunction", "evaluator", "generateEvaluatorFromString", "func", "receiver", "params", "runIfTypeOfFunction", "evaluatorMemo", "generateFunctionFromString", "AsyncFunction", "rightSideSafeExpression", "completeScope", "promise", "prefixAsString", "prefix", "subject", "setPrefix", "newPrefix", "directiveHandlers", "directive", "directives", "attributes", "originalAttributeOverride", "vAttributes", "staticAttributes", "attributesOnly", "attribute", "attr", "transformedAttributeMap", "toTransformedAttributes", "newName", "oldName", "outNonAlpineAttributes", "toParsedDirectives", "byPriority", "directive2", "getDirectiveHandler", "isDeferringHandlers", "directiveHandlerStacks", "currentHandlerStackKey", "deferHandlingDirectives", "flushHandlers", "stopDeferring", "cleanups", "effect3", "cleanupEffect", "alpine_default", "noop", "handler3", "fullHandler", "startingWith", "replacement", "into", "newValue", "attributeTransformers", "transform", "mapAttributes", "alpineAttributeRegex", "typeMatch", "valueMatch", "modifiers", "original", "DEFAULT", "directiveOrder", "a", "b", "typeA", "typeB", "dispatch", "detail", "tickStack", "isHolding", "nextTick", "releaseNextTicks", "res", "holdNextTicks", "walk", "el2", "skip", "warn", "message", "start", "initTree", "destroyTree", "handle", "outNestedComponents", "closestRoot", "allSelectors", "rootSelectorCallbacks", "initSelectorCallbacks", "rootSelectors", "fn", "addRootSelector", "selectorCallback", "addInitSelector", "includeInitSelectors", "findClosest", "selector", "isRoot", "walker", "root", "setClasses", "setClassesFromString", "setClassesFromObject", "classString", "split", "classString2", "missingClasses", "addClassesAndReturnUndo", "classes", "classObject", "forAdd", "bool", "forRemove", "added", "removed", "setStyles", "setStylesFromObject", "setStylesFromString", "previousStyles", "value2", "kebabCase", "once", "fallback", "called", "evaluate2", "registerTransitionsFromClassString", "registerTransitionsFromHelper", "stage", "registerTransitionObject", "doesntSpecify", "transitioningIn", "transitioningOut", "wantsAll", "wantsOpacity", "wantsScale", "opacityValue", "scaleValue", "modifierValue", "delay", "origin", "durationIn", "durationOut", "easing", "setFunction", "defaultValue", "before", "after", "transition", "show", "hide", "nextTick2", "clickAwayCompatibleShow", "resolve", "reject", "closest", "closestHide", "hideAfterChildren", "parent", "during", "start2", "end", "undoStart", "undoDuring", "undoEnd", "performTransition", "stages", "interrupted", "reachedBefore", "reachedEnd", "finish", "duration", "rawValue", "match", "isCloning", "skipDuringClone", "clone", "oldEl", "newEl", "dontRegisterReactiveSideEffects", "cloneTree", "hasRunThroughFirstEl", "el3", "callback2", "storedEffect", "bind", "camelCase", "bindInputValue", "bindStyles", "bindClasses", "bindAttribute", "checkedAttrLooseCompare", "updateSelect", "attributeShouldntBePreservedIfFalsy", "isBooleanAttr", "setIfChanged", "attrName", "arrayWrappedValue", "option", "char", "valueA", "valueB", "getBinding", "debounce", "wait", "timeout", "context", "later", "throttle", "limit", "inThrottle", "plugin", "stores", "isReactive", "store", "getStores", "binds", "bind2", "bindings", "getBindings", "applyBindingsObject", "injectBindingProviders", "cleanupRunners", "datas", "data", "injectDataProviders", "Alpine", "makeMap", "str", "expectsLowerCase", "map", "list", "specialBooleanAttrs", "isBooleanAttr2", "makeMap", "EMPTY_OBJ", "EMPTY_ARR", "extend", "hasOwnProperty", "hasOwn", "val", "key", "isArray", "isMap", "toTypeString", "isString", "isSymbol", "isObject", "objectToString", "value", "toRawType", "isIntegerKey", "cacheStringFunction", "fn", "cache", "str", "camelizeRE", "camelize", "_", "c", "hyphenateRE", "hyphenate", "capitalize", "toHandlerKey", "hasChanged", "oldValue", "targetMap", "effectStack", "activeEffect", "ITERATE_KEY", "MAP_KEY_ITERATE_KEY", "isEffect", "effect2", "options", "effect3", "createReactiveEffect", "stop", "cleanup", "uid", "enableTracking", "resetTracking", "deps", "i", "shouldTrack", "trackStack", "pauseTracking", "last", "track", "target", "type", "depsMap", "dep", "trigger", "newValue", "oldTarget", "effects", "add2", "effectsToAdd", "key2", "run", "isNonTrackableKeys", "builtInSymbols", "get2", "createGetter", "shallowGet", "readonlyGet", "shallowReadonlyGet", "arrayInstrumentations", "method", "args", "arr", "toRaw", "l", "res", "isReadonly", "shallow", "receiver", "shallowReadonlyMap", "readonlyMap", "shallowReactiveMap", "reactiveMap", "targetIsArray", "isRef", "readonly", "reactive2", "set2", "createSetter", "shallowSet", "hadKey", "result", "deleteProperty", "has", "ownKeys", "mutableHandlers", "readonlyHandlers", "shallowReactiveHandlers", "shallowReadonlyHandlers", "toReactive", "toReadonly", "toShallow", "getProto", "v", "get$1", "isShallow", "rawTarget", "rawKey", "has2", "wrap", "has$1", "size", "add", "set$1", "get3", "checkIdentityKeys", "deleteEntry", "clear", "hadItems", "createForEach", "callback", "thisArg", "observed", "createIterableMethod", "targetIsMap", "isPair", "isKeyOnly", "innerIterator", "done", "createReadonlyMethod", "mutableInstrumentations", "shallowInstrumentations", "readonlyInstrumentations", "shallowReadonlyInstrumentations", "iteratorMethods", "createInstrumentationGetter", "instrumentations", "mutableCollectionHandlers", "shallowCollectionHandlers", "readonlyCollectionHandlers", "shallowReadonlyCollectionHandlers", "targetTypeMap", "rawType", "getTargetType", "createReactiveObject", "baseHandlers", "collectionHandlers", "proxyMap", "existingProxy", "targetType", "proxy", "r", "magic", "nextTick", "el", "dispatch", "evaluateLater2", "evaluate2", "firstTime", "effectReference", "getStores", "scope", "closestRoot", "mergeProxies", "getArrayOfRefObject", "refObjects", "currentEl", "globalIdMemo", "findAndIncrementId", "name", "closestIdRoot", "findClosest", "element", "setIdRoot", "root", "id", "warnMissingPluginMagic", "magicName", "slug", "warn", "directive", "expression", "func", "innerGet", "evaluateInnerSet", "innerSet", "initialValue", "outerGet", "outerSet", "cleanup2", "clone2", "eventName", "e", "addScopeToNode", "mutateDom", "initTree", "handler", "modifiers", "evaluateLater", "on", "event", "listenerTarget", "handler3", "wrapHandler", "callback2", "wrapper", "dotSyntax", "camelCase2", "next", "isKeyEvent", "isListeningForASpecificKeyThatHasntBeenPressed", "nextModifier", "wait", "isNumeric", "debounce", "throttle", "subject", "match", "char", "kebabCase2", "keyModifiers", "debounceIndex", "keyToModifiers", "selectedSystemKeyModifiers", "modifier", "modifierToKeyMap", "assignmentExpression", "evaluateAssignment", "assigmentFunction", "generateAssignmentFunction", "removeListener", "evaluateSetModel", "bind", "currentValue", "safeParseNumber", "el2", "checkedAttrLooseCompare2", "option", "rawValue", "number", "isNumeric2", "valueA", "valueB", "prefix", "addInitSelector", "skipDuringClone", "mapAttributes", "startingWith", "into", "original", "bindingProviders", "injectBindingProviders", "bindings", "applyBindingsObject", "storeKeyForXFor", "addRootSelector", "magicContext", "injectMagics", "dataProviderContext", "injectDataProviders", "data2", "evaluate", "reactiveData", "reactive", "initInterceptors", "undo", "hide", "show", "clickAwayCompatibleShow", "toggle", "once", "iteratorNames", "parseForExpression", "evaluateItems", "evaluateKey", "loop", "isObject2", "templateEl", "items", "isNumeric3", "lookup", "prevKeys", "scopes", "keys", "scope2", "getIterationScopeVariables", "value2", "adds", "moves", "removes", "sames", "lastKey", "prevIndex", "keyInSpot", "keyForSpot", "dequeueJob", "elInSpot", "elForSpot", "marker", "refreshScope", "lastKey2", "index", "lastEl", "forIteratorRE", "stripParensRE", "forAliasRE", "inMatch", "item", "iteratorMatch", "scopeVariables", "handler2", "walk", "node", "warnMissingPluginDirective", "directiveName2", "alpine_default", "normalEvaluator", "src_default", "module_default", "DomManager", "el", "insertee", "replacement", "appendee", "dom", "createElement", "html", "template", "textOrComment", "resolveStep", "logger", "morph", "from", "toHtml", "options", "fromEl", "toEl", "key", "lookahead", "updating", "updated", "removing", "removed", "adding", "added", "debug", "breakpoint", "message", "resolve", "assignOptions", "options2", "defaultGetKey", "noop", "patch", "from2", "to", "differentElementNamesTypesOrKeys", "result", "patchElement", "updateChildrenOnly", "shouldSkip", "initializeAlpineOnTo", "patchNodeValue", "patchAttributes", "patchChildren", "getKey", "toCloned", "value", "domAttributes", "toAttributes", "i", "name", "domChildren", "toChildren", "toKeyToNodeMap", "keyToMap", "domKeyDomNodeMap", "currentTo", "currentFrom", "domKeyHoldovers", "toKey", "domKey", "holdover", "added2", "addNodeTo", "nextToElementSibling", "found", "addNodeBefore", "domKeyNode", "currentFromNext", "removals", "domForRemoval", "els", "map", "theKey", "node", "parent", "clone", "beforeMe", "theLogger", "hook", "args", "skip", "childrenOnly", "src_default", "Alpine", "module_default", "module_default", "input", "inputTypes", "textarea", "updating", "el", "toEl", "childrenOnly", "skip", "mutate", "elements", "html", "element", "mutate_default", "perform", "method", "args", "receivers", "dispatch_default", "mutate_default", "r", "invoke", "payload", "id", "selector", "receiver", "context", "chain", "invoke_default", "invoke_default", "Meta", "value", "meta_default", "lifecycleEvents", "stateEvents", "allEvents", "dispatch", "name", "target", "detail", "raise", "event", "error", "head", "observable", "object", "parent", "proxy", "target", "key", "dispatch", "stateEvents", "meta_default", "value", "receiver", "index", "observable_default", "loadedState", "currentState", "changedState", "loadStateTimeout", "loadState", "meta_default", "loadStateLater", "json", "observable_default", "dispatch", "stateEvents", "event", "key", "value", "state_default", "replaceDocument", "content", "head", "tail", "headIndex", "tailIndex", "html", "append", "renderer_default", "active", "add", "payload", "remove", "id", "activity_default", "finish", "event", "dispatch", "lifecycleEvents", "activity_default", "lifecycle_default", "frameSources", "event", "frame", "fetchOptions", "meta_default", "acceptHeaders", "entry", "state_default", "chunk", "response", "error", "dispatch", "lifecycle_default", "content", "renderer_default", "schema", "schema_default", "events", "eventListener", "register", "eventName", "selectors", "getRegisteredEventNameForElement", "element", "selector", "el", "isRegisteredForElement", "delegates_default", "fn", "findClosestReflex", "element", "schema_default", "findClosestFrame", "assignElementValueToPayload", "payload", "memo", "option", "buildAttributePayload", "attr", "value", "elements_default", "invokeReflex", "form", "payload", "meta_default", "input", "form_default", "build", "urlString", "payload", "a", "url", "urls_default", "invokeReflex", "frame", "payload", "src", "urls_default", "frame_default", "invokeReflex", "element", "payload", "src", "urls_default", "method_default", "aborted", "event", "xhr", "dispatch", "lifecycle_default", "errored", "renderer_default", "error", "loaded", "content", "invokeReflex", "payload", "src", "urls_default", "meta_default", "state_default", "chunk", "ex", "message", "window_default", "src", "element", "frame", "find", "elements_default", "turboFrame", "turboMethod", "form_default", "method_default", "frame_default", "window_default", "drivers_default", "currentLevel", "logLevels", "allEvents", "name", "event", "logger_default", "value", "v4", "c", "uuids_default", "invokeReflex", "event", "element", "payload", "elements_default", "delegates_default", "driver", "drivers_default", "uuids_default", "activity_default", "dispatch", "lifecycle_default", "meta_default", "error", "schema_default", "logger_default", "allEvents", "state_default", "javascript_default", "ReflexElement", "c", "ToggleTargetElement", "ReflexElement", "template", "html", "appendHTML", "parent", "child", "addHighlight", "element", "options", "removeHighlight", "outline", "outlineOffset", "key", "value", "coordinates", "rect", "DevtoolElement", "event", "SupervisorElement", "event", "devtoolElement", "checked", "name", "el", "TooltipElement", "added", "dependencies", "exists", "dependency", "add", "src", "integrity", "script", "remove", "el", "removeAll", "dependencies_default", "DevtoolElement", "SupervisorElement", "TooltipElement", "supervisorElement", "makeDraggable", "stop", "stopped", "dependencies_default", "start", "started", "appendHTML", "restart", "enabledList", "el", "restartTimeout", "debouncedRestart", "autoRestart", "register", "name", "label", "enabled", "supervisor_default", "activeToggle", "supervisor_default", "appendTooltip", "title", "content", "options", "backgroundColor", "color", "position", "appendHTML", "ToggleDevtool", "trigger", "event", "name", "addHighlight", "removeHighlight", "hideTimeout", "debouncedHide", "renderingTooltip", "targetTooltip", "el", "data", "clearActiveToggle", "tooltip", "coords", "coordinates", "top", "left", "view", "index", "ToggleTriggerElement", "ReflexElement", "mouseenter", "ToggleDevtool", "supervisor_default", "error", "reducer", "memo", "view", "id", "value", "event", "selector", "trigger", "ToggleTargetElement", "ToggleTriggerElement", "restart", "start", "stop", "supervisor_default", "devtools_default", "devtools_default"]
7
7
  }