/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULE_NAME="oj-html-cdn";const LONG_DESCRIPT="For improved performance, production status pages referred to in <b><i><link></i></b> or <b><i><script></i></b> elements should load from the Content Delivery Network (<b>CDN</b>).";const SHORT_DESCRIPT="Production status pages should preferably load from the CDN.";function getName(){return RULE_NAME};function getShortDescription(){return SHORT_DESCRIPT};function getDescription(){return LONG_DESCRIPT};function register(){return{"script":_onTag,"link":_onTag}};function _onTag(ruleCtx,tagName){var attribs=ruleCtx.tagNode.attribs;var url,issue;if(attribs){if(attribs.src){url=attribs.src}else if(attribs.href){url=attribs.href}if(url){if(url.toLowerCase().indexOf("/cdn/jet/")<0){issue=new ruleCtx.Issue(`Performance: <${tagName}> does not refer to the Content Delivery Network (CDN)`);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}};module.exports={getName,getDescription,getShortDescription,register};