Given some text, we find all references that correlate with provided properties
and replace them with the value assigned to the property.

@param {!string} content
@param {!Object} properties
@returns {!string}
769496
function (content, properties) {
    var lines = content.split(lineEndingRE);
    lines = replaceProperties(lines, properties);
    lines = replaceSymbols(lines);
    return lines.join('\n');
  }
396364
function (content) {
            var contentType = content.contentType;

            if (contentType && contentType in this.contentProcessors) {
                return this.processContent(this.contentProcessors[contentType].processContent(content));
            }
            return content.value || "";
        }
724917
function replaceString(content, search, replace) {
        var index = 0;

        do {
          index = content.indexOf(search, index);

          if (index !== -1) {
            content = content.substring(0, index) + replace + content.substr(index + search.length);
            index += replace.length - search.length + 1;
          }
        } while (index !== -1);

        return content;
      }
613444
function(element, content) {
    var nodeName = element.nodeName.toLowerCase(),
        type = element.hasAttribute('type') ? element.getAttribute('type') : null;

    if (nodeName === 'textarea') {
      return true;
    }
    if (nodeName === 'input' 
      && ['text', 'password', 'number', 'date'].indexOf(type) !== -1) {
      return true;
    }
    return false;
  }
1096707
function(p, propertyName) {
	
	   var fieldDef = { label: propertyName, name: propertyName };
	   var schemaMap = this.schemaToParamMap;
    	var referencedSchema = p["$ref"];
		var key;
	    
	   if(referencedSchema){
	    	var new_schema = null;
	    	if(this.referenceResolver) {
		       new_schema = this.referenceResolver(referencedSchema);
		    }
	    	if(new_schema === null) {
	    		new_schema = this.defaultReferenceResolver(referencedSchema);
	    	}
	    	if(new_schema === null) {
	    		throw new Error('Schema for property : "'+propertyName+'" $references "'+referencedSchema+'", not found');
	    	}
	    	// copy options into new schema, for example we can overide presentation
	    	// of a defined schema depending on where it is used
	    	new_schema = lang.merge(new_schema);	// copy new_schema
	    	
	    	for(var pk in p) {
	    		if(p.hasOwnProperty(pk) && lang.isUndefined(new_schema[pk]) && pk != '$ref') {
	    			new_schema[pk] = p[pk];
	    		}
	    	}
	    	p = new_schema;
	   }

	   if(!p.optional) {
	      fieldDef.required = true;
	   }

	    for(key in schemaMap) {
	        if(schemaMap.hasOwnProperty(key)) {
	      	  var paramName = schemaMap[key]; 
	      	  var v = p[key];
	      	  if(!lang.isUndefined(v)) {
	      		  if(paramName === null) {
	      			  // copy / merge values from v directly into options
	      			  if(lang.isObject(v)) {
	      				  // v must be an object, copy key/value pairs into options
	      				  for(var vkey in v) {
	      					  if(v.hasOwnProperty(vkey)) {
	      						  fieldDef[vkey] = v[vkey];
	      					  }
	      				  }
	      			  }
	      		  } else {
	      			  fieldDef[paramName] = v;
	      		  }
	      	  }
	        }
	    }
	    if(!p.type) p.type = 'object';
	    var type = p.type;
	       
	       // If type is a "Union type definition", we'll use the first type for the field
	       // "array" <=>  [] <=> ["any"]
	       if(lang.isArray(type)) {
	          if(type.length === 0 || (type.length == 1 && type[0] == "any") ) {
	             type = "array";
	          }
	          else {
	             type = type[0];
	          }
	       }
	       //else if(lang.isObject(type) ) {
	          // What do we do ??
	          //console.log("type is an object !!");
	       //}
	       
	       fieldDef.type = type;
	       
	       // default value
	       if( !lang.isUndefined(p["default"]) ) {
	          fieldDef.value = p["default"];
	       }
	    
	       if(type == "array" ) {
	          fieldDef.type = "list";
	          if(lang.isObject(p.items) && !lang.isArray(p.items)) {
	        	  // when items is an object, it's a schema that describes each item in the list
	        	  fieldDef.elementType = this.schemaToInputEx(p.items, propertyName);
	          }
	
		       if(p.minItems) { fieldDef.minItems = p.minItems; }
				 if(p.maxItems) { fieldDef.maxItems = p.maxItems; }
	
	       }
	       else if(type == "object" ) {
	          fieldDef.type = "group";
	          if(p.title && lang.isUndefined(fieldDef.legend)) {
	        	  fieldDef.legend = p.title; 
	          }
	          //fieldDef = this.schemaToInputEx(p, propertyName);
	          //fieldDef = this._parseSchemaProperty(p, propertyName);
	          var fields = [];
	          if(propertyName) {
	        	  fieldDef.name = propertyName;
	          }
	
	          for(key in p.properties) {
	             if(p.properties.hasOwnProperty(key)) {
	                fields.push( this.schemaToInputEx(p.properties[key], key) );
	             }
	          }
	
	          fieldDef.fields = fields;
	          
	       }
	       else if(type == "string" && (p["enum"] || p["choices"]) ) {
	          fieldDef.type = "select";
	          
	          if(p.choices) {
	             fieldDef.choices = [];
	             for(var i = 0 ; i < p.choices.length ; i++) {
	                var o = p.choices[i];
	                fieldDef.choices[i] = { label: o.label, value: o.value };
	             }
             }
             else { // p.choices
	             fieldDef.choices = [];
	             for(var i = 0 ; i < p["enum"].length ; i++) {
	                var o = p["enum"][i];
						 if(YAHOO.lang.isObject(o)) {
	                	fieldDef.choices[i] = { label: o.label, value: o.value };
						 }
						 else {
							fieldDef.choices[i] = { value: o };
						 }
	             }
             }		
	       }
	       else if(type == "string") {
	    	  if(!lang.isUndefined(p.pattern) && lang.isUndefined(fieldDef.regexp)) {
	    		  if(lang.isString(p.pattern)) {
	    			  fieldDef.regexp = new RegExp(p.pattern);
	    		  } else {
	    			  fieldDef.regexp = p.pattern;
	    		  }
	    	  }
	    	  if(!lang.isUndefined(p.maxLength) && lang.isUndefined(fieldDef.maxLength)) {
	    		  fieldDef.maxLength = p.maxLength; 
	    	  }

	    	  if(!lang.isUndefined(p.minLength) && lang.isUndefined(fieldDef.minLength)) {
	    		  fieldDef.minLength = p.minLength; 
	    	  }

	    	  if(!lang.isUndefined(p.readonly) && lang.isUndefined(fieldDef.readonly)) {
	    		  fieldDef.readonly = p.readonly; 
	    	  }

           // According to http://groups.google.com/group/json-schema/web/json-schema-possible-formats
	          if( p.format ) {
	             if(p.format == "html") {
	                fieldDef.type = "html";
	             } else if(p.format == "date") {
	                fieldDef.type = "date";
	                fieldDef.tooltipIcon = true;
	             } else if(p.format == 'url') {
	            	 fieldDef.type = 'url';
	             } else if(p.format == 'email') {
	            	 fieldDef.type = 'email';
	             } else if(p.format == 'text') {
	            	 fieldDef.type = 'text';
	             } else if(p.format == 'time') {
	                fieldDef.type = 'time';
	             } else if(p.format == 'ip-address') {
    	             fieldDef.type = 'IPv4';
    	          } else if(p.format == 'color') {
    	             fieldDef.type = 'color';
    	          }
	          }
	       }
	
			 // Override inputEx's type with the "_type" attribute
			 if( !!p["_inputex"] && !!p["_inputex"]["_type"]) {
				fieldDef.type = p["_inputex"]["_type"];
			 }
	
	    // Add the defaultOptions
	    for(var kk in this.defaultOptions) {
	        if(this.defaultOptions.hasOwnProperty(kk) && lang.isUndefined(fieldDef[kk])) {
	        	fieldDef[kk] = this.defaultOptions[kk]; 
	        }	    	
	    }
	    return fieldDef;
	}
