Special quines and code golf, hooray! Make a quine. Simple enough, except it has to be a palindrome and accept input.

Now, any side of a palindromic quine is one half of it. For example, one side of the hypothetical quine AAAA is AA. One side of AAAAA is AA (the center symbol is ignored).

Your job is to make a quine like this that accepts input. If the input is the whole quine, then the quine prints the left side of itself. If the input is either side of the quine then the quine prints itself. Of course, with quines with an odd number of symbols the center symbol is ignored. If the input is anything other than the cases specified, the program must do nothing.

This is code golf, so the shortest submission wins.
Haskell, 350 346 342 bytes



main=interact f;f s|s==l++r=l|s/=l,s/=r=[]|1&lt;3=l++r;r=reverse l;l=q++shows q['-'];q="main=interact f;f s|s==l++r=l|s/=l,s/=r=[]|1&lt;3=l++r;r=reverse l;l=q++shows q['-'];q="--"=q;]'-'[q swohs++q=l;l esrever=r;r++l=3&lt;1|][=r=/s,l=/s|l=r++l==s|s f;f tcaretni=niam"=q;]'-'[q swohs++q=l;l esrever=r;r++l=3&lt;1|][=r=/s,l=/s|l=r++l==s|s f;f tcaretni=niam



Prints its left half with itself as input: https://tio.run/##7ZAxCoUwEESvEmwsoohYxjlJSBEkYvhrJNnwbXJ3f8gd7H4zsMPsY5jD8scRPc9pfYAP2SW7ZbGrXXBhgKRMoMITaKiSoE2Z16X5KiG5r0vsBClClJKP62YRdT/2RkV0r0DHsUNUpp46Cr6vg6WMqGHhuL2iQqQkLOtcjK74iQeqUgjNRy3RyuTNJpeDR/D2fAX63/WdXX8
Prints itself with its left half as input: Try it online!
Prints itself with its right half as input: Try it online!
Prints nothing with anything else as input: Try it online!


Edit: -8 bytes thanks to Ørjan Johansen! Also changed to a version which does not need (&lt;&gt;).