<commit_before>define(['require', 'app', 'text!./form-loader.html', 'authentication', 'utilities/km-storage', 'utilities/km-utilities', 'scbd-angularjs-services/locale'], function(require, app, template){

app.directive('viewFormLoader', ["$rootScope", 'IStorage', "authentication", "locale", "$q", "$location", "$compile", "$route", "navigation", function ($rootScope,    storage,   authentication,   locale,   $q,   $location,   $compile, $route, navigation) {
	return {
		restrict: 'E',
		template: template,
		replace: true,
		transclude: false,
		scope: {
			linkTarget: "@",
			hideButtons: "@",
			document: "=",
			locale  : "=",
			documentId  : "@"
		},
		link: function($scope, $element) {

			var formHolder = $element.find("#form-placeholder:first");

			$scope.internalDocument     = undefined;
			$scope.internalDocumentInfo = undefined;

			$scope.$watch("document", function(_new) { $scope.error=null; $scope.internalDocument = _new; });
			$scope.$watch("internalDocument", function(doc) {

				formHolder.empty();

				if(doc)
				{
					var name = snake_case(doc.header.schema);

					require(['./'+name], function(){

						var directiveHtml = '<DIRECTIVE ng-model="internalDocument" locale="getLocale()" link-target={{linkTarget}}></DIRECTIVE>'.replace(/DIRECTIVE/g, 'view-' + name);

						$scope.$apply(function(){
							formHolder.append($compile(directiveHtml)($scope));
						});
					});
				}
			});

			if($rootScope.showAcknowledgement)
			    $scope.showAcknowledgement = true;

			$rootScope.showAcknowledgement = undefined;

			//==================================
			//<commit_msg>hide header from BBI & UNDB views<commit_after>define(['require', 'app', 'text!./form-loader.html', 'authentication', 'utilities/km-storage', 'utilities/km-utilities', 'scbd-angularjs-services/locale'], function(require, app, template){

app.directive('viewFormLoader', ["$rootScope", 'IStorage', "authentication", "locale", "$q", "$location", "$compile", "$route", "navigation", function ($rootScope,    storage,   authentication,   locale,   $q,   $location,   $compile, $route, navigation) {
	return {
		restrict: 'E',
		template: template,
		replace: true,
		transclude: false,
		scope: {
			linkTarget: "@",
			hideButtons: "@",
			document: "=",
			locale  : "=",
			documentId  : "@"
		},
		link: function($scope, $element) {

			var formHolder = $element.find("#form-placeholder:first");

			$scope.internalDocument     = undefined;
			$scope.internalDocumentInfo = undefined;

			$scope.$watch("document", function(_new) { $scope.error=null; $scope.internalDocument = _new; });
			$scope.$watch("internalDocument", function(doc) {

				formHolder.empty();

				if(doc)
				{
					var name = snake_case(doc.header.schema);

					require(['./'+name], function(){

						var directiveHtml = '<DIRECTIVE ng-model="internalDocument" locale="getLocale()" header="false" link-target={{linkTarget}}></DIRECTIVE>'.replace(/DIRECTIVE/g, 'view-' + name);

						$scope.$apply(function(){
							formHolder.append($compile(directiveHtml)($scope));
						});
					});
				}
			});

			if($rootScope.showAcknowledgement)
			    $scope.showAcknowledgement = true;

			$rootScope.showAcknowledgement = undefined;

			//==================================
			//
{'fraction_non_alphanumeric': 0.20312022025084123, 'fraction_numerical': 0.0, 'mean_word_length': 4.223642172523961, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4658577', 'n_tokens_mistral': 1187, 'n_tokens_neox': 976, 'n_words': 174}