nl_tokens: Sorts all products in the following order :
pl_tokens: function sortProducts ( products ) { let planItems , includedItems , domainItems , creditItems , otherItems ; planItems = products . filter ( isPlan ) ; includedItems = products . filter ( isIncludedWithPlan ) ; domainItems = difference ( products , includedItems ) ; domainItems = domainItems . filter ( isDomainProduct ) ; domainItems = toPairs ( groupBy ( domainItems , 'meta' ) ) ; domainItems = sortBy ( domainItems , function ( pair ) { if ( pair [ 1 ] [ 0 ] && pair [ 1 ] [ 0 ] . cost === 0 ) { return - 1 ; } return pair [ 0 ] ; } ) ; domainItems = domainItems . map ( function ( pair ) { return sortBy ( <mask> [ 1 ] , getDomainProductRanking ) ; } ) ; domainItems = flatten ( domainItems ) ; creditItems = products . filter ( isCredits ) ; otherItems = difference ( products , planItems , domainItems , includedItems , creditItems ) ; return planItems . concat ( includedItems ) . concat ( domainItems ) . concat ( otherItems ) . concat ( creditItems ) ; }