import e from"@arcgis/core/core/Collection";import{compare as r,compareAsync as t}from"./array.js";export function compare(e,t,n){return r(e,t,n)}export async function compareAsync(e,r,n){return t(e,r,n)}export function _generateChangeEvent(r,t){const n=t??new e,o=r??new e,c=n,a=n.filter((e=>o.includes(e))),i=o.filter((e=>n.includes(e))),d={added:n.filter((e=>!o.includes(e))).toArray(),removed:o.filter((e=>!n.includes(e))).toArray(),moved:a.filter(((e,r)=>i.indexOf(e)!==r)).toArray(),target:c};if(d.added.length||d.removed.length||d.moved.length)return d}