Bridges are metaphors for everything in ASCII Art (with apologies to Jim West for the title, and randomly inspired by Cisco's textual representation of their logo: .:|:.:|:. for the concept)

Given an input integer 1 &lt;= n &lt;= 255, output an ASCII art representation of a suspension bridge of distance n following the below construction rules:


The start and end of the bridge (not counted in the n distance) are always -| and |-, so the bridge can appropriately connect to the highways next to it.
The bridge doesn't extend downward (the roadway level, composed of the - row, is the bottom row).
There can be at most two roadway pieces -- in a row, any longer span requires suspension cables for support.
The suspension cables \ extend from the roadway up to the towers | in straight lines.
The towers | must be tall enough to support the adjacent suspension cables, but no taller.
The bridge must be balanced left-to-right about the middle point, favoring the center sections whenever possible.
All of the above should result in a minimization of the cables, but just to be clear, the number of suspension cables must be minimized while still following the above rules.


To provide a visual representation, here are the expected outputs for n = 1, 2, 3, ... 15 --

1
-|-|-

2
-|--|-

3
-|\-/|-

4
-|\--/|-

5
 |\   /|
-|-\-/-|-

6
 |\    /|
-|-\--/-|-

7
 |\     /|
 | \   / |
-|--\-/--|-

8
 |\      /|
 | \    / |
-|--\--/--|-

9
 |\       /|
 | \     / |
 |  \   /  |
-|\--\-/--/|-

10
 |\        /|
 | \      / |
 |  \    /  |
-|\--\--/--/|-

11
 |\         /|
 | \       / |
 |  \     /  |
 |\  \   /  /|
-|-\--\-/--/-|-

12
 |\          /|
 | \        / |
 |  \      /  |
 |\  \    /  /|
-|-\--\--/--/-|-

13
 |\           /|
 | \         / |
 |  \       /  |
 |\  \     /  /|
 | \  \   /  / |
-|--\--\-/--/--|-

14
 |\            /|
 | \          / |
 |  \        /  |
 |\  \      /  /|
 | \  \    /  / |
-|--\--\--/--/--|-

15
 |\             /|
 | \           / |
 |  \         /  |
 |\  \       /  /|
 | \  \     /  / |
 |  \  \   /  /  |
-|\--\--\-/--/--/|-


Input

A single positive integer in any convenient format, n &gt; 9.

Output

The ASCII-art bridge following the above construction technique.

Rules


Leading or trailing newlines or whitespace are all optional, so long as the bridge characters themselves line up correctly.
Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
If possible, please include a link to an online testing environment so people can try out your code!
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
Python 2 , 173 bytes

i=input()
f=lambda b:'-|'+b[::-1].replace('/','\\')+-~(~i%2)*'-'+b+'|-'
b=(i*'/--')[:~-i/2]
for x in range(1,~-i/2):print f((len(b)-x)*'-'+b[:x]).replace('-',' ')
print f(b)

Mirror the value of b and add the central &quot;-&quot;
f=lambda b:'-|'+b[::-1].replace('/','\\')+-~(~i%2)*'-'+b+'|-'
Base pattern (right half of the bottom line)
b=(i*'/--')[:~-i/2]
Loop for non-bottom layers
for x in range(1,~-i/2):
Get the first x characters of the base pattern and complete with &quot;-&quot;
(len(b)-x)*'-'+b[:x]
Replace all - with spaces to print all the layers (except bottom)
print f().replace('-',' ')
Print bottom layer
print f(b)