/*
 * 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-oj-lib";const DONT_LOAD=["ojcorebundle.js","oj3rdpartybundle.js","ojcommoncomponentbundle.js"];function getName(){return RULE_NAME};function getShortDescription(){return"Use of the oj.js script should be discontinued"};function getDescription(){return"The <i>oj.js</i> script has been <b>deprecated</b>. Applications should use <i>Require.js</i> for <a href=\"https://docs.oracle.com/en/middleware/jet/6/develop/using-requirejs-modular-development.html\">modular development</a>."};function register(){return{"script":_handleTag}};function _handleTag(ruleCtx,tagName,data){var node,attribs,attrib,src,issue;var attrPos;node=ruleCtx.node;attribs=node?node.attribs:null;if(!attribs){return}for(attrib in attribs){if(attrib.toLowerCase()==="src"){src=attribs[attrib].toLowerCase();if(src.endsWith("oj.js")){issue=new ruleCtx.Issue("<"+tagName+"> loads full library 'oj.js' - do not use - deprecated!")}if(issue){attrPos=ruleCtx.utils.DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.node,attrib);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}};module.exports={getName,getDescription,getShortDescription,register};