diff --git a/admin/js/plugins/oclazyload/.bower.json b/admin/js/plugins/oclazyload/.bower.json deleted file mode 100644 index 822f642a..00000000 --- a/admin/js/plugins/oclazyload/.bower.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "oclazyload", - "version": "0.5.2", - "description": "Load modules on demand (lazy load) with angularJS", - "main": "dist/ocLazyLoad.min.js", - "homepage": "https://github.com/ocombe/ocLazyLoad", - "authors": [ - "Olivier Combe " - ], - "license": "MIT", - "keywords": [ - "lazy load", - "lazy-load", - "load on demand", - "module", - "angular", - "angularJS" - ], - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "src", - "gulpfile.js", - "package.json", - "changelog.js", - "validate-commit-msg.js", - "tests", - "karma.conf.js" - ], - "devDependencies": { - "angular-mocks": "~1.3.2" - }, - "dependencies": { - "angular": "1.2.x - 1.3.x" - }, - "_release": "0.5.2", - "_resolution": { - "type": "version", - "tag": "0.5.2", - "commit": "e3bf1d25408badde748d25b2e7c114b5ed0ff96a" - }, - "_source": "git://github.com/ocombe/ocLazyLoad.git", - "_target": "~0.5.2", - "_originalSource": "oclazyload", - "_direct": true -} \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/CHANGELOG.md b/admin/js/plugins/oclazyload/CHANGELOG.md deleted file mode 100644 index ed920df2..00000000 --- a/admin/js/plugins/oclazyload/CHANGELOG.md +++ /dev/null @@ -1,318 +0,0 @@ - -# 0.5.2 (2014-12-30) - - -## Bug Fixes - -- use init for bootstrapped apps & removed the need for loadedModules - ([01936cd6](https://github.com/ocombe/ocLazyLoad/commit/01936cd6fe0e0f89a203408ee0bbb927f5b44d07), - [#84](https://github.com/ocombe/ocLazyLoad/issues/84), [#102](https://github.com/ocombe/ocLazyLoad/issues/102), [#109](https://github.com/ocombe/ocLazyLoad/issues/109)) - - -## Documentation - -- added a link to a new lesson from egghead.io - ([ef8d2871](https://github.com/ocombe/ocLazyLoad/commit/ef8d2871a445b29588f779a27cb3b702d0da6a13)) - - - -# 0.5.1 (2014-11-20) - - -## Bug Fixes - -- don't use async when you load files in serie - ([9af93ed3](https://github.com/ocombe/ocLazyLoad/commit/9af93ed30cf05c6c64594d206dc9bf36a318f46e), - [#95](https://github.com/ocombe/ocLazyLoad/issues/95)) -- avoid errors thrown on empty template files - ([768b9d75](https://github.com/ocombe/ocLazyLoad/commit/768b9d751a613a0a10cb476d5c3eac5fdf44f627)) -- compatibility with jasmine - ([d4985e1d](https://github.com/ocombe/ocLazyLoad/commit/d4985e1d7ce98315ca64a72730d8c10524929d58), - [#94](https://github.com/ocombe/ocLazyLoad/issues/94)) - - - -# 0.5.0 (2014-11-11) - - -## Features - -- added a new param `insertBefore` - ([c4f10385](https://github.com/ocombe/ocLazyLoad/commit/c4f10385cb6a9122c3a03d28b1bb6837710cc3f7), - [#91](https://github.com/ocombe/ocLazyLoad/issues/91)) -- started unit tests - ([dcc4ff63](https://github.com/ocombe/ocLazyLoad/commit/dcc4ff639df23a1b934899b020a483e47e6ab290)) - - -## Documentation - -- updated loaders signatures - ([ba022894](https://github.com/ocombe/ocLazyLoad/commit/ba022894841222989cf699f07fe21f04f7ad3307)) - - - -# 0.4.2 (2014-11-10) - - -## Bug Fixes - -- extend config to params for the register method - ([31157941](https://github.com/ocombe/ocLazyLoad/commit/31157941ccabfa8f8c55edc00dc2b5758bf073b2), - [#89](https://github.com/ocombe/ocLazyLoad/issues/89)) - - - -# 0.4.1 (2014-11-09) - - -## Bug Fixes - -- keep global params pristine when loading files - ([6b2306b7](https://github.com/ocombe/ocLazyLoad/commit/6b2306b71543542c9b592766644c7bba1297bae4), - [#89](https://github.com/ocombe/ocLazyLoad/issues/89)) -- defining new run blocks will replace previous ones - ([af2627b5](https://github.com/ocombe/ocLazyLoad/commit/af2627b5e627b2b4d83cdd043eff68b1c1430740), - [#89](https://github.com/ocombe/ocLazyLoad/issues/89)) - - - -# 0.4.0 (2014-11-09) - - -## Features - -- new parameter `serie` to load files in serie - ([4ae7a3f3](https://github.com/ocombe/ocLazyLoad/commit/4ae7a3f3de6ad4de74baa6cc771aee556bce812e), - [#47](https://github.com/ocombe/ocLazyLoad/issues/47), [#86](https://github.com/ocombe/ocLazyLoad/issues/86)) -- new parameter `rerun` to rerun the run blocks - ([26a64a38](https://github.com/ocombe/ocLazyLoad/commit/26a64a38b0c21b6ca28cfa7e512b0b290fdca619), - [#89](https://github.com/ocombe/ocLazyLoad/issues/89)) -- new function: `isLoaded` to check if a module has been loaded - ([364c9e9f](https://github.com/ocombe/ocLazyLoad/commit/364c9e9ffd8350e5ca46a708bd3846ea6de9421c), - [#79](https://github.com/ocombe/ocLazyLoad/issues/79)) - - - -# 0.3.10 (2014-11-09) - - -## Bug Fixes - -- fix for error:[$compile:multidir] Multiple directives - ([61fd4dd3](https://github.com/ocombe/ocLazyLoad/commit/61fd4dd3b8131245d33eb2314dcf37a9188a6728), - [#84](https://github.com/ocombe/ocLazyLoad/issues/84), - [#78](https://github.com/ocombe/ocLazyLoad/issues/78), - [#73](https://github.com/ocombe/ocLazyLoad/issues/73), - [#58](https://github.com/ocombe/ocLazyLoad/issues/58)) -- css onload patch for some old browsers - ([14ce3406](https://github.com/ocombe/ocLazyLoad/commit/14ce34066e0e865c8fa86f663d38e046f7a32abb)) -- content inside the oc-lazy-load directive is now compiled on load - ([9962e2ef](https://github.com/ocombe/ocLazyLoad/commit/9962e2ef163e9449e295dd3297f6019267a0e0e1), - [#80](https://github.com/ocombe/ocLazyLoad/issues/80)) - - - -# 0.3.9 (2014-11-02) - - -## Bug Fixes - -- allow components with the same name from different types/modules - ([f981c337](https://github.com/ocombe/ocLazyLoad/commit/f981c33749e4e61fa4dfd7c3c41df9beffcbf734), - [#67](https://github.com/ocombe/ocLazyLoad/issues/67)) -- initial modules not registered - ([bcf50004](https://github.com/ocombe/ocLazyLoad/commit/bcf50004b8a1172aff4c769746fdcb9e5d5d9cba), - [#58](https://github.com/ocombe/ocLazyLoad/issues/58), [#71](https://github.com/ocombe/ocLazyLoad/issues/71), [#73](https://github.com/ocombe/ocLazyLoad/issues/73), [#77](https://github.com/ocombe/ocLazyLoad/issues/77)) -- add support for angular 1.3 in bower - ([bda921b6](https://github.com/ocombe/ocLazyLoad/commit/bda921b68ce30645d992982325adc4eebfdcd361), - [#76](https://github.com/ocombe/ocLazyLoad/issues/76)) - - -## Features - -- broadcast for componentLoaded event provides more info (module name and type) - ([d41b9f53](https://github.com/ocombe/ocLazyLoad/commit/d41b9f53a46ff8c97b780d4c24f6f64e16017b89)) -- example1 now uses ui-grid instead of ng-grid - ([e7cf1e83](https://github.com/ocombe/ocLazyLoad/commit/e7cf1e83ff1453ee5adb8112052d393f9dc09e27)) - - -## Documentation - -- added link to a new article by @kbdaitch - ([cc6b41db](https://github.com/ocombe/ocLazyLoad/commit/cc6b41db5e0dbcfe68754df325bf9f09e5709bf2)) -- added a link to a new lesson from egghead.io - ([e231f3cb](https://github.com/ocombe/ocLazyLoad/commit/e231f3cbfd6fb3338479a5f4d8a9ce00d374646e)) -- added a link to a new lesson from egghead.io - ([9b3c48e4](https://github.com/ocombe/ocLazyLoad/commit/9b3c48e49800dd3ed6a01dad7c1d958f8625eddb)) - - - -# 0.3.8 (2014-09-25) - - -## Bug Fixes - -- reject on load error - ([d83f52b5](https://github.com/ocombe/ocLazyLoad/commit/d83f52b56a77a5cdb230260c497ee2db7283e077), - [#66](https://github.com/ocombe/ocLazyLoad/issues/66)) - - - -# 0.3.7 (2014-09-10) - - -## Bug Fixes - -- don't reload a dependency that was just loaded - ([6752bb94](https://github.com/ocombe/ocLazyLoad/commit/6752bb948093f196311572530d814231dc2dcd3a), - [#64](https://github.com/ocombe/ocLazyLoad/issues/64)) - - -## Features - -- new event ocLazyLoad.moduleReloaded - ([5010d144](https://github.com/ocombe/ocLazyLoad/commit/5010d144d1b250424be2bcfa98faf50c6782bf96)) - - - -# 0.3.6 (2014-09-02) - - -## Bug Fixes - -- concurrency lazy loads (thanks @BenBlazely) - ([4899ea1a](https://github.com/ocombe/ocLazyLoad/commit/4899ea1a09bee145f70aec3dd964f885060422d8), - [#44](https://github.com/ocombe/ocLazyLoad/issues/44)) - - -## Documentation - -- added a few links to other examples - - - -# 0.3.5 (2014-08-26) - - -## Bug Fixes - -- fixed cases where the config block would not be called - ([1e29c9d4](https://github.com/ocombe/ocLazyLoad/commit/1e29c9d438d494cd053cd7533921e02e3fe5e5d0), - [#5](https://github.com/ocombe/ocLazyLoad/issues/5)). - The config block would not be called if: - - defined multiple times (only the first 1 would be invoked) - - defined with an auto injected module: ['...', function() {}] - - defined after another component: angular.module().controler().config() - - - -# 0.3.4 (2014-08-26) - - -## Bug Fixes - -- make sure reconfig:true always run all invoke blocks - ([361ae6b7](https://github.com/ocombe/ocLazyLoad/commit/361ae6b7d319cb5ada1ab022a6761d4a67a31b58), - [#54](https://github.com/ocombe/ocLazyLoad/issues/54)) -- the config/run blocks were not invoked without reconfig: true - ([300882a0](https://github.com/ocombe/ocLazyLoad/commit/300882a016e4f9d538e322be9718f21740048296), - [#5](https://github.com/ocombe/ocLazyLoad/issues/5)) -- indexOf polyfill for IE8 - ([5f71c09c](https://github.com/ocombe/ocLazyLoad/commit/5f71c09cad4255932e84c760b07d16a4a2b016d9), - [#52](https://github.com/ocombe/ocLazyLoad/issues/52)) - - -## Features - -- more log messages for debug - ([bcbca814](https://github.com/ocombe/ocLazyLoad/commit/bcbca814049863b4dd7a6c5c1071efd760094966)) - - - -# 0.3.3 (2014-07-23) - - -## Bug Fixes - -- don't execute config blocks multiple times by default - ([e2fec59e](https://github.com/ocombe/ocLazyLoad/commit/e2fec59ee7ff1e95e7e78ef8397c4fe500d8e7c0), - [#43](https://github.com/ocombe/ocLazyLoad/issues/43), [#41](https://github.com/ocombe/ocLazyLoad/issues/41)) -- don't test for .js in path because of requirejs - ([6045214b](https://github.com/ocombe/ocLazyLoad/commit/6045214b6a4cc2d9dee1c1f2f89946687d963828)) -- test order - ([8412cb43](https://github.com/ocombe/ocLazyLoad/commit/8412cb431bfc742f2c4151e5b089f3313a70035e)) - - - -# 0.3.2 (2014-07-23) - - -## Bug Fixes - -- allow $ocLazyLoadProvider.config to be called multiple times - ([c590579c](https://github.com/ocombe/ocLazyLoad/commit/c590579c9512e0dd3fae2c33c0aefc0bb0f7ca7e), - [#43](https://github.com/ocombe/ocLazyLoad/issues/43)) -- prevent duplicate loadings - ([12bc6b2b](https://github.com/ocombe/ocLazyLoad/commit/12bc6b2b2d1561517d56c14c56c15c332d578344), - [#35](https://github.com/ocombe/ocLazyLoad/issues/35), - [#38](https://github.com/ocombe/ocLazyLoad/issues/38)) - - - -# 0.3.1 (2014-07-14) - - -## Bug Fixes - -- don't reject file load with custom file loaders such as requirejs - ([91ed522f](https://github.com/ocombe/ocLazyLoad/commit/91ed522f724c3d384146053623bbd1e7c2c86751), - [#33](https://github.com/ocombe/ocLazyLoad/issues/33)) - - -## Features - -- auto changelog from commits msg - ([c089e085](https://github.com/ocombe/ocLazyLoad/commit/c089e085431d9f1a968e94c78f3c5ac5af71fa72)) -- prevent duplicate loadings & add a cache busting param - ([5a5d7f10](https://github.com/ocombe/ocLazyLoad/commit/5a5d7f108578fe31c5ca1f7c8dfc2d3bccfd1106), - [#38](https://github.com/ocombe/ocLazyLoad/issues/38)) - - -# 0.3.0 (17 June 2014) - -## Features - -- $ocLazyLoad will now reject promises on errors -- Use the parameter `debug` to show log messages in the console -- JS / CSS / Template loaders are available by default in $ocLazyLoad but you can overwrite them with the config -- Better doc (finally! \o/) -- Example1 is now much better ! -- Events broadcasted on module / component / file load (#21) - - -# 0.2.0 (20 May 2014) -* Added support for $animateProvider #19 -* Added support for CSS Loading (And perhaps other file types in the future) #19 -* Added loadAll function for use when a state requires resolve on more than one asset. #19 -* FIX: Angular JS 1.3.0-beta.8 changed the way config blocks are handled (now invoked last) #19 -* Adopted the MIT license as requested in #20 -* Added a gulpfile to build dist files (and, in the future, to do tests before the build). Run `npm install` to install the new dependencies and `npm build` to build the dist files. -* **Breaking change** moved the src files to /src and the dist files to /dist. Installations via bower will only see the dist folder -* Moved the examples to /examples - -# 0.1.3 (30 April 2014) -* Fix for bug #18: merged files and incorrect module loading - -# 0.1.2 (14 April 2014) -* Fix for bug #16: config blocks didn't work for module dependencies - -# 0.1.1 (08 April 2014) -* Fix for bug #8: runBlocks can now load new modules (thanks to @rolandzwaga) -* Added an example that makes use of requirejs and uses ngGrid as a lazy loaded module (thanks to @rolandzwaga) - -# 0.1.0 (04 April 2014) -* Added a changelog ! -* Added ```loadTemplateFile``` function. -* Merge pull request #6 from BenBlazely/master (Extension of lazy loading to the angular.module DI block, refactored to use promises for tracking progress.) -* Merge pull request #7 from rolandzwaga/master (Added some improvements for apps using angular.boostrap & for duplicated modules) -* Fixed a bug with run blocks not working when they used unloaded modules. Not a complete fix though, more to come when bug #8 is fixed diff --git a/admin/js/plugins/oclazyload/LICENSE.md b/admin/js/plugins/oclazyload/LICENSE.md deleted file mode 100644 index f6669970..00000000 --- a/admin/js/plugins/oclazyload/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Olivier Combe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/admin/js/plugins/oclazyload/README.md b/admin/js/plugins/oclazyload/README.md deleted file mode 100644 index 6bf4f7b0..00000000 --- a/admin/js/plugins/oclazyload/README.md +++ /dev/null @@ -1,401 +0,0 @@ -ocLazyLoad [![Build Status](https://travis-ci.org/ocombe/ocLazyLoad.svg)](https://travis-ci.org/ocombe/ocLazyLoad) -========== - -Load modules on demand (lazy load) in AngularJS - -## Key features -- Dependencies are automatically loaded -- Debugger friendly (no eval code) -- The ability to mix normal boot and load on demand -- Load via the service or the directive -- Use the embedded async loader or use your own (requireJS, ...) -- Load js (angular or not) / css / templates files -- Compatible with AngularJS 1.2.x and 1.3.x - -## Usage -- Put ocLazyLoad.js into you project - -- Add the module ```oc.lazyLoad``` to your application (you can install it with `bower install oclazyload` or `npm install oclazyload`) - -- Load on demand: -With $ocLazyLoad you can load angular modules, but if you want to load controllers / services / filters / ... without defining a new module it's entirely possible, just use the name an existing module (your app name for example). -There are multiple ways to use `$ocLazyLoad` to load your files, just choose the one that fits you the best. - -###### More examples / tutorials / articles -You can find three basic examples in the example folder. If you need more, check out these links: -- Lazy loading with requirejs, ocLazyLoad and ui-router: [using the templateProvider](http://plnkr.co/edit/OGvi01?p=preview) / [using the uiRouterDecorator](http://plnkr.co/edit/6CLDsz?p=preview) - by @gilbox -- Lazy Loading ui-router states with requirejs, ocLazyLoad and ui-router-extras futureStates, [part 1](http://bardo.io/posts/oclazyload-future-states/) / [part 2](http://bardo.io/posts/ng-deferred-bootstrap-like-with-oclazyload/) - by @kbdaitch -- Lazy loading Angular modules with ocLazyLoad, [part 1](https://egghead.io/lessons/angularjs-lazy-loading-angular-modules-with-oclazyload) / [part 2](https://egghead.io/lessons/angularjs-lazy-loading-modules-with-ui-router-and-oclazyload) / [part 3](https://egghead.io/lessons/angularjs-simple-lazy-loaded-angular-module-syntax-with-oclazyload) / [part 4](https://egghead.io/lessons/angularjs-lazy-loading-non-angular-libraries-with-oclazyload) - An AngularJS lesson by [@johnlindquist](https://twitter.com/johnlindquist) on [egghead.io](https://egghead.io/) - -### Service -You can include `$ocLazyLoad` and use the function `load` which returns a promise. It supports a single dependency (object) or multiple dependencies (array of objects). - -Load a single module with one file: -```js -$ocLazyLoad.load({ - name: 'TestModule', - files: ['testModule.js'] -}); -``` - -Load a single module with multiple files: -```js -$ocLazyLoad.load({ - name: 'TestModule', - files: ['testModule.js', 'testModuleCtrl.js', 'testModuleService.js'] -}); -``` - -Load multiple modules with one or more files: -```js -$ocLazyLoad.load([{ - name: 'TestModule', - files: ['testModule.js', 'testModuleCtrl.js', 'testModuleService.js'] -},{ - name: 'AnotherModule', - files: ['anotherModule.js'] -}]); -``` - -You can also load external libs (not angular): -```js -$ocLazyLoad.load([{ - name: 'TestModule', - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'] -},{ - name: 'AnotherModule', - files: ['anotherModule.js'] -}]); -``` - -If you don't load angular files at all, you don't need to define the module name: -```js -$ocLazyLoad.load([{ - files: ['bower_components/bootstrap/dist/js/bootstrap.js'] -}]); -``` - -In fact, if you don't load an angular module, why bother with an object having a single `files` property? You can just pass the urls. -Single file: -```js -$ocLazyLoad.load('bower_components/bootstrap/dist/js/bootstrap.js'); -``` - -You can also load css and template files: -```js -$ocLazyLoad.load([ - 'bower_components/bootstrap/dist/js/bootstrap.js', - 'bower_components/bootstrap/dist/css/bootstrap.css', - 'partials/template1.html' -]); -``` - -If you want to load templates, the template file should be an html (or htm) file with regular [script templates](https://docs.angularjs.org/api/ng/directive/script). It looks like this: -```html - -``` - -You can put more than one template script in your template file, just make sure to use different ids: -```html - - - -``` - -There are two ways to define config options for the load function. You can use a second optional parameter that will define configs for all the modules that you will load, or you can define optional parameters to each module. -For example, these are equivalent: -```js -$ocLazyLoad.load([{ - name: 'TestModule', - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'], - cache: false -},{ - name: 'AnotherModule', - files: ['anotherModule.js'], - cache: false -}]); -``` -And -```js -$ocLazyLoad.load([{ - name: 'TestModule', - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'] -},{ - name: 'AnotherModule', - files: ['anotherModule.js'] -}], -{cache: false}); -``` - -If you load a template with the native template loader, you can use any parameter from the $http service (check: https://docs.angularjs.org/api/ng/service/$http#usage). -```js -$ocLazyLoad.load( - ['partials/template1.html', 'partials/template2.html'], - {cache: false, timeout: 5000} -); -``` - -The existing parameters that you can use are `cache`, `reconfig`, `rerun`, `serie` and `insertBefore`. -The parameter `cache: false` works for all native loaders (**all requests are cached by default**): - -```js -$ocLazyLoad.load({ - name: 'TestModule', - cache: false, - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'] -}); -``` - -By default, if you reload a module, the config block won't be invoked again (because often it will lead to unexpected results). But if you really need to execute the config function again, use the parameter `reconfig: true`: -```js -$ocLazyLoad.load({ - name: 'TestModule', - reconfig: true, - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'] -}); -``` - -The same problem might happen with run blocks, use `rerun: true` to rerun the run blocks: -```js -$ocLazyLoad.load({ - name: 'TestModule', - rerun: true, - files: ['testModule.js', 'bower_components/bootstrap/dist/js/bootstrap.js'] -}); -``` - -By default the native loaders will load your files in parallel. If you need to load your files in serie, you can use `serie: true`: -```js -$ocLazyLoad.load({ - name: 'mgcrea.ngStrap', - serie: true, - files: [ - 'bower_components/angular-strap/dist/angular-strap.js', - 'bower_components/angular-strap/dist/angular-strap.tpl.js' - ] -}); -``` - -The files, by default, will be inserted before the last child of the `head` element. You can override this by using `insertBefore: 'cssSelector'`: -```js -$ocLazyLoad.load({ - name: 'TestModule', - insertBefore: '#load_css_before', - files: ['bower_components/bootstrap/dist/css/bootstrap.css'] -}); -``` - -### Directive -The directive usage is very similar to the service. The main interest here is that the content will be included and compiled once your modules have been loaded. -This means that you can use directives that will be lazy loaded inside the oc-lazy-load directive. - -Use the same parameters as a service: -```html -
- // Use a directive from TestModule - -
-``` - -You can use variables to store parameters: -```js -$scope.lazyLoadParams = { - name: 'TestModule', - files: [ - 'js/testModule.js', - 'partials/lazyLoadTemplate.html' - ] -}; -``` -```html -
-``` - -### Bonus: Use dependency injection -As a convenience you can also load dependencies by placing a module definition in the dependency injection block of your module. This will only work for lazy loaded modules: -```js -angular.module('MyModule', ['pascalprecht.translate', { - name: 'TestModule', - files: ['/components/TestModule/TestModule.js'] - }, { - files: [ - '/components/bootstrap/css/bootstrap.css', - '/components/bootstrap/js/bootstrap.js' - ] - }] -); -``` - - -## Configuration -You can configure the service provider ```$ocLazyLoadProvider``` in the config function of your application: - -```js -angular.module('app').config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) { - $ocLazyLoadProvider.config({ - ... - }); -}]); -``` - -The options are: -- `jsLoader`: You can use your own async loader. The one provided with $ocLazyLoad is based on $script.js, but you can use requireJS or any other async loader that works with the following syntax: - ```js - $ocLazyLoadProvider.config({ - jsLoader: function([Array of files], callback, params); - }); - ``` - -- `cssLoader`: You can also define your own css async loader. The rules and syntax are the same as jsLoader. - ```js - $ocLazyLoadProvider.config({ - cssLoader: function([Array of files], callback, params); - }); - ``` - -- `templatesLoader`: You can use your template loader. It's similar to the `jsLoader` but it uses an optional config parameter - ```js - $ocLazyLoadProvider.config({ - templatesLoader: function([Array of files], callback, params); - }); - ``` - -- `debug`: $ocLazyLoad returns a promise that can be rejected if there is an error. If you set debug to true, $ocLazyLoad will also log all errors to the console. - ```js - $ocLazyLoadProvider.config({ - debug: true - }); - ``` - -- `events`: $ocLazyLoad can broadcast an event when you load a module, a component and a file (js/css/template). It is disabled by default, set events to true to activate it. The events are `ocLazyLoad.moduleLoaded`, `ocLazyLoad.moduleReloaded`, `ocLazyLoad.componentLoaded`, `ocLazyLoad.fileLoaded`. - ```js - $ocLazyLoadProvider.config({ - events: true - }); - ``` - ```js - $scope.$on('ocLazyLoad.moduleLoaded', function(e, module) { - console.log('module loaded', module); - }); - ``` - -- `modules`: predefine the configuration of your modules for a later use - ```js - $ocLazyLoadProvider.config({ - modules: [{ - name: 'TestModule', - files: ['js/TestModule.js'] - }] - }); - ``` - ```js - $ocLazyLoad.load('TestModule'); - ``` - - -## Works well with your router -`$ocLazyLoad` works well with routers and especially [ui-router](https://github.com/angular-ui/ui-router). Since it returns a promise, use the [resolve property](https://github.com/angular-ui/ui-router/wiki#resolve) to make sure that your components are loaded before the view is resolved: -```js -$stateProvider.state('index', { - url: "/", // root route - views: { - "lazyLoadView": { - controller: 'AppCtrl', // This view will use AppCtrl loaded below in the resolve - templateUrl: 'partials/main.html' - } - }, - resolve: { // Any property in resolve should return a promise and is executed before the view is loaded - loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) { - // you can lazy load files for an existing module - return $ocLazyLoad.load({ - name: 'app', - files: ['js/AppCtrl.js'] - }); - }] - } -}); -``` - -If you have nested views, make sure to include the resolve from the parent to load your components in the right order: -```js -$stateProvider.state('parent', { - url: "/", - resolve: { - loadMyService: ['$ocLazyLoad', function($ocLazyLoad) { - return $ocLazyLoad.load({ - name: 'app', - files: ['js/ServiceTest.js'] - }); - }] - } -}) -.state('parent.child', { - resolve: { - test: ['loadMyService', '$ServiceTest', function(loadMyService, $ServiceTest) { - // you can use your service - $ServiceTest.doSomething(); - }] - } -}); -``` - -It also works for sibling resolves: -```js -$stateProvider.state('index', { - url: "/", - resolve: { - loadMyService: ['$ocLazyLoad', function($ocLazyLoad) { - return $ocLazyLoad.load({ - name: 'app', - files: ['js/ServiceTest.js'] - }); - }], - test: ['loadMyService', '$serviceTest', function(loadMyService, $serviceTest) { - // you can use your service - $serviceTest.doSomething(); - }] - } -}); -``` - -Of course, if you want to use the loaded files immediately, you don't need to define two resolves, you can also use the injector (it works anywhere, not just in the router): -```js -$stateProvider.state('index', { - url: "/", - resolve: { - loadMyService: ['$ocLazyLoad', '$injector', function($ocLazyLoad, $injector) { - return $ocLazyLoad.load({ - name: 'app', - files: ['js/ServiceTest.js'] - }).then(function() { - var $serviceTest = $injector.get("$serviceTest"); - $serviceTest.doSomething(); - }); - }] - } -}); -``` - - -##Other functions -`$ocLazyLoad` provides a few other functions that might help you in a few specific cases: - -- `setModuleConfig(moduleConfig)`: Lets you define a module config object - -- `getModuleConfig(moduleName)`: Lets you get a module config object - -- `getModules()`: Returns the list of loaded modules - -- `isLoaded(modulesNames)`: Lets you check if a module (or a list of modules) has been loaded into Angular or not - - -##Contribute -If you want to get started and the docs are not enough, see the examples in the 'examples' folder! - -If you want to contribute, it would be really awesome to add some tests, or more examples :) diff --git a/admin/js/plugins/oclazyload/bower.json b/admin/js/plugins/oclazyload/bower.json deleted file mode 100644 index 7c986b97..00000000 --- a/admin/js/plugins/oclazyload/bower.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "oclazyload", - "version": "0.5.2", - "description": "Load modules on demand (lazy load) with angularJS", - "main": "dist/ocLazyLoad.min.js", - "homepage": "https://github.com/ocombe/ocLazyLoad", - "authors": ["Olivier Combe "], - "license": "MIT", - "keywords": ["lazy load", "lazy-load", "load on demand", "module", "angular", "angularJS"], - "ignore": ["**/.*", "node_modules", "bower_components", "src", "gulpfile.js", "package.json", "changelog.js", "validate-commit-msg.js", "tests", "karma.conf.js"], - "devDependencies": { - "angular-mocks": "~1.3.2" - }, - "dependencies": { - "angular": "1.2.x - 1.3.x" - } -} \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/dist/ocLazyLoad.js b/admin/js/plugins/oclazyload/dist/ocLazyLoad.js index 5f9f7049..4d293155 100644 --- a/admin/js/plugins/oclazyload/dist/ocLazyLoad.js +++ b/admin/js/plugins/oclazyload/dist/ocLazyLoad.js @@ -1,991 +1,1354 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v0.5.2 + * @version v1.0.10 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe */ -(function() { - 'use strict'; - var regModules = ['ng'], - initModules = [], - regInvokes = {}, - regConfigs = [], - justLoaded = [], - runBlocks = {}, - ocLazyLoad = angular.module('oc.lazyLoad', ['ng']), - broadcast = angular.noop; +(function (angular, window) { + 'use strict'; - ocLazyLoad.provider('$ocLazyLoad', ['$controllerProvider', '$provide', '$compileProvider', '$filterProvider', '$injector', '$animateProvider', - function($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) { - var modules = {}, - providers = { - $controllerProvider: $controllerProvider, - $compileProvider: $compileProvider, - $filterProvider: $filterProvider, - $provide: $provide, // other things - $injector: $injector, - $animateProvider: $animateProvider + var regModules = ['ng', 'oc.lazyLoad'], + regInvokes = {}, + regConfigs = [], + modulesToLoad = [], + // modules to load from angular.module or other sources + realModules = [], + // real modules called from angular.module + recordDeclarations = [], + broadcast = angular.noop, + runBlocks = {}, + justLoaded = []; + + var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']); + + ocLazyLoad.provider('$ocLazyLoad', ["$controllerProvider", "$provide", "$compileProvider", "$filterProvider", "$injector", "$animateProvider", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) { + var modules = {}, + providers = { + $controllerProvider: $controllerProvider, + $compileProvider: $compileProvider, + $filterProvider: $filterProvider, + $provide: $provide, // other things (constant, decorator, provider, factory, service) + $injector: $injector, + $animateProvider: $animateProvider }, - anchor = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0], - jsLoader, cssLoader, templatesLoader, - debug = false, - events = false; + debug = false, + events = false, + moduleCache = [], + modulePromises = {}; - // Let's get the list of loaded modules & components - init(angular.element(window.document)); - - this.$get = ['$log', '$q', '$templateCache', '$http', '$rootElement', '$rootScope', '$cacheFactory', '$interval', function($log, $q, $templateCache, $http, $rootElement, $rootScope, $cacheFactory, $interval) { - var instanceInjector, - filesCache = $cacheFactory('ocLazyLoad'), - uaCssChecked = false, - useCssLoadPatch = false; - - if(!debug) { - $log = {}; - $log['error'] = angular.noop; - $log['warn'] = angular.noop; - $log['info'] = angular.noop; - } - - // Make this lazy because at the moment that $get() is called the instance injector hasn't been assigned to the rootElement yet - providers.getInstanceInjector = function() { - return (instanceInjector) ? instanceInjector : (instanceInjector = ($rootElement.data('$injector') || angular.injector())); + moduleCache.push = function (value) { + if (this.indexOf(value) === -1) { + Array.prototype.push.apply(this, arguments); + } }; - broadcast = function broadcast(eventName, params) { - if(events) { - $rootScope.$broadcast(eventName, params); - } - if(debug) { - $log.info(eventName, params); - } - } + this.config = function (config) { + // If we want to define modules configs + if (angular.isDefined(config.modules)) { + if (angular.isArray(config.modules)) { + angular.forEach(config.modules, function (moduleConfig) { + modules[moduleConfig.name] = moduleConfig; + }); + } else { + modules[config.modules.name] = config.modules; + } + } + + if (angular.isDefined(config.debug)) { + debug = config.debug; + } + + if (angular.isDefined(config.events)) { + events = config.events; + } + }; /** - * Load a js/css file - * @param type - * @param path - * @returns promise + * Get the list of existing registered modules + * @param element */ - var buildElement = function buildElement(type, path, params) { - var deferred = $q.defer(), - el, loaded, - cacheBuster = function cacheBuster(url) { - var dc = new Date().getTime(); - if(url.indexOf('?') >= 0) { - if(url.substring(0, url.length - 1) === '&') { - return url + '_dc=' + dc; - } - return url + '&_dc=' + dc; - } else { - return url + '?_dc=' + dc; - } - }; - - // Store the promise early so the file load can be detected by other parallel lazy loads - // (ie: multiple routes on one page) a 'true' value isn't sufficient - // as it causes false positive load results. - if(angular.isUndefined(filesCache.get(path))) { - filesCache.put(path, deferred.promise); - } - - // Switch in case more content types are added later - switch(type) { - case 'css': - el = document.createElement('link'); - el.type = 'text/css'; - el.rel = 'stylesheet'; - el.href = params.cache === false ? cacheBuster(path) : path; - break; - case 'js': - el = document.createElement('script'); - el.src = params.cache === false ? cacheBuster(path) : path; - break; - default: - deferred.reject(new Error('Requested type "' + type + '" is not known. Could not inject "' + path + '"')); - break; - } - el.onload = el['onreadystatechange'] = function(e) { - if((el['readyState'] && !(/^c|loade/.test(el['readyState']))) || loaded) return; - el.onload = el['onreadystatechange'] = null - loaded = 1; - broadcast('ocLazyLoad.fileLoaded', path); - deferred.resolve(); - } - el.onerror = function(e) { - deferred.reject(new Error('Unable to load ' + path)); - } - el.async = params.serie ? 0 : 1; - - var insertBeforeElem = anchor.lastChild; - if(params.insertBefore) { - var element = angular.element(params.insertBefore); - if(element && element.length > 0) { - insertBeforeElem = element[0]; - } - } - anchor.insertBefore(el, insertBeforeElem); - - /* - The event load or readystatechange doesn't fire in: - - iOS < 6 (default mobile browser) - - Android < 4.4 (default mobile browser) - - Safari < 6 (desktop browser) - */ - if(type == 'css') { - if(!uaCssChecked) { - var ua = navigator.userAgent.toLowerCase(); - - // iOS < 6 - if(/iP(hone|od|ad)/.test(navigator.platform)) { - var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); - var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.')); - useCssLoadPatch = iOSVersion < 6; - } else if(ua.indexOf("android") > -1) { // Android < 4.4 - var androidVersion = parseFloat(ua.slice(ua.indexOf("android") + 8)); - useCssLoadPatch = androidVersion < 4.4; - } else if(ua.indexOf('safari') > -1 && ua.indexOf('chrome') == -1) { - var safariVersion = parseFloat(ua.match(/version\/([\.\d]+)/i)[1]); - useCssLoadPatch = safariVersion < 6; - } - } - - if(useCssLoadPatch) { - var tries = 1000; // * 20 = 20000 miliseconds - var interval = $interval(function() { - try { - el.sheet.cssRules; - $interval.cancel(interval); - el.onload(); - } catch(e) { - if(--tries <= 0) { - el.onerror(); - } - } - }, 20); - } - } - - return deferred.promise; - } - - if(angular.isUndefined(jsLoader)) { - /** - * jsLoader function - * @type Function - * @param paths array list of js files to load - * @param callback to call when everything is loaded. We use a callback and not a promise - * @param params object config parameters - * because the user can overwrite jsLoader and it will probably not use promises :( - */ - jsLoader = function(paths, callback, params) { - var promises = []; - angular.forEach(paths, function loading(path) { - promises.push(buildElement('js', path, params)); - }); - $q.all(promises).then(function success() { - callback(); - }, function error(err) { - callback(err); - }); - } - jsLoader.ocLazyLoadLoader = true; - } - - if(angular.isUndefined(cssLoader)) { - /** - * cssLoader function - * @type Function - * @param paths array list of css files to load - * @param callback to call when everything is loaded. We use a callback and not a promise - * @param params object config parameters - * because the user can overwrite cssLoader and it will probably not use promises :( - */ - cssLoader = function(paths, callback, params) { - var promises = []; - angular.forEach(paths, function loading(path) { - promises.push(buildElement('css', path, params)); - }); - $q.all(promises).then(function success() { - callback(); - }, function error(err) { - callback(err); - }); - } - cssLoader.ocLazyLoadLoader = true; - } - - if(angular.isUndefined(templatesLoader)) { - /** - * templatesLoader function - * @type Function - * @param paths array list of css files to load - * @param callback to call when everything is loaded. We use a callback and not a promise - * @param params object config parameters for $http - * because the user can overwrite templatesLoader and it will probably not use promises :( - */ - templatesLoader = function(paths, callback, params) { - var promises = []; - angular.forEach(paths, function(url) { - var deferred = $q.defer(); - promises.push(deferred.promise); - $http.get(url, params).success(function(data) { - if(angular.isString(data) && data.length > 0) { - angular.forEach(angular.element(data), function(node) { - if(node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') { - $templateCache.put(node.id, node.innerHTML); - } - }); - } - if(angular.isUndefined(filesCache.get(url))) { - filesCache.put(url, true); - } - deferred.resolve(); - }).error(function(err) { - deferred.reject(new Error('Unable to load template file "' + url + '": ' + err)); - }); - }); - return $q.all(promises).then(function success() { - callback(); - }, function error(err) { - callback(err); - }); - } - templatesLoader.ocLazyLoadLoader = true; - } - - var filesLoader = function(config, params) { - var cssFiles = [], - templatesFiles = [], - jsFiles = [], - promises = [], - cachePromise = null; - - angular.extend(params || {}, config); - - var pushFile = function(path) { - cachePromise = filesCache.get(path); - if(angular.isUndefined(cachePromise) || params.cache === false) { - if(/\.(css|less)[^\.]*$/.test(path) && cssFiles.indexOf(path) === -1) { - cssFiles.push(path); - } else if(/\.(htm|html)[^\.]*$/.test(path) && templatesFiles.indexOf(path) === -1) { - templatesFiles.push(path); - } else if(jsFiles.indexOf(path) === -1) { - jsFiles.push(path); - } - } else if(cachePromise) { - promises.push(cachePromise); - } - } - - if(params.serie) { - pushFile(params.files.shift()); - } else { - angular.forEach(params.files, function(path) { - pushFile(path); - }); - } - - if(cssFiles.length > 0) { - var cssDeferred = $q.defer(); - cssLoader(cssFiles, function(err) { - if(angular.isDefined(err) && cssLoader.hasOwnProperty('ocLazyLoadLoader')) { - $log.error(err); - cssDeferred.reject(err); - } else { - cssDeferred.resolve(); - } - }, params); - promises.push(cssDeferred.promise); - } - - if(templatesFiles.length > 0) { - var templatesDeferred = $q.defer(); - templatesLoader(templatesFiles, function(err) { - if(angular.isDefined(err) && templatesLoader.hasOwnProperty('ocLazyLoadLoader')) { - $log.error(err); - templatesDeferred.reject(err); - } else { - templatesDeferred.resolve(); - } - }, params); - promises.push(templatesDeferred.promise); - } - - if(jsFiles.length > 0) { - var jsDeferred = $q.defer(); - jsLoader(jsFiles, function(err) { - if(angular.isDefined(err) && jsLoader.hasOwnProperty('ocLazyLoadLoader')) { - $log.error(err); - jsDeferred.reject(err); - } else { - jsDeferred.resolve(); - } - }, params); - promises.push(jsDeferred.promise); - } - - if(params.serie && params.files.length > 0) { - return $q.all(promises).then(function success() { - return filesLoader(config, params); - }); - } else { - return $q.all(promises); - } - } - - return { - /** - * Let you get a module config object - * @param moduleName String the name of the module - * @returns {*} - */ - getModuleConfig: function(moduleName) { - if(!angular.isString(moduleName)) { - throw new Error('You need to give the name of the module to get'); - } - if(!modules[moduleName]) { - return null; - } - return modules[moduleName]; - }, - - /** - * Let you define a module config object - * @param moduleConfig Object the module config object - * @returns {*} - */ - setModuleConfig: function(moduleConfig) { - if(!angular.isObject(moduleConfig)) { - throw new Error('You need to give the module config object to set'); - } - modules[moduleConfig.name] = moduleConfig; - return moduleConfig; - }, - - /** - * Returns the list of loaded modules - * @returns {string[]} - */ - getModules: function() { - return regModules; - }, - - /** - * Let you check if a module has been loaded into Angular or not - * @param modulesNames String/Object a module name, or a list of module names - * @returns {boolean} - */ - isLoaded: function(modulesNames) { - var moduleLoaded = function(module) { - var isLoaded = regModules.indexOf(module) > -1; - if(!isLoaded) { - isLoaded = !!moduleExists(module); - } - return isLoaded; - } - if(angular.isString(modulesNames)) { - modulesNames = [modulesNames]; - } - if(angular.isArray(modulesNames)) { - var i, len; - for(i = 0, len = modulesNames.length; i < len; i++) { - if(!moduleLoaded(modulesNames[i])) { - return false; - } - } - return true; - } else { - throw new Error('You need to define the module(s) name(s)'); - } - }, - - /** - * Load a module or a list of modules into Angular - * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either - * @param params Object optional parameters - * @returns promise - */ - load: function(module, params) { - var self = this, - config = null, - moduleCache = [], - deferredList = [], - deferred = $q.defer(), - moduleName, - errText; - - if(angular.isUndefined(params)) { - params = {}; - } - - // If module is an array, break it down - if(angular.isArray(module)) { - // Resubmit each entry as a single module - angular.forEach(module, function(m) { - if(m) { - deferredList.push(self.load(m, params)); - } - }); - - // Resolve the promise once everything has loaded - $q.all(deferredList).then(function success() { - deferred.resolve(module); - }, function error(err) { - deferred.reject(err); - }); - - return deferred.promise; - } - - moduleName = getModuleName(module); - - // Get or Set a configuration depending on what was passed in - if(typeof module === 'string') { - config = self.getModuleConfig(module); - if(!config) { - config = { - files: [module] + this._init = function _init(element) { + // this is probably useless now because we override angular.bootstrap + if (modulesToLoad.length === 0) { + var elements = [element], + names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'], + NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/, + append = function append(elm) { + return elm && elements.push(elm); }; - moduleName = null; - } - } else if(typeof module === 'object') { - config = self.setModuleConfig(module); + + angular.forEach(names, function (name) { + names[name] = true; + append(document.getElementById(name)); + name = name.replace(':', '\\:'); + if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) { + angular.forEach(element[0].querySelectorAll('.' + name), append); + angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); + angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); + } + }); + + angular.forEach(elements, function (elm) { + if (modulesToLoad.length === 0) { + var className = ' ' + element.className + ' '; + var match = NG_APP_CLASS_REGEXP.exec(className); + if (match) { + modulesToLoad.push((match[2] || '').replace(/\s+/g, ',')); + } else { + angular.forEach(elm.attributes, function (attr) { + if (modulesToLoad.length === 0 && names[attr.name]) { + modulesToLoad.push(attr.value); + } + }); + } + } + }); } - if(config === null) { - errText = 'Module "' + moduleName + '" is not configured, cannot load.'; - $log.error(errText); - deferred.reject(new Error(errText)); - } else { - // deprecated - if(angular.isDefined(config.template)) { - if(angular.isUndefined(config.files)) { - config.files = []; - } - if(angular.isString(config.template)) { - config.files.push(config.template); - } else if(angular.isArray(config.template)) { - config.files.concat(config.template); - } - } + if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) { + console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.'); } - moduleCache.push = function(value) { - if(this.indexOf(value) === -1) { - Array.prototype.push.apply(this, arguments); - } + var addReg = function addReg(moduleName) { + if (regModules.indexOf(moduleName) === -1) { + // register existing modules + regModules.push(moduleName); + var mainModule = angular.module(moduleName); + + // register existing components (directives, services, ...) + _invokeQueue(null, mainModule._invokeQueue, moduleName); + _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+ + + angular.forEach(mainModule.requires, addReg); + } }; - // If this module has been loaded before, re-use it. - if(angular.isDefined(moduleName) && moduleExists(moduleName) && regModules.indexOf(moduleName) !== -1) { - moduleCache.push(moduleName); + angular.forEach(modulesToLoad, function (moduleName) { + addReg(moduleName); + }); - // if we don't want to load new files, resolve here - if(angular.isUndefined(config.files)) { - deferred.resolve(); - return deferred.promise; - } + modulesToLoad = []; // reset for next bootstrap + recordDeclarations.pop(); // wait for the next lazy load + }; + + /** + * Like JSON.stringify but that doesn't throw on circular references + * @param obj + */ + var stringify = function stringify(obj) { + try { + return JSON.stringify(obj); + } catch (e) { + var cache = []; + return JSON.stringify(obj, function (key, value) { + if (angular.isObject(value) && value !== null) { + if (cache.indexOf(value) !== -1) { + // Circular reference found, discard key + return; + } + // Store value in our collection + cache.push(value); + } + return value; + }); + } + }; + + var hashCode = function hashCode(str) { + var hash = 0, + i, + chr, + len; + if (str.length == 0) { + return hash; + } + for (i = 0, len = str.length; i < len; i++) { + chr = str.charCodeAt(i); + hash = (hash << 5) - hash + chr; + hash |= 0; // Convert to 32bit integer + } + return hash; + }; + + function _register(providers, registerModules, params) { + if (registerModules) { + var k, + moduleName, + moduleFn, + tempRunBlocks = []; + for (k = registerModules.length - 1; k >= 0; k--) { + moduleName = registerModules[k]; + if (!angular.isString(moduleName)) { + moduleName = getModuleName(moduleName); + } + if (!moduleName || justLoaded.indexOf(moduleName) !== -1 || modules[moduleName] && realModules.indexOf(moduleName) === -1) { + continue; + } + // new if not registered + var newModule = regModules.indexOf(moduleName) === -1; + moduleFn = ngModuleFct(moduleName); + if (newModule) { + regModules.push(moduleName); + _register(providers, moduleFn.requires, params); + } + if (moduleFn._runBlocks.length > 0) { + // new run blocks detected! Replace the old ones (if existing) + runBlocks[moduleName] = []; + while (moduleFn._runBlocks.length > 0) { + runBlocks[moduleName].push(moduleFn._runBlocks.shift()); + } + } + if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) { + tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]); + } + _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig); + _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+ + broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName); + registerModules.pop(); + justLoaded.push(moduleName); + } + // execute the run blocks at the end + var instanceInjector = providers.getInstanceInjector(); + angular.forEach(tempRunBlocks, function (fn) { + instanceInjector.invoke(fn); + }); + } + } + + function _registerInvokeList(args, moduleName) { + var invokeList = args[2][0], + type = args[1], + newInvoke = false; + if (angular.isUndefined(regInvokes[moduleName])) { + regInvokes[moduleName] = {}; + } + if (angular.isUndefined(regInvokes[moduleName][type])) { + regInvokes[moduleName][type] = {}; + } + var onInvoke = function onInvoke(invokeName, invoke) { + if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) { + regInvokes[moduleName][type][invokeName] = []; + } + if (checkHashes(invoke, regInvokes[moduleName][type][invokeName])) { + newInvoke = true; + regInvokes[moduleName][type][invokeName].push(invoke); + broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]); + } + }; + + function checkHashes(potentialNew, invokes) { + var isNew = true, + newHash; + if (invokes.length) { + newHash = signature(potentialNew); + angular.forEach(invokes, function (invoke) { + isNew = isNew && signature(invoke) !== newHash; + }); + } + return isNew; } - var localParams = {}; - angular.extend(localParams, params, config); - - var loadDependencies = function loadDependencies(module) { - var moduleName, - loadedModule, - requires, - diff, - promisesList = []; - - moduleName = getModuleName(module); - if(moduleName === null) { - return $q.when(); - } else { - try { - loadedModule = getModule(moduleName); - } catch(e) { - var deferred = $q.defer(); - $log.error(e.message); - deferred.reject(e); - return deferred.promise; + function signature(data) { + if (angular.isArray(data)) { + // arrays are objects, we need to test for it first + return hashCode(data.toString()); + } else if (angular.isObject(data)) { + // constants & values for example + return hashCode(stringify(data)); + } else { + if (angular.isDefined(data) && data !== null) { + return hashCode(data.toString()); + } else { + // null & undefined constants + return data; + } } - requires = getRequires(loadedModule); - } + } - angular.forEach(requires, function(requireEntry) { - // If no configuration is provided, try and find one from a previous load. - // If there isn't one, bail and let the normal flow run - if(typeof requireEntry === 'string') { - var config = self.getModuleConfig(requireEntry); - if(config === null) { - moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway. - return; - } - requireEntry = config; + if (angular.isString(invokeList)) { + onInvoke(invokeList, args[2][1]); + } else if (angular.isObject(invokeList)) { + angular.forEach(invokeList, function (invoke, key) { + if (angular.isString(invoke)) { + // decorators for example + onInvoke(invoke, invokeList[1]); + } else { + // components registered as object lists {"componentName": function() {}} + onInvoke(key, invoke); + } + }); + } else { + return false; + } + return newInvoke; + } + + function _invokeQueue(providers, queue, moduleName, reconfig) { + if (!queue) { + return; + } + + var i, len, args, provider; + for (i = 0, len = queue.length; i < len; i++) { + args = queue[i]; + if (angular.isArray(args)) { + if (providers !== null) { + if (providers.hasOwnProperty(args[0])) { + provider = providers[args[0]]; + } else { + throw new Error('unsupported provider ' + args[0]); + } + } + var isNew = _registerInvokeList(args, moduleName); + if (args[1] !== 'invoke') { + if (isNew && angular.isDefined(provider)) { + provider[args[1]].apply(provider, args[2]); + } + } else { + // config block + var callInvoke = function callInvoke(fct) { + var invoked = regConfigs.indexOf(moduleName + '-' + fct); + if (invoked === -1 || reconfig) { + if (invoked === -1) { + regConfigs.push(moduleName + '-' + fct); + } + if (angular.isDefined(provider)) { + provider[args[1]].apply(provider, args[2]); + } + } + }; + if (angular.isFunction(args[2][0])) { + callInvoke(args[2][0]); + } else if (angular.isArray(args[2][0])) { + for (var j = 0, jlen = args[2][0].length; j < jlen; j++) { + if (angular.isFunction(args[2][0][j])) { + callInvoke(args[2][0][j]); + } + } + } + } } + } + } - // Check if this dependency has been loaded previously - if(moduleExists(requireEntry.name)) { - if(typeof module !== 'string') { - // compare against the already loaded module to see if the new definition adds any new files - diff = requireEntry.files.filter(function(n) { - return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0; - }); + function getModuleName(module) { + var moduleName = null; + if (angular.isString(module)) { + moduleName = module; + } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) { + moduleName = module.name; + } + return moduleName; + } - // If the module was redefined, advise via the console - if(diff.length !== 0) { - $log.warn('Module "', moduleName, '" attempted to redefine configuration for dependency. "', requireEntry.name, '"\n Additional Files Loaded:', diff); + function moduleExists(moduleName) { + if (!angular.isString(moduleName)) { + return false; + } + try { + return ngModuleFct(moduleName); + } catch (e) { + if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) { + return false; + } + } + } + + this.$get = ["$log", "$rootElement", "$rootScope", "$cacheFactory", "$q", function ($log, $rootElement, $rootScope, $cacheFactory, $q) { + var instanceInjector, + filesCache = $cacheFactory('ocLazyLoad'); + + if (!debug) { + $log = {}; + $log['error'] = angular.noop; + $log['warn'] = angular.noop; + $log['info'] = angular.noop; + } + + // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet + providers.getInstanceInjector = function () { + return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector(); + }; + + broadcast = function broadcast(eventName, params) { + if (events) { + $rootScope.$broadcast(eventName, params); + } + if (debug) { + $log.info(eventName, params); + } + }; + + function reject(e) { + var deferred = $q.defer(); + $log.error(e.message); + deferred.reject(e); + return deferred.promise; + } + + return { + _broadcast: broadcast, + + _$log: $log, + + /** + * Returns the files cache used by the loaders to store the files currently loading + * @returns {*} + */ + _getFilesCache: function getFilesCache() { + return filesCache; + }, + + /** + * Let the service know that it should monitor angular.module because files are loading + * @param watch boolean + */ + toggleWatch: function toggleWatch(watch) { + if (watch) { + recordDeclarations.push(true); + } else { + recordDeclarations.pop(); + } + }, + + /** + * Let you get a module config object + * @param moduleName String the name of the module + * @returns {*} + */ + getModuleConfig: function getModuleConfig(moduleName) { + if (!angular.isString(moduleName)) { + throw new Error('You need to give the name of the module to get'); + } + if (!modules[moduleName]) { + return null; + } + return angular.copy(modules[moduleName]); + }, + + /** + * Let you define a module config object + * @param moduleConfig Object the module config object + * @returns {*} + */ + setModuleConfig: function setModuleConfig(moduleConfig) { + if (!angular.isObject(moduleConfig)) { + throw new Error('You need to give the module config object to set'); + } + modules[moduleConfig.name] = moduleConfig; + return moduleConfig; + }, + + /** + * Returns the list of loaded modules + * @returns {string[]} + */ + getModules: function getModules() { + return regModules; + }, + + /** + * Let you check if a module has been loaded into Angular or not + * @param modulesNames String/Object a module name, or a list of module names + * @returns {boolean} + */ + isLoaded: function isLoaded(modulesNames) { + var moduleLoaded = function moduleLoaded(module) { + var isLoaded = regModules.indexOf(module) > -1; + if (!isLoaded) { + isLoaded = !!moduleExists(module); + } + return isLoaded; + }; + if (angular.isString(modulesNames)) { + modulesNames = [modulesNames]; + } + if (angular.isArray(modulesNames)) { + var i, len; + for (i = 0, len = modulesNames.length; i < len; i++) { + if (!moduleLoaded(modulesNames[i])) { + return false; + } + } + return true; + } else { + throw new Error('You need to define the module(s) name(s)'); + } + }, + + /** + * Given a module, return its name + * @param module + * @returns {String} + */ + _getModuleName: getModuleName, + + /** + * Returns a module if it exists + * @param moduleName + * @returns {module} + */ + _getModule: function getModule(moduleName) { + try { + return ngModuleFct(moduleName); + } catch (e) { + // this error message really suxx + if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) { + e.message = 'The module "' + stringify(moduleName) + '" that you are trying to load does not exist. ' + e.message; + } + throw e; + } + }, + + /** + * Check if a module exists and returns it if it does + * @param moduleName + * @returns {boolean} + */ + moduleExists: moduleExists, + + /** + * Load the dependencies, and might try to load new files depending on the config + * @param moduleName (String or Array of Strings) + * @param localParams + * @returns {*} + * @private + */ + _loadDependencies: function _loadDependencies(moduleName, localParams) { + var loadedModule, + requires, + diff, + promisesList = [], + self = this; + + moduleName = self._getModuleName(moduleName); + + if (moduleName === null) { + return $q.when(); + } else { + try { + loadedModule = self._getModule(moduleName); + } catch (e) { + return reject(e); + } + // get unloaded requires + requires = self.getRequires(loadedModule); } - // Push everything to the file loader, it will weed out the duplicates. - promisesList.push(filesLoader(requireEntry.files, localParams).then(function() { - return loadDependencies(requireEntry); - })); - } - return; - } else if(typeof requireEntry === 'object') { - if(requireEntry.hasOwnProperty('name') && requireEntry['name']) { - // The dependency doesn't exist in the module cache and is a new configuration, so store and push it. - self.setModuleConfig(requireEntry); - moduleCache.push(requireEntry['name']); - } + angular.forEach(requires, function (requireEntry) { + // If no configuration is provided, try and find one from a previous load. + // If there isn't one, bail and let the normal flow run + if (angular.isString(requireEntry)) { + var config = self.getModuleConfig(requireEntry); + if (config === null) { + moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway. + return; + } + requireEntry = config; + // ignore the name because it's probably not a real module name + config.name = undefined; + } - // CSS Loading Handler - if(requireEntry.hasOwnProperty('css') && requireEntry['css'].length !== 0) { - // Locate the document insertion point - angular.forEach(requireEntry['css'], function(path) { - buildElement('css', path, localParams); + // Check if this dependency has been loaded previously + if (self.moduleExists(requireEntry.name)) { + // compare against the already loaded module to see if the new definition adds any new files + diff = requireEntry.files.filter(function (n) { + return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0; + }); + + // If the module was redefined, advise via the console + if (diff.length !== 0) { + self._$log.warn('Module "', moduleName, '" attempted to redefine configuration for dependency. "', requireEntry.name, '"\n Additional Files Loaded:', diff); + } + + // Push everything to the file loader, it will weed out the duplicates. + if (angular.isDefined(self.filesLoader)) { + // if a files loader is defined + promisesList.push(self.filesLoader(requireEntry, localParams).then(function () { + return self._loadDependencies(requireEntry); + })); + } else { + return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.')); + } + return; + } else if (angular.isArray(requireEntry)) { + var files = []; + angular.forEach(requireEntry, function (entry) { + // let's check if the entry is a file name or a config name + var config = self.getModuleConfig(entry); + if (config === null) { + files.push(entry); + } else if (config.files) { + files = files.concat(config.files); + } + }); + if (files.length > 0) { + requireEntry = { + files: files + }; + } + } else if (angular.isObject(requireEntry)) { + if (requireEntry.hasOwnProperty('name') && requireEntry['name']) { + // The dependency doesn't exist in the module cache and is a new configuration, so store and push it. + self.setModuleConfig(requireEntry); + moduleCache.push(requireEntry['name']); + } + } + + // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list. + if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) { + if (angular.isDefined(self.filesLoader)) { + // if a files loader is defined + promisesList.push(self.filesLoader(requireEntry, localParams).then(function () { + return self._loadDependencies(requireEntry); + })); + } else { + return reject(new Error('Error: the module "' + requireEntry.name + '" is defined in external files (' + requireEntry.files + '), but no loader has been defined.')); + } + } }); - } - // CSS End. + + // Create a wrapper promise to watch the promise list and resolve it once everything is done. + return $q.all(promisesList); + }, + + /** + * Inject new modules into Angular + * @param moduleName + * @param localParams + * @param real + */ + inject: function inject(moduleName) { + var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + + var self = this, + deferred = $q.defer(); + if (angular.isDefined(moduleName) && moduleName !== null) { + if (angular.isArray(moduleName)) { + var promisesList = []; + angular.forEach(moduleName, function (module) { + promisesList.push(self.inject(module, localParams, real)); + }); + return $q.all(promisesList); + } else { + self._addToLoadList(self._getModuleName(moduleName), true, real); + } + } + if (modulesToLoad.length > 0) { + var res = modulesToLoad.slice(); // clean copy + var loadNext = function loadNext(moduleName) { + moduleCache.push(moduleName); + modulePromises[moduleName] = deferred.promise; + self._loadDependencies(moduleName, localParams).then(function success() { + try { + justLoaded = []; + _register(providers, moduleCache, localParams); + } catch (e) { + self._$log.error(e.message); + deferred.reject(e); + return; + } + + if (modulesToLoad.length > 0) { + loadNext(modulesToLoad.shift()); // load the next in list + } else { + deferred.resolve(res); // everything has been loaded, resolve + } + }, function error(err) { + deferred.reject(err); + }); + }; + + // load the first in list + loadNext(modulesToLoad.shift()); + } else if (localParams && localParams.name && modulePromises[localParams.name]) { + return modulePromises[localParams.name]; + } else { + deferred.resolve(); + } + return deferred.promise; + }, + + /** + * Get the list of required modules/services/... for this module + * @param module + * @returns {Array} + */ + getRequires: function getRequires(module) { + var requires = []; + angular.forEach(module.requires, function (requireModule) { + if (regModules.indexOf(requireModule) === -1) { + requires.push(requireModule); + } + }); + return requires; + }, + + /** + * Invoke the new modules & component by their providers + * @param providers + * @param queue + * @param moduleName + * @param reconfig + * @private + */ + _invokeQueue: _invokeQueue, + + /** + * Check if a module has been invoked and registers it if not + * @param args + * @param moduleName + * @returns {boolean} is new + */ + _registerInvokeList: _registerInvokeList, + + /** + * Register a new module and loads it, executing the run/config blocks if needed + * @param providers + * @param registerModules + * @param params + * @private + */ + _register: _register, + + /** + * Add a module name to the list of modules that will be loaded in the next inject + * @param name + * @param force + * @private + */ + _addToLoadList: _addToLoadList, + + /** + * Unregister modules (you shouldn't have to use this) + * @param modules + */ + _unregister: function _unregister(modules) { + if (angular.isDefined(modules)) { + if (angular.isArray(modules)) { + angular.forEach(modules, function (module) { + regInvokes[module] = undefined; + }); + } + } } + }; + }]; - // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list. - if(requireEntry.hasOwnProperty('files') && requireEntry.files.length !== 0) { - if(requireEntry.files) { - promisesList.push(filesLoader(requireEntry, localParams).then(function() { - return loadDependencies(requireEntry); - })); - } - } - }); - - // Create a wrapper promise to watch the promise list and resolve it once everything is done. - return $q.all(promisesList); - } - - filesLoader(config, localParams).then(function success() { - if(moduleName === null) { - deferred.resolve(module); - } else { - moduleCache.push(moduleName); - loadDependencies(moduleName).then(function success() { - try { - justLoaded = []; - register(providers, moduleCache, localParams); - } catch(e) { - $log.error(e.message); - deferred.reject(e); - return; - } - deferred.resolve(module); - }, function error(err) { - deferred.reject(err); - }); - } - }, function error(err) { - deferred.reject(err); - }); - - return deferred.promise; - } - }; - }]; - - this.config = function(config) { - if(angular.isDefined(config.jsLoader) || angular.isDefined(config.asyncLoader)) { - if(!angular.isFunction(config.jsLoader || config.asyncLoader)) { - throw('The js loader needs to be a function'); - } - jsLoader = config.jsLoader || config.asyncLoader; - } - - if(angular.isDefined(config.cssLoader)) { - if(!angular.isFunction(config.cssLoader)) { - throw('The css loader needs to be a function'); - } - cssLoader = config.cssLoader; - } - - if(angular.isDefined(config.templatesLoader)) { - if(!angular.isFunction(config.templatesLoader)) { - throw('The template loader needs to be a function'); - } - templatesLoader = config.templatesLoader; - } - - // If we want to define modules configs - if(angular.isDefined(config.modules)) { - if(angular.isArray(config.modules)) { - angular.forEach(config.modules, function(moduleConfig) { - modules[moduleConfig.name] = moduleConfig; - }); - } else { - modules[config.modules.name] = config.modules; - } - } - - if(angular.isDefined(config.debug)) { - debug = config.debug; - } - - if(angular.isDefined(config.events)) { - events = config.events; - } - }; + // Let's get the list of loaded modules & components + this._init(angular.element(window.document)); }]); - ocLazyLoad.directive('ocLazyLoad', ['$ocLazyLoad', '$compile', '$animate', '$parse', - function($ocLazyLoad, $compile, $animate, $parse) { - return { - restrict: 'A', - terminal: true, - priority: 1000, - compile: function(element, attrs) { - // we store the content and remove it before compilation - var content = element[0].innerHTML; - element.html(''); + var bootstrapFct = angular.bootstrap; + angular.bootstrap = function (element, modules, config) { + // Clean state from previous bootstrap + regModules = ['ng', 'oc.lazyLoad']; + regInvokes = {}; + regConfigs = []; + modulesToLoad = []; + realModules = []; + recordDeclarations = []; + broadcast = angular.noop; + runBlocks = {}; + justLoaded = []; + // we use slice to make a clean copy + angular.forEach(modules.slice(), function (module) { + _addToLoadList(module, true, true); + }); + return bootstrapFct(element, modules, config); + }; - return function($scope, $element, $attr) { - var model = $parse($attr.ocLazyLoad); - $scope.$watch(function() { - // it can be a module name (string), an object, an array, or a scope reference to any of this - return model($scope) || $attr.ocLazyLoad; - }, function(moduleName) { - if(angular.isDefined(moduleName)) { - $ocLazyLoad.load(moduleName).then(function success(moduleConfig) { - $animate.enter($compile(content)($scope), null, $element); - }); - } - }, true); - }; - } - }; - }]); - - /** - * Get the list of required modules/services/... for this module - * @param module - * @returns {Array} - */ - function getRequires(module) { - var requires = []; - angular.forEach(module.requires, function(requireModule) { - if(regModules.indexOf(requireModule) === -1) { - requires.push(requireModule); - } - }); - return requires; - } - - /** - * Check if a module exists and returns it if it does - * @param moduleName - * @returns {boolean} - */ - function moduleExists(moduleName) { - try { - return angular.module(moduleName); - } catch(e) { - if(/No module/.test(e) || (e.message.indexOf('$injector:nomod') > -1)) { - return false; - } - } - } - - function getModule(moduleName) { - try { - return angular.module(moduleName); - } catch(e) { - // this error message really suxx - if(/No module/.test(e) || (e.message.indexOf('$injector:nomod') > -1)) { - e.message = 'The module "' + moduleName + '" that you are trying to load does not exist. ' + e.message - } - throw e; - } - } - - function invokeQueue(providers, queue, moduleName, reconfig) { - if(!queue) { - return; - } - - var i, len, args, provider; - for(i = 0, len = queue.length; i < len; i++) { - args = queue[i]; - if(angular.isArray(args)) { - if(providers !== null) { - if(providers.hasOwnProperty(args[0])) { - provider = providers[args[0]]; - } else { - throw new Error('unsupported provider ' + args[0]); - } - } - var isNew = registerInvokeList(args, moduleName); - if(args[1] !== 'invoke') { - if(isNew && angular.isDefined(provider)) { - provider[args[1]].apply(provider, args[2]); - } - } else { // config block - var callInvoke = function(fct) { - var invoked = regConfigs.indexOf(moduleName + '-' + fct); - if(invoked === -1 || reconfig) { - if(invoked === -1) { - regConfigs.push(moduleName + '-' + fct); - } - if(angular.isDefined(provider)) { - provider[args[1]].apply(provider, args[2]); - } + var _addToLoadList = function _addToLoadList(name, force, real) { + if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) { + modulesToLoad.push(name); + if (real) { + realModules.push(name); } - } - if(angular.isFunction(args[2][0])) { - callInvoke(args[2][0]); - } else if(angular.isArray(args[2][0])) { - for(var j = 0, jlen = args[2][0].length; j < jlen; j++) { - if(angular.isFunction(args[2][0][j])) { - callInvoke(args[2][0][j]); - } + } + }; + + var ngModuleFct = angular.module; + angular.module = function (name, requires, configFn) { + _addToLoadList(name, false, true); + return ngModuleFct(name, requires, configFn); + }; + + // CommonJS package manager support: + if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) { + module.exports = 'oc.lazyLoad'; + } +})(angular, window); +(function (angular) { + 'use strict'; + + angular.module('oc.lazyLoad').directive('ocLazyLoad', ["$ocLazyLoad", "$compile", "$animate", "$parse", "$timeout", function ($ocLazyLoad, $compile, $animate, $parse, $timeout) { + return { + restrict: 'A', + terminal: true, + priority: 1000, + compile: function compile(element, attrs) { + // we store the content and remove it before compilation + var content = element[0].innerHTML; + element.html(''); + + return function ($scope, $element, $attr) { + var model = $parse($attr.ocLazyLoad); + $scope.$watch(function () { + return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this + }, function (moduleName) { + if (angular.isDefined(moduleName)) { + $ocLazyLoad.load(moduleName).then(function () { + // Attach element contents to DOM and then compile them. + // This prevents an issue where IE invalidates saved element objects (HTMLCollections) + // of the compiled contents when attaching to the parent DOM. + $animate.enter(content, $element); + // get the new content & compile it + $compile($element.contents())($scope); + }); + } + }, true); + }; } - } - } - } - } - } - - /** - * Register a new module and load it - * @param providers - * @param registerModules - * @returns {*} - */ - function register(providers, registerModules, params) { - if(registerModules) { - var k, r, moduleName, moduleFn, tempRunBlocks = []; - for(k = registerModules.length - 1; k >= 0; k--) { - moduleName = registerModules[k]; - if(typeof moduleName !== 'string') { - moduleName = getModuleName(moduleName); - } - if(!moduleName || justLoaded.indexOf(moduleName) !== -1) { - continue; - } - var newModule = regModules.indexOf(moduleName) === -1; - moduleFn = angular.module(moduleName); - if(newModule) { // new module - regModules.push(moduleName); - register(providers, moduleFn.requires, params); - } - if(moduleFn._runBlocks.length > 0) { - // new run blocks detected! Replace the old ones (if existing) - runBlocks[moduleName] = []; - while(moduleFn._runBlocks.length > 0) { - runBlocks[moduleName].push(moduleFn._runBlocks.shift()); - } - } - if(angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) { - tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]); - } - invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig); - invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+ - broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName); - registerModules.pop(); - justLoaded.push(moduleName); - } - // execute the run blocks at the end - var instanceInjector = providers.getInstanceInjector(); - angular.forEach(tempRunBlocks, function(fn) { - instanceInjector.invoke(fn); - }); - } - } - - /** - * Register an invoke - * @param args - * @returns {*} - */ - function registerInvokeList(args, moduleName) { - var invokeList = args[2][0], - type = args[1], - newInvoke = false; - if(angular.isUndefined(regInvokes[moduleName])) { - regInvokes[moduleName] = {}; - } - if(angular.isUndefined(regInvokes[moduleName][type])) { - regInvokes[moduleName][type] = []; - } - var onInvoke = function(invokeName) { - newInvoke = true; - regInvokes[moduleName][type].push(invokeName); - broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]); - } - if(angular.isString(invokeList) && regInvokes[moduleName][type].indexOf(invokeList) === -1) { - onInvoke(invokeList); - } else if(angular.isObject(invokeList)) { - angular.forEach(invokeList, function(invoke) { - if(angular.isString(invoke) && regInvokes[moduleName][type].indexOf(invoke) === -1) { - onInvoke(invoke); - } - }); - } else { - return false; - } - return newInvoke; - } - - function getModuleName(module) { - var moduleName = null; - if(angular.isString(module)) { - moduleName = module; - } else if(angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) { - moduleName = module.name; - } - return moduleName; - } - - /** - * Get the list of existing registered modules - * @param element - */ - function init(element) { - if(initModules.length === 0) { - var elements = [element], - names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'], - NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/, - append = function append(elm) { - return (elm && elements.push(elm)); }; + }]); +})(angular); +(function (angular) { + 'use strict'; - angular.forEach(names, function(name) { - names[name] = true; - append(document.getElementById(name)); - name = name.replace(':', '\\:'); - if(element[0].querySelectorAll) { - angular.forEach(element[0].querySelectorAll('.' + name), append); - angular.forEach(element[0].querySelectorAll('.' + name + '\\:'), append); - angular.forEach(element[0].querySelectorAll('[' + name + ']'), append); - } - }); + angular.module('oc.lazyLoad').config(["$provide", function ($provide) { + $provide.decorator('$ocLazyLoad', ["$delegate", "$q", "$window", "$interval", function ($delegate, $q, $window, $interval) { + var uaCssChecked = false, + useCssLoadPatch = false, + anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0]; - angular.forEach(elements, function(elm) { - if(initModules.length === 0) { - var className = ' ' + element.className + ' '; - var match = NG_APP_CLASS_REGEXP.exec(className); - if(match) { - initModules.push((match[2] || '').replace(/\s+/g, ',')); - } else { - angular.forEach(elm.attributes, function(attr) { - if(initModules.length === 0 && names[attr.name]) { - initModules.push(attr.value); - } - }); - } - } - }); - } - if(initModules.length === 0) { - throw 'No module found during bootstrap, unable to init ocLazyLoad'; - } + /** + * Load a js/css file + * @param type + * @param path + * @param params + * @returns promise + */ + $delegate.buildElement = function buildElement(type, path, params) { + var deferred = $q.defer(), + el, + loaded, + filesCache = $delegate._getFilesCache(), + cacheBuster = function cacheBuster(url) { + var dc = new Date().getTime(); + if (url.indexOf('?') >= 0) { + if (url.substring(0, url.length - 1) === '&') { + return url + '_dc=' + dc; + } + return url + '&_dc=' + dc; + } else { + return url + '?_dc=' + dc; + } + }; - var addReg = function addReg(moduleName) { - if(regModules.indexOf(moduleName) === -1) { - // register existing modules - regModules.push(moduleName); - var mainModule = angular.module(moduleName); + // Store the promise early so the file load can be detected by other parallel lazy loads + // (ie: multiple routes on one page) a 'true' value isn't sufficient + // as it causes false positive load results. + if (angular.isUndefined(filesCache.get(path))) { + filesCache.put(path, deferred.promise); + } - // register existing components (directives, services, ...) - invokeQueue(null, mainModule._invokeQueue, moduleName); - invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+ + // Switch in case more content types are added later + switch (type) { + case 'css': + el = $window.document.createElement('link'); + el.type = 'text/css'; + el.rel = 'stylesheet'; + el.href = params.cache === false ? cacheBuster(path) : path; + break; + case 'js': + el = $window.document.createElement('script'); + el.src = params.cache === false ? cacheBuster(path) : path; + break; + default: + filesCache.remove(path); + deferred.reject(new Error('Requested type "' + type + '" is not known. Could not inject "' + path + '"')); + break; + } + el.onload = el['onreadystatechange'] = function (e) { + if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return; + el.onload = el['onreadystatechange'] = null; + loaded = 1; + $delegate._broadcast('ocLazyLoad.fileLoaded', path); + deferred.resolve(el); + }; + el.onerror = function () { + filesCache.remove(path); + deferred.reject(new Error('Unable to load ' + path)); + }; + el.async = params.serie ? 0 : 1; - angular.forEach(mainModule.requires, addReg); - } - }; + var insertBeforeElem = anchor.lastChild; + if (params.insertBefore) { + var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore)); + if (element && element.length > 0) { + insertBeforeElem = element[0]; + } + } + insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem); - angular.forEach(initModules, function(moduleName) { - addReg(moduleName); - }); - } + /* + The event load or readystatechange doesn't fire in: + - PhantomJS 1.9 (headless webkit browser) + - iOS < 6 (default mobile browser) + - Android < 4.4 (default mobile browser) + - Safari < 6 (desktop browser) + */ + if (type == 'css') { + if (!uaCssChecked) { + var ua = $window.navigator.userAgent.toLowerCase(); - var bootstrap = angular.bootstrap; - angular.bootstrap = function(element, modules, config) { - initModules = modules.slice(); // make a clean copy - return bootstrap(element, modules, config); - }; + if (ua.indexOf('phantomjs/1.9') > -1) { + // PhantomJS ~1.9 + useCssLoadPatch = true; + } else if (/iP(hone|od|ad)/.test($window.navigator.platform)) { + // iOS < 6 + var v = $window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); + var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.')); + useCssLoadPatch = iOSVersion < 6; + } else if (ua.indexOf('android') > -1) { + // Android < 4.4 + var androidVersion = parseFloat(ua.slice(ua.indexOf('android') + 8)); + useCssLoadPatch = androidVersion < 4.4; + } else if (ua.indexOf('safari') > -1) { + // Safari < 6 + var versionMatch = ua.match(/version\/([\.\d]+)/i); + useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6; + } + } - // Array.indexOf polyfill for IE8 - if(!Array.prototype.indexOf) { - Array.prototype.indexOf = function(searchElement, fromIndex) { + if (useCssLoadPatch) { + var tries = 1000; // * 20 = 20000 miliseconds + var interval = $interval(function () { + try { + el.sheet.cssRules; + $interval.cancel(interval); + el.onload(); + } catch (e) { + if (--tries <= 0) { + el.onerror(); + } + } + }, 20); + } + } - var k; + return deferred.promise; + }; - // 1. Let O be the result of calling ToObject passing - // the this value as the argument. - if(this == null) { - throw new TypeError('"this" is null or not defined'); - } + return $delegate; + }]); + }]); +})(angular); +(function (angular) { + 'use strict'; - var O = Object(this); + angular.module('oc.lazyLoad').config(["$provide", function ($provide) { + $provide.decorator('$ocLazyLoad', ["$delegate", "$q", function ($delegate, $q) { + /** + * The function that loads new files + * @param config + * @param params + * @returns {*} + */ + $delegate.filesLoader = function filesLoader(config) { + var params = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - // 2. Let lenValue be the result of calling the Get - // internal method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; + var cssFiles = [], + templatesFiles = [], + jsFiles = [], + promises = [], + cachePromise = null, + filesCache = $delegate._getFilesCache(); - // 4. If len is 0, return -1. - if(len === 0) { - return -1; - } + $delegate.toggleWatch(true); // start watching angular.module calls - // 5. If argument fromIndex was passed let n be - // ToInteger(fromIndex); else let n be 0. - var n = +fromIndex || 0; + angular.extend(params, config); - if(Math.abs(n) === Infinity) { - n = 0; - } + var pushFile = function pushFile(path) { + var file_type = null, + m; + if (angular.isObject(path)) { + file_type = path.type; + path = path.path; + } + cachePromise = filesCache.get(path); + if (angular.isUndefined(cachePromise) || params.cache === false) { - // 6. If n >= len, return -1. - if(n >= len) { - return -1; - } + // always check for requirejs syntax just in case + if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) { + // Detect file type using preceding type declaration (ala requireJS) + file_type = m[1]; + path = path.substr(m[1].length + 1, path.length); // Strip the type from the path + } - // 7. If n >= 0, then Let k be n. - // 8. Else, n<0, Let k be len - abs(n). - // If k is less than 0, then let k be 0. - k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + if (!file_type) { + if ((m = /[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(path)) !== null) { + // Detect file type via file extension + file_type = m[1]; + } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('requirejs')) { + // requirejs + file_type = 'js'; + } else { + $delegate._$log.error('File type could not be determined. ' + path); + return; + } + } - // 9. Repeat, while k < len - while(k < len) { - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the - // HasProperty internal method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - // i. Let elementK be the result of calling the Get - // internal method of O with the argument ToString(k). - // ii. Let same be the result of applying the - // Strict Equality Comparison Algorithm to - // searchElement and elementK. - // iii. If same is true, return k. - if(k in O && O[k] === searchElement) { - return k; - } - k++; - } - return -1; - }; - } -})(); + if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) { + cssFiles.push(path); + } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) { + templatesFiles.push(path); + } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) { + jsFiles.push(path); + } else { + $delegate._$log.error('File type is not valid. ' + path); + } + } else if (cachePromise) { + promises.push(cachePromise); + } + }; + + if (params.serie) { + pushFile(params.files.shift()); + } else { + angular.forEach(params.files, function (path) { + pushFile(path); + }); + } + + if (cssFiles.length > 0) { + var cssDeferred = $q.defer(); + $delegate.cssLoader(cssFiles, function (err) { + if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) { + $delegate._$log.error(err); + cssDeferred.reject(err); + } else { + cssDeferred.resolve(); + } + }, params); + promises.push(cssDeferred.promise); + } + + if (templatesFiles.length > 0) { + var templatesDeferred = $q.defer(); + $delegate.templatesLoader(templatesFiles, function (err) { + if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) { + $delegate._$log.error(err); + templatesDeferred.reject(err); + } else { + templatesDeferred.resolve(); + } + }, params); + promises.push(templatesDeferred.promise); + } + + if (jsFiles.length > 0) { + var jsDeferred = $q.defer(); + $delegate.jsLoader(jsFiles, function (err) { + if (angular.isDefined(err) && ($delegate.jsLoader.hasOwnProperty("ocLazyLoadLoader") || $delegate.jsLoader.hasOwnProperty("requirejs"))) { + $delegate._$log.error(err); + jsDeferred.reject(err); + } else { + jsDeferred.resolve(); + } + }, params); + promises.push(jsDeferred.promise); + } + + if (promises.length === 0) { + var deferred = $q.defer(), + err = "Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'."; + $delegate._$log.error(err); + deferred.reject(err); + return deferred.promise; + } else if (params.serie && params.files.length > 0) { + return $q.all(promises).then(function () { + return $delegate.filesLoader(config, params); + }); + } else { + return $q.all(promises)['finally'](function (res) { + $delegate.toggleWatch(false); // stop watching angular.module calls + return res; + }); + } + }; + + /** + * Load a module or a list of modules into Angular + * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either + * @param params Object optional parameters + * @returns promise + */ + $delegate.load = function (originalModule) { + var originalParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var self = this, + config = null, + deferredList = [], + deferred = $q.defer(), + errText; + + // clean copy + var module = angular.copy(originalModule); + var params = angular.copy(originalParams); + + // If module is an array, break it down + if (angular.isArray(module)) { + // Resubmit each entry as a single module + angular.forEach(module, function (m) { + deferredList.push(self.load(m, params)); + }); + + // Resolve the promise once everything has loaded + $q.all(deferredList).then(function (res) { + deferred.resolve(res); + }, function (err) { + deferred.reject(err); + }); + + return deferred.promise; + } + + // Get or Set a configuration depending on what was passed in + if (angular.isString(module)) { + config = self.getModuleConfig(module); + if (!config) { + config = { + files: [module] + }; + } + } else if (angular.isObject(module)) { + // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'} + if (angular.isDefined(module.path) && angular.isDefined(module.type)) { + config = { + files: [module] + }; + } else { + config = self.setModuleConfig(module); + } + } + + if (config === null) { + var moduleName = self._getModuleName(module); + errText = 'Module "' + (moduleName || 'unknown') + '" is not configured, cannot load.'; + $delegate._$log.error(errText); + deferred.reject(new Error(errText)); + return deferred.promise; + } else { + // deprecated + if (angular.isDefined(config.template)) { + if (angular.isUndefined(config.files)) { + config.files = []; + } + if (angular.isString(config.template)) { + config.files.push(config.template); + } else if (angular.isArray(config.template)) { + config.files.concat(config.template); + } + } + } + + var localParams = angular.extend({}, params, config); + + // if someone used an external loader and called the load function with just the module name + if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) { + return $delegate.inject(config.name, localParams, true); + } + + $delegate.filesLoader(config, localParams).then(function () { + $delegate.inject(null, localParams).then(function (res) { + deferred.resolve(res); + }, function (err) { + deferred.reject(err); + }); + }, function (err) { + deferred.reject(err); + }); + + return deferred.promise; + }; + + // return the patched service + return $delegate; + }]); + }]); +})(angular); +(function (angular) { + 'use strict'; + + angular.module('oc.lazyLoad').config(["$provide", function ($provide) { + $provide.decorator('$ocLazyLoad', ["$delegate", "$q", function ($delegate, $q) { + /** + * cssLoader function + * @type Function + * @param paths array list of css files to load + * @param callback to call when everything is loaded. We use a callback and not a promise + * @param params object config parameters + * because the user can overwrite cssLoader and it will probably not use promises :( + */ + $delegate.cssLoader = function (paths, callback, params) { + var promises = []; + angular.forEach(paths, function (path) { + promises.push($delegate.buildElement('css', path, params)); + }); + $q.all(promises).then(function () { + callback(); + }, function (err) { + callback(err); + }); + }; + $delegate.cssLoader.ocLazyLoadLoader = true; + + return $delegate; + }]); + }]); +})(angular); +(function (angular) { + 'use strict'; + + angular.module('oc.lazyLoad').config(["$provide", function ($provide) { + $provide.decorator('$ocLazyLoad', ["$delegate", "$q", function ($delegate, $q) { + /** + * jsLoader function + * @type Function + * @param paths array list of js files to load + * @param callback to call when everything is loaded. We use a callback and not a promise + * @param params object config parameters + * because the user can overwrite jsLoader and it will probably not use promises :( + */ + $delegate.jsLoader = function (paths, callback, params) { + var promises = []; + angular.forEach(paths, function (path) { + promises.push($delegate.buildElement('js', path, params)); + }); + $q.all(promises).then(function () { + callback(); + }, function (err) { + callback(err); + }); + }; + $delegate.jsLoader.ocLazyLoadLoader = true; + + return $delegate; + }]); + }]); +})(angular); +(function (angular) { + 'use strict'; + + angular.module('oc.lazyLoad').config(["$provide", function ($provide) { + $provide.decorator('$ocLazyLoad', ["$delegate", "$templateCache", "$q", "$http", function ($delegate, $templateCache, $q, $http) { + /** + * templatesLoader function + * @type Function + * @param paths array list of css files to load + * @param callback to call when everything is loaded. We use a callback and not a promise + * @param params object config parameters for $http + * because the user can overwrite templatesLoader and it will probably not use promises :( + */ + $delegate.templatesLoader = function (paths, callback, params) { + var promises = [], + filesCache = $delegate._getFilesCache(); + + angular.forEach(paths, function (url) { + var deferred = $q.defer(); + promises.push(deferred.promise); + $http.get(url, params).then(function (response) { + var data = response.data; + if (angular.isString(data) && data.length > 0) { + angular.forEach(angular.element(data), function (node) { + if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') { + $templateCache.put(node.id, node.innerHTML); + } + }); + } + if (angular.isUndefined(filesCache.get(url))) { + filesCache.put(url, true); + } + deferred.resolve(); + })['catch'](function (response) { + deferred.reject(new Error('Unable to load template file "' + url + '": ' + response.data)); + }); + }); + return $q.all(promises).then(function () { + callback(); + }, function (err) { + callback(err); + }); + }; + $delegate.templatesLoader.ocLazyLoadLoader = true; + + return $delegate; + }]); + }]); +})(angular); +// Array.indexOf polyfill for IE8 +if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function (searchElement, fromIndex) { + var k; + + // 1. Let O be the result of calling ToObject passing + // the this value as the argument. + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + + var O = Object(this); + + // 2. Let lenValue be the result of calling the Get + // internal method of O with the argument "length". + // 3. Let len be ToUint32(lenValue). + var len = O.length >>> 0; + + // 4. If len is 0, return -1. + if (len === 0) { + return -1; + } + + // 5. If argument fromIndex was passed let n be + // ToInteger(fromIndex); else let n be 0. + var n = +fromIndex || 0; + + if (Math.abs(n) === Infinity) { + n = 0; + } + + // 6. If n >= len, return -1. + if (n >= len) { + return -1; + } + + // 7. If n >= 0, then Let k be n. + // 8. Else, n<0, Let k be len - abs(n). + // If k is less than 0, then let k be 0. + k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + + // 9. Repeat, while k < len + while (k < len) { + // a. Let Pk be ToString(k). + // This is implicit for LHS operands of the in operator + // b. Let kPresent be the result of calling the + // HasProperty internal method of O with argument Pk. + // This step can be combined with c + // c. If kPresent is true, then + // i. Let elementK be the result of calling the Get + // internal method of O with the argument ToString(k). + // ii. Let same be the result of applying the + // Strict Equality Comparison Algorithm to + // searchElement and elementK. + // iii. If same is true, return k. + if (k in O && O[k] === searchElement) { + return k; + } + k++; + } + return -1; + }; +} \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/dist/ocLazyLoad.min.js b/admin/js/plugins/oclazyload/dist/ocLazyLoad.min.js index 3f5e50a5..972ee7e8 100644 --- a/admin/js/plugins/oclazyload/dist/ocLazyLoad.min.js +++ b/admin/js/plugins/oclazyload/dist/ocLazyLoad.min.js @@ -1,8 +1,8 @@ /** * oclazyload - Load modules on demand (lazy load) with angularJS - * @version v0.5.2 + * @version v1.0.10 * @link https://github.com/ocombe/ocLazyLoad * @license MIT * @author Olivier Combe */ -!function(){"use strict";function e(e){var n=[];return angular.forEach(e.requires,function(e){-1===l.indexOf(e)&&n.push(e)}),n}function n(e){try{return angular.module(e)}catch(n){if(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)return!1}}function r(e){try{return angular.module(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+e+'" that you are trying to load does not exist. '+n.message),n}}function a(e,n,r,a){if(n){var t,i,u,l;for(t=0,i=n.length;i>t;t++)if(u=n[t],angular.isArray(u)){if(null!==e){if(!e.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);l=e[u[0]]}var s=o(u,r);if("invoke"!==u[1])s&&angular.isDefined(l)&&l[u[1]].apply(l,u[2]);else{var f=function(e){var n=c.indexOf(r+"-"+e);(-1===n||a)&&(-1===n&&c.push(r+"-"+e),angular.isDefined(l)&&l[u[1]].apply(l,u[2]))};if(angular.isFunction(u[2][0]))f(u[2][0]);else if(angular.isArray(u[2][0]))for(var d=0,g=u[2][0].length;g>d;d++)angular.isFunction(u[2][0][d])&&f(u[2][0][d])}}}}function t(e,n,r){if(n){var o,u,s,f=[];for(o=n.length-1;o>=0;o--)if(u=n[o],"string"!=typeof u&&(u=i(u)),u&&-1===d.indexOf(u)){var c=-1===l.indexOf(u);if(s=angular.module(u),c&&(l.push(u),t(e,s.requires,r)),s._runBlocks.length>0)for(g[u]=[];s._runBlocks.length>0;)g[u].push(s._runBlocks.shift());angular.isDefined(g[u])&&(c||r.rerun)&&(f=f.concat(g[u])),a(e,s._invokeQueue,u,r.reconfig),a(e,s._configBlocks,u,r.reconfig),p(c?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",u),n.pop(),d.push(u)}var h=e.getInstanceInjector();angular.forEach(f,function(e){h.invoke(e)})}}function o(e,n){var r=e[2][0],a=e[1],t=!1;angular.isUndefined(f[n])&&(f[n]={}),angular.isUndefined(f[n][a])&&(f[n][a]=[]);var o=function(e){t=!0,f[n][a].push(e),p("ocLazyLoad.componentLoaded",[n,a,e])};if(angular.isString(r)&&-1===f[n][a].indexOf(r))o(r);else{if(!angular.isObject(r))return!1;angular.forEach(r,function(e){angular.isString(e)&&-1===f[n][a].indexOf(e)&&o(e)})}return t}function i(e){var n=null;return angular.isString(e)?n=e:angular.isObject(e)&&e.hasOwnProperty("name")&&angular.isString(e.name)&&(n=e.name),n}function u(e){if(0===s.length){var n=[e],r=["ng:app","ng-app","x-ng-app","data-ng-app"],t=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,o=function(e){return e&&n.push(e)};angular.forEach(r,function(n){r[n]=!0,o(document.getElementById(n)),n=n.replace(":","\\:"),e[0].querySelectorAll&&(angular.forEach(e[0].querySelectorAll("."+n),o),angular.forEach(e[0].querySelectorAll("."+n+"\\:"),o),angular.forEach(e[0].querySelectorAll("["+n+"]"),o))}),angular.forEach(n,function(n){if(0===s.length){var a=" "+e.className+" ",o=t.exec(a);o?s.push((o[2]||"").replace(/\s+/g,",")):angular.forEach(n.attributes,function(e){0===s.length&&r[e.name]&&s.push(e.value)})}})}if(0===s.length)throw"No module found during bootstrap, unable to init ocLazyLoad";var i=function u(e){if(-1===l.indexOf(e)){l.push(e);var n=angular.module(e);a(null,n._invokeQueue,e),a(null,n._configBlocks,e),angular.forEach(n.requires,u)}};angular.forEach(s,function(e){i(e)})}var l=["ng"],s=[],f={},c=[],d=[],g={},h=angular.module("oc.lazyLoad",["ng"]),p=angular.noop;h.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(a,o,s,f,c,g){var h,m,v,y={},L={$controllerProvider:a,$compileProvider:s,$filterProvider:f,$provide:o,$injector:c,$animateProvider:g},w=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0],O=!1,j=!1;u(angular.element(window.document)),this.$get=["$log","$q","$templateCache","$http","$rootElement","$rootScope","$cacheFactory","$interval",function(a,o,u,s,f,c,g,E){var $,x=g("ocLazyLoad"),b=!1,z=!1;O||(a={},a.error=angular.noop,a.warn=angular.noop,a.info=angular.noop),L.getInstanceInjector=function(){return $?$:$=f.data("$injector")||angular.injector()},p=function(e,n){j&&c.$broadcast(e,n),O&&a.info(e,n)};var P=function(e,n,r){var a,t,i=o.defer(),u=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?e+"_dc="+n:e+"&_dc="+n:e+"?_dc="+n};switch(angular.isUndefined(x.get(n))&&x.put(n,i.promise),e){case"css":a=document.createElement("link"),a.type="text/css",a.rel="stylesheet",a.href=r.cache===!1?u(n):n;break;case"js":a=document.createElement("script"),a.src=r.cache===!1?u(n):n;break;default:i.reject(new Error('Requested type "'+e+'" is not known. Could not inject "'+n+'"'))}a.onload=a.onreadystatechange=function(){a.readyState&&!/^c|loade/.test(a.readyState)||t||(a.onload=a.onreadystatechange=null,t=1,p("ocLazyLoad.fileLoaded",n),i.resolve())},a.onerror=function(){i.reject(new Error("Unable to load "+n))},a.async=r.serie?0:1;var l=w.lastChild;if(r.insertBefore){var s=angular.element(r.insertBefore);s&&s.length>0&&(l=s[0])}if(w.insertBefore(a,l),"css"==e){if(!b){var f=navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(navigator.platform)){var c=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),d=parseFloat([parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||0,10)].join("."));z=6>d}else if(f.indexOf("android")>-1){var g=parseFloat(f.slice(f.indexOf("android")+8));z=4.4>g}else if(f.indexOf("safari")>-1&&-1==f.indexOf("chrome")){var h=parseFloat(f.match(/version\/([\.\d]+)/i)[1]);z=6>h}}if(z)var m=1e3,v=E(function(){try{a.sheet.cssRules,E.cancel(v),a.onload()}catch(e){--m<=0&&a.onerror()}},20)}return i.promise};angular.isUndefined(h)&&(h=function(e,n,r){var a=[];angular.forEach(e,function(e){a.push(P("js",e,r))}),o.all(a).then(function(){n()},function(e){n(e)})},h.ocLazyLoadLoader=!0),angular.isUndefined(m)&&(m=function(e,n,r){var a=[];angular.forEach(e,function(e){a.push(P("css",e,r))}),o.all(a).then(function(){n()},function(e){n(e)})},m.ocLazyLoadLoader=!0),angular.isUndefined(v)&&(v=function(e,n,r){var a=[];return angular.forEach(e,function(e){var n=o.defer();a.push(n.promise),s.get(e,r).success(function(r){angular.isString(r)&&r.length>0&&angular.forEach(angular.element(r),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&u.put(e.id,e.innerHTML)}),angular.isUndefined(x.get(e))&&x.put(e,!0),n.resolve()}).error(function(r){n.reject(new Error('Unable to load template file "'+e+'": '+r))})}),o.all(a).then(function(){n()},function(e){n(e)})},v.ocLazyLoadLoader=!0);var D=function(e,n){var r=[],t=[],i=[],u=[],l=null;angular.extend(n||{},e);var s=function(e){l=x.get(e),angular.isUndefined(l)||n.cache===!1?/\.(css|less)[^\.]*$/.test(e)&&-1===r.indexOf(e)?r.push(e):/\.(htm|html)[^\.]*$/.test(e)&&-1===t.indexOf(e)?t.push(e):-1===i.indexOf(e)&&i.push(e):l&&u.push(l)};if(n.serie?s(n.files.shift()):angular.forEach(n.files,function(e){s(e)}),r.length>0){var f=o.defer();m(r,function(e){angular.isDefined(e)&&m.hasOwnProperty("ocLazyLoadLoader")?(a.error(e),f.reject(e)):f.resolve()},n),u.push(f.promise)}if(t.length>0){var c=o.defer();v(t,function(e){angular.isDefined(e)&&v.hasOwnProperty("ocLazyLoadLoader")?(a.error(e),c.reject(e)):c.resolve()},n),u.push(c.promise)}if(i.length>0){var d=o.defer();h(i,function(e){angular.isDefined(e)&&h.hasOwnProperty("ocLazyLoadLoader")?(a.error(e),d.reject(e)):d.resolve()},n),u.push(d.promise)}return n.serie&&n.files.length>0?o.all(u).then(function(){return D(e,n)}):o.all(u)};return{getModuleConfig:function(e){if(!angular.isString(e))throw new Error("You need to give the name of the module to get");return y[e]?y[e]:null},setModuleConfig:function(e){if(!angular.isObject(e))throw new Error("You need to give the module config object to set");return y[e.name]=e,e},getModules:function(){return l},isLoaded:function(e){var r=function(e){var r=l.indexOf(e)>-1;return r||(r=!!n(e)),r};if(angular.isString(e)&&(e=[e]),angular.isArray(e)){var a,t;for(a=0,t=e.length;t>a;a++)if(!r(e[a]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},load:function(u,s){var f,c,g=this,h=null,p=[],m=[],v=o.defer();if(angular.isUndefined(s)&&(s={}),angular.isArray(u))return angular.forEach(u,function(e){e&&m.push(g.load(e,s))}),o.all(m).then(function(){v.resolve(u)},function(e){v.reject(e)}),v.promise;if(f=i(u),"string"==typeof u?(h=g.getModuleConfig(u),h||(h={files:[u]},f=null)):"object"==typeof u&&(h=g.setModuleConfig(u)),null===h?(c='Module "'+f+'" is not configured, cannot load.',a.error(c),v.reject(new Error(c))):angular.isDefined(h.template)&&(angular.isUndefined(h.files)&&(h.files=[]),angular.isString(h.template)?h.files.push(h.template):angular.isArray(h.template)&&h.files.concat(h.template)),p.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},angular.isDefined(f)&&n(f)&&-1!==l.indexOf(f)&&(p.push(f),angular.isUndefined(h.files)))return v.resolve(),v.promise;var y={};angular.extend(y,s,h);var w=function O(t){var u,l,s,f,c=[];if(u=i(t),null===u)return o.when();try{l=r(u)}catch(d){var h=o.defer();return a.error(d.message),h.reject(d),h.promise}return s=e(l),angular.forEach(s,function(e){if("string"==typeof e){var r=g.getModuleConfig(e);if(null===r)return void p.push(e);e=r}return n(e.name)?void("string"!=typeof t&&(f=e.files.filter(function(n){return g.getModuleConfig(e.name).files.indexOf(n)<0}),0!==f.length&&a.warn('Module "',u,'" attempted to redefine configuration for dependency. "',e.name,'"\n Additional Files Loaded:',f),c.push(D(e.files,y).then(function(){return O(e)})))):("object"==typeof e&&(e.hasOwnProperty("name")&&e.name&&(g.setModuleConfig(e),p.push(e.name)),e.hasOwnProperty("css")&&0!==e.css.length&&angular.forEach(e.css,function(e){P("css",e,y)})),void(e.hasOwnProperty("files")&&0!==e.files.length&&e.files&&c.push(D(e,y).then(function(){return O(e)}))))}),o.all(c)};return D(h,y).then(function(){null===f?v.resolve(u):(p.push(f),w(f).then(function(){try{d=[],t(L,p,y)}catch(e){return a.error(e.message),void v.reject(e)}v.resolve(u)},function(e){v.reject(e)}))},function(e){v.reject(e)}),v.promise}}}],this.config=function(e){if(angular.isDefined(e.jsLoader)||angular.isDefined(e.asyncLoader)){if(!angular.isFunction(e.jsLoader||e.asyncLoader))throw"The js loader needs to be a function";h=e.jsLoader||e.asyncLoader}if(angular.isDefined(e.cssLoader)){if(!angular.isFunction(e.cssLoader))throw"The css loader needs to be a function";m=e.cssLoader}if(angular.isDefined(e.templatesLoader)){if(!angular.isFunction(e.templatesLoader))throw"The template loader needs to be a function";v=e.templatesLoader}angular.isDefined(e.modules)&&(angular.isArray(e.modules)?angular.forEach(e.modules,function(e){y[e.name]=e}):y[e.modules.name]=e.modules),angular.isDefined(e.debug)&&(O=e.debug),angular.isDefined(e.events)&&(j=e.events)}}]),h.directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse",function(e,n,r,a){return{restrict:"A",terminal:!0,priority:1e3,compile:function(t){var o=t[0].innerHTML;return t.html(""),function(t,i,u){var l=a(u.ocLazyLoad);t.$watch(function(){return l(t)||u.ocLazyLoad},function(a){angular.isDefined(a)&&e.load(a).then(function(){r.enter(n(o)(t),null,i)})},!0)}}}}]);var m=angular.bootstrap;angular.bootstrap=function(e,n,r){return s=n.slice(),m(e,n,r)},Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var r;if(null==this)throw new TypeError('"this" is null or not defined');var a=Object(this),t=a.length>>>0;if(0===t)return-1;var o=+n||0;if(1/0===Math.abs(o)&&(o=0),o>=t)return-1;for(r=Math.max(o>=0?o:t-Math.abs(o),0);t>r;){if(r in a&&a[r]===e)return r;r++}return-1})}(); \ No newline at end of file +!function(e,n){"use strict";var r=["ng","oc.lazyLoad"],o={},t=[],i=[],a=[],s=[],u=e.noop,c={},d=[],l=e.module("oc.lazyLoad",["ng"]);l.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(l,f,p,m,v,y){function L(n,o,t){if(o){var i,s,l,f=[];for(i=o.length-1;i>=0;i--)if(s=o[i],e.isString(s)||(s=E(s)),s&&-1===d.indexOf(s)&&(!w[s]||-1!==a.indexOf(s))){var h=-1===r.indexOf(s);if(l=g(s),h&&(r.push(s),L(n,l.requires,t)),l._runBlocks.length>0)for(c[s]=[];l._runBlocks.length>0;)c[s].push(l._runBlocks.shift());e.isDefined(c[s])&&(h||t.rerun)&&(f=f.concat(c[s])),j(n,l._invokeQueue,s,t.reconfig),j(n,l._configBlocks,s,t.reconfig),u(h?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",s),o.pop(),d.push(s)}var p=n.getInstanceInjector();e.forEach(f,function(e){p.invoke(e)})}}function $(n,r){function t(n,r){var o,t=!0;return r.length&&(o=i(n),e.forEach(r,function(e){t=t&&i(e)!==o})),t}function i(n){return e.isArray(n)?M(n.toString()):e.isObject(n)?M(S(n)):e.isDefined(n)&&null!==n?M(n.toString()):n}var a=n[2][0],s=n[1],c=!1;e.isUndefined(o[r])&&(o[r]={}),e.isUndefined(o[r][s])&&(o[r][s]={});var d=function(e,n){o[r][s].hasOwnProperty(e)||(o[r][s][e]=[]),t(n,o[r][s][e])&&(c=!0,o[r][s][e].push(n),u("ocLazyLoad.componentLoaded",[r,s,e]))};if(e.isString(a))d(a,n[2][1]);else{if(!e.isObject(a))return!1;e.forEach(a,function(n,r){e.isString(n)?d(n,a[1]):d(r,n)})}return c}function j(n,r,o,i){if(r){var a,s,u,c;for(a=0,s=r.length;s>a;a++)if(u=r[a],e.isArray(u)){if(null!==n){if(!n.hasOwnProperty(u[0]))throw new Error("unsupported provider "+u[0]);c=n[u[0]]}var d=$(u,o);if("invoke"!==u[1])d&&e.isDefined(c)&&c[u[1]].apply(c,u[2]);else{var l=function(n){var r=t.indexOf(o+"-"+n);(-1===r||i)&&(-1===r&&t.push(o+"-"+n),e.isDefined(c)&&c[u[1]].apply(c,u[2]))};if(e.isFunction(u[2][0]))l(u[2][0]);else if(e.isArray(u[2][0]))for(var f=0,h=u[2][0].length;h>f;f++)e.isFunction(u[2][0][f])&&l(u[2][0][f])}}}}function E(n){var r=null;return e.isString(n)?r=n:e.isObject(n)&&n.hasOwnProperty("name")&&e.isString(n.name)&&(r=n.name),r}function _(n){if(!e.isString(n))return!1;try{return g(n)}catch(r){if(/No module/.test(r)||r.message.indexOf("$injector:nomod")>-1)return!1}}var w={},O={$controllerProvider:l,$compileProvider:p,$filterProvider:m,$provide:f,$injector:v,$animateProvider:y},x=!1,b=!1,z=[],D={};z.push=function(e){-1===this.indexOf(e)&&Array.prototype.push.apply(this,arguments)},this.config=function(n){e.isDefined(n.modules)&&(e.isArray(n.modules)?e.forEach(n.modules,function(e){w[e.name]=e}):w[n.modules.name]=n.modules),e.isDefined(n.debug)&&(x=n.debug),e.isDefined(n.events)&&(b=n.events)},this._init=function(o){if(0===i.length){var t=[o],a=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,c=function(e){return e&&t.push(e)};e.forEach(a,function(n){a[n]=!0,c(document.getElementById(n)),n=n.replace(":","\\:"),"undefined"!=typeof o[0]&&o[0].querySelectorAll&&(e.forEach(o[0].querySelectorAll("."+n),c),e.forEach(o[0].querySelectorAll("."+n+"\\:"),c),e.forEach(o[0].querySelectorAll("["+n+"]"),c))}),e.forEach(t,function(n){if(0===i.length){var r=" "+o.className+" ",t=u.exec(r);t?i.push((t[2]||"").replace(/\s+/g,",")):e.forEach(n.attributes,function(e){0===i.length&&a[e.name]&&i.push(e.value)})}})}0!==i.length||(n.jasmine||n.mocha)&&e.isDefined(e.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var d=function l(n){if(-1===r.indexOf(n)){r.push(n);var o=e.module(n);j(null,o._invokeQueue,n),j(null,o._configBlocks,n),e.forEach(o.requires,l)}};e.forEach(i,function(e){d(e)}),i=[],s.pop()};var S=function(n){try{return JSON.stringify(n)}catch(r){var o=[];return JSON.stringify(n,function(n,r){if(e.isObject(r)&&null!==r){if(-1!==o.indexOf(r))return;o.push(r)}return r})}},M=function(e){var n,r,o,t=0;if(0==e.length)return t;for(n=0,o=e.length;o>n;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(n,t,a,c,l){function f(e){var r=l.defer();return n.error(e.message),r.reject(e),r.promise}var p,m=c("ocLazyLoad");return x||(n={},n.error=e.noop,n.warn=e.noop,n.info=e.noop),O.getInstanceInjector=function(){return p?p:p=t.data("$injector")||e.injector()},u=function(e,r){b&&a.$broadcast(e,r),x&&n.info(e,r)},{_broadcast:u,_$log:n,_getFilesCache:function(){return m},toggleWatch:function(e){e?s.push(!0):s.pop()},getModuleConfig:function(n){if(!e.isString(n))throw new Error("You need to give the name of the module to get");return w[n]?e.copy(w[n]):null},setModuleConfig:function(n){if(!e.isObject(n))throw new Error("You need to give the module config object to set");return w[n.name]=n,n},getModules:function(){return r},isLoaded:function(n){var o=function(e){var n=r.indexOf(e)>-1;return n||(n=!!_(e)),n};if(e.isString(n)&&(n=[n]),e.isArray(n)){var t,i;for(t=0,i=n.length;i>t;t++)if(!o(n[t]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:E,_getModule:function(e){try{return g(e)}catch(n){throw(/No module/.test(n)||n.message.indexOf("$injector:nomod")>-1)&&(n.message='The module "'+S(e)+'" that you are trying to load does not exist. '+n.message),n}},moduleExists:_,_loadDependencies:function(n,r){var o,t,i,a=[],s=this;if(n=s._getModuleName(n),null===n)return l.when();try{o=s._getModule(n)}catch(u){return f(u)}return t=s.getRequires(o),e.forEach(t,function(o){if(e.isString(o)){var t=s.getModuleConfig(o);if(null===t)return void z.push(o);o=t,t.name=void 0}if(s.moduleExists(o.name))return i=o.files.filter(function(e){return s.getModuleConfig(o.name).files.indexOf(e)<0}),0!==i.length&&s._$log.warn('Module "',n,'" attempted to redefine configuration for dependency. "',o.name,'"\n Additional Files Loaded:',i),e.isDefined(s.filesLoader)?void a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)})):f(new Error("Error: New dependencies need to be loaded from external files ("+o.files+"), but no loader has been defined."));if(e.isArray(o)){var u=[];e.forEach(o,function(e){var n=s.getModuleConfig(e);null===n?u.push(e):n.files&&(u=u.concat(n.files))}),u.length>0&&(o={files:u})}else e.isObject(o)&&o.hasOwnProperty("name")&&o.name&&(s.setModuleConfig(o),z.push(o.name));if(e.isDefined(o.files)&&0!==o.files.length){if(!e.isDefined(s.filesLoader))return f(new Error('Error: the module "'+o.name+'" is defined in external files ('+o.files+"), but no loader has been defined."));a.push(s.filesLoader(o,r).then(function(){return s._loadDependencies(o)}))}}),l.all(a)},inject:function(n){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],t=this,a=l.defer();if(e.isDefined(n)&&null!==n){if(e.isArray(n)){var s=[];return e.forEach(n,function(e){s.push(t.inject(e,r,o))}),l.all(s)}t._addToLoadList(t._getModuleName(n),!0,o)}if(i.length>0){var u=i.slice(),c=function f(e){z.push(e),D[e]=a.promise,t._loadDependencies(e,r).then(function(){try{d=[],L(O,z,r)}catch(e){return t._$log.error(e.message),void a.reject(e)}i.length>0?f(i.shift()):a.resolve(u)},function(e){a.reject(e)})};c(i.shift())}else{if(r&&r.name&&D[r.name])return D[r.name];a.resolve()}return a.promise},getRequires:function(n){var o=[];return e.forEach(n.requires,function(e){-1===r.indexOf(e)&&o.push(e)}),o},_invokeQueue:j,_registerInvokeList:$,_register:L,_addToLoadList:h,_unregister:function(n){e.isDefined(n)&&e.isArray(n)&&e.forEach(n,function(e){o[e]=void 0})}}}],this._init(e.element(n.document))}]);var f=e.bootstrap;e.bootstrap=function(n,l,g){return r=["ng","oc.lazyLoad"],o={},t=[],i=[],a=[],s=[],u=e.noop,c={},d=[],e.forEach(l.slice(),function(e){h(e,!0,!0)}),f(n,l,g)};var h=function(n,r,o){(s.length>0||r)&&e.isString(n)&&-1===i.indexOf(n)&&(i.push(n),o&&a.push(n))},g=e.module;e.module=function(e,n,r){return h(e,!1,!0),g(e,n,r)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(e){"use strict";e.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(n,r,o,t,i){return{restrict:"A",terminal:!0,priority:1e3,compile:function(i,a){var s=i[0].innerHTML;return i.html(""),function(i,a,u){var c=t(u.ocLazyLoad);i.$watch(function(){return c(i)||u.ocLazyLoad},function(t){e.isDefined(t)&&n.load(t).then(function(){o.enter(s,a),r(a.contents())(i)})},!0)}}}}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(n,r,o,t){var i=!1,a=!1,s=o.document.getElementsByTagName("head")[0]||o.document.getElementsByTagName("body")[0];return n.buildElement=function(u,c,d){var l,f,h=r.defer(),g=n._getFilesCache(),p=function(e){var n=(new Date).getTime();return e.indexOf("?")>=0?"&"===e.substring(0,e.length-1)?e+"_dc="+n:e+"&_dc="+n:e+"?_dc="+n};switch(e.isUndefined(g.get(c))&&g.put(c,h.promise),u){case"css":l=o.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=d.cache===!1?p(c):c;break;case"js":l=o.document.createElement("script"),l.src=d.cache===!1?p(c):c;break;default:g.remove(c),h.reject(new Error('Requested type "'+u+'" is not known. Could not inject "'+c+'"'))}l.onload=l.onreadystatechange=function(e){l.readyState&&!/^c|loade/.test(l.readyState)||f||(l.onload=l.onreadystatechange=null,f=1,n._broadcast("ocLazyLoad.fileLoaded",c),h.resolve(l))},l.onerror=function(){g.remove(c),h.reject(new Error("Unable to load "+c))},l.async=d.serie?0:1;var m=s.lastChild;if(d.insertBefore){var v=e.element(e.isDefined(window.jQuery)?d.insertBefore:document.querySelector(d.insertBefore));v&&v.length>0&&(m=v[0])}if(m.parentNode.insertBefore(l,m),"css"==u){if(!i){var y=o.navigator.userAgent.toLowerCase();if(y.indexOf("phantomjs/1.9")>-1)a=!0;else if(/iP(hone|od|ad)/.test(o.navigator.platform)){var L=o.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),$=parseFloat([parseInt(L[1],10),parseInt(L[2],10),parseInt(L[3]||0,10)].join("."));a=6>$}else if(y.indexOf("android")>-1){var j=parseFloat(y.slice(y.indexOf("android")+8));a=4.4>j}else if(y.indexOf("safari")>-1){var E=y.match(/version\/([\.\d]+)/i);a=E&&E[1]&&parseFloat(E[1])<6}}if(a)var _=1e3,w=t(function(){try{l.sheet.cssRules,t.cancel(w),l.onload()}catch(e){--_<=0&&l.onerror()}},20)}return h.promise},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.filesLoader=function(o){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=[],a=[],s=[],u=[],c=null,d=n._getFilesCache();n.toggleWatch(!0),e.extend(t,o);var l=function(r){var o,l=null;if(e.isObject(r)&&(l=r.type,r=r.path),c=d.get(r),e.isUndefined(c)||t.cache===!1){if(null!==(o=/^(css|less|html|htm|js)?(?=!)/.exec(r))&&(l=o[1],r=r.substr(o[1].length+1,r.length)),!l)if(null!==(o=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(r)))l=o[1];else{if(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!n.jsLoader.hasOwnProperty("requirejs"))return void n._$log.error("File type could not be determined. "+r);l="js"}"css"!==l&&"less"!==l||-1!==i.indexOf(r)?"html"!==l&&"htm"!==l||-1!==a.indexOf(r)?"js"===l||-1===s.indexOf(r)?s.push(r):n._$log.error("File type is not valid. "+r):a.push(r):i.push(r)}else c&&u.push(c)};if(t.serie?l(t.files.shift()):e.forEach(t.files,function(e){l(e)}),i.length>0){var f=r.defer();n.cssLoader(i,function(r){e.isDefined(r)&&n.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),f.reject(r)):f.resolve()},t),u.push(f.promise)}if(a.length>0){var h=r.defer();n.templatesLoader(a,function(r){e.isDefined(r)&&n.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(n._$log.error(r),h.reject(r)):h.resolve()},t),u.push(h.promise)}if(s.length>0){var g=r.defer();n.jsLoader(s,function(r){e.isDefined(r)&&(n.jsLoader.hasOwnProperty("ocLazyLoadLoader")||n.jsLoader.hasOwnProperty("requirejs"))?(n._$log.error(r),g.reject(r)):g.resolve()},t),u.push(g.promise)}if(0===u.length){var p=r.defer(),m="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return n._$log.error(m),p.reject(m),p.promise}return t.serie&&t.files.length>0?r.all(u).then(function(){return n.filesLoader(o,t)}):r.all(u)["finally"](function(e){return n.toggleWatch(!1),e})},n.load=function(o){var t,i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=this,s=null,u=[],c=r.defer(),d=e.copy(o),l=e.copy(i);if(e.isArray(d))return e.forEach(d,function(e){u.push(a.load(e,l))}),r.all(u).then(function(e){c.resolve(e)},function(e){c.reject(e)}),c.promise;if(e.isString(d)?(s=a.getModuleConfig(d),s||(s={files:[d]})):e.isObject(d)&&(s=e.isDefined(d.path)&&e.isDefined(d.type)?{files:[d]}:a.setModuleConfig(d)),null===s){var f=a._getModuleName(d);return t='Module "'+(f||"unknown")+'" is not configured, cannot load.',n._$log.error(t),c.reject(new Error(t)),c.promise}e.isDefined(s.template)&&(e.isUndefined(s.files)&&(s.files=[]),e.isString(s.template)?s.files.push(s.template):e.isArray(s.template)&&s.files.concat(s.template));var h=e.extend({},l,s);return e.isUndefined(s.files)&&e.isDefined(s.name)&&n.moduleExists(s.name)?n.inject(s.name,h,!0):(n.filesLoader(s,h).then(function(){n.inject(null,h).then(function(e){c.resolve(e)},function(e){c.reject(e)})},function(e){c.reject(e)}),c.promise)},n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.cssLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("css",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.cssLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$q",function(n,r){return n.jsLoader=function(o,t,i){var a=[];e.forEach(o,function(e){a.push(n.buildElement("js",e,i))}),r.all(a).then(function(){t()},function(e){t(e)})},n.jsLoader.ocLazyLoadLoader=!0,n}])}])}(angular),function(e){"use strict";e.module("oc.lazyLoad").config(["$provide",function(n){n.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(n,r,o,t){return n.templatesLoader=function(i,a,s){var u=[],c=n._getFilesCache();return e.forEach(i,function(n){var i=o.defer();u.push(i.promise),t.get(n,s).then(function(o){var t=o.data;e.isString(t)&&t.length>0&&e.forEach(e.element(t),function(e){"SCRIPT"===e.nodeName&&"text/ng-template"===e.type&&r.put(e.id,e.innerHTML)}),e.isUndefined(c.get(n))&&c.put(n,!0),i.resolve()})["catch"](function(e){i.reject(new Error('Unable to load template file "'+n+'": '+e.data))})}),o.all(u).then(function(){a()},function(e){a(e)})},n.templatesLoader.ocLazyLoadLoader=!0,n}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,n){var r;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),t=o.length>>>0;if(0===t)return-1;var i=+n||0;if(Math.abs(i)===1/0&&(i=0),i>=t)return-1;for(r=Math.max(i>=0?i:t-Math.abs(i),0);t>r;){if(r in o&&o[r]===e)return r;r++}return-1}); \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/examples/complexExample/README.md b/admin/js/plugins/oclazyload/examples/complexExample/README.md deleted file mode 100644 index dddcda42..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/README.md +++ /dev/null @@ -1 +0,0 @@ -Use `bower install` to download the libraries used in this example. \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/examples/complexExample/bower.json b/admin/js/plugins/oclazyload/examples/complexExample/bower.json deleted file mode 100644 index c4a3e9a1..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/bower.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "example-ocLazyLoad", - "version": "0.3.9", - "homepage": "https://github.com/ocombe/ocLazyLoad", - "authors": ["ocombe "], - "main": "js/app.js", - "license": "MIT", - "private": true, - "ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"], - "dependencies": { - "angular-ui-router": "~0.2.10", - "ocModal": "~0.1.6", - "bootstrap": "~3.2.0", - "angular-ui-grid": "~3.0.0-rc.12" - } -} \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/examples/complexExample/index.html b/admin/js/plugins/oclazyload/examples/complexExample/index.html deleted file mode 100644 index b6ff434b..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - -

$ocLazyLoad

-

- With ocLazyLoad you can lazy load js / css / templates with a service and/or a directive.
- If you get on error when you load the page the first time, don't forget to use `bower install` to download the libraries used in this example. -

-
- - diff --git a/admin/js/plugins/oclazyload/examples/complexExample/js/AppCtrl.js b/admin/js/plugins/oclazyload/examples/complexExample/js/AppCtrl.js deleted file mode 100644 index 57120488..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/js/AppCtrl.js +++ /dev/null @@ -1,28 +0,0 @@ -angular.module('app').controller('AppCtrl', function($scope, $ocLazyLoad) { - $scope.$on('ocLazyLoad.moduleLoaded', function(e, params) { - console.log('event module loaded', params); - }); - - $scope.$on('ocLazyLoad.componentLoaded', function(e, params) { - console.log('event component loaded', params); - }); - - $scope.$on('ocLazyLoad.fileLoaded', function(e, file) { - console.log('event file loaded', file); - }); - - $scope.loadBootstrap = function() { - // use events to know when the files are loaded - var unbind = $scope.$on('ocLazyLoad.fileLoaded', function(e, file) { - if(file === 'bower_components/bootstrap/dist/css/bootstrap.css') { - $scope.bootstrapLoaded = true; - unbind(); - } - }); - // we could use .then here instead of events - $ocLazyLoad.load([ - 'bower_components/bootstrap/dist/js/bootstrap.js', - 'bower_components/bootstrap/dist/css/bootstrap.css' - ]); - }; -}); diff --git a/admin/js/plugins/oclazyload/examples/complexExample/js/app.js b/admin/js/plugins/oclazyload/examples/complexExample/js/app.js deleted file mode 100644 index 8a206125..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/js/app.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -// Declare app level module which depends on filters, and services -var App = angular.module('app', ['ui.router', 'oc.lazyLoad']) - .config(function($stateProvider, $locationProvider, $urlRouterProvider, $ocLazyLoadProvider) { - $urlRouterProvider.otherwise("/"); - $locationProvider.hashPrefix('!'); - - // You can also load via resolve - $stateProvider - .state('index', { - url: "/", // root route - views: { - "lazyLoadView": { - controller: 'AppCtrl', // This view will use AppCtrl loaded below in the resolve - templateUrl: 'partials/main.html' - } - }, - resolve: { // Any property in resolve should return a promise and is executed before the view is loaded - loadMyCtrl: ['$ocLazyLoad', function($ocLazyLoad) { - // you can lazy load files for an existing module - return $ocLazyLoad.load({ - name: 'app', - files: ['js/AppCtrl.js'] - }); - }] - } - }) - .state('modal', { - parent: 'index', - resolve: { // Any property in resolve should return a promise and is executed before the view is loaded - loadOcModal: ['$ocLazyLoad', '$injector', '$rootScope', function($ocLazyLoad, $injector, $rootScope) { - // Load 'oc.modal' defined in the config of the provider $ocLazyLoadProvider - return $ocLazyLoad.load({ - name: 'oc.modal', - files: [ - 'bower_components/bootstrap/dist/css/bootstrap.css', // will use the cached version if you already loaded bootstrap with the button - 'bower_components/ocModal/dist/css/ocModal.animations.css', - 'bower_components/ocModal/dist/css/ocModal.light.css', - 'bower_components/ocModal/dist/ocModal.js', - 'partials/modal.html' - ] - }).then(function() { - $rootScope.bootstrapLoaded = true; - // inject the lazy loaded service - var $ocModal = $injector.get("$ocModal"); - $ocModal.open({ - url: 'modal', - cls: 'fade-in' - }); - }); - }], - - // resolve the sibling state and use the service lazy loaded - setModalBtn: ['loadOcModal', '$rootScope', '$ocModal', function(loadOcModal, $rootScope, $ocModal) { - $rootScope.openModal = function() { - $ocModal.open({ - url: 'modal', - cls: 'flip-vertical' - }); - } - }] - } - }); - - // Without server side support html5 must be disabled. - $locationProvider.html5Mode(false); - - // We configure ocLazyLoad to use the lib script.js as the async loader - $ocLazyLoadProvider.config({ - debug: true, - events: true, - modules: [{ - name: 'gridModule', - files: [ - 'js/gridModule.js' - ] - }] - }); - }); diff --git a/admin/js/plugins/oclazyload/examples/complexExample/js/gridModule.js b/admin/js/plugins/oclazyload/examples/complexExample/js/gridModule.js deleted file mode 100644 index 9ee05281..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/js/gridModule.js +++ /dev/null @@ -1,21 +0,0 @@ -// ngGrid is also lazy loaded by $ocLazyLoad thanks to the module dependency injection ! -angular.module('gridModule', [{ - name: 'ui.grid.rowEdit', files: [ - 'bower_components/angular-ui-grid/ui-grid.js', - 'bower_components/angular-ui-grid/ui-grid.css' - ] -}]).controller('GridModuleCtrl', function($scope) { - console.log('------- grid module ctrl'); - $scope.myData = [{name: "Moroni", age: 50}, - {name: "Teancum", age: 43}, - {name: "Jacob", age: 27}, - {name: "Nephi", age: 29}, - {name: "Enos", age: 34}]; - $scope.gridOptions = {data: 'myData'}; -}).config(function() { - console.warn('config gridModule'); -}).config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) { - console.warn('config 2 gridModule'); -}]).run(function() { - console.warn('run gridModule'); -}); diff --git a/admin/js/plugins/oclazyload/examples/complexExample/partials/main.html b/admin/js/plugins/oclazyload/examples/complexExample/partials/main.html deleted file mode 100644 index b1ba4132..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/partials/main.html +++ /dev/null @@ -1,22 +0,0 @@ -
-

Load external libs (not angular-based):

-

-
- -
-

Load a module by loading a state:

-

Go to "modal" state

-

-
- -
-

Autoload a complete module with dependencies and templates using the directive:

- - -
-
- {{test}}
-
-
-
-
diff --git a/admin/js/plugins/oclazyload/examples/complexExample/partials/modal.html b/admin/js/plugins/oclazyload/examples/complexExample/partials/modal.html deleted file mode 100644 index 28f1ef8a..00000000 --- a/admin/js/plugins/oclazyload/examples/complexExample/partials/modal.html +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/examples/requireJSExample/css/ng-grid.css b/admin/js/plugins/oclazyload/examples/requireJSExample/css/ng-grid.css deleted file mode 100644 index 58a6b8ae..00000000 --- a/admin/js/plugins/oclazyload/examples/requireJSExample/css/ng-grid.css +++ /dev/null @@ -1,439 +0,0 @@ -.ngGrid { - background-color: #fdfdfd; -} -.ngGrid input[type="checkbox"] { - margin: 0; - padding: 0; -} -.ngGrid input { - vertical-align: top; -} -.ngGrid.unselectable { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; -} -.ngViewport { - overflow: auto; - min-height: 20px; -} -.ngViewport:focus { - outline: none; -} -.ngCanvas { - position: relative; -} -.ngVerticalBar { - position: absolute; - right: 0; - width: 0; -} -.ngVerticalBarVisible { - width: 1px; - background-color: #d4d4d4; -} -.ngHeaderContainer { - position: relative; - overflow: hidden; - font-weight: bold; - background-color: inherit; -} -.ngHeaderCell { - position: absolute; - top: 0; - bottom: 0; - background-color: inherit; -} -.ngHeaderCell.pinned { - z-index: 1; -} -.ngHeaderSortColumn { - position: absolute; - overflow: hidden; -} -.ngTopPanel { - position: relative; - z-index: 1; - background-color: #eaeaea; - border-bottom: 1px solid #d4d4d4; -} -.ngSortButtonDown { - position: absolute; - top: 3px; - left: 0; - right: 0; - margin-left: auto; - margin-right: auto; - border-color: gray transparent; - border-style: solid; - border-width: 0 5px 5px 5px; - height: 0; - width: 0; -} -.ngNoSort { - cursor: default; -} -.ngHeaderButton { - position: absolute; - right: 2px; - top: 8px; - -moz-border-radius: 50%; - -webkit-border-radius: 50%; - border-radius: 50%; - width: 14px; - height: 14px; - z-index: 1; - background-color: #9fbbb4; - cursor: pointer; -} -.ngSortButtonUp { - position: absolute; - top: 3px; - left: 0; - right: 0; - margin-left: auto; - margin-right: auto; - border-color: gray transparent; - border-style: solid; - border-width: 5px 5px 0 5px; - height: 0; - width: 0; -} -.ngHeaderScroller { - position: absolute; - background-color: inherit; -} -.ngSortPriority { - position: absolute; - top: -5px; - left: 1px; - font-size: 6pt; - font-weight: bold; -} -.ngHeaderGrip { - cursor: col-resize; - width: 10px; - right: -5px; - top: 0; - height: 100%; - position: absolute; - background-color: transparent; -} -.ngHeaderText { - padding: 5px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - white-space: nowrap; - -ms-text-overflow: ellipsis; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - overflow: hidden; -} -.ngHeaderButtonArrow { - position: absolute; - top: 4px; - left: 3px; - width: 0; - height: 0; - border-style: solid; - border-width: 6.5px 4.5px 0 4.5px; - border-color: #4d4d4d transparent transparent transparent; -} -.ngPinnedIcon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAmElEQVQoU33PQapBURjA8UtkwJuaWYGSgfQWYBMvczPmTCzAAGVuaA228BZhRCkDGSmE31FucuRfvzq3vr5zT/JSjSU7DsypEPXDkDVn2hSIytJhw4kWGaLCxgHh2gt/RBuLzNhz5caWPjnSqqw4EraFfwznf8qklWjwy4IRTerkiQoPGtPl40OehcEJvcfXl8LglLfBJLkDcMgbgHlHhK8AAAAASUVORK5CYII=); - background-repeat: no-repeat; - position: absolute; - right: 5px; - top: 5px; - height: 10px; - width: 10px; -} -.ngUnPinnedIcon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAlElEQVQoU33PPQrCQBRF4fFnI2KfZVi5ARvdgo1l6mwmkCJVOgluwd5OwUoDtnoOxAei8cLXTN7cvEl/skCNDCMPfsUPO5zQwOHIDEvYtMURHe6wOVLgigvOePRyeDkyR4ln7wZ//7XfFBu8B23+aDJjrHGAwza7hjtHJvDmHg7b7Bru7AMjK7Rw2ObBVHDY5oGk9AKQNB2zy8MBTgAAAABJRU5ErkJggg==); - background-repeat: no-repeat; - position: absolute; - height: 10px; - width: 10px; - right: 5px; - top: 5px; -} -.ngColMenu { - right: 2px; - padding: 5px; - top: 25px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background-color: #bdd0cb; - position: absolute; - border: 2px solid #d4d4d4; - z-index: 1; -} -.ngColListCheckbox { - position: relative; - right: 3px; - top: 4px; -} -.ngColList { - list-style-type: none; -} -.ngColListItem { - position: relative; - right: 17px; - top: 2px; - white-space: nowrap; -} -.ngMenuText { - position: relative; - top: 2px; - left: 2px; -} -.ngGroupPanel { - background-color: #eaeaea; - overflow: hidden; - border-bottom: 1px solid #d4d4d4; -} -.ngGroupPanelDescription { - margin-top: 5px; - margin-left: 5px; -} -.ngGroupList { - list-style-type: none; - margin: 0; - padding: 0; -} -.ngAggHeader { - position: absolute; - border: none; -} -.ngGroupElement { - float: left; - height: 100%; - width: 100%; -} -.ngGroupIcon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAEFJREFUKFNjoAhISkr+h2J5JDZODNXGwGBsbPwfhIGAA8bGh6HaGBiAGhxAGJmND4M1gQCSM0adCsVQbcPcqQwMALWDGyDvWPefAAAAAElFTkSuQmCC); - background-repeat: no-repeat; - height: 15px; - width: 15px; - position: absolute; - right: -2px; - top: 2px; -} -.ngGroupedByIcon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAElJREFUKFNjoAhISkr+R8LyaHwMDNXGwGBsbPwfhoGAA5mPDUO1oWpE52PDYE0gALTFAYbR+dgwWBMIoPlh1I9ADNU2NPzIwAAAFQYI9E4OLvEAAAAASUVORK5CYII=); - background-repeat: no-repeat; - height: 15px; - width: 15px; - position: absolute; - right: -2px; - top: 2px; -} -.ngGroupName { - background-color: #fdfdfd; - border: 1px solid #d4d4d4; - padding: 3px 10px; - float: left; - margin-left: 0; - margin-top: 2px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - font-weight: bold; -} -.ngGroupArrow { - width: 0; - height: 0; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-left: 6px solid black; - margin-top: 10px; - margin-left: 5px; - margin-right: 5px; - float: right; -} -.ngGroupingNumber { - position: absolute; - right: -10px; - top: -2px; -} -.ngAggArrowCollapsed { - position: absolute; - left: 8px; - bottom: 10px; - width: 0; - height: 0; - border-style: solid; - border-width: 5px 0 5px 8.7px; - border-color: transparent transparent transparent #000000; -} -.ngGroupItem { - float: left; -} -.ngGroupItem:first-child { - margin-left: 2px; -} -.ngRemoveGroup { - width: 5px; - -moz-opacity: 0.4; - opacity: 0.4; - margin-top: -1px; - margin-left: 5px; -} -.ngRemoveGroup:hover { - color: black; - text-decoration: none; - cursor: pointer; - -moz-opacity: 0.7; - opacity: 0.7; -} -.ngAggArrowExpanded { - position: absolute; - left: 8px; - bottom: 10px; - width: 0; - height: 0; - border-style: solid; - border-width: 0 0 9px 9px; - border-color: transparent transparent #000000 transparent; -} -.ngAggregate { - position: absolute; - background-color: #c9dde1; - border-bottom: 1px solid beige; - overflow: hidden; - top: 0; - bottom: 0; - right: -1px; - left: 0; -} -.ngAggregateText { - position: absolute; - left: 27px; - top: 5px; - line-height: 20px; - white-space: nowrap; -} -.ngRow { - position: absolute; - border-bottom: 1px solid #d4d4d4; -} -.ngRow.odd { - background-color: #fdfdfd; -} -.ngRow.even { - background-color: #f3f3f3; -} -.ngRow.selected { - background-color: #c9dde1; -} -.ngCell { - overflow: hidden; - position: absolute; - top: 0; - bottom: 0; - background-color: inherit; -} -.ngCell.pinned { - z-index: 1; -} -.ngCellText { - padding: 5px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - white-space: nowrap; - -ms-text-overflow: ellipsis; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - overflow: hidden; -} -.ngSelectionCell { - margin-top: 9px; - margin-left: 6px; -} -.ngSelectionHeader { - position: absolute; - top: 11px; - left: 6px; -} -.ngCellElement:focus { - outline: 0; - background-color: #b3c4c7; -} -.ngRow.canSelect { - cursor: pointer; -} -.ngSelectionCheckbox { - margin-top: 9px; - margin-left: 6px; -} -.ngFooterPanel { - background-color: #eaeaea; - padding: 0; - border-top: 1px solid #d4d4d4; - position: relative; -} -.nglabel { - display: block; - float: left; - font-weight: bold; - padding-right: 5px; -} -.ngTotalSelectContainer { - float: left; - margin: 5px; - margin-top: 7px; -} -.ngFooterSelectedItems { - padding: 2px; -} -.ngFooterTotalItems.ngnoMultiSelect { - padding: 0 !important; -} -.ngPagerFirstBar { - width: 10px; - border-left: 2px solid #4d4d4d; - margin-top: -6px; - height: 12px; - margin-left: -3px; -} -.ngPagerButton { - height: 25px; - min-width: 26px; -} -.ngPagerFirstTriangle { - width: 0; - height: 0; - border-style: solid; - border-width: 5px 8.7px 5px 0; - border-color: transparent #4d4d4d transparent transparent; - margin-left: 2px; -} -.ngPagerNextTriangle { - margin-left: 1px; -} -.ngPagerPrevTriangle { - margin-left: 0; -} -.ngPagerLastTriangle { - width: 0; - height: 0; - border-style: solid; - border-width: 5px 0 5px 8.7px; - border-color: transparent transparent transparent #4d4d4d; - margin-left: -1px; -} -.ngPagerLastBar { - width: 10px; - border-left: 2px solid #4d4d4d; - margin-top: -6px; - height: 12px; - margin-left: 1px; -} -.ngFooterTotalItems { - padding: 2px; -} diff --git a/admin/js/plugins/oclazyload/examples/requireJSExample/index.html b/admin/js/plugins/oclazyload/examples/requireJSExample/index.html deleted file mode 100644 index 6257ed21..00000000 --- a/admin/js/plugins/oclazyload/examples/requireJSExample/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - {{test}} - -
- - \ No newline at end of file diff --git a/admin/js/plugins/oclazyload/examples/requireJSExample/js/angular.min.js b/admin/js/plugins/oclazyload/examples/requireJSExample/js/angular.min.js deleted file mode 100644 index 486ebaf2..00000000 --- a/admin/js/plugins/oclazyload/examples/requireJSExample/js/angular.min.js +++ /dev/null @@ -1,213 +0,0 @@ -/* - AngularJS v1.2.20 - (c) 2010-2014 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(S,U,s){'use strict';function v(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.20/"+(b?b+"/":"")+a;for(c=1;c").append(b).html();try{return 3===b[0].nodeType?I(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+I(b)})}catch(d){return I(c)}}function ac(b){try{return decodeURIComponent(b)}catch(a){}}function bc(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=ac(c[0]),B(d)&&(b=B(c[1])?ac(c[1]):!0,gb.call(a,d)?L(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))}); -return a}function Ab(b){var a=[];q(b,function(b,d){L(b)?q(b,function(b){a.push(Aa(d,!0)+(!0===b?"":"="+Aa(b,!0)))}):a.push(Aa(d,!0)+(!0===b?"":"="+Aa(b,!0)))});return a.length?a.join("&"):""}function hb(b){return Aa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Aa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Xc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f= -["ng:app","ng-app","x-ng-app","data-ng-app"],k=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(U.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=k.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function cc(b,a){var c=function(){b=x(b);if(b.injector()){var c= -b[0]===U?"document":ga(b);throw Ra("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=dc(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(S&&!d.test(S.name))return c();S.name=S.name.replace(d,"");Ta.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function ib(b,a){a=a||"_";return b.replace(Yc,function(b, -d){return(d?a:"")+b.toLowerCase()})}function Bb(b,a,c){if(!b)throw Ra("areq",a||"?",c||"required");return b}function Ua(b,a,c){c&&L(b)&&(b=b[b.length-1]);Bb(O(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ba(b,a){if("hasOwnProperty"===b)throw Ra("badname",a);}function ec(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f "+e[1]+a.replace(me,"<$1>")+e[2];d.removeChild(d.firstChild);for(a=e[0];a--;)d=d.lastChild;a=0;for(e=d.childNodes.length;a=P?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ja(b,a){var c=typeof b,d;"function"==c||"object"==c&&null!==b?"function"==typeof(d= -b.$$hashKey)?d=b.$$hashKey():d===s&&(d=b.$$hashKey=(a||eb)()):d=b;return c+":"+d}function Za(b,a){if(a){var c=0;this.nextUid=function(){return++c}}q(b,this.put,this)}function rc(b){var a,c;"function"===typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(pe,""),c=c.match(qe),q(c[1].split(re),function(b){b.replace(se,function(b,c,d){a.push(d)})})),b.$inject=a):L(b)?(c=b.length-1,Ua(b[c],"fn"),a=b.slice(0,c)):Ua(b,"fn",!0);return a}function dc(b){function a(a){return function(b,c){if(T(b))q(b, -Wb(a));else return a(b,c)}}function c(a,b){Ba(a,"service");if(O(b)||L(b))b=p.instantiate(b);if(!b.$get)throw $a("pget",a);return l[a+k]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,g,k;q(a,function(a){if(!h.get(a)){h.put(a,!0);try{if(y(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,g=0,k=d.length;g 4096 bytes)!"));else{if(m.cookie!==ea)for(ea=m.cookie, -d=ea.split("; "),M={},g=0;gh&&this.remove(n.key),b},get:function(a){if(h").parent()[0])});var g=N(a,b,a,c,d,e);da(a,"ng-scope");return function(b,c,d,e){Bb(b,"scope");var f=c?Ka.clone.call(a):a;q(d,function(a,b){f.data("$"+b+"Controller",a)});d=0;for(var m=f.length;d -arguments.length&&(b=a,a=s);Da&&(c=ea);return n(a,b,c)}var u,Q,z,D,X,C,ea={},nb;u=c===g?d:ka(d,new Kb(x(g),d.$attr));Q=u.$$element;if(M){var ca=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=x(g);C=e.$new(!0);!H||H!==M&&H!==M.$$originalDirective?f.data("$isolateScopeNoTemplate",C):f.data("$isolateScope",C);da(f,"ng-isolate-scope");q(M.scope,function(a,c){var d=a.match(ca)||[],g=d[3]||c,f="?"==d[2],d=d[1],m,l,p,n;C.$$isolateBindings[c]=d+g;switch(d){case "@":u.$observe(g,function(a){C[c]=a});u.$$observers[g].$$scope= -e;u[g]&&(C[c]=b(u[g])(e));break;case "=":if(f&&!u[g])break;l=r(u[g]);n=l.literal?ya:function(a,b){return a===b};p=l.assign||function(){m=C[c]=l(e);throw ha("nonassign",u[g],M.name);};m=C[c]=l(e);C.$watch(function(){var a=l(e);n(a,C[c])||(n(a,m)?p(e,a=C[c]):C[c]=a);return m=a},null,l.literal);break;case "&":l=r(u[g]);C[c]=function(a){return l(e,a)};break;default:throw ha("iscp",M.name,c,a);}})}nb=n&&w;N&&q(N,function(a){var b={$scope:a===M||a.$$isolateScope?C:e,$element:Q,$attrs:u,$transclude:nb}, -c;X=a.controller;"@"==X&&(X=u[a.name]);c=t(X,b);ea[a.name]=c;Da||Q.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(z=m.length;fG.priority)break;if(W=G.scope)X=X||G,G.templateUrl||(I("new/isolated scope",M,G,v),T(W)&&(M=G));na=G.name;!G.templateUrl&&G.controller&&(W=G.controller,N=N||{},I("'"+na+"' controller",N[na],G,v),N[na]=G);if(W=G.transclude)F= -!0,G.$$tlb||(I("transclusion",ca,G,v),ca=G),"element"==W?(Da=!0,u=G.priority,W=C(c,V,Y),v=d.$$element=x(U.createComment(" "+na+": "+d[na]+" ")),c=v[0],ob(g,x(za.call(W,0)),c),S=z(W,e,u,f&&f.name,{nonTlbTranscludeDirective:ca})):(W=x(Ib(c)).contents(),v.empty(),S=z(W,e));if(G.template)if(E=!0,I("template",H,G,v),H=G,W=O(G.template)?G.template(v,d):G.template,W=Z(W),G.replace){f=G;W=Gb.test(W)?x(aa(W)):[];c=W[0];if(1!=W.length||1!==c.nodeType)throw ha("tplrt",na,"");ob(g,v,c);oa={$attr:{}};W=ea(c,[], -oa);var $=a.splice(P+1,a.length-(P+1));M&&sc(W);a=a.concat(W).concat($);B(d,oa);oa=a.length}else v.html(W);if(G.templateUrl)E=!0,I("template",H,G,v),H=G,G.replace&&(f=G),K=A(a.splice(P,a.length-P),v,d,g,F&&S,m,p,{controllerDirectives:N,newIsolateScopeDirective:M,templateDirective:H,nonTlbTranscludeDirective:ca}),oa=a.length;else if(G.compile)try{R=G.compile(v,d,S),O(R)?w(null,R,V,Y):R&&w(R.pre,R.post,V,Y)}catch(ba){l(ba,ga(v))}G.terminal&&(K.terminal=!0,u=Math.max(u,G.priority))}K.scope=X&&!0===X.scope; -K.transcludeOnThisElement=F;K.templateOnThisElement=E;K.transclude=S;n.hasElementTranscludeDirective=Da;return K}function sc(a){for(var b=0,c=a.length;bn.priority)&&-1!=n.restrict.indexOf(g)&&(r&&(n=Yb(n,{$$start:r,$$end:p})),b.push(n),h=n)}catch(J){l(J)}}return h}function B(a,b){var c=b.$attr,d=a.$attr,e=a.$$element; -q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(da(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function A(a,b,c,d,e,g,f,m){var h=[],l,r,t=b[0],w=a.shift(),J=E({},w,{templateUrl:null,transclude:null,replace:null,$$originalDirective:w}),K=O(w.templateUrl)?w.templateUrl(b, -c):w.templateUrl;b.empty();p.get(u.getTrustedResourceUrl(K),{cache:n}).success(function(p){var n,u;p=Z(p);if(w.replace){p=Gb.test(p)?x(aa(p)):[];n=p[0];if(1!=p.length||1!==n.nodeType)throw ha("tplrt",w.name,K);p={$attr:{}};ob(d,b,n);var z=ea(n,[],p);T(w.scope)&&sc(z);a=z.concat(a);B(c,p)}else n=t,b.html(p);a.unshift(J);l=H(a,n,c,e,b,w,g,f,m);q(d,function(a,c){a==n&&(d[c]=b[0])});for(r=N(b[0].childNodes,e);h.length;){p=h.shift();u=h.shift();var D=h.shift(),X=h.shift(),z=b[0];if(u!==t){var C=u.className; -m.hasElementTranscludeDirective&&w.replace||(z=Ib(n));ob(D,x(u),z);da(x(z),C)}u=l.transcludeOnThisElement?M(p,l.transclude,X):X;l(r,p,z,d,u)}h=null}).error(function(a,b,c,d){throw ha("tpload",d.url);});return function(a,b,c,d,e){a=e;h?(h.push(b),h.push(c),h.push(d),h.push(a)):(l.transcludeOnThisElement&&(a=M(b,l.transclude,e)),l(r,b,c,d,a))}}function F(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.namea.status?d:p.reject(d)}var c={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},d=function(a){var b=e.headers,c=E({},a.headers),d,g,b=E({},b.common,b[I(a.method)]); -a:for(d in b){a=I(d);for(g in c)if(I(g)===a)continue a;c[d]=b[d]}(function(a){var b;q(a,function(c,d){O(c)&&(b=c(),null!=b?a[d]=b:delete a[d])})})(c);return c}(a);E(c,a);c.headers=d;c.method=Ha(c.method);var g=[function(a){d=a.headers;var c=xc(a.data,wc(d),a.transformRequest);F(c)&&q(d,function(a,b){"content-type"===I(b)&&delete d[b]});F(a.withCredentials)&&!F(e.withCredentials)&&(a.withCredentials=e.withCredentials);return t(a,c,d).then(b,b)},s],f=p.when(c);for(q(u,function(a){(a.request||a.requestError)&& -g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){a=g.shift();var m=g.shift(),f=f.then(a,m)}f.success=function(a){f.then(function(b){a(b.data,b.status,b.headers,c)});return f};f.error=function(a){f.then(null,function(b){a(b.data,b.status,b.headers,c)});return f};return f}function t(c,g,f){function h(a,b,c,e){D&&(200<=a&&300>a?D.put(x,[a,b,vc(c),e]):D.remove(x));n(b,a,c,e);d.$$phase||d.$apply()}function n(a,b,d,e){b=Math.max(b,0);(200<= -b&&300>b?u.resolve:u.reject)({data:a,status:b,headers:wc(d),config:c,statusText:e})}function t(){var a=Pa(r.pendingRequests,c);-1!==a&&r.pendingRequests.splice(a,1)}var u=p.defer(),q=u.promise,D,H,x=J(c.url,c.params);r.pendingRequests.push(c);q.then(t,t);(c.cache||e.cache)&&(!1!==c.cache&&"GET"==c.method)&&(D=T(c.cache)?c.cache:T(e.cache)?e.cache:w);if(D)if(H=D.get(x),B(H)){if(H.then)return H.then(t,t),H;L(H)?n(H[1],H[0],ka(H[2]),H[3]):n(H,200,{},"OK")}else D.put(x,q);F(H)&&((H=Lb(c.url)?b.cookies()[c.xsrfCookieName|| -e.xsrfCookieName]:s)&&(f[c.xsrfHeaderName||e.xsrfHeaderName]=H),a(c.method,x,g,h,f,c.timeout,c.withCredentials,c.responseType));return q}function J(a,b){if(!b)return a;var c=[];Tc(b,function(a,b){null===a||F(a)||(L(a)||(a=[a]),q(a,function(a){T(a)&&(a=sa(a));c.push(Aa(b)+"="+Aa(a))}))});0=P&&(!b.match(/^(get|post|head|put|delete|options)$/i)||!S.XMLHttpRequest))return new S.ActiveXObject("Microsoft.XMLHTTP");if(S.XMLHttpRequest)return new S.XMLHttpRequest; -throw v("$httpBackend")("noxhr");}function Vd(){this.$get=["$browser","$window","$document",function(b,a,c){return we(b,ve,b.defer,a.angular.callbacks,c[0])}]}function we(b,a,c,d,e){function g(a,b,c){var g=e.createElement("script"),f=null;g.type="text/javascript";g.src=a;g.async=!0;f=function(a){Xa(g,"load",f);Xa(g,"error",f);e.body.removeChild(g);g=null;var k=-1,t="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),t=a.type,k="error"===a.type?404:200);c&&c(k,t)};pb(g,"load",f);pb(g,"error", -f);8>=P&&(g.onreadystatechange=function(){y(g.readyState)&&/loaded|complete/.test(g.readyState)&&(g.onreadystatechange=null,f({type:"load"}))});e.body.appendChild(g);return f}var f=-1;return function(e,m,h,l,p,n,r,t){function J(){u=f;X&&X();z&&z.abort()}function w(a,d,e,g,f){N&&c.cancel(N);X=z=null;0===d&&(d=e?200:"file"==ta(m).protocol?404:0);a(1223===d?204:d,e,g,f||"");b.$$completeOutstandingRequest(A)}var u;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==I(e)){var K="_"+(d.counter++).toString(36); -d[K]=function(a){d[K].data=a;d[K].called=!0};var X=g(m.replace("JSON_CALLBACK","angular.callbacks."+K),K,function(a,b){w(l,a,d[K].data,"",b);d[K]=A})}else{var z=a(e);z.open(e,m,!0);q(p,function(a,b){B(a)&&z.setRequestHeader(b,a)});z.onreadystatechange=function(){if(z&&4==z.readyState){var a=null,b=null,c="";u!==f&&(a=z.getAllResponseHeaders(),b="response"in z?z.response:z.responseText);u===f&&10>P||(c=z.statusText);w(l,u||z.status,b,a,c)}};r&&(z.withCredentials=!0);if(t)try{z.responseType=t}catch(da){if("json"!== -t)throw da;}z.send(h||null)}if(0=k&&(p.resolve(r),l(n.$$intervalId),delete e[n.$$intervalId]);t||b.$apply()},f);e[n.$$intervalId]=p;return n}var e={};d.cancel=function(b){return b&&b.$$intervalId in e?(e[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete e[b.$$intervalId], -!0):!1};return d}]}function bd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), -DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function Mb(b){b=b.split("/");for(var a=b.length;a--;)b[a]=hb(b[a]);return b.join("/")}function zc(b,a,c){b=ta(b,c);a.$$protocol= -b.protocol;a.$$host=b.hostname;a.$$port=Z(b.port)||xe[b.protocol]||null}function Ac(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ta(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=bc(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function pa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function ab(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Nb(b){return b.substr(0, -ab(b).lastIndexOf("/")+1)}function Bc(b,a){this.$$html5=!0;a=a||"";var c=Nb(b);zc(b,this,b);this.$$parse=function(a){var e=pa(c,a);if(!y(e))throw Ob("ipthprfx",a,c);Ac(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Ab(this.$$search),b=this.$$hash?"#"+hb(this.$$hash):"";this.$$url=Mb(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;if((e=pa(b,d))!==s)return d=e,(e=pa(a,e))!==s?c+(pa("/",e)||e):b+d;if((e=pa(c, -d))!==s)return c+e;if(c==d+"/")return c}}function Pb(b,a){var c=Nb(b);zc(b,this,b);this.$$parse=function(d){var e=pa(b,d)||pa(c,d),e="#"==e.charAt(0)?pa(a,e):this.$$html5?e:"";if(!y(e))throw Ob("ihshprfx",d,a);Ac(e,this,b);d=this.$$path;var g=/^\/[A-Z]:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Ab(this.$$search),e=this.$$hash?"#"+hb(this.$$hash):"";this.$$url=Mb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl= -b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(ab(b)==ab(a))return a}}function Qb(b,a){this.$$html5=!0;Pb.apply(this,arguments);var c=Nb(b);this.$$rewrite=function(d){var e;if(b==ab(d))return d;if(e=pa(c,d))return b+a+e;if(c===d+"/")return c};this.$$compose=function(){var c=Ab(this.$$search),e=this.$$hash?"#"+hb(this.$$hash):"";this.$$url=Mb(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+a+this.$$url}}function qb(b){return function(){return this[b]}}function Cc(b,a){return function(c){if(F(c))return this[b]; -this[b]=a(c);this.$$compose();return this}}function Wd(){var b="",a=!1;this.hashPrefix=function(a){return B(a)?(b=a,this):b};this.html5Mode=function(b){return B(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",k.absUrl(),a)}var k,m,h=d.baseHref(),l=d.url(),p;a?(p=l.substring(0,l.indexOf("/",l.indexOf("//")+2))+(h||"/"),m=e.history?Bc:Qb):(p=ab(l),m=Pb);k=new m(p,"#"+b);k.$$parse(k.$$rewrite(l));g.on("click", -function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var e=x(a.target);"a"!==I(e[0].nodeName);)if(e[0]===g[0]||!(e=e.parent())[0])return;var f=e.prop("href");T(f)&&"[object SVGAnimatedString]"===f.toString()&&(f=ta(f.animVal).href);if(m===Qb){var h=e.attr("href")||e.attr("xlink:href");if(0>h.indexOf("://"))if(f="#"+b,"/"==h[0])f=p+f+h;else if("#"==h[0])f=p+f+(k.path()||"/")+h;else{for(var l=k.path().split("/"),h=h.split("/"),n=0;ne?Dc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,k;do k=Dc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=s,b=k;while(fa)for(b in h++,e)e.hasOwnProperty(b)&& -!d.hasOwnProperty(b)&&(q--,delete e[b])}else e!==d&&(e=d,h++);return h},function(){p?(p=!1,b(d,d,c)):b(d,f,c);if(k)if(T(d))if(db(d)){f=Array(d.length);for(var a=0;as&&(x=4-s,M[x]||(M[x]=[]),C=O(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,C+="; newVal: "+sa(g)+"; oldVal: "+sa(f),M[x].push(C));else if(d===c){z=!1;break a}}catch(B){n.$$phase=null,e(B)}if(!(k=N.$$childHead||N!==this&&N.$$nextSibling))for(;N!==this&&!(k=N.$$nextSibling);)N=N.$parent}while(N=k);if((z|| -h.length)&&!s--)throw n.$$phase=null,a("infdig",b,sa(M));}while(z||h.length);for(n.$$phase=null;l.length;)try{l.shift()()}catch(v){e(v)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==n&&(q(this.$$listenerCount,zb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$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=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=A,this.$on=this.$watch=function(){return A})}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){n.$$phase||n.$$asyncQueue.length||f.defer(function(){n.$$asyncQueue.length&&n.$digest()});this.$$asyncQueue.push({scope:this, -expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{n.$$phase=null;try{n.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[Pa(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,g=this,f=!1,k={name:a, -targetScope:g,stopPropagation:function(){f=!0},preventDefault:function(){k.defaultPrevented=!0},defaultPrevented:!1},h=[k].concat(za.call(arguments,1)),m,l;do{d=g.$$listeners[a]||c;k.currentScope=g;m=0;for(l=d.length;mc.msieDocumentMode)throw va("iequirks");var e=ka(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Fa);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs,f=e.getTrusted,k=e.trustAs;q(fa,function(a,b){var c=I(b);e[Wa("parse_as_"+c)]= -function(b){return g(a,b)};e[Wa("get_trusted_"+c)]=function(b){return f(a,b)};e[Wa("trust_as_"+c)]=function(b){return k(a,b)}});return e}]}function ce(){this.$get=["$window","$document",function(b,a){var c={},d=Z((/android (\d+)/.exec(I((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,k,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,h=g.body&&g.body.style,l=!1,p=!1;if(h){for(var n in h)if(l=m.exec(n)){k=l[0];k=k.substr(0,1).toUpperCase()+k.substr(1); -break}k||(k="WebkitOpacity"in h&&"webkit");l=!!("transition"in h||k+"Transition"in h);p=!!("animation"in h||k+"Animation"in h);!d||l&&p||(l=y(g.body.style.webkitTransition),p=y(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7b;b=Math.abs(b);var f=b+"",k="",m=[],h=!1;if(-1!==f.indexOf("e")){var l=f.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?(f="0",b=0):(k=f,h=!0)}if(h)0b)&&(k=b.toFixed(e));else{f=(f.split(Nc)[1]||"").length;F(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac)); -b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);b=(""+b).split(Nc);f=b[0];b=b[1]||"";var l=0,p=a.lgSize,n=a.gSize;if(f.length>=p+n)for(l=f.length-p,h=0;hb&&(d="-",b=-b);for(b=""+b;b.length-c)e+=c;0===e&&-12==c&&(e=12);return Tb(e,a,d)}}function sb(b,a){return function(c,d){var e=c["get"+b](),g=Ha(a?"SHORT"+b:b);return d[g][e]}}function Jc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var g=0,f=0,k=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=Z(b[9]+b[10]),f=Z(b[9]+b[11]));k.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));g=Z(b[4]||0)-g;f=Z(b[5]||0)- -f;k=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,g,f,k,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",f=[],k,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;y(c)&&(c=Fe.test(c)?Z(c):a(c));yb(c)&&(c=new Date(c));if(!Oa(c))return c;for(;e;)(m=Ge.exec(e))?(f=f.concat(za.call(m,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){k=He[a];g+=k?k(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g, -"").replace(/''/g,"'")});return g}}function Be(){return function(b){return sa(b,!0)}}function Ce(){return function(b,a){if(!L(b)&&!y(b))return b;a=Infinity===Math.abs(Number(a))?Number(a):Z(a);if(y(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0a||37<=a&&40>=a)||n()});if(e.hasEvent("paste"))a.on("paste cut",n)}a.on("change",l);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var r=c.ngPattern;r&&((e=r.match(/^\/(.*)\/([gim]*)$/))?(r=RegExp(e[1],e[2]),e=function(a){return ra(d,"pattern",d.$isEmpty(a)||r.test(a),a)}):e=function(c){var e=b.$eval(r);if(!e||!e.test)throw v("ngPattern")("noregexp",r,e,ga(a));return ra(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var t= -Z(c.ngMinlength);e=function(a){return ra(d,"minlength",d.$isEmpty(a)||a.length>=t,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var q=Z(c.ngMaxlength);e=function(a){return ra(d,"maxlength",d.$isEmpty(a)||a.length<=q,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Ub(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;dP?function(b){b=b.nodeName?b:b[0];return b.scopeName&& -"HTML"!=b.scopeName?Ha(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Yc=/[A-Z]/g,ad={full:"1.2.20",major:1,minor:2,dot:20,codeName:"accidental-beautification"};R.expando="ng339";var Ya=R.cache={},ne=1,pb=S.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Xa=S.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};R._data= -function(b){return this.cache[b[this.expando]]||{}};var ie=/([\:\-\_]+(.))/g,je=/^moz([A-Z])/,Fb=v("jqLite"),ke=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Gb=/<|&#?\w+;/,le=/<([\w:]+)/,me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]}; -ba.optgroup=ba.option;ba.tbody=ba.tfoot=ba.colgroup=ba.caption=ba.thead;ba.th=ba.td;var Ka=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===U.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(S).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?x(this[b]):x(this[this.length+b])},length:0,push:Ke,sort:[].sort,splice:[].splice},mb={};q("multiple selected checked disabled readOnly required open".split(" "), -function(b){mb[I(b)]=b});var qc={};q("input select option textarea button form details".split(" "),function(b){qc[Ha(b)]=!0});q({data:mc,inheritedData:lb,scope:function(b){return x(b).data("$scope")||lb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return x(b).data("$isolateScope")||x(b).data("$isolateScopeNoTemplate")},controller:nc,injector:function(b){return lb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Jb,css:function(b,a,c){a=Wa(a);if(B(c))b.style[a]= -c;else{var d;8>=P&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=P&&(d=""===d?s:d);return d}},attr:function(b,a,c){var d=I(a);if(mb[d])if(B(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||A).specified?d:s;else if(B(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?s:b},prop:function(b,a,c){if(B(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType]; -if(F(d))return e?b[e]:"";b[e]=d}var a=[];9>P?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(F(a)){if("SELECT"===La(b)&&b.multiple){var c=[];q(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(F(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a, -c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Pe={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Sb=function(a){this.options=a};Sb.prototype={constructor:Sb,lex:function(a){this.text=a;this.index=0;this.ch= -s;this.lastCh=":";for(this.tokens=[];this.index=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=B(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ia("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(), -c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(bb.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=Ec(d,this.options,this.text);return E(function(c, -d,k){return e(k||a(c,d))},{assign:function(e,f,k){return rb(a(e,k),d,f,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return E(function(e,g){var f=a(e,g),k=d(e,g),m;qa(k,c.text);if(!f)return s;(f=Ma(f[k],c.text))&&(f.then&&c.options.unwrapPromises)&&(m=f,"$$v"in f||(m.$$v=s,m.then(function(a){m.$$v=a})),f=f.$$v);return f},{assign:function(e,g,f){var k=d(e,f);return Ma(a(e,f),c.text)[k]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression()); -while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var k=[],m=c?c(g,f):g,h=0;ha.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Tb(Math[0=P&&(c.href||c.name||c.$set("href", -""),a.append(U.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var g="[object SVGAnimatedString]"===xa.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(g)||a.preventDefault()})}}}),Db={};q(mb,function(a,c){if("multiple"!=a){var d=ma("ng-"+c);Db[d]=function(){return{priority:100,link:function(a,g,f){a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}});q(["src","srcset","href"],function(a){var c=ma("ng-"+a);Db[c]=function(){return{priority:99,link:function(d, -e,g){var f=a,k=a;"href"===a&&"[object SVGAnimatedString]"===xa.call(e.prop("href"))&&(k="xlinkHref",g.$attr[k]="xlink:href",f=null);g.$observe(c,function(a){a&&(g.$set(k,a),P&&f&&e.prop(f,g[k]))})}}}});var vb={$addControl:A,$removeControl:A,$setValidity:A,$setDirty:A,$setPristine:A};Oc.$inject=["$element","$attrs","$scope","$animate"];var Rc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Oc,compile:function(){return{pre:function(a,e,g,f){if(!g.action){var k= -function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};pb(e[0],"submit",k);e.on("$destroy",function(){c(function(){Xa(e[0],"submit",k)},0,!1)})}var m=e.parent().controller("form"),h=g.name||g.ngForm;h&&rb(a,h,f,h);if(m)e.on("$destroy",function(){m.$removeControl(f);h&&rb(a,h,s,h);E(f,vb)})}}}}}]},ed=Rc(),rd=Rc(!0),Qe=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Re=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i, -Se=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sc={text:xb,number:function(a,c,d,e,g,f){xb(a,c,d,e,g,f);e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||Se.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return s});Ie(e,"number",Te,null,e.$$validityState);e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return ra(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&& -(a=function(a){var c=parseFloat(d.max);return ra(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return ra(e,"number",e.$isEmpty(a)||yb(a),a)})},url:function(a,c,d,e,g,f){xb(a,c,d,e,g,f);a=function(a){return ra(e,"url",e.$isEmpty(a)||Qe.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){xb(a,c,d,e,g,f);a=function(a){return ra(e,"email",e.$isEmpty(a)||Re.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a, -c,d,e){F(d.name)&&c.attr("name",eb());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;y(g)||(g=!0);y(f)||(f=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==g};e.$formatters.push(function(a){return a=== -g});e.$parsers.push(function(a){return a?g:f})},hidden:A,button:A,submit:A,reset:A,file:A},Te=["badInput"],gc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,f){f&&(Sc[I(g.type)]||Sc.text)(d,e,g,f,c,a)}}}],ub="ng-valid",tb="ng-invalid",Na="ng-pristine",wb="ng-dirty",Ue=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(a,c,d,e,g,f){function k(a,c){c=c?"-"+ib(c,"-"):"";f.removeClass(e,(a?tb:ub)+c);f.addClass(e,(a?ub:tb)+c)} -this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var m=g(d.ngModel),h=m.assign;if(!h)throw v("ngModel")("nonassign",d.ngModel,ga(e));this.$render=A;this.$isEmpty=function(a){return F(a)||""===a||null===a||a!==a};var l=e.inheritedData("$formController")||vb,p=0,n=this.$error={};e.addClass(Na);k(!0);this.$setValidity=function(a,c){n[a]!==!c&&(c?(n[a]&&p--,p|| -(k(!0),this.$valid=!0,this.$invalid=!1)):(k(!1),this.$invalid=!0,this.$valid=!1,p++),n[a]=!c,k(c,a),l.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;f.removeClass(e,wb);f.addClass(e,Na)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,f.removeClass(e,Na),f.addClass(e,wb),l.$setDirty());q(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,h(a,d),q(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))}; -var r=this;a.$watch(function(){var c=m(a);if(r.$modelValue!==c){var d=r.$formatters,e=d.length;for(r.$modelValue=c;e--;)c=d[e](c);r.$viewValue!==c&&(r.$viewValue=c,r.$render())}return c})}],Gd=function(){return{require:["ngModel","^?form"],controller:Ue,link:function(a,c,d,e){var g=e[0],f=e[1]||vb;f.$addControl(g);a.$on("$destroy",function(){f.$removeControl(g)})}}},Id=$({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),hc=function(){return{require:"?ngModel", -link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},Hd=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!F(a)){var c=[];a&&q(a.split(g),function(a){a&&c.push(aa(a))});return c}});e.$formatters.push(function(a){return L(a)? -a.join(", "):s});e.$isEmpty=function(a){return!a||!a.length}}}},Ve=/^(true|false|\d+)$/,Jd=function(){return{priority:100,compile:function(a,c){return Ve.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a)})}}}},jd=wa({compile:function(a){a.addClass("ng-binding");return function(a,d,e){d.data("$binding",e.ngBind);a.$watch(e.ngBind,function(a){d.text(a==s?"":a)})}}}),ld=["$interpolate",function(a){return function(c,d, -e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],kd=["$sce","$parse",function(a,c){return function(d,e,g){e.addClass("ng-binding").data("$binding",g.ngBindHtml);var f=c(g.ngBindHtml);d.$watch(function(){return(f(d)||"").toString()},function(c){e.html(a.getTrustedHtml(f(d))||"")})}}],md=Ub("",!0),od=Ub("Odd",0),nd=Ub("Even",1),pd=wa({compile:function(a,c){c.$set("ngCloak",s);a.removeClass("ng-cloak")}}),qd=[function(){return{scope:!0, -controller:"@",priority:500}}],ic={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ma("ng-"+a);ic[c]=["$parse",function(d){return{compile:function(e,g){var f=d(g[c]);return function(c,d){d.on(I(a),function(a){c.$apply(function(){f(c,{$event:a})})})}}}}]});var td=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c, -d,e,g,f){var k,m,h;c.$watch(e.ngIf,function(g){Sa(g)?m||(m=c.$new(),f(m,function(c){c[c.length++]=U.createComment(" end ngIf: "+e.ngIf+" ");k={clone:c};a.enter(c,d.parent(),d)})):(h&&(h.remove(),h=null),m&&(m.$destroy(),m=null),k&&(h=Cb(k.clone),a.leave(h,function(){h=null}),k=null))})}}}],ud=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,g){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ta.noop,compile:function(f,k){var m=k.ngInclude|| -k.src,h=k.onload||"",l=k.autoscroll;return function(f,k,q,t,J){var w=0,u,x,s,z=function(){x&&(x.remove(),x=null);u&&(u.$destroy(),u=null);s&&(e.leave(s,function(){x=null}),x=s,s=null)};f.$watch(g.parseAsResourceUrl(m),function(g){var m=function(){!B(l)||l&&!f.$eval(l)||d()},q=++w;g?(a.get(g,{cache:c}).success(function(a){if(q===w){var c=f.$new();t.template=a;a=J(c,function(a){z();e.enter(a,null,k,m)});u=c;s=a;u.$emit("$includeContentLoaded");f.$eval(h)}}).error(function(){q===w&&z()}),f.$emit("$includeContentRequested")): -(z(),t.template=null)})}}}}],Kd=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,g){d.html(g.template);a(d.contents())(c)}}}],vd=wa({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),wd=wa({terminal:!0,priority:1E3}),xd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,f){var k=f.count,m=f.$attr.when&&g.attr(f.$attr.when),h=f.offset||0,l=e.$eval(m)||{},p={},n=c.startSymbol(), -r=c.endSymbol(),t=/^when(Minus)?(.+)$/;q(f,function(a,c){t.test(c)&&(l[I(c.replace("when","").replace("Minus","-"))]=g.attr(f.$attr[c]))});q(l,function(a,e){p[e]=c(a.replace(d,n+k+"-"+h+r))});e.$watch(function(){var c=parseFloat(e.$eval(k));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-h));return p[c](e,g,!0)},function(a){g.text(a)})}}}],yd=["$parse","$animate",function(a,c){var d=v("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,g,f,k,m){var h=f.ngRepeat, -l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),p,n,r,t,s,w,u={$id:Ja};if(!l)throw d("iexp",h);f=l[1];k=l[2];(l=l[3])?(p=a(l),n=function(a,c,d){w&&(u[w]=a);u[s]=c;u.$index=d;return p(e,u)}):(r=function(a,c){return Ja(c)},t=function(a){return a});l=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",f);s=l[3]||l[1];w=l[2];var B={};e.$watchCollection(k,function(a){var f,k,l=g[0],p,u={},C,D,H,v,y,A,F=[];if(db(a))y=a,p=n||r;else{p=n||t;y=[]; -for(H in a)a.hasOwnProperty(H)&&"$"!=H.charAt(0)&&y.push(H);y.sort()}C=y.length;k=F.length=y.length;for(f=0;fC;)z.pop().element.remove()}for(;y.length>Q;)y.pop()[0].element.remove()}var h;if(!(h=t.match(d)))throw We("iexp",t,ga(f));var l=c(h[2]||h[1]),m=h[4]||h[6],n=h[5],p=c(h[3]||""),q=c(h[2]?h[1]:m),x=c(h[7]), -w=h[8]?c(h[8]):null,y=[[{element:f,label:""}]];v&&(a(v)(e),v.removeClass("ng-scope"),v.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=x(e)||[],d={},h,k,l,p,t,u,v;if(r)for(k=[],p=0,u=y.length;p@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-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}.ng-hide-add-active,.ng-hide-remove{display:block!important;}'); -//# sourceMappingURL=angular.min.js.map diff --git a/admin/js/plugins/oclazyload/examples/requireJSExample/js/jquery.js b/admin/js/plugins/oclazyload/examples/requireJSExample/js/jquery.js deleted file mode 100644 index 2810421e..00000000 --- a/admin/js/plugins/oclazyload/examples/requireJSExample/js/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; - if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("