Creates a deep copy of a Maidr config that is safe to hand to the model
layer (which takes ownership of, and may mutate, the data arrays).
structuredClone cannot clone functions, so the optional onNavigate
callback is peeled off, the serializable payload is cloned, and the
callback is re-attached.
Creates a deep copy of a Maidr config that is safe to hand to the model layer (which takes ownership of, and may mutate, the data arrays).
structuredClonecannot clone functions, so the optionalonNavigatecallback is peeled off, the serializable payload is cloned, and the callback is re-attached.