{
  "version": 3,
  "sources": ["../../src/lib/component.ts", "../../../../node_modules/.pnpm/@zag-js+utils@1.32.0/node_modules/@zag-js/utils/dist/index.mjs", "../../../../node_modules/.pnpm/@zag-js+types@1.32.0/node_modules/@zag-js/types/dist/index.mjs", "../../../../node_modules/.pnpm/proxy-compare@3.0.1/node_modules/proxy-compare/dist/index.js", "../../../../node_modules/.pnpm/@zag-js+store@1.32.0/node_modules/@zag-js/store/dist/index.mjs", "../../../../node_modules/.pnpm/@zag-js+vanilla@1.32.0/node_modules/@zag-js/vanilla/dist/index.mjs", "../../src/lib/util.ts"],
  "sourcesContent": ["import { VanillaMachine } from \"@zag-js/vanilla\";\n\ninterface ComponentInterface<Api> {\n  el: HTMLElement;\n  machine: VanillaMachine<any>;\n  api: Api;\n\n  init(): void;\n  destroy(): void;\n  render(): void;\n}\n\nexport abstract class Component<Props, Api> implements ComponentInterface<Api> {\n  el: HTMLElement;\n  machine: VanillaMachine<any>;\n  api: Api;\n\n  constructor(el: HTMLElement | null, props: Props) {\n    if (!el) throw new Error(\"Root element not found\");\n    this.el = el;\n    this.machine = this.initMachine(props);\n    this.api = this.initApi();\n  }\n\n  abstract initMachine(props: Props): VanillaMachine<any>;\n  abstract initApi(): Api;\n  abstract render(): void;\n\n  init = () => {\n    this.render();\n    this.machine.subscribe(() => {\n      this.api = this.initApi();\n      this.render();\n    });\n    this.machine.start();\n  };\n\n  destroy = () => {\n    this.machine.stop();\n  };\n}\n", "var __defProp = Object.defineProperty;\nvar __typeError = (msg) => {\n  throw TypeError(msg);\n};\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg);\nvar __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), member.get(obj));\nvar __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n\n// src/array.ts\nfunction toArray(v) {\n  if (v == null) return [];\n  return Array.isArray(v) ? v : [v];\n}\nvar fromLength = (length) => Array.from(Array(length).keys());\nvar first = (v) => v[0];\nvar last = (v) => v[v.length - 1];\nvar isEmpty = (v) => v.length === 0;\nvar has = (v, t) => v.indexOf(t) !== -1;\nvar add = (v, ...items) => v.concat(items);\nvar remove = (v, ...items) => v.filter((t) => !items.includes(t));\nvar removeAt = (v, i) => v.filter((_, idx) => idx !== i);\nvar insertAt = (v, i, ...items) => [...v.slice(0, i), ...items, ...v.slice(i)];\nvar uniq = (v) => Array.from(new Set(v));\nvar diff = (a, b) => {\n  const set = new Set(b);\n  return a.filter((t) => !set.has(t));\n};\nvar addOrRemove = (v, item) => has(v, item) ? remove(v, item) : add(v, item);\nfunction clear(v) {\n  while (v.length > 0) v.pop();\n  return v;\n}\nfunction nextIndex(v, idx, opts = {}) {\n  const { step = 1, loop = true } = opts;\n  const next2 = idx + step;\n  const len = v.length;\n  const last2 = len - 1;\n  if (idx === -1) return step > 0 ? 0 : last2;\n  if (next2 < 0) return loop ? last2 : 0;\n  if (next2 >= len) return loop ? 0 : idx > len ? len : idx;\n  return next2;\n}\nfunction next(v, idx, opts = {}) {\n  return v[nextIndex(v, idx, opts)];\n}\nfunction prevIndex(v, idx, opts = {}) {\n  const { step = 1, loop = true } = opts;\n  return nextIndex(v, idx, { step: -step, loop });\n}\nfunction prev(v, index, opts = {}) {\n  return v[prevIndex(v, index, opts)];\n}\nfunction chunk(v, size) {\n  return v.reduce((rows, value, index) => {\n    if (index % size === 0) rows.push([value]);\n    else last(rows)?.push(value);\n    return rows;\n  }, []);\n}\nfunction flatArray(arr) {\n  return arr.reduce((flat, item) => {\n    if (Array.isArray(item)) {\n      return flat.concat(flatArray(item));\n    }\n    return flat.concat(item);\n  }, []);\n}\nfunction partition(arr, fn) {\n  return arr.reduce(\n    ([pass, fail], value) => {\n      if (fn(value)) pass.push(value);\n      else fail.push(value);\n      return [pass, fail];\n    },\n    [[], []]\n  );\n}\n\n// src/equal.ts\nvar isArrayLike = (value) => value?.constructor.name === \"Array\";\nvar isArrayEqual = (a, b) => {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; i++) {\n    if (!isEqual(a[i], b[i])) return false;\n  }\n  return true;\n};\nvar isEqual = (a, b) => {\n  if (Object.is(a, b)) return true;\n  if (a == null && b != null || a != null && b == null) return false;\n  if (typeof a?.isEqual === \"function\" && typeof b?.isEqual === \"function\") {\n    return a.isEqual(b);\n  }\n  if (typeof a === \"function\" && typeof b === \"function\") {\n    return a.toString() === b.toString();\n  }\n  if (isArrayLike(a) && isArrayLike(b)) {\n    return isArrayEqual(Array.from(a), Array.from(b));\n  }\n  if (!(typeof a === \"object\") || !(typeof b === \"object\")) return false;\n  const keys = Object.keys(b ?? /* @__PURE__ */ Object.create(null));\n  const length = keys.length;\n  for (let i = 0; i < length; i++) {\n    const hasKey = Reflect.has(a, keys[i]);\n    if (!hasKey) return false;\n  }\n  for (let i = 0; i < length; i++) {\n    const key = keys[i];\n    if (!isEqual(a[key], b[key])) return false;\n  }\n  return true;\n};\n\n// src/guard.ts\nvar isDev = () => process.env.NODE_ENV !== \"production\";\nvar isArray = (v) => Array.isArray(v);\nvar isBoolean = (v) => v === true || v === false;\nvar isObjectLike = (v) => v != null && typeof v === \"object\";\nvar isObject = (v) => isObjectLike(v) && !isArray(v);\nvar isNumber = (v) => typeof v === \"number\" && !Number.isNaN(v);\nvar isString = (v) => typeof v === \"string\";\nvar isFunction = (v) => typeof v === \"function\";\nvar isNull = (v) => v == null;\nvar hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nvar baseGetTag = (v) => Object.prototype.toString.call(v);\nvar fnToString = Function.prototype.toString;\nvar objectCtorString = fnToString.call(Object);\nvar isPlainObject = (v) => {\n  if (!isObjectLike(v) || baseGetTag(v) != \"[object Object]\" || isFrameworkElement(v)) return false;\n  const proto = Object.getPrototypeOf(v);\n  if (proto === null) return true;\n  const Ctor = hasProp(proto, \"constructor\") && proto.constructor;\n  return typeof Ctor == \"function\" && Ctor instanceof Ctor && fnToString.call(Ctor) == objectCtorString;\n};\nvar isReactElement = (x) => typeof x === \"object\" && x !== null && \"$$typeof\" in x && \"props\" in x;\nvar isVueElement = (x) => typeof x === \"object\" && x !== null && \"__v_isVNode\" in x;\nvar isFrameworkElement = (x) => isReactElement(x) || isVueElement(x);\n\n// src/functions.ts\nvar runIfFn = (v, ...a) => {\n  const res = typeof v === \"function\" ? v(...a) : v;\n  return res ?? void 0;\n};\nvar cast = (v) => v;\nvar identity = (v) => v();\nvar noop = () => {\n};\nvar callAll = (...fns) => (...a) => {\n  fns.forEach(function(fn) {\n    fn?.(...a);\n  });\n};\nvar uuid = /* @__PURE__ */ (() => {\n  let id = 0;\n  return () => {\n    id++;\n    return id.toString(36);\n  };\n})();\nfunction match(key, record, ...args) {\n  if (key in record) {\n    const fn = record[key];\n    return isFunction(fn) ? fn(...args) : fn;\n  }\n  const error = new Error(`No matching key: ${JSON.stringify(key)} in ${JSON.stringify(Object.keys(record))}`);\n  Error.captureStackTrace?.(error, match);\n  throw error;\n}\nvar tryCatch = (fn, fallback) => {\n  try {\n    return fn();\n  } catch (error) {\n    if (error instanceof Error) {\n      Error.captureStackTrace?.(error, tryCatch);\n    }\n    return fallback?.();\n  }\n};\nfunction throttle(fn, wait = 0) {\n  let lastCall = 0;\n  let timeout = null;\n  return ((...args) => {\n    const now = Date.now();\n    const timeSinceLastCall = now - lastCall;\n    if (timeSinceLastCall >= wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      fn(...args);\n      lastCall = now;\n    } else if (!timeout) {\n      timeout = setTimeout(() => {\n        fn(...args);\n        lastCall = Date.now();\n        timeout = null;\n      }, wait - timeSinceLastCall);\n    }\n  });\n}\nfunction debounce(fn, wait = 0) {\n  let timeout = null;\n  return ((...args) => {\n    if (timeout) {\n      clearTimeout(timeout);\n      timeout = null;\n    }\n    timeout = setTimeout(() => {\n      fn(...args);\n    }, wait);\n  });\n}\nvar toChar = (code) => String.fromCharCode(code + (code > 25 ? 39 : 97));\nfunction toName(code) {\n  let name = \"\";\n  let x;\n  for (x = Math.abs(code); x > 52; x = x / 52 | 0) name = toChar(x % 52) + name;\n  return toChar(x % 52) + name;\n}\nfunction toPhash(h, x) {\n  let i = x.length;\n  while (i) h = h * 33 ^ x.charCodeAt(--i);\n  return h;\n}\nvar hash = (value) => toName(toPhash(5381, value) >>> 0);\n\n// src/number.ts\nvar { floor, abs, round, min, max, pow, sign } = Math;\nvar isNaN = (v) => Number.isNaN(v);\nvar nan = (v) => isNaN(v) ? 0 : v;\nvar mod = (v, m) => (v % m + m) % m;\nvar wrap = (v, vmax) => (v % vmax + vmax) % vmax;\nvar getMinValueAtIndex = (i, v, vmin) => i === 0 ? vmin : v[i - 1];\nvar getMaxValueAtIndex = (i, v, vmax) => i === v.length - 1 ? vmax : v[i + 1];\nvar isValueAtMax = (v, vmax) => nan(v) >= vmax;\nvar isValueAtMin = (v, vmin) => nan(v) <= vmin;\nvar isValueWithinRange = (v, vmin, vmax) => {\n  const value = nan(v);\n  const minCheck = vmin == null || value >= vmin;\n  const maxCheck = vmax == null || value <= vmax;\n  return minCheck && maxCheck;\n};\nvar roundValue = (v, vmin, step) => round((nan(v) - vmin) / step) * step + vmin;\nvar clampValue = (v, vmin, vmax) => min(max(nan(v), vmin), vmax);\nvar clampPercent = (v) => clampValue(v, 0, 1);\nvar getValuePercent = (v, vmin, vmax) => (nan(v) - vmin) / (vmax - vmin);\nvar getPercentValue = (p, vmin, vmax, step) => clampValue(roundValue(p * (vmax - vmin) + vmin, vmin, step), vmin, vmax);\nvar roundToStepPrecision = (v, step) => {\n  let rv = v;\n  let ss = step.toString();\n  let pi = ss.indexOf(\".\");\n  let p = pi >= 0 ? ss.length - pi : 0;\n  if (p > 0) {\n    let pw = pow(10, p);\n    rv = round(rv * pw) / pw;\n  }\n  return rv;\n};\nvar roundToDpr = (v, dpr) => typeof dpr === \"number\" ? floor(v * dpr + 0.5) / dpr : round(v);\nvar snapValueToStep = (v, vmin, vmax, step) => {\n  const min2 = vmin != null ? Number(vmin) : 0;\n  const max2 = Number(vmax);\n  const remainder = (v - min2) % step;\n  let snapped = abs(remainder) * 2 >= step ? v + sign(remainder) * (step - abs(remainder)) : v - remainder;\n  snapped = roundToStepPrecision(snapped, step);\n  if (!isNaN(min2) && snapped < min2) {\n    snapped = min2;\n  } else if (!isNaN(max2) && snapped > max2) {\n    const stepsInRange = floor((max2 - min2) / step);\n    const largestValidStep = min2 + stepsInRange * step;\n    snapped = stepsInRange <= 0 || largestValidStep < min2 ? max2 : largestValidStep;\n  }\n  return roundToStepPrecision(snapped, step);\n};\nvar setValueAtIndex = (vs, i, v) => {\n  if (vs[i] === v) return vs;\n  return [...vs.slice(0, i), v, ...vs.slice(i + 1)];\n};\nfunction getValueSetterAtIndex(index, ctx) {\n  const minValueAtIndex = getMinValueAtIndex(index, ctx.values, ctx.min);\n  const maxValueAtIndex = getMaxValueAtIndex(index, ctx.values, ctx.max);\n  let nextValues = ctx.values.slice();\n  return function setValue(value) {\n    let nextValue = snapValueToStep(value, minValueAtIndex, maxValueAtIndex, ctx.step);\n    nextValues = setValueAtIndex(nextValues, index, value);\n    nextValues[index] = nextValue;\n    return nextValues;\n  };\n}\nfunction getNextStepValue(index, ctx) {\n  const nextValue = ctx.values[index] + ctx.step;\n  return getValueSetterAtIndex(index, ctx)(nextValue);\n}\nfunction getPreviousStepValue(index, ctx) {\n  const nextValue = ctx.values[index] - ctx.step;\n  return getValueSetterAtIndex(index, ctx)(nextValue);\n}\nvar getClosestValueIndex = (vs, t) => {\n  let i = vs.findIndex((v) => t - v < 0);\n  if (i === 0) return i;\n  if (i === -1) return vs.length - 1;\n  let vLeft = vs[i - 1];\n  let vRight = vs[i];\n  if (abs(vLeft - t) < abs(vRight - t)) return i - 1;\n  return i;\n};\nvar getClosestValue = (vs, t) => vs[getClosestValueIndex(vs, t)];\nvar getValueRanges = (vs, vmin, vmax, gap) => vs.map((v, i) => ({\n  min: i === 0 ? vmin : vs[i - 1] + gap,\n  max: i === vs.length - 1 ? vmax : vs[i + 1] - gap,\n  value: v\n}));\nvar getValueTransformer = (va, vb) => {\n  const [a, b] = va;\n  const [c, d] = vb;\n  return (v) => a === b || c === d ? c : c + (d - c) / (b - a) * (v - a);\n};\nvar toFixedNumber = (v, d = 0, b = 10) => {\n  const pow2 = Math.pow(b, d);\n  return round(v * pow2) / pow2;\n};\nvar countDecimals = (value) => {\n  if (!Number.isFinite(value)) return 0;\n  let e = 1, p = 0;\n  while (Math.round(value * e) / e !== value) {\n    e *= 10;\n    p += 1;\n  }\n  return p;\n};\nvar decimalOp = (a, op, b) => {\n  let result = op === \"+\" ? a + b : a - b;\n  if (a % 1 !== 0 || b % 1 !== 0) {\n    const multiplier = 10 ** Math.max(countDecimals(a), countDecimals(b));\n    a = Math.round(a * multiplier);\n    b = Math.round(b * multiplier);\n    result = op === \"+\" ? a + b : a - b;\n    result /= multiplier;\n  }\n  return result;\n};\nvar incrementValue = (v, s) => decimalOp(nan(v), \"+\", s);\nvar decrementValue = (v, s) => decimalOp(nan(v), \"-\", s);\nvar toPx = (v) => typeof v === \"number\" ? `${v}px` : v;\n\n// src/object.ts\nfunction compact(obj) {\n  if (!isPlainObject(obj) || obj === void 0) return obj;\n  const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n  const filtered = {};\n  for (const key of keys) {\n    const value = obj[key];\n    if (value !== void 0) {\n      filtered[key] = compact(value);\n    }\n  }\n  return filtered;\n}\nvar json = (v) => JSON.parse(JSON.stringify(v));\nfunction pick(obj, keys) {\n  const filtered = {};\n  for (const key of keys) {\n    const value = obj[key];\n    if (value !== void 0) {\n      filtered[key] = value;\n    }\n  }\n  return filtered;\n}\nfunction splitProps(props, keys) {\n  const rest = {};\n  const result = {};\n  const keySet = new Set(keys);\n  const ownKeys = Reflect.ownKeys(props);\n  for (const key of ownKeys) {\n    if (keySet.has(key)) {\n      result[key] = props[key];\n    } else {\n      rest[key] = props[key];\n    }\n  }\n  return [result, rest];\n}\nvar createSplitProps = (keys) => {\n  return function split(props) {\n    return splitProps(props, keys);\n  };\n};\nfunction omit(obj, keys) {\n  return createSplitProps(keys)(obj)[1];\n}\n\n// src/store.ts\nfunction createStore(initialState, compare = Object.is) {\n  let state = { ...initialState };\n  const listeners = /* @__PURE__ */ new Set();\n  const subscribe = (listener) => {\n    listeners.add(listener);\n    return () => listeners.delete(listener);\n  };\n  const publish = () => {\n    listeners.forEach((listener) => listener());\n  };\n  const get = (key) => {\n    return state[key];\n  };\n  const set = (key, value) => {\n    if (!compare(state[key], value)) {\n      state[key] = value;\n      publish();\n    }\n  };\n  const update = (updates) => {\n    let hasChanges = false;\n    for (const key in updates) {\n      const value = updates[key];\n      if (value !== void 0 && !compare(state[key], value)) {\n        state[key] = value;\n        hasChanges = true;\n      }\n    }\n    if (hasChanges) {\n      publish();\n    }\n  };\n  const snapshot = () => ({ ...state });\n  return {\n    subscribe,\n    get,\n    set,\n    update,\n    snapshot\n  };\n}\n\n// src/timers.ts\nvar currentTime = () => performance.now();\nvar _tick;\nvar Timer = class {\n  constructor(onTick) {\n    this.onTick = onTick;\n    __publicField(this, \"frameId\", null);\n    __publicField(this, \"pausedAtMs\", null);\n    __publicField(this, \"context\");\n    __publicField(this, \"cancelFrame\", () => {\n      if (this.frameId === null) return;\n      cancelAnimationFrame(this.frameId);\n      this.frameId = null;\n    });\n    __publicField(this, \"setStartMs\", (startMs) => {\n      this.context.startMs = startMs;\n    });\n    __publicField(this, \"start\", () => {\n      if (this.frameId !== null) return;\n      const now = currentTime();\n      if (this.pausedAtMs !== null) {\n        this.context.startMs += now - this.pausedAtMs;\n        this.pausedAtMs = null;\n      } else {\n        this.context.startMs = now;\n      }\n      this.frameId = requestAnimationFrame(__privateGet(this, _tick));\n    });\n    __publicField(this, \"pause\", () => {\n      if (this.frameId === null) return;\n      this.cancelFrame();\n      this.pausedAtMs = currentTime();\n    });\n    __publicField(this, \"stop\", () => {\n      if (this.frameId === null) return;\n      this.cancelFrame();\n      this.pausedAtMs = null;\n    });\n    __privateAdd(this, _tick, (now) => {\n      this.context.now = now;\n      this.context.deltaMs = now - this.context.startMs;\n      const shouldContinue = this.onTick(this.context);\n      if (shouldContinue === false) {\n        this.stop();\n        return;\n      }\n      this.frameId = requestAnimationFrame(__privateGet(this, _tick));\n    });\n    this.context = { now: 0, startMs: currentTime(), deltaMs: 0 };\n  }\n  get elapsedMs() {\n    if (this.pausedAtMs !== null) {\n      return this.pausedAtMs - this.context.startMs;\n    }\n    return currentTime() - this.context.startMs;\n  }\n};\n_tick = new WeakMap();\nfunction setRafInterval(fn, intervalMs) {\n  const timer = new Timer(({ now, deltaMs }) => {\n    if (deltaMs >= intervalMs) {\n      const startMs = intervalMs > 0 ? now - deltaMs % intervalMs : now;\n      timer.setStartMs(startMs);\n      fn({ startMs, deltaMs });\n    }\n  });\n  timer.start();\n  return () => timer.stop();\n}\nfunction setRafTimeout(fn, delayMs) {\n  const timer = new Timer(({ deltaMs }) => {\n    if (deltaMs >= delayMs) {\n      fn();\n      return false;\n    }\n  });\n  timer.start();\n  return () => timer.stop();\n}\n\n// src/warning.ts\nfunction warn(...a) {\n  const m = a.length === 1 ? a[0] : a[1];\n  const c = a.length === 2 ? a[0] : true;\n  if (c && process.env.NODE_ENV !== \"production\") {\n    console.warn(m);\n  }\n}\nfunction invariant(...a) {\n  const m = a.length === 1 ? a[0] : a[1];\n  const c = a.length === 2 ? a[0] : true;\n  if (c && process.env.NODE_ENV !== \"production\") {\n    throw new Error(m);\n  }\n}\nfunction ensure(c, m) {\n  if (c == null) throw new Error(m());\n}\nfunction ensureProps(props, keys, scope) {\n  let missingKeys = [];\n  for (const key of keys) {\n    if (props[key] == null) missingKeys.push(key);\n  }\n  if (missingKeys.length > 0)\n    throw new Error(`[zag-js${scope ? ` > ${scope}` : \"\"}] missing required props: ${missingKeys.join(\", \")}`);\n}\n\nexport { Timer, add, addOrRemove, callAll, cast, chunk, clampPercent, clampValue, clear, compact, createSplitProps, createStore, debounce, decrementValue, diff, ensure, ensureProps, first, flatArray, fromLength, getClosestValue, getClosestValueIndex, getMaxValueAtIndex, getMinValueAtIndex, getNextStepValue, getPercentValue, getPreviousStepValue, getValuePercent, getValueRanges, getValueSetterAtIndex, getValueTransformer, has, hasProp, hash, identity, incrementValue, insertAt, invariant, isArray, isBoolean, isDev, isEmpty, isEqual, isFunction, isNaN, isNull, isNumber, isObject, isObjectLike, isPlainObject, isString, isValueAtMax, isValueAtMin, isValueWithinRange, json, last, match, mod, nan, next, nextIndex, noop, omit, partition, pick, prev, prevIndex, remove, removeAt, roundToDpr, roundToStepPrecision, roundValue, runIfFn, setRafInterval, setRafTimeout, setValueAtIndex, snapValueToStep, splitProps, throttle, toArray, toFixedNumber, toPx, tryCatch, uniq, uuid, warn, wrap };\n", "// src/prop-types.ts\nfunction createNormalizer(fn) {\n  return new Proxy({}, {\n    get(_target, key) {\n      if (key === \"style\")\n        return (props) => {\n          return fn({ style: props }).style;\n        };\n      return fn;\n    }\n  });\n}\n\n// src/create-props.ts\nvar createProps = () => (props) => Array.from(new Set(props));\n\nexport { createNormalizer, createProps };\n", "/* eslint @typescript-eslint/no-explicit-any: off */\n// symbols\nconst TRACK_MEMO_SYMBOL = Symbol();\nconst GET_ORIGINAL_SYMBOL = Symbol();\n// properties\nconst AFFECTED_PROPERTY = 'a';\nconst IS_TARGET_COPIED_PROPERTY = 'f';\nconst PROXY_PROPERTY = 'p';\nconst PROXY_CACHE_PROPERTY = 'c';\nconst TARGET_CACHE_PROPERTY = 't';\nconst HAS_KEY_PROPERTY = 'h';\nconst ALL_OWN_KEYS_PROPERTY = 'w';\nconst HAS_OWN_KEY_PROPERTY = 'o';\nconst KEYS_PROPERTY = 'k';\n// function to create a new bare proxy\nlet newProxy = (target, handler) => new Proxy(target, handler);\n// get object prototype\nconst getProto = Object.getPrototypeOf;\nconst objectsToTrack = new WeakMap();\n// check if obj is a plain object or an array\nconst isObjectToTrack = (obj) => obj &&\n    (objectsToTrack.has(obj)\n        ? objectsToTrack.get(obj)\n        : getProto(obj) === Object.prototype || getProto(obj) === Array.prototype);\n// check if it is object\nconst isObject = (x) => typeof x === 'object' && x !== null;\n// Properties that are both non-configurable and non-writable will break\n// the proxy get trap when we try to return a recursive/child compare proxy\n// from them. We can avoid this by making a copy of the target object with\n// all descriptors marked as configurable, see `copyTargetObject`.\n// See: https://github.com/dai-shi/proxy-compare/pull/8\nconst needsToCopyTargetObject = (obj) => Object.values(Object.getOwnPropertyDescriptors(obj)).some((descriptor) => !descriptor.configurable && !descriptor.writable);\n// Make a copy with all descriptors marked as configurable.\nconst copyTargetObject = (obj) => {\n    if (Array.isArray(obj)) {\n        // Arrays need a special way to copy\n        return Array.from(obj);\n    }\n    // For non-array objects, we create a new object keeping the prototype\n    // with changing all configurable options (otherwise, proxies will complain)\n    const descriptors = Object.getOwnPropertyDescriptors(obj);\n    Object.values(descriptors).forEach((desc) => {\n        desc.configurable = true;\n    });\n    return Object.create(getProto(obj), descriptors);\n};\nconst createProxyHandler = (origObj, isTargetCopied) => {\n    const state = {\n        [IS_TARGET_COPIED_PROPERTY]: isTargetCopied,\n    };\n    let trackObject = false; // for trackMemo\n    const recordUsage = (type, key) => {\n        if (!trackObject) {\n            let used = state[AFFECTED_PROPERTY].get(origObj);\n            if (!used) {\n                used = {};\n                state[AFFECTED_PROPERTY].set(origObj, used);\n            }\n            if (type === ALL_OWN_KEYS_PROPERTY) {\n                used[ALL_OWN_KEYS_PROPERTY] = true;\n            }\n            else {\n                let set = used[type];\n                if (!set) {\n                    set = new Set();\n                    used[type] = set;\n                }\n                set.add(key);\n            }\n        }\n    };\n    const recordObjectAsUsed = () => {\n        trackObject = true;\n        state[AFFECTED_PROPERTY].delete(origObj);\n    };\n    const handler = {\n        get(target, key) {\n            if (key === GET_ORIGINAL_SYMBOL) {\n                return origObj;\n            }\n            recordUsage(KEYS_PROPERTY, key);\n            return createProxy(Reflect.get(target, key), state[AFFECTED_PROPERTY], state[PROXY_CACHE_PROPERTY], state[TARGET_CACHE_PROPERTY]);\n        },\n        has(target, key) {\n            if (key === TRACK_MEMO_SYMBOL) {\n                recordObjectAsUsed();\n                return true;\n            }\n            recordUsage(HAS_KEY_PROPERTY, key);\n            return Reflect.has(target, key);\n        },\n        getOwnPropertyDescriptor(target, key) {\n            recordUsage(HAS_OWN_KEY_PROPERTY, key);\n            return Reflect.getOwnPropertyDescriptor(target, key);\n        },\n        ownKeys(target) {\n            recordUsage(ALL_OWN_KEYS_PROPERTY);\n            return Reflect.ownKeys(target);\n        },\n    };\n    if (isTargetCopied) {\n        handler.set = handler.deleteProperty = () => false;\n    }\n    return [handler, state];\n};\nconst getOriginalObject = (obj) => \n// unwrap proxy\nobj[GET_ORIGINAL_SYMBOL] ||\n    // otherwise\n    obj;\n/**\n * Create a proxy.\n *\n * This function will create a proxy at top level and proxy nested objects as you access them,\n * in order to keep track of which properties were accessed via get/has proxy handlers:\n *\n * NOTE: Printing of WeakMap is hard to inspect and not very readable\n * for this purpose you can use the `affectedToPathList` helper.\n *\n * @param {object} obj - Object that will be wrapped on the proxy.\n * @param {WeakMap<object, unknown>} affected -\n * WeakMap that will hold the tracking of which properties in the proxied object were accessed.\n * @param {WeakMap<object, unknown>} [proxyCache] -\n * WeakMap that will help keep referential identity for proxies.\n * @returns {Proxy<object>} - Object wrapped in a proxy.\n *\n * @example\n * import { createProxy } from 'proxy-compare';\n *\n * const original = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n * const proxy = createProxy(original, affected);\n *\n * proxy.a // Will mark as used and track its value.\n * // This will update the affected WeakMap with original as key\n * // and a Set with \"a\"\n *\n * proxy.d // Will mark \"d\" as accessed to track and proxy itself ({ e: \"3\" }).\n * // This will update the affected WeakMap with original as key\n * // and a Set with \"d\"\n */\nexport const createProxy = (obj, affected, proxyCache, targetCache) => {\n    if (!isObjectToTrack(obj))\n        return obj;\n    let targetAndCopied = targetCache && targetCache.get(obj);\n    if (!targetAndCopied) {\n        const target = getOriginalObject(obj);\n        if (needsToCopyTargetObject(target)) {\n            targetAndCopied = [target, copyTargetObject(target)];\n        }\n        else {\n            targetAndCopied = [target];\n        }\n        targetCache === null || targetCache === void 0 ? void 0 : targetCache.set(obj, targetAndCopied);\n    }\n    const [target, copiedTarget] = targetAndCopied;\n    let handlerAndState = proxyCache && proxyCache.get(target);\n    if (!handlerAndState ||\n        handlerAndState[1][IS_TARGET_COPIED_PROPERTY] !== !!copiedTarget) {\n        handlerAndState = createProxyHandler(target, !!copiedTarget);\n        handlerAndState[1][PROXY_PROPERTY] = newProxy(copiedTarget || target, handlerAndState[0]);\n        if (proxyCache) {\n            proxyCache.set(target, handlerAndState);\n        }\n    }\n    handlerAndState[1][AFFECTED_PROPERTY] = affected;\n    handlerAndState[1][PROXY_CACHE_PROPERTY] = proxyCache;\n    handlerAndState[1][TARGET_CACHE_PROPERTY] = targetCache;\n    return handlerAndState[1][PROXY_PROPERTY];\n};\nconst isAllOwnKeysChanged = (prevObj, nextObj) => {\n    const prevKeys = Reflect.ownKeys(prevObj);\n    const nextKeys = Reflect.ownKeys(nextObj);\n    return (prevKeys.length !== nextKeys.length ||\n        prevKeys.some((k, i) => k !== nextKeys[i]));\n};\n/**\n * Compare changes on objects.\n *\n * This will compare the affected properties on tracked objects inside the proxy\n * to check if there were any changes made to it,\n * by default if no property was accessed on the proxy it will attempt to do a\n * reference equality check for the objects provided (Object.is(a, b)). If you access a property\n * on the proxy, then isChanged will only compare the affected properties.\n *\n * @param {object} prevObj - The previous object to compare.\n * @param {object} nextObj - Object to compare with the previous one.\n * @param {WeakMap<object, unknown>} affected -\n * WeakMap that holds the tracking of which properties in the proxied object were accessed.\n * @param {WeakMap<object, unknown>} [cache] -\n * WeakMap that holds a cache of the comparisons for better performance with repetitive comparisons,\n * and to avoid infinite loop with circular structures.\n * @returns {boolean} - Boolean indicating if the affected property on the object has changed.\n *\n * @example\n * import { createProxy, isChanged } from 'proxy-compare';\n *\n * const obj = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(obj, affected);\n *\n * proxy.a\n *\n * isChanged(obj, { a: \"1\" }, affected) // false\n *\n * proxy.a = \"2\"\n *\n * isChanged(obj, { a: \"1\" }, affected) // true\n */\nexport const isChanged = (prevObj, nextObj, affected, cache, // for object with cycles\nisEqual = Object.is) => {\n    if (isEqual(prevObj, nextObj)) {\n        return false;\n    }\n    if (!isObject(prevObj) || !isObject(nextObj))\n        return true;\n    const used = affected.get(getOriginalObject(prevObj));\n    if (!used)\n        return true;\n    if (cache) {\n        const hit = cache.get(prevObj);\n        if (hit === nextObj) {\n            return false;\n        }\n        // for object with cycles\n        cache.set(prevObj, nextObj);\n    }\n    let changed = null;\n    for (const key of used[HAS_KEY_PROPERTY] || []) {\n        changed = Reflect.has(prevObj, key) !== Reflect.has(nextObj, key);\n        if (changed)\n            return changed;\n    }\n    if (used[ALL_OWN_KEYS_PROPERTY] === true) {\n        changed = isAllOwnKeysChanged(prevObj, nextObj);\n        if (changed)\n            return changed;\n    }\n    else {\n        for (const key of used[HAS_OWN_KEY_PROPERTY] || []) {\n            const hasPrev = !!Reflect.getOwnPropertyDescriptor(prevObj, key);\n            const hasNext = !!Reflect.getOwnPropertyDescriptor(nextObj, key);\n            changed = hasPrev !== hasNext;\n            if (changed)\n                return changed;\n        }\n    }\n    for (const key of used[KEYS_PROPERTY] || []) {\n        changed = isChanged(prevObj[key], nextObj[key], affected, cache, isEqual);\n        if (changed)\n            return changed;\n    }\n    if (changed === null)\n        throw new Error('invalid used');\n    return changed;\n};\n// explicitly track object with memo\nexport const trackMemo = (obj) => {\n    if (isObjectToTrack(obj)) {\n        return TRACK_MEMO_SYMBOL in obj;\n    }\n    return false;\n};\n/**\n * Unwrap proxy to get the original object.\n *\n * Used to retrieve the original object used to create the proxy instance with `createProxy`.\n *\n * @param {Proxy<object>} obj -  The proxy wrapper of the originial object.\n * @returns {object | null} - Return either the unwrapped object if exists.\n *\n * @example\n * import { createProxy, getUntracked } from 'proxy-compare';\n *\n * const original = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(original, affected);\n * const originalFromProxy = getUntracked(proxy)\n *\n * Object.is(original, originalFromProxy) // true\n * isChanged(original, originalFromProxy, affected) // false\n */\nexport const getUntracked = (obj) => {\n    if (isObjectToTrack(obj)) {\n        return obj[GET_ORIGINAL_SYMBOL] || null;\n    }\n    return null;\n};\n/**\n * Mark object to be tracked.\n *\n * This function marks an object that will be passed into `createProxy`\n * as marked to track or not. By default only Array and Object are marked to track,\n * so this is useful for example to mark a class instance to track or to mark a object\n * to be untracked when creating your proxy.\n *\n * @param obj - Object to mark as tracked or not.\n * @param mark - Boolean indicating whether you want to track this object or not.\n * @returns - No return.\n *\n * @example\n * import { createProxy, markToTrack, isChanged } from 'proxy-compare';\n *\n * const nested = { e: \"3\" }\n *\n * markToTrack(nested, false)\n *\n * const original = { a: \"1\", c: \"2\", d: nested };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(original, affected);\n *\n * proxy.d.e\n *\n * isChanged(original, { d: { e: \"3\" } }, affected) // true\n */\nexport const markToTrack = (obj, mark = true) => {\n    objectsToTrack.set(obj, mark);\n};\n/**\n * Convert `affected` to path list\n *\n * `affected` is a weak map which is not printable.\n * This function is can convert it to printable path list.\n * It's for debugging purpose.\n *\n * @param obj - An object that is used with `createProxy`.\n * @param affected - A weak map that is used with `createProxy`.\n * @param onlyWithValues - An optional boolean to exclude object getters.\n * @returns - An array of paths.\n */\nexport const affectedToPathList = (obj, affected, onlyWithValues) => {\n    const list = [];\n    const seen = new WeakSet();\n    const walk = (x, path) => {\n        var _a, _b, _c;\n        if (seen.has(x)) {\n            // for object with cycles\n            return;\n        }\n        if (isObject(x)) {\n            seen.add(x);\n        }\n        const used = isObject(x) && affected.get(getOriginalObject(x));\n        if (used) {\n            (_a = used[HAS_KEY_PROPERTY]) === null || _a === void 0 ? void 0 : _a.forEach((key) => {\n                const segment = `:has(${String(key)})`;\n                list.push(path ? [...path, segment] : [segment]);\n            });\n            if (used[ALL_OWN_KEYS_PROPERTY] === true) {\n                const segment = ':ownKeys';\n                list.push(path ? [...path, segment] : [segment]);\n            }\n            else {\n                (_b = used[HAS_OWN_KEY_PROPERTY]) === null || _b === void 0 ? void 0 : _b.forEach((key) => {\n                    const segment = `:hasOwn(${String(key)})`;\n                    list.push(path ? [...path, segment] : [segment]);\n                });\n            }\n            (_c = used[KEYS_PROPERTY]) === null || _c === void 0 ? void 0 : _c.forEach((key) => {\n                if (!onlyWithValues ||\n                    'value' in (Object.getOwnPropertyDescriptor(x, key) || {})) {\n                    walk(x[key], path ? [...path, key] : [key]);\n                }\n            });\n        }\n        else if (path) {\n            list.push(path);\n        }\n    };\n    walk(obj);\n    return list;\n};\n/**\n * replace newProxy function.\n *\n * This can be used if you want to use proxy-polyfill.\n * Note that proxy-polyfill can't polyfill everything.\n * Use it at your own risk.\n */\nexport const replaceNewProxy = (fn) => {\n    newProxy = fn;\n};\n", "import { markToTrack, getUntracked } from 'proxy-compare';\n\n// src/global.ts\nfunction glob() {\n  if (typeof globalThis !== \"undefined\") return globalThis;\n  if (typeof self !== \"undefined\") return self;\n  if (typeof window !== \"undefined\") return window;\n  if (typeof global !== \"undefined\") return global;\n}\nfunction globalRef(key, value) {\n  const g = glob();\n  if (!g) return value();\n  g[key] || (g[key] = value());\n  return g[key];\n}\nvar refSet = globalRef(\"__zag__refSet\", () => /* @__PURE__ */ new WeakSet());\n\n// src/utils.ts\nvar isReactElement = (x) => typeof x === \"object\" && x !== null && \"$$typeof\" in x && \"props\" in x;\nvar isVueElement = (x) => typeof x === \"object\" && x !== null && \"__v_isVNode\" in x;\nvar isDOMElement = (x) => typeof x === \"object\" && x !== null && \"nodeType\" in x && typeof x.nodeName === \"string\";\nvar isElement = (x) => isReactElement(x) || isVueElement(x) || isDOMElement(x);\nvar isObject = (x) => x !== null && typeof x === \"object\";\nvar canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !isElement(x) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer) && !(x instanceof Promise) && !(x instanceof File) && !(x instanceof Blob) && !(x instanceof AbortController);\nvar isDev = () => process.env.NODE_ENV !== \"production\";\n\n// src/clone.ts\nfunction set(obj, key, val) {\n  if (typeof val.value === \"object\" && !canProxy(val.value)) val.value = clone(val.value);\n  if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === \"__proto__\") {\n    Object.defineProperty(obj, key, val);\n  } else obj[key] = val.value;\n}\nfunction clone(x) {\n  if (typeof x !== \"object\") return x;\n  var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);\n  if (str === \"[object Object]\") {\n    tmp = Object.create(Object.getPrototypeOf(x) || null);\n  } else if (str === \"[object Array]\") {\n    tmp = Array(x.length);\n  } else if (str === \"[object Set]\") {\n    tmp = /* @__PURE__ */ new Set();\n    x.forEach(function(val) {\n      tmp.add(clone(val));\n    });\n  } else if (str === \"[object Map]\") {\n    tmp = /* @__PURE__ */ new Map();\n    x.forEach(function(val, key) {\n      tmp.set(clone(key), clone(val));\n    });\n  } else if (str === \"[object Date]\") {\n    tmp = /* @__PURE__ */ new Date(+x);\n  } else if (str === \"[object RegExp]\") {\n    tmp = new RegExp(x.source, x.flags);\n  } else if (str === \"[object DataView]\") {\n    tmp = new x.constructor(clone(x.buffer));\n  } else if (str === \"[object ArrayBuffer]\") {\n    tmp = x.slice(0);\n  } else if (str === \"[object Blob]\") {\n    tmp = x.slice();\n  } else if (str.slice(-6) === \"Array]\") {\n    tmp = new x.constructor(x);\n  }\n  if (tmp) {\n    for (list = Object.getOwnPropertySymbols(x); i < list.length; i++) {\n      set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n    }\n    for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {\n      if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;\n      set(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n    }\n  }\n  return tmp || x;\n}\nvar proxyStateMap = globalRef(\"__zag__proxyStateMap\", () => /* @__PURE__ */ new WeakMap());\nvar buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version) => {\n  const cache = snapCache.get(target);\n  if (cache?.[0] === version) {\n    return cache[1];\n  }\n  const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n  markToTrack(snap, true);\n  snapCache.set(target, [version, snap]);\n  Reflect.ownKeys(target).forEach((key) => {\n    const value = Reflect.get(target, key);\n    if (refSet.has(value)) {\n      markToTrack(value, false);\n      snap[key] = value;\n    } else if (proxyStateMap.has(value)) {\n      snap[key] = snapshot(value);\n    } else {\n      snap[key] = value;\n    }\n  });\n  return Object.freeze(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => {\n  if (!isObject(initialObject)) {\n    throw new Error(\"object required\");\n  }\n  const found = proxyCache.get(initialObject);\n  if (found) {\n    return found;\n  }\n  let version = versionHolder[0];\n  const listeners = /* @__PURE__ */ new Set();\n  const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n    if (version !== nextVersion) {\n      version = nextVersion;\n      listeners.forEach((listener) => listener(op, nextVersion));\n    }\n  };\n  let checkVersion = versionHolder[1];\n  const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n    if (checkVersion !== nextCheckVersion && !listeners.size) {\n      checkVersion = nextCheckVersion;\n      propProxyStates.forEach(([propProxyState]) => {\n        const propVersion = propProxyState[1](nextCheckVersion);\n        if (propVersion > version) {\n          version = propVersion;\n        }\n      });\n    }\n    return version;\n  };\n  const createPropListener = (prop) => (op, nextVersion) => {\n    const newOp = [...op];\n    newOp[1] = [prop, ...newOp[1]];\n    notifyUpdate(newOp, nextVersion);\n  };\n  const propProxyStates = /* @__PURE__ */ new Map();\n  const addPropListener = (prop, propProxyState) => {\n    if (isDev() && propProxyStates.has(prop)) {\n      throw new Error(\"prop listener already exists\");\n    }\n    if (listeners.size) {\n      const remove = propProxyState[3](createPropListener(prop));\n      propProxyStates.set(prop, [propProxyState, remove]);\n    } else {\n      propProxyStates.set(prop, [propProxyState]);\n    }\n  };\n  const removePropListener = (prop) => {\n    const entry = propProxyStates.get(prop);\n    if (entry) {\n      propProxyStates.delete(prop);\n      entry[1]?.();\n    }\n  };\n  const addListener = (listener) => {\n    listeners.add(listener);\n    if (listeners.size === 1) {\n      propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n        if (isDev() && prevRemove) {\n          throw new Error(\"remove already exists\");\n        }\n        const remove = propProxyState[3](createPropListener(prop));\n        propProxyStates.set(prop, [propProxyState, remove]);\n      });\n    }\n    const removeListener = () => {\n      listeners.delete(listener);\n      if (listeners.size === 0) {\n        propProxyStates.forEach(([propProxyState, remove], prop) => {\n          if (remove) {\n            remove();\n            propProxyStates.set(prop, [propProxyState]);\n          }\n        });\n      }\n    };\n    return removeListener;\n  };\n  const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n  const handler = {\n    deleteProperty(target, prop) {\n      const prevValue = Reflect.get(target, prop);\n      removePropListener(prop);\n      const deleted = Reflect.deleteProperty(target, prop);\n      if (deleted) {\n        notifyUpdate([\"delete\", [prop], prevValue]);\n      }\n      return deleted;\n    },\n    set(target, prop, value, receiver) {\n      const hasPrevValue = Reflect.has(target, prop);\n      const prevValue = Reflect.get(target, prop, receiver);\n      if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n        return true;\n      }\n      removePropListener(prop);\n      if (isObject(value)) {\n        value = getUntracked(value) || value;\n      }\n      let nextValue = value;\n      if (Object.getOwnPropertyDescriptor(target, prop)?.set) ; else {\n        if (!proxyStateMap.has(value) && canProxy(value)) {\n          nextValue = proxy(value);\n        }\n        const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n        if (childProxyState) {\n          addPropListener(prop, childProxyState);\n        }\n      }\n      Reflect.set(target, prop, nextValue, receiver);\n      notifyUpdate([\"set\", [prop], value, prevValue]);\n      return true;\n    }\n  };\n  const proxyObject = newProxy(baseObject, handler);\n  proxyCache.set(initialObject, proxyObject);\n  const proxyState = [baseObject, ensureVersion, createSnapshot, addListener];\n  proxyStateMap.set(proxyObject, proxyState);\n  Reflect.ownKeys(initialObject).forEach((key) => {\n    const desc = Object.getOwnPropertyDescriptor(initialObject, key);\n    if (desc.get || desc.set) {\n      Object.defineProperty(baseObject, key, desc);\n    } else {\n      proxyObject[key] = initialObject[key];\n    }\n  });\n  return proxyObject;\n}) => [\n  // public functions\n  proxyFunction2,\n  // shared state\n  proxyStateMap,\n  refSet,\n  // internal things\n  objectIs,\n  newProxy,\n  canProxy,\n  snapCache,\n  createSnapshot,\n  proxyCache,\n  versionHolder\n];\nvar [proxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n  return proxyFunction(initialObject);\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n  const proxyState = proxyStateMap.get(proxyObject);\n  if (isDev() && !proxyState) {\n    console.warn(\"Please use proxy object\");\n  }\n  let promise;\n  const ops = [];\n  const addListener = proxyState[3];\n  let isListenerActive = false;\n  const listener = (op) => {\n    ops.push(op);\n    if (notifyInSync) {\n      callback(ops.splice(0));\n      return;\n    }\n    if (!promise) {\n      promise = Promise.resolve().then(() => {\n        promise = void 0;\n        if (isListenerActive) {\n          callback(ops.splice(0));\n        }\n      });\n    }\n  };\n  const removeListener = addListener(listener);\n  isListenerActive = true;\n  return () => {\n    isListenerActive = false;\n    removeListener();\n  };\n}\nfunction snapshot(proxyObject) {\n  const proxyState = proxyStateMap.get(proxyObject);\n  if (isDev() && !proxyState) {\n    console.warn(\"Please use proxy object\");\n  }\n  const [target, ensureVersion, createSnapshot] = proxyState;\n  return createSnapshot(target, ensureVersion());\n}\nfunction ref(obj) {\n  refSet.add(obj);\n  return obj;\n}\n\n// src/proxy-computed.ts\nfunction proxyWithComputed(initialObject, computedFns) {\n  const keys = Object.keys(computedFns);\n  keys.forEach((key) => {\n    if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n      throw new Error(\"object property already defined\");\n    }\n    const computedFn = computedFns[key];\n    const { get, set: set2 } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n    const desc = {};\n    desc.get = () => get(snapshot(proxyObject));\n    if (set2) {\n      desc.set = (newValue) => set2(proxyObject, newValue);\n    }\n    Object.defineProperty(initialObject, key, desc);\n  });\n  const proxyObject = proxy(initialObject);\n  return proxyObject;\n}\n\nexport { clone, globalRef, proxy, proxyWithComputed, ref, snapshot, subscribe };\n", "import { createScope, MachineStatus, INIT_STATE } from '@zag-js/core';\nexport { mergeProps } from '@zag-js/core';\nimport { createNormalizer } from '@zag-js/types';\nimport { subscribe, proxy } from '@zag-js/store';\nimport { runIfFn, compact, isFunction, warn, toArray, isString, isEqual, identity } from '@zag-js/utils';\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar propMap = {\n  onFocus: \"onFocusin\",\n  onBlur: \"onFocusout\",\n  onChange: \"onInput\",\n  onDoubleClick: \"onDblclick\",\n  htmlFor: \"for\",\n  className: \"class\",\n  defaultValue: \"value\",\n  defaultChecked: \"checked\"\n};\nvar caseSensitiveSvgAttrs = /* @__PURE__ */ new Set([\"viewBox\", \"preserveAspectRatio\"]);\nvar toStyleString = (style) => {\n  let string = \"\";\n  for (let key in style) {\n    const value = style[key];\n    if (value === null || value === void 0) continue;\n    if (!key.startsWith(\"--\")) key = key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);\n    string += `${key}:${value};`;\n  }\n  return string;\n};\nvar normalizeProps = createNormalizer((props) => {\n  return Object.entries(props).reduce((acc, [key, value]) => {\n    if (value === void 0) return acc;\n    if (key in propMap) {\n      key = propMap[key];\n    }\n    if (key === \"style\" && typeof value === \"object\") {\n      acc.style = toStyleString(value);\n      return acc;\n    }\n    const normalizedKey = caseSensitiveSvgAttrs.has(key) ? key : key.toLowerCase();\n    acc[normalizedKey] = value;\n    return acc;\n  }, {});\n});\n\n// src/spread-props.ts\nvar prevAttrsMap = /* @__PURE__ */ new WeakMap();\nvar assignableProps = /* @__PURE__ */ new Set([\"value\", \"checked\", \"selected\"]);\nvar caseSensitiveSvgAttrs2 = /* @__PURE__ */ new Set([\n  \"viewBox\",\n  \"preserveAspectRatio\",\n  \"clipPath\",\n  \"clipRule\",\n  \"fillRule\",\n  \"strokeWidth\",\n  \"strokeLinecap\",\n  \"strokeLinejoin\",\n  \"strokeDasharray\",\n  \"strokeDashoffset\",\n  \"strokeMiterlimit\"\n]);\nvar isSvgElement = (node) => {\n  return node.tagName === \"svg\" || node.namespaceURI === \"http://www.w3.org/2000/svg\";\n};\nvar getAttributeName = (node, attrName) => {\n  const shouldPreserveCase = isSvgElement(node) && caseSensitiveSvgAttrs2.has(attrName);\n  return shouldPreserveCase ? attrName : attrName.toLowerCase();\n};\nfunction spreadProps(node, attrs) {\n  const oldAttrs = prevAttrsMap.get(node) || {};\n  const attrKeys = Object.keys(attrs);\n  const addEvt = (e, f) => {\n    node.addEventListener(e.toLowerCase(), f);\n  };\n  const remEvt = (e, f) => {\n    node.removeEventListener(e.toLowerCase(), f);\n  };\n  const onEvents = (attr) => attr.startsWith(\"on\");\n  const others = (attr) => !attr.startsWith(\"on\");\n  const setup = (attr) => addEvt(attr.substring(2), attrs[attr]);\n  const teardown = (attr) => remEvt(attr.substring(2), attrs[attr]);\n  const apply = (attrName) => {\n    const value = attrs[attrName];\n    const oldValue = oldAttrs[attrName];\n    if (value === oldValue) return;\n    if (attrName === \"class\") {\n      node.className = value ?? \"\";\n      return;\n    }\n    if (assignableProps.has(attrName)) {\n      node[attrName] = value ?? \"\";\n      return;\n    }\n    if (typeof value === \"boolean\") {\n      node.toggleAttribute(getAttributeName(node, attrName), value);\n      return;\n    }\n    if (value != null) {\n      node.setAttribute(getAttributeName(node, attrName), value);\n      return;\n    }\n    node.removeAttribute(getAttributeName(node, attrName));\n  };\n  for (const key in oldAttrs) {\n    if (attrs[key] == null) {\n      if (key === \"class\") {\n        node.className = \"\";\n      } else if (assignableProps.has(key)) {\n        node[key] = \"\";\n      } else {\n        node.removeAttribute(getAttributeName(node, key));\n      }\n    }\n  }\n  const oldEvents = Object.keys(oldAttrs).filter(onEvents);\n  oldEvents.forEach((evt) => {\n    remEvt(evt.substring(2), oldAttrs[evt]);\n  });\n  attrKeys.filter(onEvents).forEach(setup);\n  attrKeys.filter(others).forEach(apply);\n  prevAttrsMap.set(node, attrs);\n  return function cleanup() {\n    attrKeys.filter(onEvents).forEach(teardown);\n  };\n}\nfunction bindable(props) {\n  const initial = props().value ?? props().defaultValue;\n  if (props().debug) {\n    console.log(`[bindable > ${props().debug}] initial`, initial);\n  }\n  const eq = props().isEqual ?? Object.is;\n  const store = proxy({ value: initial });\n  const controlled = () => props().value !== void 0;\n  return {\n    initial,\n    ref: store,\n    get() {\n      return controlled() ? props().value : store.value;\n    },\n    set(nextValue) {\n      const prev = store.value;\n      const next = isFunction(nextValue) ? nextValue(prev) : nextValue;\n      if (props().debug) {\n        console.log(`[bindable > ${props().debug}] setValue`, { next, prev });\n      }\n      if (!controlled()) store.value = next;\n      if (!eq(next, prev)) {\n        props().onChange?.(next, prev);\n      }\n    },\n    invoke(nextValue, prevValue) {\n      props().onChange?.(nextValue, prevValue);\n    },\n    hash(value) {\n      return props().hash?.(value) ?? String(value);\n    }\n  };\n}\nbindable.cleanup = (_fn) => {\n};\nbindable.ref = (defaultValue) => {\n  let value = defaultValue;\n  return {\n    get: () => value,\n    set: (next) => {\n      value = next;\n    }\n  };\n};\n\n// src/refs.ts\nfunction createRefs(refs) {\n  const ref = { current: refs };\n  return {\n    get(key) {\n      return ref.current[key];\n    },\n    set(key, value) {\n      ref.current[key] = value;\n    }\n  };\n}\n\n// src/machine.ts\nvar VanillaMachine = class {\n  constructor(machine, userProps = {}) {\n    this.machine = machine;\n    __publicField(this, \"scope\");\n    __publicField(this, \"context\");\n    __publicField(this, \"prop\");\n    __publicField(this, \"state\");\n    __publicField(this, \"refs\");\n    __publicField(this, \"computed\");\n    __publicField(this, \"event\", { type: \"\" });\n    __publicField(this, \"previousEvent\", { type: \"\" });\n    __publicField(this, \"effects\", /* @__PURE__ */ new Map());\n    __publicField(this, \"transition\", null);\n    __publicField(this, \"cleanups\", []);\n    __publicField(this, \"subscriptions\", []);\n    __publicField(this, \"getEvent\", () => ({\n      ...this.event,\n      current: () => this.event,\n      previous: () => this.previousEvent\n    }));\n    __publicField(this, \"getStateConfig\", (state) => {\n      return this.machine.states[state];\n    });\n    __publicField(this, \"getState\", () => ({\n      ...this.state,\n      matches: (...values) => values.includes(this.state.get()),\n      hasTag: (tag) => !!this.getStateConfig(this.state.get())?.tags?.includes(tag)\n    }));\n    __publicField(this, \"debug\", (...args) => {\n      if (this.machine.debug) console.log(...args);\n    });\n    __publicField(this, \"notify\", () => {\n      this.publish();\n    });\n    __publicField(this, \"send\", (event) => {\n      if (this.status !== MachineStatus.Started) return;\n      queueMicrotask(() => {\n        if (!event) return;\n        this.previousEvent = this.event;\n        this.event = event;\n        this.debug(\"send\", event);\n        let currentState = this.state.get();\n        const eventType = event.type;\n        const transitions = this.getStateConfig(currentState)?.on?.[eventType] ?? this.machine.on?.[eventType];\n        const transition = this.choose(transitions);\n        if (!transition) return;\n        this.transition = transition;\n        const target = transition.target ?? currentState;\n        this.debug(\"transition\", transition);\n        const changed = target !== currentState;\n        if (changed) {\n          this.state.set(target);\n        } else if (transition.reenter && !changed) {\n          this.state.invoke(currentState, currentState);\n        } else {\n          this.action(transition.actions);\n        }\n      });\n    });\n    __publicField(this, \"action\", (keys) => {\n      const strs = isFunction(keys) ? keys(this.getParams()) : keys;\n      if (!strs) return;\n      const fns = strs.map((s) => {\n        const fn = this.machine.implementations?.actions?.[s];\n        if (!fn) warn(`[zag-js] No implementation found for action \"${JSON.stringify(s)}\"`);\n        return fn;\n      });\n      for (const fn of fns) {\n        fn?.(this.getParams());\n      }\n    });\n    __publicField(this, \"guard\", (str) => {\n      if (isFunction(str)) return str(this.getParams());\n      return this.machine.implementations?.guards?.[str](this.getParams());\n    });\n    __publicField(this, \"effect\", (keys) => {\n      const strs = isFunction(keys) ? keys(this.getParams()) : keys;\n      if (!strs) return;\n      const fns = strs.map((s) => {\n        const fn = this.machine.implementations?.effects?.[s];\n        if (!fn) warn(`[zag-js] No implementation found for effect \"${JSON.stringify(s)}\"`);\n        return fn;\n      });\n      const cleanups = [];\n      for (const fn of fns) {\n        const cleanup = fn?.(this.getParams());\n        if (cleanup) cleanups.push(cleanup);\n      }\n      return () => cleanups.forEach((fn) => fn?.());\n    });\n    __publicField(this, \"choose\", (transitions) => {\n      return toArray(transitions).find((t) => {\n        let result = !t.guard;\n        if (isString(t.guard)) result = !!this.guard(t.guard);\n        else if (isFunction(t.guard)) result = t.guard(this.getParams());\n        return result;\n      });\n    });\n    __publicField(this, \"subscribe\", (fn) => {\n      this.subscriptions.push(fn);\n      return () => {\n        const index = this.subscriptions.indexOf(fn);\n        if (index > -1) this.subscriptions.splice(index, 1);\n      };\n    });\n    __publicField(this, \"status\", MachineStatus.NotStarted);\n    __publicField(this, \"publish\", () => {\n      this.callTrackers();\n      this.subscriptions.forEach((fn) => fn(this.service));\n    });\n    __publicField(this, \"trackers\", []);\n    __publicField(this, \"setupTrackers\", () => {\n      this.machine.watch?.(this.getParams());\n    });\n    __publicField(this, \"callTrackers\", () => {\n      this.trackers.forEach(({ deps, fn }) => {\n        const next = deps.map((dep) => dep());\n        if (!isEqual(fn.prev, next)) {\n          fn();\n          fn.prev = next;\n        }\n      });\n    });\n    __publicField(this, \"getParams\", () => ({\n      state: this.getState(),\n      context: this.context,\n      event: this.getEvent(),\n      prop: this.prop,\n      send: this.send,\n      action: this.action,\n      guard: this.guard,\n      track: (deps, fn) => {\n        fn.prev = deps.map((dep) => dep());\n        this.trackers.push({ deps, fn });\n      },\n      refs: this.refs,\n      computed: this.computed,\n      flush: identity,\n      scope: this.scope,\n      choose: this.choose\n    }));\n    const { id, ids, getRootNode } = runIfFn(userProps);\n    this.scope = createScope({ id, ids, getRootNode });\n    const prop = (key) => {\n      const __props = runIfFn(userProps);\n      const props = machine.props?.({ props: compact(__props), scope: this.scope }) ?? __props;\n      return props[key];\n    };\n    this.prop = prop;\n    const context = machine.context?.({\n      prop,\n      bindable,\n      scope: this.scope,\n      flush(fn) {\n        queueMicrotask(fn);\n      },\n      getContext() {\n        return ctx;\n      },\n      getComputed() {\n        return computed;\n      },\n      getRefs() {\n        return refs;\n      },\n      getEvent: this.getEvent.bind(this)\n    });\n    if (context) {\n      Object.values(context).forEach((item) => {\n        const unsub = subscribe(item.ref, () => this.notify());\n        this.cleanups.push(unsub);\n      });\n    }\n    const ctx = {\n      get(key) {\n        return context?.[key].get();\n      },\n      set(key, value) {\n        context?.[key].set(value);\n      },\n      initial(key) {\n        return context?.[key].initial;\n      },\n      hash(key) {\n        const current = context?.[key].get();\n        return context?.[key].hash(current);\n      }\n    };\n    this.context = ctx;\n    const computed = (key) => {\n      return machine.computed?.[key]({\n        context: ctx,\n        event: this.getEvent(),\n        prop,\n        refs: this.refs,\n        scope: this.scope,\n        computed\n      }) ?? {};\n    };\n    this.computed = computed;\n    const refs = createRefs(machine.refs?.({ prop, context: ctx }) ?? {});\n    this.refs = refs;\n    const state = bindable(() => ({\n      defaultValue: machine.initialState({ prop }),\n      onChange: (nextState, prevState) => {\n        if (prevState) {\n          const exitEffects = this.effects.get(prevState);\n          exitEffects?.();\n          this.effects.delete(prevState);\n        }\n        if (prevState) {\n          this.action(this.getStateConfig(prevState)?.exit);\n        }\n        this.action(this.transition?.actions);\n        const cleanup = this.effect(this.getStateConfig(nextState)?.effects);\n        if (cleanup) this.effects.set(nextState, cleanup);\n        if (prevState === INIT_STATE) {\n          this.action(machine.entry);\n          const cleanup2 = this.effect(machine.effects);\n          if (cleanup2) this.effects.set(INIT_STATE, cleanup2);\n        }\n        this.action(this.getStateConfig(nextState)?.entry);\n      }\n    }));\n    this.state = state;\n    this.cleanups.push(subscribe(this.state.ref, () => this.notify()));\n  }\n  start() {\n    this.status = MachineStatus.Started;\n    this.debug(\"initializing...\");\n    this.state.invoke(this.state.initial, INIT_STATE);\n    this.setupTrackers();\n  }\n  stop() {\n    this.effects.forEach((fn) => fn?.());\n    this.effects.clear();\n    this.transition = null;\n    this.action(this.machine.exit);\n    this.cleanups.forEach((unsub) => unsub());\n    this.cleanups = [];\n    this.subscriptions = [];\n    this.status = MachineStatus.Stopped;\n    this.debug(\"unmounting...\");\n  }\n  get service() {\n    return {\n      state: this.getState(),\n      send: this.send,\n      context: this.context,\n      prop: this.prop,\n      scope: this.scope,\n      refs: this.refs,\n      computed: this.computed,\n      event: this.getEvent(),\n      getStatus: () => this.status\n    };\n  }\n};\n\nexport { VanillaMachine, normalizeProps, spreadProps };\n", "/**\n * Corex utility functions for working with Zag.js components.\n *\n * Note: `normalizeProps` is provided by @zag-js/vanilla and is imported from there.\n * `spreadProps` is wrapped to ensure ARIA boolean attributes are converted to strings\n * for accessibility compliance.\n */\nimport { spreadProps as zagSpreadProps } from \"@zag-js/vanilla\";\n\n/**\n * Wrapper around zag's spreadProps that converts boolean ARIA attributes to strings\n * (\"true\" or \"false\") for accessibility compliance. All other attributes are passed\n * through unchanged.\n *\n * The vanilla spreadProps removes boolean false attributes, but ARIA attributes\n * should always be present as strings when provided by the API.\n *\n * Exception: `aria-readonly` is omitted when false as it's invalid on certain roles\n * (e.g., role=\"button\").\n */\nexport function spreadProps(\n  node: Element,\n  attrs: Record<string, any>,\n): () => void {\n  const normalizedAttrs: Record<string, any> = {};\n\n  for (const [attrName, value] of Object.entries(attrs)) {\n    if (typeof value === \"boolean\") {\n      const lowerAttrName = attrName.toLowerCase();\n      if (lowerAttrName.startsWith(\"aria-\")) {\n        if (lowerAttrName === \"aria-readonly\" && !value) continue;\n        normalizedAttrs[attrName] = String(value);\n      } else {\n        normalizedAttrs[attrName] = value;\n      }\n    } else {\n      normalizedAttrs[attrName] = value;\n    }\n  }\n\n  return zagSpreadProps(node, normalizedAttrs);\n}\n\ntype PropertyType = \"string\" | \"boolean\" | \"number\" | \"string[]\";\ntype PropMap = Record<string, PropertyType>;\n/**\n * Renders a specific part of the UI based on the component's props.\n * If `propsToSend` is a PropMap, attributes are read from the DOM.\n * If `propsToSend` is a plain object, it is passed directly to the API.\n *\n * NOTE: This version treats the passed `root` element itself as a candidate\n * part (so you can call renderPart(li, 'item', api, { item }) for a single li).\n */\nexport const renderPart = (\n  root: HTMLElement,\n  name: string,\n  api: any,\n  propsToSend?: PropMap | Record<string, any | ((el: HTMLElement) => any)>,\n) => {\n  const camelizedName = name\n    .split(\"-\")\n    .map((word, index) =>\n      index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1),\n    )\n    .join(\"\");\n  const getterName = `get${camelizedName.charAt(0).toUpperCase()}${camelizedName.slice(1)}Props`;\n  if (typeof api[getterName] !== \"function\") return;\n\n  // Collect parts: include root itself if it matches, plus any descendants\n  const parts: HTMLElement[] = [];\n  try {\n    if (\n      (root as Element).matches &&\n      (root as Element).matches(`[data-part='${name}']`)\n    ) {\n      parts.push(root);\n    }\n  } catch (e) {\n    console.log(e);\n  }\n  parts.push(\n    ...Array.from(root.querySelectorAll<HTMLElement>(`[data-part='${name}']`)),\n  );\n\n  // Find the component root (closest ancestor with class containing \"-js\")\n  const componentRoot = root.closest('[class*=\"-js\"]') as HTMLElement | null;\n\n  const scopedParts = componentRoot\n    ? parts.filter((part) => part.closest('[class*=\"-js\"]') === componentRoot)\n    : parts;\n\n  scopedParts.forEach((part) => {\n    let props: Record<string, any> | undefined;\n    if (propsToSend) {\n      if (isPropMap(propsToSend)) {\n        props = {};\n        for (const [prop, type] of Object.entries(propsToSend)) {\n          const getter =\n            type === \"string\"\n              ? getString\n              : type === \"boolean\"\n                ? getBoolean\n                : type === \"number\"\n                  ? getNumber\n                  : type === \"string[]\"\n                    ? getStringList\n                    : getString;\n          props[prop] = getter(part, prop);\n        }\n      } else {\n        props = {};\n        for (const [key, value] of Object.entries(propsToSend)) {\n          props[key] = typeof value === \"function\" ? value(part) : value;\n        }\n      }\n    }\n    const result = props ? api[getterName](props) : api[getterName]();\n    spreadProps(part, result);\n    if (name === \"preview\") {\n      const childrenValue = part.getAttribute(\"children\");\n      if (childrenValue !== null) part.textContent = childrenValue;\n    }\n  });\n};\nfunction isPropMap(value: any): value is PropMap {\n  if (typeof value !== \"object\" || value === null) return false;\n  return Object.values(value).every(\n    (v) =>\n      v === \"string\" || v === \"boolean\" || v === \"number\" || v === \"string[]\",\n  );\n}\n\n/**\n * Renders a list of items inside the root element. Each item is identified by the `name`, and the\n * properties for each item are retrieved from the API based on its `data-value`, `data-disabled`, and `data-index` attributes.\n * @param root - The root HTML element containing the items.\n * @param name - The name of the item part to render.\n * @param api - The API object used to retrieve the properties for each item.\n * ```\n */\nexport function renderList<T extends { value: string; label?: string }>(\n  root: HTMLElement,\n  name: string,\n  api: any,\n  items: T[],\n) {\n  const parts = root.querySelectorAll<HTMLElement>(`[data-part='${name}']`);\n  const getter = api[`get${capitalize(name)}Props`];\n  parts.forEach((el, index) => {\n    const value = el.getAttribute(\"data-value\") || items[index]?.value;\n    const item = items.find((item) => item.value === value);\n    if (!item) return;\n    const props = getter({ item });\n    spreadProps(el, props);\n  });\n}\n\nfunction capitalize(str: string): string {\n  return str.replace(/(^|-)([a-z])/g, (_m, _p, l) => l.toUpperCase());\n}\ninterface Node {\n  id: string;\n  name: string;\n  children?: Node[];\n}\n/**\n * Recursively searches for a node in a hierarchical structure based on its `id`.\n * @param tree - The tree structure to search through.\n * @param id - The ID of the node to find.\n * @returns The node if found, or `null` if no node with the specified ID exists.\n * ```\n */\nexport function findNodeById(tree: Node, id: string): Node | null {\n  if (tree.id === id) return tree;\n  if (!tree.children) return null;\n  for (const child of tree.children) {\n    const found = findNodeById(child, id);\n    if (found) return found;\n  }\n  return null;\n}\n/**\n * Tree View Component: Renders a node from the provided hierarchical tree view into the specified part in the UI.\n * The part is identified by the `name`, and the node is retrieved from the tree using its `id` attribute.\n * @param root - The root HTML element in which the node resides.\n * @param name - The name of the node part to render.\n * @param api - The API object used to retrieve the properties for the node.\n * @param tree - The hierarchical tree structure containing the nodes.\n *\n * Example:\n * ```ts\n * const root = document.getElementById('root');\n * const tree = { id: '1', name: 'root', children: [{ id: '2', name: 'child' }] };\n * renderNode(root, 'node', api, tree); // Renders the node with properties from the tree\n * ```\n */\nexport const renderNode = (\n  root: HTMLElement,\n  name: string,\n  api: any,\n  tree: Node,\n) => {\n  const parts = root.querySelectorAll<HTMLElement>(`[data-part='${name}']`);\n  // Convert part name to API method name, e.g., \"branch-control\" \u2192 \"getBranchControlProps\"\n  const camelizedName = name.replace(\n    /(^|-)([a-z])/g,\n    (_match, _prefix, letter) => letter.toUpperCase(),\n  );\n  const getterName = `get${camelizedName}Props`;\n  // Helper to recursively find node and index path\n  const findNodeById = (\n    node: Node,\n    id: string,\n    path: number[] = [],\n  ): { node: Node; indexPath: number[] } | null => {\n    if (node.id === id) return { node, indexPath: path };\n    if (node.children) {\n      for (let i = 0; i < node.children.length; i++) {\n        const found = findNodeById(node.children[i], id, [...path, i]);\n        if (found) return found;\n      }\n    }\n    return null;\n  };\n  parts.forEach((part) => {\n    const id = part.getAttribute(\"data-id\");\n    if (!id) return;\n    const found = findNodeById(tree, id);\n    if (!found) return;\n    const { node, indexPath } = found;\n    const getPropsFn =\n      typeof api[getterName] === \"function\" ? api[getterName] : api.getProps;\n    const props = getPropsFn({ indexPath, node });\n    spreadProps(part, props);\n    const label = part.getAttribute(\"children\");\n    if (label != null) {\n      part.textContent = label;\n    }\n  });\n};\n/**\n * Extract a string data attribute with validation for specific type\n * @param element - The HTML element to extract from\n * @param attrName - The data attribute name (without 'data-' prefix)\n * @param validValues - Optional array of allowed values\n * @returns Validated string value or undefined\n */\nexport const getString = <T extends string>(\n  element: HTMLElement,\n  attrName: string,\n  validValues?: readonly T[],\n): T | undefined => {\n  const value = element.dataset[attrName];\n  if (\n    value !== undefined &&\n    (!validValues || (validValues as readonly string[]).includes(value))\n  ) {\n    return value as T;\n  }\n  return undefined;\n};\n/**\n * Extract a list of string values from a data attribute\n * @param element - The HTML element to extract from\n * @param attrName - The data attribute name (without 'data-' prefix)\n * @returns Array of strings or undefined\n */\nexport const getStringList = (\n  element: HTMLElement,\n  attrName: string,\n): string[] | undefined => {\n  const value = element.dataset[attrName];\n  if (typeof value === \"string\") {\n    return value\n      .split(\",\")\n      .map((v) => v.trim())\n      .filter((v) => v.length > 0);\n  }\n  return undefined;\n};\n/**\n * Extract a number data attribute with optional validation\n * @param element - The HTML element to extract from\n * @param attrName - The data attribute name (without 'data-' prefix)\n * @param validValues - Optional array of allowed numeric values\n * @returns Parsed number value or undefined\n */\nexport const getNumber = (\n  element: HTMLElement,\n  attrName: string,\n  validValues?: readonly number[],\n): number | undefined => {\n  const raw = element.dataset[attrName];\n  if (raw === undefined) return undefined;\n  const parsed = Number(raw);\n  if (Number.isNaN(parsed)) return undefined;\n  if (validValues && !validValues.includes(parsed)) return 0;\n  return parsed;\n};\n/**\n * Extract a boolean data attribute\n * @param element - The HTML element to extract from\n * @param attrName - The data attribute name (without 'data-' prefix)\n * @returns Boolean value or undefined\n */\nexport const getBoolean = (\n  element: HTMLElement,\n  attrName: string,\n): boolean | undefined => {\n  const value = element.dataset[attrName];\n  if (value === \"\") return true;\n  if (value === \"true\") return true;\n  if (value === \"false\") return false;\n  if (element.hasAttribute(attrName)) return true;\n  if (element.hasAttribute(`data-${attrName}`)) return true;\n\n  return undefined;\n};\n/**\n * Generate a random ID if none is provided\n * @param element - Optional HTML element to get an existing id\n * @param fallbackId - Optional fallback base string (e.g. \"checkbox\")\n * @returns ID string (existing or generated)\n */\nexport const generateId = (\n  element?: HTMLElement,\n  fallbackId: string = \"element\",\n): string => {\n  if (element?.id) return element.id;\n  return `${fallbackId}-${Math.random().toString(36).substring(2, 9)}`;\n};\n\nexport function valuesEqual<T>(a: T, b: T): boolean {\n  return a === b;\n}\n\nexport function arraysEqualUnordered(\n  a: string[] = [],\n  b: string[] = [],\n): boolean {\n  if (a === b) return true;\n  if (!Array.isArray(a) || !Array.isArray(b)) return false;\n  if (a.length !== b.length) return false;\n  return a.every((v) => b.includes(v));\n}\n\n/**\n * Parse element IDs from child parts with data-part and data-id attributes\n * @param root - The root element containing the parts\n * @param partNames - Array of part names to look for (e.g., ['root', 'control', 'label'])\n * @returns Object with parsed IDs or undefined if no IDs found\n *\n * Example:\n * ```html\n * <div class=\"checkbox-js\">\n *   <div data-part=\"root\" data-id=\"my-root\"></div>\n *   <div data-part=\"control\" data-id=\"my-control\"></div>\n * </div>\n * ```\n * ```ts\n * const ids = getPartIds(element, ['root', 'control', 'label']);\n * // Returns: { root: 'my-root', control: 'my-control' }\n * ```\n */\nexport const getPartIds = (\n  root: HTMLElement,\n  partNames: readonly string[],\n): Record<string, string> | undefined => {\n  const ids: Record<string, string> = {};\n  let hasAnyId = false;\n\n  for (const partName of partNames) {\n    const part = root.querySelector<HTMLElement>(`[data-part=\"${partName}\"]`);\n    const id = part?.dataset.id;\n\n    if (id) {\n      // Convert kebab-case to camelCase: hidden-input -> hiddenInput\n      const camelKey = partName.replace(/-([a-z])/g, (_, letter) =>\n        letter.toUpperCase(),\n      );\n      ids[camelKey] = id;\n      hasAnyId = true;\n    }\n  }\n\n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QAAWC,KAAYH,EAAW,CAEhC,IAAMtB,EADOpC,EAAK,cAA2B,eAAe6D,CAAQ,IAAI,GACvD,QAAQ,GAEzB,GAAIzB,EAAI,CAEN,IAAM0B,EAAWD,EAAS,QAAQ,YAAa,CAACE,EAAGrB,IACjDA,EAAO,YAAY,CACrB,EACAiB,EAAIG,CAAQ,EAAI1B,EAChBwB,EAAW,EACb,CACF,CAEA,OAAOA,EAAWD,EAAM,MAC1B",
  "names": ["Component", "el", "props", "isFunction", "v", "fnToString", "objectCtorString", "floor", "abs", "round", "min", "max", "pow", "sign", "_tick", "_tick", "createNormalizer", "fn", "_target", "key", "props", "TRACK_MEMO_SYMBOL", "GET_ORIGINAL_SYMBOL", "getProto", "objectsToTrack", "isObjectToTrack", "obj", "getUntracked", "obj", "isObjectToTrack", "GET_ORIGINAL_SYMBOL", "markToTrack", "mark", "objectsToTrack", "glob", "globalRef", "key", "value", "g", "refSet", "isReactElement", "x", "isVueElement", "isDOMElement", "isElement", "isObject", "canProxy", "isDev", "proxyStateMap", "globalRef", "buildProxyFunction", "objectIs", "newProxy", "target", "handler", "snapCache", "createSnapshot", "version", "cache", "snap", "markToTrack", "key", "value", "refSet", "snapshot", "proxyCache", "versionHolder", "proxyFunction2", "initialObject", "isObject", "found", "listeners", "notifyUpdate", "op", "nextVersion", "listener", "checkVersion", "ensureVersion", "nextCheckVersion", "propProxyStates", "propProxyState", "propVersion", "createPropListener", "prop", "newOp", "addPropListener", "isDev", "remove", "removePropListener", "entry", "addListener", "prevRemove", "baseObject", "proxyObject", "prevValue", "deleted", "receiver", "hasPrevValue", "getUntracked", "nextValue", "canProxy", "proxy", "childProxyState", "proxyState", "desc", "proxyFunction", "snapshot", "proxyObject", "proxyState", "proxyStateMap", "isDev", "target", "ensureVersion", "createSnapshot", "propMap", "caseSensitiveSvgAttrs", "toStyleString", "style", "string", "key", "value", "match", "normalizeProps", "createNormalizer", "props", "acc", "normalizedKey", "prevAttrsMap", "assignableProps", "caseSensitiveSvgAttrs2", "isSvgElement", "node", "getAttributeName", "attrName", "spreadProps", "attrs", "oldAttrs", "attrKeys", "addEvt", "e", "f", "remEvt", "onEvents", "attr", "others", "setup", "teardown", "apply", "oldValue", "evt", "bindable", "initial", "eq", "store", "proxy", "controlled", "nextValue", "prev", "next", "isFunction", "prevValue", "_fn", "defaultValue", "spreadProps", "node", "attrs", "normalizedAttrs", "attrName", "value", "lowerAttrName", "renderPart", "root", "name", "api", "propsToSend", "camelizedName", "word", "index", "getterName", "parts", "e", "componentRoot", "part", "props", "isPropMap", "prop", "type", "getter", "getString", "getBoolean", "getNumber", "getStringList", "key", "result", "childrenValue", "v", "renderList", "items", "capitalize", "el", "item", "str", "_m", "_p", "l", "findNodeById", "tree", "id", "child", "found", "renderNode", "_match", "_prefix", "letter", "path", "i", "indexPath", "label", "element", "validValues", "raw", "parsed", "generateId", "fallbackId", "valuesEqual", "a", "b", "arraysEqualUnordered", "getPartIds", "partNames", "ids", "hasAnyId", "partName", "camelKey", "_"]
}
