Removed third parties to use CloudFlare CDN.

Added scheduling (missing database update)
Using Jinja2 templates.
Updated layout.
This commit is contained in:
Alexis Lahouze 2013-07-28 23:25:51 +02:00
parent 7148754648
commit c4d7bb3f28
37 changed files with 847 additions and 44734 deletions

Binary file not shown.

View File

@ -18,11 +18,13 @@ from app import app
from app import db
from api.model.entries import Entry
from api.model.operations import Operation
from api.model.scheduled_operations import ScheduledOperation
from sqlalchemy import func, desc
from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method
from sqlalchemy.orm import sessionmaker, column_property
from sqlalchemy.sql import func, select
from sqlalchemy.orm import sessionmaker, column_property, aliased
from sqlalchemy.sql import func, select, case
#from sqlalchemy import *
@ -35,17 +37,18 @@ def get_entries(account_id, year, month):
"""
session = db.session
query = session.query(
Entry
).select_from(
session.query(Entry)
.filter(Entry.account_id == account_id)
.order_by(
desc(Entry.operation_date),
Entry.value,
Entry.label,
).subquery()
).filter(func.date_trunc('month', Entry.operation_date) == "%s-%s-01" % (year, month))
base_query = session.query(
Operation,
case(whens={Operation.canceled: None}, else_=func.sum(Operation.value).over(partition_by="canceled", order_by="operation_date, value desc, label desc")).label("sold")
).filter(Operation.account_id == account_id).order_by(
desc(Operation.operation_date),
Operation.value,
Operation.label,
).subquery()
query = session.query(base_query).select_from(base_query).filter(func.date_trunc('month', base_query.c.operation_date) == "%s-%s-01" % (year, month))
print query
return json.dumps([{
"id": i.id,
@ -54,8 +57,10 @@ def get_entries(account_id, year, month):
"label": i.label,
"value": str(i.value),
"category": i.category,
"sold": str(i.sold),
"account_id": i.account_id
"sold": str(i.sold) if not i.canceled else None,
"account_id": i.account_id,
"canceled": i.canceled,
"scheduled_operation_id": i.scheduled_operation_id
} for i in query.all()])
@app.route("/api/entries", methods=["PUT"])
@ -69,7 +74,8 @@ def add_entry():
label = request.json['label'],
value = request.json['value'],
category = request.json['category'],
account_id = request.json['account_id']
account_id = request.json['account_id'],
scheduled_operation_id = request.json['scheduled_operation_id']
)
session.add(entry)
@ -94,6 +100,7 @@ def update_entry(entry_id):
entry.value = request.json['value']
entry.category = request.json['category']
entry.account_id = request.json['account_id']
entry.scheduled_operation_id = request.json['scheduled_operation_id']
session.merge(entry)
session.commit()

View File

@ -0,0 +1,107 @@
from app import app
from app import db
from api.model.scheduled_operations import ScheduledOperation
from sqlalchemy import func, desc
from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method
from sqlalchemy.orm import sessionmaker, column_property
from sqlalchemy.sql import func, select
from flask import json, request
@app.route("/api/scheduled_operations/<account_id>")
def get_scheduled_operations(account_id):
"""
Return entries for an account, year, and month.
"""
session = db.session
query = session.query(
ScheduledOperation
).select_from(
session.query(ScheduledOperation)
.filter(ScheduledOperation.account_id == account_id)
.order_by(
desc(ScheduledOperation.day),
ScheduledOperation.value,
ScheduledOperation.label,
).subquery()
)
return json.dumps([{
"id": i.id,
"start_date": i.start_date.strftime("%Y-%m-%d"),
"stop_date": i.stop_date.strftime("%Y-%m-%d"),
"day": str(i.day),
"frequency": str(i.frequency),
"label": i.label,
"value": str(i.value),
"category": i.category,
"account_id": i.account_id
} for i in query.all()])
@app.route("/api/scheduled_operations", methods=["PUT"])
def add_scheduled_operation():
session = db.session
try:
scheduledOperation = ScheduledOperation(
start_date = request.json['start_date'],
stop_date = request.json['stop_date'],
day = request.json['day'],
frequency = request.json['frequency'],
label = request.json['label'],
value = request.json['value'],
category = request.json['category'],
account_id = request.json['account_id']
)
session.add(scheduledOperation)
session.commit()
return json.dumps("Scheduled operation added.")
except:
session.rollback()
raise
@app.route("/api/scheduled_operations/<scheduled_operation_id>", methods=["PUT"])
def update_scheduled_operation(scheduled_operation_id):
session = db.session
try:
scheduledOperation = session.query(ScheduledOperation).filter(ScheduledOperation.id == scheduled_operation_id).first()
scheduledOperation.id = scheduled_operation_id
scheduledOperation.start_date = request.json['start_date'],
scheduledOperation.stop_date = request.json['stop_date'],
scheduledOperation.day = request.json['day'],
scheduledOperation.frequency = request.json['frequency'],
scheduledOperation.label = request.json['label']
scheduledOperation.value = request.json['value']
scheduledOperation.category = request.json['category']
scheduledOperation.account_id = request.json['account_id']
session.merge(scheduledOperation)
session.commit()
return json.dumps("Scheduled operation #%s updated." % scheduled_operation_id)
except:
session.rollback()
raise
@app.route("/api/scheduled_operations/<scheduled_operation_id>", methods=["DELETE"])
def delete_scheduled_operation(scheduled_operation_id):
session = db.session
try:
scheduledOperation = session.query(ScheduledOperation).filter(ScheduledOperation.id == scheduled_operation_id).first()
session.delete(scheduledOperation)
session.commit()
return json.dumps("Scheduled operation #%s deleted." % scheduled_operation_id)
except:
session.rollback()
raise

View File

@ -18,6 +18,7 @@ from app import app
from app import db
from api.model.accounts import Account
from api.model.scheduled_operations import ScheduledOperation
from sqlalchemy import func, desc
from sqlalchemy.orm import column_property
@ -30,17 +31,19 @@ class Entry(db.Model):
label = db.Column(db.String(500), nullable = False)
value = db.Column(db.Numeric(15, 2), nullable = False)
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id'))
account = db.relationship(Account, backref = db.backref('entry', lazy="Dynamic"))
scheduled_operation = db.relationship(ScheduledOperation, backref = db.backref('entry', lazy="Dynamic"))
category = db.Column(db.String(100), nullable = True)
sold = column_property(func.sum(value).over(order_by="operation_date, value desc, label desc"))
def __init__(self, pointed, label, value, account_id, operation_date = None, category = None):
def __init__(self, pointed, label, value, account_id, operation_date = None, category = None, scheduled_operation_id = None):
self.pointed = pointed
self.operation_date = operation_date
self.label = label
self.value = value
self.account_id = account_id
self.category = category
self.scheduled_operation_id = scheduled_operation_id

View File

@ -0,0 +1,49 @@
"""
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
"""
from app import app
from app import db
from api.model.accounts import Account
from api.model.scheduled_operations import ScheduledOperation
from sqlalchemy import func, desc
from sqlalchemy.orm import column_property
from sqlalchemy.sql import func, select
class Operation(db.Model):
id = db.Column(db.Integer, primary_key=True)
pointed = db.Column(db.Boolean, nullable = False, default = False)
operation_date = db.Column(db.Date, nullable = False)
label = db.Column(db.String(500), nullable = False)
value = db.Column(db.Numeric(15, 2), nullable = False)
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id'))
account = db.relationship(Account, backref = db.backref('operation', lazy="Dynamic"))
category = db.Column(db.String(100), nullable = True)
canceled = db.Column(db.Boolean, nullable = False)
def __init__(self, pointed, label, value, account_id, operation_date = None, category = None):
self.pointed = pointed
self.operation_date = operation_date
self.label = label
self.value = value
self.account_id = account_id
self.category = category

View File

@ -0,0 +1,33 @@
from app import app
from app import db
from api.model.accounts import Account
from sqlalchemy import func, desc
from sqlalchemy.orm import column_property
from sqlalchemy.sql import func, select
class ScheduledOperation(db.Model):
id = db.Column(db.Integer, primary_key=True)
start_date = db.Column(db.Date, nullable = False)
stop_date = db.Column(db.Date, nullable = False)
day = db.Column(db.Integer, nullable = False)
frequency = db.Column(db.Integer, nullable = False)
label = db.Column(db.String(500), nullable = False)
value = db.Column(db.Numeric(15, 2), nullable = False)
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
account = db.relationship(Account, backref = db.backref('scheduled_operation', lazy="Dynamic"))
category = db.Column(db.String(100), nullable = True)
def __init__(self, start_date, stop_date, day, frequency, label, value, account_id, category = None):
self.start_date = start_date
self.stop_date = stop_date
self.day = day
self.frequency = frequency
self.label = label
self.value = value
self.account_id = account_id
self.category = category

View File

@ -18,12 +18,21 @@ from app import app
from api.controller.entries import *
from api.controller.accounts import *
from api.controller.scheduled_operations import *
from flask import url_for, redirect
from flask import redirect, render_template
@app.route('/')
def root():
return redirect('index.html')
@app.route('/index.html')
def index():
return redirect(url_for('.static', filename='index.html'))
return render_template('index.html')
@app.route('/scheduler.html')
def scheduler():
return render_template('scheduler.html')
if __name__ == '__main__':
app.run(debug=True)

View File

@ -0,0 +1,16 @@
create table scheduled_operation(
id serial primary key,
start_date date not null,
stop_date date not null,
day integer not null check (day > 0 and day <= 31),
frequency integer not null check (frequency > 0),
label varchar(500) not null,
value numeric(15,2) not null,
account_id integer not null references account(id),
category varchar(100)
);
create index scheduled_operation_account_id_idx on scheduled_operation(account_id);
alter table entry add column scheduled_operation_id integer references scheduled_operation(id);

View File

@ -0,0 +1,2 @@
alter table entry alter column operation_date set not null;
alter table entry drop column comment;

7
src/static/css/main.css Normal file
View File

@ -0,0 +1,7 @@
.italic {
font-style: italic
}
.stroke {
text-decoration: line-through
}

View File

@ -25,7 +25,7 @@ function account() {
};
// The AccountController.
var AccountController = function($scope, $http, $rootScope) {
var AccountController = function($scope, $http, $rootScope, $window) {
// Account store and selection
$scope.account = null;
$scope.accounts = [];
@ -164,6 +164,8 @@ var AccountController = function($scope, $http, $rootScope) {
$rootScope.$on("entrySavedEvent", $scope.loadAccounts);
$rootScope.$on("entryRemovedEvent", $scope.loadAccounts);
$rootScope.$on("operationSavedEvent", $scope.loadAccounts);
$rootScope.$on("operationRemovedEvent", $scope.loadAccounts);
$scope.loadAccounts();
};

View File

@ -107,7 +107,9 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
pointedsold: null,
category: null,
account_id: null,
state: 'edit'
state: 'new',
canceled: false,
scheduled_operation_id: null
}];
if(data) {
@ -127,12 +129,24 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
};
// Returns the CSS class for an entry row.
$scope.entryRowClass = function(sold) {
if(sold < $scope.account.authorized_overdraft) {
return 'error';
} else if (sold < 0) {
return 'warning';
$scope.entryRowClass = function(entry) {
if($scope.isSaved(entry)) {
cssclass="";
} else {
cssclass="italic";
}
if(entry.canceled) {
cssclass += " stroke";
}
if(entry.sold < $scope.account.authorized_overdraft) {
cssclass += " error";
} else if (entry.sold < 0) {
cssclass += " warning";
}
return cssclass;
};
// Returns the CSS class for an entry sold.
@ -161,21 +175,26 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
// Returns true if the entry is a new one.
$scope.isNew = function(entry) {
return !entry.id;
return !$scope.isSaved(entry) && (entry.state === 'edit' || entry.state === 'new');
};
// Returns true if the entry is in editing state.
$scope.isEditing = function(entry) {
return entry.state === 'edit';
return entry.state === 'edit' || entry.state === 'new';
};
// Returns true if the entry is in displaying state.
$scope.isDisplaying = function(entry) {
return entry.id && (!entry.state || entry.state === 'display');
return !entry.state || entry.state === 'display';
};
// Returns true if the entry is a scheduled one.
$scope.isSaved = function(entry) {
return entry.id != null;
}
$scope.iconSaveClass = function(entry) {
if($scope.isNew(entry)) {
if(!$scope.isSaved(entry)) {
return "icon-plus";
} else if ($scope.isEditing(entry)) {
return "icon-ok";
@ -192,7 +211,7 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
// Cancel current editing entry or clears field if a new one.
$scope.cancelEditEntry = function(entry) {
if ($scope.isNew(entry)) {
if ($scope.savedItem == null) {
// We are cancelling the new entry, just reset it.
entry.id = null; // id should not change, but just in case...
entry.pointed = false;
@ -201,17 +220,22 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
entry.value = null;
entry.account_id = $scope.account.id; // account_id should not change, but just in case...
entry.category = null;
} else if($scope.isEditing(entry)) {
if($scope.savedItem) {
// Reset selected item fields to saved item ones.
entry.id = $scope.savedItem.id; // id should not change, but just in case...
entry.pointed = $scope.savedItem.pointed;
entry.operation_date = $scope.savedItem.operation_date;
entry.label = $scope.savedItem.label;
entry.value = $scope.savedItem.value;
entry.account_id = $scope.savedItem.account_id; // account_id should not change, but just in case...
entry.category = $scope.savedItem.category;
}
entry.canceled = false;
entry.scheduled_operation_id = null;
// Reset state to new.
entry.state = 'new';
} else {
// Reset selected item fields to saved item ones.
entry.id = $scope.savedItem.id; // id should not change, but just in case...
entry.pointed = $scope.savedItem.pointed;
entry.operation_date = $scope.savedItem.operation_date;
entry.label = $scope.savedItem.label;
entry.value = $scope.savedItem.value;
entry.account_id = $scope.savedItem.account_id; // account_id should not change, but just in case...
entry.category = $scope.savedItem.category;
entry.canceled = $scope.savedItem.canceled;
entry.scheduled_operation_id = $scope.savedItem.scheduled_operation_id;
// Reset saved and selected items to null.
$scope.savedItem = null;
@ -247,7 +271,7 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
var type;
var url = "/api/entries";
if(!$scope.isNew(entry)) {
if($scope.isSaved(entry)) {
url += "/" + entry.id;
}
@ -314,7 +338,7 @@ var EntryController = function($scope, $http, $rootScope, $filter) {
var chart = nv.models.lineChart()
.x(function(d) { return d3.time.format("%Y-%m-%d").parse(d[0]); })
.y(function(d) { return new Number(d[1]); });
chart.lines.interpolate("monotone");
chart.xAxis.axisLabel("Date").tickFormat(function(d) {

View File

@ -55,6 +55,26 @@ var MonthController = function($scope, $http, $rootScope) {
var today = new Date();
var currentYear = today.getFullYear().toString();
var currentMonth = (today.getMonth() + 1 < 10 ? "0" : "") + (today.getMonth() + 1);
var found = false;
var lastIndex = 0;
// Add current month if not present.
angular.forEach($scope.months, function(month) {
if(!found) {
if (month.year == currentYear && month.month == currentMonth) {
found = true;
}
if (parseInt(month.year) < parseInt(currentYear) || (month.year == currentYear && parseInt(month.month) < parseInt(currentMonth))) {
lastIndex++;
}
}
});
if(!found) {
$scope.months.splice(lastIndex, 0, {year: currentYear, month: currentMonth});
}
// Find the new instance of the previously selected month.
angular.forEach($scope.months, function(month) {

190
src/static/js/scheduler.js Normal file
View File

@ -0,0 +1,190 @@
/*
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/
// Util function to show a message in message placeholder.
function message(alertType, title, message) {
$(".alert").alert('close');
$("#message-placeholder").append('<div class="alert alert-' + alertType + '"><button type="button" class="close" data-dismiss="alert">&times;</button><h4>' + title + '</h4>' + message + '</div>');
}
var SchedulerController = function($scope, $http, $rootScope, $filter) {
// Operations store and selection
$scope.operations = [];
$scope.selectedOperation = null;
$scope.account = null;
// Placeholder for saved value to cancel entry edition
$scope.savedOperation = null;
$scope.loadOperations = function(account) {
// Clean up selected entry.
$scope.selectedOperation = null;
$scope.savedOperation = null;
if(account) {
$scope.account = account;
$http.get("/api/scheduled_operations/" + account.id).success($scope.loadOperations_success);
} else {
$scope.loadOperations_success(null);
}
};
$scope.loadOperations_success = function(data) {
var operations = [{
id: null,
start_date: null,
stop_date: null,
day: null,
frequency: null,
label: null,
account_id: null,
category: null,
state: "edit"
}];
if(data) {
operations = operations.concat(angular.fromJson(data));
}
$scope.operations = operations;
$scope.$emit("operationsLoadedEvent", {operations: operations});
};
$scope.iconSaveClass = function(operation) {
if($scope.isNew(operation)) {
return "icon-plus";
} else if ($scope.isEditing(operation)) {
return "icon-ok";
}
};
$scope.iconCancelClass = function(operation) {
if($scope.isNew(operation)) {
return "icon-remove";
} else if ($scope.isEditing(operation)) {
return "icon-ban-circle";
}
};
$scope.isNew = function(operation) {
return !operation.id;
};
// Returns true if the entry is in editing state.
$scope.isEditing = function(operation) {
return operation.state === 'edit';
};
$scope.isDisplaying = function(operation) {
return operation.id && (!operation.state || operation.state === 'display');
};
$scope.saveOperation = function(operation) {
if(!operation.account_id) {
operation.account_id = $scope.account.id;
}
// prepare the Ajax xall to save the sceduled operation.
var type;
var url = "/api/scheduled_operations";
if(!$scope.isNew(operation)) {
url += "/" + operation.id;
}
$http.put(url, angular.toJson(operation)).success(function(data) {
message("success", "Save", data);
$scope.$emit("operationSavedEvent", operation);
});
};
$scope.editOperation = function(operation) {
// Cancel previous editing.
if($scope.selectedOperation) {
$scope.cancelEditOperation($scope.selectedItem);
}
// Save current entry values.
$scope.savedOperation = angular.copy(operation);
$scope.selectedOperation = operation;
// Enter edit state.
operation.state='edit';
};
$scope.cancelEditOperation = function(operation) {
if ($scope.isNew(operation)) {
operation.id = null;
operation.start_date = null;
operation.stop_date = null;
operation.day = null;
operation.frequency = null;
operation.label = null;
operation.value = null;
operation.category = null;
operation.account_id = $scope.account.id;
} else if ($scope.isEditing(operation)) {
if($scope.savedOperation) {
operation.id = $scope.savedOperation.id;
operation.start_date = $scope.savedOperation.start_date;
operation.stop_date = $scope.savedOperation.stop_date;
operation.day = $scope.savedOperation.day;
operation.frequency = $scope.savedOperation.frequency;
operation.label = $scope.savedOperation.label;
operation.value = $scope.savedOperation.value;
operation.category = $scope.savedOperation.category;
operation.account_id = $scope.savedOperation.account_id;
}
$scope.savedOperation = null;
$scope.selectedOperation = null;
operation.state = 'display';
}
};
$scope.removeOperation = function(operation, modalScope) {
// Cancel current editing.
if (!$scope.isNew(operation)) {
$http.delete("/api/scheduled_operations/" + operation.id).success(function (result) {
message("success", "Delete", result);
// Send the "entry removed" event.
$scope.$emit("operationRemovedEvent", operation);
$scope.closeModal(modalScope);
}).error(function (data) {
message("error", "Delete", data);
$scope.closeModal(modalScope);
});
}
};
$scope.closeModal = function(modalScope) {
// Close the modal dialog
if(modalScope && modalScope.dismiss) {
modalScope.dismiss();
}
};
$rootScope.$on("accountsLoadedEvent", function(event, args){
$scope.loadOperations(args.account);
});
}

View File

@ -0,0 +1,32 @@
<!--
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- Dialog header with title -->
<div class="modal-header">
<h3>Supprimer l'op&eacute;ration {{operation.label}}</h3>
</div>
<!-- Dialog body -->
<div class="modal-body">
<p>Confirmez-vous la suppression de cette op&eacute;ration ?</p>
</div>
<!-- Dialog footer with buttons -->
<div class="modal-footer">
<a href="#" class="btn btn-primary" ng-click="dismiss()">Non</a>
<a href="#" class="btn" ng-click="removeOperation(operation, this)">Oui</a>
</div>

View File

@ -1,881 +0,0 @@
/**
* AngularStrap - Twitter Bootstrap directives for AngularJS
* @version v0.6.4 - 2013-02-03
* @link http://mgcrea.github.com/angular-strap
* @author Olivier Louvignes
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
angular.module('$strap.config', []).value('$strap.config', {});
angular.module('$strap.filters', ['$strap.config']);
angular.module('$strap.directives', ['$strap.config']);
angular.module('$strap', ['$strap.filters', '$strap.directives', '$strap.config']);
angular.module('$strap.directives')
.directive('bsAlert', ['$parse', '$timeout', '$compile', function($parse, $timeout, $compile) {
'use strict';
return {
restrict: 'A',
link: function postLink(scope, element, attrs) {
scope.$watch(attrs.bsAlert, function(newValue, oldValue) {
if(typeof newValue === 'undefined') {
if(typeof oldValue !== 'undefined') {
element.remove();
}
return;
}
// Set alert content
element.html((newValue.title ? '<strong>' + newValue.title + '</strong>&nbsp;' : '') + newValue.content || '');
// Compile alert content
$timeout(function(){
$compile(element.contents())(scope);
});
// Add proper class
if(newValue.type || oldValue.type) {
oldValue.type && element.removeClass('alert-' + oldValue.type);
newValue.type && element.addClass('alert-' + newValue.type);
}
// Setup close button
if(newValue.close !== false) {
element.prepend('<button type="button" class="close" data-dismiss="alert">&times;</button>');
}
}, true);
// For basic alerts
if(!attrs.bsAlert && attrs.close !== '0') {
element.prepend('<button type="button" class="close" data-dismiss="alert">&times;</button>');
}
element.addClass('alert').alert();
// element.on('close', function() {
// });
}
};
}]);
angular.module('$strap.directives')
.directive('bsButton', ['$parse', '$timeout', function($parse, $timeout) {
'use strict';
return {
restrict: 'A',
require: '?ngModel',
link: function postLink(scope, element, attrs, controller) {
// If we have a controller (i.e. ngModelController) then wire it up
if(controller) {
// Set as single toggler if not part of a btn-group
if(!element.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length) {
element.attr('data-toggle', 'button');
}
// Handle start state
var startValue = !!scope.$eval(attrs.ngModel);
if(startValue) {
element.addClass('active');
}
// Watch model for changes
scope.$watch(attrs.ngModel, function(newValue, oldValue) {
var bNew = !!newValue, bOld = !!oldValue;
if(bNew !== bOld) {
$.fn.button.Constructor.prototype.toggle.call(button);
// Handle $q promises
} else if(bNew && !startValue) {
element.addClass('active');
}
});
}
// Support buttons without .btn class
if(!element.hasClass('btn')) {
element.on('click.button.data-api', function (e) {
element.button('toggle');
});
}
// Initialize button
element.button();
// Bootstrap override to handle toggling
var button = element.data('button');
button.toggle = function() {
if(!controller) {
return $.fn.button.Constructor.prototype.toggle.call(this);
}
var $parent = element.parent('[data-toggle="buttons-radio"]');
if($parent.length) {
element.siblings('[ng-model]').each(function(k, v) {
$parse($(v).attr('ng-model')).assign(scope, false);
});
scope.$digest();
if(!controller.$modelValue) {
controller.$setViewValue(!controller.$modelValue);
scope.$digest();
}
} else {
scope.$apply(function () {
controller.$setViewValue(!controller.$modelValue);
});
}
};
/*Provide scope display functions
scope._button = function(event) {
element.button(event);
};
scope.loading = function() {
element.tooltip('loading');
};
scope.reset = function() {
element.tooltip('reset');
};
if(attrs.loadingText) element.click(function () {
//var btn = $(this)
element.button('loading')
setTimeout(function () {
element.button('reset')
}, 1000)
});*/
}
};
}])
.directive('bsButtonsCheckbox', ['$parse', function($parse) {
'use strict';
return {
restrict: 'A',
require: '?ngModel',
compile: function compile(tElement, tAttrs, transclude) {
tElement.attr('data-toggle', 'buttons-checkbox').find('a, button').each(function(k, v) {
$(v).attr('bs-button', '');
});
}
};
}])
.directive('bsButtonsRadio', ['$parse', function($parse) {
'use strict';
return {
restrict: 'A',
require: '?ngModel',
compile: function compile(tElement, tAttrs, transclude) {
tElement.attr('data-toggle', 'buttons-radio');
// Delegate to children ngModel
if(!tAttrs.ngModel) {
tElement.find('a, button').each(function(k, v) {
$(v).attr('bs-button', '');
});
}
return function postLink(scope, iElement, iAttrs, controller) {
// If we have a controller (i.e. ngModelController) then wire it up
if(controller) {
iElement
.find('[value]').button()
.filter('[value="' + scope.$eval(iAttrs.ngModel) + '"]')
.addClass('active');
iElement.on('click.button.data-api', function (ev) {
scope.$apply(function () {
controller.$setViewValue($(ev.target).closest('button').attr('value'));
});
});
// Watch model for changes
scope.$watch(iAttrs.ngModel, function(newValue, oldValue) {
if(newValue !== oldValue) {
var $btn = iElement.find('[value="' + scope.$eval(iAttrs.ngModel) + '"]');
$.fn.button.Constructor.prototype.toggle.call($btn.data('button'));
}
});
}
};
}
};
}]);
angular.module('$strap.directives')
.directive('bsButtonSelect', ['$parse', '$timeout', function($parse, $timeout) {
'use strict';
return {
restrict: 'A',
require: '?ngModel',
link: function postLink(scope, element, attr, ctrl) {
var getter = $parse(attr.bsButtonSelect),
setter = getter.assign;
// Bind ngModelController
if(ctrl) {
element.text(scope.$eval(attr.ngModel));
// Watch model for changes
scope.$watch(attr.ngModel, function(newValue, oldValue) {
element.text(newValue);
});
}
// Click handling
var values, value, index, newValue;
element.on('click', function onClick() {
values = getter(scope);
value = ctrl ? scope.$eval(attr.ngModel) : element.text();
index = values.indexOf(value);
newValue = index > values.length - 2 ? values[0] : values[index + 1];
scope.$apply(function() {
element.text(newValue);
if(ctrl) {
ctrl.$setViewValue(newValue);
}
});
});
}
};
}]);
// https://github.com/eternicode/bootstrap-datepicker
angular.module('$strap.directives')
.directive('bsDatepicker', ['$timeout', function($timeout) {
'use strict';
var isTouch = 'ontouchstart' in window && !window.navigator.userAgent.match(/PhantomJS/i);
var DATE_REGEXP_MAP = {
'/' : '[\\/]',
'-' : '[-]',
'.' : '[.]',
'dd' : '(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))',
'd' : '(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))',
'mm' : '(?:[0]?[1-9]|[1][012])',
'm' : '(?:[0]?[1-9]|[1][012])',
'yyyy' : '(?:(?:[1]{1}[0-9]{1}[0-9]{1}[0-9]{1})|(?:[2]{1}[0-9]{3}))(?![[0-9]])',
'yy' : '(?:(?:[0-9]{1}[0-9]{1}))(?![[0-9]])'
};
return {
restrict: 'A',
require: '?ngModel',
link: function postLink(scope, element, attrs, controller) {
//console.log('postLink', this, arguments); window.element = element;
var regexpForDateFormat = function(dateFormat, options) {
options || (options = {});
var re = dateFormat, regexpMap = DATE_REGEXP_MAP;
/*if(options.mask) {
regexpMap['/'] = '';
regexpMap['-'] = '';
}*/
angular.forEach(regexpMap, function(v, k) { re = re.split(k).join(v); });
return new RegExp('^' + re + '$', ['i']);
};
var dateFormatRegexp = isTouch ? 'yyyy/mm/dd' : regexpForDateFormat(attrs.dateFormat || 'mm/dd/yyyy'/*, {mask: !!attrs.uiMask}*/);
// Handle date validity according to dateFormat
if(controller) {
controller.$parsers.unshift(function(viewValue) {
//console.warn('viewValue', viewValue, dateFormatRegexp, dateFormatRegexp.test(viewValue));
if (!viewValue || dateFormatRegexp.test(viewValue)) {
controller.$setValidity('date', true);
return viewValue;
} else {
controller.$setValidity('date', false);
return undefined;
}
});
}
// Support add-on
var component = element.next('[data-toggle="datepicker"]');
if(component.length) {
component.on('click', function() { isTouch ? element.trigger('focus') : element.datepicker('show'); });
}
// Use native interface for touch devices
if(isTouch && element.prop('type') === 'text') {
element.prop('type', 'date');
element.on('change', function(ev) {
scope.$apply(function () {
controller.$setViewValue(element.val());
});
});
} else {
// If we have a controller (i.e. ngModelController) then wire it up
if(controller) {
element.on('changeDate', function(ev) {
scope.$apply(function () {
controller.$setViewValue(element.val());
});
});
}
// Popover GarbageCollection
var $popover = element.closest('.popover');
if($popover) {
$popover.on('hide', function(e) {
var datepicker = element.data('datepicker');
if(datepicker) {
datepicker.picker.remove();
element.data('datepicker', null);
}
});
}
// Create datepicker
element.attr('data-toggle', 'datepicker');
element.datepicker({
autoclose: true,
language: attrs.language || 'en'
});
}
}
};
}]);
angular.module('$strap.directives')
.directive('bsDropdown', ['$parse', '$compile', function($parse, $compile) {
'use strict';
var slice = Array.prototype.slice;
var template = '' +
'<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">' +
'<li ng-repeat="item in items" ng-class="{divider: !!item.divider, \'dropdown-submenu\': !!item.submenu && item.submenu.length}">' +
'<a ng-hide="!!item.divider" tabindex="-1" ng-href="{{item.href}}" ng-click="{{item.click}}" target="{{item.target}}" ng-bind-html-unsafe="item.text"></a>' +
'</li>' +
'</ul>';
var linkSubmenu = function(items, parent, scope) {
var subitems, submenu, subscope;
for (var i = 0, l = items.length; i < l; i++) {
if(subitems = items[i].submenu) {
subscope = scope.$new();
subscope.items = subitems;
submenu = $compile(template)(subscope);
submenu = submenu.appendTo(parent.children('li:nth-child(' + (i+1) + ')'));
asyncLinkSubmenu(subitems, submenu, subscope);
}
}
};
var asyncLinkSubmenu = function() {
var args = slice.call(arguments);
setTimeout(function() {
linkSubmenu.apply(null, args);
});
};
return {
restrict: 'EA',
scope: true,
link: function postLink(scope, element, attr) {
var getter = $parse(attr.bsDropdown);
scope.items = getter(scope);
var dropdown = $compile(template)(scope);
asyncLinkSubmenu(scope.items, dropdown, scope);
dropdown.insertAfter(element);
element
.addClass('dropdown-toggle')
.attr('data-toggle', "dropdown");
}
};
}]);
angular.module('$strap.directives')
.directive('bsModal', ['$parse', '$compile', '$http', '$timeout', '$q', '$templateCache', function($parse, $compile, $http, $timeout, $q, $templateCache) {
'use strict';
return {
restrict: 'A',
scope: true,
link: function postLink(scope, element, attr, ctrl) {
var getter = $parse(attr.bsModal),
setter = getter.assign,
value = getter(scope);
$q.when($templateCache.get(value) || $http.get(value, {cache: true})).then(function onSuccess(template) {
// Handle response from $http promise
if(angular.isObject(template)) {
template = template.data;
}
// Build modal object
var id = getter(scope).replace('.html', '').replace(/\//g, '-').replace(/\./g, '-') + '-' + scope.$id;
var $modal = $('<div class="modal hide" tabindex="-1"></div>')
.attr('id', id)
.attr('data-backdrop', attr.backdrop || true)
.attr('data-keyboard', attr.keyboard || true)
.addClass(attr.modalClass ? 'fade ' + attr.modalClass : 'fade')
.html(template);
$('body').append($modal);
// Configure element
element.attr('href', '#' + id).attr('data-toggle', 'modal');
// Compile modal content
$timeout(function(){
$compile($modal)(scope);
});
// Provide scope display functions
scope._modal = function(name) {
$modal.modal(name);
};
scope.hide = function() {
$modal.modal('hide');
};
scope.show = function() {
$modal.modal('show');
};
scope.dismiss = scope.hide;
});
}
};
}]);
angular.module('$strap.directives')
.directive('bsNavbar', ['$location', function($location) {
'use strict';
return {
restrict: 'A',
link: function postLink($scope, element, attrs, controller) {
// Watch for the $location
$scope.$watch(function() {
return $location.path();
}, function(newValue, oldValue) {
element.find('li[data-match-route]').each(function(k, li) {
var $li = angular.element(li),
pattern = $li.data('match-route'),
regexp = new RegExp('^' + pattern + '$', ["i"]);
if(regexp.test(newValue)) {
$li.addClass('active');
} else {
$li.removeClass('active');
}
});
});
}
};
}]);
angular.module('$strap.directives')
.directive('bsPopover', ['$parse', '$compile', '$http', '$timeout', '$q', '$templateCache', function($parse, $compile, $http, $timeout, $q, $templateCache) {
'use strict';
// Hide popovers when pressing esc
$("body").on("keyup", function(ev) {
if(ev.keyCode === 27) {
$(".popover.in").each(function() {
var $this = $(this);
$this.popover('hide');
});
}
});
return {
restrict: 'A',
scope: true,
link: function postLink(scope, element, attr, ctrl) {
var getter = $parse(attr.bsPopover),
setter = getter.assign,
value = getter(scope),
options = {};
if(angular.isObject(value)) {
options = value;
}
$q.when(options.content || $templateCache.get(value) || $http.get(value, {cache: true})).then(function onSuccess(template) {
// Handle response from $http promise
if(angular.isObject(template)) {
template = template.data;
}
// Handle data-unique attribute
if(!!attr.unique) {
element.on('show', function(ev) {
// Hide any active popover except self
$(".popover.in").each(function() {
var $this = $(this),
popover = $this.data('popover');
if(popover && !popover.$element.is(element)) {
$this.popover('hide');
}
});
});
}
// Handle data-hide attribute (requires dot-notation model)
if(!!attr.hide) {
scope.$watch(attr.hide, function(newValue, oldValue) {
if(!!newValue) {
popover.hide();
}
});
}
// Initialize popover
element.popover(angular.extend({}, options, {
content: function() {
$timeout(function() { // use async $apply
var popover = element.data('popover'),
$tip = popover.tip();
$compile($tip)(scope);
setTimeout(function() { // refresh position on nextTick
popover.refresh();
});
});
return template;
},
html: true
}));
// Bootstrap override to provide events, tip() reference, refreshable positions
var popover = element.data('popover');
popover.hasContent = function() {
return this.getTitle() || template; // fix multiple $compile()
};
popover.refresh = function() {
var $tip = this.tip(), inside, pos, actualWidth, actualHeight, placement, tp;
placement = typeof this.options.placement === 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement;
inside = /in/.test(placement);
pos = this.getPosition(inside);
actualWidth = $tip[0].offsetWidth;
actualHeight = $tip[0].offsetHeight;
switch (inside ? placement.split(' ')[1] : placement) {
case 'bottom':
tp = {top: pos.top + pos.height + 10, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 'top':
tp = {top: pos.top - actualHeight - 10, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - 10};
break;
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + 10};
break;
}
$tip.offset(tp);
};
popover.show = function() {
var e = $.Event('show');
this.$element.trigger(e);
if (e.isDefaultPrevented()) {
return;
}
var r = $.fn.popover.Constructor.prototype.show.apply(this, arguments);
// Bind popover to the tip()
this.$tip.data('popover', this);
return r;
};
popover.hide = function() {
var e = $.Event('hide');
this.$element.trigger(e);
if (e.isDefaultPrevented()) {
return;
}
return $.fn.popover.Constructor.prototype.hide.apply(this, arguments);
};
// Provide scope display functions
scope._popover = function(name) {
element.popover(name);
};
scope.hide = function() {
element.popover('hide');
};
scope.show = function() {
element.popover('show');
};
scope.dismiss = scope.hide;
});
}
};
}]);
// https://github.com/jdewit/bootstrap-timepicker
// https://github.com/kla/bootstrap-timepicker
angular.module('$strap.directives')
.directive('bsTimepicker', ['$timeout', function($timeout) {
'use strict';
var TIME_REGEXP = '((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)';
return {
restrict: 'A',
require: '?ngModel',
link: function postLink(scope, element, attrs, controller) {
// If we have a controller (i.e. ngModelController) then wire it up
if(controller) {
element.on('change', function(ev) {
scope.$apply(function () {
controller.$setViewValue(element.val());
});
});
}
// Handle input time validity
var timeRegExp = new RegExp('^' + TIME_REGEXP + '$', ['i']);
controller.$parsers.unshift(function(viewValue) {
//console.warn('viewValue', viewValue, timeRegExp, timeRegExp.test(viewValue));
if (!viewValue || timeRegExp.test(viewValue)) {
controller.$setValidity('time', true);
return viewValue;
} else {
controller.$setValidity('time', false);
return undefined;
}
});
// Support add-on
// var component = element.siblings('[data-toggle="timepicker"]');
// if(component.length) {
// component.on('click', function() {
// var $widget = element.data('timepicker').$widget;
// });
// }
// Popover GarbageCollection
var $popover = element.closest('.popover');
if($popover) {
$popover.on('hide', function(e) {
var timepicker = element.data('timepicker');
if(timepicker) {
timepicker.$widget.remove();
element.data('timepicker', null);
}
});
}
// Create datepicker
element.attr('data-toggle', 'timepicker');
//$timeout(function () {
element.timepicker();
//});
}
};
}]);
angular.module('$strap.directives')
.directive('bsTooltip', ['$parse', '$compile', function($parse, $compile) {
'use strict';
return {
restrict: 'A',
scope: true,
link: function postLink(scope, element, attrs, ctrl) {
if(!!attrs.unique) {
element.on('show', function(ev) {
// Hide any active popover except self
$(".tooltip.in").each(function() {
var $this = $(this),
tooltip = $this.data('tooltip');
if(tooltip && !tooltip.$element.is(element)) {
$this.tooltip('hide');
}
});
});
}
// Initialize tooltip
element.tooltip({
title: scope.$eval(attrs.bsTooltip),
html: true
});
// Bootstrap override to provide events & tip() reference
var tooltip = element.data('tooltip');
tooltip.show = function() {
var e = $.Event('show');
this.$element.trigger(e);
if (e.isDefaultPrevented()) {
return;
}
var r = $.fn.tooltip.Constructor.prototype.show.apply(this, arguments);
// Bind popover to the tip()
this.tip().data('tooltip', this);
return r;
};
tooltip.hide = function() {
var e = $.Event('hide');
this.$element.trigger(e);
if (e.isDefaultPrevented()) {
return;
}
return $.fn.tooltip.Constructor.prototype.hide.apply(this, arguments);
};
//Provide scope display functions
scope._tooltip = function(event) {
element.tooltip(event);
};
scope.hide = function() {
element.tooltip('hide');
};
scope.show = function() {
element.tooltip('show');
};
scope.dismiss = scope.hide;
}
};
}]);
angular.module('$strap.directives')
.directive('bsTypeahead', ['$parse', function($parse) {
'use strict';
return {
restrict: 'A',
require: '?ngModel',
link: function postLink(scope, element, attrs, controller) {
var getter = $parse(attrs.bsTypeahead),
setter = getter.assign,
value = getter(scope);
// Watch bsTypeahead for changes
scope.$watch(attrs.bsTypeahead, function(newValue, oldValue) {
if(newValue !== oldValue) {
value = newValue;
}
});
element.attr('data-provide', 'typeahead');
element.typeahead({
source: function(query) { return angular.isFunction(value) ? value.apply(null, arguments) : value; },
minLength: attrs.minLength || 1,
items: attrs.items,
updater: function(value) {
// If we have a controller (i.e. ngModelController) then wire it up
if(controller) {
scope.$apply(function () {
controller.$setViewValue(value);
});
}
return value;
}
});
// Bootstrap override
var typeahead = element.data('typeahead');
// Fixes #2043: allows minLength of zero to enable show all for typeahead
typeahead.lookup = function (ev) {
var items;
this.query = this.$element.val() || '';
if (this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this;
}
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source;
return items ? this.process(items) : this;
};
// Support 0-minLength
if(attrs.minLength === "0") {
setTimeout(function() { // Push to the event loop to make sure element.typeahead is defined (breaks tests otherwise)
element.on('focus', function() {
setTimeout(element.typeahead.bind(element, 'lookup'), 200);
});
});
}
}
};
}]);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,160 +0,0 @@
/*
AngularJS v1.0.4
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
(function(T,Y,p){'use strict';function m(b,a,c){var d;if(b)if(L(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(M(b)&&va(b.length))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}
function nb(b){return function(a,c){b(c,a)}}function wa(){for(var b=Z.length,a;b;){b--;a=Z[b].charCodeAt(0);if(a==57)return Z[b]="A",Z.join("");if(a==90)Z[b]="0";else return Z[b]=String.fromCharCode(a+1),Z.join("")}Z.unshift("0");return Z.join("")}function y(b){m(arguments,function(a){a!==b&&m(a,function(a,d){b[d]=a})});return b}function F(b){return parseInt(b,10)}function xa(b,a){return y(new (y(function(){},{prototype:b})),a)}function C(){}function ma(b){return b}function H(b){return function(){return b}}
function t(b){return typeof b=="undefined"}function v(b){return typeof b!="undefined"}function M(b){return b!=null&&typeof b=="object"}function E(b){return typeof b=="string"}function va(b){return typeof b=="number"}function na(b){return Sa.apply(b)=="[object Date]"}function I(b){return Sa.apply(b)=="[object Array]"}function L(b){return typeof b=="function"}function oa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Q(b){return E(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&
(b.nodeName||b.bind&&b.find)}function Ta(b,a,c){var d=[];m(b,function(b,g,i){d.push(a.call(c,b,g,i))});return d}function ya(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ua(b,a){var c=ya(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(oa(b)||b&&b.$evalAsync&&b.$watch)throw u("Can't copy Window or Scope");if(a){if(b===a)throw u("Can't copy equivalent objects or arrays");if(I(b)){for(;a.length;)a.pop();for(var c=0;c<b.length;c++)a.push(U(b[c]))}else for(c in m(a,
function(b,c){delete a[c]}),b)a[c]=U(b[c])}else(a=b)&&(I(b)?a=U(b,[]):na(b)?a=new Date(b.getTime()):M(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ha(b,a){if(b===a)return!0;if(b===null||a===null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(I(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ha(b[d],a[d]))return!1;return!0}}else if(na(b))return na(a)&&b.getTime()==a.getTime();
else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||oa(b)||oa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||L(b[d]))){if(!ha(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&a[d]!==p&&!L(a[d]))return!1;return!0}return!1}function Va(b,a){var c=arguments.length>2?ia.call(arguments,2):[];return L(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ia.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,
arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=p:oa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function ob(b){return E(b)?JSON.parse(b):b}function Wa(b){b&&b.length!==0?(b=D(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function pa(b){b=z(b).clone();try{b.html("")}catch(a){}return z("<div>").append(b).html().match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,
function(a,b){return"<"+D(b)})}function Xa(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=v(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];m(b,function(b,d){a.push(Ya(d,!0)+(b===!0?"":"="+Ya(b,!0)))});return a.length?a.join("&"):""}function Za(b){return Ya(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Ya(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,
"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,i=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(i,function(a){i[a]=!0;c(Y.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,
function(b){if(!e&&i[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function qb(b,a){b=z(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,i){a.$apply(function(){b.data("$injector",i);c(b)(a)})}]);return c}function $a(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function ab(b,a,c){if(!b)throw new u("Argument '"+(a||"?")+"' is "+(c||"required"));
return b}function qa(b,a,c){c&&I(b)&&(b=b[b.length-1]);ab(L(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw u("No module: "+d);var b=[],c=[],j=a("$injector","invoke"),
k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:j,run:function(a){c.push(a);return this}};g&&j(g);return k})}})}function sb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,
"Moz$1")}function bb(b,a){function c(){var e;for(var b=[this],c=a,i,f,h,j,k,l;b.length;){i=b.shift();f=0;for(h=i.length;f<h;f++){j=z(i[f]);c?j.triggerHandler("$destroy"):c=!c;k=0;for(e=(l=j.children()).length,j=e;k<j;k++)b.push(ja(l[k]))}}return d.apply(this,arguments)}var d=ja.fn[b],d=d.$original||d;c.$original=d;ja.fn[b]=c}function O(b){if(b instanceof O)return b;if(!(this instanceof O)){if(E(b)&&b.charAt(0)!="<")throw u("selectors not implemented");return new O(b)}if(E(b)){var a=Y.createElement("div");
a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);cb(this,a.childNodes);this.remove()}else cb(this,b)}function db(b){return b.cloneNode(!0)}function ra(b){tb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)ra(b[a])}function ub(b,a,c){var d=$(b,"events");$(b,"handle")&&(t(a)?m(d,function(a,c){eb(b,c,a);delete d[c]}):t(c)?(eb(b,a,d[a]),delete d[a]):Ua(d[a],c))}function tb(b){var a=b[za],c=Aa[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),ub(b)),delete Aa[a],b[za]=p)}function $(b,
a,c){var d=b[za],d=Aa[d||-1];if(v(c))d||(b[za]=d=++oc,d=Aa[d]={}),d[a]=c;else return d&&d[a]}function vb(b,a,c){var d=$(b,"data"),e=v(c),g=!e&&v(a),i=g&&!M(a);!d&&!i&&$(b,"data",d={});if(e)d[a]=c;else if(g)if(i)return d&&d[a];else y(d,a);else return d}function Ba(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function wb(b,a){a&&m(a.split(" "),function(a){b.className=Q((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+Q(a)+" "," "))})}function xb(b,a){a&&m(a.split(" "),
function(a){if(!Ba(b,a))b.className=Q(b.className+" "+Q(a))})}function cb(b,a){if(a)for(var a=!a.nodeName&&v(a.length)&&!oa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function yb(b,a){return Ca(b,"$"+(a||"ngController")+"Controller")}function Ca(b,a,c){b=z(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function zb(b,a){var c=Da[a.toLowerCase()];return c&&Ab[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=
!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||Y;if(t(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};m(a[e||c.type],function(a){a.call(b,c)});aa<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};
c.elem=b;return c}function ga(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===p)c=b.$$hashKey=wa()}else c=b;return a+":"+c}function Ea(b){m(b,this.put,this)}function fb(){}function Bb(b){var a,c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),m(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else I(b)?(c=b.length-1,qa(b[c],"fn"),a=b.slice(0,c)):qa(b,"fn",!0);
return a}function rb(b){function a(a){return function(b,c){if(M(b))m(b,nb(a));else return a(b,c)}}function c(a,b){if(L(b)||I(b))b=l.instantiate(b);if(!b.$get)throw u("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];m(a,function(a){if(!j.get(a))if(j.put(a,!0),E(a)){var c=sa(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var h=d[c],g=h[0]=="$injector"?l:l.get(h[0]);g[h[1]].apply(g,
h[2])}}catch(n){throw n.message&&(n.message+=" from "+a),n;}}else if(L(a))try{b.push(l.invoke(a))}catch(i){throw i.message&&(i.message+=" from "+a),i;}else if(I(a))try{b.push(l.invoke(a))}catch(k){throw k.message&&(k.message+=" from "+String(a[a.length-1])),k;}else qa(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw u("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===i)throw u("Circular dependency: "+h.join(" <- "));return a[d]}else try{return h.unshift(d),
a[d]=i,a[d]=b(d)}finally{h.shift()}}function d(a,b,e){var f=[],h=Bb(a),j,g,n;g=0;for(j=h.length;g<j;g++)n=h[g],f.push(e&&e.hasOwnProperty(n)?e[n]:c(n));a.$inject||(a=a[j]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],
f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(I(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return M(e)?e:c},get:c,annotate:Bb}}var i={},f="Provider",h=[],j=new Ea,k={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),
value:a(function(a,b){return d(a,H(b))}),constant:a(function(a,b){k[a]=b;o[a]=b}),decorator:function(a,b){var c=l.get(a+f),d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},l=g(k,function(){throw u("Unknown provider: "+h.join(" <- "));}),o={},r=o.$injector=g(o,function(a){a=l.get(a+f);return r.invoke(a.$get,a)});m(e(b),function(a){r.invoke(a||C)});return r}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",
function(a,c,d){function e(a){var b=null;m(a,function(a){!b&&D(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=i.getElementById(b))?d.scrollIntoView():(d=e(i.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):a.scrollTo(0,0)}var i=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ia.call(arguments,1))}finally{if(n--,n===0)for(;w.length;)try{w.pop()()}catch(b){c.error(b)}}}
function g(a,b){(function ea(){m(q,function(a){a()});x=b(ea,a)})()}function i(){X!=f.url()&&(X=f.url(),m(s,function(a){a(f.url())}))}var f=this,h=a[0],j=b.location,k=b.history,l=b.setTimeout,o=b.clearTimeout,r={};f.isMock=!1;var n=0,w=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){n++};f.notifyWhenNoOutstandingRequests=function(a){m(q,function(a){a()});n===0?a():w.push(a)};var q=[],x;f.addPollFn=function(a){t(x)&&g(100,l);q.push(a);return a};var X=j.href,A=a.find("base");
f.url=function(a,b){if(a){if(X!=a)return X=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),A.attr("href",A.attr("href"))):b?j.replace(a):j.href=a,f}else return j.href.replace(/%27/g,"'")};var s=[],J=!1;f.onUrlChange=function(a){J||(d.history&&z(b).bind("popstate",i),d.hashchange?z(b).bind("hashchange",i):f.addPollFn(i),J=!0);s.push(a);return a};f.baseHref=function(){var a=A.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):a};var ba={},P="",K=f.baseHref();f.cookies=function(a,
b){var d,e,f,j;if(a)if(b===p)h.cookie=escape(a)+"=;path="+K+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(E(b))d=(h.cookie=escape(a)+"="+escape(b)+";path="+K).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(h.cookie!==P){P=h.cookie;d=P.split("; ");ba={};for(f=0;f<d.length;f++)e=d[f],j=e.indexOf("="),j>0&&(ba[unescape(e.substring(0,j))]=unescape(e.substring(j+1)))}return ba}};f.defer=function(a,b){var c;n++;c=l(function(){delete r[c];
e(a)},b||0);r[c]=!0;return c};f.defer.cancel=function(a){return r[a]?(delete r[a],o(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=l){if(o){if(o==a)o=a.n}else o=a;g(a.n,a.p);g(a,l);l=a;l.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw u("cacheId "+b+" taken");var i=0,f=y({},d,{id:b}),h={},j=d&&d.capacity||Number.MAX_VALUE,k={},
l=null,o=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);t(b)||(a in h||i++,h[a]=b,i>j&&this.remove(o.key))},get:function(a){var b=k[a];if(b)return e(b),h[a]},remove:function(a){var b=k[a];if(b){if(b==l)l=b.p;if(b==o)o=b.n;g(b.n,b.p);delete k[a];delete h[a];i--}},removeAll:function(){h={};i=0;k={};l=o=null},destroy:function(){k=f=h=null;delete a[b]},info:function(){return y({},f,{size:i})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};
return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Cb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ";this.directive=function f(d,e){E(d)?(ab(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var f=b.invoke(a);if(L(f))f={compile:H(f)};else if(!f.compile&&f.link)f.compile=
H(f.link);f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(j){c(j)}});return e}])),a[d].push(e)):m(d,nb(f));return this};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope",function(b,h,j,k,l,o,r,n){function w(a,b,c){a instanceof z||(a=z(a));m(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=z(b).wrap("<span></span>").parent()[0])});var d=x(a,
b,a,c);return function(b,c){ab(b,"scope");var e=c?ta.clone.call(a):a;e.data("$scope",b);q(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function q(a,b){try{a.addClass(b)}catch(c){}}function x(a,b,c,d){function e(a,c,d,j){var g,h,k,n,o,l,r,q=[];o=0;for(l=c.length;o<l;o++)q.push(c[o]);r=o=0;for(l=f.length;o<l;r++)h=q[r],c=f[o++],g=f[o++],c?(c.scope?(k=a.$new(M(c.scope)),z(h).data("$scope",k)):k=a,(n=c.transclude)||!j&&b?c(g,k,h,d,function(b){return function(c){var d=a.$new();return b(d,c).bind("$destroy",
Va(d,d.$destroy))}}(n||b)):c(g,k,h,p,j)):g&&g(a,h.childNodes,p,j)}for(var f=[],j,g,h,k=0;k<a.length;k++)g=new ea,j=X(a[k],[],g,d),g=(j=j.length?A(j,a[k],g,b,c):null)&&j.terminal||!a[k].childNodes.length?null:x(a[k].childNodes,j?j.transclude:b),f.push(j),f.push(g),h=h||j||g;return h?e:null}function X(a,b,c,f){var j=c.$attr,g;switch(a.nodeType){case 1:s(b,fa(Db(a).toLowerCase()),"E",f);var h,k,n;g=a.attributes;for(var o=0,l=g&&g.length;o<l;o++)if(h=g[o],h.specified)k=h.name,n=fa(k.toLowerCase()),j[n]=
k,c[n]=h=Q(aa&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):h.value),zb(a,n)&&(c[n]=!0),V(a,b,h,n),s(b,n,"A",f);a=a.className;if(E(a)&&a!=="")for(;g=e.exec(a);)n=fa(g[2]),s(b,n,"C",f)&&(c[n]=Q(g[3])),a=a.substr(g.index+g[0].length);break;case 3:G(b,a.nodeValue);break;case 8:try{if(g=d.exec(a.nodeValue))n=fa(g[1]),s(b,n,"M",f)&&(c[n]=Q(g[2]))}catch(r){}}b.sort(P);return b}function A(a,b,c,d,e){function f(a,b){if(a)a.require=B.require,l.push(a);if(b)b.require=B.require,ca.push(b)}function h(a,
b){var c,d="data",e=!1;if(E(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw u("No controller: "+a);}else I(a)&&(c=[],m(a,function(a){c.push(h(a,b))}));return c}function k(a,d,e,f,g){var n,q,w,J,Ga;n=b===e?c:hc(c,new ea(z(e),c.$attr));q=n.$$element;if(A){var x=/^\s*([@=&])\s*(\w*)\s*$/,s=d.$parent||d;m(A.scope,function(a,b){var c=a.match(x)||[],e=c[2]||b,f,g,j;switch(c[1]){case "@":n.$observe(e,function(a){d[b]=
a});n.$$observers[e].$$scope=s;break;case "=":g=o(n[e]);j=g.assign||function(){f=d[b]=g(s);throw u(Eb+n[e]+" (directive: "+A.name+")");};f=d[b]=g(s);d.$watch(function(){var a=g(s);a!==d[b]&&(a!==f?f=d[b]=a:j(s,a=f=d[b]));return a});break;case "&":g=o(n[e]);d[b]=function(a){return g(s,a)};break;default:throw u("Invalid isolate scope definition for directive "+A.name+": "+a);}})}t&&m(t,function(a){var b={$scope:d,$element:q,$attrs:n,$transclude:g};Ga=a.controller;Ga=="@"&&(Ga=n[a.name]);q.data("$"+
a.name+"Controller",r(Ga,b))});f=0;for(w=l.length;f<w;f++)try{J=l[f],J(d,q,n,J.require&&h(J.require,q))}catch(X){j(X,pa(q))}a&&a(d,e.childNodes,p,g);f=0;for(w=ca.length;f<w;f++)try{J=ca[f],J(d,q,n,J.require&&h(J.require,q))}catch(Ha){j(Ha,pa(q))}}for(var n=-Number.MAX_VALUE,l=[],ca=[],x=null,A=null,P=null,s=c.$$element=z(b),B,G,V,C,v=d,t,y,W,D=0,F=a.length;D<F;D++){B=a[D];V=p;if(n>B.priority)break;if(W=B.scope)K("isolated scope",A,B,s),M(W)&&(q(s,"ng-isolate-scope"),A=B),q(s,"ng-scope"),x=x||B;G=
B.name;if(W=B.controller)t=t||{},K("'"+G+"' controller",t[G],B,s),t[G]=B;if(W=B.transclude)K("transclusion",C,B,s),C=B,n=B.priority,W=="element"?(V=z(b),s=c.$$element=z(Y.createComment(" "+G+": "+c[G]+" ")),b=s[0],Fa(e,z(V[0]),b),v=w(V,d,n)):(V=z(db(b)).contents(),s.html(""),v=w(V,d));if(W=B.template)if(K("template",P,B,s),P=B,W=Ha(W),B.replace){V=z("<div>"+Q(W)+"</div>").contents();b=V[0];if(V.length!=1||b.nodeType!==1)throw new u(g+W);Fa(e,s,b);G={$attr:{}};a=a.concat(X(b,a.splice(D+1,a.length-
(D+1)),G));J(c,G);F=a.length}else s.html(W);if(B.templateUrl)K("template",P,B,s),P=B,k=ba(a.splice(D,a.length-D),k,s,c,e,B.replace,v),F=a.length;else if(B.compile)try{y=B.compile(s,c,v),L(y)?f(null,y):y&&f(y.pre,y.post)}catch(H){j(H,pa(s))}if(B.terminal)k.terminal=!0,n=Math.max(n,B.priority)}k.scope=x&&x.scope;k.transclude=C&&v;return k}function s(d,e,g,h){var k=!1;if(a.hasOwnProperty(e))for(var n,e=b.get(e+c),o=0,l=e.length;o<l;o++)try{if(n=e[o],(h===p||h>n.priority)&&n.restrict.indexOf(g)!=-1)d.push(n),
k=!0}catch(r){j(r)}return k}function J(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){f=="class"?(q(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function ba(a,b,c,d,e,f,j){var h=[],n,o,r=c[0],q=a.shift(),w=y({},q,{controller:null,templateUrl:null,transclude:null,scope:null});
c.html("");k.get(q.templateUrl,{cache:l}).success(function(k){var l,q,k=Ha(k);if(f){q=z("<div>"+Q(k)+"</div>").contents();l=q[0];if(q.length!=1||l.nodeType!==1)throw new u(g+k);k={$attr:{}};Fa(e,c,l);X(l,a,k);J(d,k)}else l=r,c.html(k);a.unshift(w);n=A(a,c,d,j);for(o=x(c.contents(),j);h.length;){var ca=h.pop(),k=h.pop();q=h.pop();var s=h.pop(),m=l;q!==r&&(m=db(l),Fa(k,z(q),m));n(function(){b(o,s,m,e,ca)},s,m,e,ca)}h=null}).error(function(a,b,c,d){throw u("Failed to load template: "+d.url);});return function(a,
c,d,e,f){h?(h.push(c),h.push(d),h.push(e),h.push(f)):n(function(){b(o,c,d,e,f)},c,d,e,f)}}function P(a,b){return b.priority-a.priority}function K(a,b,c,d){if(b)throw u("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+pa(d));}function G(a,b){var c=h(b,!0);c&&a.push({priority:0,compile:H(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);q(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function V(a,b,c,d){var e=h(c,!0);e&&b.push({priority:100,
compile:H(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=h(c[d],!0));c[d]=p;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function Fa(a,b,c){var d=b[0],e=d.parentNode,f,g;if(a){f=0;for(g=a.length;f<g;f++)if(a[f]==d){a[f]=c;break}}e&&e.replaceChild(c,d);c[z.expando]=d[z.expando];b[0]=c}var ea=function(a,b){this.$$element=a;this.$attr=b||{}};ea.prototype={$normalize:fa,$set:function(a,b,c,d){var e=zb(this.$$element[0],
a),f=this.$$observers;e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=$a(a,"-"));c!==!1&&(b===null||b===p?this.$$element.removeAttr(d):this.$$element.attr(d,b));f&&m(f[a],function(a){try{a(b)}catch(c){j(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);n.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var C=h.startSymbol(),ca=h.endSymbol(),Ha=C=="{{"||ca=="}}"?ma:function(a){return a.replace(/\{\{/g,
C).replace(/}}/g,ca)};return w}]}function fa(b){return sb(b.replace(zc,""))}function Ac(){var b={};this.register=function(a,c){M(a)?y(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(E(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);qa(d,g,!0)}return a.instantiate(d,e)}}]}function Bc(){this.$get=["$window",function(b){return z(b.document)}]}function Cc(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Dc(){var b=
"{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var h,j,k=0,l=[],o=d.length,r=!1,n=[];k<o;)(h=d.indexOf(b,k))!=-1&&(j=d.indexOf(a,h+e))!=-1?(k!=h&&l.push(d.substring(k,h)),l.push(k=c(r=d.substring(h+e,j))),k.exp=r,k=j+g,r=!0):(k!=o&&l.push(d.substring(k)),k=o);if(!(o=l.length))l.push(""),o=1;if(!f||r)return n.length=o,k=function(a){for(var b=0,c=o,d;b<c;b++){if(typeof(d=l[b])=="function")d=
d(a),d==null||d==p?d="":typeof d!="string"&&(d=da(d));n[b]=d}return n.join("")},k.exp=d,k.parts=l,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Fb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Za(b[a]);return b.join("/")}function ua(b,a){var c=Gb.exec(b),c={protocol:c[1],host:c[3],port:F(c[5])||Hb[c[1]]||null,path:c[6]||"/",search:c[8],hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function ka(b,
a,c){return b+"://"+a+(c==Hb[b]?"":":"+c)}function Ec(b,a,c){var d=ua(b);return decodeURIComponent(d.path)!=a||t(d.hash)||d.hash.indexOf(c)!==0?b:ka(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Fc(b,a,c){var d=ua(b);if(decodeURIComponent(d.path)==a)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",i=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(i.length);if(d.path.indexOf(i)!==0)throw u('Invalid url "'+b+'", missing path prefix "'+
i+'" !');return ka(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=ua(b,this);if(c.path.indexOf(a)!==0)throw u('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Xa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),c=this.$$hash?"#"+Za(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=
ka(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ia(b,a,c){var d;this.$$parse=function(b){var c=ua(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw u('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Gc.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)=="/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Xa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||
"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),c=this.$$hash?"#"+Za(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ib(b,a,c,d){Ia.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==0)return c+d+"#"+a+b.substr(c.length)}}function Ja(b){return function(){return this[b]}}
function Jb(b,a){return function(c){if(t(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Hc(){var b="",a=!1;this.hashPrefix=function(a){return v(a)?(b=a,this):b};this.html5Mode=function(b){return v(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function i(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,h,j,k=d.url(),l=ua(k);a?(h=d.baseHref()||"/",j=h.substr(0,h.lastIndexOf("/")),l=ka(l.protocol,l.host,l.port)+j+"/",
f=e.history?new hb(Ec(k,h,b),j,l):new Ib(Fc(k,h,b),b,l,h.substr(j.length+1))):(l=ka(l.protocol,l.host,l.port)+(l.path||"")+(l.search?"?"+l.search:"")+"#"+b+"/",f=new Ia(k,b,l));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=z(a.target);D(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),c.$apply(),a.preventDefault(),T.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=
k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);i(b)}),c.$$phase||c.$digest())});var o=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!o||a!=f.absUrl())o++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),i(a))});f.$$replace=!1;return o});return f}]}function Ic(){this.$get=["$window",function(b){function a(a){a instanceof u&&(a.stack?a=a.message&&
a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||C;return g.apply?function(){var b=[];m(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Jc(b,a){function c(a){return a.indexOf(q)!=-1}function d(){return n+1<b.length?b.charAt(n+1):!1}function e(a){return"0"<=
a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function i(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function h(a,c,d){d=d||n;throw u("Lexer Error: "+a+" at column"+(v(c)?"s "+c+"-"+n+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function j(){for(var a="",c=n;n<b.length;){var j=D(b.charAt(n));if(j=="."||e(j))a+=j;else{var g=d();if(j=="e"&&f(g))a+=j;else if(f(j)&&g&&e(g)&&a.charAt(a.length-
1)=="e")a+=j;else if(f(j)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")h("Invalid exponent");else break}n++}a*=1;o.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){for(var c="",d=n,f,j,h;n<b.length;){var k=b.charAt(n);if(k=="."||i(k)||e(k))k=="."&&(f=n),c+=k;else break;n++}if(f)for(j=n;j<b.length;){k=b.charAt(j);if(k=="("){h=c.substr(f-d+1);c=c.substr(0,f-d);n=j;break}if(g(k))j++;else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=d.json=Ka[c];else{var l=Kb(c,a);d.fn=y(function(a,
b){return l(a,b)},{assign:function(a,b){return Lb(a,c,b)}})}o.push(d);h&&(o.push({index:f,text:".",json:!1}),o.push({index:f+1,text:h,json:!1}))}function l(a){var c=n;n++;for(var d="",e=a,f=!1;n<b.length;){var j=b.charAt(n);e+=j;if(f)j=="u"?(j=b.substring(n+1,n+5),j.match(/[\da-f]{4}/i)||h("Invalid unicode escape [\\u"+j+"]"),n+=4,d+=String.fromCharCode(parseInt(j,16))):(f=Kc[j],d+=f?f:j),f=!1;else if(j=="\\")f=!0;else if(j==a){n++;o.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});
return}else d+=j;n++}h("Unterminated quote",c)}for(var o=[],r,n=0,w=[],q,x=":";n<b.length;){q=b.charAt(n);if(c("\"'"))l(q);else if(e(q)||c(".")&&e(d()))j();else if(i(q)){if(k(),"{,".indexOf(x)!=-1&&w[0]=="{"&&(r=o[o.length-1]))r.json=r.text.indexOf(".")==-1}else if(c("(){}[].,;:"))o.push({index:n,text:q,json:":[,".indexOf(x)!=-1&&c("{[")||c("}]:,")}),c("{[")&&w.unshift(q),c("}]")&&w.shift(),n++;else if(g(q)){n++;continue}else{var m=q+d(),A=Ka[q],s=Ka[m];s?(o.push({index:n,text:m,fn:s}),n+=2):A?(o.push({index:n,
text:q,fn:A,json:"[,:".indexOf(x)!=-1&&c("+-")}),n+=1):h("Unexpected next character ",n,n+1)}x=q}return o}function Lc(b,a,c,d){function e(a,c){throw u("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(K.length===0)throw u("Unexpected end of expression: "+b);return K[0]}function i(a,b,c,d){if(K.length>0){var e=K[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,
d,f){return(b=i(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),K.shift(),b):!1}function h(a){f(a)||e("is unexpected, expecting ["+a+"]",i())}function j(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function l(){for(var a=[];;)if(K.length>0&&!i("}",")",";","]")&&a.push(v()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=a[e];f&&(d=f(b,c))}return d}}function o(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(G());
else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function r(){for(var a=n(),b;;)if(b=f("||"))a=k(a,b.fn,n());else return a}function n(){var a=w(),b;if(b=f("&&"))a=k(a,b.fn,n());return a}function w(){var a=q(),b;if(b=f("==","!="))a=k(a,b.fn,w());return a}function q(){var a;a=x();for(var b;b=f("+","-");)a=k(a,b.fn,x());if(b=f("<",">","<=",">="))a=k(a,b.fn,q());return a}function x(){for(var a=m(),b;b=f("*","/","%");)a=k(a,
b.fn,m());return a}function m(){var a;return f("+")?A():(a=f("-"))?k(ba,a.fn,m()):(a=f("!"))?j(a.fn,m()):A()}function A(){var a;if(f("("))a=v(),h(")");else if(f("["))a=s();else if(f("{"))a=J();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=z(a,c),c=null):b.text==="["?(c=a,a=ea(a)):b.text==="."?(c=a,a=t(a)):e("IMPOSSIBLE");return a}function s(){var a=[];if(g().text!="]"){do a.push(G());while(f(","))}h("]");return function(b,c){for(var d=[],e=0;e<
a.length;e++)d.push(a[e](b,c));return d}}function J(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;h(":");var c=G();a.push({key:b,value:c})}while(f(","))}h("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],j=f.value(b,c);d[f.key]=j}return d}}var ba=H(0),P,K=Jc(b,d),G=function(){var a=r(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+"] can not be assigned to",d),c=r(),function(b,d){return a.assign(b,c(b,d),d)}):a},z=function(a,
b){var c=[];if(g().text!=")"){do c.push(G());while(f(","))}h(")");return function(d,e){for(var f=[],j=b?b(d,e):d,h=0;h<c.length;h++)f.push(c[h](d,e));h=a(d,e)||C;return h.apply?h.apply(j,f):h(f[0],f[1],f[2],f[3],f[4])}},t=function(a){var b=f().text,c=Kb(b,d);return y(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Lb(a(c,e),b,d)}})},ea=function(a){var b=G();h("]");return y(function(c,d){var e=a(c,d),f=b(c,d),j;if(!e)return p;if((e=e[f])&&e.then){j=e;if(!("$$v"in e))j.$$v=p,j.then(function(a){j.$$v=
a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},v=function(){for(var a=G(),b;;)if(b=f("|"))a=k(a,b.fn,o());else return a};a?(G=r,z=t=ea=v=function(){e("is not valid json",{text:b,index:0})},P=A()):P=l();K.length!==0&&e("is an unexpected token",K[0]);return P}function Lb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,i=0;i<g;i++)d=
a[i],b&&(b=(e=b)[d]);return!c&&L(b)?Va(e,b):b}function Mb(b,a,c,d,e){return function(g,i){var f=i&&i.hasOwnProperty(b)?i:g,h;if(f===null||f===p)return f;if((f=f[b])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!a||f===null||f===p)return f;if((f=f[a])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!c||f===null||f===p)return f;if((f=f[c])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!d||f===null||f===p)return f;
if((f=f[d])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!e||f===null||f===p)return f;if((f=f[e])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}return f}}function Kb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Mb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,j;do j=Mb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=p,a=j;while(e<d);return j};else{var g="var l, fn, p;\n";m(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+
(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return ib[b]=e}function Mc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?b[d]:b[d]=Lc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Nc(){this.$get=
["$rootScope","$exceptionHandler",function(b,a){return Oc(function(a){b.$evalAsync(a)},a)}]}function Oc(b,a){function c(a){return a}function d(a){return i(a)}var e=function(){var f=[],h,j;return j={resolve:function(a){if(f){var c=f;f=p;h=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],h.then(a[0],a[1])})}},reject:function(a){j.resolve(i(a))},promise:{then:function(b,j){var g=e(),i=function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},n=function(b){try{g.resolve((j||
d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([i,n]):h.then(i,n);return g.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},i=function(a){return{then:function(c,j){var g=e();b(function(){g.resolve((j||d)(a))});return g.promise}}};return{defer:e,reject:i,when:function(f,h,j){var k=e(),l,o=function(b){try{return(h||c)(b)}catch(d){return a(d),i(d)}},r=function(b){try{return(j||d)(b)}catch(c){return a(c),i(c)}};b(function(){g(f).then(function(a){l||
(l=!0,k.resolve(g(a).then(o,r)))},function(a){l||(l=!0,k.resolve(r(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?m(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Pc(){var b={};this.when=function(a,c){b[a]=y({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};
this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,i,f){function h(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,j,g=0;(j=f.exec(b))!==null;)c+=b.slice(g,j.index),c+="([^\\/]*)",d.push(j[1]),g=f.lastIndex;c+=b.substr(g);var h=a.match(RegExp(c));h&&m(d,function(a,b){e[a]=h[b+1]});return h?e:null}function j(){var b=k(),j=r.current;if(b&&j&&b.$route===j.$route&&ha(b.pathParams,j.pathParams)&&!b.reloadOnSearch&&
!o)j.params=b.params,U(j.params,d),a.$broadcast("$routeUpdate",j);else if(b||j)o=!1,a.$broadcast("$routeChangeStart",b,j),(r.current=b)&&b.redirectTo&&(E(b.redirectTo)?c.path(l(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;m(b.resolve||{},function(b,d){a.push(d);c.push(E(b)?g.get(b):g.invoke(b))});if(!v(d=b.template))if(v(d=b.templateUrl))d=i.get(d,{cache:f}).then(function(a){return a.data});
v(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};m(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==r.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,j)}},function(c){b==r.current&&a.$broadcast("$routeChangeError",b,j,c)})}function k(){var a,d;m(b,function(b,e){if(!d&&(a=h(c.path(),e)))d=xa(b,{params:y({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&xa(b[null],{params:{},pathParams:{}})}function l(a,b){var c=
[];m((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var o=!1,r={routes:b,reload:function(){o=!0;a.$evalAsync(j)}};a.$on("$locationChangeSuccess",j);return r}]}function Qc(){this.$get=H({})}function Rc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=wa();this.$$phase=this.$parent=this.$$watchers=
this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={}}function g(a){if(h.$$phase)throw u(h.$$phase+" already in progress");h.$$phase=a}function i(a,b){var c=d(a);qa(c,b);return c}function f(){}e.prototype={$new:function(a){if(L(a))throw u("API-CHANGE: Use $controller to instantiate controllers.");a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=wa());a["this"]=
a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=i(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!L(b)){var h=i(b||C,"listener");g.fn=function(a,b,c){h(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ua(e,g)}},$digest:function(){var a,
d,e,i,r,n,m,q=b,x,p=[],A,s;g("$digest");do{m=!1;x=this;do{for(r=x.$$asyncQueue;r.length;)try{x.$eval(r.shift())}catch(J){c(J)}if(i=x.$$watchers)for(n=i.length;n--;)try{if(a=i[n],(d=a.get(x))!==(e=a.last)&&!(a.eq?ha(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))m=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,x),q<5&&(A=4-q,p[A]||(p[A]=[]),s=L(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,s+="; newVal: "+da(d)+"; oldVal: "+da(e),p[A].push(s))}catch(ba){c(ba)}if(!(i=x.$$childHead||x!==
this&&x.$$nextSibling))for(;x!==this&&!(i=x.$$nextSibling);)x=x.$parent}while(x=i);if(m&&!q--)throw h.$$phase=null,u(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(p));}while(m||r.length);h.$$phase=null},$destroy:function(){if(!(h==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=
this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{h.$$phase=null;try{h.$digest()}catch(d){throw c(d),d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[ya(c,
b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},i=[h].concat(ia.call(arguments,1)),m,p;do{e=f.$$listeners[a]||d;h.currentScope=f;m=0;for(p=e.length;m<p;m++)if(e[m])try{if(e[m].apply(null,i),g)return h}catch(A){c(A)}else e.splice(m,1),m--,p--;f=f.$parent}while(f);return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=
!0},defaultPrevented:!1},g=[f].concat(ia.call(arguments,1)),h,i;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(i=e.length;h<i;h++)if(e[h])try{e[h].apply(null,g)}catch(m){c(m)}else e.splice(h,1),h--,i--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var h=new e;return h}]}function Sc(){this.$get=["$window",function(b){var a={},c=F((/android (\d+)/.exec(D(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||
c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&aa==9)return!1;if(t(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Tc(){this.$get=H(T)}function Nb(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=D(Q(b.substr(0,e)));d=Q(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ob(b){var a=M(b)?b:p;return function(c){a||(a=Nb(b));return c?
a[D(c)]||null:a}}function Pb(b,a,c){if(L(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Uc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){E(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&Sa.apply(a)!=="[object File]"?da(a):a}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},
put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,h,j,k){function l(a){function c(a){var b=y({},a,{data:Pb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:j.reject(b)}a.method=la(a.method);var e=a.transformRequest||d.transformRequest,f=a.transformResponse||d.transformResponse,h=d.headers,h=y({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},h.common,h[D(a.method)],
a.headers),e=Pb(a.data,Ob(h),e),g;t(a.data)&&delete h["Content-Type"];g=o(a,e,h);g=g.then(c,c);m(w,function(a){g=a(g)});g.success=function(b){g.then(function(c){b(c.data,c.status,c.headers,a)});return g};g.error=function(b){g.then(null,function(c){b(c.data,c.status,c.headers,a)});return g};return g}function o(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(w,[a,b,Nb(c)]):m.remove(w));f(b,a,c);h.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Ob(d),
config:b})}function i(){var a=ya(l.pendingRequests,b);a!==-1&&l.pendingRequests.splice(a,1)}var k=j.defer(),o=k.promise,m,p,w=r(b.url,b.params);l.pendingRequests.push(b);o.then(i,i);b.cache&&b.method=="GET"&&(m=M(b.cache)?b.cache:n);if(m)if(p=m.get(w))if(p.then)return p.then(i,i),p;else I(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else m.put(w,o);p||a(b.method,w,c,e,d,b.timeout,b.withCredentials);return o}function r(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==p||(M(a)&&(a=da(a)),c.push(encodeURIComponent(b)+
"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var n=c("$http"),w=[];m(e,function(a){w.push(E(a)?k.get(a):k.invoke(a))});l.pendingRequests=[];(function(a){m(arguments,function(a){l[a]=function(b,c){return l(y(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){l[a]=function(b,c,d){return l(y(d||{},{method:a,url:b,data:c}))}})})("post","put");l.defaults=d;return l}]}function Vc(){this.$get=["$browser","$window","$document",
function(b,a,c){return Wc(b,Xc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Wc(b,a,c,d,e,g){function i(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;aa?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c)}return function(e,h,j,k,l,o,r){function n(a,c,d,e){c=(h.match(Gb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}
b.$$incOutstandingRequestCount();h=h||b.url();if(D(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};i(h.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?n(k,200,d[p].data):n(k,-2);delete d[p]})}else{var q=new a;q.open(e,h,!0);m(l,function(a,b){a&&q.setRequestHeader(b,a)});var x;q.onreadystatechange=function(){q.readyState==4&&n(k,x||q.status,q.responseText,q.getAllResponseHeaders())};if(r)q.withCredentials=!0;q.send(j||"");o>0&&c(function(){x=-1;
q.abort()},o)}}}function Yc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function Zc(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,h){var j=c.defer(),
k=j.promise,l=v(h)&&!h,f=a.defer(function(){try{j.resolve(e())}catch(a){j.reject(a),d(a)}l||b.$apply()},f),h=function(){delete g[k.$$timeoutId]};k.$$timeoutId=f;g[f]=j;k.then(h,h);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Qb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",
Rb);a("date",Sb);a("filter",$c);a("json",ad);a("limitTo",bd);a("lowercase",cd);a("number",Tb);a("orderBy",Ub);a("uppercase",dd)}function $c(){return function(b,a){if(!(b instanceof Array))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&
d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(gb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],i=0;i<b.length;i++){var f=b[i];c.check(f)&&
g.push(f)}return g}}function Rb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(t(d))d=a.CURRENCY_SYM;return Vb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Tb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Vb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Vb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),i=b+"",f="",h=[],j=!1;if(i.indexOf("e")!==-1){var k=i.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?i="0":(f=i,j=!0)}if(!j){i=
(i.split(Wb)[1]||"").length;t(e)&&(e=Math.min(Math.max(a.minFrac,i),a.maxFrac));var i=Math.pow(10,e),b=Math.round(b*i)/i,b=(""+b).split(Wb),i=b[0],b=b[1]||"",j=0,k=a.lgSize,l=a.gSize;if(i.length>=k+l)for(var j=i.length-k,o=0;o<j;o++)(j-o)%l===0&&o!==0&&(f+=c),f+=i.charAt(o);for(o=j;o<i.length;o++)(i.length-o)%k===0&&o!==0&&(f+=c),f+=i.charAt(o);for(;b.length<e;)b+="0";e&&(f+=d+b.substr(0,e))}h.push(g?a.negPre:a.posPre);h.push(f);h.push(g?a.negSuf:a.posSuf);return h.join("")}function jb(b,a,c){var d=
"";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function N(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function La(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Sb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,i=0;b[9]&&(g=F(b[9]+b[10]),i=F(b[9]+b[11]));a.setUTCFullYear(F(b[1]),F(b[2])-1,F(b[3]));a.setUTCHours(F(b[4]||0)-g,F(b[5]||0)-i,F(b[6]||
0),F(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",i=[],f,h,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;E(c)&&(c=ed.test(c)?F(c):a(c));va(c)&&(c=new Date(c));if(!na(c))return c;for(;e;)(h=fd.exec(e))?(i=i.concat(ia.call(h,1)),e=i.pop()):(i.push(e),e=null);m(i,function(a){f=gd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ad(){return function(b){return da(b,
!0)}}function bd(){return function(b,a){if(!(b instanceof Array))return b;var a=F(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Ub(b){return function(a,c,d){function e(a,b){return Wa(b)?function(b,c){return a(c,b)}:a}if(!(a instanceof Array))return a;if(!c)return a;for(var c=I(c)?c:[c],c=Ta(c,function(a){var c=!1,d=a||ma;if(E(a)){if(a.charAt(0)=="+"||a.charAt(0)==
"-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),f=="string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],i=0;i<a.length;i++)g.push(a[i]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function R(b){L(b)&&(b={link:b});b.restrict=b.restrict||"AC";return H(b)}function Xb(b,a){function c(a,c){c=c?"-"+$a(c,"-"):
"";b.removeClass((a?Ma:Na)+c).addClass((a?Na:Ma)+c)}var d=this,e=b.parent().controller("form")||Oa,g=0,i=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Pa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];m(i,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,j){var k=i[a];if(b){if(k&&(Ua(k,j),!k.length)){g--;if(!g)c(b),
d.$valid=!0,d.$invalid=!1;i[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(ya(k,j)!=-1)return}else i[a]=k=[],g++,c(!1,a),e.$setValidity(a,!1,d);k.push(j);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Pa).addClass(Yb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function S(b){return t(b)||b===""||b===null||b!==b}function Qa(b,a,c,d,e,g){var i=function(){var c=Q(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",i);
else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){i();f=null}))});a.bind("change",i)}d.$render=function(){a.val(S(d.$viewValue)?"":d.$viewValue)};var h=c.ngPattern,j=function(a,b){return S(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),p)};h&&(h.match(/^\/(.*)\/$/)?(h=RegExp(h.substr(1,h.length-2)),e=function(a){return j(h,a)}):e=function(a){var c=b.$eval(h);if(!c||!c.test)throw new u("Expected "+h+" to be a RegExp but was "+
c);return j(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var k=F(c.ngMinlength),e=function(a){return!S(a)&&a.length<k?(d.$setValidity("minlength",!1),p):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var l=F(c.ngMaxlength),c=function(a){return!S(a)&&a.length>l?(d.$setValidity("maxlength",!1),p):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return R(function(c,d,e){function g(b,
d){if(a===!0||c.$index%2===a)d&&b!==d&&i(d),f(b)}function i(a){M(a)&&!I(a)&&(a=Ta(a,function(a,b){if(a)return b}));d.removeClass(I(a)?a.join(" "):a)}function f(a){M(a)&&!I(a)&&(a=Ta(a,function(a,b){if(a)return b}));a&&d.addClass(I(a)?a.join(" "):a)}c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var k=d%2;k!==g%2&&(k==a?f(c.$eval(e[b])):i(c.$eval(e[b])))})})}var D=function(b){return E(b)?b.toLowerCase():b},la=function(b){return E(b)?
b.toUpperCase():b},u=T.Error,aa=F((/msie (\d+)/.exec(D(navigator.userAgent))||[])[1]),z,ja,ia=[].slice,Ra=[].push,Sa=Object.prototype.toString,Zb=T.angular||(T.angular={}),sa,Db,Z=["0","0","0"];C.$inject=[];ma.$inject=[];Db=aa<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,hd={full:"1.0.4",major:1,minor:0,dot:4,codeName:"bewildering-hair"},Aa=O.cache={},za=
O.expando="ng-"+(new Date).getTime(),oc=1,$b=T.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},eb=T.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,ta=O.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);O(T).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});
return"["+b.join(", ")+"]"},eq:function(b){return b>=0?z(this[b]):z(this[this.length+b])},length:0,push:Ra,sort:[].sort,splice:[].splice},Da={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Da[D(b)]=b});var Ab={};m("input,select,option,textarea,button,form".split(","),function(b){Ab[la(b)]=!0});m({data:vb,inheritedData:Ca,scope:function(b){return Ca(b,"$scope")},controller:yb,injector:function(b){return Ca(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},
hasClass:Ba,css:function(b,a,c){a=sb(a);if(v(c))b.style[a]=c;else{var d;aa<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];aa<=8&&(d=d===""?p:d);return d}},attr:function(b,a,c){var d=D(a);if(Da[d])if(v(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:p;else if(v(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?p:b},prop:function(b,a,c){if(v(c))b[a]=c;else return b[a]},
text:y(aa<9?function(b,a){if(b.nodeType==1){if(t(a))return b.innerText;b.innerText=a}else{if(t(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(t(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(t(a))return b.value;b.value=a},html:function(b,a){if(t(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)ra(d[c]);b.innerHTML=a}},function(b,a){O.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Ba&&b!==yb?a:d)===p)if(M(a)){for(e=0;e<this.length;e++)if(b===
vb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});m({removeData:tb,dealoc:ra,bind:function a(c,d,e){var g=$(c,"events"),i=$(c,"handle");g||$(c,"events",g={});i||$(c,"handle",i=pc(c,g));m(d.split(" "),function(d){var h=g[d];if(!h){if(d=="mouseenter"||d=="mouseleave"){var j=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){j++;j==1&&i(a,"mouseenter")});a(c,"mouseout",
function(a){j--;j==0&&i(a,"mouseleave")})}else $b(c,d,i),g[d]=[];h=g[d]}h.push(e)})},unbind:ub,replaceWith:function(a,c){var d,e=a.parentNode;ra(a);m(new O(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];m(a.childNodes,function(a){a.nodeType===1&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){m(new O(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;
m(new O(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=z(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){ra(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;m(new O(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:xb,removeClass:wb,toggleClass:function(a,c,d){t(d)&&(d=!Ba(a,c));(d?xb:wb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;
for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:db,triggerHandler:function(a,c){var d=($(a,"events")||{})[c];m(d,function(c){c.call(a,null)})}},function(a,c){O.prototype[c]=function(c,e){for(var g,i=0;i<this.length;i++)g==p?(g=a(this[i],c,e),g!==p&&(g=z(g))):cb(g,a(this[i],c,e));return g==p?this:g}});Ea.prototype={put:function(a,c){this[ga(a)]=c},get:function(a){return this[ga(a)]},remove:function(a){var c=this[a=ga(a)];
delete this[a];return c}};fb.prototype={push:function(a,c){var d=this[a=ga(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=ga(a)];if(c)return c.length==1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[ga(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Eb="Non-assignable model expression: ";Cb.$inject=["$provide"];var zc=/^(x[\:\-_]|data[\:\-_])/i,Gb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Gc=ac,Hb={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ja("$$absUrl"),url:function(a,c){if(t(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ja("$$protocol"),host:Ja("$$host"),port:Ja("$$port"),path:Jb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(t(a))return this.$$search;v(c)?c===null?delete this.$$search[a]:
this.$$search[a]=c:this.$$search=E(a)?Xa(a):a;this.$$compose();return this},hash:Jb("$$hash",ma),replace:function(){this.$$replace=!0;return this}};Ia.prototype=xa(hb.prototype);Ib.prototype=xa(Ia.prototype);var Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return v(d)?v(e)?d+e:d:v(e)?e:p},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(v(d)?d:0)-(v(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},
"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":C,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},
"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Kc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Xc=T.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new u("This browser does not support XMLHttpRequest.");};Qb.$inject=["$provide"];Rb.$inject=
["$locale"];Tb.$inject=["$locale"];var Wb=".",gd={yyyy:N("FullYear",4),yy:N("FullYear",2,0,!0),y:N("FullYear",1),MMMM:La("Month"),MMM:La("Month",!0),MM:N("Month",2,1),M:N("Month",1,1),dd:N("Date",2),d:N("Date",1),HH:N("Hours",2),H:N("Hours",1),hh:N("Hours",2,-12),h:N("Hours",1,-12),mm:N("Minutes",2),m:N("Minutes",1),ss:N("Seconds",2),s:N("Seconds",1),EEEE:La("Day"),EEE:La("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=a.getTimezoneOffset();return jb(a/60,2)+
jb(Math.abs(a%60),2)}},fd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,ed=/^\d+$/;Sb.$inject=["$locale"];var cd=H(D),dd=H(la);Ub.$inject=["$parse"];var id=H({restrict:"E",compile:function(a,c){c.href||c.$set("href","");return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};m(Da,function(a,c){var d=fa("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,i){a.$watch(i[d],function(a){i.$set(c,!!a)})}}}}});
m(["src","href"],function(a){var c=fa("ng-"+a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),aa&&e.prop(a,c))})}}}});var Oa={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Xb.$inject=["$element","$attrs","$scope"];var Ra=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Xb,compile:function(){return{pre:function(a,d,i,f){if(!i.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=
!1};$b(d[0],"submit",h);d.bind("$destroy",function(){c(function(){eb(d[0],"submit",h)},0,!1)})}var j=d.parent().controller("form"),k=i.name||i.ngForm;k&&(a[k]=f);j&&d.bind("$destroy",function(){j.$removeControl(f);k&&(a[k]=p);y(f,Oa)})}}}};return a?y(U(d),{restrict:"EAC"}):d}]},jd=Ra(),kd=Ra(!0),ld=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,md=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,nd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Qa,number:function(a,
c,d,e,g,i){Qa(a,c,d,e,g,i);e.$parsers.push(function(a){var c=S(a);return c||nd.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),p)});e.$formatters.push(function(a){return S(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!S(a)&&a<f?(e.$setValidity("min",!1),p):(e.$setValidity("min",!0),a)};e.$parsers.push(a);e.$formatters.push(a)}if(d.max){var h=parseFloat(d.max),d=function(a){return!S(a)&&a>h?(e.$setValidity("max",!1),p):(e.$setValidity("max",
!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return S(a)||va(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),p)})},url:function(a,c,d,e,g,i){Qa(a,c,d,e,g,i);a=function(a){return S(a)||ld.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),p)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,i){Qa(a,c,d,e,g,i);a=function(a){return S(a)||md.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),p)};e.$formatters.push(a);
e.$parsers.push(a)},radio:function(a,c,d,e){t(d.name)&&c.attr("name",wa());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,i=d.ngFalseValue;E(g)||(g=!0);E(i)||(i=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===
g});e.$parsers.push(function(a){return a?g:i})},hidden:C,button:C,submit:C,reset:C},cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,i){i&&(bc[D(g.type)]||bc.text)(d,e,g,i,c,a)}}}],Na="ng-valid",Ma="ng-invalid",Pa="ng-pristine",Yb="ng-dirty",od=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function i(a,c){c=c?"-"+$a(c,"-"):"";e.removeClass((a?Ma:Na)+c).addClass((a?Na:Ma)+c)}this.$modelValue=this.$viewValue=Number.NaN;
this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),h=f.assign;if(!h)throw u(Eb+d.ngModel+" ("+pa(e)+")");this.$render=C;var j=e.inheritedData("$formController")||Oa,k=0,l=this.$error={};e.addClass(Pa);i(!0);this.$setValidity=function(a,c){if(l[a]!==!c){if(c){if(l[a]&&k--,!k)i(!0),this.$valid=!0,this.$invalid=!1}else i(!1),this.$invalid=!0,this.$valid=!1,k++;l[a]=!c;i(c,a);j.$setValidity(a,
c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Pa).addClass(Yb),j.$setDirty();m(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,h(a,d),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var o=this;a.$watch(function(){var c=f(a);if(o.$modelValue!==c){var d=o.$formatters,e=d.length;for(o.$modelValue=c;e--;)c=d[e](c);if(o.$viewValue!==c)o.$viewValue=c,o.$render()}})}],pd=function(){return{require:["ngModel",
"^?form"],controller:od,link:function(a,c,d,e){var g=e[0],i=e[1]||Oa;i.$addControl(g);c.bind("$destroy",function(){i.$removeControl(g)})}}},qd=H({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(S(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);
d.$observe("required",function(){g(e.$viewValue)})}}}},rd=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(Q(a))});return c});e.$formatters.push(function(a){return I(a)?a.join(", "):p})}}},sd=/^(true|false|\d+)$/,td=function(){return{priority:100,compile:function(a,c){return sd.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,
c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},ud=R(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==p?"":a)})}),vd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],wd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,
function(a){c.html(a||"")})}}],xd=kb("",!0),yd=kb("Odd",0),zd=kb("Even",1),Ad=R({compile:function(a,c){c.$set("ngCloak",p);a.removeClass("ng-cloak")}}),Bd=[function(){return{scope:!0,controller:"@"}}],Cd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=fa("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,i){var f=d(i[c]);g.bind(D(a),function(a){e.$apply(function(){f(e,
{$event:a})})})}}]});var Dd=R(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Ed=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,i){var f=i.ngInclude||i.src,h=i.onload||"",j=i.autoscroll;return function(g,i){var o=0,m,n=function(){m&&(m.$destroy(),m=null);i.html("")};g.$watch(f,function(f){var q=++o;f?a.get(f,{cache:c}).success(function(a){q===o&&(m&&m.$destroy(),m=g.$new(),i.html(a),e(i.contents())(m),
v(j)&&(!j||g.$eval(j))&&d(),m.$emit("$includeContentLoaded"),g.$eval(h))}).error(function(){q===o&&n()}):n()})}}}}],Fd=R({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Gd=R({terminal:!0,priority:1E3}),Hd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,i){var f=i.count,h=g.attr(i.$attr.when),j=i.offset||0,k=e.$eval(h),l={},o=c.startSymbol(),r=c.endSymbol();m(k,function(a,e){l[e]=c(a.replace(d,o+f+"-"+j+r))});e.$watch(function(){var c=
parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-j)),l[c](e,g,!0))},function(a){g.text(a)})}}}],Id=R({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,i){var f=i.ngRepeat,i=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),h,j,k;if(!i)throw u("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=i[1];h=i[2];i=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!i)throw u("'item' in 'item in collection' should be identifier or (key, value) but got '"+
f+"'.");j=i[3]||i[1];k=i[2];var l=new fb;a.$watch(function(a){var e,f,i=a.$eval(h),m=c,p=new fb,z,A,s,v,t,u;if(I(i))t=i||[];else{t=[];for(s in i)i.hasOwnProperty(s)&&s.charAt(0)!="$"&&t.push(s);t.sort()}z=t.length;e=0;for(f=t.length;e<f;e++){s=i===t?e:t[e];v=i[s];if(u=l.shift(v)){A=u.scope;p.push(v,u);if(e!==u.index)u.index=e,m.after(u.element);m=u.element}else A=a.$new();A[j]=v;k&&(A[k]=s);A.$index=e;A.$first=e===0;A.$last=e===z-1;A.$middle=!(A.$first||A.$last);u||d(A,function(a){m.after(a);u={scope:A,
element:m=a,index:e};p.push(v,u)})}for(s in l)if(l.hasOwnProperty(s))for(t=l[s];t.length;)v=t.pop(),v.element.remove(),v.scope.$destroy();l=p})}}}),Jd=R(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Wa(a)?"":"none")})}),Kd=R(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Wa(a)?"none":"")})}),Ld=R(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&m(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Md=H({restrict:"EA",require:"ngSwitch",controller:function(){this.cases=
{}},link:function(a,c,d,e){var g,i,f;a.$watch(d.ngSwitch||d.on,function(h){i&&(f.$destroy(),i.remove(),i=f=null);if(g=e.cases["!"+h]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){i=a;c.append(a)})})}}),Nd=R({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,i,f){f.cases["!"+c.ngSwitchWhen]=d}}}),Od=R({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,i,f){f.cases["?"]=d}}}),Pd=R({controller:["$transclude",
"$element",function(a,c){a(function(a){c.append(a)})}]}),Qd=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,i){return{restrict:"ECA",terminal:!0,link:function(a,c,j){function k(){var j=d.current&&d.current.locals,k=j&&j.$template;if(k){c.html(k);l&&(l.$destroy(),l=null);var k=g(c.contents()),m=d.current;l=m.scope=a.$new();if(m.controller)j.$scope=l,j=i(m.controller,j),c.contents().data("$ngControllerController",j);k(l);l.$emit("$viewContentLoaded");l.$eval(o);
e()}else c.html(""),l&&(l.$destroy(),l=null)}var l,o=j.onload||"";a.$on("$routeChangeSuccess",k);k()}}}],Rd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Sd=H({terminal:!0}),Td=["$compile","$parse",function(a,c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",
require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var h=this,j={},k=e,l;h.databound=d.ngModel;h.init=function(a,c,d){k=a;l=d};h.addOption=function(c){j[c]=!0;k.$viewValue==c&&(a.val(c),l.parent()&&l.remove())};h.removeOption=function(a){this.hasOption(a)&&(delete j[a],k.$viewValue==a&&this.renderUnknownOption(a))};h.renderUnknownOption=function(c){c="? "+ga(c)+" ?";l.val(c);a.prepend(l);a.val(c);l.prop("selected",!0)};h.hasOption=function(a){return j.hasOwnProperty(a)};
c.$on("$destroy",function(){h.renderUnknownOption=C})}],link:function(e,i,f,h){function j(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(s.parent()&&s.remove(),c.val(a),a===""&&x.prop("selected",!0)):t(a)&&x?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){s.parent()&&s.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Ea(d.$viewValue);m(c.find("option"),function(c){c.selected=v(a.get(c.value))})};a.$watch(function(){ha(e,
d.$viewValue)||(e=U(d.$viewValue),d.$render())});c.bind("change",function(){a.$apply(function(){var a=[];m(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function l(e,f,g){function h(){var a={"":[]},c=[""],d,i,t,v,u;t=g.$modelValue;v=r(e)||[];var x=l?mb(v):v,z,w,y;w={};u=!1;var B,D;if(n)u=new Ea(t);else if(t===null||q)a[""].push({selected:t===null,id:"",label:""}),u=!0;for(y=0;z=x.length,y<z;y++){w[k]=v[l?w[l]=x[y]:y];d=m(e,w)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);
n?d=u.remove(o(e,w))!=p:(d=t===o(e,w),u=u||d);B=j(e,w);B=B===p?"":B;i.push({id:l?x[y]:y,label:B,selected:d})}!n&&!u&&a[""].unshift({id:"?",label:"",selected:!0});w=0;for(x=c.length;w<x;w++){d=c[w];i=a[d];if(s.length<=w)t={element:A.clone().attr("label",d),label:i.label},v=[t],s.push(v),f.append(t.element);else if(v=s[w],t=v[0],t.label!=d)t.element.attr("label",t.label=d);B=null;y=0;for(z=i.length;y<z;y++)if(d=i[y],u=v[y+1]){B=u.element;if(u.label!==d.label)B.text(u.label=d.label);if(u.id!==d.id)B.val(u.id=
d.id);if(u.element.selected!==d.selected)B.prop("selected",u.selected=d.selected)}else d.id===""&&q?D=q:(D=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),v.push({element:D,label:d.label,id:d.id,selected:d.selected}),B?B.after(D):t.element.append(D),B=D;for(y++;v.length>y;)v.pop().element.remove()}for(;s.length>w;)s.pop()[0].element.remove()}var i;if(!(i=w.match(d)))throw u("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+w+"'.");
var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),o=c(i[2]?i[1]:k),r=c(i[7]),s=[[{element:f,label:""}]];q&&(a(q)(e),q.removeClass("ng-scope"),q.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=r(e)||[],d={},h,i,j,m,q,t;if(n){i=[];m=0;for(t=s.length;m<t;m++){a=s[m];j=1;for(q=a.length;j<q;j++)if((h=a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(o(e,d))}}else h=f.val(),h=="?"?i=p:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=o(e,d));g.$setViewValue(i)})});g.$render=
h;e.$watch(h)}if(h[1]){for(var o=h[0],r=h[1],n=f.multiple,w=f.ngOptions,q=!1,x,C=z(Y.createElement("option")),A=z(Y.createElement("optgroup")),s=C.clone(),h=0,y=i.children(),D=y.length;h<D;h++)if(y[h].value==""){x=q=y.eq(h);break}o.init(r,q,s);if(n&&(f.required||f.ngRequired)){var E=function(a){r.$setValidity("required",!f.required||a&&a.length);return a};r.$parsers.push(E);r.$formatters.unshift(E);f.$observe("required",function(){E(r.$viewValue)})}w?l(e,i,r):n?k(e,i,r):j(e,i,r,o)}}}}],Ud=["$interpolate",
function(a){var c={addOption:C,removeOption:C};return{restrict:"E",priority:100,compile:function(d,e){if(t(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var j=d.parent(),k=j.data("$selectController")||j.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Vd=H({restrict:"E",
terminal:!0});(ja=T.jQuery)?(z=ja,y(ja.fn,{scope:ta.scope,controller:ta.controller,injector:ta.injector,inheritedData:ta.inheritedData}),bb("remove",!0),bb("empty"),bb("html")):z=O;Zb.element=z;(function(a){y(a,{bootstrap:qb,copy:U,extend:y,equals:ha,element:z,forEach:m,injector:rb,noop:C,bind:Va,toJson:da,fromJson:ob,identity:ma,isUndefined:t,isDefined:v,isString:E,isFunction:L,isObject:M,isNumber:va,isElement:gc,isArray:I,version:hd,isDate:na,lowercase:D,uppercase:la,callbacks:{counter:0}});sa=
lc(T);try{sa("ngLocale")}catch(c){sa("ngLocale",[]).provider("$locale",Yc)}sa("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Cb).directive({a:id,input:cc,textarea:cc,form:jd,script:Rd,select:Td,style:Vd,option:Ud,ngBind:ud,ngBindHtmlUnsafe:wd,ngBindTemplate:vd,ngClass:xd,ngClassEven:zd,ngClassOdd:yd,ngCsp:Cd,ngCloak:Ad,ngController:Bd,ngForm:kd,ngHide:Kd,ngInclude:Ed,ngInit:Fd,ngNonBindable:Gd,ngPluralize:Hd,ngRepeat:Id,ngShow:Jd,ngSubmit:Dd,ngStyle:Ld,ngSwitch:Md,ngSwitchWhen:Nd,
ngSwitchDefault:Od,ngOptions:Sd,ngView:Qd,ngTransclude:Pd,ngModel:pd,ngList:rd,ngChange:qd,required:dc,ngRequired:dc,ngValue:td}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Ac,$document:Bc,$exceptionHandler:Cc,$filter:Qb,$interpolate:Dc,$http:Uc,$httpBackend:Vc,$location:Hc,$log:Ic,$parse:Mc,$route:Pc,$routeParams:Qc,$rootScope:Rc,$q:Nc,$sniffer:Sc,$templateCache:yc,$timeout:Zc,$window:Tc})}])})(Zb);z(Y).ready(function(){jc(Y,qb)})})(window,document);
angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,158 +0,0 @@
/*!
* Datepicker for Bootstrap
*
* Original Idea: http://www.eyecon.ro/bootstrap-datepicker (Copyright 2012 Stefan Petre)
* Updated by AymKdn (http://kodono.info - https://github.com/Aymkdn/Datepicker-for-Bootstrap)
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
top: 0;
left: 0;
padding: 4px;
margin-top: 1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker table {
width: 100%;
margin: 0;
}
.datepicker td, .datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker td.old, .datepicker td.new {
color: #999999;
}
.datepicker td.active, .datepicker td.active:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker td.active:hover,
.datepicker td.active:hover:hover,
.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active,
.datepicker td.active.disabled,
.datepicker td.active:hover.disabled,
.datepicker td.active[disabled],
.datepicker td.active:hover[disabled] {
background-color: #0044cc;
}
.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active {
background-color: #003399 \9;
}
.datepicker td span {
display: block;
width: 47px;
height: 54px;
line-height: 54px;
float: left;
margin: 2px;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker td span:hover {
background: #eeeeee;
}
.datepicker td span.active {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker td span.active:hover,
.datepicker td span.active:active,
.datepicker td span.active.active,
.datepicker td span.active.disabled,
.datepicker td span.active[disabled] {
background-color: #0044cc;
}
.datepicker td span.active:active, .datepicker td span.active.active {
background-color: #003399 \9;
}
.datepicker td span.old {
color: #999999;
}
.datepicker th.switch {
width: 145px;
}
.datepicker thead tr:first-child th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover {
background: #eeeeee;
}
.input-append.date .add-on i, .input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.dropdown-menu.datepicker { max-width:220px }

View File

@ -1,417 +0,0 @@
/*! =========================================================
* bootstrap-datepicker.js
* Original Idea: http://www.eyecon.ro/bootstrap-datepicker (Copyright 2012 Stefan Petre)
* Updated by AymKdn (http://kodono.info - https://github.com/Aymkdn/Datepicker-for-Bootstrap)
* =========================================================
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function( $ ) {
// Picker object
var Datepicker = function(element, options){
this.element = $(element);
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
this.picker = $(DPGlobal.template).appendTo('body').hide().on('mousedown.Datepicker',$.proxy(this.mousedown, this)).on('click.Datepicker',$.proxy(this.click, this));
this.isInput = this.element.is('input') || this.element.is('textarea');
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
if (this.isInput) {
this.element.on({
"focus.Datepicker": $.proxy(this.show, this),
"click.Datepicker": $.proxy(this.show, this),
"blur.Datepicker": $.proxy(this.blur, this),
"keyup.Datepicker": $.proxy(this.update, this),
"keydown.Datepicker": $.proxy(this.keydown, this)
});
} else {
if (this.component){
this.component.on('click.Datepicker', $.proxy(this.show, this));
} else {
this.element.on('click.Datepicker', $.proxy(this.show, this));
}
}
this.viewMode = 0;
this.weekStart = options.weekStart||this.element.data('date-weekstart')||0;
this.scroll = (options.scroll != undefined ? options.scroll : true);
this.weekEnd = this.weekStart == 0 ? 6 : this.weekStart - 1;
this.fillDow();
this.fillMonths();
this.update();
this.showMode();
};
Datepicker.prototype = {
constructor: Datepicker,
show: function(e) {
$('div.datepicker.dropdown-menu').hide(); //make sure to hide all other calendars
this.picker.show();
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
this.place();
$(window).on('resize.Datepicker', $.proxy(this.place, this));
$('body').on('click.Datepicker', $.proxy(this.hide, this));
if (e) {
e.stopPropagation();
e.preventDefault();
}
if (!this.isInput) {
$(document).on('mousedown.Datepicker', $.proxy(this.hide, this));
}
this.element.trigger({
type: 'show',
date: this.date
});
// make sure we see the datepicker
var elem = this.picker;
var docScrollTop = $(document).scrollTop();
var winHeight = $(window).height();
var elemTop = elem.position().top;
var elemHeight = elem.height();
if (this.scroll && docScrollTop+winHeight<elemTop+elemHeight)
$(document).scrollTop(elemTop-elemHeight);
},
setValue: function() {
var formated = DPGlobal.formatDate(this.date, this.format);
if (!this.isInput) {
if (this.component){
this.element.find('input').prop('value', formated);
}
this.element.data('date', formated);
} else {
this.element.prop('value', formated);
}
},
place: function(){
var offset = this.component ? this.component.offset() : this.element.offset();
this.picker.css({
top: offset.top + this.height,
left: offset.left
});
},
update: function(){
var date = this.element.val();
this.date = DPGlobal.parseDate(
date ? date : this.element.data('date'),
this.format
);
this.viewDate = new Date(this.date);
this.fill();
},
fillDow: function(){
var dowCnt = this.weekStart;
var html = '<tr>';
while (dowCnt < this.weekStart + 7) {
html += '<th class="dow">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';
}
html += '</tr>';
this.picker.find('.datepicker-days thead').append(html);
},
fillMonths: function(){
var html = '';
var i = 0
while (i < 12) {
html += '<span class="month">'+DPGlobal.dates.monthsShort[i++]+'</span>';
}
this.picker.find('.datepicker-months td').append(html);
},
fill: function() {
var d = new Date(this.viewDate),
year = d.getFullYear(),
month = d.getMonth(),
currentDate = this.date.valueOf();
this.picker.find('.datepicker-days th:eq(1)')
.text(DPGlobal.dates.months[month]+' '+year);
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
prevMonth.setDate(day);
prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);
var nextMonth = new Date(prevMonth);
nextMonth.setDate(nextMonth.getDate() + 42);
nextMonth = nextMonth.valueOf();
html = [];
var clsName;
while(prevMonth.valueOf() < nextMonth) {
if (prevMonth.getDay() == this.weekStart) {
html.push('<tr>');
}
clsName = '';
if (prevMonth.getMonth() < month) {
clsName += ' old';
} else if (prevMonth.getMonth() > month) {
clsName += ' new';
}
if (prevMonth.valueOf() == currentDate) {
clsName += ' active';
}
html.push('<td class="day'+clsName+'">'+prevMonth.getDate() + '</td>');
if (prevMonth.getDay() == this.weekEnd) {
html.push('</tr>');
}
prevMonth.setDate(prevMonth.getDate()+1);
}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
var currentYear = this.date.getFullYear();
var months = this.picker.find('.datepicker-months')
.find('th:eq(1)')
.text(year)
.end()
.find('span').removeClass('active');
if (currentYear == year) {
months.eq(this.date.getMonth()).addClass('active');
}
html = '';
year = parseInt(year/10, 10) * 10;
var yearCont = this.picker.find('.datepicker-years')
.find('th:eq(1)')
.text(year + '-' + (year + 9))
.end()
.find('td');
year -= 1;
for (var i = -1; i < 11; i++) {
html += '<span class="year'+(i == -1 || i == 10 ? ' old' : '')+(currentYear == year ? ' active' : '')+'">'+year+'</span>';
year += 1;
}
yearCont.html(html);
},
blur:function(e) {
},
hide: function(e){
this.picker.hide();
$(window).off('resize.Datepicker', this.place);
this.viewMode = 0;
this.showMode();
if (!this.isInput) {
$(document).off('mousedown.Datepicker', this.hide);
}
$('body').off('click.Datepicker',$.proxy(this.click, this));
},
click:function(e) {
e.stopPropagation();
e.preventDefault();
},
mousedown: function(e) {
e.stopPropagation();
e.preventDefault();
var target = $(e.target).closest('span, td, th');
if (target.length == 1) {
switch(target[0].nodeName.toLowerCase()) {
case 'th':
switch(target[0].className) {
case 'switch':
this.showMode(1);
break;
case 'prev':
case 'next':
this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(
this.viewDate,
this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) +
DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1)
);
this.fill();
break;
}
break;
case 'span':
if (target.is('.month')) {
var month = target.parent().find('span').index(target);
this.viewDate.setMonth(month);
} else {
var year = parseInt(target.text(), 10)||0;
this.viewDate.setFullYear(year);
}
this.showMode(-1);
this.fill();
break;
case 'td':
if (target.is('.day')){
var day = parseInt(target.text(), 10)||1;
var month = this.viewDate.getMonth();
if (target.is('.old')) {
month -= 1;
} else if (target.is('.new')) {
month += 1;
}
var year = this.viewDate.getFullYear();
this.date = new Date(year, month, day,0,0,0,0);
this.viewDate = new Date(year, month, day,0,0,0,0);
this.fill();
this.setValue();
this.element.trigger({
type: 'changeDate',
date: this.date
});
this.hide();
}
break;
}
}
},
keydown:function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode == 9) this.hide(); // when hiting TAB, for accessibility
},
showMode: function(dir) {
if (dir) {
this.viewMode = Math.max(0, Math.min(2, this.viewMode + dir));
}
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
},
destroy: function() { this.element.removeData("datepicker").off(".Datepicker"); this.picker.remove() }
};
$.fn.datepicker = function ( option ) {
return this.each(function () {
var $this = $(this),
data = $this.data('datepicker'),
options = typeof option == 'object' && option;
if (!data) {
$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
}
if (typeof option == 'string') data[option]();
});
};
$.fn.datepicker.defaults = {
};
$.fn.datepicker.Constructor = Datepicker;
var DPGlobal = {
modes: [
{
clsName: 'days',
navFnc: 'Month',
navStep: 1
},
{
clsName: 'months',
navFnc: 'FullYear',
navStep: 1
},
{
clsName: 'years',
navFnc: 'FullYear',
navStep: 10
}],
dates:{
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
},
isLeapYear: function (year) {
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
},
getDaysInMonth: function (year, month) {
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
},
parseFormat: function(format){
var separator = format.match(/[.\/-].*?/),
parts = format.split(/\W+/);
if (!separator || !parts || parts.length == 0){
throw new Error("Invalid date format.");
}
return {separator: separator, parts: parts};
},
parseDate: function(date, format) {
var today=new Date();
if (!date) date="";
var parts = date.split(format.separator),
date = new Date(today.getFullYear(),today.getMonth(),today.getDate(),0,0,0),
val;
if (parts.length == format.parts.length) {
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
val = parseInt(parts[i], 10)||1;
switch(format.parts[i]) {
case 'dd':
case 'd':
date.setDate(val);
break;
case 'mm':
case 'm':
date.setMonth(val - 1);
break;
case 'yy':
date.setFullYear(2000 + val);
break;
case 'yyyy':
date.setFullYear(val);
break;
}
}
}
return date;
},
formatDate: function(date, format){
var val = {
d: date.getDate(),
m: date.getMonth() + 1,
yy: date.getFullYear().toString().substring(2),
yyyy: date.getFullYear()
};
val.dd = (val.d < 10 ? '0' : '') + val.d;
val.mm = (val.m < 10 ? '0' : '') + val.m;
var date = [];
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
date.push(val[format.parts[i]]);
}
return date.join(format.separator);
},
headTemplate: '<thead>'+
'<tr>'+
'<th class="prev"><i class="icon-arrow-left"/></th>'+
'<th colspan="5" class="switch"></th>'+
'<th class="next"><i class="icon-arrow-right"/></th>'+
'</tr>'+
'</thead>',
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
};
DPGlobal.template = '<div class="datepicker dropdown-menu">'+
'<div class="datepicker-days">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'</div>';
}( window.jQuery )

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!--
{#
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
@ -13,176 +13,105 @@
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE html>
<html lang="fr" ng-app="$strap">
<head>
<!-- Title -->
<title>Entries</title>
<!-- Bootstrap CSS -->
<link href="third-party/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<!-- Bootstrap datepicker plugin CSS -->
<link href="third-party/datepicker/css/datepicker.css" rel="stylesheet" media="screen">
<!-- NVD3 CSS -->
<link href="third-party/nv.d3/nv.d3.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<!-- Navbar with accounts and menu -->
<div id="top-navbar" class="navbar navbar-fixed-top">
<div class="navbar-inner" ng-controller="AccountController">
<!-- Title -->
<a class="brand" href="#">&nbsp;Accountant</a>
<ul class="nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Comptes&nbsp;<span class="caret"></span></a>
<ul class="dropdown-menu">
<!-- Account list -->
<li class="dropdown-submenu" ng-repeat="account in accounts">
<a ng-class="accountClass(account)" ng-click="selectAccount(account)" href="#">{{account.name}}&nbsp;(<span ng-class="valueClass(account, account.current)">{{account.current}}</span>&nbsp;/&nbsp;<span ng-class="valueClass(account, account.pointed)">{{account.pointed}}</span>)</a>
<!-- Dropdown menu -->
<ul class="dropdown-menu">
<li><a href="#" ng-click="editAccount(account)" bs-modal="'templates/account_edit.html'">Modifier</a></li>
<li><a href="#" bs-modal="'templates/account_remove.html'">Supprimer</a></li>
</ul>
</li>
<li class="divider"></li>
<!-- New account button -->
<li>
<a bs-modal="'templates/account_new.html'" href="#">Ajouter un compte</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- Navbar with the months of the selected account -->
<div class="navbar navbar-fixed-bottom">
<div class="navbar-inner" ng-controller="MonthController">
<ul ng-repeat="month in months" class="nav">
<li ng-class="monthClass(month)"><a href="#" ng-click="selectMonth(month)">{{month.year}}-{{month.month}}</a></li>
</ul>
</div>
</div>
<!-- Emtpy row with top margin to avoid data under the fixed top navbar -->
<div id="top-navbar-margin" class="row-fluid" style="margin-top: 46px"></div>
<!-- Chart row -->
<div class="row-fluid">
<!-- Sold evolution chart placeholder -->
<div class="span8">
<div id="entries-chart-placeholder">
<svg style='height:300px'/>
</div>
</div>
<!-- Expense category piechart -->
<div class="span4">
<div id="expense-categories-chart-placeholder">
<svg style='height:300px'/>
</div>
</div>
</div>
<!-- Message placeholder -->
<div class="row-fluid">
<div id="message-placeholder"></div>
</div>
<!-- Row with entry table -->
<div class="row-fluid" ng-controller="EntryController">
<table class="table table-striped table-condensed table-hover">
<!-- Head of the table containing column headers and size -->
<thead>
<tr>
<th style="width: 100px">Date d'op.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th style="width: 50px">Montant</th>
<th style="width: 50px">Solde</th>
<th style="width: 100px">Cat&eacute;gorie</th>
<th style="width: 60px">Actions</th>
</tr>
</thead>
<!-- Body of the table containing the entries -->
<tbody>
<tr id="entry_{{entry.id}}" class="form-inline" ng-class="entryRowClass(entry.sold)" ng-repeat="entry in entries">
<td>
<input ng-show="isEditing(entry)" type="text" class="input-small" ng-model="entry.operation_date" data-date-format="yyyy-mm-dd" bs-datepicker/>
<span ng-show="isDisplaying(entry)">{{entry.operation_date}}</span>
</td>
<td>
<input ng-show="isEditing(entry)" type="text" class="input-xxlarge" ng-model="entry.label"/>
<span ng-show="isDisplaying(entry)">{{entry.label}}</span>
</td>
<td>
<input ng-show="isEditing(entry)" type="text" class="input-mini" ng-model="entry.value"/>
<span ng-show="isDisplaying(entry)">{{entry.value}}</span>
</td>
<td ng-class="entryValueClass(entry.sold)">{{entry.sold}}</td>
<td>
<input ng-show="isEditing(entry)" type="text" class="input-small" ng-model="entry.category" bs-typeahead="categories"/>
<span ng-show="isDisplaying(entry)">{{entry.category}}</span>
</td>
<td>
<div class="btn-group" ng-show="isEditing(entry)">
<a class="btn btn-mini btn-success" ng-click="saveEntry(entry)" href="#entry_{{entry.id}}" title="Save"><i ng-class="iconSaveClass(entry)"><span style="display: none">Save</span></i></a>
<a class="btn btn-mini" ng-click="cancelEditEntry(entry)" href="#entry_{{entry.id}}" title="Cancel"><i ng-class="iconCancelClass(entry)"><span style="display: none">Cancel</span></i></a>
<a class="btn btn-mini" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" href="#entry_{{entry.id}}" title="point"><i class="icon-pencil"><span style="display: none">Point</span></i></a>
</div>
<div class="btn-group" ng-show="isDisplaying(entry)">
<a class="btn btn-mini" ng-click="editEntry(entry)" href="#entry_{{entry.id}}" title="edit"><i class="icon-edit"><span style="display: none">Edit</span></i></a>
<a class="btn btn-mini" bs-modal="'templates/entry_remove.html'" href="#entry_{{entry.id}}" title="remove"><i class="icon-trash"><span style="display: none">Remove</span></i></a>
<a class="btn btn-mini" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" href="#entry_{{entry.id}}" title="point"><i class="icon-pencil"><span style="display: none">Point</span></i></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Emtpy row with bottom margin to avoid data under the fixed bottom navbar -->
<div class="row-fluid" style="margin-bottom: 21px"></div>
</div>
</div>
#}
{% extends "layout.html" %}
{% block body %}
<!-- Chart row -->
<div class="row-fluid">
<!-- Sold evolution chart placeholder -->
<div class="span8">
<div id="entries-chart-placeholder">
<svg style='height:300px'/>
</div>
</div>
<!-- JQuery Javascript library -->
<script type="text/javascript" src="third-party/jquery/jquery.js"></script>
<!-- Expense category piechart -->
<div class="span4">
<div id="expense-categories-chart-placeholder">
<svg style='height:300px'/>
</div>
</div>
</div>
<!-- Bootstrap Javascript library -->
<script type="text/javascript" src="third-party/bootstrap/js/bootstrap.min.js"></script>
<!-- Bootstrap datepicker module -->
<script type="text/javascript" src="third-party/datepicker/js/bootstrap-datepicker.js"></script>
<!-- Message placeholder -->
<div class="row-fluid">
<div id="message-placeholder"></div>
</div>
<!-- Angular Javascript library -->
<!--<script type="text/javascript" src="angular/angular.min.js"></script>-->
<script type="text/javascript" src="third-party/angular/angular.min.js"></script>
<script type="text/javascript" src="third-party/angular/angular-strap.min.js"></script>
<!-- Row with entry table -->
<div class="row-fluid">
<table class="table table-striped table-condensed table-hover" ng-controller="EntryController">
<!-- Head of the table containing column headers and size -->
<thead>
<tr>
<th style="width: 100px">Date d'op.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th style="width: 50px">Montant</th>
<th style="width: 50px">Solde</th>
<th style="width: 100px">Cat&eacute;gorie</th>
<th style="width: 60px">Actions</th>
</tr>
</thead>
<!-- D3 Plotting framework -->
<script type="text/javascript" src="third-party/d3/d3.js"></script>
<!-- Body of the table containing the entries -->
<tbody>
<tr id="entry_[[entry.id]]" class="form-inline" ng-class="entryRowClass(entry)" ng-repeat="entry in entries">
<td>
<small>
<input ng-show="isEditing(entry)" type="text" class="input-small" ng-model="entry.operation_date" data-date-format="yyyy-mm-dd" bs-datepicker/>
<span ng-show="isDisplaying(entry)">[[entry.operation_date]]</span>
</small>
</td>
<td>
<small>
<input ng-show="isEditing(entry)" type="text" class="input-xxlarge" ng-model="entry.label"/>
<span ng-show="isDisplaying(entry)">[[entry.label]]</span>
</small>
</td>
<td>
<small>
<input ng-show="isEditing(entry)" type="text" class="input-mini" ng-model="entry.value"/>
<span ng-show="isDisplaying(entry)">[[entry.value]]</span>
</small>
</td>
<td ng-class="entryValueClass(entry.sold)">
<small>
[[entry.sold]]
</small>
</td>
<td>
<small>
<input ng-show="isEditing(entry)" type="text" class="input-small" ng-model="entry.category" bs-typeahead="categories"/>
<span ng-show="isDisplaying(entry)">[[entry.category]]</span>
</small>
</td>
<td>
<div class="btn-group" ng-show="isEditing(entry)">
<a class="btn btn-mini btn-success" ng-click="saveEntry(entry)" href="#" title="Save"><i ng-class="iconSaveClass(entry)"><span style="display: none">Save</span></i></a>
<a class="btn btn-mini" ng-click="cancelEditEntry(entry)" href="#" title="Cancel"><i ng-class="iconCancelClass(entry)"><span style="display: none">Cancel</span></i></a>
<a class="btn btn-mini" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" href="#" title="point"><i class="icon-pencil"><span style="display: none">Point</span></i></a>
</div>
<div class="btn-group" ng-show="isDisplaying(entry) && isSaved(entry)">
<a class="btn btn-mini" ng-click="editEntry(entry)" href="#" title="edit"><i class="icon-edit"><span style="display: none">Edit</span></i></a>
<a class="btn btn-mini" bs-modal="'{{ url_for('static', filename='templates/entry_remove.html') }}'" href="#" title="remove"><i class="icon-trash"><span style="display: none">Remove</span></i></a>
<a class="btn btn-mini" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" href="#" title="point"><i class="icon-pencil"><span style="display: none">Point</span></i></a>
</div>
<div class="btn-group" ng-show="isDisplaying(entry) && !isSaved(entry)">
<a class="btn btn-mini btn-success" ng-click="saveEntry(entry)" href="#" title="Save"><i ng-class="iconSaveClass(entry)"><span style="display: none">Save</span></i></a>
<a class="btn btn-mini" ng-click="editEntry(entry)" href="#" title="edit"><i class="icon-edit"><span style="display: none">Edit</span></i></a>
<a class="btn btn-mini" ng-click="pointEntry(entry)" ng-class="pointedEntryClass(entry)" href="#" title="point"><i class="icon-pencil"><span style="display: none">Point</span></i></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}
<!-- NVD3 framework -->
<script type="text/javascript" src="third-party/nv.d3/nv.d3.js"></script>
<!-- Custom Javascript library for entries -->
<script type="text/javascript" src="js/months.js"></script>
<script type="text/javascript" src="js/accounts.js"></script>
<script type="text/javascript" src="js/entries.js"></script>
</body>
</html>
<!-- Custom Javascript library for entries -->
{% block js %}
<script type="text/javascript" src="{{ url_for('static', filename='js/months.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/accounts.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/entries.js') }}"></script>
{% endblock %}

117
src/templates/layout.html Normal file
View File

@ -0,0 +1,117 @@
{#
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
#}
<!DOCTYPE html>
<html lang="fr" ng-app="$strap">
<head>
<!-- Title -->
<title>Entries</title>
<!-- Bootstrap CSS -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<!-- Bootstrap datepicker plugin CSS -->
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.1.3/css/bootstrap-datepicker.min.css" rel="stylesheet">
<!-- NVD3 CSS -->
<link href="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.0.0-beta/nv.d3.css" rel="stylesheet">
<!-- main css -->
<link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
</head>
<body>
<!-- Navbar with the months of the selected account -->
<div class="navbar navbar-fixed-bottom">
<div class="navbar-inner" ng-controller="MonthController">
<ul ng-repeat="month in months" class="nav">
<li ng-class="monthClass(month)"><a href="#" ng-click="selectMonth(month)">[[month.year]]-[[month.month]]</a></li>
</ul>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div class="well well-small">
<!-- Navbar with accounts and menu -->
<ul class="nav nav-list" ng-controller="AccountController">
<li class="nav-header">Navigation</li>
<li class="{% if request.path == '/index.html' %}active{% endif %}"><a href="index.html">Opérations</li>
<li class="{% if request.path == '/scheduler.html' %}active{% endif %}"><a href="scheduler.html">Planification</li>
<!-- Account list -->
<li class="nav-header">Comptes</li>
<li ng-class="accountClass(account)" ng-repeat="account in accounts">
<a ng-click="selectAccount(account)" href="#">[[account.name]]
<br />
(<span ng-class="valueClass(account, account.current)">[[account.current]]</span>&nbsp;/&nbsp;<span ng-class="valueClass(account, account.pointed)">[[account.pointed]]</span>)
<div class="btn-group">
<button class="btn btn-mini" ng-click="editAccount(account)" bs-modal="'{{ url_for('static', filename='templates/account_edit.html') }}'"><i class="icon-edit"></i></button>
<button class="btn btn-mini" bs-modal="'{{ url_for('static', filename='templates/account_remove.html') }}'"><i class="icon-trash"></i></button>
</div>
</a>
</li>
<li class="divider"></li>
<!-- New account button -->
<li><a bs-modal="'{{ url_for('static', filename='templates/account_new.html') }}'" href="#">Ajouter un compte</a></li>
</ul><!-- nav -->
</div>
</div><!-- span2 -->
<div class="span10">
{% block body %}{% endblock %}
</div>
</div>
<!-- Emtpy row with bottom margin to avoid data under the fixed bottom navbar -->
<div class="row-fluid" style="margin-bottom: 21px"></div>
</div>
<!-- JQuery Javascript library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<!-- Bootstrap Javascript library -->
<script type="text/javascript" src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<!-- Bootstrap datepicker module -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.0.2/js/bootstrap-datepicker.min.js"></script>
<!-- Angular Javascript library -->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular-strap/0.7.4/angular-strap.js"></script>
<!-- D3 Plotting framework -->
<!--script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.2.2/d3.v3.js"></script-->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/d3/2.10.0/d3.v2.js"></script>
<!-- NVD3 framework -->
<!--script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.0.0-beta/nv.d3.js"></script-->
<script type="text/javascript" src="{{ url_for('static', filename='third-party/nv.d3/nv.d3.js') }}"></script>
<!-- Custom Javascript library for entries -->
{% block js %}{% endblock %}
<script type="text/javascript">
angular.module('$strap').config(function($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
</script>
</body>
</html>

View File

@ -0,0 +1,88 @@
{#
This file is part of Accountant.
Accountant is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "layout.html" %}
{% block body %}
<!-- Row with entry table -->
<div class="row-fluid" ng-controller="SchedulerController">
<table class="table table-striped table-condensed table-hover">
<!-- Head of the table containing column headers and size -->
<thead>
<tr>
<th style="width: 100px">Date de d&eacute;but</th>
<th style="width: 100px">Date de fin</th>
<th style="width: 50px">Jour</th>
<th style="width: 50px">Fr&eacute;q.</th>
<th>Libell&eacute; de l'op&eacute;ration</th>
<th style="width: 50px">Montant</th>
<th style="width: 100px">Cat&eacute;gorie</th>
<th style="width: 60px">Actions</th>
</tr>
</thead>
<!-- Body of the table containing the entries -->
<tbody>
<tr id="operation_[[operation.id]]" class="form-inline" ng-class="operationRowClass(operation.sold)" ng-repeat="operation in operations">
<td>
<input ng-show="isEditing(operation)" type="text" class="input-small" ng-model="operation.start_date" data-date-format="yyyy-mm-dd" bs-datepicker/>
<span ng-show="isDisplaying(operation)">[[operation.start_date]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-small" ng-model="operation.stop_date" data-date-format="yyyy-mm-dd" bs-datepicker/>
<span ng-show="isDisplaying(operation)">[[operation.stop_date]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-mini" ng-model="operation.day"/>
<span ng-show="isDisplaying(operation)">[[operation.day]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-mini" ng-model="operation.frequency"/>
<span ng-show="isDisplaying(operation)">[[operation.frequency]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-xxlarge" ng-model="operation.label"/>
<span ng-show="isDisplaying(operation)">[[operation.label]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-mini" ng-model="operation.value"/>
<span ng-show="isDisplaying(operation)">[[operation.value]]</span>
</td>
<td>
<input ng-show="isEditing(operation)" type="text" class="input-small" ng-model="operation.category" bs-typeahead="categories"/>
<span ng-show="isDisplaying(operation)">[[operation.category]]</span>
</td>
<td>
<div class="btn-group" ng-show="isEditing(operation)">
<a class="btn btn-mini btn-success" ng-click="saveOperation(operation)" href="#operation_[[operation.id]]" title="Save"><i ng-class="iconSaveClass(operation)"><span style="display: none">Save</span></i></a>
<a class="btn btn-mini" ng-click="cancelEditOperation(operation)" href="#operation_[[operation.id]]" title="Cancel"><i ng-class="iconCancelClass(operation)"><span style="display: none">Cancel</span></i></a>
</div>
<div class="btn-group" ng-show="isDisplaying(operation)">
<a class="btn btn-mini" ng-click="editOperation(operation)" href="#operation_[[operation.id]]" title="edit"><i class="icon-edit"><span style="display: none">Edit</span></i></a>
<a class="btn btn-mini" bs-modal="'{{ url_for('static', filename='templates/operation_remove.html') }}'" href="#operation_[[operation.id]]" title="remove"><i class="icon-trash"><span style="display: none">Remove</span></i></a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}
{% block js %}
<script type="text/javascript" src="{{ url_for('static', filename='js/months.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/accounts.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/scheduler.js') }}"></script>
{% endblock %}