983411
function ( content ) {
		// fast-fail in case of illegal data
		if ( content === null || content === undefined ) {

			throw 'Provided content is not a valid ArrayBuffer or String. Unable to continue parsing';

		}
		if ( this.logging.enabled ) console.time( 'OBJLoader2 parse: ' + this.modelName );
		this.meshBuilder.init();

		var parser = new THREE.OBJLoader2.Parser();
		parser.setLogging( this.logging.enabled, this.logging.debug );
		parser.setMaterialPerSmoothingGroup( this.materialPerSmoothingGroup );
		parser.setUseOAsMesh( this.useOAsMesh );
		parser.setUseIndices( this.useIndices );
		parser.setDisregardNormals( this.disregardNormals );
		// sync code works directly on the material references
		parser.setMaterials( this.meshBuilder.getMaterials() );

		var scope = this;
		var onMeshLoaded = function ( payload ) {
			var meshes = scope.meshBuilder.processPayload( payload );
			var mesh;
			for ( var i in meshes ) {
				mesh = meshes[ i ];
				scope.loaderRootNode.add( mesh );
			}
		};
		parser.setCallbackOnAssetAvailable( onMeshLoaded );
		var onProgressScoped = function ( text, numericalValue ) {
			scope.onProgress( 'progressParse', text, numericalValue );
		};
		parser.setCallbackOnProgress( onProgressScoped );
		var onErrorScoped = function ( message ) {
			scope._onError( message );
		};
		parser.setCallbackOnError( onErrorScoped );

		if ( content instanceof ArrayBuffer || content instanceof Uint8Array ) {

			if ( this.logging.enabled ) console.info( 'Parsing arrayBuffer...' );
			parser.parse( content );

		} else if ( typeof( content ) === 'string' || content instanceof String ) {

			if ( this.logging.enabled ) console.info( 'Parsing text...' );
			parser.parseText( content );

		} else {

			this._onError( 'Provided content was neither of type String nor Uint8Array! Aborting...' );

		}
		if ( this.logging.enabled ) console.timeEnd( 'OBJLoader2 parse: ' + this.modelName );

		return this.loaderRootNode;
	}
