<commit_before>
/*global require*/
require(["esri/arcgis/utils",
	"esri/config",
	"esri/domUtils",
	"layer-list",
	"dojo/text!./webmap.json"
], function (arcgisUtils, esriConfig, domUtils, LayerList, webmap) {
	"use strict";

	// Specify CORS enabled servers.
	["www.wsdot.wa.gov", "wsdot.wa.gov", "gispublic.dfw.wa.gov"].forEach(function (svr) {
		esriConfig.defaults.io.corsEnabledServers.push(svr);
	});
	// Since CORS servers are explicitly specified, CORS detection is not necessary.
	// This prevents the following types of errors from appearing in the console:
	// XMLHttpRequest cannot load http://gis.rita.dot.gov/ArcGIS/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access. 
	esriConfig.defaults.io.corsDetection = false;

	webmap = JSON.parse(webmap);

	webmap = {
		item: {
			extent: [[-126.3619, 44.2285], [-114.3099, 50.0139]],
		},
		itemData: webmap
	};

	/**
	 * Gets the layer's position in its collection (either map.graphicsLayersIds or map.layerIds).
	 */
	function getLayerOrdinal(map, layerId) {
		var ord = null, i, l;

		for (i = 0, l = map.graphicsLayerIds.length; i < l; i += 1) {
			if (map.graphicsLayerIds[i] === layerId) {
				ord = i + 1;
				break;
			}
		}

		if (ord === null) {
			for (i = 0, l = map.layerIds.length; i < l; i += 1) {<commit_msg>Added jsdoc comments<commit_after>
/*global require*/
require(["esri/arcgis/utils",
	"esri/config",
	"esri/domUtils",
	"layer-list",
	"dojo/text!./webmap.json"
], function (arcgisUtils, esriConfig, domUtils, LayerList, webmap) {
	"use strict";

	// Specify CORS enabled servers.
	["www.wsdot.wa.gov", "wsdot.wa.gov", "gispublic.dfw.wa.gov"].forEach(function (svr) {
		esriConfig.defaults.io.corsEnabledServers.push(svr);
	});
	// Since CORS servers are explicitly specified, CORS detection is not necessary.
	// This prevents the following types of errors from appearing in the console:
	// XMLHttpRequest cannot load http://gis.rita.dot.gov/ArcGIS/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access. 
	esriConfig.defaults.io.corsDetection = false;

	webmap = JSON.parse(webmap);

	webmap = {
		item: {
			extent: [[-126.3619, 44.2285], [-114.3099, 50.0139]],
		},
		itemData: webmap
	};

	/**
	 * Gets the layer's position in its collection (either map.graphicsLayersIds or map.layerIds).
	 * @param {esri/Map} map
	 * @param {string} layerId
	 * @returns {number}
	 */
	function getLayerOrdinal(map, layerId) {
		var ord = null, i, l;

		for (i = 0, l = map.graphicsLayerIds.length; i < l; i += 1) {
			if (map.graphicsLayerIds[i] === layerId) {
				ord = i + 1;
				break;
			}
		}

		if (ord === null) {
			for (i = 0, l = map.layerIds.length; i < l; i += 1) {
{'fraction_non_alphanumeric': 0.1572679509632224, 'fraction_numerical': 0.021716287215411557, 'mean_word_length': 3.5990338164251208, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2831191', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1022, 'n_words': 268}