<commit_before><!DOCTYPE>
<html>
<head>
<title>Search Admin</title>

<?php 
require_once(dirname(__FILE__) . '/../../../app/globals.php');
include(dirname(__FILE__) . '/../../../static/meta.php');   
?>

<style type="text/css">
body{
	font-size:16px;	
}

#mainContent{
  padding: 20px;      
}

#seach-bar-icon {
    cursor: pointer;
    display: block;
    height: auto;
    left: auto;
    padding: 5px 10px;
    position: relative;
    top: auto;
    width: 100%;
    z-index: 10;
}

#gototop{
    bottom: 10px;
    position: fixed;
    right: 10px;
    z-index: 9999;   
}

#clear{
    bottom: 10px;
    position: fixed;
    left: 10px;
    z-index: 9999;      
}
</style>

</head>
<body>
<div id="mainContent">
    <a href="#" name="top" id="top"></a>
    <br>
    <div class="row">
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="search-bar"></input>
        </div>
        <div class="col-xs-12 col-sm-4">
            <div class="btn btn-success" id="seach-bar-icon">Search</div>
        </div>
    </div>
    <hr>
    
    <div id="main-workspace" style="display:none;"></div>    
    <div id="sample-grid-container"><div id="product-grid"></div></div>
    <a href="#top" id="clear">Clear Results</a>
    <a href="#top" id="gototop">Go To Top</a>    
</div>


<?php echo CLOSITT_JS; ?>
<script type="text/javascript">
$(document).ready(function() {
    searchController.isSearchActive = true;
    firebase.init();
    pagePresenter.init();
	productPagePresenter.init();
	gridPresenter.init();
	productPresenter.init();	
	filterPresenter.init();	
	tagPresenter.init();
	searchController.init();	
	reviewsPresenter.init();		
	colorPresenter.init();	
});		

$("#clear").click(function(el){
    searchController.clearSearch(el);
    searchController.isSearchActive = true;    
});

productPresenter.getProductTemplate = function(product){
    if (product == null || typeof(product) != "object"){      	
       return $("");
    }    
    
	var company = product.o;
	var audience = product.u;
	var category = product.a;
	var link = product.l;
	var image = product.i;
	var name = product.n;		
	var reviewCount = product.rc == null ? 0 : product.rc;
	var closetCount = product.cc == null ? 0 : product.cc;
	var closetCountPlural = closetCount == 1 ? "" : "s"; 
	var id = product.s;
	var shortlink = product.sl;
	var price = product.p == null || isNaN(product.p) ? "" : "$" + Math.round(product.p);		 	
	var filterPrice = product.fp; 		 		
	var feedOwner = product.owner;
	var feedCloset = product.closet;
    var score = product.sc;
    var explainUrl = window.HOME_ROOT + '/scripts/admin/php/explain.php?sku=' + id + '&query=' + encodeURIComponent($( "#search-bar" ).val()).replace("#","").trim();
    var colors = product.co;

	var rand = Math.floor(Math.random() * 3) + 1;
	var shadow = "";
	if(rand == 1){
		shadow = 'shadow';	
	}		
		 			
	//var attr = 	'company="'+company+'" customer="'+audience+'" category="'+category+'" price="'+filterPrice+'"';
	var attr = 	''; //'company="'+company+'" customer="'+audience+'" category="'+category+'"';
	   var html ='<div class="outfit item '+shadow+'" '+attr+' pid="'+id+'" data-url="'+shortlink+'">';
			html +='<a target="_blank" href=' + explainUrl +  '>' +<commit_msg>Update to use HOME_URL instead of HOME_ROOT for explanation link<commit_after><!DOCTYPE>
<html>
<head>
<title>Search Admin</title>

<?php 
require_once(dirname(__FILE__) . '/../../../app/globals.php');
include(dirname(__FILE__) . '/../../../static/meta.php');   
?>

<style type="text/css">
body{
	font-size:16px;	
}

#mainContent{
  padding: 20px;      
}

#seach-bar-icon {
    cursor: pointer;
    display: block;
    height: auto;
    left: auto;
    padding: 5px 10px;
    position: relative;
    top: auto;
    width: 100%;
    z-index: 10;
}

#gototop{
    bottom: 10px;
    position: fixed;
    right: 10px;
    z-index: 9999;   
}

#clear{
    bottom: 10px;
    position: fixed;
    left: 10px;
    z-index: 9999;      
}
</style>

</head>
<body>
<div id="mainContent">
    <a href="#" name="top" id="top"></a>
    <br>
    <div class="row">
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="search-bar"></input>
        </div>
        <div class="col-xs-12 col-sm-4">
            <div class="btn btn-success" id="seach-bar-icon">Search</div>
        </div>
    </div>
    <hr>
    
    <div id="main-workspace" style="display:none;"></div>    
    <div id="sample-grid-container"><div id="product-grid"></div></div>
    <a href="#top" id="clear">Clear Results</a>
    <a href="#top" id="gototop">Go To Top</a>    
</div>


<?php echo CLOSITT_JS; ?>
<script type="text/javascript">
$(document).ready(function() {
    searchController.isSearchActive = true;
    firebase.init();
    pagePresenter.init();
	productPagePresenter.init();
	gridPresenter.init();
	productPresenter.init();	
	filterPresenter.init();	
	tagPresenter.init();
	searchController.init();	
	reviewsPresenter.init();		
	colorPresenter.init();	
});		

$("#clear").click(function(el){
    searchController.clearSearch(el);
    searchController.isSearchActive = true;    
});

productPresenter.getProductTemplate = function(product){
    if (product == null || typeof(product) != "object"){      	
       return $("");
    }    
    
	var company = product.o;
	var audience = product.u;
	var category = product.a;
	var link = product.l;
	var image = product.i;
	var name = product.n;		
	var reviewCount = product.rc == null ? 0 : product.rc;
	var closetCount = product.cc == null ? 0 : product.cc;
	var closetCountPlural = closetCount == 1 ? "" : "s"; 
	var id = product.s;
	var shortlink = product.sl;
	var price = product.p == null || isNaN(product.p) ? "" : "$" + Math.round(product.p);		 	
	var filterPrice = product.fp; 		 		
	var feedOwner = product.owner;
	var feedCloset = product.closet;
    var score = product.sc;
    var explainUrl = window.HOME_URL + 'scripts/admin/php/explain.php?sku=' + id + '&query=' + encodeURIComponent($( "#search-bar" ).val()).replace("#","").trim();
    var colors = product.co;

	var rand = Math.floor(Math.random() * 3) + 1;
	var shadow = "";
	if(rand == 1){
		shadow = 'shadow';	
	}		
		 			
	//var attr = 	'company="'+company+'" customer="'+audience+'" category="'+category+'" price="'+filterPrice+'"';
	var attr = 	''; //'company="'+company+'" customer="'+audience+'" category="'+category+'"';
	   var html ='<div class="outfit item '+shadow+'" '+attr+' pid="'+id+'" data-url="'+shortlink+'">';
			html +='<a target="_blank" href=' + explainUrl +  '>' +
{'fraction_non_alphanumeric': 0.19872476089266738, 'fraction_numerical': 0.012145134355548808, 'mean_word_length': 3.204211869814933, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3600047', 'n_tokens_mistral': 2436, 'n_tokens_neox': 2321, 'n_words': 485}