809182
function unitProperty (property, value) {
  if (value !== +value) {
    return value
  }

  if (unitCache[property]) {
    return value + unitCache[property]
  }

  supportElement.style[property] = 0

  let propValue = supportElement.style[property]
  let match = propValue.match && propValue.match(UNIT_REG)

  if (match) {
    return value + (unitCache[property] = match[1])
  }

  return value
}
1162965
function Property(path, node, scope, getObjectRef, file) {
  if (!node.method && node.kind === "init") return;
  if (!t.isFunction(node.value)) return;

  var replaceSupers = new _helpersReplaceSupers2["default"]({
    getObjectRef: getObjectRef,
    methodNode: node,
    methodPath: path,
    isStatic: true,
    scope: scope,
    file: file
  });

  replaceSupers.replace();
}
663009
function(propNode) {
        var content = null;
        if (propNode.childNodes && propNode.childNodes.length > 0) {
            var subNodes = [];
            // filter out text nodes
            for (var j = 0; j < propNode.childNodes.length; j++) {
                var node = propNode.childNodes[j];
                if (node.nodeType === 1) {
                    subNodes.push(node);
                }
            }
            if (subNodes.length) {
                content = subNodes;
            }
        }

        return content || propNode.textContent || propNode.text || '';
    }
209733
private function resolveContent($content, array $matches)
    {
        if (3 < count($matches) && $content instanceof ContentSet) {
            return $this->resolveContentSet($content, $matches);
        }

        if (1 < count($matches) && is_object($content)) {
            $property = $matches[1];
            try {
                return $content->$property;
            } catch (\Exception $e) {
                return new Text();
            }
        }

        return $content;
    }
