{"version":3,"file":"propsDiffer.cjs","names":[],"sources":["../../../src/Slots/utils/propsDiffer.ts"],"sourcesContent":["/**\n * Returns `true` if the two objects are different in any of the following ways:\n * - different number of own enumerable keys\n * - different set of key names\n * - different values for the same key (shallow comparison using !==)\n *\n * Returns `false` if they have exactly the same keys and the same values.\n *\n * @param a - first object\n * @param b - second object\n * @returns `true` if they are different, `false` if they are equivalent\n */\nexport function propsDiffer(a: unknown, b: unknown): boolean {\n  // Quick identity check\n  if (a === b) return false;\n\n  // Both must be non-null objects\n  if (a == null || b == null || typeof a !== 'object' || typeof b !== 'object') {\n    return true;\n  }\n\n  const keysA = Object.keys(a).filter(k => k !== 'children');\n  const keysB = Object.keys(b).filter(k => k !== 'children');\n\n  // Different number of keys → different\n  if (keysA.length !== keysB.length) {\n    return true;\n  }\n\n  // Check that every key in A exists in B and has the same value\n  for (const key of keysA) {\n    if (!(key in b) || (a as any)[key] !== (b as any)[key]) {\n      return true;\n    }\n  }\n\n  // If we got here → same keys, same values\n  return false;\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAgB,YAAY,GAAY,GAAqB;CAE3D,IAAI,MAAM,GAAG,OAAO;CAGpB,IAAI,KAAK,QAAQ,KAAK,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,UAClE,OAAO;CAGT,MAAM,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,QAAO,MAAK,MAAM,UAAU;CACzD,MAAM,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,QAAO,MAAK,MAAM,UAAU;CAGzD,IAAI,MAAM,WAAW,MAAM,QACzB,OAAO;CAIT,KAAK,MAAM,OAAO,OAChB,IAAI,EAAE,OAAO,MAAO,EAAU,SAAU,EAAU,MAChD,OAAO;CAKX,OAAO;AACT"}