You will be in panic if you encounter this kind of situation, but you don’t need to be in panic.
First, you report to the local police then go to your country consulate to apply for a new passport
Once you get your new passport, you go to your local Immigration office and give them your new passport information.
When you go to the Immigration office, make sure to bring your ARC with you.
Here is the info on where to go.
New Zealand citizens
South Africa citizens
Useful links for other matters