1231704
function includeProperty (key, value, replacer) {
  return typeof value !== 'undefined'
      && typeof value !== 'function'
      && (!Array.isArray(replacer) || contains(replacer, key));
}
560381
function(properties) {
        var body = '  <d:set>\n' +
            '   <d:prop>\n';

        for(var ii in properties) {
            if (!properties.hasOwnProperty(ii)) {
                continue;
            }

            var property = this.parseClarkNotation(ii);
            var propName;
            var propValue = properties[ii];
            if (this.xmlNamespaces[property.namespace]) {
                propName = this.xmlNamespaces[property.namespace] + ':' + property.name;
            } else {
                propName = 'x:' + property.name + ' xmlns:x="' + property.namespace + '"';
            }

            // FIXME: hard-coded for now until we allow properties to
            // specify whether to be escaped or not
            if (propName !== 'd:resourcetype') {
                propValue = dav._escapeXml(propValue);
            }
            body += '      <' + propName + '>' + propValue + '</' + propName + '>\n';
        }
        body +='    </d:prop>\n';
        body +='  </d:set>\n';
        return body;
    }
655721
private function parseProperty(AbstractContent $content, $property)
    {
        $currentContent = $content;
        foreach (explode('->', $property) as $part) {
            if ('@' === substr($part, 0, 1)) {
                return $this->iconizeByParam($currentContent, substr($part, 1));
            } elseif ($currentContent->hasElement($part)) {
                $currentContent = $this->iconizedByElement($currentContent, $part);
            }
            
            if ($currentContent instanceof AbstractContent) {
                continue;
            } else {
                return $currentContent;
            }

            return null;
        }
    }
548276
private boolean addPropertyElement(Element element, String elementName, String textContent) {
        Document doc = element.getOwnerDocument();
        Element newElement = doc.createElement(elementName);
        newElement.setTextContent(textContent);
        Text textNode = doc.createTextNode("\n    ");

        NodeList childNodes = element.getChildNodes();
        for (int i = 0, size = childNodes.getLength(); i < size; i++) {
            Node item = childNodes.item(i);
            if (item instanceof Element) {
                Element childElement = (Element) item;
                int value = childElement.getTagName().compareTo(elementName);
                if (value == 0) {
                    return false;
                }
                if (value > 0) {
                    element.insertBefore(textNode, childElement);
                    element.insertBefore(newElement, textNode);
                    return true;
                }
            }
        }
        // lets insert at the end
        element.appendChild(textNode);
        element.appendChild(newElement);
        return true;
    }
877991
protected function propertyNotation($content)
    {
        // PHP only supports $this inside anonymous functions since 5.4
        $minifier = $this;
        $keywords = $this->keywordsReserved;
        $callback = function ($match) use ($minifier, $keywords) {
            $property = trim($minifier->extracted[$match[1]], '\'"');

            /*
             * Check if the property is a reserved keyword. In this context (as
             * property of an object literal/array) it shouldn't matter, but IE8
             * freaks out with "Expected identifier".
             */
            if (in_array($property, $keywords)) {
                return $match[0];
            }

            /*
             * See if the property is in a variable-like format (e.g.
             * array['key-here'] can't be replaced by array.key-here since '-'
             * is not a valid character there.
             */
            if (!preg_match('/^'.$minifier::REGEX_VARIABLE.'$/u', $property)) {
                return $match[0];
            }

            return '.'.$property;
        };

        /*
         * Figure out if previous character is a variable name (of the array
         * we want to use property notation on) - this is to make sure
         * standalone ['value'] arrays aren't confused for keys-of-an-array.
         * We can (and only have to) check the last character, because PHP's
         * regex implementation doesn't allow unfixed-length look-behind
         * assertions.
         */
        preg_match('/(\[[^\]]+\])[^\]]*$/', static::REGEX_VARIABLE, $previousChar);
        $previousChar = $previousChar[1];

        /*
         * Make sure word preceding the ['value'] is not a keyword, e.g.
         * return['x']. Because -again- PHP's regex implementation doesn't allow
         * unfixed-length look-behind assertions, I'm just going to do a lot of
         * separate look-behind assertions, one for each keyword.
         */
        $keywords = $this->getKeywordsForRegex($keywords);
        $keywords = '(?<!'.implode(')(?<!', $keywords).')';

        return preg_replace_callback('/(?<='.$previousChar.'|\])'.$keywords.'\[\s*(([\'"])[0-9]+\\2)\s*\]/u', $callback, $content);
    }
