tablo_connect 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +43 -0
- data/Rakefile +26 -0
- data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-animate.js +3928 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-animate.min.js +56 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-animate.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-aria.js +397 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-aria.min.js +14 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-aria.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-cookies.js +321 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-cookies.min.js +9 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-cookies.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-csp.css +21 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-loader.js +443 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-loader.min.js +10 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-loader.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-message-format.js +980 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-message-format.min.js +26 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-message-format.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-messages.js +685 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-messages.min.js +12 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-messages.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-mocks.js +2470 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-resource.js +675 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-resource.min.js +13 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-resource.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-route.js +991 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-route.min.js +15 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-route.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.js +683 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.min.js +16 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-scenario.js +40324 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-touch.js +628 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-touch.min.js +13 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-touch.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/angular-ui-router.js +4370 -0
- data/app/assets/javascripts/tablo_connect/angular/angular.js +28904 -0
- data/app/assets/javascripts/tablo_connect/angular/angular.min.js +294 -0
- data/app/assets/javascripts/tablo_connect/angular/angular.min.js.map +8 -0
- data/app/assets/javascripts/tablo_connect/angular/errors.json +1 -0
- data/app/assets/javascripts/tablo_connect/angular/version.json +1 -0
- data/app/assets/javascripts/tablo_connect/angular/version.txt +1 -0
- data/app/assets/javascripts/tablo_connect/application.js +21 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/affix.js +162 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/alert.js +94 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/button.js +120 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/carousel.js +237 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/collapse.js +211 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/dropdown.js +165 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/modal.js +337 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/popover.js +108 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/scrollspy.js +172 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/tab.js +155 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/tooltip.js +514 -0
- data/app/assets/javascripts/tablo_connect/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/tablo_connect/jquery/jquery.js +9210 -0
- data/app/assets/javascripts/tablo_connect/ng_app/app.js +39 -0
- data/app/assets/javascripts/tablo_connect/ng_app/controllers/episodes_controller.js +17 -0
- data/app/assets/javascripts/tablo_connect/ng_app/controllers/home_controller.js +9 -0
- data/app/assets/javascripts/tablo_connect/ng_app/controllers/movies_controller.js +17 -0
- data/app/assets/javascripts/tablo_connect/ng_app/controllers/shows_controller.js +9 -0
- data/app/assets/javascripts/tablo_connect/ng_app/filters/titleize_filter.js +17 -0
- data/app/assets/javascripts/tablo_connect/ng_app/filters/url_filter.js +19 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/alerts.js +9 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/directives/alerts_directive.js +19 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/services/alerts_service.js +22 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/templates/alerts.html +6 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/directives/tablo_sync_directive.js +31 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/services/tablo_sync_service.js +20 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/tablo_sync.js +9 -0
- data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/templates/tablo_sync.html +4 -0
- data/app/assets/javascripts/tablo_connect/ng_app/services/tablo_service.js +98 -0
- data/app/assets/javascripts/tablo_connect/ng_app/templates/episodes.html +36 -0
- data/app/assets/javascripts/tablo_connect/ng_app/templates/index.html +3 -0
- data/app/assets/javascripts/tablo_connect/ng_app/templates/movies.html +33 -0
- data/app/assets/javascripts/tablo_connect/ng_app/templates/shows.html +13 -0
- data/app/assets/stylesheets/tablo_connect/_bootstrap.scss +56 -0
- data/app/assets/stylesheets/tablo_connect/_global.scss +19 -0
- data/app/assets/stylesheets/tablo_connect/_movies.scss +0 -0
- data/app/assets/stylesheets/tablo_connect/_shows.scss +30 -0
- data/app/assets/stylesheets/tablo_connect/application.scss +18 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_alerts.scss +73 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_badges.scss +68 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_breadcrumbs.scss +26 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_button-groups.scss +244 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_buttons.scss +168 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_carousel.scss +269 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_close.scss +36 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_code.scss +69 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_component-animations.scss +37 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_dropdowns.scss +216 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_forms.scss +611 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_glyphicons.scss +307 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_grid.scss +84 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_input-groups.scss +167 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_jumbotron.scss +52 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_list-group.scss +130 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_media.scss +66 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_mixins.scss +40 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_modals.scss +150 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_navbar.scss +662 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_navs.scss +242 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_normalize.scss +424 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_pager.scss +54 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_pagination.scss +89 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_panels.scss +271 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_popovers.scss +131 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_print.scss +101 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_progress-bars.scss +87 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_responsive-embed.scss +35 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_responsive-utilities.scss +179 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_scaffolding.scss +161 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_tables.scss +234 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_theme.scss +291 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_thumbnails.scss +38 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_tooltip.scss +101 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_type.scss +298 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_utilities.scss +55 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_variables.scss +872 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_background-variant.scss +12 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_buttons.scss +68 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_forms.scss +88 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_image.scss +33 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_list-group.scss +32 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_pagination.scss +24 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_reset-text.scss +18 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/app/controllers/tablo_connect/application_controller.rb +4 -0
- data/app/controllers/tablo_connect/copy_controller.rb +75 -0
- data/app/controllers/tablo_connect/home_controller.rb +6 -0
- data/app/controllers/tablo_connect/movies_controller.rb +9 -0
- data/app/controllers/tablo_connect/shows_controller.rb +11 -0
- data/app/controllers/tablo_connect/sync_controller.rb +73 -0
- data/app/helpers/tablo_connect/application_helper.rb +4 -0
- data/app/helpers/tablo_connect/movies_helper.rb +4 -0
- data/app/helpers/tablo_connect/shows_helper.rb +4 -0
- data/app/models/tablo_connect/movie.rb +14 -0
- data/app/models/tablo_connect/show.rb +23 -0
- data/app/views/layouts/tablo_connect/_header.html.erb +20 -0
- data/app/views/layouts/tablo_connect/application.html.erb +19 -0
- data/app/views/tablo_connect/home/index.html.erb +1 -0
- data/config/routes.rb +10 -0
- data/db/migrate/20151101164611_create_tablo_connect_movies.rb +18 -0
- data/db/migrate/20151101165020_create_tablo_connect_shows.rb +21 -0
- data/lib/tablo_connect.rb +7 -0
- data/lib/tablo_connect/engine.rb +28 -0
- data/lib/tablo_connect/version.rb +3 -0
- data/lib/tasks/tablo_connect_tasks.rake +4 -0
- data/spec/controllers/tablo_connect/copy_controller_spec.rb +244 -0
- data/spec/controllers/tablo_connect/movies_controller_spec.rb +27 -0
- data/spec/controllers/tablo_connect/shows_controller_spec.rb +45 -0
- data/spec/controllers/tablo_connect/sync_controller_spec.rb +209 -0
- data/spec/factories/tablo_connect_movies.rb +11 -0
- data/spec/factories/tablo_connect_shows.rb +15 -0
- data/spec/javascript/angular-environment.js +1 -0
- data/spec/javascript/karma.conf.js +48 -0
- data/spec/javascript/unit/controllers/episodes_controller_spec.js +49 -0
- data/spec/javascript/unit/controllers/home_controller_spec.js +34 -0
- data/spec/javascript/unit/controllers/movies_controller_spec.js +55 -0
- data/spec/javascript/unit/controllers/shows_controller_spec.js +33 -0
- data/spec/javascript/unit/filters/titleize_filter_spec.js +25 -0
- data/spec/javascript/unit/filters/url_filter_spec.js +33 -0
- data/spec/javascript/unit/modules/alerts/directives/alerts_directive_spec.js +39 -0
- data/spec/javascript/unit/modules/alerts/services/alerts_service_spec.js +51 -0
- data/spec/javascript/unit/modules/tablo_sync/directives/tablo_sync_directive_spec.js +68 -0
- data/spec/javascript/unit/modules/tablo_sync/services/tablo_sync_service_spec.js +26 -0
- data/spec/javascript/unit/services/tablo_service_spec.js +28 -0
- data/spec/models/tablo_connect/movie_spec.rb +32 -0
- data/spec/models/tablo_connect/show_spec.rb +65 -0
- data/spec/spec_helper.rb +86 -0
- data/spec/test_app/README.rdoc +28 -0
- data/spec/test_app/Rakefile +6 -0
- data/spec/test_app/app/assets/javascripts/application.js +13 -0
- data/spec/test_app/app/assets/stylesheets/application.css +15 -0
- data/spec/test_app/app/controllers/application_controller.rb +5 -0
- data/spec/test_app/app/helpers/application_helper.rb +2 -0
- data/spec/test_app/app/views/layouts/application.html.erb +14 -0
- data/spec/test_app/bin/bundle +3 -0
- data/spec/test_app/bin/rails +4 -0
- data/spec/test_app/bin/rake +4 -0
- data/spec/test_app/bin/setup +29 -0
- data/spec/test_app/config.ru +4 -0
- data/spec/test_app/config/application.rb +32 -0
- data/spec/test_app/config/boot.rb +5 -0
- data/spec/test_app/config/database.yml +25 -0
- data/spec/test_app/config/environment.rb +5 -0
- data/spec/test_app/config/environments/development.rb +41 -0
- data/spec/test_app/config/environments/production.rb +79 -0
- data/spec/test_app/config/environments/test.rb +42 -0
- data/spec/test_app/config/initializers/assets.rb +11 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/test_app/config/initializers/inflections.rb +16 -0
- data/spec/test_app/config/initializers/mime_types.rb +4 -0
- data/spec/test_app/config/initializers/session_store.rb +3 -0
- data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/test_app/config/locales/en.yml +23 -0
- data/spec/test_app/config/routes.rb +4 -0
- data/spec/test_app/config/secrets.yml +22 -0
- data/spec/test_app/db/schema.rb +49 -0
- data/spec/test_app/db/test.sqlite3 +0 -0
- data/spec/test_app/log/test.log +5561 -0
- data/spec/test_app/public/404.html +67 -0
- data/spec/test_app/public/422.html +67 -0
- data/spec/test_app/public/500.html +66 -0
- data/spec/test_app/public/favicon.ico +0 -0
- metadata +550 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
AngularJS v1.4.7
|
3
|
+
(c) 2010-2015 Google, Inc. http://angularjs.org
|
4
|
+
License: MIT
|
5
|
+
*/
|
6
|
+
(function(s,p,t){'use strict';var q="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),n=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};p.module("ngAria",["ng"]).provider("$aria",function(){function a(a,f,l,m){return function(d,e,b){var g=b.$normalize(f);!c[g]||n(e,l)||b[g]||d.$watch(b[a],function(b){b=m?!b:!!b;e.attr(f,b)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaMultiline:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};
|
7
|
+
this.config=function(a){c=p.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngModel",["$aria",function(a){function c(c,m,d){return a.config(m)&&!d.attr(c)}function k(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function f(a,c){var d=
|
8
|
+
a.type,e=a.role;return"checkbox"===(d||e)||"menuitemcheckbox"===e?"checkbox":"radio"===(d||e)||"menuitemradio"===e?"radio":"range"===d||"progressbar"===e||"slider"===e?"range":"textbox"===(d||e)||"TEXTAREA"===c[0].nodeName?"multiline":""}return{restrict:"A",require:"?ngModel",priority:200,compile:function(l,m){var d=f(m,l);return{pre:function(a,b,c,h){"checkbox"===d&&"checkbox"!==c.type&&(h.$isEmpty=function(b){return!1===b})},post:function(e,b,g,h){function f(){return h.$modelValue}function m(){return r?
|
9
|
+
(r=!1,function(a){a=g.value==h.$viewValue;b.attr("aria-checked",a);b.attr("tabindex",0-!a)}):function(a){b.attr("aria-checked",g.value==h.$viewValue)}}function l(){b.attr("aria-checked",!h.$isEmpty(h.$viewValue))}var r=c("tabindex","tabindex",b);switch(d){case "radio":case "checkbox":k(d,b)&&b.attr("role",d);c("aria-checked","ariaChecked",b)&&e.$watch(f,"radio"===d?m():l);r&&b.attr("tabindex",0);break;case "range":k(d,b)&&b.attr("role","slider");if(a.config("ariaValue")){var n=!b.attr("aria-valuemin")&&
|
10
|
+
(g.hasOwnProperty("min")||g.hasOwnProperty("ngMin")),p=!b.attr("aria-valuemax")&&(g.hasOwnProperty("max")||g.hasOwnProperty("ngMax")),q=!b.attr("aria-valuenow");n&&g.$observe("min",function(a){b.attr("aria-valuemin",a)});p&&g.$observe("max",function(a){b.attr("aria-valuemax",a)});q&&e.$watch(f,function(a){b.attr("aria-valuenow",a)})}r&&b.attr("tabindex",0);break;case "multiline":c("aria-multiline","ariaMultiline",b)&&b.attr("aria-multiline",!0)}h.$validators.required&&c("aria-required","ariaRequired",
|
11
|
+
b)&&e.$watch(function(){return h.$error.required},function(a){b.attr("aria-required",!!a)});c("aria-invalid","ariaInvalid",b)&&e.$watch(function(){return h.$invalid},function(a){b.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",[])}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,c,k,f){c.attr("aria-live")||c.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",
|
12
|
+
function(a,c){return{restrict:"A",compile:function(k,f){var l=c(f.ngClick,null,!0);return function(c,d,e){if(!n(d,q)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!e.ngKeypress))d.on("keypress",function(a){function d(){l(c,{$event:a})}var e=a.which||a.keyCode;32!==e&&13!==e||c.$apply(d)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c,k,f){!a.config("tabindex")||
|
13
|
+
k.attr("tabindex")||n(k,q)||k.attr("tabindex",0)}}])})(window,window.angular);
|
14
|
+
//# sourceMappingURL=angular-aria.min.js.map
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"version":3,
|
3
|
+
"file":"angular-aria.min.js",
|
4
|
+
"lineCount":13,
|
5
|
+
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAyDtC,IAAIC,EAAgB,gDAAA,MAAA,CAAA,GAAA,CAApB,CAEIC,EAAcA,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAsB,CAC9C,GAAiD,EAAjD,GAAIA,CAAAC,QAAA,CAAsBF,CAAA,CAAK,CAAL,CAAAG,SAAtB,CAAJ,CACE,MAAO,CAAA,CAFqC,CAR7BP,EAAAQ,OAAA,CAAe,QAAf,CAAyB,CAAC,IAAD,CAAzB,CAAAC,SAAAC,CACc,OADdA,CAkCnBC,QAAsB,EAAG,CAwCvBC,QAASA,EAAS,CAACC,CAAD,CAAWC,CAAX,CAAqBZ,CAArB,CAAoCa,CAApC,CAA4C,CAC5D,MAAO,SAAQ,CAACC,CAAD,C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A4LyB,CAAC,OAAD,CAAU,QAAQ,CAACC,CAAD,CAAQ,CACjD,MAAO,SAAQ,CAACzB,CAAD,CAAQZ,CAAR,CAAca,CAAd,CAAoB,CAC7B,CAAAwB,CAAArB,OAAA,CAAa,UAAb,CAAJ;AAAiChB,CAAAa,KAAA,CAAU,UAAV,CAAjC,EAA2Dd,CAAA,CAAYC,CAAZ,CAAkBF,CAAlB,CAA3D,EACEE,CAAAa,KAAA,CAAU,UAAV,CAAsB,CAAtB,CAF+B,CADc,CAA1B,CA5LzB,CAlMsC,CAArC,CAAD,CAuYGlB,MAvYH,CAuYWA,MAAAC,QAvYX;",
|
6
|
+
"sources":["angular-aria.js"],
|
7
|
+
"names":["window","angular","undefined","nodeBlackList","isNodeOneOf","elem","nodeTypeArray","indexOf","nodeName","module","provider","ngAriaModule","$AriaProvider","watchExpr","attrName","ariaAttr","negate","scope","attr","ariaCamelName","$normalize","config","$watch","boolVal","ariaHidden","ariaChecked","ariaDisabled","ariaRequired","ariaInvalid","ariaMultiline","ariaValue","tabindex","bindKeypress","bindRoleForClick","this.config","newConfig","extend","$get","this.$get","key","$$watchExpr","directive","$aria","shouldAttachAttr","normalizedAttr","shouldAttachRole","role","getShape","type","restrict","require","priority","compile","shape","pre","ngModel","$isEmpty","ngModel.$isEmpty","value","post","ngAriaWatchModelValue","$modelValue","getRadioReaction","needsTabIndex","ngAriaRadioReaction","newVal","$viewValue","ngAriaCheckboxReaction","needsAriaValuemin","hasOwnProperty","needsAriaValuemax","needsAriaValuenow","$observe","ngAriaValueMinReaction","ngAriaValueNowReaction","$validators","required","ngAriaRequiredWatch","$error","ngAriaRequiredReaction","ngAriaInvalidWatch","$invalid","ngAriaInvalidReaction","link","ngMessages","$parse","fn","ngClick","ngKeypress","on","event","callback","$event","keyCode","which","$apply"]
|
8
|
+
}
|
@@ -0,0 +1,321 @@
|
|
1
|
+
/**
|
2
|
+
* @license AngularJS v1.4.7
|
3
|
+
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
|
+
* License: MIT
|
5
|
+
*/
|
6
|
+
(function(window, angular, undefined) {'use strict';
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @ngdoc module
|
10
|
+
* @name ngCookies
|
11
|
+
* @description
|
12
|
+
*
|
13
|
+
* # ngCookies
|
14
|
+
*
|
15
|
+
* The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
|
16
|
+
*
|
17
|
+
*
|
18
|
+
* <div doc-module-components="ngCookies"></div>
|
19
|
+
*
|
20
|
+
* See {@link ngCookies.$cookies `$cookies`} for usage.
|
21
|
+
*/
|
22
|
+
|
23
|
+
|
24
|
+
angular.module('ngCookies', ['ng']).
|
25
|
+
/**
|
26
|
+
* @ngdoc provider
|
27
|
+
* @name $cookiesProvider
|
28
|
+
* @description
|
29
|
+
* Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service.
|
30
|
+
* */
|
31
|
+
provider('$cookies', [function $CookiesProvider() {
|
32
|
+
/**
|
33
|
+
* @ngdoc property
|
34
|
+
* @name $cookiesProvider#defaults
|
35
|
+
* @description
|
36
|
+
*
|
37
|
+
* Object containing default options to pass when setting cookies.
|
38
|
+
*
|
39
|
+
* The object may have following properties:
|
40
|
+
*
|
41
|
+
* - **path** - `{string}` - The cookie will be available only for this path and its
|
42
|
+
* sub-paths. By default, this would be the URL that appears in your base tag.
|
43
|
+
* - **domain** - `{string}` - The cookie will be available only for this domain and
|
44
|
+
* its sub-domains. For obvious security reasons the user agent will not accept the
|
45
|
+
* cookie if the current domain is not a sub domain or equals to the requested domain.
|
46
|
+
* - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT"
|
47
|
+
* or a Date object indicating the exact date/time this cookie will expire.
|
48
|
+
* - **secure** - `{boolean}` - The cookie will be available only in secured connection.
|
49
|
+
*
|
50
|
+
* Note: by default the address that appears in your `<base>` tag will be used as path.
|
51
|
+
* This is important so that cookies will be visible for all routes in case html5mode is enabled
|
52
|
+
*
|
53
|
+
**/
|
54
|
+
var defaults = this.defaults = {};
|
55
|
+
|
56
|
+
function calcOptions(options) {
|
57
|
+
return options ? angular.extend({}, defaults, options) : defaults;
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* @ngdoc service
|
62
|
+
* @name $cookies
|
63
|
+
*
|
64
|
+
* @description
|
65
|
+
* Provides read/write access to browser's cookies.
|
66
|
+
*
|
67
|
+
* <div class="alert alert-info">
|
68
|
+
* Up until Angular 1.3, `$cookies` exposed properties that represented the
|
69
|
+
* current browser cookie values. In version 1.4, this behavior has changed, and
|
70
|
+
* `$cookies` now provides a standard api of getters, setters etc.
|
71
|
+
* </div>
|
72
|
+
*
|
73
|
+
* Requires the {@link ngCookies `ngCookies`} module to be installed.
|
74
|
+
*
|
75
|
+
* @example
|
76
|
+
*
|
77
|
+
* ```js
|
78
|
+
* angular.module('cookiesExample', ['ngCookies'])
|
79
|
+
* .controller('ExampleController', ['$cookies', function($cookies) {
|
80
|
+
* // Retrieving a cookie
|
81
|
+
* var favoriteCookie = $cookies.get('myFavorite');
|
82
|
+
* // Setting a cookie
|
83
|
+
* $cookies.put('myFavorite', 'oatmeal');
|
84
|
+
* }]);
|
85
|
+
* ```
|
86
|
+
*/
|
87
|
+
this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) {
|
88
|
+
return {
|
89
|
+
/**
|
90
|
+
* @ngdoc method
|
91
|
+
* @name $cookies#get
|
92
|
+
*
|
93
|
+
* @description
|
94
|
+
* Returns the value of given cookie key
|
95
|
+
*
|
96
|
+
* @param {string} key Id to use for lookup.
|
97
|
+
* @returns {string} Raw cookie value.
|
98
|
+
*/
|
99
|
+
get: function(key) {
|
100
|
+
return $$cookieReader()[key];
|
101
|
+
},
|
102
|
+
|
103
|
+
/**
|
104
|
+
* @ngdoc method
|
105
|
+
* @name $cookies#getObject
|
106
|
+
*
|
107
|
+
* @description
|
108
|
+
* Returns the deserialized value of given cookie key
|
109
|
+
*
|
110
|
+
* @param {string} key Id to use for lookup.
|
111
|
+
* @returns {Object} Deserialized cookie value.
|
112
|
+
*/
|
113
|
+
getObject: function(key) {
|
114
|
+
var value = this.get(key);
|
115
|
+
return value ? angular.fromJson(value) : value;
|
116
|
+
},
|
117
|
+
|
118
|
+
/**
|
119
|
+
* @ngdoc method
|
120
|
+
* @name $cookies#getAll
|
121
|
+
*
|
122
|
+
* @description
|
123
|
+
* Returns a key value object with all the cookies
|
124
|
+
*
|
125
|
+
* @returns {Object} All cookies
|
126
|
+
*/
|
127
|
+
getAll: function() {
|
128
|
+
return $$cookieReader();
|
129
|
+
},
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @ngdoc method
|
133
|
+
* @name $cookies#put
|
134
|
+
*
|
135
|
+
* @description
|
136
|
+
* Sets a value for given cookie key
|
137
|
+
*
|
138
|
+
* @param {string} key Id for the `value`.
|
139
|
+
* @param {string} value Raw value to be stored.
|
140
|
+
* @param {Object=} options Options object.
|
141
|
+
* See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
|
142
|
+
*/
|
143
|
+
put: function(key, value, options) {
|
144
|
+
$$cookieWriter(key, value, calcOptions(options));
|
145
|
+
},
|
146
|
+
|
147
|
+
/**
|
148
|
+
* @ngdoc method
|
149
|
+
* @name $cookies#putObject
|
150
|
+
*
|
151
|
+
* @description
|
152
|
+
* Serializes and sets a value for given cookie key
|
153
|
+
*
|
154
|
+
* @param {string} key Id for the `value`.
|
155
|
+
* @param {Object} value Value to be stored.
|
156
|
+
* @param {Object=} options Options object.
|
157
|
+
* See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
|
158
|
+
*/
|
159
|
+
putObject: function(key, value, options) {
|
160
|
+
this.put(key, angular.toJson(value), options);
|
161
|
+
},
|
162
|
+
|
163
|
+
/**
|
164
|
+
* @ngdoc method
|
165
|
+
* @name $cookies#remove
|
166
|
+
*
|
167
|
+
* @description
|
168
|
+
* Remove given cookie
|
169
|
+
*
|
170
|
+
* @param {string} key Id of the key-value pair to delete.
|
171
|
+
* @param {Object=} options Options object.
|
172
|
+
* See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
|
173
|
+
*/
|
174
|
+
remove: function(key, options) {
|
175
|
+
$$cookieWriter(key, undefined, calcOptions(options));
|
176
|
+
}
|
177
|
+
};
|
178
|
+
}];
|
179
|
+
}]);
|
180
|
+
|
181
|
+
angular.module('ngCookies').
|
182
|
+
/**
|
183
|
+
* @ngdoc service
|
184
|
+
* @name $cookieStore
|
185
|
+
* @deprecated
|
186
|
+
* @requires $cookies
|
187
|
+
*
|
188
|
+
* @description
|
189
|
+
* Provides a key-value (string-object) storage, that is backed by session cookies.
|
190
|
+
* Objects put or retrieved from this storage are automatically serialized or
|
191
|
+
* deserialized by angular's toJson/fromJson.
|
192
|
+
*
|
193
|
+
* Requires the {@link ngCookies `ngCookies`} module to be installed.
|
194
|
+
*
|
195
|
+
* <div class="alert alert-danger">
|
196
|
+
* **Note:** The $cookieStore service is **deprecated**.
|
197
|
+
* Please use the {@link ngCookies.$cookies `$cookies`} service instead.
|
198
|
+
* </div>
|
199
|
+
*
|
200
|
+
* @example
|
201
|
+
*
|
202
|
+
* ```js
|
203
|
+
* angular.module('cookieStoreExample', ['ngCookies'])
|
204
|
+
* .controller('ExampleController', ['$cookieStore', function($cookieStore) {
|
205
|
+
* // Put cookie
|
206
|
+
* $cookieStore.put('myFavorite','oatmeal');
|
207
|
+
* // Get cookie
|
208
|
+
* var favoriteCookie = $cookieStore.get('myFavorite');
|
209
|
+
* // Removing a cookie
|
210
|
+
* $cookieStore.remove('myFavorite');
|
211
|
+
* }]);
|
212
|
+
* ```
|
213
|
+
*/
|
214
|
+
factory('$cookieStore', ['$cookies', function($cookies) {
|
215
|
+
|
216
|
+
return {
|
217
|
+
/**
|
218
|
+
* @ngdoc method
|
219
|
+
* @name $cookieStore#get
|
220
|
+
*
|
221
|
+
* @description
|
222
|
+
* Returns the value of given cookie key
|
223
|
+
*
|
224
|
+
* @param {string} key Id to use for lookup.
|
225
|
+
* @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
|
226
|
+
*/
|
227
|
+
get: function(key) {
|
228
|
+
return $cookies.getObject(key);
|
229
|
+
},
|
230
|
+
|
231
|
+
/**
|
232
|
+
* @ngdoc method
|
233
|
+
* @name $cookieStore#put
|
234
|
+
*
|
235
|
+
* @description
|
236
|
+
* Sets a value for given cookie key
|
237
|
+
*
|
238
|
+
* @param {string} key Id for the `value`.
|
239
|
+
* @param {Object} value Value to be stored.
|
240
|
+
*/
|
241
|
+
put: function(key, value) {
|
242
|
+
$cookies.putObject(key, value);
|
243
|
+
},
|
244
|
+
|
245
|
+
/**
|
246
|
+
* @ngdoc method
|
247
|
+
* @name $cookieStore#remove
|
248
|
+
*
|
249
|
+
* @description
|
250
|
+
* Remove given cookie
|
251
|
+
*
|
252
|
+
* @param {string} key Id of the key-value pair to delete.
|
253
|
+
*/
|
254
|
+
remove: function(key) {
|
255
|
+
$cookies.remove(key);
|
256
|
+
}
|
257
|
+
};
|
258
|
+
|
259
|
+
}]);
|
260
|
+
|
261
|
+
/**
|
262
|
+
* @name $$cookieWriter
|
263
|
+
* @requires $document
|
264
|
+
*
|
265
|
+
* @description
|
266
|
+
* This is a private service for writing cookies
|
267
|
+
*
|
268
|
+
* @param {string} name Cookie name
|
269
|
+
* @param {string=} value Cookie value (if undefined, cookie will be deleted)
|
270
|
+
* @param {Object=} options Object with options that need to be stored for the cookie.
|
271
|
+
*/
|
272
|
+
function $$CookieWriter($document, $log, $browser) {
|
273
|
+
var cookiePath = $browser.baseHref();
|
274
|
+
var rawDocument = $document[0];
|
275
|
+
|
276
|
+
function buildCookieString(name, value, options) {
|
277
|
+
var path, expires;
|
278
|
+
options = options || {};
|
279
|
+
expires = options.expires;
|
280
|
+
path = angular.isDefined(options.path) ? options.path : cookiePath;
|
281
|
+
if (angular.isUndefined(value)) {
|
282
|
+
expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
|
283
|
+
value = '';
|
284
|
+
}
|
285
|
+
if (angular.isString(expires)) {
|
286
|
+
expires = new Date(expires);
|
287
|
+
}
|
288
|
+
|
289
|
+
var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);
|
290
|
+
str += path ? ';path=' + path : '';
|
291
|
+
str += options.domain ? ';domain=' + options.domain : '';
|
292
|
+
str += expires ? ';expires=' + expires.toUTCString() : '';
|
293
|
+
str += options.secure ? ';secure' : '';
|
294
|
+
|
295
|
+
// per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
|
296
|
+
// - 300 cookies
|
297
|
+
// - 20 cookies per unique domain
|
298
|
+
// - 4096 bytes per cookie
|
299
|
+
var cookieLength = str.length + 1;
|
300
|
+
if (cookieLength > 4096) {
|
301
|
+
$log.warn("Cookie '" + name +
|
302
|
+
"' possibly not set or overflowed because it was too large (" +
|
303
|
+
cookieLength + " > 4096 bytes)!");
|
304
|
+
}
|
305
|
+
|
306
|
+
return str;
|
307
|
+
}
|
308
|
+
|
309
|
+
return function(name, value, options) {
|
310
|
+
rawDocument.cookie = buildCookieString(name, value, options);
|
311
|
+
};
|
312
|
+
}
|
313
|
+
|
314
|
+
$$CookieWriter.$inject = ['$document', '$log', '$browser'];
|
315
|
+
|
316
|
+
angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() {
|
317
|
+
this.$get = $$CookieWriter;
|
318
|
+
});
|
319
|
+
|
320
|
+
|
321
|
+
})(window, window.angular);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
AngularJS v1.4.7
|
3
|
+
(c) 2010-2015 Google, Inc. http://angularjs.org
|
4
|
+
License: MIT
|
5
|
+
*/
|
6
|
+
(function(p,c,n){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096<f&&a.warn("Cookie '"+b+"' possibly not set or overflowed because it was too large ("+
|
7
|
+
f+" > 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,n,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore",
|
8
|
+
["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular);
|
9
|
+
//# sourceMappingURL=angular-cookies.min.js.map
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"version":3,
|
3
|
+
"file":"angular-cookies.min.js",
|
4
|
+
"lineCount":8,
|
5
|
+
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA0QtCC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOZ,CAAAc,UAAA,CAAkBH,CAAAC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,CAAM,CACpBU,CAAAF,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CAjCzB,CAqIAjC,EAAA4C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB9C,EAAA2B,OAAA,CAAe,WAAf,CAAAC,SAAA,CAAqC,gBAArC,CAAuDmB,QAA+B,EAAG,CACvF,IAAAhB,KAAA,CAAY7B,CAD2E,CAAzF,CAtTsC,CAArC,CAAD,CA2TGH,MA3TH,CA2TWA,MAAAC,QA3TX;",
|
6
|
+
"sources":["angular-cookies.js"],
|
7
|
+
"names":["window","angular","undefined","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","factory","$cookies","$inject","$$CookieWriterProvider"]
|
8
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/* Include this file in your html if you are using the CSP mode. */
|
2
|
+
|
3
|
+
@charset "UTF-8";
|
4
|
+
|
5
|
+
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
|
6
|
+
.ng-cloak, .x-ng-cloak,
|
7
|
+
.ng-hide:not(.ng-hide-animate) {
|
8
|
+
display: none !important;
|
9
|
+
}
|
10
|
+
|
11
|
+
ng\:form {
|
12
|
+
display: block;
|
13
|
+
}
|
14
|
+
|
15
|
+
.ng-animate-shim {
|
16
|
+
visibility:hidden;
|
17
|
+
}
|
18
|
+
|
19
|
+
.ng-anchor {
|
20
|
+
position:absolute;
|
21
|
+
}
|
@@ -0,0 +1,443 @@
|
|
1
|
+
/**
|
2
|
+
* @license AngularJS v1.4.7
|
3
|
+
* (c) 2010-2015 Google, Inc. http://angularjs.org
|
4
|
+
* License: MIT
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function() {'use strict';
|
8
|
+
function isFunction(value) {return typeof value === 'function';};
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @description
|
12
|
+
*
|
13
|
+
* This object provides a utility for producing rich Error messages within
|
14
|
+
* Angular. It can be called as follows:
|
15
|
+
*
|
16
|
+
* var exampleMinErr = minErr('example');
|
17
|
+
* throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
|
18
|
+
*
|
19
|
+
* The above creates an instance of minErr in the example namespace. The
|
20
|
+
* resulting error will have a namespaced error code of example.one. The
|
21
|
+
* resulting error will replace {0} with the value of foo, and {1} with the
|
22
|
+
* value of bar. The object is not restricted in the number of arguments it can
|
23
|
+
* take.
|
24
|
+
*
|
25
|
+
* If fewer arguments are specified than necessary for interpolation, the extra
|
26
|
+
* interpolation markers will be preserved in the final string.
|
27
|
+
*
|
28
|
+
* Since data will be parsed statically during a build step, some restrictions
|
29
|
+
* are applied with respect to how minErr instances are created and called.
|
30
|
+
* Instances should have names of the form namespaceMinErr for a minErr created
|
31
|
+
* using minErr('namespace') . Error codes, namespaces and template strings
|
32
|
+
* should all be static strings, not variables or general expressions.
|
33
|
+
*
|
34
|
+
* @param {string} module The namespace to use for the new minErr instance.
|
35
|
+
* @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
|
36
|
+
* error from returned function, for cases when a particular type of error is useful.
|
37
|
+
* @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
|
38
|
+
*/
|
39
|
+
|
40
|
+
function minErr(module, ErrorConstructor) {
|
41
|
+
ErrorConstructor = ErrorConstructor || Error;
|
42
|
+
return function() {
|
43
|
+
var SKIP_INDEXES = 2;
|
44
|
+
|
45
|
+
var templateArgs = arguments,
|
46
|
+
code = templateArgs[0],
|
47
|
+
message = '[' + (module ? module + ':' : '') + code + '] ',
|
48
|
+
template = templateArgs[1],
|
49
|
+
paramPrefix, i;
|
50
|
+
|
51
|
+
message += template.replace(/\{\d+\}/g, function(match) {
|
52
|
+
var index = +match.slice(1, -1),
|
53
|
+
shiftedIndex = index + SKIP_INDEXES;
|
54
|
+
|
55
|
+
if (shiftedIndex < templateArgs.length) {
|
56
|
+
return toDebugString(templateArgs[shiftedIndex]);
|
57
|
+
}
|
58
|
+
|
59
|
+
return match;
|
60
|
+
});
|
61
|
+
|
62
|
+
message += '\nhttp://errors.angularjs.org/1.4.7/' +
|
63
|
+
(module ? module + '/' : '') + code;
|
64
|
+
|
65
|
+
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
|
66
|
+
message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
|
67
|
+
encodeURIComponent(toDebugString(templateArgs[i]));
|
68
|
+
}
|
69
|
+
|
70
|
+
return new ErrorConstructor(message);
|
71
|
+
};
|
72
|
+
}
|
73
|
+
|
74
|
+
/**
|
75
|
+
* @ngdoc type
|
76
|
+
* @name angular.Module
|
77
|
+
* @module ng
|
78
|
+
* @description
|
79
|
+
*
|
80
|
+
* Interface for configuring angular {@link angular.module modules}.
|
81
|
+
*/
|
82
|
+
|
83
|
+
function setupModuleLoader(window) {
|
84
|
+
|
85
|
+
var $injectorMinErr = minErr('$injector');
|
86
|
+
var ngMinErr = minErr('ng');
|
87
|
+
|
88
|
+
function ensure(obj, name, factory) {
|
89
|
+
return obj[name] || (obj[name] = factory());
|
90
|
+
}
|
91
|
+
|
92
|
+
var angular = ensure(window, 'angular', Object);
|
93
|
+
|
94
|
+
// We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
|
95
|
+
angular.$$minErr = angular.$$minErr || minErr;
|
96
|
+
|
97
|
+
return ensure(angular, 'module', function() {
|
98
|
+
/** @type {Object.<string, angular.Module>} */
|
99
|
+
var modules = {};
|
100
|
+
|
101
|
+
/**
|
102
|
+
* @ngdoc function
|
103
|
+
* @name angular.module
|
104
|
+
* @module ng
|
105
|
+
* @description
|
106
|
+
*
|
107
|
+
* The `angular.module` is a global place for creating, registering and retrieving Angular
|
108
|
+
* modules.
|
109
|
+
* All modules (angular core or 3rd party) that should be available to an application must be
|
110
|
+
* registered using this mechanism.
|
111
|
+
*
|
112
|
+
* Passing one argument retrieves an existing {@link angular.Module},
|
113
|
+
* whereas passing more than one argument creates a new {@link angular.Module}
|
114
|
+
*
|
115
|
+
*
|
116
|
+
* # Module
|
117
|
+
*
|
118
|
+
* A module is a collection of services, directives, controllers, filters, and configuration information.
|
119
|
+
* `angular.module` is used to configure the {@link auto.$injector $injector}.
|
120
|
+
*
|
121
|
+
* ```js
|
122
|
+
* // Create a new module
|
123
|
+
* var myModule = angular.module('myModule', []);
|
124
|
+
*
|
125
|
+
* // register a new service
|
126
|
+
* myModule.value('appName', 'MyCoolApp');
|
127
|
+
*
|
128
|
+
* // configure existing services inside initialization blocks.
|
129
|
+
* myModule.config(['$locationProvider', function($locationProvider) {
|
130
|
+
* // Configure existing providers
|
131
|
+
* $locationProvider.hashPrefix('!');
|
132
|
+
* }]);
|
133
|
+
* ```
|
134
|
+
*
|
135
|
+
* Then you can create an injector and load your modules like this:
|
136
|
+
*
|
137
|
+
* ```js
|
138
|
+
* var injector = angular.injector(['ng', 'myModule'])
|
139
|
+
* ```
|
140
|
+
*
|
141
|
+
* However it's more likely that you'll just use
|
142
|
+
* {@link ng.directive:ngApp ngApp} or
|
143
|
+
* {@link angular.bootstrap} to simplify this process for you.
|
144
|
+
*
|
145
|
+
* @param {!string} name The name of the module to create or retrieve.
|
146
|
+
* @param {!Array.<string>=} requires If specified then new module is being created. If
|
147
|
+
* unspecified then the module is being retrieved for further configuration.
|
148
|
+
* @param {Function=} configFn Optional configuration function for the module. Same as
|
149
|
+
* {@link angular.Module#config Module#config()}.
|
150
|
+
* @returns {module} new module with the {@link angular.Module} api.
|
151
|
+
*/
|
152
|
+
return function module(name, requires, configFn) {
|
153
|
+
var assertNotHasOwnProperty = function(name, context) {
|
154
|
+
if (name === 'hasOwnProperty') {
|
155
|
+
throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
|
156
|
+
}
|
157
|
+
};
|
158
|
+
|
159
|
+
assertNotHasOwnProperty(name, 'module');
|
160
|
+
if (requires && modules.hasOwnProperty(name)) {
|
161
|
+
modules[name] = null;
|
162
|
+
}
|
163
|
+
return ensure(modules, name, function() {
|
164
|
+
if (!requires) {
|
165
|
+
throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
|
166
|
+
"the module name or forgot to load it. If registering a module ensure that you " +
|
167
|
+
"specify the dependencies as the second argument.", name);
|
168
|
+
}
|
169
|
+
|
170
|
+
/** @type {!Array.<Array.<*>>} */
|
171
|
+
var invokeQueue = [];
|
172
|
+
|
173
|
+
/** @type {!Array.<Function>} */
|
174
|
+
var configBlocks = [];
|
175
|
+
|
176
|
+
/** @type {!Array.<Function>} */
|
177
|
+
var runBlocks = [];
|
178
|
+
|
179
|
+
var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
|
180
|
+
|
181
|
+
/** @type {angular.Module} */
|
182
|
+
var moduleInstance = {
|
183
|
+
// Private state
|
184
|
+
_invokeQueue: invokeQueue,
|
185
|
+
_configBlocks: configBlocks,
|
186
|
+
_runBlocks: runBlocks,
|
187
|
+
|
188
|
+
/**
|
189
|
+
* @ngdoc property
|
190
|
+
* @name angular.Module#requires
|
191
|
+
* @module ng
|
192
|
+
*
|
193
|
+
* @description
|
194
|
+
* Holds the list of modules which the injector will load before the current module is
|
195
|
+
* loaded.
|
196
|
+
*/
|
197
|
+
requires: requires,
|
198
|
+
|
199
|
+
/**
|
200
|
+
* @ngdoc property
|
201
|
+
* @name angular.Module#name
|
202
|
+
* @module ng
|
203
|
+
*
|
204
|
+
* @description
|
205
|
+
* Name of the module.
|
206
|
+
*/
|
207
|
+
name: name,
|
208
|
+
|
209
|
+
|
210
|
+
/**
|
211
|
+
* @ngdoc method
|
212
|
+
* @name angular.Module#provider
|
213
|
+
* @module ng
|
214
|
+
* @param {string} name service name
|
215
|
+
* @param {Function} providerType Construction function for creating new instance of the
|
216
|
+
* service.
|
217
|
+
* @description
|
218
|
+
* See {@link auto.$provide#provider $provide.provider()}.
|
219
|
+
*/
|
220
|
+
provider: invokeLaterAndSetModuleName('$provide', 'provider'),
|
221
|
+
|
222
|
+
/**
|
223
|
+
* @ngdoc method
|
224
|
+
* @name angular.Module#factory
|
225
|
+
* @module ng
|
226
|
+
* @param {string} name service name
|
227
|
+
* @param {Function} providerFunction Function for creating new instance of the service.
|
228
|
+
* @description
|
229
|
+
* See {@link auto.$provide#factory $provide.factory()}.
|
230
|
+
*/
|
231
|
+
factory: invokeLaterAndSetModuleName('$provide', 'factory'),
|
232
|
+
|
233
|
+
/**
|
234
|
+
* @ngdoc method
|
235
|
+
* @name angular.Module#service
|
236
|
+
* @module ng
|
237
|
+
* @param {string} name service name
|
238
|
+
* @param {Function} constructor A constructor function that will be instantiated.
|
239
|
+
* @description
|
240
|
+
* See {@link auto.$provide#service $provide.service()}.
|
241
|
+
*/
|
242
|
+
service: invokeLaterAndSetModuleName('$provide', 'service'),
|
243
|
+
|
244
|
+
/**
|
245
|
+
* @ngdoc method
|
246
|
+
* @name angular.Module#value
|
247
|
+
* @module ng
|
248
|
+
* @param {string} name service name
|
249
|
+
* @param {*} object Service instance object.
|
250
|
+
* @description
|
251
|
+
* See {@link auto.$provide#value $provide.value()}.
|
252
|
+
*/
|
253
|
+
value: invokeLater('$provide', 'value'),
|
254
|
+
|
255
|
+
/**
|
256
|
+
* @ngdoc method
|
257
|
+
* @name angular.Module#constant
|
258
|
+
* @module ng
|
259
|
+
* @param {string} name constant name
|
260
|
+
* @param {*} object Constant value.
|
261
|
+
* @description
|
262
|
+
* Because the constant are fixed, they get applied before other provide methods.
|
263
|
+
* See {@link auto.$provide#constant $provide.constant()}.
|
264
|
+
*/
|
265
|
+
constant: invokeLater('$provide', 'constant', 'unshift'),
|
266
|
+
|
267
|
+
/**
|
268
|
+
* @ngdoc method
|
269
|
+
* @name angular.Module#decorator
|
270
|
+
* @module ng
|
271
|
+
* @param {string} The name of the service to decorate.
|
272
|
+
* @param {Function} This function will be invoked when the service needs to be
|
273
|
+
* instantiated and should return the decorated service instance.
|
274
|
+
* @description
|
275
|
+
* See {@link auto.$provide#decorator $provide.decorator()}.
|
276
|
+
*/
|
277
|
+
decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
|
278
|
+
|
279
|
+
/**
|
280
|
+
* @ngdoc method
|
281
|
+
* @name angular.Module#animation
|
282
|
+
* @module ng
|
283
|
+
* @param {string} name animation name
|
284
|
+
* @param {Function} animationFactory Factory function for creating new instance of an
|
285
|
+
* animation.
|
286
|
+
* @description
|
287
|
+
*
|
288
|
+
* **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
|
289
|
+
*
|
290
|
+
*
|
291
|
+
* Defines an animation hook that can be later used with
|
292
|
+
* {@link $animate $animate} service and directives that use this service.
|
293
|
+
*
|
294
|
+
* ```js
|
295
|
+
* module.animation('.animation-name', function($inject1, $inject2) {
|
296
|
+
* return {
|
297
|
+
* eventName : function(element, done) {
|
298
|
+
* //code to run the animation
|
299
|
+
* //once complete, then run done()
|
300
|
+
* return function cancellationFunction(element) {
|
301
|
+
* //code to cancel the animation
|
302
|
+
* }
|
303
|
+
* }
|
304
|
+
* }
|
305
|
+
* })
|
306
|
+
* ```
|
307
|
+
*
|
308
|
+
* See {@link ng.$animateProvider#register $animateProvider.register()} and
|
309
|
+
* {@link ngAnimate ngAnimate module} for more information.
|
310
|
+
*/
|
311
|
+
animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
|
312
|
+
|
313
|
+
/**
|
314
|
+
* @ngdoc method
|
315
|
+
* @name angular.Module#filter
|
316
|
+
* @module ng
|
317
|
+
* @param {string} name Filter name - this must be a valid angular expression identifier
|
318
|
+
* @param {Function} filterFactory Factory function for creating new instance of filter.
|
319
|
+
* @description
|
320
|
+
* See {@link ng.$filterProvider#register $filterProvider.register()}.
|
321
|
+
*
|
322
|
+
* <div class="alert alert-warning">
|
323
|
+
* **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
|
324
|
+
* Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
|
325
|
+
* your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
|
326
|
+
* (`myapp_subsection_filterx`).
|
327
|
+
* </div>
|
328
|
+
*/
|
329
|
+
filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
|
330
|
+
|
331
|
+
/**
|
332
|
+
* @ngdoc method
|
333
|
+
* @name angular.Module#controller
|
334
|
+
* @module ng
|
335
|
+
* @param {string|Object} name Controller name, or an object map of controllers where the
|
336
|
+
* keys are the names and the values are the constructors.
|
337
|
+
* @param {Function} constructor Controller constructor function.
|
338
|
+
* @description
|
339
|
+
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
|
340
|
+
*/
|
341
|
+
controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
|
342
|
+
|
343
|
+
/**
|
344
|
+
* @ngdoc method
|
345
|
+
* @name angular.Module#directive
|
346
|
+
* @module ng
|
347
|
+
* @param {string|Object} name Directive name, or an object map of directives where the
|
348
|
+
* keys are the names and the values are the factories.
|
349
|
+
* @param {Function} directiveFactory Factory function for creating new instance of
|
350
|
+
* directives.
|
351
|
+
* @description
|
352
|
+
* See {@link ng.$compileProvider#directive $compileProvider.directive()}.
|
353
|
+
*/
|
354
|
+
directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
|
355
|
+
|
356
|
+
/**
|
357
|
+
* @ngdoc method
|
358
|
+
* @name angular.Module#config
|
359
|
+
* @module ng
|
360
|
+
* @param {Function} configFn Execute this function on module load. Useful for service
|
361
|
+
* configuration.
|
362
|
+
* @description
|
363
|
+
* Use this method to register work which needs to be performed on module loading.
|
364
|
+
* For more about how to configure services, see
|
365
|
+
* {@link providers#provider-recipe Provider Recipe}.
|
366
|
+
*/
|
367
|
+
config: config,
|
368
|
+
|
369
|
+
/**
|
370
|
+
* @ngdoc method
|
371
|
+
* @name angular.Module#run
|
372
|
+
* @module ng
|
373
|
+
* @param {Function} initializationFn Execute this function after injector creation.
|
374
|
+
* Useful for application initialization.
|
375
|
+
* @description
|
376
|
+
* Use this method to register work which should be performed when the injector is done
|
377
|
+
* loading all modules.
|
378
|
+
*/
|
379
|
+
run: function(block) {
|
380
|
+
runBlocks.push(block);
|
381
|
+
return this;
|
382
|
+
}
|
383
|
+
};
|
384
|
+
|
385
|
+
if (configFn) {
|
386
|
+
config(configFn);
|
387
|
+
}
|
388
|
+
|
389
|
+
return moduleInstance;
|
390
|
+
|
391
|
+
/**
|
392
|
+
* @param {string} provider
|
393
|
+
* @param {string} method
|
394
|
+
* @param {String=} insertMethod
|
395
|
+
* @returns {angular.Module}
|
396
|
+
*/
|
397
|
+
function invokeLater(provider, method, insertMethod, queue) {
|
398
|
+
if (!queue) queue = invokeQueue;
|
399
|
+
return function() {
|
400
|
+
queue[insertMethod || 'push']([provider, method, arguments]);
|
401
|
+
return moduleInstance;
|
402
|
+
};
|
403
|
+
}
|
404
|
+
|
405
|
+
/**
|
406
|
+
* @param {string} provider
|
407
|
+
* @param {string} method
|
408
|
+
* @returns {angular.Module}
|
409
|
+
*/
|
410
|
+
function invokeLaterAndSetModuleName(provider, method) {
|
411
|
+
return function(recipeName, factoryFunction) {
|
412
|
+
if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
|
413
|
+
invokeQueue.push([provider, method, arguments]);
|
414
|
+
return moduleInstance;
|
415
|
+
};
|
416
|
+
}
|
417
|
+
});
|
418
|
+
};
|
419
|
+
});
|
420
|
+
|
421
|
+
}
|
422
|
+
|
423
|
+
setupModuleLoader(window);
|
424
|
+
})(window);
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Closure compiler type information
|
428
|
+
*
|
429
|
+
* @typedef { {
|
430
|
+
* requires: !Array.<string>,
|
431
|
+
* invokeQueue: !Array.<Array.<*>>,
|
432
|
+
*
|
433
|
+
* service: function(string, Function):angular.Module,
|
434
|
+
* factory: function(string, Function):angular.Module,
|
435
|
+
* value: function(string, *):angular.Module,
|
436
|
+
*
|
437
|
+
* filter: function(string, Function):angular.Module,
|
438
|
+
*
|
439
|
+
* init: function(Function):angular.Module
|
440
|
+
* } }
|
441
|
+
*/
|
442
|
+
angular.Module;
|
443
|
+
|