text: /**
   * AngularUI - The companion suite for AngularJS
   * @version v0.2.0 - 2012-08-06
   * @link http://angular-ui.github.com
   * @license MIT License, http://www.opensource.org/licenses/MIT
   */
  angular.module("ui.config",[]).value("ui.config",{}),angular.module("ui.filters",["ui.config"]),angular.module("ui.directives",["ui.config"]),angular.module("ui",["ui.filters","ui.directives","ui.config"]),angular.module("ui.directives").directive("uiAnimate",["ui.config","$timeout",function(a,b){var c={};return angular.isString(a.animate)?c["class"]=a.animate:a.animate&&(c=a.animate),{restrict:"A",link:function(a,d,e){var f={};e.uiAnimate&&(f=a.$eval(e.uiAnimate),angular.isString(f)&&(f={"class":f})),f=angular.extend({"class":"ui-animate"},c,f),d.addClass(f["class"]),b(function(){d.removeClass(f["class"])},!1)}}}]),angular.module("ui.directives").directive("uiCodemirror",["ui.config","$parse",function(a,b){return"use strict",a.codemirror=a.codemirror||{},{require:"ngModel",link:function(c,d,e,f){if(!d.is("textarea"))throw new Error("ui-codemirror can only be applied to a textarea element");var g,h=b(e.uiCodemirror),i=function(a){var b=a.getValue();b!==f.$viewValue&&(f.$setViewValue(b),c.$apply())},j=function(b){b=angular.extend({},b,a.codemirror);var c=b.onChange;c?b.onChange=function(a){i(a),c(a)}:b.onChange=i,g&&g.toTextArea(),g=CodeMirror.fromTextArea(d[0],b)};j(h()),c.$watch(h,j,!0),f.$formatters.push(function(a){if(angular.isUndefined(a)||a===null)return"";if(angular.isObject(a)||angular.isArray(a))throw new Error("ui-codemirror cannot use an object or an array as a model");return a}),f.$render=function(){g.setValue(f.$viewValue)}}}}]),angular.module("ui.directives").directive("uiCurrency",["ui.config","currencyFilter",function(a,b){var c={pos:"ui-currency-pos",neg:"ui-currency-neg",zero:"ui-currency-zero"};return a.currency&&angular.extend(c,a.currency),{restrict:"EAC",require:"ngModel",link:function(a,d,e,f){var g,h,i;g=angular.extend({},c,a.$eval(e.uiCurrency)),h=function(a){var c;return c=a*1,c>0?d.addClass(g.pos):d.removeClass(g.pos),c<0?d.addClass(g.neg):d.removeClass(g.neg),c===0?d.addClass(g.zero):d.removeClass(g.zero),a===""?d.text(""):d.text(b(c,g.symbol)),!0},f.$render=function(){i=f.$viewValue,d.val(i),h(i)}}}}]),angular.module("ui.directives").directive("uiDate",["ui.config",function(a){var b;return b={},a.date!=null&&angular.extend(b,a.date),{require:"?ngModel",link:function(a,c,d,e){var f,g,h;return f=angular.extend({},b,a.$eval(d.uiDate)),e!=null&&(g=function(b,d){return a.$apply(function(){return e.$setViewValue(c.datepicker("getDate"))})},f.onSelect!=null?(h=f.onSelect,f.onSelect=function(a,b){return g(a),h(a,b)}):f.onSelect=g,e.$render=function(){var a;return a=e.$viewValue,a instanceof Date||(a=new Date(a)),c.datepicker("setDate",a)}),c.datepicker(f)}}}]),angular.module("ui.directives").directive("uiEvent",["$parse",function(a){return function(b,c,d){var e=b.$eval(d.uiEvent);angular.forEach(e,function(d,e){var f=a(d);c.bind(e,function(a){var c=Array.prototype.slice.call(arguments);c=c.splice(1),b.$apply(function(){f(b,{$event:a,$params:c})})})})}}]),angular.module("ui.directives").directive("uiIf",[function(){return{transclude:"element",priority:1e3,terminal:!0,restrict:"A",compile:function(a,b,c){return function(a,b,d){b[0].doNotMove=!0;var e=d.uiIf,f,g;a.$watch(e,function(d){f&&(f.remove(),f=null),g&&g.$destroy(),d&&(g=a.$new(),c(g,function(a){f=a,b.after(a)})),b.parent().trigger("$childrenChanged")})}}}}]),angular.module("ui.directives").directive("uiJq",["ui.config",function(a){return{restrict:"A",compile:function(b,c){if(!angular.isFunction(b[c.uiJq]))throw new Error('ui-jq: The "'+c.uiJq+'" function does not exist');var d=a.jq&&a.jq[c.uiJq];return function(a,b,c){var e=[],f="change";c.uiOptions?(e=a.$eval("["+c.uiOptions+"]"),angular.isObject(d)&&angular.isObject(e[0])&&(e[0]=angular.extend(d,e[0]))):d&&(e=[d]),c.ngModel&&b.is("select,input,textarea")&&(e&&angular.isObject(e[0])&&e[0].ngChange!==undefined&&(f=e[0].ngChange),f&&b.on(f,function(){b.trigger("input")})),b[c.uiJq].apply(b,e)}}}}]),angular.module("ui.directives").directive("uiKeypress",["$parse",function(a){return{link:function(b,c,d){var e={8:"backspace",9:"tab",13:"enter",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete"},f,g,h,i,j=[];try{f=b.$eval(d.uiKeypress),g=!0}catch(k){f=d.uiKeypress.split(/\s+and\s+/i),g=!1}angular.forEach(f,function(b,c){var d={};g?(d.expression=a(b),d.keys=c):(b=b.split(/\s+on\s+/i),d.expression=a(b[0]),d.keys=b[1]),i={},angular.forEach(d.keys.split("-"),function(a){i[a]=!0}),d.keys=i,j.push(d)}),c.bind("keydown",function(a){var c=a.metaKey||a.altKey,d=a.ctrlKey,f=a.shiftKey;angular.forEach(j,function(g){var h=g.keys[e[a.keyCode]]||g.keys[a.keyCode.toString()]||!1,i=g.keys.alt||!1,j=g.keys.ctrl||!1,k=g.keys.shift||!1;h&&i==c&&j==d&&k==f&&b.$apply(function(){g.expression(b,{$event:a})})})})}}}]),function(){function b(a,b,c,d){angular.forEach(b.split(" "),function(b){var e={type:"map-"+b};google.maps.event.addListener(c,b,function(b){d.trigger(angular.extend({},e,b)),a.$$phase||a.$apply()})})}function c(c,d){a.directive(c,[function(){return{restrict:"A",link:function(a,e,f){a.$watch(f[c],function(c){b(a,d,c,e)})}}}])}var a=angular.module("ui.directives");a.directive("uiMap",["ui.config","$parse",function(a,c){var d="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed",e=a.map||{};return{restrict:"A",link:function(a,f,g){var h=angular.extend({},e,a.$eval(g.uiOptions)),i=new google.maps.Map(f[0],h),j=c(g.uiMap);j.assign(a,i),b(a,d,i,f)}}}]),a.directive("uiMapInfoWindow",["ui.config","$parse","$compile",function(a,c,d){var e="closeclick content_change domready position_changed zindex_changed",f=a.mapInfoWindow||{};return{link:function(a,g,h){var i=angular.extend({},f,a.$eval(h.uiOptions));i.content=g[0];var j=c(h.uiMapInfoWindow),k=j(a);k||(k=new google.maps.InfoWindow(i),j.assign(a,k)),b(a,e,k,g),g.replaceWith("<div></div>");var l=k.open;k.open=function(b,c,e,f,h,i){d(g.contents())(a),l.call(k,b,c,e,f,h,i)}}}}]),c("uiMapMarker","animation_changed click clickable_changed cursor_changed dblclick drag dragend draggable_changed dragstart flat_changed icon_changed mousedown mouseout mouseover mouseup position_changed rightclick shadow_changed shape_changed title_changed visible_changed zindex_changed"),c("uiMapPolyline","click dblclick mousedown mousemove mouseout mouseover mouseup rightclick"),c("uiMapPolygon","click dblclick mousedown mousemove mouseout mouseover mouseup rightclick"),c("uiMapRectangle","bounds_changed click dblclick mousedown mousemove mouseout mouseover mouseup rightclick"),c("uiMapCircle","center_changed click dblclick mousedown mousemove mouseout mouseover mouseup radius_changed rightclick"),c("uiMapGroundOverlay","click dblclick")}(),angular.module("ui.directives").directive("uiMask",[function(){return{require:"ngModel",scope:{uiMask:"="},link:function(a,b,c,d){return d.$render=function(){var c;return c=d.$viewValue||"",b.val(c),b.mask(a.uiMask)},d.$parsers.push(function(a){var c;return c=b.data("mask-isvalid"),d.$setValidity("mask",c),b.mask()}),b.bind("keyup",function(){return a.$apply(function(){return d.$setViewValue(b.mask())})})}}}]),angular.module("ui.directives").directive("uiModal",["$timeout",function(a){return{restrict:"EAC",require:"ngModel",link:function(b,c,d,e){c.addClass("modal hide"),b.$watch(d.ngModel,function(a){c.modal(a&&"show"||"hide")}),c.on("show.ui",function(){a(function(){e.$setViewValue(!0)})}),c.on("hide.ui",function(){a(function(){e.$setViewValue(!1)})})}}}]),angular.module("ui.directives").directive("uiReset",["$parse",function(a){return{require:"ngModel",link:function(a,b,c,d){b.wrap('<span class="ui-resetwrap" />').after('<a class="ui-reset" />').next().click(function(b){b.preventDefault(),a.$apply(function(){d.$setViewValue(null)})})}}}]),angular.module("ui.directives").directive("uiScrollfix",["$window",function(a){return"use strict",{link:function(b,c,d){var e=c.offset().top;d.uiScrollfix?d.uiScrollfix.charAt(0)==="-"?d.uiScrollfix=e-d.uiScrollfix.substr(1):d.uiScrollfix.charAt(0)==="+"&&(d.uiScrollfix=e+parseFloat(d.uiScrollfix.substr(1))):d.uiScrollfix=e,angular.element(a).on("scroll.ui-scrollfix",function(){var b;if(angular.isDefined(a.pageYOffset))b=a.pageYOffset;else{var e=document.compatMode&&document.compatMode!=="BackCompat"?document.documentElement:document.body;b=e.scrollTop}!c.hasClass("ui-scrollfix")&&b>d.uiScrollfix?c.addClass("ui-scrollfix"):c.hasClass("ui-scrollfix")&&b<d.uiScrollfix&&c.removeClass("ui-scrollfix")})}}}]),angular.module("ui.directives").directive("uiSelect2",["ui.config","$http",function(a,b){var c={};return a.select2&&angular.extend(c,a.select2),{require:"?ngModel",compile:function(a,b){var d,e,f=a.is("select"),g=b.multiple!==undefined;return a.is("select")&&(e=a.find("option[ng-repeat]"),e.length&&(d=e.attr("ng-repeat").split(" ").pop())),function(a,b,e,h){var i=angular.extend({},c,a.$eval(e.uiSelect2));f?(delete i.multiple,delete i.initSelection):g&&(i.multiple=!0);if(h){h.$render=function(){f?b.select2("val",h.$modelValue):g&&!h.$modelValue?b.select2("data",[]):b.select2("data",h.$modelValue)},d&&a.$watch(d,function(a,c,d){if(!a)return;setTimeout(function(){b.select2("val",h.$viewValue),b.trigger("change")})});if(!f){b.bind("change",function(){a.$apply(function(){h.$setViewValue(b.select2("data"))})});if(i.initSelection){var j=i.initSelection;i.initSelection=function(a,b){j(a,function(a){h.$setViewValue(a),b(a)})}}}}e.$observe("disabled",function(a){b.select2(a&&"disable"||"enable")}),b.val(a.$eval(e.ngModel)),setTimeout(function(){b.select2(i)})}}}}]),angular.module("ui.directives").directive("uiShow",[function(){return function(a,b,c){a.$watch(c.uiShow,function(a,c){a?b.addClass("ui-show"):b.removeClass("ui-show")})}}]).directive("uiHide",[function(){return function(a,b,c){a.$watch(c.uiHide,function(a,c){a?b.addClass("ui-hide"):b.removeClass("ui-hide")})}}]).directive("uiToggle",[function(){return function(a,b,c){a.$watch(c.uiToggle,function(a,c){a?b.removeClass("ui-hide").addClass("ui-show"):b.removeClass("ui-show").addClass("ui-hide")})}}]),angular.module("ui.directives").directive("uiSortable",["ui.config",function(a){var b;return b={},a.sortable!=null&&angular.extend(b,a.sortable),{require:"?ngModel",link:function(a,c,d,e){var f,g,h,i,j;return h=angular.extend({},b,a.$eval(d.uiOptions)),e!=null&&(f=function(a,b){return b.item.data("ui-sortable-start",b.item.index())},g=function(b,c){var d,f;return f=c.item.data("ui-sortable-start"),d=c.item.index(),e.$modelValue.splice(d,0,e.$modelValue.splice(f,1)[0]),a.$apply()},i=h.start,h.start=function(b,c){return f(b,c),typeof i=="function"&&i(b,c),a.$apply()},j=h.update,h.update=function(b,c){return g(b,c),typeof j=="function"&&j(b,c),a.$apply()}),c.sortable(h)}}}]),angular.module("ui.directives").directive("uiTinymce",["ui.config",function(a){return a.tinymce=a.tinymce||{},{require:"ngModel",link:function(b,c,d,e){var f,g={onchange_callback:function(a){a.isDirty()&&(a.save(),e.$setViewValue(c.val()),b.$apply())},handle_event_callback:function(a){return this.isDirty()&&(this.save(),e.$setViewValue(c.val()),b.$apply()),!0},setup:function(a){a.onSetContent.add(function(a,d){a.isDirty()&&(a.save(),e.$setViewValue(c.val()),b.$apply())})}};d.uiTinymce?f=b.$eval(d.uiTinymce):f={},angular.extend(g,a.tinymce,f),setTimeout(function(){c.tinymce(g)})}}}]),angular.module("ui.directives").directive("uiValidate",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){var e,f=c.uiValidate;f=a.$eval(f);if(!f)return;angular.isFunction(f)&&(f={validator:f}),angular.forEach(f,function(a,b){e=function(c){return a(c)?(d.$setValidity(b,!0),c):(d.$setValidity(b,!1),undefined)},d.$formatters.push(e),d.$parsers.push(e)})}}}),angular.module("ui.filters").filter("highlight",function(){return function(a,b,c){return b||angular.isNumber(b)?(a=a.toString(),b=b.toString(),c?a.split(b).join('<span class="ui-match">'+b+"</span>"):a.replace(new RegExp(b,"gi"),'<span class="ui-match">$&</span>')):a}}),angular.module("ui.filters").filter("inflector",function(){function a(a){return a.replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function b(a,b){return a.replace(/[A-Z]/g,function(a){return b+a})}var c={humanize:function(c){return a(b(c," ").split("_").join(" "))},underscore:function(a){return a.substr(0,1).toLowerCase()+b(a.substr(1),"_").toLowerCase().split(" ").join("_")},variable:function(b){return b=b.substr(0,1).toLowerCase()+a(b.split("_").join(" ")).substr(1).split(" ").join(""),b}};return function(a,b,d){return b!==!1&&angular.isString(a)?(b=b||"humanize",c[b](a)):a}}),angular.module("ui.filters").filter("unique",function(){return function(a,b){if(b===!1)return a;if((b||angular.isUndefined(b))&&angular.isArray(a)){var c={},d=[],e=function(a){return angular.isObject(a)&&angular.isString(b)?a[b]:a};angular.forEach(a,function(a){var b,c=!1;for(var f=0;f<d.length;f++)if(angular.equals(e(d[f]),e(a))){c=!0;break}c||d.push(a)}),a=d}return a}});