Post Thumbnail Editor - Version 2.4.2

Version Description

  • Fix CSRF vulnerabilities. Thanks to J.D. Grimes for reporting them.
Download this release

Release Info

Developer sewpafly
Plugin Icon Post Thumbnail Editor
Version 2.4.2
Comparing to
See all releases

Code changes from version 2.4.1 to 2.4.2

README.txt CHANGED
@@ -75,6 +75,9 @@ If you want to post a problem on the [support forums][wp] or at [github][gh] ple
75
 
76
  == Changelog ==
77
 
 
 
 
78
  = 2.4.1 =
79
  * Bug fixes: see issues #100, #101, #102 on github
80
  * Bump wordpress compatibility
@@ -176,5 +179,5 @@ If you want to post a problem on the [support forums][wp] or at [github][gh] ple
176
 
177
  == Upgrade Notice ==
178
 
179
- = 2.4.1 =
180
- Several bug fixes since 2.4.0, wordpress 4.0 compatible
75
 
76
  == Changelog ==
77
 
78
+ = 2.4.2 =
79
+ * Fix CSRF vulnerabilities. Thanks to [J.D. Grimes](http://codesymphony.co/) for reporting them.
80
+
81
  = 2.4.1 =
82
  * Bug fixes: see issues #100, #101, #102 on github
83
  * Bump wordpress compatibility
179
 
180
  == Upgrade Notice ==
181
 
182
+ = 2.4.2 =
183
+ Patched CSRF vulnerabilities
html/pte.php CHANGED
@@ -17,6 +17,8 @@ function u( $path ){
17
  var post_id = <?php echo $post->ID; ?>
18
  , post_width = <?php echo $meta['width']; ?>
19
  , post_height = <?php echo $meta['height']; ?>
 
 
20
  , pteI18n = <?php echo json_encode(
21
  array( 'no_t_selected' => __( 'No thumbnails selected', PTE_DOMAIN )
22
  , 'no_c_selected' => __( 'No crop selected', PTE_DOMAIN )
17
  var post_id = <?php echo $post->ID; ?>
18
  , post_width = <?php echo $meta['width']; ?>
19
  , post_height = <?php echo $meta['height']; ?>
20
+ , pte_nonce = "<?php echo wp_create_nonce("pte-resize-{$post->ID}"); ?>"
21
+ , pte_options_nonce = "<?php echo wp_create_nonce("pte-options"); ?>"
22
  , pteI18n = <?php echo json_encode(
23
  array( 'no_t_selected' => __( 'No thumbnails selected', PTE_DOMAIN )
24
  , 'no_c_selected' => __( 'No crop selected', PTE_DOMAIN )
js-build/main.js CHANGED
@@ -17,4 +17,4 @@
17
  * https://github.com/tapmodo/Jcrop
18
  */
19
 
20
- (function(){var e,t,n;(function(r){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(e){if(d(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!d(a,e)&&!d(c,e))throw new Error("No "+e);return a[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(e,t,n,i){var s,l,h,p,v,g=[],w=typeof n,E;i=i||e;if(w==="undefined"||w==="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(v=0;v<t.length;v+=1){p=o(t[v],i),l=p.f;if(l==="require")g[v]=u.require(e);else if(l==="exports")g[v]=u.exports(e),E=!0;else if(l==="module")s=g[v]=u.module(e);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=n?n.apply(a[e],g):undefined;if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!E)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){return typeof e=="string"?u[e]?u[e](t):b(o(e,t).f):(e.splice||(l=e,t.splice?(e=t,t=n,n=null):e=r),t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},e._defined=a,n=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}})(),n("../apps/requirejs/almond",function(){}),n("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){n("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e){return function(){for(var t=arguments[0],n=1,t="["+(e?e+":":"")+t+"] http://errors.angularjs.org/1.2.1/"+(e?e+"/":"")+t;n<arguments.length;n++)t=t+(1==n?"?":"&")+"p"+(n-1)+"="+encodeURIComponent("function"==typeof arguments[n]?arguments[n].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[n]?"undefined":"string"!=typeof arguments[n]?JSON.stringify(arguments[n]):arguments[n]);return Error(t)}}function i(e){if(null==e||C(e))return!1;var t=e.length;return 1===e.nodeType&&t?!0:w(e)||x(e)||0===t||"number"==typeof t&&0<t&&t-1 in e}function s(e,t,n){var r;if(e)if(T(e))for(r in e)"prototype"!=r&&"length"!=r&&"name"!=r&&e.hasOwnProperty(r)&&t.call(n,e[r],r);else if(e.forEach&&e.forEach!==s)e.forEach(t,n);else if(i(e))for(r=0;r<e.length;r++)t.call(n,e[r],r);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r);return e}function o(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function u(e,t,n){for(var r=o(e),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function a(e){return function(t,n){e(n,t)}}function f(){for(var e=$n.length,t;e;){e--,t=$n[e].charCodeAt(0);if(57==t)return $n[e]="A",$n.join("");if(90!=t)return $n[e]=String.fromCharCode(t+1),$n.join("");$n[e]="0"}return $n.unshift("0"),$n.join("")}function l(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function c(e){var t=e.$$hashKey;return s(arguments,function(t){t!==e&&s(t,function(t,n){e[n]=t})}),l(e,t),e}function h(e){return parseInt(e,10)}function p(e,t){return c(new(c(function(){},{prototype:e})),t)}function d(){}function v(e){return e}function m(e){return function(){return e}}function g(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!=e&&"object"==typeof e}function w(e){return"string"==typeof e}function E(e){return"number"==typeof e}function S(e){return"[object Date]"==Un.apply(e)}function x(e){return"[object Array]"==Un.apply(e)}function T(e){return"function"==typeof e}function N(e){return"[object RegExp]"==Un.apply(e)}function C(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function k(e){return e&&(e.nodeName||e.on&&e.find)}function L(e,t,n){var r=[];return s(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r}function A(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function O(e,t){var n=A(e,t);return 0<=n&&e.splice(n,1),t}function M(e,t){if(C(e)||e&&e.$evalAsync&&e.$watch)throw zn("cpws");if(t){if(e===t)throw zn("cpi");if(x(e))for(var n=t.length=0;n<e.length;n++)t.push(M(e[n]));else{n=t.$$hashKey,s(t,function(e,n){delete t[n]});for(var r in e)t[r]=M(e[r]);l(t,n)}}else(t=e)&&(x(e)?t=M(e,[]):S(e)?t=new Date(e.getTime()):N(e)?t=RegExp(e.source):b(e)&&(t=M(e,{})));return t}function _(e,t){t=t||{};for(var n in e)e.hasOwnProperty(n)&&"$$"!==n.substr(0,2)&&(t[n]=e[n]);return t}function D(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&"object"==r){if(!x(e)){if(S(e))return S(t)&&e.getTime()==t.getTime();if(N(e)&&N(t))return e.toString()==t.toString();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||C(e)||C(t)||x(t))return!1;r={};for(i in e)if("$"!==i.charAt(0)&&!T(e[i])){if(!D(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!T(t[i]))return!1;return!0}if(!x(t))return!1;if((r=e.length)==t.length){for(i=0;i<r;i++)if(!D(e[i],t[i]))return!1;return!0}}return!1}function P(){return t.securityPolicy&&t.securityPolicy.isActive||t.querySelector&&(!!t.querySelector("[ng-csp]")||!!t.querySelector("[data-ng-csp]"))}function H(e,t){var n=2<arguments.length?qn.call(arguments,2):[];return!T(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(qn.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function B(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)?i=n:C(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function j(e,t){return"undefined"==typeof e?n:JSON.stringify(e,B,t?" ":null)}function F(e){return w(e)?JSON.parse(e):e}function I(e){return e&&0!==e.length?(e=Hn(""+e),e="f"!=e&&"0"!=e&&"false"!=e&&"no"!=e&&"n"!=e&&"[]"!=e):e=!1,e}function q(e){e=Fn(e).clone();try{e.html("")}catch(t){}var n=Fn("<div>").append(e).html();try{return 3===e[0].nodeType?Hn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Hn(t)})}catch(r){return Hn(n)}}function R(e){try{return decodeURIComponent(e)}catch(t){}}function U(e){var t={},n,r;return s((e||"").split("&"),function(e){e&&(n=e.split("="),r=R(n[0]),y(r)&&(e=y(n[1])?R(n[1]):!0,t[r]?x(t[r])?t[r].push(e):t[r]=[t[r],e]:t[r]=e))}),t}function z(e){var t=[];return s(e,function(e,n){x(e)?s(e,function(e){t.push(X(n,!0)+(!0===e?"":"="+X(e,!0)))}):t.push(X(n,!0)+(!0===e?"":"="+X(e,!0)))}),t.length?t.join("&"):""}function W(e){return X(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function X(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function V(e,n){function r(e){e&&i.push(e)}var i=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;s(a,function(n){a[n]=!0,r(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(s(e.querySelectorAll("."+n),r),s(e.querySelectorAll("."+n+"\\:"),r),s(e.querySelectorAll("["+n+"]"),r))}),s(i,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):s(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function $(n,r){var i=function(){n=Fn(n);if(n.injector()){var e=n[0]===t?"document":q(n);throw zn("btstrpd",e)}return r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.unshift("ng"),e=Et(r),e.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(e,t,n,r,i){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},o=/^NG_DEFER_BOOTSTRAP!/;if(e&&!o.test(e.name))return i();e.name=e.name.replace(o,""),Wn.resumeBootstrap=function(e){s(e,function(e){r.push(e)}),i()}}function J(e,t){return t=t||"_",e.replace(Kn,function(e,n){return(n?t:"")+e.toLowerCase()})}function K(e,t,n){if(!e)throw zn("areq",t||"?",n||"required");return e}function Q(e,t,n){return n&&x(e)&&(e=e[e.length-1]),K(T(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function G(e,t){if("hasOwnProperty"===e)throw zn("badname",t)}function Y(e,t,n){if(!t)return e;t=t.split(".");for(var r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&T(e)?H(i,e):e}function Z(e){if(e.startNode===e.endNode)return Fn(e.startNode);var t=e.startNode,n=[t];do{t=t.nextSibling;if(!t)break;n.push(t)}while(t!==e.endNode);return Fn(n)}function et(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng");return t(t(e,"angular",Object),"module",function(){var e={};return function(r,s,o){if("hasOwnProperty"===r)throw i("badname","module");return s&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),a}}if(!s)throw n("nomod",r);var t=[],i=[],u=e("$injector","invoke"),a={_invokeQueue:t,_runBlocks:i,requires:s,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:u,run:function(e){return i.push(e),this}};return o&&u(o),a})}})}function tt(e){return e.replace(nr,function(e,t,n,r){return r?n.toUpperCase():n}).replace(rr,"Moz$1")}function nt(e,t,n,r){function i(e){var i=n&&e?[this.filter(e)]:[this],o=t,u,a,f,l,c,h;if(!r||null!=e)for(;i.length;)for(u=i.shift(),a=0,f=u.length;a<f;a++)for(l=Fn(u[a]),o?l.triggerHandler("$destroy"):o=!o,c=0,l=(h=l.children()).length;c<l;c++)i.push(In(h[c]));return s.apply(this,arguments)}var s=In.fn[e],s=s.$original||s;i.$original=s,In.fn[e]=i}function rt(e){if(e instanceof rt)return e;if(!(this instanceof rt)){if(w(e)&&"<"!=e.charAt(0))throw ir("nosel");return new rt(e)}if(w(e)){var n=t.createElement("div");n.innerHTML="<div>&#160;</div>"+e,n.removeChild(n.firstChild),pt(this,n.childNodes),Fn(t.createDocumentFragment()).append(this)}else pt(this,e)}function it(e){return e.cloneNode(!0)}function st(e){ut(e);var t=0;for(e=e.childNodes||[];t<e.length;t++)st(e[t])}function ot(e,t,n,r){if(y(r))throw ir("offargs");var i=at(e,"events");at(e,"handle")&&(g(t)?s(i,function(t,n){tr(e,n,t),delete i[n]}):s(t.split(" "),function(t){g(n)?(tr(e,t,i[t]),delete i[t]):O(i[t]||[],n)}))}function ut(e,t){var r=e[Yn],i=Gn[r];i&&(t?delete Gn[r].data[t]:(i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),ot(e)),delete Gn[r],e[Yn]=n))}function at(e,t,n){var r=e[Yn],r=Gn[r||-1];if(!y(n))return r&&r[t];r||(e[Yn]=r=++Zn,r=Gn[r]={}),r[t]=n}function ft(e,t,n){var r=at(e,"data"),i=y(n),s=!i&&y(t),o=s&&!b(t);r||o||at(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];c(r,t)}}function lt(e,t){return e.getAttribute?-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" "):!1}function ct(e,t){t&&e.setAttribute&&s(t.split(" "),function(t){e.setAttribute("class",Jn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Jn(t)+" "," ")))})}function ht(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");s(t.split(" "),function(e){e=Jn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Jn(n))}}function pt(e,t){if(t){t=t.nodeName||!y(t.length)||C(t)?[t]:t;for(var n=0;n<t.length;n++)e.push(t[n])}}function dt(e,t){return vt(e,"$"+(t||"ngController")+"Controller")}function vt(e,t,r){e=Fn(e),9==e[0].nodeType&&(e=e.find("html"));for(t=x(t)?t:[t];e.length;){for(var i=0,s=t.length;i<s;i++)if((r=e.data(t[i]))!==n)return r;e=e.parent()}}function mt(e,t){var n=or[t.toLowerCase()];return n&&ur[e.nodeName]&&n}function gt(e,n){var r=function(r,i){r.preventDefault||(r.preventDefault=function(){r.returnValue=!1}),r.stopPropagation||(r.stopPropagation=function(){r.cancelBubble=!0}),r.target||(r.target=r.srcElement||t);if(g(r.defaultPrevented)){var o=r.preventDefault;r.preventDefault=function(){r.defaultPrevented=!0,o.call(r)},r.defaultPrevented=!1}r.isDefaultPrevented=function(){return r.defaultPrevented||!1===r.returnValue},s(n[i||r.type],function(t){t.call(e,r)}),8>=jn?(r.preventDefault=null,r.stopPropagation=null,r.isDefaultPrevented=null):(delete r.preventDefault,delete r.stopPropagation,delete r.isDefaultPrevented)};return r.elem=e,r}function yt(e){var t=typeof e,r;return"object"==t&&null!==e?"function"==typeof (r=e.$$hashKey)?r=e.$$hashKey():r===n&&(r=e.$$hashKey=f()):r=e,t+":"+r}function bt(e){s(e,this.put,this)}function wt(e){var t,n;return"function"==typeof e?(t=e.$inject)||(t=[],e.length&&(n=e.toString().replace(cr,""),n=n.match(ar),s(n[1].split(fr),function(e){e.replace(lr,function(e,n,r){t.push(r)})})),e.$inject=t):x(e)?(n=e.length-1,Q(e[n],"fn"),t=e.slice(0,n)):Q(e,"fn",!0),t}function Et(e){function t(e){return function(t,n){if(!b(t))return e(t,n);s(t,a(e))}}function n(e,t){G(e,"service");if(T(t)||x(t))t=p.instantiate(t);if(!t.$get)throw hr("pget",e);return h[e+f]=t}function r(e,t){return n(e,{$get:t})}function i(e){var t=[],n,r,o,u;return s(e,function(e){if(!c.get(e)){c.put(e,!0);try{if(w(e))for(n=Xn(e),t=t.concat(i(n.requires)).concat(n._runBlocks),r=n._invokeQueue,o=0,u=r.length;o<u;o++){var s=r[o],a=p.get(s[0]);a[s[1]].apply(a,s[2])}else T(e)?t.push(p.invoke(e)):x(e)?t.push(p.invoke(e)):Q(e,"module")}catch(f){throw x(e)&&(e=e[e.length-1]),f.message&&f.stack&&-1==f.stack.indexOf(f.message)&&(f=f.message+"\n"+f.stack),hr("modulerr",e,f.stack||f.message||f)}}}),t}function o(e,t){function n(n){if(e.hasOwnProperty(n)){if(e[n]===u)throw hr("cdep",l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=u,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=wt(e),o,u,a;u=0;for(o=s.length;u<o;u++){a=s[u];if("string"!=typeof a)throw hr("itkn",a);i.push(r&&r.hasOwnProperty(a)?r[a]:n(a))}e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(x(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),b(i)||T(i)?i:n},get:n,annotate:wt,has:function(t){return h.hasOwnProperty(t+f)||e.hasOwnProperty(t)}}}var u={},f="Provider",l=[],c=new bt,h={$provide:{provider:t(n),factory:t(r),service:t(function(e,t){return r(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return r(e,m(t))}),constant:t(function(e,t){G(e,"constant"),h[e]=t,v[e]=t}),decorator:function(e,t){var n=p.get(e+f),r=n.$get;n.$get=function(){var e=g.invoke(r,n);return g.invoke(t,null,{$delegate:e})}}}},p=h.$injector=o(h,function(){throw hr("unpr",l.join(" <- "))}),v={},g=v.$injector=o(v,function(e){return e=p.get(e+f),g.invoke(e.$get,e)});return s(i(e),function(e){g.invoke(e||d)}),g}function St(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return s(e,function(e){t||"a"!==Hn(e.nodeName)||(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=i(u.getElementsByName(e)))?r.scrollIntoView():"top"===e&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(){r.$evalAsync(o)}),o}]}function xt(e,t,r,i){function o(e){try{e.apply(null,qn.call(arguments,1))}finally{if(y--,0===y)for(;b.length;)try{b.pop()()}catch(t){r.error(t)}}}function u(e,t){(function n(){s(E,function(e){e()}),S=t(n,e)})()}function a(){N=null,x!=f.url()&&(x=f.url(),s(C,function(e){e(f.url())}))}var f=this,l=t[0],c=e.location,h=e.history,p=e.setTimeout,v=e.clearTimeout,m={};f.isMock=!1;var y=0,b=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){y++},f.notifyWhenNoOutstandingRequests=function(e){s(E,function(e){e()}),0===y?e():b.push(e)};var E=[],S;f.addPollFn=function(e){return g(S)&&u(100,p),E.push(e),e};var x=c.href,T=t.find("base"),N=null;f.url=function(t,n){c!==e.location&&(c=e.location);if(!t)return N||c.href.replace(/%27/g,"'");if(x!=t)return x=t,i.history?n?h.replaceState(null,"",t):(h.pushState(null,"",t),T.attr("href",T.attr("href"))):(N=t,n?c.replace(t):c.href=t),f};var C=[],k=!1;f.onUrlChange=function(t){return k||(i.history&&Fn(e).on("popstate",a),i.hashchange?Fn(e).on("hashchange",a):f.addPollFn(a),k=!0),C.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var L={},A="",O=f.baseHref();f.cookies=function(e,t){var i,s,o,u;if(!e){if(l.cookie!==A)for(A=l.cookie,i=A.split("; "),L={},o=0;o<i.length;o++)s=i[o],u=s.indexOf("="),0<u&&(e=unescape(s.substring(0,u)),L[e]===n&&(L[e]=unescape(s.substring(u+1))));return L}t===n?l.cookie=escape(e)+"=;path="+O+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(t)&&(i=(l.cookie=escape(e)+"="+escape(t)+";path="+O).length+1,4096<i&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return y++,n=p(function(){delete m[n],o(e)},t||0),m[n]=!0,n},f.defer.cancel=function(e){return m[e]?(delete m[e],v(e),o(d),!0):!1}}function Tt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new xt(e,r,t,n)}]}function Nt(){this.$get=function(){function e(e,n){function i(e){e!=h&&(p?p==e&&(p=e.n):p=e,s(e.n,e.p),s(e,h),h=e,h.n=null)}function s(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid",e);var o=0,u=c({},n,{id:e}),a={},f=n&&n.capacity||Number.MAX_VALUE,l={},h=null,p=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});i(n);if(!g(t))return e in a||o++,a[e]=t,o>f&&this.remove(p.key),t},get:function(e){var t=l[e];if(t)return i(t),a[e]},remove:function(e){var t=l[e];t&&(t==h&&(h=t.p),t==p&&(p=t.n),s(t.n,t.p),delete l[e],delete a[e],o--)},removeAll:function(){a={},o=0,l={},h=p=null},destroy:function(){l=u=a=null,delete t[e]},info:function(){return c({},u,{size:o})}}}var t={};return e.info=function(){var e={};return s(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Ct(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function kt(e){var r={},i="Directive",o=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,u=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^\s*(https?|ftp|mailto|tel|file):/,l=/^\s*(https?|ftp|file):|data:image\//,h=/^(on[a-z]+|formaction)$/;this.directive=function d(t,n){return G(t,"directive"),w(t)?(K(n,"directiveFactory"),r.hasOwnProperty(t)||(r[t]=[],e.factory(t+i,["$injector","$exceptionHandler",function(e,n){var i=[];return s(r[t],function(r,s){try{var o=e.invoke(r);T(o)?o={compile:m(o)}:!o.compile&&o.link&&(o.compile=m(o.link)),o.priority=o.priority||0,o.index=s,o.name=o.name||t,o.require=o.require||o.controller&&o.name,o.restrict=o.restrict||"A",i.push(o)}catch(u){n(u)}}),i}])),r[t].push(n)):s(t,a(d)),this},this.aHrefSanitizationWhitelist=function(e){return y(e)?(f=e,this):f},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(l=e,this):l},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate",function(e,a,d,g,y,E,S,N,C,k,L){function A(e,t,n,r,i){e instanceof Fn||(e=Fn(e)),s(e,function(t,n){3==t.nodeType&&t.nodeValue.match(/\S+/)&&(e[n]=Fn(t).wrap("<span></span>").parent()[0])});var o=M(e,t,e,n,r,i);return function(t,n,r){K(t,"scope");var i=n?sr.clone.call(e):e;s(r,function(e,t){i.data("$"+t+"Controller",e)}),r=0;for(var u=i.length;r<u;r++){var a=i[r];1!=a.nodeType&&9!=a.nodeType||i.eq(r).data("$scope",t)}return O(i,"ng-scope"),n&&n(i,t),o&&o(t,i,i),i}}function O(e,t){try{e.addClass(t)}catch(n){}}function M(e,t,r,i,s,o){function u(e,r,i,s){var o,u,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=a.length;c<h;p++)u=d[p],r=a[c++],o=a[c++],f=Fn(u),r?(r.scope?(l=e.$new(),f.data("$scope",l),O(f,"ng-scope")):l=e,(f=r.transclude)||!s&&t?r(o,l,u,i,D(e,f||t)):r(o,l,u,n,s)):o&&o(e,u.childNodes,n,s)}for(var a=[],f,l,c,h=0;h<e.length;h++)l=new Z,f=P(e[h],[],l,0===h?i:n,s),f=(o=f.length?F(f,e[h],l,t,r,null,[],[],o):null)&&o.terminal||!e[h].childNodes||!e[h].childNodes.length?null:M(e[h].childNodes,o?o.transclude:t),a.push(o),a.push(f),c=c||o||f,o=null;return c?u:null}function D(e,t){return function(n,r,i){var s=!1;return n||(n=e.$new(),s=n.$$transcluded=!0),r=t(n,r,i),s&&r.on("$destroy",H(n,n.$destroy)),r}}function P(e,t,n,r,i){var s=n.$attr,a;switch(e.nodeType){case 1:R(t,Lt(Vn(e).toLowerCase()),"E",r,i);var f,l,c;a=e.attributes;for(var h=0,p=a&&a.length;h<p;h++){var d=!1,v=!1;f=a[h];if(!jn||8<=jn||f.specified){l=f.name,c=Lt(l),rt.test(c)&&(l=J(c.substr(6),"-"));var m=c.replace(/(Start|End)$/,"");c===m+"Start"&&(d=l,v=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6)),c=Lt(l.toLowerCase()),s[c]=l,n[c]=f=Jn(jn&&"href"==l?decodeURIComponent(e.getAttribute(l,2)):f.value),mt(e,c)&&(n[c]=!0),Q(e,t,f,c),R(t,c,"A",r,i,d,v)}}e=e.className;if(w(e)&&""!==e)for(;a=u.exec(e);)c=Lt(a[2]),R(t,c,"C",r,i)&&(n[c]=Jn(a[3])),e=e.substr(a.index+a[0].length);break;case 3:V(t,e.nodeValue);break;case 8:try{if(a=o.exec(e.nodeValue))c=Lt(a[1]),R(t,c,"M",r,i)&&(n[c]=Jn(a[2]))}catch(g){}}return t.sort(W),t}function B(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw vr("uterdir",t,n);1==e.nodeType&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i)}else r.push(e);return Fn(r)}function j(e,t,n){return function(r,i,s,o,u){return i=B(i[0],t,n),e(r,i,s,o,u)}}function F(e,r,i,o,u,f,l,c,h){function p(e,t,n,r){if(e){n&&(e=j(e,n,r)),e.require=H.require;if(C===H||H.$$isolateScope)e=Y(e,{isolateScope:!0});l.push(e)}if(t){n&&(t=j(t,n,r)),t.require=H.require;if(C===H||H.$$isolateScope)t=Y(t,{isolateScope:!0});c.push(t)}}function v(e,t,n){var r,i="data",o=!1;if(w(e)){for(;"^"==(r=e.charAt(0))||"?"==r;)e=e.substr(1),"^"==r&&(i="inheritedData"),o=o||"?"==r;r=null,n&&"data"===i&&(r=n[e]),r=r||t[i]("$"+e+"Controller");if(!r&&!o)throw vr("ctreq",e,F)}else x(e)&&(r=[],s(e,function(e){r.push(v(e,t,n))}));return r}function m(e,t,o,u,f){function h(e,t){var r;return 2>arguments.length&&(t=e,e=n),M&&(r=x),f(e,t,r)}var p,m,g,y,b,w,x={},T;p=r===o?i:_(i,new Z(Fn(o),i.$attr)),m=p.$$element;if(C){var L=/^\s*([@=&])(\??)\s*(\w*)\s*$/;u=Fn(o),w=t.$new(!0),k&&k===C.$$originalDirective?u.data("$isolateScope",w):u.data("$isolateScopeNoTemplate",w),O(u,"ng-isolate-scope"),s(C.scope,function(e,n){var r=e.match(L)||[],i=r[3]||n,s="?"==r[2],r=r[1],o,u,f;w.$$isolateBindings[n]=r+i;switch(r){case"@":p.$observe(i,function(e){w[n]=e}),p.$$observers[i].$$scope=t,p[i]&&(w[n]=a(p[i])(t));break;case"=":if(s&&!p[i])break;u=E(p[i]),f=u.assign||function(){throw o=w[n]=u(t),vr("nonassign",p[i],C.name)},o=w[n]=u(t),w.$watch(function(){var e=u(t);return e!==w[n]&&(e!==o?o=w[n]=e:f(t,e=o=w[n])),e});break;case"&":u=E(p[i]),w[n]=function(e){return u(t,e)};break;default:throw vr("iscp",C.name,n,e)}})}T=f&&h,N&&s(N,function(e){var n={$scope:e===C||e.$$isolateScope?w:t,$element:m,$attrs:p,$transclude:T},r;b=e.controller,"@"==b&&(b=p[e.name]),r=S(b,n),x[e.name]=r,M||m.data("$"+e.name+"Controller",r),e.controllerAs&&(n.$scope[e.controllerAs]=r)}),u=0;for(g=l.length;u<g;u++)try{y=l[u],y(y.isolateScope?w:t,m,p,y.require&&v(y.require,m,x),T)}catch(A){d(A,q(m))}u=t,C&&(C.template||null===C.templateUrl)&&(u=w),e&&e(u,o.childNodes,n,f);for(u=c.length-1;0<=u;u--)try{y=c[u],y(y.isolateScope?w:t,m,p,y.require&&v(y.require,m,x),T)}catch(D){d(D,q(m))}}h=h||{};var g=-Number.MAX_VALUE,y,N=h.controllerDirectives,C=h.newIsolateScopeDirective,k=h.templateDirective;h=h.nonTlbTranscludeDirective;for(var L=!1,M=!1,D=i.$$element=Fn(r),H,F,R,W=o,V,$=0,J=e.length;$<J;$++){H=e[$];var K=H.$$start,Q=H.$$end;K&&(D=B(r,K,Q)),R=n;if(g>H.priority)break;if(R=H.scope)y=y||H,H.templateUrl||(X("new/isolated scope",C,H,D),b(R)&&(C=H));F=H.name,!H.templateUrl&&H.controller&&(R=H.controller,N=N||{},X("'"+F+"' controller",N[F],H,D),N[F]=H);if(R=H.transclude)L=!0,H.$$tlb||(X("transclusion",h,H,D),h=H),"element"==R?(M=!0,g=H.priority,R=B(r,K,Q),D=i.$$element=Fn(t.createComment(" "+F+": "+i[F]+" ")),r=D[0],G(u,Fn(qn.call(R,0)),r),W=A(R,o,g,f&&f.name,{nonTlbTranscludeDirective:h})):(R=Fn(it(r)).contents(),D.html(""),W=A(R,o));if(H.template)if(X("template",k,H,D),k=H,R=T(H.template)?H.template(D,i):H.template,R=nt(R),H.replace){f=H,R=Fn("<div>"+Jn(R)+"</div>").contents(),r=R[0];if(1!=R.length||1!==r.nodeType)throw vr("tplrt",F,"");G(u,D,r),J={$attr:{}},R=P(r,[],J);var et=e.splice($+1,e.length-($+1));C&&I(R),e=e.concat(R).concat(et),U(i,J),J=e.length}else D.html(R);if(H.templateUrl)X("template",k,H,D),k=H,H.replace&&(f=H),m=z(e.splice($,e.length-$),D,i,u,W,l,c,{controllerDirectives:N,newIsolateScopeDirective:C,templateDirective:k,nonTlbTranscludeDirective:h}),J=e.length;else if(H.compile)try{V=H.compile(D,i,W),T(V)?p(null,V,K,Q):V&&p(V.pre,V.post,K,Q)}catch(tt){d(tt,q(D))}H.terminal&&(m.terminal=!0,g=Math.max(g,H.priority))}return m.scope=y&&!0===y.scope,m.transclude=L&&W,m}function I(e){for(var t=0,n=e.length;t<n;t++)e[t]=p(e[t],{$$isolateScope:!0})}function R(t,s,o,u,a,f,l){if(s===a)return null;a=null;if(r.hasOwnProperty(s)){var c;s=e.get(s+i);for(var h=0,v=s.length;h<v;h++)try{c=s[h],(u===n||u>c.priority)&&-1!=c.restrict.indexOf(o)&&(f&&(c=p(c,{$$start:f,$$end:l})),t.push(c),a=c)}catch(m){d(m)}}return a}function U(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;s(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),s(t,function(t,s){"class"==s?(O(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==s?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==s.charAt(0)||e.hasOwnProperty(s)||(e[s]=t,r[s]=n[s])})}function z(e,t,n,r,i,o,u,a){var f=[],l,h,p=t[0],d=e.shift(),v=c({},d,{templateUrl:null,transclude:null,replace:null,$$originalDirective:d}),m=T(d.templateUrl)?d.templateUrl(t,n):d.templateUrl;return t.html(""),g.get(k.getTrustedResourceUrl(m),{cache:y}).success(function(c){var g,y;c=nt(c);if(d.replace){c=Fn("<div>"+Jn(c)+"</div>").contents(),g=c[0];if(1!=c.length||1!==g.nodeType)throw vr("tplrt",d.name,m);c={$attr:{}},G(r,t,g);var w=P(g,[],c);b(d.scope)&&I(w),e=w.concat(e),U(n,c)}else g=p,t.html(c);e.unshift(v),l=F(e,g,n,i,t,d,o,u,a),s(r,function(e,n){e==g&&(r[n]=t[0])});for(h=M(t[0].childNodes,i);f.length;){c=f.shift(),y=f.shift();var E=f.shift(),S=f.shift(),w=t[0];y!==p&&(w=it(g),G(E,Fn(y),w)),y=l.transclude?D(c,l.transclude):S,l(h,c,w,r,y)}f=null}).error(function(e,t,n,r){throw vr("tpload",r.url)}),function(e,t,n,r,i){f?(f.push(t),f.push(n),f.push(r),f.push(i)):l(h,t,n,r,i)}}function W(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function X(e,t,n,r){if(t)throw vr("multidir",t.name,n.name,e,q(r))}function V(e,t){var n=a(t,!0);n&&e.push({priority:0,compile:m(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),O(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function $(e,t){if("xlinkHref"==t||"IMG"!=Vn(e)&&("src"==t||"ngSrc"==t))return k.RESOURCE_URL}function Q(e,t,n,r){var i=a(n,!0);if(i){if("multiple"===r&&"SELECT"===Vn(e))throw vr("selmulti",q(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){n=s.$$observers||(s.$$observers={});if(h.test(r))throw vr("nodomevents");if(i=a(s[r],!0,$(e,r)))s[r]=i(t),(n[r]||(n[r]=[])).$$inter=!0,(s.$$observers&&s.$$observers[r].$$scope||t).$watch(i,function(e){s.$set(r,e)})}}}})}}function G(e,n,r){var i=n[0],s=n.length,o=i.parentNode,u,a;if(e)for(u=0,a=e.length;u<a;u++)if(e[u]==i){e[u++]=r,a=u+s-1;for(var f=e.length;u<f;u++,a++)a<f?e[u]=e[a]:delete e[u];e.length-=s-1;break}o&&o.replaceChild(r,i),e=t.createDocumentFragment(),e.appendChild(i),r[Fn.expando]=i[Fn.expando],i=1;for(s=n.length;i<s;i++)o=n[i],Fn(o).remove(),e.appendChild(o),delete n[i];n[0]=r,n.length=1}function Y(e,t){return c(function(){return e.apply(null,arguments)},e,t)}var Z=function(e,t){this.$$element=e,this.$attr=t||{}};Z.prototype={$normalize:Lt,$addClass:function(e){e&&0<e.length&&L.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&L.removeClass(this.$$element,e)},$set:function(e,t,r,i){function o(e,t){var n=[],r=e.split(/\s+/),i=t.split(/\s+/),s=0;e:for(;s<r.length;s++){for(var o=r[s],u=0;u<i.length;u++)if(o==i[u])continue e;n.push(o)}return n}if("class"==e)t=t||"",r=this.$$element.attr("class")||"",this.$removeClass(o(r,t).join(" ")),this.$addClass(o(t,r).join(" "));else{var u=mt(this.$$element[0],e);u&&(this.$$element.prop(e,t),i=u),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e])||(this.$attr[e]=i=J(e,"-")),u=Vn(this.$$element);if("A"===u&&"href"===e||"IMG"===u&&"src"===e)if(!jn||8<=jn)u=mn(t).href,""!==u&&("href"===e&&!u.match(f)||"src"===e&&!u.match(l))&&(this[e]=t="unsafe:"+u);!1!==r&&(null===t||t===n?this.$$element.removeAttr(i):this.$$element.attr(i,t))}(r=this.$$observers)&&s(r[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),N.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var et=a.startSymbol(),tt=a.endSymbol(),nt="{{"==et||"}}"==tt?v:function(e){return e.replace(/\{\{/g,et).replace(/}}/g,tt)},rt=/^ngAttr[A-Z]/;return A}]}function Lt(e){return tt(e.replace(mr,""))}function At(){var e={},t=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){G(t,"controller"),b(t)?c(e,t):e[t]=n},this.$get=["$injector","$window",function(n,i){return function(s,o){var u,a,f;w(s)&&(u=s.match(t),a=u[1],f=u[3],s=e.hasOwnProperty(a)?e[a]:Y(o.$scope,a,!0)||Y(i,a,!0),Q(s,a,!0)),u=n.instantiate(s,o);if(f){if(!o||"object"!=typeof o.$scope)throw r("$controller")("noscp",a||s.name,f);o.$scope[f]=u}return u}}]}function Ot(){this.$get=["$window",function(e){return Fn(e.document)}]}function Mt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){var t={},n,r,i;return e?(s(e.split("\n"),function(e){i=e.indexOf(":"),n=Hn(Jn(e.substr(0,i))),r=Jn(e.substr(i+1)),n&&(t[n]=t[n]?t[n]+(", "+r):r)}),t):t}function Dt(e){var t=b(e)?e:n;return function(n){return t||(t=_t(e)),n?t[Hn(n)]||null:t}}function Pt(e,t,n){return T(n)?n(e,t):(s(n,function(n){e=n(e,t)}),e)}function Ht(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,i={"Content-Type":"application/json;charset=utf-8"},o=this.defaults={transformResponse:[function(n){return w(n)&&(n=n.replace(r,""),e.test(n)&&t.test(n)&&(n=F(n))),n}],transformRequest:[function(e){return b(e)&&"[object File]"!==Un.apply(e)?j(e):e}],headers:{common:{Accept:"application/json, text/plain, */*"},post:i,put:i,patch:i},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,r,i,l,h){function p(e){function r(e){var t=c({},e,{data:Pt(e.data,e.headers,i.transformResponse)});return 200<=e.status&&300>e.status?t:l.reject(t)}var i={transformRequest:o.transformRequest,transformResponse:o.transformResponse},u=function(e){function t(e){var t;s(e,function(n,r){T(n)&&(t=n(),null!=t?e[r]=t:delete e[r])})}var n=o.headers,r=c({},e.headers),i,u,n=c({},n.common,n[Hn(e.method)]);t(n),t(r);e:for(i in n){e=Hn(i);for(u in r)if(Hn(u)===e)continue e;r[i]=n[i]}return r}(e);c(i,e),i.headers=u,i.method=Bn(i.method),(e=gn(i.url)?t.cookies()[i.xsrfCookieName||o.xsrfCookieName]:n)&&(u[i.xsrfHeaderName||o.xsrfHeaderName]=e);var a=[function(e){u=e.headers;var t=Pt(e.data,Dt(u),e.transformRequest);return g(e.data)&&s(u,function(e,t){"content-type"===Hn(t)&&delete u[t]}),g(e.withCredentials)&&!g(o.withCredentials)&&(e.withCredentials=o.withCredentials),d(e,t,u).then(r,r)},n],f=l.when(i);for(s(E,function(e){(e.request||e.requestError)&&a.unshift(e.request,e.requestError),(e.response||e.responseError)&&a.push(e.response,e.responseError)});a.length;){e=a.shift();var h=a.shift(),f=f.then(e,h)}return f.success=function(e){return f.then(function(t){e(t.data,t.status,t.headers,i)}),f},f.error=function(e){return f.then(null,function(t){e(t.data,t.status,t.headers,i)}),f},f}function d(t,n,r){function s(e,t,n){h&&(200<=e&&300>e?h.put(w,[e,t,_t(n)]):h.remove(w)),u(t,e,n),i.$$phase||i.$apply()}function u(e,n,r){n=Math.max(n,0),(200<=n&&300>n?f.resolve:f.reject)({data:e,status:n,headers:Dt(r),config:t})}function a(){var e=A(p.pendingRequests,t);-1!==e&&p.pendingRequests.splice(e,1)}var f=l.defer(),c=f.promise,h,d,w=v(t.url,t.params);p.pendingRequests.push(t),c.then(a,a),(t.cache||o.cache)&&!1!==t.cache&&"GET"==t.method&&(h=b(t.cache)?t.cache:b(o.cache)?o.cache:m);if(h)if(d=h.get(w),y(d)){if(d.then)return d.then(a,a),d;x(d)?u(d[1],d[0],M(d[2])):u(d,200,{})}else h.put(w,c);return g(d)&&e(t.method,w,n,s,r,t.timeout,t.withCredentials,t.responseType),c}function v(e,t){if(!t)return e;var n=[];return u(t,function(e,t){null===e||g(e)||(x(e)||(e=[e]),s(e,function(e){b(e)&&(e=j(e)),n.push(X(t)+"="+X(e))}))}),e+(-1==e.indexOf("?")?"?":"&")+n.join("&")}var m=r("$http"),E=[];return s(a,function(e){E.unshift(w(e)?h.get(e):h.invoke(e))}),s(f,function(e,t){var n=w(e)?h.get(e):h.invoke(e);E.splice(t,0,{response:function(e){return n(l.when(e))},responseError:function(e){return n(l.reject(e))}})}),p.pendingRequests=[],function(e){s(arguments,function(e){p[e]=function(t,n){return p(c(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){s(arguments,function(e){p[e]=function(t,n,r){return p(c(r||{},{method:e,url:t,data:n}))}})}("post","put"),p.defaults=o,p}]}function Bt(){this.$get=["$browser","$window","$document",function(e,t,n){return jt(e,gr,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function jt(e,t,n,r,i,o){function u(e,t){var n=i.createElement("script"),r=function(){i.body.removeChild(n),t&&t()};return n.type="text/javascript",n.src=e,jn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,i.body.appendChild(n),r}return function(i,a,f,l,c,h,p,v){function m(){b=-1,E&&E(),S&&S.abort()}function g(t,r,i,s){var u=o||mn(a).protocol;x&&n.cancel(x),E=S=null,r="file"==u?i?200:404:r,t(1223==r?204:r,i,s),e.$$completeOutstandingRequest(d)}var b;e.$$incOutstandingRequestCount(),a=a||e.url();if("jsonp"==Hn(i)){var w="_"+(r.counter++).toString(36);r[w]=function(e){r[w].data=e};var E=u(a.replace("JSON_CALLBACK","angular.callbacks."+w),function(){r[w].data?g(l,200,r[w].data):g(l,b||-2),delete r[w]})}else{var S=new t;S.open(i,a,!0),s(c,function(e,t){y(e)&&S.setRequestHeader(t,e)}),S.onreadystatechange=function(){if(4==S.readyState){var e=S.getAllResponseHeaders();g(l,b||S.status,S.responseType?S.response:S.responseText,e)}},p&&(S.withCredentials=!0),v&&(S.responseType=v),S.send(f||null)}if(0<h)var x=n(m,h);else h&&h.then&&h.then(m)}}function Ft(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function s(s,a,f){for(var l,c,h=0,p=[],d=s.length,v=!1,m=[];h<d;)-1!=(l=s.indexOf(e,h))&&-1!=(c=s.indexOf(t,l+o))?(h!=l&&p.push(s.substring(h,l)),p.push(h=n(v=s.substring(l+o,c))),h.exp=v,h=c+u,v=!0):(h!=d&&p.push(s.substring(h)),h=d);(d=p.length)||(p.push(""),d=1);if(f&&1<p.length)throw yr("noconcat",s);if(!a||v)return m.length=d,h=function(e){try{for(var t=0,n=d,o;t<n;t++)"function"==typeof (o=p[t])&&(o=o(e),o=f?i.getTrusted(f,o):i.valueOf(o),null===o||g(o)?o="":"string"!=typeof o&&(o=j(o))),m[t]=o;return m.join("")}catch(u){e=yr("interr",s,u.toString()),r(e)}},h.exp=s,h.parts=p,h}var o=e.length,u=t.length;return s.startSymbol=function(){return e},s.endSymbol=function(){return t},s}]}function It(){this.$get=["$rootScope","$window","$q",function(e,t,n){function r(r,s,o,u){var a=t.setInterval,f=t.clearInterval,l=n.defer(),c=l.promise,h=0,p=y(u)&&!u;return o=y(o)?o:0,c.then(null,null,r),c.$$intervalId=a(function(){l.notify(h++),0<o&&h>=o&&(l.resolve(h),f(c.$$intervalId),delete i[c.$$intervalId]),p||e.$apply()},s),i[c.$$intervalId]=l,c}var i={};return r.cancel=function(e){return e&&e.$$intervalId in i?(i[e.$$intervalId].reject("canceled"),clearInterval(e.$$intervalId),delete i[e.$$intervalId],!0):!1},r}]}function qt(){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:"¤",posSuf:"",negPre:"(¤",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(e){return 1===e?"one":"other"}}}}function Rt(e){e=e.split("/");for(var t=e.length;t--;)e[t]=W(e[t]);return e.join("/")}function Ut(e,t,n){e=mn(e,n),t.$$protocol=e.protocol,t.$$host=e.hostname,t.$$port=h(e.port)||wr[e.protocol]||null}function zt(e,t,n){var r="/"!==e.charAt(0);r&&(e="/"+e),e=mn(e,n),t.$$path=decodeURIComponent(r&&"/"===e.pathname.charAt(0)?e.pathname.substring(1):e.pathname),t.$$search=U(e.search),t.$$hash=decodeURIComponent(e.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Wt(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function Xt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Vt(e){return e.substr(0,Xt(e).lastIndexOf("/")+1)}function $t(e,t){this.$$html5=!0,t=t||"";var r=Vt(e);Ut(e,this,e),this.$$parse=function(t){var n=Wt(r,t);if(!w(n))throw Er("ipthprfx",t,r);zt(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=z(this.$$search),t=this.$$hash?"#"+W(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$rewrite=function(i){var s;if((s=Wt(e,i))!==n)return i=s,(s=Wt(t,s))!==n?r+(Wt("/",s)||s):e+i;if((s=Wt(r,i))!==n)return r+s;if(r==i+"/")return r}}function Jt(e,t){var n=Vt(e);Ut(e,this,e),this.$$parse=function(r){var i=Wt(e,r)||Wt(n,r),i="#"==i.charAt(0)?Wt(t,i):this.$$html5?i:"";if(!w(i))throw Er("ihshprfx",r,t);zt(i,this,e),this.$$compose()},this.$$compose=function(){var n=z(this.$$search),r=this.$$hash?"#"+W(this.$$hash):"";this.$$url=Rt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$rewrite=function(t){if(Xt(e)==Xt(t))return t}}function Kt(e,t){this.$$html5=!0,Jt.apply(this,arguments);var n=Vt(e);this.$$rewrite=function(r){var i;if(e==Xt(r))return r;if(i=Wt(n,r))return e+t+i;if(n===r+"/")return n}}function Qt(e){return function(){return this[e]}}function Gt(e,t){return function(n){return g(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Yt(){var t="",n=!1;this.hashPrefix=function(e){return y(e)?(t=e,this):t},this.html5Mode=function(e){return y(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f=i.baseHref(),l=i.url();n?(f=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(f||"/"),s=s.history?$t:Kt):(f=Xt(l),s=Jt),a=new s(f,"#"+t),a.$$parse(a.$$rewrite(l)),o.on("click",function(t){if(!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var n=Fn(t.target);"a"!==Hn(n[0].nodeName);)if(n[0]===o[0]||!(n=n.parent())[0])return;var s=n.prop("href"),u=a.$$rewrite(s);s&&!n.attr("target")&&u&&!t.isDefaultPrevented()&&(t.preventDefault(),u!=i.url()&&(a.$$parse(u),r.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),a.absUrl()!=l&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$broadcast("$locationChangeStart",e,a.absUrl()).defaultPrevented?i.url(a.absUrl()):(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest()))});var c=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;return c&&e==a.absUrl()||(c++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))})),a.$$replace=!1,c}),a}]}function Zt(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||d;return i.apply?function(){var e=[];return s(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("constructor"===e)throw Sr("isecfld",t);return e}function tn(e,t){if(e&&e.constructor===e)throw Sr("isecfn",t);if(e&&e.document&&e.location&&e.alert&&e.setInterval)throw Sr("isecwindow",t);if(e&&(e.nodeName||e.on&&e.find))throw Sr("isecdom",t);return e}function nn(e,t,r,i,s){s=s||{},t=t.split(".");for(var o,u=0;1<t.length;u++){o=en(t.shift(),i);var a=e[o];a||(a={},e[o]=a),e=a,e.then&&s.unwrapPromises&&(Tr(i),"$$v"in e||function(e){e.then(function(t){e.$$v=t})}(e),e.$$v===n&&(e.$$v={}),e=e.$$v)}return o=en(t.shift(),i),e[o]=r}function rn(e,t,r,i,s,o,u){return en(e,o),en(t,o),en(r,o),en(i,o),en(s,o),u.unwrapPromises?function(u,a){var f=a&&a.hasOwnProperty(e)?a:u,l;return null===f||f===n?f:((f=f[e])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!t||null===f||f===n?f:((f=f[t])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!r||null===f||f===n?f:((f=f[r])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!i||null===f||f===n?f:((f=f[i])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!s||null===f||f===n?f:((f=f[s])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),f)))))}:function(o,u){var a=u&&u.hasOwnProperty(e)?u:o;return null===a||a===n?a:(a=a[e],!t||null===a||a===n?a:(a=a[t],!r||null===a||a===n?a:(a=a[r],!i||null===a||a===n?a:(a=a[i],s&&null!==a&&a!==n?a=a[s]:a))))}}function sn(e,t,r){if(Ar.hasOwnProperty(e))return Ar[e];var i=e.split("."),o=i.length,u;if(t.csp)u=6>o?rn(i[0],i[1],i[2],i[3],i[4],r,t):function(e,s){var u=0,a;do a=rn(i[u++],i[u++],i[u++],i[u++],i[u++],r,t)(e,s),s=n,e=a;while(u<o);return a};else{var a="var l, fn, p;\n";s(i,function(e,n){en(e,r),a+="if(s === null || s === undefined) return s;\nl=s;\ns="+(n?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\n'+(t.unwrapPromises?'if (s && s.then) {\n pw("'+r.replace(/\"/g,'\\"')+'");\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':"")});var a=a+"return s;",f=new Function("s","k","pw",a);f.toString=function(){return a},u=function(e,t){return f(e,t,Tr)}}return"hasOwnProperty"!==e&&(Ar[e]=u),u}function on(){var e={},t={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(e){return y(e)?(t.unwrapPromises=!!e,this):t.unwrapPromises},this.logPromiseWarnings=function(e){return y(e)?(t.logPromiseWarnings=e,this):t.logPromiseWarnings},this.$get=["$filter","$sniffer","$log",function(n,r,i){return t.csp=r.csp,Tr=function(e){t.logPromiseWarnings&&!xr.hasOwnProperty(e)&&(xr[e]=!0,i.warn("[$parse] Promise found in the expression `"+e+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))},function(r){var i;switch(typeof r){case"string":if(e.hasOwnProperty(r))return e[r];return i=new kr(t),i=(new Lr(i,n,t)).parse(r,!1),"hasOwnProperty"!==r&&(e[r]=i),i;case"function":return r;default:return d}}}]}function un(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return an(function(t){e.$evalAsync(t)},t)}]}function an(e,t){function r(e){return e}function i(e){return a(e)}var o=function(){var s=[],f,l;return l={resolve:function(t){if(s){var r=s;s=n,f=u(t),r.length&&e(function(){for(var e,t=0,n=r.length;t<n;t++)e=r[t],f.then(e[0],e[1],e[2])})}},reject:function(e){l.resolve(a(e))},notify:function(t){if(s){var n=s;s.length&&e(function(){for(var e,r=0,i=n.length;r<i;r++)e=n[r],e[2](t)})}},promise:{then:function(e,n,u){var a=o(),l=function(n){try{a.resolve((T(e)?e:r)(n))}catch(i){a.reject(i),t(i)}},c=function(e){try{a.resolve((T(n)?n:i)(e))}catch(r){a.reject(r),t(r)}},h=function(e){try{a.notify((T(u)?u:r)(e))}catch(n){t(n)}};return s?s.push([l,c,h]):f.then(l,c,h),a.promise},"catch":function(e){return this.then(null,e)},"finally":function(e){function t(e,t){var n=o();return t?n.resolve(e):n.reject(e),n.promise}function n(n,i){var s=null;try{s=(e||r)()}catch(o){return t(o,!1)}return s&&T(s.then)?s.then(function(){return t(n,i)},function(e){return t(e,!1)}):t(n,i)}return this.then(function(e){return n(e,!0)},function(e){return n(e,!1)})}}}},u=function(t){return t&&T(t.then)?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(n){return{then:function(r,s){var u=o();return e(function(){try{u.resolve((T(s)?s:i)(n))}catch(e){u.reject(e),t(e)}}),u.promise}}};return{defer:o,reject:a,when:function(n,s,f,l){var c=o(),h,p=function(e){try{return(T(s)?s:r)(e)}catch(n){return t(n),a(n)}},d=function(e){try{return(T(f)?f:i)(e)}catch(n){return t(n),a(n)}},v=function(e){try{return(T(l)?l:r)(e)}catch(n){t(n)}};return e(function(){u(n).then(function(e){h||(h=!0,c.resolve(u(e).then(p,d,v)))},function(e){h||(h=!0,c.resolve(d(e)))},function(e){h||c.notify(v(e))})}),c.promise},all:function(e){var t=o(),n=0,r=x(e)?[]:{};return s(e,function(e,i){n++,u(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}}}function fn(){var e=10,t=r("$rootScope");this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(n,r,s,o){function u(){this.$id=f(),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.$$postDigestQueue=[],this.$$listeners={},this.$$isolateBindings={}}function a(e){if(h.$$phase)throw t("inprog",h.$$phase);h.$$phase=e}function l(e,t){var n=s(e);return Q(n,t),n}function c(){}u.prototype={constructor:u,$new:function(e){return e?(e=new u,e.$root=this.$root,e.$$asyncQueue=this.$$asyncQueue,e.$$postDigestQueue=this.$$postDigestQueue):(e=function(){},e.prototype=this,e=new e,e.$id=f()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=l(e,"watch"),i=this.$$watchers,s={fn:t,last:c,get:r,exp:e,eq:!!n};if(!T(t)){var o=l(t||d,"listener");s.fn=function(e,t,n){o(n)}}if("string"==typeof e&&r.constant){var u=s.fn;s.fn=function(e,t,n){u.call(this,e,t,n),O(i,s)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){O(i,s)}},$watchCollection:function(e,t){var n=this,r,o,u=0,a=s(e),f=[],l={},c=0;return this.$watch(function(){o=a(n);var e,t;if(b(o))if(i(o))for(r!==f&&(r=f,c=r.length=0,u++),e=o.length,c!==e&&(u++,r.length=c=e),t=0;t<e;t++)r[t]!==o[t]&&(u++,r[t]=o[t]);else{r!==l&&(r=l={},c=0,u++),e=0;for(t in o)o.hasOwnProperty(t)&&(e++,r.hasOwnProperty(t)?r[t]!==o[t]&&(u++,r[t]=o[t]):(c++,r[t]=o[t],u++));if(c>e)for(t in u++,r)r.hasOwnProperty(t)&&!o.hasOwnProperty(t)&&(c--,delete r[t])}else r!==o&&(r=o,u++);return u},function(){t(o,r,n)})},$digest:function(){var n,i,s,o,u=this.$$asyncQueue,f=this.$$postDigestQueue,l,p,d=e,v,m=[],g,y,b;a("$digest");do{p=!1;for(v=this;u.length;)try{b=u.shift(),b.scope.$eval(b.expression)}catch(w){r(w)}do{if(o=v.$$watchers)for(l=o.length;l--;)try{(n=o[l])&&(i=n.get(v))!==(s=n.last)&&!(n.eq?D(i,s):"number"==typeof i&&"number"==typeof s&&isNaN(i)&&isNaN(s))&&(p=!0,n.last=n.eq?M(i):i,n.fn(i,s===c?i:s,v),5>d&&(g=4-d,m[g]||(m[g]=[]),y=T(n.exp)?"fn: "+(n.exp.name||n.exp.toString()):n.exp,y+="; newVal: "+j(i)+"; oldVal: "+j(s),m[g].push(y)))}catch(E){r(E)}if(!(o=v.$$childHead||v!==this&&v.$$nextSibling))for(;v!==this&&!(o=v.$$nextSibling);)v=v.$parent}while(v=o);if(p&&!(d--))throw h.$$phase=null,t("infdig",e,j(m))}while(p||u.length);for(h.$$phase=null;f.length;)try{f.shift()()}catch(S){r(S)}},$destroy:function(){if(h!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return s(e)(this,t)},$evalAsync:function(e){h.$$phase||h.$$asyncQueue.length||o.defer(function(){h.$$asyncQueue.length&&h.$digest()}),this.$$asyncQueue.push({scope:this,expression:e})},$$postDigest:function(e){this.$$postDigestQueue.push(e)},$apply:function(e){try{return a("$apply"),this.$eval(e)}catch(t){r(t)}finally{h.$$phase=null;try{h.$digest()}catch(n){throw r(n),n}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[A(n,t)]=null}},$emit:function(e,t){var n=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(qn.call(arguments,1)),f,l;do{i=s.$$listeners[e]||n,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{i[f].apply(null,a)}catch(c){r(c)}else i.splice(f,1),f--,l--;if(o)break;s=s.$parent}while(s);return u},$broadcast:function(e,t){var n=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(qn.call(arguments,1)),u,a;do{n=i,s.currentScope=n,i=n.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){r(f)}else i.splice(u,1),u--,a--;if(!(i=n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(i=n.$$nextSibling);)n=n.$parent}while(n=i);return s}};var h=new u;return h}]}function ln(e){if("self"===e)return e;if(w(e)){if(-1<e.indexOf("***"))throw Or("iwcard",e);return e=e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),RegExp("^"+e+"$")}if(N(e))return RegExp("^"+e.source+"$");throw Or("imatcher")}function cn(e){var t=[];return y(e)&&s(e,function(e){t.push(ln(e))}),t}function hn(){this.SCE_CONTEXTS=Mr;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=cn(e)),t},this.$get=["$log","$document","$injector",function(r,i,s){function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var u=function(e){throw Or("unsafe")};s.has("$sanitize")&&(u=s.get("$sanitize"));var a=o(),f={};return f[Mr.HTML]=o(a),f[Mr.CSS]=o(a),f[Mr.URL]=o(a),f[Mr.JS]=o(a),f[Mr.RESOURCE_URL]=o(f[Mr.URL]),{trustAs:function(e,t){var r=f.hasOwnProperty(e)?f[e]:null;if(!r)throw Or("icontext",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Or("itype",e);return new r(t)},getTrusted:function(r,i){if(null===i||i===n||""===i)return i;var s=f.hasOwnProperty(r)?f[r]:null;if(s&&i instanceof s)return i.$$unwrapTrustedValue();if(r===Mr.RESOURCE_URL){var s=mn(i.toString()),o,a,l=!1;o=0;for(a=e.length;o<a;o++)if("self"===e[o]?gn(s):e[o].exec(s.href)){l=!0;break}if(l)for(o=0,a=t.length;o<a;o++)if("self"===t[o]?gn(s):t[o].exec(s.href)){l=!1;break}if(l)return i;throw Or("insecurl",i.toString())}if(r===Mr.HTML)return u(i);throw Or("unsafe")},valueOf:function(e){return e instanceof a?e.$$unwrapTrustedValue():e}}}]}function pn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$document","$sceDelegate",function(t,r,i){if(e&&jn&&(r=r[0].documentMode,r!==n&&8>r))throw Or("iequirks");var o=M(Mr);o.isEnabled=function(){return e},o.trustAs=i.trustAs,o.getTrusted=i.getTrusted,o.valueOf=i.valueOf,e||(o.trustAs=o.getTrusted=function(e,t){return t},o.valueOf=v),o.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:function(t,n){return o.getTrusted(e,r(t,n))}};var u=o.parseAs,a=o.getTrusted,f=o.trustAs;return s(Mr,function(e,t){var n=Hn(t);o[tt("parse_as_"+n)]=function(t){return u(e,t)},o[tt("get_trusted_"+n)]=function(t){return a(e,t)},o[tt("trust_as_"+n)]=function(t){return f(e,t)}}),o}]}function dn(){this.$get=["$window","$document",function(e,t){var n={},r=h((/android (\d+)/.exec(Hn((e.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},o,u=/^(Moz|webkit|O|ms)(?=[A-Z])/,a=s.body&&s.body.style,f=!1,l=!1;if(a){for(var c in a)if(f=u.exec(c)){o=f[0],o=o.substr(0,1).toUpperCase()+o.substr(1);break}o||(o="WebkitOpacity"in a&&"webkit"),f="transition"in a||o+"Transition"in a,l="animation"in a||o+"Animation"in a,!r||f&&l||(f=w(s.body.style.webkitTransition),l=w(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>r||i),hashchange:"onhashchange"in e&&(!s.documentMode||7<s.documentMode),hasEvent:function(e){if("input"==e&&9==jn)return!1;if(g(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:P(),vendorPrefix:o,transitions:f,animations:l,msie:jn}}]}function vn(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=y(u)&&!u;return o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}finally{delete s[f.$$timeoutId]}l||e.$apply()},o),f.$$timeoutId=o,s[o]=a,f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),delete s[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},i}]}function mn(e,t){var n=e;jn&&(_r.setAttribute("href",n),n=_r.href),_r.setAttribute("href",n);var n=_r.pathname,r=e;return 0===r.indexOf(t)&&(r=r.replace(t,"")),Dr.exec(r)||(n=(r=Dr.exec(n))?r[1]:n),n="/"===n.charAt(0)?n:"/"+n,{href:_r.href,protocol:_r.protocol?_r.protocol.replace(/:$/,""):"",host:_r.host,search:_r.search?_r.search.replace(/^\?/,""):"",hash:_r.hash?_r.hash.replace(/^#/,""):"",hostname:_r.hostname,port:_r.port,pathname:n}}function gn(e){return e=w(e)?mn(e):e,e.protocol===Pr.protocol&&e.host===Pr.host}function yn(){this.$get=m(e)}function bn(e){function t(r,i){if(b(r)){var o={};return s(r,function(e,n){o[n]=t(n,e)}),o}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",En),t("date",kn),t("filter",wn),t("json",Ln),t("limitTo",An),t("lowercase",Ir),t("number",Sn),t("orderBy",On),t("uppercase",qr)}function wn(){return function(e,t,n){if(!x(e))return e;var r=typeof n,i=[];i.check=function(e){for(var t=0;t<i.length;t++)if(!i[t](e))return!1;return!0},"function"!==r&&(n="boolean"===r&&n?function(e,t){return Wn.equals(e,t)}:function(e,t){return t=(""+t).toLowerCase(),-1<(""+e).toLowerCase().indexOf(t)});var s=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!s(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var r in e)if("$"!==r.charAt(0)&&s(e[r],t))return!0}return!1;case"array":for(r=0;r<e.length;r++)if(s(e[r],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var o in t)"$"==o?function(){if(t[o]){var e=o;i.push(function(n){return s(n,t[e])})}}():function(){if("undefined"!=typeof t[o]){var e=o;i.push(function(n){return s(Y(n,e),t[e])})}}();break;case"function":i.push(t);break;default:return e}for(var r=[],u=0;u<e.length;u++){var a=e[u];i.check(a)&&r.push(a)}return r}}function En(e){var t=e.NUMBER_FORMATS;return function(e,n){return g(n)&&(n=t.CURRENCY_SYM),xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function Sn(e){var t=e.NUMBER_FORMATS;return function(e,n){return xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function xn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=0>e;e=Math.abs(e);var o=e+"",u="",a=[],f=!1;if(-1!==o.indexOf("e")){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>i+1?o="0":(u=o,f=!0)}if(f)0<i&&-1<e&&1>e&&(u=e.toFixed(i));else{o=(o.split(Hr)[1]||"").length,g(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac)),o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(Hr),o=e[0],e=e[1]||"";var l=0,c=t.lgSize,h=t.gSize;if(o.length>=c+h)for(l=o.length-c,f=0;f<l;f++)0===(l-f)%h&&0!==f&&(u+=n),u+=o.charAt(f);for(f=l;f<o.length;f++)0===(o.length-f)%c&&0!==f&&(u+=n),u+=o.charAt(f);for(;e.length<i;)e+="0";i&&"0"!==i&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function Tn(e,t,n){var r="";0>e&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Nn(e,t,n,r){return n=n||0,function(i){i=i["get"+e]();if(0<n||i>-n)i+=n;return 0===i&&-12==n&&(i=12),Tn(i,t,r)}}function Cn(e,t){return function(n,r){var i=n["get"+e](),s=Bn(t?"SHORT"+e:e);return r[s][i]}}function kn(e){function t(e){var t;if(t=e.match(n)){e=new Date(0);var r=0,i=0,s=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=h(t[9]+t[10]),i=h(t[9]+t[11])),s.call(e,h(t[1]),h(t[2])-1,h(t[3])),r=h(t[4]||0)-r,i=h(t[5]||0)-i,s=h(t[6]||0),t=Math.round(1e3*parseFloat("0."+(t[7]||0))),o.call(e,r,i,s,t)}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r){var i="",o=[],u,a;r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,w(n)&&(n=Fr.test(n)?h(n):t(n)),E(n)&&(n=new Date(n));if(!S(n))return n;for(;r;)(a=jr.exec(r))?(o=o.concat(qn.call(a,1)),r=o.pop()):(o.push(r),r=null);return s(o,function(t){u=Br[t],i+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function Ln(){return function(e){return j(e,!0)}}function An(){return function(e,t){if(!x(e)&&!w(e))return e;t=h(t);if(w(e))return t?0<=t?e.slice(0,t):e.slice(t,e.length):"";var n=[],r,i;t>e.length?t=e.length:t<-e.length&&(t=-e.length),0<t?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}}function On(e){return function(t,n,r){function i(e,t){return I(t)?function(t,n){return e(n,t)}:e}if(!x(t)||!n)return t;n=x(n)?n:[n],n=L(n,function(t){var n=!1,r=t||v;if(w(t)){if("+"==t.charAt(0)||"-"==t.charAt(0))n="-"==t.charAt(0),t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?("string"==s&&(n=n.toLowerCase(),i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)});for(var s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(0!==i)return i}return 0},r))}}function Mn(e){return T(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function _n(e,t){function n(t,n){n=n?"-"+J(n,"-"):"",e.removeClass((t?Zr:Yr)+n).addClass((t?Yr:Zr)+n)}var r=this,i=e.parent().controller("form")||zr,o=0,u=r.$error={},a=[];r.$name=t.name||t.ngForm,r.$dirty=!1,r.$pristine=!0,r.$valid=!0,r.$invalid=!1,i.$addControl(r),e.addClass(ei),n(!0),r.$addControl=function(e){G(e.$name,"input"),a.push(e),e.$name&&(r[e.$name]=e)},r.$removeControl=function(e){e.$name&&r[e.$name]===e&&delete r[e.$name],s(u,function(t,n){r.$setValidity(n,!0,e)}),O(a,e)},r.$setValidity=function(e,t,s){var a=u[e];if(t)a&&(O(a,s),a.length||(o--,o||(n(t),r.$valid=!0,r.$invalid=!1),u[e]=!1,n(!0,e),i.$setValidity(e,!0,r)));else{o||n(t);if(a){if(-1!=A(a,s))return}else u[e]=a=[],o++,n(!1,e),i.$setValidity(e,!1,r);a.push(s),r.$valid=!1,r.$invalid=!0}},r.$setDirty=function(){e.removeClass(ei).addClass(ti),r.$dirty=!0,r.$pristine=!1,i.$setDirty()},r.$setPristine=function(){e.removeClass(ti).addClass(ei),r.$dirty=!1,r.$pristine=!0,s(a,function(e){e.$setPristine()})}}function Dn(e,t,i,s,o,u){var a=function(){var n=t.val();I(i.ngTrim||"T")&&(n=Jn(n)),s.$viewValue!==n&&e.$apply(function(){s.$setViewValue(n)})};if(o.hasEvent("input"))t.on("input",a);else{var f,l=function(){f||(f=u.defer(function(){a(),f=null}))};t.on("keydown",function(e){e=e.keyCode,91===e||15<e&&19>e||37<=e&&40>=e||l()}),t.on("change",a),o.hasEvent("paste")&&t.on("paste cut",l)}s.$render=function(){t.val(s.$isEmpty(s.$viewValue)?"":s.$viewValue)};var c=i.ngPattern,p=function(e,t){return s.$isEmpty(t)||e.test(t)?(s.$setValidity("pattern",!0),t):(s.$setValidity("pattern",!1),n)};c&&((o=c.match(/^\/(.*)\/([gim]*)$/))?(c=RegExp(o[1],o[2]),o=function(e){return p(c,e)}):o=function(n){var i=e.$eval(c);if(!i||!i.test)throw r("ngPattern")("noregexp",c,i,q(t));return p(i,n)},s.$formatters.push(o),s.$parsers.push(o));if(i.ngMinlength){var d=h(i.ngMinlength);o=function(e){return!s.$isEmpty(e)&&e.length<d?(s.$setValidity("minlength",!1),n):(s.$setValidity("minlength",!0),e)},s.$parsers.push(o),s.$formatters.push(o)}if(i.ngMaxlength){var v=h(i.ngMaxlength);o=function(e){return!s.$isEmpty(e)&&e.length>v?(s.$setValidity("maxlength",!1),n):(s.$setValidity("maxlength",!0),e)},s.$parsers.push(o),s.$formatters.push(o)}}function Pn(e,t){return e="ngClass"+e,function(){return{restrict:"AC",link:function(n,r,i){function o(e){if(!0===t||n.$index%2===t)a&&!D(e,a)&&i.$removeClass(u(a)),i.$addClass(u(e));a=M(e)}function u(e){if(x(e))return e.join(" ");if(b(e)){var t=[];return s(e,function(e,n){e&&t.push(n)}),t.join(" ")}return e}var a;n.$watch(i[e],o,!0),i.$observe("class",function(t){o(n.$eval(i[e]))}),"ngClass"!==e&&n.$watch("$index",function(r,s){var o=r&1;o!==s&1&&(o===t?(o=n.$eval(i[e]),i.$addClass(u(o))):(o=n.$eval(i[e]),i.$removeClass(u(o))))})}}}}var Hn=function(e){return w(e)?e.toLowerCase():e},Bn=function(e){return w(e)?e.toUpperCase():e},jn,Fn,In,qn=[].slice,Rn=[].push,Un=Object.prototype.toString,zn=r("ng"),Wn=e.angular||(e.angular={}),Xn,Vn,$n=["0","0","0"];jn=h((/msie (\d+)/.exec(Hn(navigator.userAgent))||[])[1]),isNaN(jn)&&(jn=h((/trident\/.*; rv:(\d+)/.exec(Hn(navigator.userAgent))||[])[1])),d.$inject=[],v.$inject=[];var Jn=function(){return String.prototype.trim?function(e){return w(e)?e.trim():e}:function(e){return w(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}}();Vn=9>jn?function(e){return e=e.nodeName?e:e[0],e.scopeName&&"HTML"!=e.scopeName?Bn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Kn=/[A-Z]/g,Qn={full:"1.2.1",major:1,minor:2,dot:1,codeName:"underscore-empathy"},Gn=rt.cache={},Yn=rt.expando="ng-"+(new Date).getTime(),Zn=1,er=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},tr=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},nr=/([\:\-\_]+(.))/g,rr=/^moz([A-Z])/,ir=r("jqLite"),sr=rt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),rt(e).on("load",r))},toString:function(){var e=[];return s(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return 0<=e?Fn(this[e]):Fn(this[this.length+e])},length:0,push:Rn,sort:[].sort,splice:[].splice},or={};s("multiple selected checked disabled readOnly required open".split(" "),function(e){or[Hn(e)]=e});var ur={};s("input select option textarea button form details".split(" "),function(e){ur[Bn(e)]=!0}),s({data:ft,inheritedData:vt,scope:function(e){return Fn(e).data("$scope")||vt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Fn(e).data("$isolateScope")||Fn(e).data("$isolateScopeNoTemplate")},controller:dt,injector:function(e){return vt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:lt,css:function(e,t,r){t=tt(t);if(!y(r)){var i;return 8>=jn&&(i=e.currentStyle&&e.currentStyle[t],""===i&&(i="auto")),i=i||e.style[t],8>=jn&&(i=""===i?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Hn(t);if(or[i]){if(!y(r))return e[t]||(e.attributes.getNamedItem(t)||d).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(y(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),null===e?n:e},prop:function(e,t,n){if(!y(n))return e[t];e[t]=n},text:function(){function e(e,n){var r=t[e.nodeType];if(g(n))return r?e[r]:"";e[r]=n}var t=[];return 9>jn?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",e.$dv="",e}(),val:function(e,t){if(g(t)){if("SELECT"===Vn(e)&&e.multiple){var n=[];return s(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(g(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)st(r[n]);e.innerHTML=t}},function(e,t){rt.prototype[t]=function(t,r){var i,s;if((2==e.length&&e!==lt&&e!==dt?t:r)===n){if(b(t)){for(i=0;i<this.length;i++)if(e===ft)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}i=e.$dv,s=i===n?Math.min(this.length,1):this.length;for(var o=0;o<s;o++){var u=e(this[o],t,r);i=i?i+u:u}return i}for(i=0;i<this.length;i++)e(this[i],t,r);return this}}),s({removeData:ut,dealoc:st,on:function ji(e,n,r,i){if(y(i))throw ir("onargs");var o=at(e,"events"),u=at(e,"handle");o||at(e,"events",o={}),u||at(e,"handle",u=gt(e,o)),s(n.split(" "),function(n){var i=o[n];if(!i){if("mouseenter"==n||"mouseleave"==n){var s=t.body.contains||t.body.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1};o[n]=[],ji(e,{mouseleave:"mouseout",mouseenter:"mouseover"}[n],function(e){var t=e.relatedTarget;t&&(t===this||s(this,t))||u(e,n)})}else er(e,n,u),o[n]=[];i=o[n]}i.push(r)})},off:ot,replaceWith:function(e,t){var n,r=e.parentNode;st(e),s(new rt(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return s(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){s(new rt(t),function(t){1!==e.nodeType&&11!==e.nodeType||e.appendChild(t)})},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;s(new rt(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Fn(t)[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){st(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,r=e.parentNode;s(new rt(t),function(e){r.insertBefore(e,n.nextSibling),n=e})},addClass:ht,removeClass:ct,toggleClass:function(e,t,n){g(n)&&(n=!lt(e,t)),(n?ht:ct)(e,t)},parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;null!=e&&1!==e.nodeType;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:it,triggerHandler:function(e,t,n){t=(at(e,"events")||{})[t],n=n||[];var r=[{preventDefault:d,stopPropagation:d}];s(t,function(t){t.apply(e,r.concat(n))})}},function(e,t){rt.prototype[t]=function(t,n,r){for(var i,s=0;s<this.length;s++)g(i)?(i=e(this[s],t,n,r),y(i)&&(i=Fn(i))):pt(i,e(this[s],t,n,r));return y(i)?i:this},rt.prototype.bind=rt.prototype.on,rt.prototype.unbind=rt.prototype.off}),bt.prototype={put:function(e,t){this[yt(e)]=t},get:function(e){return this[yt(e)]},remove:function(e){var t=this[e=yt(e)];return delete this[e],t}};var ar=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,fr=/,/,lr=/^\s*(_?)(\S+?)\1\s*$/,cr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,hr=r("$injector"),pr=r("$animate"),dr=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw pr("notcsel",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.$get=["$timeout",function(e){return{enter:function(t,n,r,i){r=r&&r[r.length-1];var o=n&&n[0]||r&&r.parentNode,u=r&&r.nextSibling||null;s(t,function(e){o.insertBefore(e,u)}),i&&e(i,0,!1)},leave:function(t,n){t.remove(),n&&e(n,0,!1)},move:function(e,t,n,r){this.enter(e,t,n,r)},addClass:function(t,n,r){n=w(n)?n:x(n)?n.join(" "):"",s(t,function(e){ht(e,n)}),r&&e(r,0,!1)},removeClass:function(t,n,r){n=w(n)?n:x(n)?n.join(" "):"",s(t,function(e){ct(e,n)}),r&&e(r,0,!1)},enabled:d}}]}],vr=r("$compile");kt.$inject=["$provide"];var mr=/^(x[\:\-_]|data[\:\-_])/i,gr=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw r("$httpBackend")("noxhr")},yr=r("$interpolate"),br=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,wr={http:80,https:443,ftp:21},Er=r("$location");Kt.prototype=Jt.prototype=$t.prototype={$$html5:!1,$$replace:!1,absUrl:Qt("$$absUrl"),url:function(e,t){if(g(e))return this.$$url;var n=br.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Qt("$$protocol"),host:Qt("$$host"),port:Qt("$$port"),path:Gt("$$path",function(e){return"/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e))this.$$search=U(e);else{if(!b(e))throw Er("isrcharg");this.$$search=e}break;default:g(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Gt("$$hash",v),replace:function(){return this.$$replace=!0,this}};var Sr=r("$parse"),xr={},Tr,Nr={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":d,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),y(r)?y(i)?r+i:r:y(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(y(n)?n:0)-(y(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":d,"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},Cr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},kr=function(e){this.options=e};kr.prototype={constructor:kr,lex:function(e){this.text=e,this.index=0,this.ch=n,this.lastCh=":",this.tokens=[];var t;for(e=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&"{"===e[0]&&(t=this.tokens[this.tokens.length-1])&&(t.json=-1===t.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&e.unshift(this.ch),this.is("}]")&&e.shift(),this.index++;else{if(this.isWhitespace(this.ch)){this.index++;continue}var r=this.ch+this.peek(),i=r+this.peek(2),s=Nr[this.ch],o=Nr[r],u=Nr[i];u?(this.tokens.push({index:this.index,text:i,fn:u}),this.index+=3):o?(this.tokens.push({index:this.index,text:r,fn:o}),this.index+=2):s?(this.tokens.push({index:this.index,text:this.ch,fn:s,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},was:function(e){return-1!==e.indexOf(this.lastCh)},peek:function(e){return e=e||1,this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(e){return"0"<=e&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||" "===e},isIdent:function(e){return"a"<=e&&"z">=e||"A"<=e&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){throw n=n||this.index,t=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n,Sr("lexerr",e,t,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Hn(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e*=1,this.tokens.push({index:t,text:e,json:!0,fn:function(){return e}})},readIdent:function(){for(var e=this,t="",n=this.index,r,i,s,o;this.index<this.text.length;){o=this.text.charAt(this.index);if("."!==o&&!this.isIdent(o)&&!this.isNumber(o))break;"."===o&&(r=this.index),t+=o,this.index++}if(r)for(i=this.index;i<this.text.length;){o=this.text.charAt(i);if("("===o){s=t.substr(r-n+1),t=t.substr(0,r-n),this.index=i;break}if(!this.isWhitespace(o))break;i++}n={index:n,text:t};if(Nr.hasOwnProperty(t))n.fn=Nr[t],n.json=Nr[t];else{var u=sn(t,this.options,this.text);n.fn=c(function(e,t){return u(e,t)},{assign:function(n,r){return nn(n,t,r,e.text,e.options)}})}this.tokens.push(n),s&&(this.tokens.push({index:r,text:".",json:!1}),this.tokens.push({index:r+1,text:s,json:!1}))},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var s=this.text.charAt(this.index),r=r+s;if(i)"u"===s?(s=this.text.substring(this.index+1,this.index+5),s.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+s+"]"),this.index+=4,n+=String.fromCharCode(parseInt(s,16))):n=(i=Cr[s])?n+i:n+s,i=!1;else if("\\"===s)i=!0;else{if(s===e){this.index++,this.tokens.push({index:t,text:r,string:n,json:!0,fn:function(){return n}});return}n+=s}this.index++}this.throwError("Unterminated quote",t)}};var Lr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};Lr.ZERO=function(){return 0},Lr.prototype={constructor:Lr,parse:function(e,t){this.text=e,this.json=t,this.tokens=this.lexer.lex(e),t&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:e,index:0})});var n=t?this.primary():this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n.literal=!!n.literal,n.constant=!!n.constant,n},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();(e=t.fn)||this.throwError("not a primary expression",t),t.json&&(e.constant=!0,e.literal=!0)}for(var n;t=this.expect("(","[",".");)"("===t.text?(e=this.functionCall(e,n),n=null):"["===t.text?(n=e,e=this.objectIndex(e)):"."===t.text?(n=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw Sr("syntax",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw Sr("ueoe",this.text);return this.tokens[0]},peek:function(e,t,n,r){if(0<this.tokens.length){var i=this.tokens[0],s=i.text;if(s===e||s===t||s===n||s===r||!(e||t||n||r))return i}return!1},expect:function(e,t,n,r){return(e=this.peek(e,t,n,r))?(this.json&&!e.json&&this.throwError("is not valid json",e),this.tokens.shift(),e):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return c(function(n,r){return e(n,r,t)},{constant:t.constant})},ternaryFn:function(e,t,n){return c(function(r,i){return e(r,i)?t(r,i):n(r,i)},{constant:e.constant&&t.constant&&n.constant})},binaryFn:function(e,t,n){return c(function(r,i){return t(r,i,e,n)},{constant:e.constant&&n.constant})},statements:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}},filterChain:function(){for(var e=this.expression(),t;;){if(!(t=this.expect("|")))return e;e=this.binaryFn(e,t.fn,this.filter())}},filter:function(){for(var e=this.expect(),t=this.$filter(e.text),n=[];;){if(!(e=this.expect(":"))){var r=function(e,r,i){i=[i];for(var s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return r}}n.push(this.expression())}},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary(),t,n;return(n=this.expect("="))?(e.assign||this.throwError("implies assignment but ["+this.text.substring(0,n.index)+"] can not be assigned to",n),t=this.ternary(),function(n,r){return e.assign(n,t(n,r),r)}):e},ternary:function(){var e=this.logicalOR(),t,n;if(!this.expect("?"))return e;t=this.ternary();if(n=this.expect(":"))return this.ternaryFn(e,t,this.ternary());this.throwError("expected :",n)},logicalOR:function(){for(var e=this.logicalAND(),t;;){if(!(t=this.expect("||")))return e;e=this.binaryFn(e,t.fn,this.logicalAND())}},logicalAND:function(){var e=this.equality(),t;if(t=this.expect("&&"))e=this.binaryFn(e,t.fn,this.logicalAND());return e},equality:function(){var e=this.relational(),t;if(t=this.expect("==","!=","===","!=="))e=this.binaryFn(e,t.fn,this.equality());return e},relational:function(){var e=this.additive(),t;if(t=this.expect("<",">","<=",">="))e=this.binaryFn(e,t.fn,this.relational());return e},additive:function(){for(var e=this.multiplicative(),t;t=this.expect("+","-");)e=this.binaryFn(e,t.fn,this.multiplicative());return e},multiplicative:function(){for(var e=this.unary(),t;t=this.expect("*","/","%");)e=this.binaryFn(e,t.fn,this.unary());return e},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(Lr.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this,n=this.expect().text,r=sn(n,this.options,this.text);return c(function(t,n,i){return r(i||e(t,n),n)},{assign:function(r,i,s){return nn(e(r,s),n,i,t.text,t.options)}})},objectIndex:function(e){var t=this,r=this.expression();return this.consume("]"),c(function(i,s){var o=e(i,s),u=r(i,s),a;return o?((o=tn(o[u],t.text))&&o.then&&t.options.unwrapPromises&&(a=o,"$$v"in o||(a.$$v=n,a.then(function(e){a.$$v=e})),o=o.$$v),o):n},{assign:function(n,i,s){var o=r(n,s);return tn(e(n,s),t.text)[o]=i}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var r=this;return function(i,s){for(var o=[],u=t?t(i,s):i,a=0;a<n.length;a++)o.push(n[a](i,s));return a=e(i,s,u)||d,tn(u,r.text),tn(a,r.text),o=a.apply?a.apply(u,o):a(o[0],o[1],o[2],o[3],o[4]),tn(o,r.text)}},arrayDeclaration:function(){var e=[],t=!0;if("]"!==this.peekToken().text)do{var n=this.expression();e.push(n),n.constant||(t=!1)}while(this.expect(","));return this.consume("]"),c(function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r},{literal:!0,constant:t})},object:function(){var e=[],t=!0;if("}"!==this.peekToken().text)do{var n=this.expect(),n=n.string||n.text;this.consume(":");var r=this.expression();e.push({key:n,value:r}),r.constant||(t=!1)}while(this.expect(","));return this.consume("}"),c(function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i];r[s.key]=s.value(t,n)}return r},{literal:!0,constant:t})}};var Ar={},Or=r("$sce"),Mr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},_r=t.createElement("a"),Dr=/^\/?.*?:(\/.*)/,Pr=mn(e.location.href,!0);bn.$inject=["$provide"],En.$inject=["$locale"],Sn.$inject=["$locale"];var Hr=".",Br={yyyy:Nn("FullYear",4),yy:Nn("FullYear",2,0,!0),y:Nn("FullYear",1),MMMM:Cn("Month"),MMM:Cn("Month",!0),MM:Nn("Month",2,1),M:Nn("Month",1,1),dd:Nn("Date",2),d:Nn("Date",1),HH:Nn("Hours",2),H:Nn("Hours",1),hh:Nn("Hours",2,-12),h:Nn("Hours",1,-12),mm:Nn("Minutes",2),m:Nn("Minutes",1),ss:Nn("Seconds",2),s:Nn("Seconds",1),sss:Nn("Milliseconds",3),EEEE:Cn("Day"),EEE:Cn("Day",!0),a:function(e,t){return 12>e.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){return e=-1*e.getTimezoneOffset(),e=(0<=e?"+":"")+(Tn(Math[0<e?"floor":"ceil"](e/60),2)+Tn(Math.abs(e%60),2))}},jr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Fr=/^\-?\d+$/;kn.$inject=["$locale"];var Ir=m(Hn),qr=m(Bn);On.$inject=["$parse"];var Rr=m({restrict:"E",compile:function(e,n){return 8>=jn&&(n.href||n.name||n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.on("click",function(e){t.attr("href")||e.preventDefault()})}}}),Ur={};s(or,function(e,t){if("multiple"!=e){var n=Lt("ng-"+t);Ur[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}}),s(["src","srcset","href"],function(e){var t=Lt("ng-"+e);Ur[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),jn&&r.prop(e,i[e]))})}}}});var zr={$addControl:d,$removeControl:d,$setValidity:d,$setDirty:d,$setPristine:d};_n.$inject=["$element","$attrs","$scope"];var Wr=function(e){return["$timeout",function(t){return{name:"form",restrict:e?"EAC":"E",controller:_n,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};er(r[0],"submit",o),r.on("$destroy",function(){t(function(){tr(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),a=i.name||i.ngForm;a&&nn(e,a,s,a),u&&r.on("$destroy",function(){u.$removeControl(s),a&&nn(e,a,n,a),c(s,zr)})}}}}}]},Xr=Wr(),Vr=Wr(!0),$r=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Jr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,Kr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Qr={text:Dn,number:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=i.$isEmpty(e);return t||Kr.test(e)?(i.$setValidity("number",!0),""===e?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return i.$isEmpty(e)?"":""+e}),r.min&&(e=function(e){var t=parseFloat(r.min);return!i.$isEmpty(e)&&e<t?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)},i.$parsers.push(e),i.$formatters.push(e)),r.max&&(e=function(e){var t=parseFloat(r.max);return!i.$isEmpty(e)&&e>t?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)},i.$parsers.push(e),i.$formatters.push(e)),i.$formatters.push(function(e){return i.$isEmpty(e)||E(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),e=function(e){return i.$isEmpty(e)||$r.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),e=function(e){return i.$isEmpty(e)||Jr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){g(n.name)&&t.attr("name",f()),t.on("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;w(i)||(i=!0),w(s)||(s=!1),t.on("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e!==i},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:d,button:d,submit:d,reset:d},Gr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Qr[Hn(i.type)]||Qr.text)(n,r,i,s,t,e)}}}],Yr="ng-valid",Zr="ng-invalid",ei="ng-pristine",ti="ng-dirty",ni=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,o){function u(e,t){t=t?"-"+J(t,"-"):"",i.removeClass((e?Zr:Yr)+t).addClass((e?Yr:Zr)+t)}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=n.name;var a=o(n.ngModel),f=a.assign;if(!f)throw r("ngModel")("nonassign",n.ngModel,q(i));this.$render=d,this.$isEmpty=function(e){return g(e)||""===e||null===e||e!==e};var l=i.inheritedData("$formController")||zr,c=0,h=this.$error={};i.addClass(ei),u(!0),this.$setValidity=function(e,t){h[e]!==!t&&(t?(h[e]&&c--,c||(u(!0),this.$valid=!0,this.$invalid=!1)):(u(!1),this.$invalid=!0,this.$valid=!1,c++),h[e]=!t,u(t,e),l.$setValidity(e,t,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,i.removeClass(ti).addClass(ei)},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(ei).addClass(ti),l.$setDirty()),s(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,f(e,n),s(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=a(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],ri=function(){return{require:["ngModel","^?form"],controller:ni,link:function(e,t,n,r){var i=r[0],s=r[1]||zr;s.$addControl(i),e.$on("$destroy",function(){s.$removeControl(i)})}}},ii=m({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),si=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!r.$isEmpty(e))return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},oi=function(){return{require:"ngModel",link:function(e,t,r,i){var o=(e=/\/(.*)\//.exec(r.ngList))&&RegExp(e[1])||r.ngList||",";i.$parsers.push(function(e){if(!g(e)){var t=[];return e&&s(e.split(o),function(e){e&&t.push(Jn(e))}),t}}),i.$formatters.push(function(e){return x(e)?e.join(", "):n}),i.$isEmpty=function(e){return!e||!e.length}}}},ui=/^(true|false|\d+)$/,ai=function(){return{priority:100,compile:function(e,t){return ui.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},fi=Mn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),li=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],ci=["$sce","$parse",function(e,t){return function(n,r,i){r.addClass("ng-binding").data("$binding",i.ngBindHtml);var s=t(i.ngBindHtml);n.$watch(function(){return(s(n)||"").toString()},function(t){r.html(e.getTrustedHtml(s(n))||"")})}}],hi=Pn("",!0),pi=Pn("Odd",0),di=Pn("Even",1),vi=Mn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),mi=[function(){return{scope:!0,controller:"@"}}],gi={};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Lt("ng-"+e);gi[t]=["$parse",function(n){return{compile:function(r,i){var s=n(i[t]);return function(t,n,r){n.on(Hn(e),function(e){t.$apply(function(){s(t,{$event:e})})})}}}}]});var yi=["$animate",function(e){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,s,o){var u,a;n.$watch(i.ngIf,function(s){I(s)?a||(a=n.$new(),o(a,function(n){u={startNode:n[0],endNode:n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" ")},e.enter(n,r.parent(),r)})):(a&&(a.$destroy(),a=null),u&&(e.leave(Z(u)),u=null))})}}}],bi=["$http","$templateCache","$anchorScroll","$compile","$animate","$sce",function(e,t,n,r,i,s){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",compile:function(o,u){var a=u.ngInclude||u.src,f=u.onload||"",l=u.autoscroll;return function(o,u,c,h,p){var d=0,v,m,g=function(){v&&(v.$destroy(),v=null),m&&(i.leave(m),m=null)};o.$watch(s.parseAsResourceUrl(a),function(s){var a=function(){!y(l)||l&&!o.$eval(l)||n()},c=++d;s?(e.get(s,{cache:t}).success(function(e){if(c===d){var t=o.$new();p(t,function(n){g(),v=t,m=n,m.html(e),i.enter(m,null,u,a),r(m.contents())(v),v.$emit("$includeContentLoaded"),o.$eval(f)})}}).error(function(){c===d&&g()}),o.$emit("$includeContentRequested")):g()})}}}}],wi=Mn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Ei=Mn({terminal:!0,priority:1e3}),Si=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,i,o){var u=o.count,a=o.$attr.when&&i.attr(o.$attr.when),f=o.offset||0,l=r.$eval(a)||{},c={},h=t.startSymbol(),p=t.endSymbol(),d=/^when(Minus)?(.+)$/;s(o,function(e,t){d.test(t)&&(l[Hn(t.replace("when","").replace("Minus","-"))]=i.attr(o.$attr[t]))}),s(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),r.$watch(function(){var t=parseFloat(r.$eval(u));return isNaN(t)?"":(t in l||(t=e.pluralCat(t-f)),c[t](r,i,!0))},function(e){i.text(e)})}}}],xi=["$parse","$animate",function(e,n){var o=r("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(r,u,a,f,l){var c=a.ngRepeat,h=c.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),p,d,v,m,g,y,b={$id:yt};if(!h)throw o("iexp",c);a=h[1],f=h[2],(h=h[4])?(p=e(h),d=function(e,t,n){return y&&(b[y]=e),b[g]=t,b.$index=n,p(r,b)}):(v=function(e,t){return yt(t)},m=function(e){return e}),h=a.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw o("iidexp",a);g=h[3]||h[1],y=h[2];var w={};r.$watchCollection(f,function(e){var a,f,h=u[0],p,b={},E,S,x,T,N,C,k=[];if(i(e))N=e,p=d||v;else{p=d||m,N=[];for(x in e)e.hasOwnProperty(x)&&"$"!=x.charAt(0)&&N.push(x);N.sort()}E=N.length,f=k.length=N.length;for(a=0;a<f;a++)if(x=e===N?a:N[a],T=e[x],T=p(x,T,a),G(T,"`track by` id"),w.hasOwnProperty(T))C=w[T],delete w[T],b[T]=C,k[a]=C;else{if(b.hasOwnProperty(T))throw s(k,function(e){e&&e.startNode&&(w[e.id]=e)}),o("dupes",c,T);k[a]={id:T},b[T]=!1}for(x in w)w.hasOwnProperty(x)&&(C=w[x],a=Z(C),n.leave(a),s(a,function(e){e.$$NG_REMOVED=!0}),C.scope.$destroy());a=0;for(f=N.length;a<f;a++){x=e===N?a:N[a],T=e[x],C=k[a],k[a-1]&&(h=k[a-1].endNode);if(C.startNode){S=C.scope,p=h;do p=p.nextSibling;while(p&&p.$$NG_REMOVED);C.startNode!=p&&n.move(Z(C),null,Fn(h)),h=C.endNode}else S=r.$new();S[g]=T,y&&(S[y]=x),S.$index=a,S.$first=0===a,S.$last=a===E-1,S.$middle=!S.$first&&!S.$last,S.$odd=!(S.$even=0===(a&1)),C.startNode||l(S,function(e){e[e.length++]=t.createComment(" end ngRepeat: "+c+" "),n.enter(e,null,Fn(h)),h=e,C.scope=S,C.startNode=h&&h.endNode?h.endNode:e[0],C.endNode=e[e.length-1],b[C.id]=C})}w=b})}}}],Ti=["$animate",function(e){return function(t,n,r){t.$watch(r.ngShow,function(t){e[I(t)?"removeClass":"addClass"](n,"ng-hide")})}}],Ni=["$animate",function(e){return function(t,n,r){t.$watch(r.ngHide,function(t){e[I(t)?"addClass":"removeClass"](n,"ng-hide")})}}],Ci=Mn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&s(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ki=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,n,r,i){var o,u,a=[];t.$watch(r.ngSwitch||r.on,function(n){for(var f=0,l=a.length;f<l;f++)a[f].$destroy(),e.leave(u[f]);u=[],a=[];if(o=i.cases["!"+n]||i.cases["?"])t.$eval(r.change),s(o,function(n){var r=t.$new();a.push(r),n.transclude(r,function(t){var r=n.element;u.push(t),e.enter(t,r.parent(),r)})})})}}}],Li=Mn({transclude:"element",priority:800,require:"^ngSwitch",compile:function(e,t){return function(e,n,r,i,s){i.cases["!"+t.ngSwitchWhen]=i.cases["!"+t.ngSwitchWhen]||[],i.cases["!"+t.ngSwitchWhen].push({transclude:s,element:n})}}}),Ai=Mn({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Oi=Mn({controller:["$element","$transclude",function(e,t){if(!t)throw r("ngTransclude")("orphan",q(e));this.$transclude=t}],link:function(e,t,n,r){r.$transclude(function(e){t.html(""),t.append(e)})}}),Mi=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){"text/ng-template"==n.type&&e.put(n.id,t[0].text)}}}],_i=r("ngOptions"),Di=m({terminal:!0}),Pi=["$compile","$parse",function(e,r){var i=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,u={$setViewValue:d};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){G(t,'"option value"'),i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+yt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=d})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(N.parent()&&N.remove(),t.val(e),""===e&&E.prop("selected",!0)):g(e)&&E?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){N.parent()&&N.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var r;n.$render=function(){var e=new bt(n.$viewValue);s(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){D(r,n.$viewValue)||(r=M(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];s(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,s,u){function a(){var e={"":[]},n=[""],r,i,a,f,b;f=u.$modelValue,b=v(t)||[];var N=h?o(b):b,C,k,L;k={},a=!1;var A,O;if(m)if(g&&x(f))for(a=new bt([]),L=0;L<f.length;L++)k[c]=f[L],a.put(g(t,k),f[L]);else a=new bt(f);for(L=0;C=N.length,L<C;L++){i=L;if(h){i=N[L];if("$"===i.charAt(0))continue;k[h]=i}k[c]=b[i],r=p(t,k)||"",(i=e[r])||(i=e[r]=[],n.push(r)),m?r=y(a.remove(g?g(t,k):d(t,k))):(g?(r={},r[c]=f,r=g(t,r)===g(t,k)):r=f===d(t,k),a=a||r),A=l(t,k),A=y(A)?A:"",i.push({id:g?g(t,k):h?N[L]:L,label:A,selected:r})}m||(w||null===f?e[""].unshift({id:"",label:"",selected:!a}):a||e[""].unshift({id:"?",label:"",selected:!0})),k=0;for(N=n.length;k<N;k++){r=n[k],i=e[r],E.length<=k?(f={element:T.clone().attr("label",r),label:i.label},b=[f],E.push(b),s.append(f.element)):(b=E[k],f=b[0],f.label!=r&&f.element.attr("label",f.label=r)),A=null,L=0;for(C=i.length;L<C;L++)a=i[L],(r=b[L+1])?(A=r.element,r.label!==a.label&&A.text(r.label=a.label),r.id!==a.id&&A.val(r.id=a.id),A[0].selected!==a.selected&&A.prop("selected",r.selected=a.selected)):(""===a.id&&w?O=w:(O=S.clone()).val(a.id).attr("selected",a.selected).text(a.label),b.push({element:O,label:a.label,id:a.id,selected:a.selected}),A?A.after(O):f.element.append(O),A=O);for(L++;b.length>L;)b.pop().element.remove()}for(;E.length>k;)E.pop()[0].element.remove()}var f;if(!(f=b.match(i)))throw _i("iexp",b,q(s));var l=r(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=r(f[3]||""),d=r(f[2]?f[1]:c),v=r(f[7]),g=f[8]?r(f[8]):null,E=[[{element:s,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),s.html(""),s.on("change",function(){t.$apply(function(){var e,r=v(t)||[],i={},o,a,f,l,p,y,b;if(m){for(a=[],l=0,y=E.length;l<y;l++)for(e=E[l],f=1,p=e.length;f<p;f++)if((o=e[f].element)[0].selected){o=o.val(),h&&(i[h]=o);if(g)for(b=0;b<r.length&&(i[c]=r[b],g(t,i)!=o);b++);else i[c]=r[o];a.push(d(t,i))}}else if(o=s.val(),"?"==o)a=n;else if(""===o)a=null;else if(g){for(b=0;b<r.length;b++)if(i[c]=r[b],g(t,i)==o){a=d(t,i);break}}else i[c]=r[o],h&&(i[h]=o),a=d(t,i);u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){var d=l[0],v=l[1],m=f.multiple,b=f.ngOptions,w=!1,E,S=Fn(t.createElement("option")),T=Fn(t.createElement("optgroup")),N=S.clone();l=0;for(var C=a.children(),k=C.length;l<k;l++)if(""===C[l].value){E=w=C.eq(l);break}d.init(v,w,N);if(m&&(f.required||f.ngRequired)){var L=function(e){return v.$setValidity("required",!f.required||e&&e.length),e};v.$parsers.push(L),v.$formatters.unshift(L),f.$observe("required",function(){L(v.$viewValue)})}b?p(u,a,v):m?h(u,a,v):c(u,a,v,d)}}}}],Hi=["$interpolate",function(e){var t={addOption:d,removeOption:d};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.on("$destroy",function(){o.removeOption(r.value)})}}}}],Bi=m({restrict:"E",terminal:!0});(In=e.jQuery)?(Fn=In,c(In.fn,{scope:sr.scope,isolateScope:sr.isolateScope,controller:sr.controller,injector:sr.injector,inheritedData:sr.inheritedData}),nt("remove",!0,!0,!1),nt("empty",!1,!1,!1),nt("html",!1,!1,!0)):Fn=rt,Wn.element=Fn,function(t){c(t,{bootstrap:$,copy:M,extend:c,equals:D,element:Fn,forEach:s,injector:Et,noop:d,bind:H,toJson:j,fromJson:F,identity:v,isUndefined:g,isDefined:y,isString:w,isFunction:T,isObject:b,isNumber:E,isElement:k,isArray:x,version:Qn,isDate:S,lowercase:Hn,uppercase:Bn,callbacks:{counter:0},$$minErr:r,$$csp:P}),Xn=et(e);try{Xn("ngLocale")}catch(n){Xn("ngLocale",[]).provider("$locale",qt)}Xn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",kt).directive({a:Rr,input:Gr,textarea:Gr,form:Xr,script:Mi,select:Pi,style:Bi,option:Hi,ngBind:fi,ngBindHtml:ci,ngBindTemplate:li,ngClass:hi,ngClassEven:di,ngClassOdd:pi,ngCloak:vi,ngController:mi,ngForm:Vr,ngHide:Ni,ngIf:yi,ngInclude:bi,ngInit:wi,ngNonBindable:Ei,ngPluralize:Si,ngRepeat:xi,ngShow:Ti,ngStyle:Ci,ngSwitch:ki,ngSwitchWhen:Li,ngSwitchDefault:Ai,ngOptions:Di,ngTransclude:Oi,ngModel:ri,ngList:oi,ngChange:ii,required:si,ngRequired:si,ngValue:ai}).directive(Ur).directive(gi),e.provider({$anchorScroll:St,$animate:dr,$browser:Tt,$cacheFactory:Nt,$controller:At,$document:Ot,$exceptionHandler:Mt,$filter:bn,$interpolate:Ft,$interval:It,$http:Ht,$httpBackend:Bt,$location:Yt,$log:Zt,$parse:on,$rootScope:fn,$q:un,$sce:pn,$sceDelegate:hn,$sniffer:dn,$templateCache:Ct,$timeout:vn,$window:yn})}])}(Wn),Fn(t).ready(function(){V(t,$)})}(window,document),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-start{clip:rect(0,auto,auto,0);-ms-zoom:1.0001;}.ng-animate-active{clip:rect(-1px,auto,auto,0);-ms-zoom:1;}</style>'),n("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!csmain",["require","cs!jquery","angular"],function(e,t,n){var r,i,s;r=function(e){var t,n;return n=!1,t=null,function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},i=r(function(){e(["cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e){n.bootstrap(t(".wrap"),[e.name])})}),document.readyState==="complete"||document.readyState==="loaded"?i():t(window).load(function(){return i()}),s=1e4,window.setTimeout(function(){return i()},s)})}.call(this),t({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),n("main",function(){}),function(e,t,n){var r=t.$$minErr("$resource"),i=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;t.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(e,s){function o(e,t){this.template=e,this.defaults=t||{},this.urlParams={}}function u(m,g,y){function b(e,t){var s={};return t=h({},g,t),c(t,function(t,o){d(t)&&(t=t());var u;if(t&&t.charAt&&"@"==t.charAt(0)){u=e;var a=t.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!i.test("."+a))throw r("badmember",a);for(var a=a.split("."),f=0,l=a.length;f<l&&u!==n;f++){var c=a[f];u=null!==u?u[c]:n}}else u=t;s[o]=u}),s}function S(e){return e.resource}function T(e){p(e||{},this)}var N=new o(m);return y=h({},a,y),c(y,function(i,o){var u=/^(POST|PUT|PATCH)$/i.test(i.method);T[o]=function(o,a,m,g){var y={},w,k,L;switch(arguments.length){case 4:L=g,k=m;case 3:case 2:if(!d(a)){y=o,w=a,k=m;break}if(d(o)){k=o,L=a;break}k=a,L=m;case 1:d(o)?k=o:u?w=o:y=o;break;case 0:break;default:throw r("badargs",arguments.length)}var A=w instanceof T,O=A?w:i.isArray?[]:new T(w),M={},_=i.interceptor&&i.interceptor.response||S,P=i.interceptor&&i.interceptor.responseError||n;return c(i,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(M[t]=p(e))}),u&&(M.data=w),N.setUrlParams(M,h({},b(w,i.params||{}),y),i.url),y=e(M).then(function(e){var n=e.data,s=O.$promise;if(n){if(t.isArray(n)!==!!i.isArray)throw r("badcfg",i.isArray?"array":"object",t.isArray(n)?"array":"object");i.isArray?(O.length=0,c(n,function(e){O.push(new T(e))})):(p(n,O),O.$promise=s)}return O.$resolved=!0,e.resource=O,e},function(e){return O.$resolved=!0,(L||l)(e),s.reject(e)}),y=y.then(function(e){var t=_(e);return(k||l)(t,e.headers),t},P),A?y:(O.$promise=y,O.$resolved=!1,O)},T.prototype["$"+o]=function(e,t,n){return d(e)&&(n=t,t=e,e={}),e=T[o](e,this,t,n),e.$promise||e}}),T.bind=function(e){return u(m,h({},g,e),y)},T}var a={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},l=t.noop,c=t.forEach,h=t.extend,p=t.copy,d=t.isFunction;return o.prototype={setUrlParams:function(e,n,i){var s=this,o=i||s.template,u,a,l=s.urlParams={};c(o.split(/\W/),function(e){if("hasOwnProperty"===e)throw r("badname");!/^\d+$/.test(e)&&e&&RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(o)&&(l[e]=!0)}),o=o.replace(/\\:/g,":"),n=n||{},c(s.urlParams,function(e,r){u=n.hasOwnProperty(r)?n[r]:s.defaults[r],t.isDefined(u)&&null!==u?(a=encodeURIComponent(u).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),o=o.replace(RegExp(":"+r+"(\\W|$)","g"),a+"$1")):o=o.replace(RegExp("(/?):"+r+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),o=o.replace(/\/+$/,""),o=o.replace(/\/\.(?=\w+($|\?))/,"."),e.url=o.replace(/\/\\\./,"/."),c(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},u}])}(window,window.angular),n("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){n("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){n("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={loading:!0,crop:!1,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.updateOptions=function(e){var t;e["pte-action"]="change-options",o.log("Updating Options",e),t=n.thumbnailResource.get(e,function(){return o.log("Updated options")})},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate||f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){l(),t.forEach(n.thumbnails,function(e){return n.trash(e)}),u("randomizeUrl")({reset:!0})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o,u;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(t-.01<(u=r.size)&&u<t+.01){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){t!=="$promise"&&t!=="$resolved"&&(e.name=t,this.thumbnails.push(e),a(e))},n),n.updateSelected(),o.info("Disabling loading screen"),n.changePage("crop")}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1},n.anySelected=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.selected)return!0}return!1},n.$watch("currentThumbnailBarPosition",function(e,t){if(e===t)return;n.updateOptions({pte_thumbnail_bar:n.currentThumbnailBarPosition})}),n.toggleCurrentThumbnailBarPosition=function(){var e;e=["vertical","horizontal"],n.currentThumbnailBarPosition===e[0]?n.currentThumbnailBarPosition=e[1]:n.currentThumbnailBarPosition=e[0]}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),n("jcrop",function(){}),function(){n("cs!jcrop-api",["cs!jquery","cs!settings","jcrop"],function(e,t){var n,r,i;return i=function(e,t){var n,r,i,s,o,u,a;return a=[],r=a[0],n=a[1],u=a[2],o=a[3],s=0,i=function(){return s=new Date,u=null,o=e.apply(r,n),null},function(){var a,f;return a=new Date,f=t-(a-s),r=this,n=arguments,f<=0?(clearTimeout(u),u=null,s=a,o=e.apply(r,n)):u||(u=setTimeout(i,f)),o}},r=null,n={onChange:i(function(){var e,t,n,i,s,o,u,a,f,l;t=function(t){t!==e&&r.setOptions({bgColor:t})},u=function(){var e;return e=function(e,t){return e==null?!0:e===0?!1:e<t},a&&e(s,f)&&e(i,o)?!1:!a&&e(s,f)||e(i,o)?!1:!0},n=this.getOptions().cropConstraints;if(!n){t("black");return}s=n[0],i=n[1],a=n[2],e=this.getOptions().bgColor,l=this.tellSelect(),f=l.w,o=l.h,u()?t("red"):t("green")},50),onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(isNaN(n))return;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){n("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){if(t===n)return;e.updateOptions({pte_crop_save:e.pteCropSave?"true":"false"})}),e.userDisabledFitCrop=!1,e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,n===null&&(e.userDisabledFitCrop?e.setInfoMessage(e.i18n.crop_problems):(e.pteFitCrop=!0,e.pteFitCropColor=r.i18n.transparent)),t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null,!1],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.pteJpgCompression=null,e.updateSelected())},e.fitToCrop=function(t){var i;if(!n("#pteFitCrop").prop("checked")){e.userDisabledFitCrop=!0,e.setInfoMessage(e.i18n.crop_problems);return}i=e.pteFitCropColor||"",n("#pte-iris-dialog").find("input").val(i).iris({hide:!1}).end().dialog({dialogClass:"wp-dialog",buttons:[{text:r.i18n.fitCrop_transparent,click:function(){return e.$apply("pteFitCropColor = '"+r.i18n.transparent+"'"),n(this).dialog("close")}},{text:r.i18n.fitCrop_save,click:function(){return e.$apply("pteFitCropColor = '"+n("input",this).val()+"'"),n(this).dialog("close")}}]})},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;t=null,i=[null,null,!1];try{l=!1,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],n=c.crop,p=c.width,a=c.height,n=+n,p=+p,a=+a,h=p/a;if(c.selected){o=i[0],s=i[1],f=i[2];if(!o||0<p&&o<p)o=p;if(!s||0<a&&s<a)s=a;f=f||n,i=[o,s,f],l=!0}if(c.selected&&n>0){if(t!==null&&(h+.01<t||t<h-.01))throw"PTE_EXCEPTION";t=h}}t===null&&l===!1&&(t=r.width/r.height)}catch(g){u=g,t=null}e.aspectRatio=t,e.cropConstraints=i},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d,v,m;if(e.cropInProgress)return;e.cropInProgress=!0,f=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(f.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}v=t.tellSelect(),c=v.x,p=v.y,l=v.w,a=v.h,h=v.x2,d=v.y2;if(c===0&&p===0&&l===0&&a===0&&h===0&&d===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}o={"pte-action":"resize-images",id:r.id,"pte-sizes[]":f,w:l,h:a,x:c,y:p},e.pteCropSave&&(o.save="true"),0<=(m=+e.pteJpgCompression)&&m<=100&&(o["pte-jpeg-compression"]=e.pteJpgCompression),e.pteFitCrop&&(s=e.pteFitCropColor||"",s===r.i18n.transparent&&(s=""),o["pte-fit-crop-color"]=s),u=e.thumbnailResource.get(o,function(){e.cropInProgress=!1;if(u!=null?u.immediate:void 0)return e.confirmResults(u);e.setNonces({"pte-nonce":u["pte-nonce"],"pte-delete-nonce":u["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;u.thumbnails[t.name]&&(n={url:u.thumbnails[t.name].url,file:u.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){n("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),t(["main"])})();
17
  * https://github.com/tapmodo/Jcrop
18
  */
19
 
20
+ (function(){var e,t,n;(function(r){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(e){if(d(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!d(a,e)&&!d(c,e))throw new Error("No "+e);return a[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(e,t,n,i){var s,l,h,p,v,g=[],w=typeof n,E;i=i||e;if(w==="undefined"||w==="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(v=0;v<t.length;v+=1){p=o(t[v],i),l=p.f;if(l==="require")g[v]=u.require(e);else if(l==="exports")g[v]=u.exports(e),E=!0;else if(l==="module")s=g[v]=u.module(e);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=n?n.apply(a[e],g):undefined;if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!E)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){return typeof e=="string"?u[e]?u[e](t):b(o(e,t).f):(e.splice||(l=e,t.splice?(e=t,t=n,n=null):e=r),t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},e._defined=a,n=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}})(),n("../apps/requirejs/almond",function(){}),n("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){n("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e){return function(){for(var t=arguments[0],n=1,t="["+(e?e+":":"")+t+"] http://errors.angularjs.org/1.2.1/"+(e?e+"/":"")+t;n<arguments.length;n++)t=t+(1==n?"?":"&")+"p"+(n-1)+"="+encodeURIComponent("function"==typeof arguments[n]?arguments[n].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[n]?"undefined":"string"!=typeof arguments[n]?JSON.stringify(arguments[n]):arguments[n]);return Error(t)}}function i(e){if(null==e||C(e))return!1;var t=e.length;return 1===e.nodeType&&t?!0:w(e)||x(e)||0===t||"number"==typeof t&&0<t&&t-1 in e}function s(e,t,n){var r;if(e)if(T(e))for(r in e)"prototype"!=r&&"length"!=r&&"name"!=r&&e.hasOwnProperty(r)&&t.call(n,e[r],r);else if(e.forEach&&e.forEach!==s)e.forEach(t,n);else if(i(e))for(r=0;r<e.length;r++)t.call(n,e[r],r);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r);return e}function o(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function u(e,t,n){for(var r=o(e),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function a(e){return function(t,n){e(n,t)}}function f(){for(var e=$n.length,t;e;){e--,t=$n[e].charCodeAt(0);if(57==t)return $n[e]="A",$n.join("");if(90!=t)return $n[e]=String.fromCharCode(t+1),$n.join("");$n[e]="0"}return $n.unshift("0"),$n.join("")}function l(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function c(e){var t=e.$$hashKey;return s(arguments,function(t){t!==e&&s(t,function(t,n){e[n]=t})}),l(e,t),e}function h(e){return parseInt(e,10)}function p(e,t){return c(new(c(function(){},{prototype:e})),t)}function d(){}function v(e){return e}function m(e){return function(){return e}}function g(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!=e&&"object"==typeof e}function w(e){return"string"==typeof e}function E(e){return"number"==typeof e}function S(e){return"[object Date]"==Un.apply(e)}function x(e){return"[object Array]"==Un.apply(e)}function T(e){return"function"==typeof e}function N(e){return"[object RegExp]"==Un.apply(e)}function C(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function k(e){return e&&(e.nodeName||e.on&&e.find)}function L(e,t,n){var r=[];return s(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r}function A(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function O(e,t){var n=A(e,t);return 0<=n&&e.splice(n,1),t}function M(e,t){if(C(e)||e&&e.$evalAsync&&e.$watch)throw zn("cpws");if(t){if(e===t)throw zn("cpi");if(x(e))for(var n=t.length=0;n<e.length;n++)t.push(M(e[n]));else{n=t.$$hashKey,s(t,function(e,n){delete t[n]});for(var r in e)t[r]=M(e[r]);l(t,n)}}else(t=e)&&(x(e)?t=M(e,[]):S(e)?t=new Date(e.getTime()):N(e)?t=RegExp(e.source):b(e)&&(t=M(e,{})));return t}function _(e,t){t=t||{};for(var n in e)e.hasOwnProperty(n)&&"$$"!==n.substr(0,2)&&(t[n]=e[n]);return t}function D(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&"object"==r){if(!x(e)){if(S(e))return S(t)&&e.getTime()==t.getTime();if(N(e)&&N(t))return e.toString()==t.toString();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||C(e)||C(t)||x(t))return!1;r={};for(i in e)if("$"!==i.charAt(0)&&!T(e[i])){if(!D(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!T(t[i]))return!1;return!0}if(!x(t))return!1;if((r=e.length)==t.length){for(i=0;i<r;i++)if(!D(e[i],t[i]))return!1;return!0}}return!1}function P(){return t.securityPolicy&&t.securityPolicy.isActive||t.querySelector&&(!!t.querySelector("[ng-csp]")||!!t.querySelector("[data-ng-csp]"))}function H(e,t){var n=2<arguments.length?qn.call(arguments,2):[];return!T(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(qn.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function B(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)?i=n:C(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function j(e,t){return"undefined"==typeof e?n:JSON.stringify(e,B,t?" ":null)}function F(e){return w(e)?JSON.parse(e):e}function I(e){return e&&0!==e.length?(e=Hn(""+e),e="f"!=e&&"0"!=e&&"false"!=e&&"no"!=e&&"n"!=e&&"[]"!=e):e=!1,e}function q(e){e=Fn(e).clone();try{e.html("")}catch(t){}var n=Fn("<div>").append(e).html();try{return 3===e[0].nodeType?Hn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Hn(t)})}catch(r){return Hn(n)}}function R(e){try{return decodeURIComponent(e)}catch(t){}}function U(e){var t={},n,r;return s((e||"").split("&"),function(e){e&&(n=e.split("="),r=R(n[0]),y(r)&&(e=y(n[1])?R(n[1]):!0,t[r]?x(t[r])?t[r].push(e):t[r]=[t[r],e]:t[r]=e))}),t}function z(e){var t=[];return s(e,function(e,n){x(e)?s(e,function(e){t.push(X(n,!0)+(!0===e?"":"="+X(e,!0)))}):t.push(X(n,!0)+(!0===e?"":"="+X(e,!0)))}),t.length?t.join("&"):""}function W(e){return X(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function X(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function V(e,n){function r(e){e&&i.push(e)}var i=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;s(a,function(n){a[n]=!0,r(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(s(e.querySelectorAll("."+n),r),s(e.querySelectorAll("."+n+"\\:"),r),s(e.querySelectorAll("["+n+"]"),r))}),s(i,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):s(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function $(n,r){var i=function(){n=Fn(n);if(n.injector()){var e=n[0]===t?"document":q(n);throw zn("btstrpd",e)}return r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.unshift("ng"),e=Et(r),e.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(e,t,n,r,i){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},o=/^NG_DEFER_BOOTSTRAP!/;if(e&&!o.test(e.name))return i();e.name=e.name.replace(o,""),Wn.resumeBootstrap=function(e){s(e,function(e){r.push(e)}),i()}}function J(e,t){return t=t||"_",e.replace(Kn,function(e,n){return(n?t:"")+e.toLowerCase()})}function K(e,t,n){if(!e)throw zn("areq",t||"?",n||"required");return e}function Q(e,t,n){return n&&x(e)&&(e=e[e.length-1]),K(T(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function G(e,t){if("hasOwnProperty"===e)throw zn("badname",t)}function Y(e,t,n){if(!t)return e;t=t.split(".");for(var r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&T(e)?H(i,e):e}function Z(e){if(e.startNode===e.endNode)return Fn(e.startNode);var t=e.startNode,n=[t];do{t=t.nextSibling;if(!t)break;n.push(t)}while(t!==e.endNode);return Fn(n)}function et(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng");return t(t(e,"angular",Object),"module",function(){var e={};return function(r,s,o){if("hasOwnProperty"===r)throw i("badname","module");return s&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),a}}if(!s)throw n("nomod",r);var t=[],i=[],u=e("$injector","invoke"),a={_invokeQueue:t,_runBlocks:i,requires:s,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:u,run:function(e){return i.push(e),this}};return o&&u(o),a})}})}function tt(e){return e.replace(nr,function(e,t,n,r){return r?n.toUpperCase():n}).replace(rr,"Moz$1")}function nt(e,t,n,r){function i(e){var i=n&&e?[this.filter(e)]:[this],o=t,u,a,f,l,c,h;if(!r||null!=e)for(;i.length;)for(u=i.shift(),a=0,f=u.length;a<f;a++)for(l=Fn(u[a]),o?l.triggerHandler("$destroy"):o=!o,c=0,l=(h=l.children()).length;c<l;c++)i.push(In(h[c]));return s.apply(this,arguments)}var s=In.fn[e],s=s.$original||s;i.$original=s,In.fn[e]=i}function rt(e){if(e instanceof rt)return e;if(!(this instanceof rt)){if(w(e)&&"<"!=e.charAt(0))throw ir("nosel");return new rt(e)}if(w(e)){var n=t.createElement("div");n.innerHTML="<div>&#160;</div>"+e,n.removeChild(n.firstChild),pt(this,n.childNodes),Fn(t.createDocumentFragment()).append(this)}else pt(this,e)}function it(e){return e.cloneNode(!0)}function st(e){ut(e);var t=0;for(e=e.childNodes||[];t<e.length;t++)st(e[t])}function ot(e,t,n,r){if(y(r))throw ir("offargs");var i=at(e,"events");at(e,"handle")&&(g(t)?s(i,function(t,n){tr(e,n,t),delete i[n]}):s(t.split(" "),function(t){g(n)?(tr(e,t,i[t]),delete i[t]):O(i[t]||[],n)}))}function ut(e,t){var r=e[Yn],i=Gn[r];i&&(t?delete Gn[r].data[t]:(i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),ot(e)),delete Gn[r],e[Yn]=n))}function at(e,t,n){var r=e[Yn],r=Gn[r||-1];if(!y(n))return r&&r[t];r||(e[Yn]=r=++Zn,r=Gn[r]={}),r[t]=n}function ft(e,t,n){var r=at(e,"data"),i=y(n),s=!i&&y(t),o=s&&!b(t);r||o||at(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];c(r,t)}}function lt(e,t){return e.getAttribute?-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" "):!1}function ct(e,t){t&&e.setAttribute&&s(t.split(" "),function(t){e.setAttribute("class",Jn((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Jn(t)+" "," ")))})}function ht(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");s(t.split(" "),function(e){e=Jn(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Jn(n))}}function pt(e,t){if(t){t=t.nodeName||!y(t.length)||C(t)?[t]:t;for(var n=0;n<t.length;n++)e.push(t[n])}}function dt(e,t){return vt(e,"$"+(t||"ngController")+"Controller")}function vt(e,t,r){e=Fn(e),9==e[0].nodeType&&(e=e.find("html"));for(t=x(t)?t:[t];e.length;){for(var i=0,s=t.length;i<s;i++)if((r=e.data(t[i]))!==n)return r;e=e.parent()}}function mt(e,t){var n=or[t.toLowerCase()];return n&&ur[e.nodeName]&&n}function gt(e,n){var r=function(r,i){r.preventDefault||(r.preventDefault=function(){r.returnValue=!1}),r.stopPropagation||(r.stopPropagation=function(){r.cancelBubble=!0}),r.target||(r.target=r.srcElement||t);if(g(r.defaultPrevented)){var o=r.preventDefault;r.preventDefault=function(){r.defaultPrevented=!0,o.call(r)},r.defaultPrevented=!1}r.isDefaultPrevented=function(){return r.defaultPrevented||!1===r.returnValue},s(n[i||r.type],function(t){t.call(e,r)}),8>=jn?(r.preventDefault=null,r.stopPropagation=null,r.isDefaultPrevented=null):(delete r.preventDefault,delete r.stopPropagation,delete r.isDefaultPrevented)};return r.elem=e,r}function yt(e){var t=typeof e,r;return"object"==t&&null!==e?"function"==typeof (r=e.$$hashKey)?r=e.$$hashKey():r===n&&(r=e.$$hashKey=f()):r=e,t+":"+r}function bt(e){s(e,this.put,this)}function wt(e){var t,n;return"function"==typeof e?(t=e.$inject)||(t=[],e.length&&(n=e.toString().replace(cr,""),n=n.match(ar),s(n[1].split(fr),function(e){e.replace(lr,function(e,n,r){t.push(r)})})),e.$inject=t):x(e)?(n=e.length-1,Q(e[n],"fn"),t=e.slice(0,n)):Q(e,"fn",!0),t}function Et(e){function t(e){return function(t,n){if(!b(t))return e(t,n);s(t,a(e))}}function n(e,t){G(e,"service");if(T(t)||x(t))t=p.instantiate(t);if(!t.$get)throw hr("pget",e);return h[e+f]=t}function r(e,t){return n(e,{$get:t})}function i(e){var t=[],n,r,o,u;return s(e,function(e){if(!c.get(e)){c.put(e,!0);try{if(w(e))for(n=Xn(e),t=t.concat(i(n.requires)).concat(n._runBlocks),r=n._invokeQueue,o=0,u=r.length;o<u;o++){var s=r[o],a=p.get(s[0]);a[s[1]].apply(a,s[2])}else T(e)?t.push(p.invoke(e)):x(e)?t.push(p.invoke(e)):Q(e,"module")}catch(f){throw x(e)&&(e=e[e.length-1]),f.message&&f.stack&&-1==f.stack.indexOf(f.message)&&(f=f.message+"\n"+f.stack),hr("modulerr",e,f.stack||f.message||f)}}}),t}function o(e,t){function n(n){if(e.hasOwnProperty(n)){if(e[n]===u)throw hr("cdep",l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=u,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=wt(e),o,u,a;u=0;for(o=s.length;u<o;u++){a=s[u];if("string"!=typeof a)throw hr("itkn",a);i.push(r&&r.hasOwnProperty(a)?r[a]:n(a))}e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(x(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),b(i)||T(i)?i:n},get:n,annotate:wt,has:function(t){return h.hasOwnProperty(t+f)||e.hasOwnProperty(t)}}}var u={},f="Provider",l=[],c=new bt,h={$provide:{provider:t(n),factory:t(r),service:t(function(e,t){return r(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return r(e,m(t))}),constant:t(function(e,t){G(e,"constant"),h[e]=t,v[e]=t}),decorator:function(e,t){var n=p.get(e+f),r=n.$get;n.$get=function(){var e=g.invoke(r,n);return g.invoke(t,null,{$delegate:e})}}}},p=h.$injector=o(h,function(){throw hr("unpr",l.join(" <- "))}),v={},g=v.$injector=o(v,function(e){return e=p.get(e+f),g.invoke(e.$get,e)});return s(i(e),function(e){g.invoke(e||d)}),g}function St(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return s(e,function(e){t||"a"!==Hn(e.nodeName)||(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=i(u.getElementsByName(e)))?r.scrollIntoView():"top"===e&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(){r.$evalAsync(o)}),o}]}function xt(e,t,r,i){function o(e){try{e.apply(null,qn.call(arguments,1))}finally{if(y--,0===y)for(;b.length;)try{b.pop()()}catch(t){r.error(t)}}}function u(e,t){(function n(){s(E,function(e){e()}),S=t(n,e)})()}function a(){N=null,x!=f.url()&&(x=f.url(),s(C,function(e){e(f.url())}))}var f=this,l=t[0],c=e.location,h=e.history,p=e.setTimeout,v=e.clearTimeout,m={};f.isMock=!1;var y=0,b=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){y++},f.notifyWhenNoOutstandingRequests=function(e){s(E,function(e){e()}),0===y?e():b.push(e)};var E=[],S;f.addPollFn=function(e){return g(S)&&u(100,p),E.push(e),e};var x=c.href,T=t.find("base"),N=null;f.url=function(t,n){c!==e.location&&(c=e.location);if(!t)return N||c.href.replace(/%27/g,"'");if(x!=t)return x=t,i.history?n?h.replaceState(null,"",t):(h.pushState(null,"",t),T.attr("href",T.attr("href"))):(N=t,n?c.replace(t):c.href=t),f};var C=[],k=!1;f.onUrlChange=function(t){return k||(i.history&&Fn(e).on("popstate",a),i.hashchange?Fn(e).on("hashchange",a):f.addPollFn(a),k=!0),C.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var L={},A="",O=f.baseHref();f.cookies=function(e,t){var i,s,o,u;if(!e){if(l.cookie!==A)for(A=l.cookie,i=A.split("; "),L={},o=0;o<i.length;o++)s=i[o],u=s.indexOf("="),0<u&&(e=unescape(s.substring(0,u)),L[e]===n&&(L[e]=unescape(s.substring(u+1))));return L}t===n?l.cookie=escape(e)+"=;path="+O+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(t)&&(i=(l.cookie=escape(e)+"="+escape(t)+";path="+O).length+1,4096<i&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return y++,n=p(function(){delete m[n],o(e)},t||0),m[n]=!0,n},f.defer.cancel=function(e){return m[e]?(delete m[e],v(e),o(d),!0):!1}}function Tt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new xt(e,r,t,n)}]}function Nt(){this.$get=function(){function e(e,n){function i(e){e!=h&&(p?p==e&&(p=e.n):p=e,s(e.n,e.p),s(e,h),h=e,h.n=null)}function s(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid",e);var o=0,u=c({},n,{id:e}),a={},f=n&&n.capacity||Number.MAX_VALUE,l={},h=null,p=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});i(n);if(!g(t))return e in a||o++,a[e]=t,o>f&&this.remove(p.key),t},get:function(e){var t=l[e];if(t)return i(t),a[e]},remove:function(e){var t=l[e];t&&(t==h&&(h=t.p),t==p&&(p=t.n),s(t.n,t.p),delete l[e],delete a[e],o--)},removeAll:function(){a={},o=0,l={},h=p=null},destroy:function(){l=u=a=null,delete t[e]},info:function(){return c({},u,{size:o})}}}var t={};return e.info=function(){var e={};return s(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Ct(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function kt(e){var r={},i="Directive",o=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,u=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^\s*(https?|ftp|mailto|tel|file):/,l=/^\s*(https?|ftp|file):|data:image\//,h=/^(on[a-z]+|formaction)$/;this.directive=function d(t,n){return G(t,"directive"),w(t)?(K(n,"directiveFactory"),r.hasOwnProperty(t)||(r[t]=[],e.factory(t+i,["$injector","$exceptionHandler",function(e,n){var i=[];return s(r[t],function(r,s){try{var o=e.invoke(r);T(o)?o={compile:m(o)}:!o.compile&&o.link&&(o.compile=m(o.link)),o.priority=o.priority||0,o.index=s,o.name=o.name||t,o.require=o.require||o.controller&&o.name,o.restrict=o.restrict||"A",i.push(o)}catch(u){n(u)}}),i}])),r[t].push(n)):s(t,a(d)),this},this.aHrefSanitizationWhitelist=function(e){return y(e)?(f=e,this):f},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(l=e,this):l},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate",function(e,a,d,g,y,E,S,N,C,k,L){function A(e,t,n,r,i){e instanceof Fn||(e=Fn(e)),s(e,function(t,n){3==t.nodeType&&t.nodeValue.match(/\S+/)&&(e[n]=Fn(t).wrap("<span></span>").parent()[0])});var o=M(e,t,e,n,r,i);return function(t,n,r){K(t,"scope");var i=n?sr.clone.call(e):e;s(r,function(e,t){i.data("$"+t+"Controller",e)}),r=0;for(var u=i.length;r<u;r++){var a=i[r];1!=a.nodeType&&9!=a.nodeType||i.eq(r).data("$scope",t)}return O(i,"ng-scope"),n&&n(i,t),o&&o(t,i,i),i}}function O(e,t){try{e.addClass(t)}catch(n){}}function M(e,t,r,i,s,o){function u(e,r,i,s){var o,u,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=a.length;c<h;p++)u=d[p],r=a[c++],o=a[c++],f=Fn(u),r?(r.scope?(l=e.$new(),f.data("$scope",l),O(f,"ng-scope")):l=e,(f=r.transclude)||!s&&t?r(o,l,u,i,D(e,f||t)):r(o,l,u,n,s)):o&&o(e,u.childNodes,n,s)}for(var a=[],f,l,c,h=0;h<e.length;h++)l=new Z,f=P(e[h],[],l,0===h?i:n,s),f=(o=f.length?F(f,e[h],l,t,r,null,[],[],o):null)&&o.terminal||!e[h].childNodes||!e[h].childNodes.length?null:M(e[h].childNodes,o?o.transclude:t),a.push(o),a.push(f),c=c||o||f,o=null;return c?u:null}function D(e,t){return function(n,r,i){var s=!1;return n||(n=e.$new(),s=n.$$transcluded=!0),r=t(n,r,i),s&&r.on("$destroy",H(n,n.$destroy)),r}}function P(e,t,n,r,i){var s=n.$attr,a;switch(e.nodeType){case 1:R(t,Lt(Vn(e).toLowerCase()),"E",r,i);var f,l,c;a=e.attributes;for(var h=0,p=a&&a.length;h<p;h++){var d=!1,v=!1;f=a[h];if(!jn||8<=jn||f.specified){l=f.name,c=Lt(l),rt.test(c)&&(l=J(c.substr(6),"-"));var m=c.replace(/(Start|End)$/,"");c===m+"Start"&&(d=l,v=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6)),c=Lt(l.toLowerCase()),s[c]=l,n[c]=f=Jn(jn&&"href"==l?decodeURIComponent(e.getAttribute(l,2)):f.value),mt(e,c)&&(n[c]=!0),Q(e,t,f,c),R(t,c,"A",r,i,d,v)}}e=e.className;if(w(e)&&""!==e)for(;a=u.exec(e);)c=Lt(a[2]),R(t,c,"C",r,i)&&(n[c]=Jn(a[3])),e=e.substr(a.index+a[0].length);break;case 3:V(t,e.nodeValue);break;case 8:try{if(a=o.exec(e.nodeValue))c=Lt(a[1]),R(t,c,"M",r,i)&&(n[c]=Jn(a[2]))}catch(g){}}return t.sort(W),t}function B(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw vr("uterdir",t,n);1==e.nodeType&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i)}else r.push(e);return Fn(r)}function j(e,t,n){return function(r,i,s,o,u){return i=B(i[0],t,n),e(r,i,s,o,u)}}function F(e,r,i,o,u,f,l,c,h){function p(e,t,n,r){if(e){n&&(e=j(e,n,r)),e.require=H.require;if(C===H||H.$$isolateScope)e=Y(e,{isolateScope:!0});l.push(e)}if(t){n&&(t=j(t,n,r)),t.require=H.require;if(C===H||H.$$isolateScope)t=Y(t,{isolateScope:!0});c.push(t)}}function v(e,t,n){var r,i="data",o=!1;if(w(e)){for(;"^"==(r=e.charAt(0))||"?"==r;)e=e.substr(1),"^"==r&&(i="inheritedData"),o=o||"?"==r;r=null,n&&"data"===i&&(r=n[e]),r=r||t[i]("$"+e+"Controller");if(!r&&!o)throw vr("ctreq",e,F)}else x(e)&&(r=[],s(e,function(e){r.push(v(e,t,n))}));return r}function m(e,t,o,u,f){function h(e,t){var r;return 2>arguments.length&&(t=e,e=n),M&&(r=x),f(e,t,r)}var p,m,g,y,b,w,x={},T;p=r===o?i:_(i,new Z(Fn(o),i.$attr)),m=p.$$element;if(C){var L=/^\s*([@=&])(\??)\s*(\w*)\s*$/;u=Fn(o),w=t.$new(!0),k&&k===C.$$originalDirective?u.data("$isolateScope",w):u.data("$isolateScopeNoTemplate",w),O(u,"ng-isolate-scope"),s(C.scope,function(e,n){var r=e.match(L)||[],i=r[3]||n,s="?"==r[2],r=r[1],o,u,f;w.$$isolateBindings[n]=r+i;switch(r){case"@":p.$observe(i,function(e){w[n]=e}),p.$$observers[i].$$scope=t,p[i]&&(w[n]=a(p[i])(t));break;case"=":if(s&&!p[i])break;u=E(p[i]),f=u.assign||function(){throw o=w[n]=u(t),vr("nonassign",p[i],C.name)},o=w[n]=u(t),w.$watch(function(){var e=u(t);return e!==w[n]&&(e!==o?o=w[n]=e:f(t,e=o=w[n])),e});break;case"&":u=E(p[i]),w[n]=function(e){return u(t,e)};break;default:throw vr("iscp",C.name,n,e)}})}T=f&&h,N&&s(N,function(e){var n={$scope:e===C||e.$$isolateScope?w:t,$element:m,$attrs:p,$transclude:T},r;b=e.controller,"@"==b&&(b=p[e.name]),r=S(b,n),x[e.name]=r,M||m.data("$"+e.name+"Controller",r),e.controllerAs&&(n.$scope[e.controllerAs]=r)}),u=0;for(g=l.length;u<g;u++)try{y=l[u],y(y.isolateScope?w:t,m,p,y.require&&v(y.require,m,x),T)}catch(A){d(A,q(m))}u=t,C&&(C.template||null===C.templateUrl)&&(u=w),e&&e(u,o.childNodes,n,f);for(u=c.length-1;0<=u;u--)try{y=c[u],y(y.isolateScope?w:t,m,p,y.require&&v(y.require,m,x),T)}catch(D){d(D,q(m))}}h=h||{};var g=-Number.MAX_VALUE,y,N=h.controllerDirectives,C=h.newIsolateScopeDirective,k=h.templateDirective;h=h.nonTlbTranscludeDirective;for(var L=!1,M=!1,D=i.$$element=Fn(r),H,F,R,W=o,V,$=0,J=e.length;$<J;$++){H=e[$];var K=H.$$start,Q=H.$$end;K&&(D=B(r,K,Q)),R=n;if(g>H.priority)break;if(R=H.scope)y=y||H,H.templateUrl||(X("new/isolated scope",C,H,D),b(R)&&(C=H));F=H.name,!H.templateUrl&&H.controller&&(R=H.controller,N=N||{},X("'"+F+"' controller",N[F],H,D),N[F]=H);if(R=H.transclude)L=!0,H.$$tlb||(X("transclusion",h,H,D),h=H),"element"==R?(M=!0,g=H.priority,R=B(r,K,Q),D=i.$$element=Fn(t.createComment(" "+F+": "+i[F]+" ")),r=D[0],G(u,Fn(qn.call(R,0)),r),W=A(R,o,g,f&&f.name,{nonTlbTranscludeDirective:h})):(R=Fn(it(r)).contents(),D.html(""),W=A(R,o));if(H.template)if(X("template",k,H,D),k=H,R=T(H.template)?H.template(D,i):H.template,R=nt(R),H.replace){f=H,R=Fn("<div>"+Jn(R)+"</div>").contents(),r=R[0];if(1!=R.length||1!==r.nodeType)throw vr("tplrt",F,"");G(u,D,r),J={$attr:{}},R=P(r,[],J);var et=e.splice($+1,e.length-($+1));C&&I(R),e=e.concat(R).concat(et),U(i,J),J=e.length}else D.html(R);if(H.templateUrl)X("template",k,H,D),k=H,H.replace&&(f=H),m=z(e.splice($,e.length-$),D,i,u,W,l,c,{controllerDirectives:N,newIsolateScopeDirective:C,templateDirective:k,nonTlbTranscludeDirective:h}),J=e.length;else if(H.compile)try{V=H.compile(D,i,W),T(V)?p(null,V,K,Q):V&&p(V.pre,V.post,K,Q)}catch(tt){d(tt,q(D))}H.terminal&&(m.terminal=!0,g=Math.max(g,H.priority))}return m.scope=y&&!0===y.scope,m.transclude=L&&W,m}function I(e){for(var t=0,n=e.length;t<n;t++)e[t]=p(e[t],{$$isolateScope:!0})}function R(t,s,o,u,a,f,l){if(s===a)return null;a=null;if(r.hasOwnProperty(s)){var c;s=e.get(s+i);for(var h=0,v=s.length;h<v;h++)try{c=s[h],(u===n||u>c.priority)&&-1!=c.restrict.indexOf(o)&&(f&&(c=p(c,{$$start:f,$$end:l})),t.push(c),a=c)}catch(m){d(m)}}return a}function U(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;s(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),s(t,function(t,s){"class"==s?(O(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==s?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==s.charAt(0)||e.hasOwnProperty(s)||(e[s]=t,r[s]=n[s])})}function z(e,t,n,r,i,o,u,a){var f=[],l,h,p=t[0],d=e.shift(),v=c({},d,{templateUrl:null,transclude:null,replace:null,$$originalDirective:d}),m=T(d.templateUrl)?d.templateUrl(t,n):d.templateUrl;return t.html(""),g.get(k.getTrustedResourceUrl(m),{cache:y}).success(function(c){var g,y;c=nt(c);if(d.replace){c=Fn("<div>"+Jn(c)+"</div>").contents(),g=c[0];if(1!=c.length||1!==g.nodeType)throw vr("tplrt",d.name,m);c={$attr:{}},G(r,t,g);var w=P(g,[],c);b(d.scope)&&I(w),e=w.concat(e),U(n,c)}else g=p,t.html(c);e.unshift(v),l=F(e,g,n,i,t,d,o,u,a),s(r,function(e,n){e==g&&(r[n]=t[0])});for(h=M(t[0].childNodes,i);f.length;){c=f.shift(),y=f.shift();var E=f.shift(),S=f.shift(),w=t[0];y!==p&&(w=it(g),G(E,Fn(y),w)),y=l.transclude?D(c,l.transclude):S,l(h,c,w,r,y)}f=null}).error(function(e,t,n,r){throw vr("tpload",r.url)}),function(e,t,n,r,i){f?(f.push(t),f.push(n),f.push(r),f.push(i)):l(h,t,n,r,i)}}function W(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function X(e,t,n,r){if(t)throw vr("multidir",t.name,n.name,e,q(r))}function V(e,t){var n=a(t,!0);n&&e.push({priority:0,compile:m(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),O(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function $(e,t){if("xlinkHref"==t||"IMG"!=Vn(e)&&("src"==t||"ngSrc"==t))return k.RESOURCE_URL}function Q(e,t,n,r){var i=a(n,!0);if(i){if("multiple"===r&&"SELECT"===Vn(e))throw vr("selmulti",q(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){n=s.$$observers||(s.$$observers={});if(h.test(r))throw vr("nodomevents");if(i=a(s[r],!0,$(e,r)))s[r]=i(t),(n[r]||(n[r]=[])).$$inter=!0,(s.$$observers&&s.$$observers[r].$$scope||t).$watch(i,function(e){s.$set(r,e)})}}}})}}function G(e,n,r){var i=n[0],s=n.length,o=i.parentNode,u,a;if(e)for(u=0,a=e.length;u<a;u++)if(e[u]==i){e[u++]=r,a=u+s-1;for(var f=e.length;u<f;u++,a++)a<f?e[u]=e[a]:delete e[u];e.length-=s-1;break}o&&o.replaceChild(r,i),e=t.createDocumentFragment(),e.appendChild(i),r[Fn.expando]=i[Fn.expando],i=1;for(s=n.length;i<s;i++)o=n[i],Fn(o).remove(),e.appendChild(o),delete n[i];n[0]=r,n.length=1}function Y(e,t){return c(function(){return e.apply(null,arguments)},e,t)}var Z=function(e,t){this.$$element=e,this.$attr=t||{}};Z.prototype={$normalize:Lt,$addClass:function(e){e&&0<e.length&&L.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&L.removeClass(this.$$element,e)},$set:function(e,t,r,i){function o(e,t){var n=[],r=e.split(/\s+/),i=t.split(/\s+/),s=0;e:for(;s<r.length;s++){for(var o=r[s],u=0;u<i.length;u++)if(o==i[u])continue e;n.push(o)}return n}if("class"==e)t=t||"",r=this.$$element.attr("class")||"",this.$removeClass(o(r,t).join(" ")),this.$addClass(o(t,r).join(" "));else{var u=mt(this.$$element[0],e);u&&(this.$$element.prop(e,t),i=u),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e])||(this.$attr[e]=i=J(e,"-")),u=Vn(this.$$element);if("A"===u&&"href"===e||"IMG"===u&&"src"===e)if(!jn||8<=jn)u=mn(t).href,""!==u&&("href"===e&&!u.match(f)||"src"===e&&!u.match(l))&&(this[e]=t="unsafe:"+u);!1!==r&&(null===t||t===n?this.$$element.removeAttr(i):this.$$element.attr(i,t))}(r=this.$$observers)&&s(r[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),N.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var et=a.startSymbol(),tt=a.endSymbol(),nt="{{"==et||"}}"==tt?v:function(e){return e.replace(/\{\{/g,et).replace(/}}/g,tt)},rt=/^ngAttr[A-Z]/;return A}]}function Lt(e){return tt(e.replace(mr,""))}function At(){var e={},t=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){G(t,"controller"),b(t)?c(e,t):e[t]=n},this.$get=["$injector","$window",function(n,i){return function(s,o){var u,a,f;w(s)&&(u=s.match(t),a=u[1],f=u[3],s=e.hasOwnProperty(a)?e[a]:Y(o.$scope,a,!0)||Y(i,a,!0),Q(s,a,!0)),u=n.instantiate(s,o);if(f){if(!o||"object"!=typeof o.$scope)throw r("$controller")("noscp",a||s.name,f);o.$scope[f]=u}return u}}]}function Ot(){this.$get=["$window",function(e){return Fn(e.document)}]}function Mt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){var t={},n,r,i;return e?(s(e.split("\n"),function(e){i=e.indexOf(":"),n=Hn(Jn(e.substr(0,i))),r=Jn(e.substr(i+1)),n&&(t[n]=t[n]?t[n]+(", "+r):r)}),t):t}function Dt(e){var t=b(e)?e:n;return function(n){return t||(t=_t(e)),n?t[Hn(n)]||null:t}}function Pt(e,t,n){return T(n)?n(e,t):(s(n,function(n){e=n(e,t)}),e)}function Ht(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,i={"Content-Type":"application/json;charset=utf-8"},o=this.defaults={transformResponse:[function(n){return w(n)&&(n=n.replace(r,""),e.test(n)&&t.test(n)&&(n=F(n))),n}],transformRequest:[function(e){return b(e)&&"[object File]"!==Un.apply(e)?j(e):e}],headers:{common:{Accept:"application/json, text/plain, */*"},post:i,put:i,patch:i},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},a=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,r,i,l,h){function p(e){function r(e){var t=c({},e,{data:Pt(e.data,e.headers,i.transformResponse)});return 200<=e.status&&300>e.status?t:l.reject(t)}var i={transformRequest:o.transformRequest,transformResponse:o.transformResponse},u=function(e){function t(e){var t;s(e,function(n,r){T(n)&&(t=n(),null!=t?e[r]=t:delete e[r])})}var n=o.headers,r=c({},e.headers),i,u,n=c({},n.common,n[Hn(e.method)]);t(n),t(r);e:for(i in n){e=Hn(i);for(u in r)if(Hn(u)===e)continue e;r[i]=n[i]}return r}(e);c(i,e),i.headers=u,i.method=Bn(i.method),(e=gn(i.url)?t.cookies()[i.xsrfCookieName||o.xsrfCookieName]:n)&&(u[i.xsrfHeaderName||o.xsrfHeaderName]=e);var a=[function(e){u=e.headers;var t=Pt(e.data,Dt(u),e.transformRequest);return g(e.data)&&s(u,function(e,t){"content-type"===Hn(t)&&delete u[t]}),g(e.withCredentials)&&!g(o.withCredentials)&&(e.withCredentials=o.withCredentials),d(e,t,u).then(r,r)},n],f=l.when(i);for(s(E,function(e){(e.request||e.requestError)&&a.unshift(e.request,e.requestError),(e.response||e.responseError)&&a.push(e.response,e.responseError)});a.length;){e=a.shift();var h=a.shift(),f=f.then(e,h)}return f.success=function(e){return f.then(function(t){e(t.data,t.status,t.headers,i)}),f},f.error=function(e){return f.then(null,function(t){e(t.data,t.status,t.headers,i)}),f},f}function d(t,n,r){function s(e,t,n){h&&(200<=e&&300>e?h.put(w,[e,t,_t(n)]):h.remove(w)),u(t,e,n),i.$$phase||i.$apply()}function u(e,n,r){n=Math.max(n,0),(200<=n&&300>n?f.resolve:f.reject)({data:e,status:n,headers:Dt(r),config:t})}function a(){var e=A(p.pendingRequests,t);-1!==e&&p.pendingRequests.splice(e,1)}var f=l.defer(),c=f.promise,h,d,w=v(t.url,t.params);p.pendingRequests.push(t),c.then(a,a),(t.cache||o.cache)&&!1!==t.cache&&"GET"==t.method&&(h=b(t.cache)?t.cache:b(o.cache)?o.cache:m);if(h)if(d=h.get(w),y(d)){if(d.then)return d.then(a,a),d;x(d)?u(d[1],d[0],M(d[2])):u(d,200,{})}else h.put(w,c);return g(d)&&e(t.method,w,n,s,r,t.timeout,t.withCredentials,t.responseType),c}function v(e,t){if(!t)return e;var n=[];return u(t,function(e,t){null===e||g(e)||(x(e)||(e=[e]),s(e,function(e){b(e)&&(e=j(e)),n.push(X(t)+"="+X(e))}))}),e+(-1==e.indexOf("?")?"?":"&")+n.join("&")}var m=r("$http"),E=[];return s(a,function(e){E.unshift(w(e)?h.get(e):h.invoke(e))}),s(f,function(e,t){var n=w(e)?h.get(e):h.invoke(e);E.splice(t,0,{response:function(e){return n(l.when(e))},responseError:function(e){return n(l.reject(e))}})}),p.pendingRequests=[],function(e){s(arguments,function(e){p[e]=function(t,n){return p(c(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){s(arguments,function(e){p[e]=function(t,n,r){return p(c(r||{},{method:e,url:t,data:n}))}})}("post","put"),p.defaults=o,p}]}function Bt(){this.$get=["$browser","$window","$document",function(e,t,n){return jt(e,gr,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function jt(e,t,n,r,i,o){function u(e,t){var n=i.createElement("script"),r=function(){i.body.removeChild(n),t&&t()};return n.type="text/javascript",n.src=e,jn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,i.body.appendChild(n),r}return function(i,a,f,l,c,h,p,v){function m(){b=-1,E&&E(),S&&S.abort()}function g(t,r,i,s){var u=o||mn(a).protocol;x&&n.cancel(x),E=S=null,r="file"==u?i?200:404:r,t(1223==r?204:r,i,s),e.$$completeOutstandingRequest(d)}var b;e.$$incOutstandingRequestCount(),a=a||e.url();if("jsonp"==Hn(i)){var w="_"+(r.counter++).toString(36);r[w]=function(e){r[w].data=e};var E=u(a.replace("JSON_CALLBACK","angular.callbacks."+w),function(){r[w].data?g(l,200,r[w].data):g(l,b||-2),delete r[w]})}else{var S=new t;S.open(i,a,!0),s(c,function(e,t){y(e)&&S.setRequestHeader(t,e)}),S.onreadystatechange=function(){if(4==S.readyState){var e=S.getAllResponseHeaders();g(l,b||S.status,S.responseType?S.response:S.responseText,e)}},p&&(S.withCredentials=!0),v&&(S.responseType=v),S.send(f||null)}if(0<h)var x=n(m,h);else h&&h.then&&h.then(m)}}function Ft(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function s(s,a,f){for(var l,c,h=0,p=[],d=s.length,v=!1,m=[];h<d;)-1!=(l=s.indexOf(e,h))&&-1!=(c=s.indexOf(t,l+o))?(h!=l&&p.push(s.substring(h,l)),p.push(h=n(v=s.substring(l+o,c))),h.exp=v,h=c+u,v=!0):(h!=d&&p.push(s.substring(h)),h=d);(d=p.length)||(p.push(""),d=1);if(f&&1<p.length)throw yr("noconcat",s);if(!a||v)return m.length=d,h=function(e){try{for(var t=0,n=d,o;t<n;t++)"function"==typeof (o=p[t])&&(o=o(e),o=f?i.getTrusted(f,o):i.valueOf(o),null===o||g(o)?o="":"string"!=typeof o&&(o=j(o))),m[t]=o;return m.join("")}catch(u){e=yr("interr",s,u.toString()),r(e)}},h.exp=s,h.parts=p,h}var o=e.length,u=t.length;return s.startSymbol=function(){return e},s.endSymbol=function(){return t},s}]}function It(){this.$get=["$rootScope","$window","$q",function(e,t,n){function r(r,s,o,u){var a=t.setInterval,f=t.clearInterval,l=n.defer(),c=l.promise,h=0,p=y(u)&&!u;return o=y(o)?o:0,c.then(null,null,r),c.$$intervalId=a(function(){l.notify(h++),0<o&&h>=o&&(l.resolve(h),f(c.$$intervalId),delete i[c.$$intervalId]),p||e.$apply()},s),i[c.$$intervalId]=l,c}var i={};return r.cancel=function(e){return e&&e.$$intervalId in i?(i[e.$$intervalId].reject("canceled"),clearInterval(e.$$intervalId),delete i[e.$$intervalId],!0):!1},r}]}function qt(){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:"¤",posSuf:"",negPre:"(¤",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(e){return 1===e?"one":"other"}}}}function Rt(e){e=e.split("/");for(var t=e.length;t--;)e[t]=W(e[t]);return e.join("/")}function Ut(e,t,n){e=mn(e,n),t.$$protocol=e.protocol,t.$$host=e.hostname,t.$$port=h(e.port)||wr[e.protocol]||null}function zt(e,t,n){var r="/"!==e.charAt(0);r&&(e="/"+e),e=mn(e,n),t.$$path=decodeURIComponent(r&&"/"===e.pathname.charAt(0)?e.pathname.substring(1):e.pathname),t.$$search=U(e.search),t.$$hash=decodeURIComponent(e.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Wt(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function Xt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Vt(e){return e.substr(0,Xt(e).lastIndexOf("/")+1)}function $t(e,t){this.$$html5=!0,t=t||"";var r=Vt(e);Ut(e,this,e),this.$$parse=function(t){var n=Wt(r,t);if(!w(n))throw Er("ipthprfx",t,r);zt(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=z(this.$$search),t=this.$$hash?"#"+W(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$rewrite=function(i){var s;if((s=Wt(e,i))!==n)return i=s,(s=Wt(t,s))!==n?r+(Wt("/",s)||s):e+i;if((s=Wt(r,i))!==n)return r+s;if(r==i+"/")return r}}function Jt(e,t){var n=Vt(e);Ut(e,this,e),this.$$parse=function(r){var i=Wt(e,r)||Wt(n,r),i="#"==i.charAt(0)?Wt(t,i):this.$$html5?i:"";if(!w(i))throw Er("ihshprfx",r,t);zt(i,this,e),this.$$compose()},this.$$compose=function(){var n=z(this.$$search),r=this.$$hash?"#"+W(this.$$hash):"";this.$$url=Rt(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$rewrite=function(t){if(Xt(e)==Xt(t))return t}}function Kt(e,t){this.$$html5=!0,Jt.apply(this,arguments);var n=Vt(e);this.$$rewrite=function(r){var i;if(e==Xt(r))return r;if(i=Wt(n,r))return e+t+i;if(n===r+"/")return n}}function Qt(e){return function(){return this[e]}}function Gt(e,t){return function(n){return g(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Yt(){var t="",n=!1;this.hashPrefix=function(e){return y(e)?(t=e,this):t},this.html5Mode=function(e){return y(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f=i.baseHref(),l=i.url();n?(f=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(f||"/"),s=s.history?$t:Kt):(f=Xt(l),s=Jt),a=new s(f,"#"+t),a.$$parse(a.$$rewrite(l)),o.on("click",function(t){if(!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var n=Fn(t.target);"a"!==Hn(n[0].nodeName);)if(n[0]===o[0]||!(n=n.parent())[0])return;var s=n.prop("href"),u=a.$$rewrite(s);s&&!n.attr("target")&&u&&!t.isDefaultPrevented()&&(t.preventDefault(),u!=i.url()&&(a.$$parse(u),r.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),a.absUrl()!=l&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$broadcast("$locationChangeStart",e,a.absUrl()).defaultPrevented?i.url(a.absUrl()):(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest()))});var c=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;return c&&e==a.absUrl()||(c++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))})),a.$$replace=!1,c}),a}]}function Zt(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||d;return i.apply?function(){var e=[];return s(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("constructor"===e)throw Sr("isecfld",t);return e}function tn(e,t){if(e&&e.constructor===e)throw Sr("isecfn",t);if(e&&e.document&&e.location&&e.alert&&e.setInterval)throw Sr("isecwindow",t);if(e&&(e.nodeName||e.on&&e.find))throw Sr("isecdom",t);return e}function nn(e,t,r,i,s){s=s||{},t=t.split(".");for(var o,u=0;1<t.length;u++){o=en(t.shift(),i);var a=e[o];a||(a={},e[o]=a),e=a,e.then&&s.unwrapPromises&&(Tr(i),"$$v"in e||function(e){e.then(function(t){e.$$v=t})}(e),e.$$v===n&&(e.$$v={}),e=e.$$v)}return o=en(t.shift(),i),e[o]=r}function rn(e,t,r,i,s,o,u){return en(e,o),en(t,o),en(r,o),en(i,o),en(s,o),u.unwrapPromises?function(u,a){var f=a&&a.hasOwnProperty(e)?a:u,l;return null===f||f===n?f:((f=f[e])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!t||null===f||f===n?f:((f=f[t])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!r||null===f||f===n?f:((f=f[r])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!i||null===f||f===n?f:((f=f[i])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),!s||null===f||f===n?f:((f=f[s])&&f.then&&(Tr(o),"$$v"in f||(l=f,l.$$v=n,l.then(function(e){l.$$v=e})),f=f.$$v),f)))))}:function(o,u){var a=u&&u.hasOwnProperty(e)?u:o;return null===a||a===n?a:(a=a[e],!t||null===a||a===n?a:(a=a[t],!r||null===a||a===n?a:(a=a[r],!i||null===a||a===n?a:(a=a[i],s&&null!==a&&a!==n?a=a[s]:a))))}}function sn(e,t,r){if(Ar.hasOwnProperty(e))return Ar[e];var i=e.split("."),o=i.length,u;if(t.csp)u=6>o?rn(i[0],i[1],i[2],i[3],i[4],r,t):function(e,s){var u=0,a;do a=rn(i[u++],i[u++],i[u++],i[u++],i[u++],r,t)(e,s),s=n,e=a;while(u<o);return a};else{var a="var l, fn, p;\n";s(i,function(e,n){en(e,r),a+="if(s === null || s === undefined) return s;\nl=s;\ns="+(n?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\n'+(t.unwrapPromises?'if (s && s.then) {\n pw("'+r.replace(/\"/g,'\\"')+'");\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':"")});var a=a+"return s;",f=new Function("s","k","pw",a);f.toString=function(){return a},u=function(e,t){return f(e,t,Tr)}}return"hasOwnProperty"!==e&&(Ar[e]=u),u}function on(){var e={},t={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(e){return y(e)?(t.unwrapPromises=!!e,this):t.unwrapPromises},this.logPromiseWarnings=function(e){return y(e)?(t.logPromiseWarnings=e,this):t.logPromiseWarnings},this.$get=["$filter","$sniffer","$log",function(n,r,i){return t.csp=r.csp,Tr=function(e){t.logPromiseWarnings&&!xr.hasOwnProperty(e)&&(xr[e]=!0,i.warn("[$parse] Promise found in the expression `"+e+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))},function(r){var i;switch(typeof r){case"string":if(e.hasOwnProperty(r))return e[r];return i=new kr(t),i=(new Lr(i,n,t)).parse(r,!1),"hasOwnProperty"!==r&&(e[r]=i),i;case"function":return r;default:return d}}}]}function un(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return an(function(t){e.$evalAsync(t)},t)}]}function an(e,t){function r(e){return e}function i(e){return a(e)}var o=function(){var s=[],f,l;return l={resolve:function(t){if(s){var r=s;s=n,f=u(t),r.length&&e(function(){for(var e,t=0,n=r.length;t<n;t++)e=r[t],f.then(e[0],e[1],e[2])})}},reject:function(e){l.resolve(a(e))},notify:function(t){if(s){var n=s;s.length&&e(function(){for(var e,r=0,i=n.length;r<i;r++)e=n[r],e[2](t)})}},promise:{then:function(e,n,u){var a=o(),l=function(n){try{a.resolve((T(e)?e:r)(n))}catch(i){a.reject(i),t(i)}},c=function(e){try{a.resolve((T(n)?n:i)(e))}catch(r){a.reject(r),t(r)}},h=function(e){try{a.notify((T(u)?u:r)(e))}catch(n){t(n)}};return s?s.push([l,c,h]):f.then(l,c,h),a.promise},"catch":function(e){return this.then(null,e)},"finally":function(e){function t(e,t){var n=o();return t?n.resolve(e):n.reject(e),n.promise}function n(n,i){var s=null;try{s=(e||r)()}catch(o){return t(o,!1)}return s&&T(s.then)?s.then(function(){return t(n,i)},function(e){return t(e,!1)}):t(n,i)}return this.then(function(e){return n(e,!0)},function(e){return n(e,!1)})}}}},u=function(t){return t&&T(t.then)?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(n){return{then:function(r,s){var u=o();return e(function(){try{u.resolve((T(s)?s:i)(n))}catch(e){u.reject(e),t(e)}}),u.promise}}};return{defer:o,reject:a,when:function(n,s,f,l){var c=o(),h,p=function(e){try{return(T(s)?s:r)(e)}catch(n){return t(n),a(n)}},d=function(e){try{return(T(f)?f:i)(e)}catch(n){return t(n),a(n)}},v=function(e){try{return(T(l)?l:r)(e)}catch(n){t(n)}};return e(function(){u(n).then(function(e){h||(h=!0,c.resolve(u(e).then(p,d,v)))},function(e){h||(h=!0,c.resolve(d(e)))},function(e){h||c.notify(v(e))})}),c.promise},all:function(e){var t=o(),n=0,r=x(e)?[]:{};return s(e,function(e,i){n++,u(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}}}function fn(){var e=10,t=r("$rootScope");this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(n,r,s,o){function u(){this.$id=f(),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.$$postDigestQueue=[],this.$$listeners={},this.$$isolateBindings={}}function a(e){if(h.$$phase)throw t("inprog",h.$$phase);h.$$phase=e}function l(e,t){var n=s(e);return Q(n,t),n}function c(){}u.prototype={constructor:u,$new:function(e){return e?(e=new u,e.$root=this.$root,e.$$asyncQueue=this.$$asyncQueue,e.$$postDigestQueue=this.$$postDigestQueue):(e=function(){},e.prototype=this,e=new e,e.$id=f()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=l(e,"watch"),i=this.$$watchers,s={fn:t,last:c,get:r,exp:e,eq:!!n};if(!T(t)){var o=l(t||d,"listener");s.fn=function(e,t,n){o(n)}}if("string"==typeof e&&r.constant){var u=s.fn;s.fn=function(e,t,n){u.call(this,e,t,n),O(i,s)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){O(i,s)}},$watchCollection:function(e,t){var n=this,r,o,u=0,a=s(e),f=[],l={},c=0;return this.$watch(function(){o=a(n);var e,t;if(b(o))if(i(o))for(r!==f&&(r=f,c=r.length=0,u++),e=o.length,c!==e&&(u++,r.length=c=e),t=0;t<e;t++)r[t]!==o[t]&&(u++,r[t]=o[t]);else{r!==l&&(r=l={},c=0,u++),e=0;for(t in o)o.hasOwnProperty(t)&&(e++,r.hasOwnProperty(t)?r[t]!==o[t]&&(u++,r[t]=o[t]):(c++,r[t]=o[t],u++));if(c>e)for(t in u++,r)r.hasOwnProperty(t)&&!o.hasOwnProperty(t)&&(c--,delete r[t])}else r!==o&&(r=o,u++);return u},function(){t(o,r,n)})},$digest:function(){var n,i,s,o,u=this.$$asyncQueue,f=this.$$postDigestQueue,l,p,d=e,v,m=[],g,y,b;a("$digest");do{p=!1;for(v=this;u.length;)try{b=u.shift(),b.scope.$eval(b.expression)}catch(w){r(w)}do{if(o=v.$$watchers)for(l=o.length;l--;)try{(n=o[l])&&(i=n.get(v))!==(s=n.last)&&!(n.eq?D(i,s):"number"==typeof i&&"number"==typeof s&&isNaN(i)&&isNaN(s))&&(p=!0,n.last=n.eq?M(i):i,n.fn(i,s===c?i:s,v),5>d&&(g=4-d,m[g]||(m[g]=[]),y=T(n.exp)?"fn: "+(n.exp.name||n.exp.toString()):n.exp,y+="; newVal: "+j(i)+"; oldVal: "+j(s),m[g].push(y)))}catch(E){r(E)}if(!(o=v.$$childHead||v!==this&&v.$$nextSibling))for(;v!==this&&!(o=v.$$nextSibling);)v=v.$parent}while(v=o);if(p&&!(d--))throw h.$$phase=null,t("infdig",e,j(m))}while(p||u.length);for(h.$$phase=null;f.length;)try{f.shift()()}catch(S){r(S)}},$destroy:function(){if(h!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return s(e)(this,t)},$evalAsync:function(e){h.$$phase||h.$$asyncQueue.length||o.defer(function(){h.$$asyncQueue.length&&h.$digest()}),this.$$asyncQueue.push({scope:this,expression:e})},$$postDigest:function(e){this.$$postDigestQueue.push(e)},$apply:function(e){try{return a("$apply"),this.$eval(e)}catch(t){r(t)}finally{h.$$phase=null;try{h.$digest()}catch(n){throw r(n),n}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[A(n,t)]=null}},$emit:function(e,t){var n=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(qn.call(arguments,1)),f,l;do{i=s.$$listeners[e]||n,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{i[f].apply(null,a)}catch(c){r(c)}else i.splice(f,1),f--,l--;if(o)break;s=s.$parent}while(s);return u},$broadcast:function(e,t){var n=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(qn.call(arguments,1)),u,a;do{n=i,s.currentScope=n,i=n.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){r(f)}else i.splice(u,1),u--,a--;if(!(i=n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(i=n.$$nextSibling);)n=n.$parent}while(n=i);return s}};var h=new u;return h}]}function ln(e){if("self"===e)return e;if(w(e)){if(-1<e.indexOf("***"))throw Or("iwcard",e);return e=e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),RegExp("^"+e+"$")}if(N(e))return RegExp("^"+e.source+"$");throw Or("imatcher")}function cn(e){var t=[];return y(e)&&s(e,function(e){t.push(ln(e))}),t}function hn(){this.SCE_CONTEXTS=Mr;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=cn(e)),t},this.$get=["$log","$document","$injector",function(r,i,s){function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}var u=function(e){throw Or("unsafe")};s.has("$sanitize")&&(u=s.get("$sanitize"));var a=o(),f={};return f[Mr.HTML]=o(a),f[Mr.CSS]=o(a),f[Mr.URL]=o(a),f[Mr.JS]=o(a),f[Mr.RESOURCE_URL]=o(f[Mr.URL]),{trustAs:function(e,t){var r=f.hasOwnProperty(e)?f[e]:null;if(!r)throw Or("icontext",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Or("itype",e);return new r(t)},getTrusted:function(r,i){if(null===i||i===n||""===i)return i;var s=f.hasOwnProperty(r)?f[r]:null;if(s&&i instanceof s)return i.$$unwrapTrustedValue();if(r===Mr.RESOURCE_URL){var s=mn(i.toString()),o,a,l=!1;o=0;for(a=e.length;o<a;o++)if("self"===e[o]?gn(s):e[o].exec(s.href)){l=!0;break}if(l)for(o=0,a=t.length;o<a;o++)if("self"===t[o]?gn(s):t[o].exec(s.href)){l=!1;break}if(l)return i;throw Or("insecurl",i.toString())}if(r===Mr.HTML)return u(i);throw Or("unsafe")},valueOf:function(e){return e instanceof a?e.$$unwrapTrustedValue():e}}}]}function pn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$document","$sceDelegate",function(t,r,i){if(e&&jn&&(r=r[0].documentMode,r!==n&&8>r))throw Or("iequirks");var o=M(Mr);o.isEnabled=function(){return e},o.trustAs=i.trustAs,o.getTrusted=i.getTrusted,o.valueOf=i.valueOf,e||(o.trustAs=o.getTrusted=function(e,t){return t},o.valueOf=v),o.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:function(t,n){return o.getTrusted(e,r(t,n))}};var u=o.parseAs,a=o.getTrusted,f=o.trustAs;return s(Mr,function(e,t){var n=Hn(t);o[tt("parse_as_"+n)]=function(t){return u(e,t)},o[tt("get_trusted_"+n)]=function(t){return a(e,t)},o[tt("trust_as_"+n)]=function(t){return f(e,t)}}),o}]}function dn(){this.$get=["$window","$document",function(e,t){var n={},r=h((/android (\d+)/.exec(Hn((e.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},o,u=/^(Moz|webkit|O|ms)(?=[A-Z])/,a=s.body&&s.body.style,f=!1,l=!1;if(a){for(var c in a)if(f=u.exec(c)){o=f[0],o=o.substr(0,1).toUpperCase()+o.substr(1);break}o||(o="WebkitOpacity"in a&&"webkit"),f="transition"in a||o+"Transition"in a,l="animation"in a||o+"Animation"in a,!r||f&&l||(f=w(s.body.style.webkitTransition),l=w(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>r||i),hashchange:"onhashchange"in e&&(!s.documentMode||7<s.documentMode),hasEvent:function(e){if("input"==e&&9==jn)return!1;if(g(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:P(),vendorPrefix:o,transitions:f,animations:l,msie:jn}}]}function vn(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=y(u)&&!u;return o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}finally{delete s[f.$$timeoutId]}l||e.$apply()},o),f.$$timeoutId=o,s[o]=a,f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),delete s[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},i}]}function mn(e,t){var n=e;jn&&(_r.setAttribute("href",n),n=_r.href),_r.setAttribute("href",n);var n=_r.pathname,r=e;return 0===r.indexOf(t)&&(r=r.replace(t,"")),Dr.exec(r)||(n=(r=Dr.exec(n))?r[1]:n),n="/"===n.charAt(0)?n:"/"+n,{href:_r.href,protocol:_r.protocol?_r.protocol.replace(/:$/,""):"",host:_r.host,search:_r.search?_r.search.replace(/^\?/,""):"",hash:_r.hash?_r.hash.replace(/^#/,""):"",hostname:_r.hostname,port:_r.port,pathname:n}}function gn(e){return e=w(e)?mn(e):e,e.protocol===Pr.protocol&&e.host===Pr.host}function yn(){this.$get=m(e)}function bn(e){function t(r,i){if(b(r)){var o={};return s(r,function(e,n){o[n]=t(n,e)}),o}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",En),t("date",kn),t("filter",wn),t("json",Ln),t("limitTo",An),t("lowercase",Ir),t("number",Sn),t("orderBy",On),t("uppercase",qr)}function wn(){return function(e,t,n){if(!x(e))return e;var r=typeof n,i=[];i.check=function(e){for(var t=0;t<i.length;t++)if(!i[t](e))return!1;return!0},"function"!==r&&(n="boolean"===r&&n?function(e,t){return Wn.equals(e,t)}:function(e,t){return t=(""+t).toLowerCase(),-1<(""+e).toLowerCase().indexOf(t)});var s=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!s(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var r in e)if("$"!==r.charAt(0)&&s(e[r],t))return!0}return!1;case"array":for(r=0;r<e.length;r++)if(s(e[r],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var o in t)"$"==o?function(){if(t[o]){var e=o;i.push(function(n){return s(n,t[e])})}}():function(){if("undefined"!=typeof t[o]){var e=o;i.push(function(n){return s(Y(n,e),t[e])})}}();break;case"function":i.push(t);break;default:return e}for(var r=[],u=0;u<e.length;u++){var a=e[u];i.check(a)&&r.push(a)}return r}}function En(e){var t=e.NUMBER_FORMATS;return function(e,n){return g(n)&&(n=t.CURRENCY_SYM),xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function Sn(e){var t=e.NUMBER_FORMATS;return function(e,n){return xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function xn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=0>e;e=Math.abs(e);var o=e+"",u="",a=[],f=!1;if(-1!==o.indexOf("e")){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>i+1?o="0":(u=o,f=!0)}if(f)0<i&&-1<e&&1>e&&(u=e.toFixed(i));else{o=(o.split(Hr)[1]||"").length,g(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac)),o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(Hr),o=e[0],e=e[1]||"";var l=0,c=t.lgSize,h=t.gSize;if(o.length>=c+h)for(l=o.length-c,f=0;f<l;f++)0===(l-f)%h&&0!==f&&(u+=n),u+=o.charAt(f);for(f=l;f<o.length;f++)0===(o.length-f)%c&&0!==f&&(u+=n),u+=o.charAt(f);for(;e.length<i;)e+="0";i&&"0"!==i&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function Tn(e,t,n){var r="";0>e&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Nn(e,t,n,r){return n=n||0,function(i){i=i["get"+e]();if(0<n||i>-n)i+=n;return 0===i&&-12==n&&(i=12),Tn(i,t,r)}}function Cn(e,t){return function(n,r){var i=n["get"+e](),s=Bn(t?"SHORT"+e:e);return r[s][i]}}function kn(e){function t(e){var t;if(t=e.match(n)){e=new Date(0);var r=0,i=0,s=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=h(t[9]+t[10]),i=h(t[9]+t[11])),s.call(e,h(t[1]),h(t[2])-1,h(t[3])),r=h(t[4]||0)-r,i=h(t[5]||0)-i,s=h(t[6]||0),t=Math.round(1e3*parseFloat("0."+(t[7]||0))),o.call(e,r,i,s,t)}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r){var i="",o=[],u,a;r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,w(n)&&(n=Fr.test(n)?h(n):t(n)),E(n)&&(n=new Date(n));if(!S(n))return n;for(;r;)(a=jr.exec(r))?(o=o.concat(qn.call(a,1)),r=o.pop()):(o.push(r),r=null);return s(o,function(t){u=Br[t],i+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function Ln(){return function(e){return j(e,!0)}}function An(){return function(e,t){if(!x(e)&&!w(e))return e;t=h(t);if(w(e))return t?0<=t?e.slice(0,t):e.slice(t,e.length):"";var n=[],r,i;t>e.length?t=e.length:t<-e.length&&(t=-e.length),0<t?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}}function On(e){return function(t,n,r){function i(e,t){return I(t)?function(t,n){return e(n,t)}:e}if(!x(t)||!n)return t;n=x(n)?n:[n],n=L(n,function(t){var n=!1,r=t||v;if(w(t)){if("+"==t.charAt(0)||"-"==t.charAt(0))n="-"==t.charAt(0),t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?("string"==s&&(n=n.toLowerCase(),i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)});for(var s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(0!==i)return i}return 0},r))}}function Mn(e){return T(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function _n(e,t){function n(t,n){n=n?"-"+J(n,"-"):"",e.removeClass((t?Zr:Yr)+n).addClass((t?Yr:Zr)+n)}var r=this,i=e.parent().controller("form")||zr,o=0,u=r.$error={},a=[];r.$name=t.name||t.ngForm,r.$dirty=!1,r.$pristine=!0,r.$valid=!0,r.$invalid=!1,i.$addControl(r),e.addClass(ei),n(!0),r.$addControl=function(e){G(e.$name,"input"),a.push(e),e.$name&&(r[e.$name]=e)},r.$removeControl=function(e){e.$name&&r[e.$name]===e&&delete r[e.$name],s(u,function(t,n){r.$setValidity(n,!0,e)}),O(a,e)},r.$setValidity=function(e,t,s){var a=u[e];if(t)a&&(O(a,s),a.length||(o--,o||(n(t),r.$valid=!0,r.$invalid=!1),u[e]=!1,n(!0,e),i.$setValidity(e,!0,r)));else{o||n(t);if(a){if(-1!=A(a,s))return}else u[e]=a=[],o++,n(!1,e),i.$setValidity(e,!1,r);a.push(s),r.$valid=!1,r.$invalid=!0}},r.$setDirty=function(){e.removeClass(ei).addClass(ti),r.$dirty=!0,r.$pristine=!1,i.$setDirty()},r.$setPristine=function(){e.removeClass(ti).addClass(ei),r.$dirty=!1,r.$pristine=!0,s(a,function(e){e.$setPristine()})}}function Dn(e,t,i,s,o,u){var a=function(){var n=t.val();I(i.ngTrim||"T")&&(n=Jn(n)),s.$viewValue!==n&&e.$apply(function(){s.$setViewValue(n)})};if(o.hasEvent("input"))t.on("input",a);else{var f,l=function(){f||(f=u.defer(function(){a(),f=null}))};t.on("keydown",function(e){e=e.keyCode,91===e||15<e&&19>e||37<=e&&40>=e||l()}),t.on("change",a),o.hasEvent("paste")&&t.on("paste cut",l)}s.$render=function(){t.val(s.$isEmpty(s.$viewValue)?"":s.$viewValue)};var c=i.ngPattern,p=function(e,t){return s.$isEmpty(t)||e.test(t)?(s.$setValidity("pattern",!0),t):(s.$setValidity("pattern",!1),n)};c&&((o=c.match(/^\/(.*)\/([gim]*)$/))?(c=RegExp(o[1],o[2]),o=function(e){return p(c,e)}):o=function(n){var i=e.$eval(c);if(!i||!i.test)throw r("ngPattern")("noregexp",c,i,q(t));return p(i,n)},s.$formatters.push(o),s.$parsers.push(o));if(i.ngMinlength){var d=h(i.ngMinlength);o=function(e){return!s.$isEmpty(e)&&e.length<d?(s.$setValidity("minlength",!1),n):(s.$setValidity("minlength",!0),e)},s.$parsers.push(o),s.$formatters.push(o)}if(i.ngMaxlength){var v=h(i.ngMaxlength);o=function(e){return!s.$isEmpty(e)&&e.length>v?(s.$setValidity("maxlength",!1),n):(s.$setValidity("maxlength",!0),e)},s.$parsers.push(o),s.$formatters.push(o)}}function Pn(e,t){return e="ngClass"+e,function(){return{restrict:"AC",link:function(n,r,i){function o(e){if(!0===t||n.$index%2===t)a&&!D(e,a)&&i.$removeClass(u(a)),i.$addClass(u(e));a=M(e)}function u(e){if(x(e))return e.join(" ");if(b(e)){var t=[];return s(e,function(e,n){e&&t.push(n)}),t.join(" ")}return e}var a;n.$watch(i[e],o,!0),i.$observe("class",function(t){o(n.$eval(i[e]))}),"ngClass"!==e&&n.$watch("$index",function(r,s){var o=r&1;o!==s&1&&(o===t?(o=n.$eval(i[e]),i.$addClass(u(o))):(o=n.$eval(i[e]),i.$removeClass(u(o))))})}}}}var Hn=function(e){return w(e)?e.toLowerCase():e},Bn=function(e){return w(e)?e.toUpperCase():e},jn,Fn,In,qn=[].slice,Rn=[].push,Un=Object.prototype.toString,zn=r("ng"),Wn=e.angular||(e.angular={}),Xn,Vn,$n=["0","0","0"];jn=h((/msie (\d+)/.exec(Hn(navigator.userAgent))||[])[1]),isNaN(jn)&&(jn=h((/trident\/.*; rv:(\d+)/.exec(Hn(navigator.userAgent))||[])[1])),d.$inject=[],v.$inject=[];var Jn=function(){return String.prototype.trim?function(e){return w(e)?e.trim():e}:function(e){return w(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}}();Vn=9>jn?function(e){return e=e.nodeName?e:e[0],e.scopeName&&"HTML"!=e.scopeName?Bn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Kn=/[A-Z]/g,Qn={full:"1.2.1",major:1,minor:2,dot:1,codeName:"underscore-empathy"},Gn=rt.cache={},Yn=rt.expando="ng-"+(new Date).getTime(),Zn=1,er=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},tr=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},nr=/([\:\-\_]+(.))/g,rr=/^moz([A-Z])/,ir=r("jqLite"),sr=rt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),rt(e).on("load",r))},toString:function(){var e=[];return s(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return 0<=e?Fn(this[e]):Fn(this[this.length+e])},length:0,push:Rn,sort:[].sort,splice:[].splice},or={};s("multiple selected checked disabled readOnly required open".split(" "),function(e){or[Hn(e)]=e});var ur={};s("input select option textarea button form details".split(" "),function(e){ur[Bn(e)]=!0}),s({data:ft,inheritedData:vt,scope:function(e){return Fn(e).data("$scope")||vt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Fn(e).data("$isolateScope")||Fn(e).data("$isolateScopeNoTemplate")},controller:dt,injector:function(e){return vt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:lt,css:function(e,t,r){t=tt(t);if(!y(r)){var i;return 8>=jn&&(i=e.currentStyle&&e.currentStyle[t],""===i&&(i="auto")),i=i||e.style[t],8>=jn&&(i=""===i?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Hn(t);if(or[i]){if(!y(r))return e[t]||(e.attributes.getNamedItem(t)||d).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(y(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),null===e?n:e},prop:function(e,t,n){if(!y(n))return e[t];e[t]=n},text:function(){function e(e,n){var r=t[e.nodeType];if(g(n))return r?e[r]:"";e[r]=n}var t=[];return 9>jn?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",e.$dv="",e}(),val:function(e,t){if(g(t)){if("SELECT"===Vn(e)&&e.multiple){var n=[];return s(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(g(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)st(r[n]);e.innerHTML=t}},function(e,t){rt.prototype[t]=function(t,r){var i,s;if((2==e.length&&e!==lt&&e!==dt?t:r)===n){if(b(t)){for(i=0;i<this.length;i++)if(e===ft)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}i=e.$dv,s=i===n?Math.min(this.length,1):this.length;for(var o=0;o<s;o++){var u=e(this[o],t,r);i=i?i+u:u}return i}for(i=0;i<this.length;i++)e(this[i],t,r);return this}}),s({removeData:ut,dealoc:st,on:function ji(e,n,r,i){if(y(i))throw ir("onargs");var o=at(e,"events"),u=at(e,"handle");o||at(e,"events",o={}),u||at(e,"handle",u=gt(e,o)),s(n.split(" "),function(n){var i=o[n];if(!i){if("mouseenter"==n||"mouseleave"==n){var s=t.body.contains||t.body.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1};o[n]=[],ji(e,{mouseleave:"mouseout",mouseenter:"mouseover"}[n],function(e){var t=e.relatedTarget;t&&(t===this||s(this,t))||u(e,n)})}else er(e,n,u),o[n]=[];i=o[n]}i.push(r)})},off:ot,replaceWith:function(e,t){var n,r=e.parentNode;st(e),s(new rt(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return s(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){s(new rt(t),function(t){1!==e.nodeType&&11!==e.nodeType||e.appendChild(t)})},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;s(new rt(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Fn(t)[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){st(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,r=e.parentNode;s(new rt(t),function(e){r.insertBefore(e,n.nextSibling),n=e})},addClass:ht,removeClass:ct,toggleClass:function(e,t,n){g(n)&&(n=!lt(e,t)),(n?ht:ct)(e,t)},parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;null!=e&&1!==e.nodeType;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:it,triggerHandler:function(e,t,n){t=(at(e,"events")||{})[t],n=n||[];var r=[{preventDefault:d,stopPropagation:d}];s(t,function(t){t.apply(e,r.concat(n))})}},function(e,t){rt.prototype[t]=function(t,n,r){for(var i,s=0;s<this.length;s++)g(i)?(i=e(this[s],t,n,r),y(i)&&(i=Fn(i))):pt(i,e(this[s],t,n,r));return y(i)?i:this},rt.prototype.bind=rt.prototype.on,rt.prototype.unbind=rt.prototype.off}),bt.prototype={put:function(e,t){this[yt(e)]=t},get:function(e){return this[yt(e)]},remove:function(e){var t=this[e=yt(e)];return delete this[e],t}};var ar=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,fr=/,/,lr=/^\s*(_?)(\S+?)\1\s*$/,cr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,hr=r("$injector"),pr=r("$animate"),dr=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw pr("notcsel",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.$get=["$timeout",function(e){return{enter:function(t,n,r,i){r=r&&r[r.length-1];var o=n&&n[0]||r&&r.parentNode,u=r&&r.nextSibling||null;s(t,function(e){o.insertBefore(e,u)}),i&&e(i,0,!1)},leave:function(t,n){t.remove(),n&&e(n,0,!1)},move:function(e,t,n,r){this.enter(e,t,n,r)},addClass:function(t,n,r){n=w(n)?n:x(n)?n.join(" "):"",s(t,function(e){ht(e,n)}),r&&e(r,0,!1)},removeClass:function(t,n,r){n=w(n)?n:x(n)?n.join(" "):"",s(t,function(e){ct(e,n)}),r&&e(r,0,!1)},enabled:d}}]}],vr=r("$compile");kt.$inject=["$provide"];var mr=/^(x[\:\-_]|data[\:\-_])/i,gr=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw r("$httpBackend")("noxhr")},yr=r("$interpolate"),br=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,wr={http:80,https:443,ftp:21},Er=r("$location");Kt.prototype=Jt.prototype=$t.prototype={$$html5:!1,$$replace:!1,absUrl:Qt("$$absUrl"),url:function(e,t){if(g(e))return this.$$url;var n=br.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Qt("$$protocol"),host:Qt("$$host"),port:Qt("$$port"),path:Gt("$$path",function(e){return"/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e))this.$$search=U(e);else{if(!b(e))throw Er("isrcharg");this.$$search=e}break;default:g(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Gt("$$hash",v),replace:function(){return this.$$replace=!0,this}};var Sr=r("$parse"),xr={},Tr,Nr={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":d,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),y(r)?y(i)?r+i:r:y(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(y(n)?n:0)-(y(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":d,"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},Cr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},kr=function(e){this.options=e};kr.prototype={constructor:kr,lex:function(e){this.text=e,this.index=0,this.ch=n,this.lastCh=":",this.tokens=[];var t;for(e=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&"{"===e[0]&&(t=this.tokens[this.tokens.length-1])&&(t.json=-1===t.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&e.unshift(this.ch),this.is("}]")&&e.shift(),this.index++;else{if(this.isWhitespace(this.ch)){this.index++;continue}var r=this.ch+this.peek(),i=r+this.peek(2),s=Nr[this.ch],o=Nr[r],u=Nr[i];u?(this.tokens.push({index:this.index,text:i,fn:u}),this.index+=3):o?(this.tokens.push({index:this.index,text:r,fn:o}),this.index+=2):s?(this.tokens.push({index:this.index,text:this.ch,fn:s,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},was:function(e){return-1!==e.indexOf(this.lastCh)},peek:function(e){return e=e||1,this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(e){return"0"<=e&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||" "===e},isIdent:function(e){return"a"<=e&&"z">=e||"A"<=e&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){throw n=n||this.index,t=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n,Sr("lexerr",e,t,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Hn(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e*=1,this.tokens.push({index:t,text:e,json:!0,fn:function(){return e}})},readIdent:function(){for(var e=this,t="",n=this.index,r,i,s,o;this.index<this.text.length;){o=this.text.charAt(this.index);if("."!==o&&!this.isIdent(o)&&!this.isNumber(o))break;"."===o&&(r=this.index),t+=o,this.index++}if(r)for(i=this.index;i<this.text.length;){o=this.text.charAt(i);if("("===o){s=t.substr(r-n+1),t=t.substr(0,r-n),this.index=i;break}if(!this.isWhitespace(o))break;i++}n={index:n,text:t};if(Nr.hasOwnProperty(t))n.fn=Nr[t],n.json=Nr[t];else{var u=sn(t,this.options,this.text);n.fn=c(function(e,t){return u(e,t)},{assign:function(n,r){return nn(n,t,r,e.text,e.options)}})}this.tokens.push(n),s&&(this.tokens.push({index:r,text:".",json:!1}),this.tokens.push({index:r+1,text:s,json:!1}))},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var s=this.text.charAt(this.index),r=r+s;if(i)"u"===s?(s=this.text.substring(this.index+1,this.index+5),s.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+s+"]"),this.index+=4,n+=String.fromCharCode(parseInt(s,16))):n=(i=Cr[s])?n+i:n+s,i=!1;else if("\\"===s)i=!0;else{if(s===e){this.index++,this.tokens.push({index:t,text:r,string:n,json:!0,fn:function(){return n}});return}n+=s}this.index++}this.throwError("Unterminated quote",t)}};var Lr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};Lr.ZERO=function(){return 0},Lr.prototype={constructor:Lr,parse:function(e,t){this.text=e,this.json=t,this.tokens=this.lexer.lex(e),t&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:e,index:0})});var n=t?this.primary():this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n.literal=!!n.literal,n.constant=!!n.constant,n},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();(e=t.fn)||this.throwError("not a primary expression",t),t.json&&(e.constant=!0,e.literal=!0)}for(var n;t=this.expect("(","[",".");)"("===t.text?(e=this.functionCall(e,n),n=null):"["===t.text?(n=e,e=this.objectIndex(e)):"."===t.text?(n=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw Sr("syntax",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw Sr("ueoe",this.text);return this.tokens[0]},peek:function(e,t,n,r){if(0<this.tokens.length){var i=this.tokens[0],s=i.text;if(s===e||s===t||s===n||s===r||!(e||t||n||r))return i}return!1},expect:function(e,t,n,r){return(e=this.peek(e,t,n,r))?(this.json&&!e.json&&this.throwError("is not valid json",e),this.tokens.shift(),e):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return c(function(n,r){return e(n,r,t)},{constant:t.constant})},ternaryFn:function(e,t,n){return c(function(r,i){return e(r,i)?t(r,i):n(r,i)},{constant:e.constant&&t.constant&&n.constant})},binaryFn:function(e,t,n){return c(function(r,i){return t(r,i,e,n)},{constant:e.constant&&n.constant})},statements:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}},filterChain:function(){for(var e=this.expression(),t;;){if(!(t=this.expect("|")))return e;e=this.binaryFn(e,t.fn,this.filter())}},filter:function(){for(var e=this.expect(),t=this.$filter(e.text),n=[];;){if(!(e=this.expect(":"))){var r=function(e,r,i){i=[i];for(var s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return r}}n.push(this.expression())}},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary(),t,n;return(n=this.expect("="))?(e.assign||this.throwError("implies assignment but ["+this.text.substring(0,n.index)+"] can not be assigned to",n),t=this.ternary(),function(n,r){return e.assign(n,t(n,r),r)}):e},ternary:function(){var e=this.logicalOR(),t,n;if(!this.expect("?"))return e;t=this.ternary();if(n=this.expect(":"))return this.ternaryFn(e,t,this.ternary());this.throwError("expected :",n)},logicalOR:function(){for(var e=this.logicalAND(),t;;){if(!(t=this.expect("||")))return e;e=this.binaryFn(e,t.fn,this.logicalAND())}},logicalAND:function(){var e=this.equality(),t;if(t=this.expect("&&"))e=this.binaryFn(e,t.fn,this.logicalAND());return e},equality:function(){var e=this.relational(),t;if(t=this.expect("==","!=","===","!=="))e=this.binaryFn(e,t.fn,this.equality());return e},relational:function(){var e=this.additive(),t;if(t=this.expect("<",">","<=",">="))e=this.binaryFn(e,t.fn,this.relational());return e},additive:function(){for(var e=this.multiplicative(),t;t=this.expect("+","-");)e=this.binaryFn(e,t.fn,this.multiplicative());return e},multiplicative:function(){for(var e=this.unary(),t;t=this.expect("*","/","%");)e=this.binaryFn(e,t.fn,this.unary());return e},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(Lr.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this,n=this.expect().text,r=sn(n,this.options,this.text);return c(function(t,n,i){return r(i||e(t,n),n)},{assign:function(r,i,s){return nn(e(r,s),n,i,t.text,t.options)}})},objectIndex:function(e){var t=this,r=this.expression();return this.consume("]"),c(function(i,s){var o=e(i,s),u=r(i,s),a;return o?((o=tn(o[u],t.text))&&o.then&&t.options.unwrapPromises&&(a=o,"$$v"in o||(a.$$v=n,a.then(function(e){a.$$v=e})),o=o.$$v),o):n},{assign:function(n,i,s){var o=r(n,s);return tn(e(n,s),t.text)[o]=i}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var r=this;return function(i,s){for(var o=[],u=t?t(i,s):i,a=0;a<n.length;a++)o.push(n[a](i,s));return a=e(i,s,u)||d,tn(u,r.text),tn(a,r.text),o=a.apply?a.apply(u,o):a(o[0],o[1],o[2],o[3],o[4]),tn(o,r.text)}},arrayDeclaration:function(){var e=[],t=!0;if("]"!==this.peekToken().text)do{var n=this.expression();e.push(n),n.constant||(t=!1)}while(this.expect(","));return this.consume("]"),c(function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r},{literal:!0,constant:t})},object:function(){var e=[],t=!0;if("}"!==this.peekToken().text)do{var n=this.expect(),n=n.string||n.text;this.consume(":");var r=this.expression();e.push({key:n,value:r}),r.constant||(t=!1)}while(this.expect(","));return this.consume("}"),c(function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i];r[s.key]=s.value(t,n)}return r},{literal:!0,constant:t})}};var Ar={},Or=r("$sce"),Mr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},_r=t.createElement("a"),Dr=/^\/?.*?:(\/.*)/,Pr=mn(e.location.href,!0);bn.$inject=["$provide"],En.$inject=["$locale"],Sn.$inject=["$locale"];var Hr=".",Br={yyyy:Nn("FullYear",4),yy:Nn("FullYear",2,0,!0),y:Nn("FullYear",1),MMMM:Cn("Month"),MMM:Cn("Month",!0),MM:Nn("Month",2,1),M:Nn("Month",1,1),dd:Nn("Date",2),d:Nn("Date",1),HH:Nn("Hours",2),H:Nn("Hours",1),hh:Nn("Hours",2,-12),h:Nn("Hours",1,-12),mm:Nn("Minutes",2),m:Nn("Minutes",1),ss:Nn("Seconds",2),s:Nn("Seconds",1),sss:Nn("Milliseconds",3),EEEE:Cn("Day"),EEE:Cn("Day",!0),a:function(e,t){return 12>e.getHours()?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){return e=-1*e.getTimezoneOffset(),e=(0<=e?"+":"")+(Tn(Math[0<e?"floor":"ceil"](e/60),2)+Tn(Math.abs(e%60),2))}},jr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Fr=/^\-?\d+$/;kn.$inject=["$locale"];var Ir=m(Hn),qr=m(Bn);On.$inject=["$parse"];var Rr=m({restrict:"E",compile:function(e,n){return 8>=jn&&(n.href||n.name||n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.on("click",function(e){t.attr("href")||e.preventDefault()})}}}),Ur={};s(or,function(e,t){if("multiple"!=e){var n=Lt("ng-"+t);Ur[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}}),s(["src","srcset","href"],function(e){var t=Lt("ng-"+e);Ur[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),jn&&r.prop(e,i[e]))})}}}});var zr={$addControl:d,$removeControl:d,$setValidity:d,$setDirty:d,$setPristine:d};_n.$inject=["$element","$attrs","$scope"];var Wr=function(e){return["$timeout",function(t){return{name:"form",restrict:e?"EAC":"E",controller:_n,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};er(r[0],"submit",o),r.on("$destroy",function(){t(function(){tr(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),a=i.name||i.ngForm;a&&nn(e,a,s,a),u&&r.on("$destroy",function(){u.$removeControl(s),a&&nn(e,a,n,a),c(s,zr)})}}}}}]},Xr=Wr(),Vr=Wr(!0),$r=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Jr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,Kr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Qr={text:Dn,number:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=i.$isEmpty(e);return t||Kr.test(e)?(i.$setValidity("number",!0),""===e?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return i.$isEmpty(e)?"":""+e}),r.min&&(e=function(e){var t=parseFloat(r.min);return!i.$isEmpty(e)&&e<t?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)},i.$parsers.push(e),i.$formatters.push(e)),r.max&&(e=function(e){var t=parseFloat(r.max);return!i.$isEmpty(e)&&e>t?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)},i.$parsers.push(e),i.$formatters.push(e)),i.$formatters.push(function(e){return i.$isEmpty(e)||E(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),e=function(e){return i.$isEmpty(e)||$r.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Dn(e,t,r,i,s,o),e=function(e){return i.$isEmpty(e)||Jr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){g(n.name)&&t.attr("name",f()),t.on("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;w(i)||(i=!0),w(s)||(s=!1),t.on("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e!==i},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:d,button:d,submit:d,reset:d},Gr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Qr[Hn(i.type)]||Qr.text)(n,r,i,s,t,e)}}}],Yr="ng-valid",Zr="ng-invalid",ei="ng-pristine",ti="ng-dirty",ni=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,o){function u(e,t){t=t?"-"+J(t,"-"):"",i.removeClass((e?Zr:Yr)+t).addClass((e?Yr:Zr)+t)}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=n.name;var a=o(n.ngModel),f=a.assign;if(!f)throw r("ngModel")("nonassign",n.ngModel,q(i));this.$render=d,this.$isEmpty=function(e){return g(e)||""===e||null===e||e!==e};var l=i.inheritedData("$formController")||zr,c=0,h=this.$error={};i.addClass(ei),u(!0),this.$setValidity=function(e,t){h[e]!==!t&&(t?(h[e]&&c--,c||(u(!0),this.$valid=!0,this.$invalid=!1)):(u(!1),this.$invalid=!0,this.$valid=!1,c++),h[e]=!t,u(t,e),l.$setValidity(e,t,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,i.removeClass(ti).addClass(ei)},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(ei).addClass(ti),l.$setDirty()),s(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,f(e,n),s(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=a(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],ri=function(){return{require:["ngModel","^?form"],controller:ni,link:function(e,t,n,r){var i=r[0],s=r[1]||zr;s.$addControl(i),e.$on("$destroy",function(){s.$removeControl(i)})}}},ii=m({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),si=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!r.$isEmpty(e))return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},oi=function(){return{require:"ngModel",link:function(e,t,r,i){var o=(e=/\/(.*)\//.exec(r.ngList))&&RegExp(e[1])||r.ngList||",";i.$parsers.push(function(e){if(!g(e)){var t=[];return e&&s(e.split(o),function(e){e&&t.push(Jn(e))}),t}}),i.$formatters.push(function(e){return x(e)?e.join(", "):n}),i.$isEmpty=function(e){return!e||!e.length}}}},ui=/^(true|false|\d+)$/,ai=function(){return{priority:100,compile:function(e,t){return ui.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},fi=Mn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),li=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],ci=["$sce","$parse",function(e,t){return function(n,r,i){r.addClass("ng-binding").data("$binding",i.ngBindHtml);var s=t(i.ngBindHtml);n.$watch(function(){return(s(n)||"").toString()},function(t){r.html(e.getTrustedHtml(s(n))||"")})}}],hi=Pn("",!0),pi=Pn("Odd",0),di=Pn("Even",1),vi=Mn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),mi=[function(){return{scope:!0,controller:"@"}}],gi={};s("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Lt("ng-"+e);gi[t]=["$parse",function(n){return{compile:function(r,i){var s=n(i[t]);return function(t,n,r){n.on(Hn(e),function(e){t.$apply(function(){s(t,{$event:e})})})}}}}]});var yi=["$animate",function(e){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,s,o){var u,a;n.$watch(i.ngIf,function(s){I(s)?a||(a=n.$new(),o(a,function(n){u={startNode:n[0],endNode:n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" ")},e.enter(n,r.parent(),r)})):(a&&(a.$destroy(),a=null),u&&(e.leave(Z(u)),u=null))})}}}],bi=["$http","$templateCache","$anchorScroll","$compile","$animate","$sce",function(e,t,n,r,i,s){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",compile:function(o,u){var a=u.ngInclude||u.src,f=u.onload||"",l=u.autoscroll;return function(o,u,c,h,p){var d=0,v,m,g=function(){v&&(v.$destroy(),v=null),m&&(i.leave(m),m=null)};o.$watch(s.parseAsResourceUrl(a),function(s){var a=function(){!y(l)||l&&!o.$eval(l)||n()},c=++d;s?(e.get(s,{cache:t}).success(function(e){if(c===d){var t=o.$new();p(t,function(n){g(),v=t,m=n,m.html(e),i.enter(m,null,u,a),r(m.contents())(v),v.$emit("$includeContentLoaded"),o.$eval(f)})}}).error(function(){c===d&&g()}),o.$emit("$includeContentRequested")):g()})}}}}],wi=Mn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Ei=Mn({terminal:!0,priority:1e3}),Si=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,i,o){var u=o.count,a=o.$attr.when&&i.attr(o.$attr.when),f=o.offset||0,l=r.$eval(a)||{},c={},h=t.startSymbol(),p=t.endSymbol(),d=/^when(Minus)?(.+)$/;s(o,function(e,t){d.test(t)&&(l[Hn(t.replace("when","").replace("Minus","-"))]=i.attr(o.$attr[t]))}),s(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),r.$watch(function(){var t=parseFloat(r.$eval(u));return isNaN(t)?"":(t in l||(t=e.pluralCat(t-f)),c[t](r,i,!0))},function(e){i.text(e)})}}}],xi=["$parse","$animate",function(e,n){var o=r("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(r,u,a,f,l){var c=a.ngRepeat,h=c.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),p,d,v,m,g,y,b={$id:yt};if(!h)throw o("iexp",c);a=h[1],f=h[2],(h=h[4])?(p=e(h),d=function(e,t,n){return y&&(b[y]=e),b[g]=t,b.$index=n,p(r,b)}):(v=function(e,t){return yt(t)},m=function(e){return e}),h=a.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw o("iidexp",a);g=h[3]||h[1],y=h[2];var w={};r.$watchCollection(f,function(e){var a,f,h=u[0],p,b={},E,S,x,T,N,C,k=[];if(i(e))N=e,p=d||v;else{p=d||m,N=[];for(x in e)e.hasOwnProperty(x)&&"$"!=x.charAt(0)&&N.push(x);N.sort()}E=N.length,f=k.length=N.length;for(a=0;a<f;a++)if(x=e===N?a:N[a],T=e[x],T=p(x,T,a),G(T,"`track by` id"),w.hasOwnProperty(T))C=w[T],delete w[T],b[T]=C,k[a]=C;else{if(b.hasOwnProperty(T))throw s(k,function(e){e&&e.startNode&&(w[e.id]=e)}),o("dupes",c,T);k[a]={id:T},b[T]=!1}for(x in w)w.hasOwnProperty(x)&&(C=w[x],a=Z(C),n.leave(a),s(a,function(e){e.$$NG_REMOVED=!0}),C.scope.$destroy());a=0;for(f=N.length;a<f;a++){x=e===N?a:N[a],T=e[x],C=k[a],k[a-1]&&(h=k[a-1].endNode);if(C.startNode){S=C.scope,p=h;do p=p.nextSibling;while(p&&p.$$NG_REMOVED);C.startNode!=p&&n.move(Z(C),null,Fn(h)),h=C.endNode}else S=r.$new();S[g]=T,y&&(S[y]=x),S.$index=a,S.$first=0===a,S.$last=a===E-1,S.$middle=!S.$first&&!S.$last,S.$odd=!(S.$even=0===(a&1)),C.startNode||l(S,function(e){e[e.length++]=t.createComment(" end ngRepeat: "+c+" "),n.enter(e,null,Fn(h)),h=e,C.scope=S,C.startNode=h&&h.endNode?h.endNode:e[0],C.endNode=e[e.length-1],b[C.id]=C})}w=b})}}}],Ti=["$animate",function(e){return function(t,n,r){t.$watch(r.ngShow,function(t){e[I(t)?"removeClass":"addClass"](n,"ng-hide")})}}],Ni=["$animate",function(e){return function(t,n,r){t.$watch(r.ngHide,function(t){e[I(t)?"addClass":"removeClass"](n,"ng-hide")})}}],Ci=Mn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&s(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ki=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,n,r,i){var o,u,a=[];t.$watch(r.ngSwitch||r.on,function(n){for(var f=0,l=a.length;f<l;f++)a[f].$destroy(),e.leave(u[f]);u=[],a=[];if(o=i.cases["!"+n]||i.cases["?"])t.$eval(r.change),s(o,function(n){var r=t.$new();a.push(r),n.transclude(r,function(t){var r=n.element;u.push(t),e.enter(t,r.parent(),r)})})})}}}],Li=Mn({transclude:"element",priority:800,require:"^ngSwitch",compile:function(e,t){return function(e,n,r,i,s){i.cases["!"+t.ngSwitchWhen]=i.cases["!"+t.ngSwitchWhen]||[],i.cases["!"+t.ngSwitchWhen].push({transclude:s,element:n})}}}),Ai=Mn({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Oi=Mn({controller:["$element","$transclude",function(e,t){if(!t)throw r("ngTransclude")("orphan",q(e));this.$transclude=t}],link:function(e,t,n,r){r.$transclude(function(e){t.html(""),t.append(e)})}}),Mi=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){"text/ng-template"==n.type&&e.put(n.id,t[0].text)}}}],_i=r("ngOptions"),Di=m({terminal:!0}),Pi=["$compile","$parse",function(e,r){var i=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,u={$setViewValue:d};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){G(t,'"option value"'),i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+yt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=d})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(N.parent()&&N.remove(),t.val(e),""===e&&E.prop("selected",!0)):g(e)&&E?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){N.parent()&&N.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var r;n.$render=function(){var e=new bt(n.$viewValue);s(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){D(r,n.$viewValue)||(r=M(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];s(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,s,u){function a(){var e={"":[]},n=[""],r,i,a,f,b;f=u.$modelValue,b=v(t)||[];var N=h?o(b):b,C,k,L;k={},a=!1;var A,O;if(m)if(g&&x(f))for(a=new bt([]),L=0;L<f.length;L++)k[c]=f[L],a.put(g(t,k),f[L]);else a=new bt(f);for(L=0;C=N.length,L<C;L++){i=L;if(h){i=N[L];if("$"===i.charAt(0))continue;k[h]=i}k[c]=b[i],r=p(t,k)||"",(i=e[r])||(i=e[r]=[],n.push(r)),m?r=y(a.remove(g?g(t,k):d(t,k))):(g?(r={},r[c]=f,r=g(t,r)===g(t,k)):r=f===d(t,k),a=a||r),A=l(t,k),A=y(A)?A:"",i.push({id:g?g(t,k):h?N[L]:L,label:A,selected:r})}m||(w||null===f?e[""].unshift({id:"",label:"",selected:!a}):a||e[""].unshift({id:"?",label:"",selected:!0})),k=0;for(N=n.length;k<N;k++){r=n[k],i=e[r],E.length<=k?(f={element:T.clone().attr("label",r),label:i.label},b=[f],E.push(b),s.append(f.element)):(b=E[k],f=b[0],f.label!=r&&f.element.attr("label",f.label=r)),A=null,L=0;for(C=i.length;L<C;L++)a=i[L],(r=b[L+1])?(A=r.element,r.label!==a.label&&A.text(r.label=a.label),r.id!==a.id&&A.val(r.id=a.id),A[0].selected!==a.selected&&A.prop("selected",r.selected=a.selected)):(""===a.id&&w?O=w:(O=S.clone()).val(a.id).attr("selected",a.selected).text(a.label),b.push({element:O,label:a.label,id:a.id,selected:a.selected}),A?A.after(O):f.element.append(O),A=O);for(L++;b.length>L;)b.pop().element.remove()}for(;E.length>k;)E.pop()[0].element.remove()}var f;if(!(f=b.match(i)))throw _i("iexp",b,q(s));var l=r(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=r(f[3]||""),d=r(f[2]?f[1]:c),v=r(f[7]),g=f[8]?r(f[8]):null,E=[[{element:s,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),s.html(""),s.on("change",function(){t.$apply(function(){var e,r=v(t)||[],i={},o,a,f,l,p,y,b;if(m){for(a=[],l=0,y=E.length;l<y;l++)for(e=E[l],f=1,p=e.length;f<p;f++)if((o=e[f].element)[0].selected){o=o.val(),h&&(i[h]=o);if(g)for(b=0;b<r.length&&(i[c]=r[b],g(t,i)!=o);b++);else i[c]=r[o];a.push(d(t,i))}}else if(o=s.val(),"?"==o)a=n;else if(""===o)a=null;else if(g){for(b=0;b<r.length;b++)if(i[c]=r[b],g(t,i)==o){a=d(t,i);break}}else i[c]=r[o],h&&(i[h]=o),a=d(t,i);u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){var d=l[0],v=l[1],m=f.multiple,b=f.ngOptions,w=!1,E,S=Fn(t.createElement("option")),T=Fn(t.createElement("optgroup")),N=S.clone();l=0;for(var C=a.children(),k=C.length;l<k;l++)if(""===C[l].value){E=w=C.eq(l);break}d.init(v,w,N);if(m&&(f.required||f.ngRequired)){var L=function(e){return v.$setValidity("required",!f.required||e&&e.length),e};v.$parsers.push(L),v.$formatters.unshift(L),f.$observe("required",function(){L(v.$viewValue)})}b?p(u,a,v):m?h(u,a,v):c(u,a,v,d)}}}}],Hi=["$interpolate",function(e){var t={addOption:d,removeOption:d};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.on("$destroy",function(){o.removeOption(r.value)})}}}}],Bi=m({restrict:"E",terminal:!0});(In=e.jQuery)?(Fn=In,c(In.fn,{scope:sr.scope,isolateScope:sr.isolateScope,controller:sr.controller,injector:sr.injector,inheritedData:sr.inheritedData}),nt("remove",!0,!0,!1),nt("empty",!1,!1,!1),nt("html",!1,!1,!0)):Fn=rt,Wn.element=Fn,function(t){c(t,{bootstrap:$,copy:M,extend:c,equals:D,element:Fn,forEach:s,injector:Et,noop:d,bind:H,toJson:j,fromJson:F,identity:v,isUndefined:g,isDefined:y,isString:w,isFunction:T,isObject:b,isNumber:E,isElement:k,isArray:x,version:Qn,isDate:S,lowercase:Hn,uppercase:Bn,callbacks:{counter:0},$$minErr:r,$$csp:P}),Xn=et(e);try{Xn("ngLocale")}catch(n){Xn("ngLocale",[]).provider("$locale",qt)}Xn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",kt).directive({a:Rr,input:Gr,textarea:Gr,form:Xr,script:Mi,select:Pi,style:Bi,option:Hi,ngBind:fi,ngBindHtml:ci,ngBindTemplate:li,ngClass:hi,ngClassEven:di,ngClassOdd:pi,ngCloak:vi,ngController:mi,ngForm:Vr,ngHide:Ni,ngIf:yi,ngInclude:bi,ngInit:wi,ngNonBindable:Ei,ngPluralize:Si,ngRepeat:xi,ngShow:Ti,ngStyle:Ci,ngSwitch:ki,ngSwitchWhen:Li,ngSwitchDefault:Ai,ngOptions:Di,ngTransclude:Oi,ngModel:ri,ngList:oi,ngChange:ii,required:si,ngRequired:si,ngValue:ai}).directive(Ur).directive(gi),e.provider({$anchorScroll:St,$animate:dr,$browser:Tt,$cacheFactory:Nt,$controller:At,$document:Ot,$exceptionHandler:Mt,$filter:bn,$interpolate:Ft,$interval:It,$http:Ht,$httpBackend:Bt,$location:Yt,$log:Zt,$parse:on,$rootScope:fn,$q:un,$sce:pn,$sceDelegate:hn,$sniffer:dn,$templateCache:Ct,$timeout:vn,$window:yn})}])}(Wn),Fn(t).ready(function(){V(t,$)})}(window,document),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-start{clip:rect(0,auto,auto,0);-ms-zoom:1.0001;}.ng-animate-active{clip:rect(-1px,auto,auto,0);-ms-zoom:1;}</style>'),n("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!csmain",["require","cs!jquery","angular"],function(e,t,n){var r,i,s;r=function(e){var t,n;return n=!1,t=null,function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},i=r(function(){e(["cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e){n.bootstrap(t(".wrap"),[e.name])})}),document.readyState==="complete"||document.readyState==="loaded"?i():t(window).load(function(){return i()}),s=1e4,window.setTimeout(function(){return i()},s)})}.call(this),t({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),n("main",function(){}),function(e,t,n){var r=t.$$minErr("$resource"),i=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;t.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(e,s){function o(e,t){this.template=e,this.defaults=t||{},this.urlParams={}}function u(m,g,y){function b(e,t){var s={};return t=h({},g,t),c(t,function(t,o){d(t)&&(t=t());var u;if(t&&t.charAt&&"@"==t.charAt(0)){u=e;var a=t.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!i.test("."+a))throw r("badmember",a);for(var a=a.split("."),f=0,l=a.length;f<l&&u!==n;f++){var c=a[f];u=null!==u?u[c]:n}}else u=t;s[o]=u}),s}function S(e){return e.resource}function T(e){p(e||{},this)}var N=new o(m);return y=h({},a,y),c(y,function(i,o){var u=/^(POST|PUT|PATCH)$/i.test(i.method);T[o]=function(o,a,m,g){var y={},w,k,L;switch(arguments.length){case 4:L=g,k=m;case 3:case 2:if(!d(a)){y=o,w=a,k=m;break}if(d(o)){k=o,L=a;break}k=a,L=m;case 1:d(o)?k=o:u?w=o:y=o;break;case 0:break;default:throw r("badargs",arguments.length)}var A=w instanceof T,O=A?w:i.isArray?[]:new T(w),M={},_=i.interceptor&&i.interceptor.response||S,P=i.interceptor&&i.interceptor.responseError||n;return c(i,function(e,t){"params"!=t&&"isArray"!=t&&"interceptor"!=t&&(M[t]=p(e))}),u&&(M.data=w),N.setUrlParams(M,h({},b(w,i.params||{}),y),i.url),y=e(M).then(function(e){var n=e.data,s=O.$promise;if(n){if(t.isArray(n)!==!!i.isArray)throw r("badcfg",i.isArray?"array":"object",t.isArray(n)?"array":"object");i.isArray?(O.length=0,c(n,function(e){O.push(new T(e))})):(p(n,O),O.$promise=s)}return O.$resolved=!0,e.resource=O,e},function(e){return O.$resolved=!0,(L||l)(e),s.reject(e)}),y=y.then(function(e){var t=_(e);return(k||l)(t,e.headers),t},P),A?y:(O.$promise=y,O.$resolved=!1,O)},T.prototype["$"+o]=function(e,t,n){return d(e)&&(n=t,t=e,e={}),e=T[o](e,this,t,n),e.$promise||e}}),T.bind=function(e){return u(m,h({},g,e),y)},T}var a={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},l=t.noop,c=t.forEach,h=t.extend,p=t.copy,d=t.isFunction;return o.prototype={setUrlParams:function(e,n,i){var s=this,o=i||s.template,u,a,l=s.urlParams={};c(o.split(/\W/),function(e){if("hasOwnProperty"===e)throw r("badname");!/^\d+$/.test(e)&&e&&RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(o)&&(l[e]=!0)}),o=o.replace(/\\:/g,":"),n=n||{},c(s.urlParams,function(e,r){u=n.hasOwnProperty(r)?n[r]:s.defaults[r],t.isDefined(u)&&null!==u?(a=encodeURIComponent(u).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),o=o.replace(RegExp(":"+r+"(\\W|$)","g"),a+"$1")):o=o.replace(RegExp("(/?):"+r+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),o=o.replace(/\/+$/,""),o=o.replace(/\/\.(?=\w+($|\?))/,"."),e.url=o.replace(/\/\\\./,"/."),c(n,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},u}])}(window,window.angular),n("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){n("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){n("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n"),nonce:e("pte_nonce"),options_nonce:e("pte_options_nonce")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={loading:!0,crop:!1,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.updateOptions=function(e){var t;e["pte-action"]="change-options",e["pte-nonce"]=r.options_nonce,o.log("Updating Options",e),t=n.thumbnailResource.get(e,function(){return o.log("Updated options")})},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate||f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){l(),t.forEach(n.thumbnails,function(e){return n.trash(e)}),u("randomizeUrl")({reset:!0})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o,u;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(t-.01<(u=r.size)&&u<t+.01){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){t!=="$promise"&&t!=="$resolved"&&(e.name=t,this.thumbnails.push(e),a(e))},n),n.updateSelected(),o.info("Disabling loading screen"),n.changePage("crop")}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1},n.anySelected=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.selected)return!0}return!1},n.$watch("currentThumbnailBarPosition",function(e,t){if(e===t)return;n.updateOptions({pte_thumbnail_bar:n.currentThumbnailBarPosition})}),n.toggleCurrentThumbnailBarPosition=function(){var e;e=["vertical","horizontal"],n.currentThumbnailBarPosition===e[0]?n.currentThumbnailBarPosition=e[1]:n.currentThumbnailBarPosition=e[0]}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),n("jcrop",function(){}),function(){n("cs!jcrop-api",["cs!jquery","cs!settings","jcrop"],function(e,t){var n,r,i;return i=function(e,t){var n,r,i,s,o,u,a;return a=[],r=a[0],n=a[1],u=a[2],o=a[3],s=0,i=function(){return s=new Date,u=null,o=e.apply(r,n),null},function(){var a,f;return a=new Date,f=t-(a-s),r=this,n=arguments,f<=0?(clearTimeout(u),u=null,s=a,o=e.apply(r,n)):u||(u=setTimeout(i,f)),o}},r=null,n={onChange:i(function(){var e,t,n,i,s,o,u,a,f,l;t=function(t){t!==e&&r.setOptions({bgColor:t})},u=function(){var e;return e=function(e,t){return e==null?!0:e===0?!1:e<t},a&&e(s,f)&&e(i,o)?!1:!a&&e(s,f)||e(i,o)?!1:!0},n=this.getOptions().cropConstraints;if(!n){t("black");return}s=n[0],i=n[1],a=n[2],e=this.getOptions().bgColor,l=this.tellSelect(),f=l.w,o=l.h,u()?t("red"):t("green")},50),onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(isNaN(n))return;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){n("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){if(t===n)return;e.updateOptions({pte_crop_save:e.pteCropSave?"true":"false"})}),e.userDisabledFitCrop=!1,e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,n===null&&(e.userDisabledFitCrop?e.setInfoMessage(e.i18n.crop_problems):(e.pteFitCrop=!0,e.pteFitCropColor=r.i18n.transparent)),t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null,!1],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.pteJpgCompression=null,e.updateSelected())},e.fitToCrop=function(t){var i;if(!n("#pteFitCrop").prop("checked")){e.userDisabledFitCrop=!0,e.setInfoMessage(e.i18n.crop_problems);return}i=e.pteFitCropColor||"",n("#pte-iris-dialog").find("input").val(i).iris({hide:!1}).end().dialog({dialogClass:"wp-dialog",buttons:[{text:r.i18n.fitCrop_transparent,click:function(){return e.$apply("pteFitCropColor = '"+r.i18n.transparent+"'"),n(this).dialog("close")}},{text:r.i18n.fitCrop_save,click:function(){return e.$apply("pteFitCropColor = '"+n("input",this).val()+"'"),n(this).dialog("close")}}]})},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;t=null,i=[null,null,!1];try{l=!1,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],n=c.crop,p=c.width,a=c.height,n=+n,p=+p,a=+a,h=p/a;if(c.selected){o=i[0],s=i[1],f=i[2];if(!o||0<p&&o<p)o=p;if(!s||0<a&&s<a)s=a;f=f||n,i=[o,s,f],l=!0}if(c.selected&&n>0){if(t!==null&&(h+.01<t||t<h-.01))throw"PTE_EXCEPTION";t=h}}t===null&&l===!1&&(t=r.width/r.height)}catch(g){u=g,t=null}e.aspectRatio=t,e.cropConstraints=i},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d,v,m;if(e.cropInProgress)return;e.cropInProgress=!0,f=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(f.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}v=t.tellSelect(),c=v.x,p=v.y,l=v.w,a=v.h,h=v.x2,d=v.y2;if(c===0&&p===0&&l===0&&a===0&&h===0&&d===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}o={"pte-action":"resize-images",id:r.id,"pte-sizes[]":f,w:l,h:a,x:c,y:p,"pte-nonce":r.nonce},e.pteCropSave&&(o.save="true"),0<=(m=+e.pteJpgCompression)&&m<=100&&(o["pte-jpeg-compression"]=e.pteJpgCompression),e.pteFitCrop&&(s=e.pteFitCropColor||"",s===r.i18n.transparent&&(s=""),o["pte-fit-crop-color"]=s),u=e.thumbnailResource.get(o,function(){e.cropInProgress=!1;if(u!=null?u.immediate:void 0)return e.confirmResults(u);e.setNonces({"pte-nonce":u["pte-nonce"],"pte-delete-nonce":u["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;u.thumbnails[t.name]&&(n={url:u.thumbnails[t.name].url,file:u.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){n("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),t(["main"])})();
js/controllers/CropCtrl.coffee CHANGED
@@ -175,6 +175,7 @@ define [
175
  'h':h
176
  'x':x
177
  'y':y
 
178
 
179
  if $scope.pteCropSave
180
  crop_options['save'] = 'true'
175
  'h':h
176
  'x':x
177
  'y':y
178
+ 'pte-nonce': settings.nonce
179
 
180
  if $scope.pteCropSave
181
  crop_options['save'] = 'true'
js/controllers/PteCtrl.coffee CHANGED
@@ -59,6 +59,7 @@ define [
59
  ###
60
  $scope.updateOptions = (update_options) ->
61
  update_options['pte-action'] = 'change-options'
 
62
  $log.log "Updating Options", update_options
63
 
64
  updated = $scope.thumbnailResource.get update_options, ->
59
  ###
60
  $scope.updateOptions = (update_options) ->
61
  update_options['pte-action'] = 'change-options'
62
+ update_options['pte-nonce'] = settings.options_nonce
63
  $log.log "Updating Options", update_options
64
 
65
  updated = $scope.thumbnailResource.get update_options, ->
js/settings.coffee CHANGED
@@ -9,3 +9,6 @@ define [], ->
9
  id: getWindowVar 'post_id'
10
  ajaxurl: getWindowVar 'ajaxurl'
11
  i18n: getWindowVar 'pteI18n'
 
 
 
9
  id: getWindowVar 'post_id'
10
  ajaxurl: getWindowVar 'ajaxurl'
11
  i18n: getWindowVar 'pteI18n'
12
+ nonce: getWindowVar 'pte_nonce'
13
+ options_nonce: getWindowVar 'pte_options_nonce'
14
+
php/functions.php CHANGED
@@ -429,6 +429,11 @@ function pte_resize_images(){
429
  return pte_json_error( "ResizeImages initialization failed: '{$id}-{$w}-{$h}-{$x}-{$y}'" );
430
  }
431
 
 
 
 
 
 
432
  // Get the sizes to process
433
  $pte_sizes = $_GET['pte-sizes'];
434
  if ( !is_array( $pte_sizes ) ){
429
  return pte_json_error( "ResizeImages initialization failed: '{$id}-{$w}-{$h}-{$x}-{$y}'" );
430
  }
431
 
432
+ // Check nonce
433
+ if ( !check_ajax_referer( "pte-resize-{$id}", 'pte-nonce', false ) ){
434
+ return pte_json_error( "CSRF Check failed" );
435
+ }
436
+
437
  // Get the sizes to process
438
  $pte_sizes = $_GET['pte-sizes'];
439
  if ( !is_array( $pte_sizes ) ){
post-thumbnail-editor.php CHANGED
@@ -4,7 +4,7 @@ Plugin name: Post Thumbnail Editor
4
  Plugin URI: http://sewpafly.github.io/post-thumbnail-editor/
5
  Author: sewpafly
6
  Author URI: http://sewpafly.github.io/post-thumbnail-editor/
7
- Version: 2.4.1
8
  Description: Individually manage your post thumbnails
9
 
10
  LICENSE
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
  define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
35
  define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
36
  define( 'PTE_DOMAIN', "post-thumbnail-editor");
37
- define( 'PTE_VERSION', "2.4.1");
38
 
39
  // TODO:
40
  // * Find the best place for the require log (only when it's really needed, create an init function?)
@@ -106,6 +106,11 @@ function pte_update_user_options(){
106
  require_once( PTE_PLUGINPATH . 'php/options.php' );
107
  $options = pte_get_user_options();
108
 
 
 
 
 
 
109
  if ( isset( $_REQUEST['pte_crop_save'] ) ) {
110
  if ( strtolower( $_REQUEST['pte_crop_save'] ) === "true" )
111
  $options['pte_crop_save'] = true;
4
  Plugin URI: http://sewpafly.github.io/post-thumbnail-editor/
5
  Author: sewpafly
6
  Author URI: http://sewpafly.github.io/post-thumbnail-editor/
7
+ Version: 2.4.2
8
  Description: Individually manage your post thumbnails
9
 
10
  LICENSE
34
  define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
35
  define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
36
  define( 'PTE_DOMAIN', "post-thumbnail-editor");
37
+ define( 'PTE_VERSION', "2.4.2");
38
 
39
  // TODO:
40
  // * Find the best place for the require log (only when it's really needed, create an init function?)
106
  require_once( PTE_PLUGINPATH . 'php/options.php' );
107
  $options = pte_get_user_options();
108
 
109
+ // Check nonce
110
+ if ( !check_ajax_referer( "pte-options", 'pte-nonce', false ) ){
111
+ return pte_json_error( "CSRF Check failed" );
112
+ }
113
+
114
  if ( isset( $_REQUEST['pte_crop_save'] ) ) {
115
  if ( strtolower( $_REQUEST['pte_crop_save'] ) === "true" )
116
  $options['pte_crop_save'] = true;