diff --git a/html/index.html b/html/index.html
index ef67377..4f38955 100644
--- a/html/index.html
+++ b/html/index.html
@@ -161,7 +161,11 @@
}
}
- return 0;
+ // Sort unrestricted, then restricted/streamlined, then authority required
+
+ const type1 = item1['restriction_flag'] === 'U' ? 0 : item1['restriction_flag'] === 'R' ? 1 : item1['restriction_flag'] === 'S' ? 1 : item1['streamlined_authorities'] > 0 ? 2 : 3;
+ const type2 = item2['restriction_flag'] === 'U' ? 0 : item2['restriction_flag'] === 'R' ? 1 : item2['restriction_flag'] === 'S' ? 1 : item2['streamlined_authorities'] > 0 ? 2 : 3;
+ return type1 - type2;
}
function execAsScalars(stmt) {