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":["/**\n * Checks if array `a` is equal to array `b`. Note that this does not do a deep\n * equality check. It only checks if the arrays are the same length and if each\n * element in `a` is equal to (`===`) the corresponding element in `b`.\n *\n * @param a - The first array to compare.\n * @param b - The second array to compare.\n * @returns `true` if the arrays are equal, `false` otherwise.\n */\nexport function isEqual(a: unknown[], b: unknown[]): boolean {\n  return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/**\n * Checks equality between two string arrays known to contain valid BIP-32 derivation paths.\n *\n * @param a - The first string array to compare.\n * @param b - The second string array to compare.\n * @returns - `true` if the arrays are equal, `false` otherwise.\n */\nexport function isDerivationPathEqual(a: string[], b: string[]): boolean {\n  return (\n    a.length === b.length &&\n    a.every((value, index) => {\n      const bValue = b[index];\n\n      if (index === 0) {\n        return value === bValue;\n      }\n\n      const aIsHardened = value.endsWith(\"'\");\n      const bIsHardened = bValue.endsWith(\"'\");\n      const aInt = aIsHardened ? value.slice(0, -1) : value;\n      const bInt = bIsHardened ? bValue.slice(0, -1) : bValue;\n\n      return (\n        aIsHardened === bIsHardened && parseInt(aInt, 10) === parseInt(bInt, 10)\n      );\n    })\n  );\n}\n"]}