1365591
function(content) {
			if (!reHasComment.test(content)) {
				return content;
			}

			var stream = stringStream(content);
			var replaceRanges = [];
			var ch, ch2;

			while ((ch = stream.next())) {
				if (ch === '/') {
					ch2 = stream.peek();
					if (ch2 === '*') { // multiline CSS comment
						stream.start = stream.pos - 1;

						if (stream.skipTo('*/')) {
							stream.pos += 2;
						} else {
							// unclosed comment
							stream.skipToEnd();
						}

						replaceRanges.push([stream.start, stream.pos]);
					} else if (ch2 === '/') {
						// preprocessor’s single line comments
						stream.start = stream.pos - 1;
						while ((ch2 = stream.next())) {
							if (ch2 === '\n' || ch2 == '\r') {
								break
							}
						}

						replaceRanges.push([stream.start, stream.pos]);
					}
				} else {
					stream.skipQuoted();
				}
			}

			return utils.replaceWith(content, replaceRanges, ' ');
		}
233985
function parseProperties(text, parsedPropertiesCallback) {
      var dictionary = {};

      // token expressions
      var reBlank = /^\s*|\s*$/;
      var reComment = /^\s*#|^\s*$/;
      var reSection = /^\s*\[(.*)\]\s*$/;
      var reImport = /^\s*@import\s+url\((.*)\)\s*$/i;
      var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; // TODO: escape EOLs with '\'

      // parse the *.properties file into an associative array
      function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {
        var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
        var currentLang = '*';
        var genericLang = lang.split('-', 1)[0];
        var skipLang = false;
        var match = '';

        function nextEntry() {
          // Use infinite loop instead of recursion to avoid reaching the
          // maximum recursion limit for content with many lines.
          while (true) {
            if (!entries.length) {
              parsedRawLinesCallback();
              return;
            }
            var line = entries.shift();

            // comment or blank line?
            if (reComment.test(line))
              continue;

            // the extended syntax supports [lang] sections and @import rules
            if (extendedSyntax) {
              match = reSection.exec(line);
              if (match) { // section start?
                // RFC 4646, section 4.4, "All comparisons MUST be performed
                // in a case-insensitive manner."

                currentLang = match[1].toLowerCase();
                skipLang = (currentLang !== '*') &&
                    (currentLang !== lang) && (currentLang !== genericLang);
                continue;
              } else if (skipLang) {
                continue;
              }
              match = reImport.exec(line);
              if (match) { // @import rule?
                loadImport(baseURL + match[1], nextEntry);
                return;
              }
            }

            // key-value pair
            var tmp = line.match(reSplit);
            if (tmp && tmp.length == 3) {
              dictionary[tmp[1]] = evalString(tmp[2]);
            }
          }
        }
        nextEntry();
      }

      // import another *.properties file
      function loadImport(url, callback) {
        xhrLoadText(url, function(content) {
          parseRawLines(content, false, callback); // don't allow recursive imports
        }, null);
      }

      // fill the dictionary
      parseRawLines(text, true, function() {
        parsedPropertiesCallback(dictionary);
      });
    }