From 813d8d45c7a6a60674f0f63221d7fd28bd1e088b Mon Sep 17 00:00:00 2001 From: Alex Nitta Date: Thu, 26 May 2016 11:31:02 -0700 Subject: [PATCH 01/12] (fix) Update server.js to run on deployed production site --- server/server.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/server/server.js b/server/server.js index cd87c4a..2c64483 100644 --- a/server/server.js +++ b/server/server.js @@ -5,14 +5,14 @@ var morgan = require('morgan'); var app = module.exports = express(); var logger = require('./config/logger.js'); var passport = require('passport'); - +var https = require('https'); var poiRouter = require('./routers/poiRouter.js'); var userRouter = require('./routers/userRouter.js'); var routeRouter = require('./routers/routeRouter.js'); // configuration variables for server port and mongodb URI -var port = process.env.PORT || 3000; +var port = process.env.PORT || 443; var dbUri = process.env.MONGOLAB_URI || 'mongodb://localhost/app_database'; var env = process.env.NODE_ENV || 'production'; @@ -22,8 +22,6 @@ mongoose.connect(dbUri); app.use(passport.initialize()); app.use(passport.session()); - - // log db connection success or error // TODO: update to use winston logging var db = mongoose.connection; @@ -60,13 +58,10 @@ app.use('/api/users', userRouter); app.use('/api/routes', routeRouter); -//listening -app.listen(port, function(err) { - if (err) { - return console.log(err); - } - console.log('Amblr API server is listening on port: ' + port); -}); +var options = { + key: fs.readFileSync('./config/keys/privKey.pem'), + cert: fs.readFileSync('./config/keys/cert.pem') +}; app.get('/checklogin',function(req,res){ if (req.user) { @@ -84,3 +79,12 @@ app.get('/checkuserid', function(req, res){ res.send(null); } }) + +// Create an HTTPS service +https.createServer(options, app).listen(port, function(err) { + if (err) { + return console.log(err); + } + console.log('Amblr API server is listening on port: ' + port); +}); + From 50ae124ce024985fbda62fbcf19a4605c830afe5 Mon Sep 17 00:00:00 2001 From: Alex Nitta Date: Thu, 26 May 2016 11:36:27 -0700 Subject: [PATCH 02/12] (fix) Require fs in server/server.js --- server/server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/server.js b/server/server.js index 2c64483..074009f 100644 --- a/server/server.js +++ b/server/server.js @@ -4,6 +4,7 @@ var mongoose = require('mongoose'); var morgan = require('morgan'); var app = module.exports = express(); var logger = require('./config/logger.js'); +var fs = require('fs'); var passport = require('passport'); var https = require('https'); From 238e2273ef724e0d38a135ab230eda4b3a2f1d54 Mon Sep 17 00:00:00 2001 From: Alex Nitta Date: Thu, 26 May 2016 11:52:49 -0700 Subject: [PATCH 03/12] (fix) Change Google Maps link in index.html to HTTPS version --- client/www/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/www/index.html b/client/www/index.html index 8ed83ec..53478a8 100644 --- a/client/www/index.html +++ b/client/www/index.html @@ -8,7 +8,7 @@ - + From 025340cf839e9c6db9244e0e67b6d72a60a50495 Mon Sep 17 00:00:00 2001 From: Alex Nitta Date: Thu, 26 May 2016 12:17:34 -0700 Subject: [PATCH 04/12] (fix) remove client/www/lib from .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index f53b43e..957badc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ client/plugins/ client/resources/ client/dist client/www/js/config.js -client/www/lib/* _whiteboards server/node_modules server/logs/logs.log From 4d4285aeabe2ffa8bab9169697c6e46f478632c8 Mon Sep 17 00:00:00 2001 From: Alex Nitta Date: Thu, 26 May 2016 12:19:53 -0700 Subject: [PATCH 05/12] (fix) Add client/www/lib files --- client/www/lib/angular-animate/.bower.json | 19 + client/www/lib/angular-animate/README.md | 68 + .../lib/angular-animate/angular-animate.js | 3721 + .../angular-animate/angular-animate.min.js | 52 + .../angular-animate.min.js.map | 8 + client/www/lib/angular-animate/bower.json | 9 + client/www/lib/angular-animate/index.js | 2 + client/www/lib/angular-animate/package.json | 26 + client/www/lib/angular-cookies/.bower.json | 20 + client/www/lib/angular-cookies/README.md | 68 + .../lib/angular-cookies/angular-cookies.js | 322 + .../angular-cookies/angular-cookies.min.js | 9 + .../angular-cookies.min.js.map | 8 + client/www/lib/angular-cookies/bower.json | 10 + client/www/lib/angular-cookies/index.js | 2 + client/www/lib/angular-cookies/package.json | 26 + client/www/lib/angular-filter/.bower.json | 41 + client/www/lib/angular-filter/.bowerrc | 3 + client/www/lib/angular-filter/.travis.yml | 8 + client/www/lib/angular-filter/bower.json | 31 + .../lib/angular-filter/dist/angular-filter.js | 2287 + .../angular-filter/dist/angular-filter.min.js | 6 + .../angular-filter/dist/angular-filter.zip | Bin 0 -> 81020 bytes client/www/lib/angular-filter/license.md | 21 + .../www/lib/angular-google-maps/.bower.json | 53 + client/www/lib/angular-google-maps/.eslintrc | 12 + client/www/lib/angular-google-maps/.npmignore | 17 + .../www/lib/angular-google-maps/.travis.yml | 30 + .../angular-google-maps/.travis/deploy.enc | Bin 0 -> 1680 bytes .../www/lib/angular-google-maps/CHANGELOG.md | 99 + .../lib/angular-google-maps/Gruntfile.coffee | 144 + client/www/lib/angular-google-maps/bower.json | 43 + .../dist/angular-google-maps-street-view.js | 677 + .../angular-google-maps-street-view.min.js | 7 + ...ular-google-maps-street-view_dev_mapped.js | 678 + ...-google-maps-street-view_dev_mapped.js.map | 1 + ...-google-maps-street-view_dev_mapped.min.js | 7 + ...gle-maps-street-view_dev_mapped.min.js.map | 1 + .../dist/angular-google-maps.js | 14022 ++++ .../dist/angular-google-maps.min.js | 13 + .../dist/angular-google-maps_dev_mapped.js | 14023 ++++ .../angular-google-maps_dev_mapped.js.map | 1 + .../angular-google-maps_dev_mapped.min.js | 13 + .../lib/angular-google-maps/karma.conf.coffee | 94 + .../spec/coffee/bootstrap/bootstrap.coffee | 51 + .../coffee/bootstrap/google-api-mock.coffee | 487 + .../google-map-spec-controller.coffee | 19 + .../spec/coffee/bootstrap/initiator.coffee | 35 + .../helpers/helper.mockEvents.spec.coffee | 54 + .../helpers/helper.polyline.spec.coffee | 16 + .../www/lib/angular-google-maps/spec/js/.keep | 0 client/www/lib/angular-mocks/.bower.json | 19 + client/www/lib/angular-mocks/README.md | 57 + client/www/lib/angular-mocks/angular-mocks.js | 2396 + client/www/lib/angular-mocks/bower.json | 9 + client/www/lib/angular-mocks/package.json | 27 + client/www/lib/angular-sanitize/.bower.json | 19 + client/www/lib/angular-sanitize/README.md | 68 + .../lib/angular-sanitize/angular-sanitize.js | 683 + .../angular-sanitize/angular-sanitize.min.js | 16 + .../angular-sanitize.min.js.map | 8 + client/www/lib/angular-sanitize/bower.json | 9 + client/www/lib/angular-sanitize/index.js | 2 + client/www/lib/angular-sanitize/package.json | 26 + .../www/lib/angular-simple-logger/.bower.json | 48 + .../www/lib/angular-simple-logger/bower.json | 39 + .../dist/angular-simple-logger.js | 635 + .../dist/angular-simple-logger.light.js | 147 + .../dist/angular-simple-logger.light.min.js | 1 + .../dist/angular-simple-logger.min.js | 1 + .../lib/angular-simple-logger/dist/browser.js | 635 + .../lib/angular-simple-logger/dist/index.js | 146 + .../angular-simple-logger/dist/index.light.js | 147 + client/www/lib/angular-ui-router/.bower.json | 33 + client/www/lib/angular-ui-router/CHANGELOG.md | 197 + .../www/lib/angular-ui-router/CONTRIBUTING.md | 65 + client/www/lib/angular-ui-router/LICENSE | 21 + client/www/lib/angular-ui-router/README.md | 243 + .../api/angular-ui-router.d.ts | 126 + client/www/lib/angular-ui-router/bower.json | 23 + .../release/angular-ui-router.js | 4232 + .../release/angular-ui-router.min.js | 7 + .../www/lib/angular-ui-router/src/common.js | 292 + .../www/lib/angular-ui-router/src/resolve.js | 252 + client/www/lib/angular-ui-router/src/state.js | 1373 + .../angular-ui-router/src/stateDirectives.js | 268 + .../lib/angular-ui-router/src/stateFilters.js | 39 + .../angular-ui-router/src/templateFactory.js | 110 + .../src/urlMatcherFactory.js | 1036 + .../lib/angular-ui-router/src/urlRouter.js | 413 + client/www/lib/angular-ui-router/src/view.js | 71 + .../angular-ui-router/src/viewDirective.js | 302 + .../lib/angular-ui-router/src/viewScroll.js | 52 + client/www/lib/angular/.bower.json | 17 + client/www/lib/angular/README.md | 64 + client/www/lib/angular/angular-csp.css | 21 + client/www/lib/angular/angular.js | 28364 +++++++ client/www/lib/angular/angular.min.js | 290 + client/www/lib/angular/angular.min.js.gzip | Bin 0 -> 51629 bytes client/www/lib/angular/angular.min.js.map | 8 + client/www/lib/angular/bower.json | 8 + client/www/lib/angular/index.js | 2 + client/www/lib/angular/package.json | 25 + .../.bower.json | 43 + .../LICENSE | 14 + .../bower.json | 34 + .../dist/infobox.js | 807 + .../dist/infobox.min.js | 10 + .../.bower.json | 43 + .../LICENSE | 14 + .../bower.json | 32 + .../dist/keydragzoom.js | 861 + .../dist/keydragzoom.min.js | 10 + .../.bower.json | 43 + .../LICENSE | 14 + .../bower.json | 32 + .../dist/markerwithlabel.js | 569 + .../dist/markerwithlabel.min.js | 10 + .../examples/home.png | Bin 0 -> 5461 bytes client/www/lib/ionic/.bower.json | 46 + client/www/lib/ionic/README.md | 15 + client/www/lib/ionic/bower.json | 37 + client/www/lib/ionic/css/ionic.css | 9729 +++ client/www/lib/ionic/css/ionic.min.css | 23 + client/www/lib/ionic/fonts/ionicons.eot | Bin 0 -> 120724 bytes client/www/lib/ionic/fonts/ionicons.svg | 2230 + client/www/lib/ionic/fonts/ionicons.ttf | Bin 0 -> 188508 bytes client/www/lib/ionic/fonts/ionicons.woff | Bin 0 -> 67904 bytes client/www/lib/ionic/js/ionic-angular.js | 14044 ++++ client/www/lib/ionic/js/ionic-angular.min.js | 18 + client/www/lib/ionic/js/ionic.bundle.js | 64386 ++++++++++++++++ client/www/lib/ionic/js/ionic.bundle.min.js | 448 + client/www/lib/ionic/js/ionic.js | 13298 ++++ client/www/lib/ionic/js/ionic.min.js | 20 + client/www/lib/ionic/scss/_action-sheet.scss | 170 + client/www/lib/ionic/scss/_animations.scss | 48 + client/www/lib/ionic/scss/_backdrop.scss | 24 + client/www/lib/ionic/scss/_badge.scss | 62 + client/www/lib/ionic/scss/_bar.scss | 404 + client/www/lib/ionic/scss/_button-bar.scss | 64 + client/www/lib/ionic/scss/_button.scss | 252 + client/www/lib/ionic/scss/_checkbox.scss | 180 + client/www/lib/ionic/scss/_form.scss | 327 + client/www/lib/ionic/scss/_grid.scss | 159 + client/www/lib/ionic/scss/_items.scss | 815 + client/www/lib/ionic/scss/_list.scss | 125 + client/www/lib/ionic/scss/_loading.scss | 51 + client/www/lib/ionic/scss/_menu.scss | 70 + client/www/lib/ionic/scss/_mixins.scss | 640 + client/www/lib/ionic/scss/_modal.scss | 102 + client/www/lib/ionic/scss/_platform.scss | 77 + client/www/lib/ionic/scss/_popover.scss | 168 + client/www/lib/ionic/scss/_popup.scss | 110 + client/www/lib/ionic/scss/_progress.scss | 11 + client/www/lib/ionic/scss/_radio.scss | 47 + client/www/lib/ionic/scss/_range.scss | 160 + client/www/lib/ionic/scss/_refresher.scss | 113 + client/www/lib/ionic/scss/_reset.scss | 365 + client/www/lib/ionic/scss/_scaffolding.scss | 295 + client/www/lib/ionic/scss/_select.scss | 142 + client/www/lib/ionic/scss/_slide-box.scss | 71 + client/www/lib/ionic/scss/_slides.scss | 529 + client/www/lib/ionic/scss/_spinner.scss | 100 + client/www/lib/ionic/scss/_tabs.scss | 528 + client/www/lib/ionic/scss/_toggle.scss | 198 + client/www/lib/ionic/scss/_transitions.scss | 188 + client/www/lib/ionic/scss/_type.scss | 166 + client/www/lib/ionic/scss/_util.scss | 296 + client/www/lib/ionic/scss/_variables.scss | 761 + client/www/lib/ionic/scss/ionic.scss | 54 + .../ionic/scss/ionicons/_ionicons-font.scss | 28 + .../ionic/scss/ionicons/_ionicons-icons.scss | 1473 + .../scss/ionicons/_ionicons-variables.scss | 741 + .../www/lib/ionic/scss/ionicons/ionicons.scss | 16 + client/www/lib/ionic/scss/tsconfig.json | 18 + client/www/lib/js-rich-marker/.bower.json | 33 + client/www/lib/js-rich-marker/AUTHORS | 9 + client/www/lib/js-rich-marker/CONTRIBUTING.md | 28 + client/www/lib/js-rich-marker/CONTRIBUTORS | 13 + client/www/lib/js-rich-marker/LICENSE | 201 + client/www/lib/js-rich-marker/README.md | 35 + client/www/lib/js-rich-marker/bower.json | 25 + .../js-rich-marker/examples/richmarker.html | 203 + client/www/lib/js-rich-marker/reference.html | 353 + client/www/lib/js-rich-marker/screenshot.jpg | Bin 0 -> 85621 bytes .../js-rich-marker/src/richmarker-compiled.js | 20 + .../www/lib/js-rich-marker/src/richmarker.js | 821 + client/www/lib/lodash/.bower.json | 14 + client/www/lib/lodash/.editorconfig | 12 + client/www/lib/lodash/.gitattributes | 1 + client/www/lib/lodash/.github/CONTRIBUTING.md | 78 + client/www/lib/lodash/.gitignore | 9 + client/www/lib/lodash/.jscsrc | 97 + .../www/lib/lodash/.markdown-doctest-setup.js | 48 + client/www/lib/lodash/.travis.yml | 86 + client/www/lib/lodash/LICENSE | 47 + client/www/lib/lodash/README.md | 46 + client/www/lib/lodash/dist/lodash.core.js | 3830 + client/www/lib/lodash/dist/lodash.core.min.js | 28 + client/www/lib/lodash/dist/lodash.fp.js | 879 + client/www/lib/lodash/dist/lodash.fp.min.js | 17 + client/www/lib/lodash/dist/lodash.js | 16404 ++++ client/www/lib/lodash/dist/lodash.min.js | 127 + client/www/lib/lodash/dist/mapping.fp.js | 371 + client/www/lib/lodash/doc/README.md | 10897 +++ client/www/lib/lodash/fp/_baseConvert.js | 466 + client/www/lib/lodash/fp/_convertBrowser.js | 18 + client/www/lib/lodash/fp/_mapping.js | 309 + client/www/lib/lodash/fp/placeholder.js | 6 + client/www/lib/lodash/lib/common/file.js | 71 + client/www/lib/lodash/lib/common/mapping.js | 9 + client/www/lib/lodash/lib/common/minify.js | 39 + .../lib/lodash/lib/common/uglify.options.js | 23 + client/www/lib/lodash/lib/common/util.js | 27 + client/www/lib/lodash/lib/fp/build-dist.js | 55 + client/www/lib/lodash/lib/fp/build-doc.js | 65 + client/www/lib/lodash/lib/fp/build-modules.js | 120 + .../lib/lodash/lib/fp/template/doc/wiki.jst | 227 + .../lib/fp/template/modules/_falseOptions.jst | 7 + .../lodash/lib/fp/template/modules/_util.jst | 14 + .../lodash/lib/fp/template/modules/alias.jst | 1 + .../lib/fp/template/modules/category.jst | 2 + .../lib/fp/template/modules/convert.jst | 18 + .../lib/lodash/lib/fp/template/modules/fp.jst | 2 + .../lodash/lib/fp/template/modules/module.jst | 5 + .../lodash/lib/fp/template/modules/thru.jst | 5 + client/www/lib/lodash/lib/main/build-dist.js | 30 + client/www/lib/lodash/lib/main/build-doc.js | 55 + .../www/lib/lodash/lib/main/build-modules.js | 34 + client/www/lib/lodash/lodash.js | 16404 ++++ client/www/lib/lodash/package.json | 55 + client/www/lib/lodash/perf/asset/perf-ui.js | 131 + client/www/lib/lodash/perf/index.html | 69 + client/www/lib/lodash/perf/perf.js | 1977 + client/www/lib/lodash/test/asset/test-ui.js | 170 + client/www/lib/lodash/test/asset/worker.js | 15 + client/www/lib/lodash/test/backbone.html | 170 + client/www/lib/lodash/test/fp.html | 41 + client/www/lib/lodash/test/index.html | 351 + client/www/lib/lodash/test/remove.js | 27 + client/www/lib/lodash/test/saucelabs.js | 914 + client/www/lib/lodash/test/test-fp.js | 2173 + client/www/lib/lodash/test/test.js | 26729 +++++++ client/www/lib/lodash/test/underscore.html | 484 + client/www/lib/lodash/vendor/backbone/LICENSE | 22 + .../lib/lodash/vendor/backbone/backbone.js | 1920 + .../lodash/vendor/backbone/test/collection.js | 1998 + .../lib/lodash/vendor/backbone/test/events.js | 706 + .../lib/lodash/vendor/backbone/test/model.js | 1418 + .../lodash/vendor/backbone/test/noconflict.js | 13 + .../lib/lodash/vendor/backbone/test/router.js | 1062 + .../vendor/backbone/test/setup/dom-setup.js | 4 + .../vendor/backbone/test/setup/environment.js | 45 + .../lib/lodash/vendor/backbone/test/sync.js | 239 + .../lib/lodash/vendor/backbone/test/view.js | 495 + .../lodash/vendor/firebug-lite/license.txt | 30 + .../vendor/firebug-lite/skin/xp/blank.gif | Bin 0 -> 43 bytes .../vendor/firebug-lite/skin/xp/buttonBg.png | Bin 0 -> 167 bytes .../firebug-lite/skin/xp/buttonBgHover.png | Bin 0 -> 171 bytes .../vendor/firebug-lite/skin/xp/debugger.css | 331 + .../vendor/firebug-lite/skin/xp/detach.png | Bin 0 -> 655 bytes .../firebug-lite/skin/xp/detachHover.png | Bin 0 -> 586 bytes .../vendor/firebug-lite/skin/xp/disable.gif | Bin 0 -> 340 bytes .../vendor/firebug-lite/skin/xp/disable.png | Bin 0 -> 543 bytes .../firebug-lite/skin/xp/disableHover.gif | Bin 0 -> 344 bytes .../firebug-lite/skin/xp/disableHover.png | Bin 0 -> 512 bytes .../vendor/firebug-lite/skin/xp/down.png | Bin 0 -> 637 bytes .../firebug-lite/skin/xp/downActive.png | Bin 0 -> 543 bytes .../vendor/firebug-lite/skin/xp/downHover.png | Bin 0 -> 526 bytes .../firebug-lite/skin/xp/errorIcon-sm.png | Bin 0 -> 447 bytes .../vendor/firebug-lite/skin/xp/errorIcon.gif | Bin 0 -> 365 bytes .../vendor/firebug-lite/skin/xp/errorIcon.png | Bin 0 -> 457 bytes .../firebug-lite/skin/xp/firebug-1.3a2.css | 817 + .../firebug-lite/skin/xp/firebug.IE6.css | 20 + .../vendor/firebug-lite/skin/xp/firebug.css | 3147 + .../vendor/firebug-lite/skin/xp/firebug.html | 215 + .../vendor/firebug-lite/skin/xp/firebug.png | Bin 0 -> 1167 bytes .../vendor/firebug-lite/skin/xp/group.gif | Bin 0 -> 158 bytes .../vendor/firebug-lite/skin/xp/html.css | 272 + .../vendor/firebug-lite/skin/xp/infoIcon.gif | Bin 0 -> 359 bytes .../vendor/firebug-lite/skin/xp/infoIcon.png | Bin 0 -> 524 bytes .../firebug-lite/skin/xp/loading_16.gif | Bin 0 -> 1553 bytes .../vendor/firebug-lite/skin/xp/min.png | Bin 0 -> 552 bytes .../vendor/firebug-lite/skin/xp/minHover.png | Bin 0 -> 485 bytes .../vendor/firebug-lite/skin/xp/off.png | Bin 0 -> 742 bytes .../vendor/firebug-lite/skin/xp/offHover.png | Bin 0 -> 680 bytes .../skin/xp/pixel_transparent.gif | Bin 0 -> 43 bytes .../firebug-lite/skin/xp/roundCorner.svg | 6 + .../vendor/firebug-lite/skin/xp/search.gif | Bin 0 -> 550 bytes .../vendor/firebug-lite/skin/xp/search.png | Bin 0 -> 685 bytes .../vendor/firebug-lite/skin/xp/shadow.gif | Bin 0 -> 4364 bytes .../vendor/firebug-lite/skin/xp/shadow2.gif | Bin 0 -> 3093 bytes .../firebug-lite/skin/xp/shadowAlpha.png | Bin 0 -> 3403 bytes .../vendor/firebug-lite/skin/xp/sprite.png | Bin 0 -> 40027 bytes .../firebug-lite/skin/xp/tabHoverLeft.png | Bin 0 -> 438 bytes .../firebug-lite/skin/xp/tabHoverMid.png | Bin 0 -> 261 bytes .../firebug-lite/skin/xp/tabHoverRight.png | Bin 0 -> 436 bytes .../vendor/firebug-lite/skin/xp/tabLeft.png | Bin 0 -> 449 bytes .../firebug-lite/skin/xp/tabMenuCheckbox.png | Bin 0 -> 220 bytes .../firebug-lite/skin/xp/tabMenuPin.png | Bin 0 -> 207 bytes .../firebug-lite/skin/xp/tabMenuRadio.png | Bin 0 -> 192 bytes .../firebug-lite/skin/xp/tabMenuTarget.png | Bin 0 -> 142 bytes .../skin/xp/tabMenuTargetHover.png | Bin 0 -> 148 bytes .../vendor/firebug-lite/skin/xp/tabMid.png | Bin 0 -> 262 bytes .../vendor/firebug-lite/skin/xp/tabRight.png | Bin 0 -> 448 bytes .../skin/xp/textEditorBorders.gif | Bin 0 -> 117 bytes .../skin/xp/textEditorBorders.png | Bin 0 -> 3144 bytes .../skin/xp/textEditorCorners.gif | Bin 0 -> 1821 bytes .../skin/xp/textEditorCorners.png | Bin 0 -> 3960 bytes .../firebug-lite/skin/xp/titlebarMid.png | Bin 0 -> 273 bytes .../firebug-lite/skin/xp/toolbarMid.png | Bin 0 -> 242 bytes .../firebug-lite/skin/xp/tree_close.gif | Bin 0 -> 300 bytes .../vendor/firebug-lite/skin/xp/tree_open.gif | Bin 0 -> 202 bytes .../firebug-lite/skin/xp/twistyClosed.png | Bin 0 -> 334 bytes .../firebug-lite/skin/xp/twistyOpen.png | Bin 0 -> 309 bytes .../lodash/vendor/firebug-lite/skin/xp/up.png | Bin 0 -> 619 bytes .../vendor/firebug-lite/skin/xp/upActive.png | Bin 0 -> 551 bytes .../vendor/firebug-lite/skin/xp/upHover.png | Bin 0 -> 526 bytes .../firebug-lite/skin/xp/warningIcon.gif | Bin 0 -> 357 bytes .../firebug-lite/skin/xp/warningIcon.png | Bin 0 -> 516 bytes .../firebug-lite/src/firebug-lite-debug.js | 31176 ++++++++ client/www/lib/lodash/vendor/json-js/json2.js | 519 + .../www/lib/lodash/vendor/underscore/LICENSE | 23 + .../lodash/vendor/underscore/test/arrays.js | 555 + .../lodash/vendor/underscore/test/chaining.js | 99 + .../vendor/underscore/test/collections.js | 896 + .../vendor/underscore/test/cross-document.js | 141 + .../vendor/underscore/test/functions.js | 728 + .../lodash/vendor/underscore/test/objects.js | 1102 + .../lodash/vendor/underscore/test/utility.js | 420 + .../vendor/underscore/underscore-min.js | 6 + .../lodash/vendor/underscore/underscore.js | 1620 + .../www/lib/markerclustererplus/.bower.json | 25 + .../www/lib/markerclustererplus/.editorconfig | 20 + .../lib/markerclustererplus/.gitattributes | 1 + client/www/lib/markerclustererplus/.gitignore | 3 + client/www/lib/markerclustererplus/README.md | 46 + client/www/lib/markerclustererplus/bower.json | 17 + .../dist/markerclusterer.min.js | 1 + .../examples/advanced_example.html | 230 + .../examples/events_example.html | 108 + .../examples/markerclustererplus.png | Bin 0 -> 60848 bytes .../examples/simple_example.html | 77 + .../examples/speed_test.js | 149 + .../examples/speed_test_example.html | 135 + .../lib/markerclustererplus/images/conv30.png | Bin 0 -> 1030 bytes .../lib/markerclustererplus/images/conv40.png | Bin 0 -> 1512 bytes .../lib/markerclustererplus/images/conv50.png | Bin 0 -> 2202 bytes .../markerclustererplus/images/heart30.png | Bin 0 -> 1448 bytes .../markerclustererplus/images/heart40.png | Bin 0 -> 2161 bytes .../markerclustererplus/images/heart50.png | Bin 0 -> 2999 bytes .../www/lib/markerclustererplus/images/m1.png | Bin 0 -> 3003 bytes .../www/lib/markerclustererplus/images/m2.png | Bin 0 -> 3259 bytes .../www/lib/markerclustererplus/images/m3.png | Bin 0 -> 3956 bytes .../www/lib/markerclustererplus/images/m4.png | Bin 0 -> 5705 bytes .../www/lib/markerclustererplus/images/m5.png | Bin 0 -> 6839 bytes .../markerclustererplus/images/people35.png | Bin 0 -> 1392 bytes .../markerclustererplus/images/people45.png | Bin 0 -> 2076 bytes .../markerclustererplus/images/people55.png | Bin 0 -> 2928 bytes .../www/lib/markerclustererplus/package.json | 25 + .../www/lib/markerclustererplus/src/data.json | 2188 + .../src/markerclusterer.js | 1674 + .../src/markerclusterer.min.js | 2 + .../src/markerclusterer_packaged.js | 2 + client/www/lib/ngCordova/.bower.json | 55 + client/www/lib/ngCordova/CHANGELOG.md | 1 + client/www/lib/ngCordova/LICENSE | 21 + client/www/lib/ngCordova/README.md | 130 + client/www/lib/ngCordova/bower.json | 46 + .../lib/ngCordova/dist/ng-cordova-mocks.js | 3443 + .../ngCordova/dist/ng-cordova-mocks.min.js | 7 + client/www/lib/ngCordova/dist/ng-cordova.js | 7061 ++ .../www/lib/ngCordova/dist/ng-cordova.min.js | 9 + client/www/lib/ngCordova/package.json | 44 + client/www/lib/ngDraggable/.bower.json | 25 + client/www/lib/ngDraggable/LICENSE.txt | 21 + client/www/lib/ngDraggable/README.md | 72 + client/www/lib/ngDraggable/bower.json | 16 + .../www/lib/ngDraggable/example-cancel.html | 163 + client/www/lib/ngDraggable/example-clone.html | 150 + .../www/lib/ngDraggable/example-reorder.html | 131 + client/www/lib/ngDraggable/example.html | 156 + client/www/lib/ngDraggable/ngDraggable.js | 601 + 383 files changed, 350384 insertions(+) create mode 100644 client/www/lib/angular-animate/.bower.json create mode 100644 client/www/lib/angular-animate/README.md create mode 100644 client/www/lib/angular-animate/angular-animate.js create mode 100644 client/www/lib/angular-animate/angular-animate.min.js create mode 100644 client/www/lib/angular-animate/angular-animate.min.js.map create mode 100644 client/www/lib/angular-animate/bower.json create mode 100644 client/www/lib/angular-animate/index.js create mode 100644 client/www/lib/angular-animate/package.json create mode 100644 client/www/lib/angular-cookies/.bower.json create mode 100644 client/www/lib/angular-cookies/README.md create mode 100644 client/www/lib/angular-cookies/angular-cookies.js create mode 100644 client/www/lib/angular-cookies/angular-cookies.min.js create mode 100644 client/www/lib/angular-cookies/angular-cookies.min.js.map create mode 100644 client/www/lib/angular-cookies/bower.json create mode 100644 client/www/lib/angular-cookies/index.js create mode 100644 client/www/lib/angular-cookies/package.json create mode 100644 client/www/lib/angular-filter/.bower.json create mode 100644 client/www/lib/angular-filter/.bowerrc create mode 100644 client/www/lib/angular-filter/.travis.yml create mode 100644 client/www/lib/angular-filter/bower.json create mode 100644 client/www/lib/angular-filter/dist/angular-filter.js create mode 100644 client/www/lib/angular-filter/dist/angular-filter.min.js create mode 100644 client/www/lib/angular-filter/dist/angular-filter.zip create mode 100644 client/www/lib/angular-filter/license.md create mode 100644 client/www/lib/angular-google-maps/.bower.json create mode 100644 client/www/lib/angular-google-maps/.eslintrc create mode 100644 client/www/lib/angular-google-maps/.npmignore create mode 100644 client/www/lib/angular-google-maps/.travis.yml create mode 100644 client/www/lib/angular-google-maps/.travis/deploy.enc create mode 100644 client/www/lib/angular-google-maps/CHANGELOG.md create mode 100644 client/www/lib/angular-google-maps/Gruntfile.coffee create mode 100644 client/www/lib/angular-google-maps/bower.json create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.min.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js.map create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js.map create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps.min.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js.map create mode 100644 client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.min.js create mode 100644 client/www/lib/angular-google-maps/karma.conf.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/bootstrap/bootstrap.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-api-mock.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-map-spec-controller.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/bootstrap/initiator.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/helpers/helper.mockEvents.spec.coffee create mode 100644 client/www/lib/angular-google-maps/spec/coffee/helpers/helper.polyline.spec.coffee create mode 100644 client/www/lib/angular-google-maps/spec/js/.keep create mode 100644 client/www/lib/angular-mocks/.bower.json create mode 100644 client/www/lib/angular-mocks/README.md create mode 100644 client/www/lib/angular-mocks/angular-mocks.js create mode 100644 client/www/lib/angular-mocks/bower.json create mode 100644 client/www/lib/angular-mocks/package.json create mode 100644 client/www/lib/angular-sanitize/.bower.json create mode 100644 client/www/lib/angular-sanitize/README.md create mode 100644 client/www/lib/angular-sanitize/angular-sanitize.js create mode 100644 client/www/lib/angular-sanitize/angular-sanitize.min.js create mode 100644 client/www/lib/angular-sanitize/angular-sanitize.min.js.map create mode 100644 client/www/lib/angular-sanitize/bower.json create mode 100644 client/www/lib/angular-sanitize/index.js create mode 100644 client/www/lib/angular-sanitize/package.json create mode 100644 client/www/lib/angular-simple-logger/.bower.json create mode 100644 client/www/lib/angular-simple-logger/bower.json create mode 100644 client/www/lib/angular-simple-logger/dist/angular-simple-logger.js create mode 100644 client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.js create mode 100644 client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.min.js create mode 100644 client/www/lib/angular-simple-logger/dist/angular-simple-logger.min.js create mode 100644 client/www/lib/angular-simple-logger/dist/browser.js create mode 100644 client/www/lib/angular-simple-logger/dist/index.js create mode 100644 client/www/lib/angular-simple-logger/dist/index.light.js create mode 100644 client/www/lib/angular-ui-router/.bower.json create mode 100644 client/www/lib/angular-ui-router/CHANGELOG.md create mode 100644 client/www/lib/angular-ui-router/CONTRIBUTING.md create mode 100644 client/www/lib/angular-ui-router/LICENSE create mode 100644 client/www/lib/angular-ui-router/README.md create mode 100644 client/www/lib/angular-ui-router/api/angular-ui-router.d.ts create mode 100644 client/www/lib/angular-ui-router/bower.json create mode 100644 client/www/lib/angular-ui-router/release/angular-ui-router.js create mode 100644 client/www/lib/angular-ui-router/release/angular-ui-router.min.js create mode 100644 client/www/lib/angular-ui-router/src/common.js create mode 100644 client/www/lib/angular-ui-router/src/resolve.js create mode 100644 client/www/lib/angular-ui-router/src/state.js create mode 100644 client/www/lib/angular-ui-router/src/stateDirectives.js create mode 100644 client/www/lib/angular-ui-router/src/stateFilters.js create mode 100644 client/www/lib/angular-ui-router/src/templateFactory.js create mode 100644 client/www/lib/angular-ui-router/src/urlMatcherFactory.js create mode 100644 client/www/lib/angular-ui-router/src/urlRouter.js create mode 100644 client/www/lib/angular-ui-router/src/view.js create mode 100644 client/www/lib/angular-ui-router/src/viewDirective.js create mode 100644 client/www/lib/angular-ui-router/src/viewScroll.js create mode 100644 client/www/lib/angular/.bower.json create mode 100644 client/www/lib/angular/README.md create mode 100644 client/www/lib/angular/angular-csp.css create mode 100644 client/www/lib/angular/angular.js create mode 100644 client/www/lib/angular/angular.min.js create mode 100644 client/www/lib/angular/angular.min.js.gzip create mode 100644 client/www/lib/angular/angular.min.js.map create mode 100644 client/www/lib/angular/bower.json create mode 100644 client/www/lib/angular/index.js create mode 100644 client/www/lib/angular/package.json create mode 100644 client/www/lib/google-maps-utility-library-v3-infobox/.bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-infobox/LICENSE create mode 100644 client/www/lib/google-maps-utility-library-v3-infobox/bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-infobox/dist/infobox.js create mode 100644 client/www/lib/google-maps-utility-library-v3-infobox/dist/infobox.min.js create mode 100644 client/www/lib/google-maps-utility-library-v3-keydragzoom/.bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-keydragzoom/LICENSE create mode 100644 client/www/lib/google-maps-utility-library-v3-keydragzoom/bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-keydragzoom/dist/keydragzoom.js create mode 100644 client/www/lib/google-maps-utility-library-v3-keydragzoom/dist/keydragzoom.min.js create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/.bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/LICENSE create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/bower.json create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/dist/markerwithlabel.js create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/dist/markerwithlabel.min.js create mode 100644 client/www/lib/google-maps-utility-library-v3-markerwithlabel/examples/home.png create mode 100644 client/www/lib/ionic/.bower.json create mode 100644 client/www/lib/ionic/README.md create mode 100644 client/www/lib/ionic/bower.json create mode 100644 client/www/lib/ionic/css/ionic.css create mode 100644 client/www/lib/ionic/css/ionic.min.css create mode 100644 client/www/lib/ionic/fonts/ionicons.eot create mode 100644 client/www/lib/ionic/fonts/ionicons.svg create mode 100644 client/www/lib/ionic/fonts/ionicons.ttf create mode 100644 client/www/lib/ionic/fonts/ionicons.woff create mode 100644 client/www/lib/ionic/js/ionic-angular.js create mode 100644 client/www/lib/ionic/js/ionic-angular.min.js create mode 100644 client/www/lib/ionic/js/ionic.bundle.js create mode 100644 client/www/lib/ionic/js/ionic.bundle.min.js create mode 100644 client/www/lib/ionic/js/ionic.js create mode 100644 client/www/lib/ionic/js/ionic.min.js create mode 100644 client/www/lib/ionic/scss/_action-sheet.scss create mode 100644 client/www/lib/ionic/scss/_animations.scss create mode 100644 client/www/lib/ionic/scss/_backdrop.scss create mode 100644 client/www/lib/ionic/scss/_badge.scss create mode 100644 client/www/lib/ionic/scss/_bar.scss create mode 100644 client/www/lib/ionic/scss/_button-bar.scss create mode 100644 client/www/lib/ionic/scss/_button.scss create mode 100644 client/www/lib/ionic/scss/_checkbox.scss create mode 100644 client/www/lib/ionic/scss/_form.scss create mode 100644 client/www/lib/ionic/scss/_grid.scss create mode 100644 client/www/lib/ionic/scss/_items.scss create mode 100644 client/www/lib/ionic/scss/_list.scss create mode 100644 client/www/lib/ionic/scss/_loading.scss create mode 100644 client/www/lib/ionic/scss/_menu.scss create mode 100644 client/www/lib/ionic/scss/_mixins.scss create mode 100644 client/www/lib/ionic/scss/_modal.scss create mode 100644 client/www/lib/ionic/scss/_platform.scss create mode 100644 client/www/lib/ionic/scss/_popover.scss create mode 100644 client/www/lib/ionic/scss/_popup.scss create mode 100644 client/www/lib/ionic/scss/_progress.scss create mode 100644 client/www/lib/ionic/scss/_radio.scss create mode 100644 client/www/lib/ionic/scss/_range.scss create mode 100644 client/www/lib/ionic/scss/_refresher.scss create mode 100755 client/www/lib/ionic/scss/_reset.scss create mode 100644 client/www/lib/ionic/scss/_scaffolding.scss create mode 100644 client/www/lib/ionic/scss/_select.scss create mode 100644 client/www/lib/ionic/scss/_slide-box.scss create mode 100644 client/www/lib/ionic/scss/_slides.scss create mode 100644 client/www/lib/ionic/scss/_spinner.scss create mode 100644 client/www/lib/ionic/scss/_tabs.scss create mode 100644 client/www/lib/ionic/scss/_toggle.scss create mode 100644 client/www/lib/ionic/scss/_transitions.scss create mode 100644 client/www/lib/ionic/scss/_type.scss create mode 100644 client/www/lib/ionic/scss/_util.scss create mode 100644 client/www/lib/ionic/scss/_variables.scss create mode 100644 client/www/lib/ionic/scss/ionic.scss create mode 100644 client/www/lib/ionic/scss/ionicons/_ionicons-font.scss create mode 100644 client/www/lib/ionic/scss/ionicons/_ionicons-icons.scss create mode 100644 client/www/lib/ionic/scss/ionicons/_ionicons-variables.scss create mode 100644 client/www/lib/ionic/scss/ionicons/ionicons.scss create mode 100644 client/www/lib/ionic/scss/tsconfig.json create mode 100644 client/www/lib/js-rich-marker/.bower.json create mode 100644 client/www/lib/js-rich-marker/AUTHORS create mode 100644 client/www/lib/js-rich-marker/CONTRIBUTING.md create mode 100644 client/www/lib/js-rich-marker/CONTRIBUTORS create mode 100644 client/www/lib/js-rich-marker/LICENSE create mode 100644 client/www/lib/js-rich-marker/README.md create mode 100644 client/www/lib/js-rich-marker/bower.json create mode 100755 client/www/lib/js-rich-marker/examples/richmarker.html create mode 100755 client/www/lib/js-rich-marker/reference.html create mode 100644 client/www/lib/js-rich-marker/screenshot.jpg create mode 100755 client/www/lib/js-rich-marker/src/richmarker-compiled.js create mode 100755 client/www/lib/js-rich-marker/src/richmarker.js create mode 100644 client/www/lib/lodash/.bower.json create mode 100644 client/www/lib/lodash/.editorconfig create mode 100644 client/www/lib/lodash/.gitattributes create mode 100644 client/www/lib/lodash/.github/CONTRIBUTING.md create mode 100644 client/www/lib/lodash/.gitignore create mode 100644 client/www/lib/lodash/.jscsrc create mode 100644 client/www/lib/lodash/.markdown-doctest-setup.js create mode 100644 client/www/lib/lodash/.travis.yml create mode 100644 client/www/lib/lodash/LICENSE create mode 100644 client/www/lib/lodash/README.md create mode 100644 client/www/lib/lodash/dist/lodash.core.js create mode 100644 client/www/lib/lodash/dist/lodash.core.min.js create mode 100644 client/www/lib/lodash/dist/lodash.fp.js create mode 100644 client/www/lib/lodash/dist/lodash.fp.min.js create mode 100644 client/www/lib/lodash/dist/lodash.js create mode 100644 client/www/lib/lodash/dist/lodash.min.js create mode 100644 client/www/lib/lodash/dist/mapping.fp.js create mode 100644 client/www/lib/lodash/doc/README.md create mode 100644 client/www/lib/lodash/fp/_baseConvert.js create mode 100644 client/www/lib/lodash/fp/_convertBrowser.js create mode 100644 client/www/lib/lodash/fp/_mapping.js create mode 100644 client/www/lib/lodash/fp/placeholder.js create mode 100644 client/www/lib/lodash/lib/common/file.js create mode 100644 client/www/lib/lodash/lib/common/mapping.js create mode 100644 client/www/lib/lodash/lib/common/minify.js create mode 100644 client/www/lib/lodash/lib/common/uglify.options.js create mode 100644 client/www/lib/lodash/lib/common/util.js create mode 100644 client/www/lib/lodash/lib/fp/build-dist.js create mode 100644 client/www/lib/lodash/lib/fp/build-doc.js create mode 100644 client/www/lib/lodash/lib/fp/build-modules.js create mode 100644 client/www/lib/lodash/lib/fp/template/doc/wiki.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/_falseOptions.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/_util.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/alias.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/category.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/convert.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/fp.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/module.jst create mode 100644 client/www/lib/lodash/lib/fp/template/modules/thru.jst create mode 100644 client/www/lib/lodash/lib/main/build-dist.js create mode 100644 client/www/lib/lodash/lib/main/build-doc.js create mode 100644 client/www/lib/lodash/lib/main/build-modules.js create mode 100644 client/www/lib/lodash/lodash.js create mode 100644 client/www/lib/lodash/package.json create mode 100644 client/www/lib/lodash/perf/asset/perf-ui.js create mode 100644 client/www/lib/lodash/perf/index.html create mode 100644 client/www/lib/lodash/perf/perf.js create mode 100644 client/www/lib/lodash/test/asset/test-ui.js create mode 100644 client/www/lib/lodash/test/asset/worker.js create mode 100644 client/www/lib/lodash/test/backbone.html create mode 100644 client/www/lib/lodash/test/fp.html create mode 100644 client/www/lib/lodash/test/index.html create mode 100644 client/www/lib/lodash/test/remove.js create mode 100644 client/www/lib/lodash/test/saucelabs.js create mode 100644 client/www/lib/lodash/test/test-fp.js create mode 100644 client/www/lib/lodash/test/test.js create mode 100644 client/www/lib/lodash/test/underscore.html create mode 100644 client/www/lib/lodash/vendor/backbone/LICENSE create mode 100644 client/www/lib/lodash/vendor/backbone/backbone.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/collection.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/events.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/model.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/noconflict.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/router.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/setup/dom-setup.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/setup/environment.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/sync.js create mode 100644 client/www/lib/lodash/vendor/backbone/test/view.js create mode 100644 client/www/lib/lodash/vendor/firebug-lite/license.txt create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/blank.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/buttonBg.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/buttonBgHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/debugger.css create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/detach.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/detachHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/disable.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/disable.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/disableHover.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/disableHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/down.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/downActive.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/downHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/errorIcon-sm.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/errorIcon.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/errorIcon.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/firebug-1.3a2.css create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/firebug.IE6.css create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/firebug.css create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/firebug.html create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/firebug.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/group.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/html.css create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/infoIcon.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/infoIcon.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/loading_16.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/min.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/minHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/off.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/offHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/pixel_transparent.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/roundCorner.svg create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/search.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/search.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/shadow.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/shadow2.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/shadowAlpha.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/sprite.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabHoverLeft.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabHoverMid.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabHoverRight.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabLeft.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMenuCheckbox.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMenuPin.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMenuRadio.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMenuTarget.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMenuTargetHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabMid.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tabRight.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/titlebarMid.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/toolbarMid.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tree_close.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/tree_open.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/twistyClosed.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/twistyOpen.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/up.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/upActive.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/upHover.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/warningIcon.gif create mode 100644 client/www/lib/lodash/vendor/firebug-lite/skin/xp/warningIcon.png create mode 100644 client/www/lib/lodash/vendor/firebug-lite/src/firebug-lite-debug.js create mode 100644 client/www/lib/lodash/vendor/json-js/json2.js create mode 100644 client/www/lib/lodash/vendor/underscore/LICENSE create mode 100644 client/www/lib/lodash/vendor/underscore/test/arrays.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/chaining.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/collections.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/cross-document.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/functions.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/objects.js create mode 100644 client/www/lib/lodash/vendor/underscore/test/utility.js create mode 100644 client/www/lib/lodash/vendor/underscore/underscore-min.js create mode 100644 client/www/lib/lodash/vendor/underscore/underscore.js create mode 100644 client/www/lib/markerclustererplus/.bower.json create mode 100644 client/www/lib/markerclustererplus/.editorconfig create mode 100644 client/www/lib/markerclustererplus/.gitattributes create mode 100644 client/www/lib/markerclustererplus/.gitignore create mode 100644 client/www/lib/markerclustererplus/README.md create mode 100644 client/www/lib/markerclustererplus/bower.json create mode 100644 client/www/lib/markerclustererplus/dist/markerclusterer.min.js create mode 100644 client/www/lib/markerclustererplus/examples/advanced_example.html create mode 100644 client/www/lib/markerclustererplus/examples/events_example.html create mode 100644 client/www/lib/markerclustererplus/examples/markerclustererplus.png create mode 100644 client/www/lib/markerclustererplus/examples/simple_example.html create mode 100644 client/www/lib/markerclustererplus/examples/speed_test.js create mode 100644 client/www/lib/markerclustererplus/examples/speed_test_example.html create mode 100644 client/www/lib/markerclustererplus/images/conv30.png create mode 100644 client/www/lib/markerclustererplus/images/conv40.png create mode 100644 client/www/lib/markerclustererplus/images/conv50.png create mode 100644 client/www/lib/markerclustererplus/images/heart30.png create mode 100644 client/www/lib/markerclustererplus/images/heart40.png create mode 100644 client/www/lib/markerclustererplus/images/heart50.png create mode 100644 client/www/lib/markerclustererplus/images/m1.png create mode 100644 client/www/lib/markerclustererplus/images/m2.png create mode 100644 client/www/lib/markerclustererplus/images/m3.png create mode 100644 client/www/lib/markerclustererplus/images/m4.png create mode 100644 client/www/lib/markerclustererplus/images/m5.png create mode 100644 client/www/lib/markerclustererplus/images/people35.png create mode 100644 client/www/lib/markerclustererplus/images/people45.png create mode 100644 client/www/lib/markerclustererplus/images/people55.png create mode 100644 client/www/lib/markerclustererplus/package.json create mode 100644 client/www/lib/markerclustererplus/src/data.json create mode 100644 client/www/lib/markerclustererplus/src/markerclusterer.js create mode 100644 client/www/lib/markerclustererplus/src/markerclusterer.min.js create mode 100644 client/www/lib/markerclustererplus/src/markerclusterer_packaged.js create mode 100644 client/www/lib/ngCordova/.bower.json create mode 100644 client/www/lib/ngCordova/CHANGELOG.md create mode 100644 client/www/lib/ngCordova/LICENSE create mode 100644 client/www/lib/ngCordova/README.md create mode 100644 client/www/lib/ngCordova/bower.json create mode 100644 client/www/lib/ngCordova/dist/ng-cordova-mocks.js create mode 100644 client/www/lib/ngCordova/dist/ng-cordova-mocks.min.js create mode 100644 client/www/lib/ngCordova/dist/ng-cordova.js create mode 100644 client/www/lib/ngCordova/dist/ng-cordova.min.js create mode 100644 client/www/lib/ngCordova/package.json create mode 100644 client/www/lib/ngDraggable/.bower.json create mode 100644 client/www/lib/ngDraggable/LICENSE.txt create mode 100644 client/www/lib/ngDraggable/README.md create mode 100644 client/www/lib/ngDraggable/bower.json create mode 100755 client/www/lib/ngDraggable/example-cancel.html create mode 100755 client/www/lib/ngDraggable/example-clone.html create mode 100755 client/www/lib/ngDraggable/example-reorder.html create mode 100755 client/www/lib/ngDraggable/example.html create mode 100644 client/www/lib/ngDraggable/ngDraggable.js diff --git a/client/www/lib/angular-animate/.bower.json b/client/www/lib/angular-animate/.bower.json new file mode 100644 index 0000000..8322386 --- /dev/null +++ b/client/www/lib/angular-animate/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "angular-animate", + "version": "1.4.3", + "main": "./angular-animate.js", + "ignore": [], + "dependencies": { + "angular": "1.4.3" + }, + "homepage": "https://github.com/angular/bower-angular-animate", + "_release": "1.4.3", + "_resolution": { + "type": "version", + "tag": "v1.4.3", + "commit": "4ce2a76359401102d2e0146ccf69e6c060799ff8" + }, + "_source": "https://github.com/angular/bower-angular-animate.git", + "_target": "1.4.3", + "_originalSource": "angular-animate" +} \ No newline at end of file diff --git a/client/www/lib/angular-animate/README.md b/client/www/lib/angular-animate/README.md new file mode 100644 index 0000000..8313da6 --- /dev/null +++ b/client/www/lib/angular-animate/README.md @@ -0,0 +1,68 @@ +# packaged angular-animate + +This repo is for distribution on `npm` and `bower`. The source for this module is in the +[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate). +Please file issues and pull requests against that repo. + +## Install + +You can install this package either with `npm` or with `bower`. + +### npm + +```shell +npm install angular-animate +``` + +Then add `ngAnimate` as a dependency for your app: + +```javascript +angular.module('myApp', [require('angular-animate')]); +``` + +### bower + +```shell +bower install angular-animate +``` + +Then add a ` +``` + +Then add `ngAnimate` as a dependency for your app: + +```javascript +angular.module('myApp', ['ngAnimate']); +``` + +## Documentation + +Documentation is available on the +[AngularJS docs site](http://docs.angularjs.org/api/ngAnimate). + +## License + +The MIT License + +Copyright (c) 2010-2015 Google, Inc. http://angularjs.org + +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/client/www/lib/angular-animate/angular-animate.js b/client/www/lib/angular-animate/angular-animate.js new file mode 100644 index 0000000..fc0e217 --- /dev/null +++ b/client/www/lib/angular-animate/angular-animate.js @@ -0,0 +1,3721 @@ +/** + * @license AngularJS v1.4.3 + * (c) 2010-2015 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +/* jshint ignore:start */ +var noop = angular.noop; +var extend = angular.extend; +var jqLite = angular.element; +var forEach = angular.forEach; +var isArray = angular.isArray; +var isString = angular.isString; +var isObject = angular.isObject; +var isUndefined = angular.isUndefined; +var isDefined = angular.isDefined; +var isFunction = angular.isFunction; +var isElement = angular.isElement; + +var ELEMENT_NODE = 1; +var COMMENT_NODE = 8; + +var NG_ANIMATE_CLASSNAME = 'ng-animate'; +var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren'; + +var isPromiseLike = function(p) { + return p && p.then ? true : false; +} + +function assertArg(arg, name, reason) { + if (!arg) { + throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); + } + return arg; +} + +function mergeClasses(a,b) { + if (!a && !b) return ''; + if (!a) return b; + if (!b) return a; + if (isArray(a)) a = a.join(' '); + if (isArray(b)) b = b.join(' '); + return a + ' ' + b; +} + +function packageStyles(options) { + var styles = {}; + if (options && (options.to || options.from)) { + styles.to = options.to; + styles.from = options.from; + } + return styles; +} + +function pendClasses(classes, fix, isPrefix) { + var className = ''; + classes = isArray(classes) + ? classes + : classes && isString(classes) && classes.length + ? classes.split(/\s+/) + : []; + forEach(classes, function(klass, i) { + if (klass && klass.length > 0) { + className += (i > 0) ? ' ' : ''; + className += isPrefix ? fix + klass + : klass + fix; + } + }); + return className; +} + +function removeFromArray(arr, val) { + var index = arr.indexOf(val); + if (val >= 0) { + arr.splice(index, 1); + } +} + +function stripCommentsFromElement(element) { + if (element instanceof jqLite) { + switch (element.length) { + case 0: + return []; + break; + + case 1: + // there is no point of stripping anything if the element + // is the only element within the jqLite wrapper. + // (it's important that we retain the element instance.) + if (element[0].nodeType === ELEMENT_NODE) { + return element; + } + break; + + default: + return jqLite(extractElementNode(element)); + break; + } + } + + if (element.nodeType === ELEMENT_NODE) { + return jqLite(element); + } +} + +function extractElementNode(element) { + if (!element[0]) return element; + for (var i = 0; i < element.length; i++) { + var elm = element[i]; + if (elm.nodeType == ELEMENT_NODE) { + return elm; + } + } +} + +function $$addClass($$jqLite, element, className) { + forEach(element, function(elm) { + $$jqLite.addClass(elm, className); + }); +} + +function $$removeClass($$jqLite, element, className) { + forEach(element, function(elm) { + $$jqLite.removeClass(elm, className); + }); +} + +function applyAnimationClassesFactory($$jqLite) { + return function(element, options) { + if (options.addClass) { + $$addClass($$jqLite, element, options.addClass); + options.addClass = null; + } + if (options.removeClass) { + $$removeClass($$jqLite, element, options.removeClass); + options.removeClass = null; + } + } +} + +function prepareAnimationOptions(options) { + options = options || {}; + if (!options.$$prepared) { + var domOperation = options.domOperation || noop; + options.domOperation = function() { + options.$$domOperationFired = true; + domOperation(); + domOperation = noop; + }; + options.$$prepared = true; + } + return options; +} + +function applyAnimationStyles(element, options) { + applyAnimationFromStyles(element, options); + applyAnimationToStyles(element, options); +} + +function applyAnimationFromStyles(element, options) { + if (options.from) { + element.css(options.from); + options.from = null; + } +} + +function applyAnimationToStyles(element, options) { + if (options.to) { + element.css(options.to); + options.to = null; + } +} + +function mergeAnimationOptions(element, target, newOptions) { + var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || ''); + var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || ''); + var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove); + + extend(target, newOptions); + + if (classes.addClass) { + target.addClass = classes.addClass; + } else { + target.addClass = null; + } + + if (classes.removeClass) { + target.removeClass = classes.removeClass; + } else { + target.removeClass = null; + } + + return target; +} + +function resolveElementClasses(existing, toAdd, toRemove) { + var ADD_CLASS = 1; + var REMOVE_CLASS = -1; + + var flags = {}; + existing = splitClassesToLookup(existing); + + toAdd = splitClassesToLookup(toAdd); + forEach(toAdd, function(value, key) { + flags[key] = ADD_CLASS; + }); + + toRemove = splitClassesToLookup(toRemove); + forEach(toRemove, function(value, key) { + flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS; + }); + + var classes = { + addClass: '', + removeClass: '' + }; + + forEach(flags, function(val, klass) { + var prop, allow; + if (val === ADD_CLASS) { + prop = 'addClass'; + allow = !existing[klass]; + } else if (val === REMOVE_CLASS) { + prop = 'removeClass'; + allow = existing[klass]; + } + if (allow) { + if (classes[prop].length) { + classes[prop] += ' '; + } + classes[prop] += klass; + } + }); + + function splitClassesToLookup(classes) { + if (isString(classes)) { + classes = classes.split(' '); + } + + var obj = {}; + forEach(classes, function(klass) { + // sometimes the split leaves empty string values + // incase extra spaces were applied to the options + if (klass.length) { + obj[klass] = true; + } + }); + return obj; + } + + return classes; +} + +function getDomNode(element) { + return (element instanceof angular.element) ? element[0] : element; +} + +var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) { + var tickQueue = []; + var cancelFn; + + function scheduler(tasks) { + // we make a copy since RAFScheduler mutates the state + // of the passed in array variable and this would be difficult + // to track down on the outside code + tickQueue.push([].concat(tasks)); + nextTick(); + } + + /* waitUntilQuiet does two things: + * 1. It will run the FINAL `fn` value only when an uncancelled RAF has passed through + * 2. It will delay the next wave of tasks from running until the quiet `fn` has run. + * + * The motivation here is that animation code can request more time from the scheduler + * before the next wave runs. This allows for certain DOM properties such as classes to + * be resolved in time for the next animation to run. + */ + scheduler.waitUntilQuiet = function(fn) { + if (cancelFn) cancelFn(); + + cancelFn = $$rAF(function() { + cancelFn = null; + fn(); + nextTick(); + }); + }; + + return scheduler; + + function nextTick() { + if (!tickQueue.length) return; + + var updatedQueue = []; + for (var i = 0; i < tickQueue.length; i++) { + var innerQueue = tickQueue[i]; + runNextTask(innerQueue); + if (innerQueue.length) { + updatedQueue.push(innerQueue); + } + } + tickQueue = updatedQueue; + + if (!cancelFn) { + $$rAF(function() { + if (!cancelFn) nextTick(); + }); + } + } + + function runNextTask(tasks) { + var nextTask = tasks.shift(); + nextTask(); + } +}]; + +var $$AnimateChildrenDirective = [function() { + return function(scope, element, attrs) { + var val = attrs.ngAnimateChildren; + if (angular.isString(val) && val.length === 0) { //empty attribute + element.data(NG_ANIMATE_CHILDREN_DATA, true); + } else { + attrs.$observe('ngAnimateChildren', function(value) { + value = value === 'on' || value === 'true'; + element.data(NG_ANIMATE_CHILDREN_DATA, value); + }); + } + }; +}]; + +/** + * @ngdoc service + * @name $animateCss + * @kind object + * + * @description + * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes + * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT + * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or + * directives to create more complex animations that can be purely driven using CSS code. + * + * Note that only browsers that support CSS transitions and/or keyframe animations are capable of + * rendering animations triggered via `$animateCss` (bad news for IE9 and lower). + * + * ## Usage + * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that + * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however, + * any automatic control over cancelling animations and/or preventing animations from being run on + * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to + * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger + * the CSS animation. + * + * The example below shows how we can create a folding animation on an element using `ng-if`: + * + * ```html + * + *
+ * This element will go BOOM + *
+ * + * ``` + * + * Now we create the **JavaScript animation** that will trigger the CSS transition: + * + * ```js + * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { + * var height = element[0].offsetHeight; + * return $animateCss(element, { + * from: { height:'0px' }, + * to: { height:height + 'px' }, + * duration: 1 // one second + * }); + * } + * } + * }]); + * ``` + * + * ## More Advanced Uses + * + * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks + * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code. + * + * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation, + * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with + * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order + * to provide a working animation that will run in CSS. + * + * The example below showcases a more advanced version of the `.fold-animation` from the example above: + * + * ```js + * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { + * var height = element[0].offsetHeight; + * return $animateCss(element, { + * addClass: 'red large-text pulse-twice', + * easing: 'ease-out', + * from: { height:'0px' }, + * to: { height:height + 'px' }, + * duration: 1 // one second + * }); + * } + * } + * }]); + * ``` + * + * Since we're adding/removing CSS classes then the CSS transition will also pick those up: + * + * ```css + * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code, + * the CSS classes below will be transitioned despite them being defined as regular CSS classes */ + * .red { background:red; } + * .large-text { font-size:20px; } + * + * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */ + * .pulse-twice { + * animation: 0.5s pulse linear 2; + * -webkit-animation: 0.5s pulse linear 2; + * } + * + * @keyframes pulse { + * from { transform: scale(0.5); } + * to { transform: scale(1.5); } + * } + * + * @-webkit-keyframes pulse { + * from { -webkit-transform: scale(0.5); } + * to { -webkit-transform: scale(1.5); } + * } + * ``` + * + * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen. + * + * ## How the Options are handled + * + * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation + * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline + * styles using the `from` and `to` properties. + * + * ```js + * var animator = $animateCss(element, { + * from: { background:'red' }, + * to: { background:'blue' } + * }); + * animator.start(); + * ``` + * + * ```css + * .rotating-animation { + * animation:0.5s rotate linear; + * -webkit-animation:0.5s rotate linear; + * } + * + * @keyframes rotate { + * from { transform: rotate(0deg); } + * to { transform: rotate(360deg); } + * } + * + * @-webkit-keyframes rotate { + * from { -webkit-transform: rotate(0deg); } + * to { -webkit-transform: rotate(360deg); } + * } + * ``` + * + * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is + * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition + * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition + * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied + * and spread across the transition and keyframe animation. + * + * ## What is returned + * + * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually + * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are + * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties: + * + * ```js + * var animator = $animateCss(element, { ... }); + * ``` + * + * Now what do the contents of our `animator` variable look like: + * + * ```js + * { + * // starts the animation + * start: Function, + * + * // ends (aborts) the animation + * end: Function + * } + * ``` + * + * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends. + * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and stlyes may have been + * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties + * and that changing them will not reconfigure the parameters of the animation. + * + * ### runner.done() vs runner.then() + * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the + * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**. + * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()` + * unless you really need a digest to kick off afterwards. + * + * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss + * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code). + * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works. + * + * @param {DOMElement} element the element that will be animated + * @param {object} options the animation-related options that will be applied during the animation + * + * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied + * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.) + * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both). + * * `transition` - The raw CSS transition style that will be used (e.g. `1s linear all`). + * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`). + * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation. + * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition. + * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation. + * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation. + * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0` + * is provided then the animation will be skipped entirely. + * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is + * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value + * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same + * CSS delay value. + * * `stagger` - A numeric time value representing the delay between successively animated elements + * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.}) + * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a + * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`) + * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occuring on the classes being added and removed.) + * + * @return {object} an object with start and end methods and details about the animation. + * + * * `start` - The method to start the animation. This will return a `Promise` when called. + * * `end` - This method will cancel the animation and remove all applied CSS classes and styles. + */ + +// Detect proper transitionend/animationend event names. +var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; + +// If unprefixed events are not supported but webkit-prefixed are, use the latter. +// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. +// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` +// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. +// Register both events in case `window.onanimationend` is not supported because of that, +// do the same for `transitionend` as Safari is likely to exhibit similar behavior. +// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit +// therefore there is no reason to test anymore for other vendor prefixes: +// http://caniuse.com/#search=transition +if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) { + CSS_PREFIX = '-webkit-'; + TRANSITION_PROP = 'WebkitTransition'; + TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; +} else { + TRANSITION_PROP = 'transition'; + TRANSITIONEND_EVENT = 'transitionend'; +} + +if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) { + CSS_PREFIX = '-webkit-'; + ANIMATION_PROP = 'WebkitAnimation'; + ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; +} else { + ANIMATION_PROP = 'animation'; + ANIMATIONEND_EVENT = 'animationend'; +} + +var DURATION_KEY = 'Duration'; +var PROPERTY_KEY = 'Property'; +var DELAY_KEY = 'Delay'; +var TIMING_KEY = 'TimingFunction'; +var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; +var ANIMATION_PLAYSTATE_KEY = 'PlayState'; +var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; +var CLOSING_TIME_BUFFER = 1.5; +var ONE_SECOND = 1000; +var BASE_TEN = 10; + +var SAFE_FAST_FORWARD_DURATION_VALUE = 9999; + +var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY; +var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY; + +var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY; +var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY; + +var DETECT_CSS_PROPERTIES = { + transitionDuration: TRANSITION_DURATION_PROP, + transitionDelay: TRANSITION_DELAY_PROP, + transitionProperty: TRANSITION_PROP + PROPERTY_KEY, + animationDuration: ANIMATION_DURATION_PROP, + animationDelay: ANIMATION_DELAY_PROP, + animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY +}; + +var DETECT_STAGGER_CSS_PROPERTIES = { + transitionDuration: TRANSITION_DURATION_PROP, + transitionDelay: TRANSITION_DELAY_PROP, + animationDuration: ANIMATION_DURATION_PROP, + animationDelay: ANIMATION_DELAY_PROP +}; + +function computeCssStyles($window, element, properties) { + var styles = Object.create(null); + var detectedStyles = $window.getComputedStyle(element) || {}; + forEach(properties, function(formalStyleName, actualStyleName) { + var val = detectedStyles[formalStyleName]; + if (val) { + var c = val.charAt(0); + + // only numerical-based values have a negative sign or digit as the first value + if (c === '-' || c === '+' || c >= 0) { + val = parseMaxTime(val); + } + + // by setting this to null in the event that the delay is not set or is set directly as 0 + // then we can still allow for zegative values to be used later on and not mistake this + // value for being greater than any other negative value. + if (val === 0) { + val = null; + } + styles[actualStyleName] = val; + } + }); + + return styles; +} + +function parseMaxTime(str) { + var maxValue = 0; + var values = str.split(/\s*,\s*/); + forEach(values, function(value) { + // it's always safe to consider only second values and omit `ms` values since + // getComputedStyle will always handle the conversion for us + if (value.charAt(value.length - 1) == 's') { + value = value.substring(0, value.length - 1); + } + value = parseFloat(value) || 0; + maxValue = maxValue ? Math.max(value, maxValue) : value; + }); + return maxValue; +} + +function truthyTimingValue(val) { + return val === 0 || val != null; +} + +function getCssTransitionDurationStyle(duration, applyOnlyDuration) { + var style = TRANSITION_PROP; + var value = duration + 's'; + if (applyOnlyDuration) { + style += DURATION_KEY; + } else { + value += ' linear all'; + } + return [style, value]; +} + +function getCssKeyframeDurationStyle(duration) { + return [ANIMATION_DURATION_PROP, duration + 's']; +} + +function getCssDelayStyle(delay, isKeyframeAnimation) { + var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP; + return [prop, delay + 's']; +} + +function blockTransitions(node, duration) { + // we use a negative delay value since it performs blocking + // yet it doesn't kill any existing transitions running on the + // same element which makes this safe for class-based animations + var value = duration ? '-' + duration + 's' : ''; + applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]); + return [TRANSITION_DELAY_PROP, value]; +} + +function blockKeyframeAnimations(node, applyBlock) { + var value = applyBlock ? 'paused' : ''; + var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY; + applyInlineStyle(node, [key, value]); + return [key, value]; +} + +function applyInlineStyle(node, styleTuple) { + var prop = styleTuple[0]; + var value = styleTuple[1]; + node.style[prop] = value; +} + +function createLocalCacheLookup() { + var cache = Object.create(null); + return { + flush: function() { + cache = Object.create(null); + }, + + count: function(key) { + var entry = cache[key]; + return entry ? entry.total : 0; + }, + + get: function(key) { + var entry = cache[key]; + return entry && entry.value; + }, + + put: function(key, value) { + if (!cache[key]) { + cache[key] = { total: 1, value: value }; + } else { + cache[key].total++; + } + } + }; +} + +var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { + var gcsLookup = createLocalCacheLookup(); + var gcsStaggerLookup = createLocalCacheLookup(); + + this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', + '$document', '$sniffer', '$$rAFScheduler', + function($window, $$jqLite, $$AnimateRunner, $timeout, + $document, $sniffer, $$rAFScheduler) { + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + var parentCounter = 0; + function gcsHashFn(node, extraClasses) { + var KEY = "$$ngAnimateParentKey"; + var parentNode = node.parentNode; + var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter); + return parentID + '-' + node.getAttribute('class') + '-' + extraClasses; + } + + function computeCachedCssStyles(node, className, cacheKey, properties) { + var timings = gcsLookup.get(cacheKey); + + if (!timings) { + timings = computeCssStyles($window, node, properties); + if (timings.animationIterationCount === 'infinite') { + timings.animationIterationCount = 1; + } + } + + // we keep putting this in multiple times even though the value and the cacheKey are the same + // because we're keeping an interal tally of how many duplicate animations are detected. + gcsLookup.put(cacheKey, timings); + return timings; + } + + function computeCachedCssStaggerStyles(node, className, cacheKey, properties) { + var stagger; + + // if we have one or more existing matches of matching elements + // containing the same parent + CSS styles (which is how cacheKey works) + // then staggering is possible + if (gcsLookup.count(cacheKey) > 0) { + stagger = gcsStaggerLookup.get(cacheKey); + + if (!stagger) { + var staggerClassName = pendClasses(className, '-stagger'); + + $$jqLite.addClass(node, staggerClassName); + + stagger = computeCssStyles($window, node, properties); + + // force the conversion of a null value to zero incase not set + stagger.animationDuration = Math.max(stagger.animationDuration, 0); + stagger.transitionDuration = Math.max(stagger.transitionDuration, 0); + + $$jqLite.removeClass(node, staggerClassName); + + gcsStaggerLookup.put(cacheKey, stagger); + } + } + + return stagger || {}; + } + + var bod = getDomNode($document).body; + var rafWaitQueue = []; + function waitUntilQuiet(callback) { + rafWaitQueue.push(callback); + $$rAFScheduler.waitUntilQuiet(function() { + gcsLookup.flush(); + gcsStaggerLookup.flush(); + + //the line below will force the browser to perform a repaint so + //that all the animated elements within the animation frame will + //be properly updated and drawn on screen. This is required to + //ensure that the preparation animation is properly flushed so that + //the active state picks up from there. DO NOT REMOVE THIS LINE. + //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH + //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND + //WILL TAKE YEARS AWAY FROM YOUR LIFE. + var width = bod.offsetWidth + 1; + + // we use a for loop to ensure that if the queue is changed + // during this looping then it will consider new requests + for (var i = 0; i < rafWaitQueue.length; i++) { + rafWaitQueue[i](width); + } + rafWaitQueue.length = 0; + }); + } + + return init; + + function computeTimings(node, className, cacheKey) { + var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES); + var aD = timings.animationDelay; + var tD = timings.transitionDelay; + timings.maxDelay = aD && tD + ? Math.max(aD, tD) + : (aD || tD); + timings.maxDuration = Math.max( + timings.animationDuration * timings.animationIterationCount, + timings.transitionDuration); + + return timings; + } + + function init(element, options) { + var node = getDomNode(element); + if (!node || !node.parentNode) { + return closeAndReturnNoopAnimator(); + } + + options = prepareAnimationOptions(options); + + var temporaryStyles = []; + var classes = element.attr('class'); + var styles = packageStyles(options); + var animationClosed; + var animationPaused; + var animationCompleted; + var runner; + var runnerHost; + var maxDelay; + var maxDelayTime; + var maxDuration; + var maxDurationTime; + + if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) { + return closeAndReturnNoopAnimator(); + } + + var method = options.event && isArray(options.event) + ? options.event.join(' ') + : options.event; + + var isStructural = method && options.structural; + var structuralClassName = ''; + var addRemoveClassName = ''; + + if (isStructural) { + structuralClassName = pendClasses(method, 'ng-', true); + } else if (method) { + structuralClassName = method; + } + + if (options.addClass) { + addRemoveClassName += pendClasses(options.addClass, '-add'); + } + + if (options.removeClass) { + if (addRemoveClassName.length) { + addRemoveClassName += ' '; + } + addRemoveClassName += pendClasses(options.removeClass, '-remove'); + } + + // there may be a situation where a structural animation is combined together + // with CSS classes that need to resolve before the animation is computed. + // However this means that there is no explicit CSS code to block the animation + // from happening (by setting 0s none in the class name). If this is the case + // we need to apply the classes before the first rAF so we know to continue if + // there actually is a detected transition or keyframe animation + if (options.applyClassesEarly && addRemoveClassName.length) { + applyAnimationClasses(element, options); + addRemoveClassName = ''; + } + + var setupClasses = [structuralClassName, addRemoveClassName].join(' ').trim(); + var fullClassName = classes + ' ' + setupClasses; + var activeClasses = pendClasses(setupClasses, '-active'); + var hasToStyles = styles.to && Object.keys(styles.to).length > 0; + var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0; + + // there is no way we can trigger an animation if no styles and + // no classes are being applied which would then trigger a transition, + // unless there a is raw keyframe value that is applied to the element. + if (!containsKeyframeAnimation + && !hasToStyles + && !setupClasses) { + return closeAndReturnNoopAnimator(); + } + + var cacheKey, stagger; + if (options.stagger > 0) { + var staggerVal = parseFloat(options.stagger); + stagger = { + transitionDelay: staggerVal, + animationDelay: staggerVal, + transitionDuration: 0, + animationDuration: 0 + }; + } else { + cacheKey = gcsHashFn(node, fullClassName); + stagger = computeCachedCssStaggerStyles(node, setupClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES); + } + + $$jqLite.addClass(element, setupClasses); + + var applyOnlyDuration; + + if (options.transitionStyle) { + var transitionStyle = [TRANSITION_PROP, options.transitionStyle]; + applyInlineStyle(node, transitionStyle); + temporaryStyles.push(transitionStyle); + } + + if (options.duration >= 0) { + applyOnlyDuration = node.style[TRANSITION_PROP].length > 0; + var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration); + + // we set the duration so that it will be picked up by getComputedStyle later + applyInlineStyle(node, durationStyle); + temporaryStyles.push(durationStyle); + } + + if (options.keyframeStyle) { + var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle]; + applyInlineStyle(node, keyframeStyle); + temporaryStyles.push(keyframeStyle); + } + + var itemIndex = stagger + ? options.staggerIndex >= 0 + ? options.staggerIndex + : gcsLookup.count(cacheKey) + : 0; + + var isFirst = itemIndex === 0; + + // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY + // without causing any combination of transitions to kick in. By adding a negative delay value + // it forces the setup class' transition to end immediately. We later then remove the negative + // transition delay to allow for the transition to naturally do it's thing. The beauty here is + // that if there is no transition defined then nothing will happen and this will also allow + // other transitions to be stacked on top of each other without any chopping them out. + if (isFirst) { + blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE); + } + + var timings = computeTimings(node, fullClassName, cacheKey); + var relativeDelay = timings.maxDelay; + maxDelay = Math.max(relativeDelay, 0); + maxDuration = timings.maxDuration; + + var flags = {}; + flags.hasTransitions = timings.transitionDuration > 0; + flags.hasAnimations = timings.animationDuration > 0; + flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty == 'all'; + flags.applyTransitionDuration = hasToStyles && ( + (flags.hasTransitions && !flags.hasTransitionAll) + || (flags.hasAnimations && !flags.hasTransitions)); + flags.applyAnimationDuration = options.duration && flags.hasAnimations; + flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); + flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; + flags.recalculateTimingStyles = addRemoveClassName.length > 0; + + if (flags.applyTransitionDuration || flags.applyAnimationDuration) { + maxDuration = options.duration ? parseFloat(options.duration) : maxDuration; + + if (flags.applyTransitionDuration) { + flags.hasTransitions = true; + timings.transitionDuration = maxDuration; + applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0; + temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration)); + } + + if (flags.applyAnimationDuration) { + flags.hasAnimations = true; + timings.animationDuration = maxDuration; + temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration)); + } + } + + if (maxDuration === 0 && !flags.recalculateTimingStyles) { + return closeAndReturnNoopAnimator(); + } + + // we need to recalculate the delay value since we used a pre-emptive negative + // delay value and the delay value is required for the final event checking. This + // property will ensure that this will happen after the RAF phase has passed. + if (options.duration == null && timings.transitionDuration > 0) { + flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst; + } + + maxDelayTime = maxDelay * ONE_SECOND; + maxDurationTime = maxDuration * ONE_SECOND; + if (!options.skipBlocking) { + flags.blockTransition = timings.transitionDuration > 0; + flags.blockKeyframeAnimation = timings.animationDuration > 0 && + stagger.animationDelay > 0 && + stagger.animationDuration === 0; + } + + applyAnimationFromStyles(element, options); + if (!flags.blockTransition) { + blockTransitions(node, false); + } + + applyBlocking(maxDuration); + + // TODO(matsko): for 1.5 change this code to have an animator object for better debugging + return { + $$willAnimate: true, + end: endFn, + start: function() { + if (animationClosed) return; + + runnerHost = { + end: endFn, + cancel: cancelFn, + resume: null, //this will be set during the start() phase + pause: null + }; + + runner = new $$AnimateRunner(runnerHost); + + waitUntilQuiet(start); + + // we don't have access to pause/resume the animation + // since it hasn't run yet. AnimateRunner will therefore + // set noop functions for resume and pause and they will + // later be overridden once the animation is triggered + return runner; + } + }; + + function endFn() { + close(); + } + + function cancelFn() { + close(true); + } + + function close(rejected) { // jshint ignore:line + // if the promise has been called already then we shouldn't close + // the animation again + if (animationClosed || (animationCompleted && animationPaused)) return; + animationClosed = true; + animationPaused = false; + + $$jqLite.removeClass(element, setupClasses); + $$jqLite.removeClass(element, activeClasses); + + blockKeyframeAnimations(node, false); + blockTransitions(node, false); + + forEach(temporaryStyles, function(entry) { + // There is only one way to remove inline style properties entirely from elements. + // By using `removeProperty` this works, but we need to convert camel-cased CSS + // styles down to hyphenated values. + node.style[entry[0]] = ''; + }); + + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + + // the reason why we have this option is to allow a synchronous closing callback + // that is fired as SOON as the animation ends (when the CSS is removed) or if + // the animation never takes off at all. A good example is a leave animation since + // the element must be removed just after the animation is over or else the element + // will appear on screen for one animation frame causing an overbearing flicker. + if (options.onDone) { + options.onDone(); + } + + // if the preparation function fails then the promise is not setup + if (runner) { + runner.complete(!rejected); + } + } + + function applyBlocking(duration) { + if (flags.blockTransition) { + blockTransitions(node, duration); + } + + if (flags.blockKeyframeAnimation) { + blockKeyframeAnimations(node, !!duration); + } + } + + function closeAndReturnNoopAnimator() { + runner = new $$AnimateRunner({ + end: endFn, + cancel: cancelFn + }); + + close(); + + return { + $$willAnimate: false, + start: function() { + return runner; + }, + end: endFn + }; + } + + function start() { + if (animationClosed) return; + if (!node.parentNode) { + close(); + return; + } + + var startTime, events = []; + + // even though we only pause keyframe animations here the pause flag + // will still happen when transitions are used. Only the transition will + // not be paused since that is not possible. If the animation ends when + // paused then it will not complete until unpaused or cancelled. + var playPause = function(playAnimation) { + if (!animationCompleted) { + animationPaused = !playAnimation; + if (timings.animationDuration) { + var value = blockKeyframeAnimations(node, animationPaused); + animationPaused + ? temporaryStyles.push(value) + : removeFromArray(temporaryStyles, value); + } + } else if (animationPaused && playAnimation) { + animationPaused = false; + close(); + } + }; + + // checking the stagger duration prevents an accidently cascade of the CSS delay style + // being inherited from the parent. If the transition duration is zero then we can safely + // rely that the delay value is an intential stagger delay style. + var maxStagger = itemIndex > 0 + && ((timings.transitionDuration && stagger.transitionDuration === 0) || + (timings.animationDuration && stagger.animationDuration === 0)) + && Math.max(stagger.animationDelay, stagger.transitionDelay); + if (maxStagger) { + $timeout(triggerAnimationStart, + Math.floor(maxStagger * itemIndex * ONE_SECOND), + false); + } else { + triggerAnimationStart(); + } + + // this will decorate the existing promise runner with pause/resume methods + runnerHost.resume = function() { + playPause(true); + }; + + runnerHost.pause = function() { + playPause(false); + }; + + function triggerAnimationStart() { + // just incase a stagger animation kicks in when the animation + // itself was cancelled entirely + if (animationClosed) return; + + applyBlocking(false); + + forEach(temporaryStyles, function(entry) { + var key = entry[0]; + var value = entry[1]; + node.style[key] = value; + }); + + applyAnimationClasses(element, options); + $$jqLite.addClass(element, activeClasses); + + if (flags.recalculateTimingStyles) { + fullClassName = node.className + ' ' + setupClasses; + cacheKey = gcsHashFn(node, fullClassName); + + timings = computeTimings(node, fullClassName, cacheKey); + relativeDelay = timings.maxDelay; + maxDelay = Math.max(relativeDelay, 0); + maxDuration = timings.maxDuration; + + if (maxDuration === 0) { + close(); + return; + } + + flags.hasTransitions = timings.transitionDuration > 0; + flags.hasAnimations = timings.animationDuration > 0; + } + + if (flags.applyTransitionDelay || flags.applyAnimationDelay) { + relativeDelay = typeof options.delay !== "boolean" && truthyTimingValue(options.delay) + ? parseFloat(options.delay) + : relativeDelay; + + maxDelay = Math.max(relativeDelay, 0); + + var delayStyle; + if (flags.applyTransitionDelay) { + timings.transitionDelay = relativeDelay; + delayStyle = getCssDelayStyle(relativeDelay); + temporaryStyles.push(delayStyle); + node.style[delayStyle[0]] = delayStyle[1]; + } + + if (flags.applyAnimationDelay) { + timings.animationDelay = relativeDelay; + delayStyle = getCssDelayStyle(relativeDelay, true); + temporaryStyles.push(delayStyle); + node.style[delayStyle[0]] = delayStyle[1]; + } + } + + maxDelayTime = maxDelay * ONE_SECOND; + maxDurationTime = maxDuration * ONE_SECOND; + + if (options.easing) { + var easeProp, easeVal = options.easing; + if (flags.hasTransitions) { + easeProp = TRANSITION_PROP + TIMING_KEY; + temporaryStyles.push([easeProp, easeVal]); + node.style[easeProp] = easeVal; + } + if (flags.hasAnimations) { + easeProp = ANIMATION_PROP + TIMING_KEY; + temporaryStyles.push([easeProp, easeVal]); + node.style[easeProp] = easeVal; + } + } + + if (timings.transitionDuration) { + events.push(TRANSITIONEND_EVENT); + } + + if (timings.animationDuration) { + events.push(ANIMATIONEND_EVENT); + } + + startTime = Date.now(); + element.on(events.join(' '), onAnimationProgress); + $timeout(onAnimationExpired, maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime); + + applyAnimationToStyles(element, options); + } + + function onAnimationExpired() { + // although an expired animation is a failed animation, getting to + // this outcome is very easy if the CSS code screws up. Therefore we + // should still continue normally as if the animation completed correctly. + close(); + } + + function onAnimationProgress(event) { + event.stopPropagation(); + var ev = event.originalEvent || event; + var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now(); + + /* Firefox (or possibly just Gecko) likes to not round values up + * when a ms measurement is used for the animation */ + var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); + + /* $manualTimeStamp is a mocked timeStamp value which is set + * within browserTrigger(). This is only here so that tests can + * mock animations properly. Real events fallback to event.timeStamp, + * or, if they don't, then a timeStamp is automatically created for them. + * We're checking to see if the timeStamp surpasses the expected delay, + * but we're using elapsedTime instead of the timeStamp on the 2nd + * pre-condition since animations sometimes close off early */ + if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { + // we set this flag to ensure that if the transition is paused then, when resumed, + // the animation will automatically close itself since transitions cannot be paused. + animationCompleted = true; + close(); + } + } + } + } + }]; +}]; + +var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) { + $$animationProvider.drivers.push('$$animateCssDriver'); + + var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim'; + var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor'; + + var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out'; + var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in'; + + this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$document', '$sniffer', + function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $document, $sniffer) { + + // only browsers that support these properties can render animations + if (!$sniffer.animations && !$sniffer.transitions) return noop; + + var bodyNode = getDomNode($document).body; + var rootNode = getDomNode($rootElement); + + var rootBodyElement = jqLite(bodyNode.parentNode === rootNode ? bodyNode : rootNode); + + return function initDriverFn(animationDetails) { + return animationDetails.from && animationDetails.to + ? prepareFromToAnchorAnimation(animationDetails.from, + animationDetails.to, + animationDetails.classes, + animationDetails.anchors) + : prepareRegularAnimation(animationDetails); + }; + + function filterCssClasses(classes) { + //remove all the `ng-` stuff + return classes.replace(/\bng-\S+\b/g, ''); + } + + function getUniqueValues(a, b) { + if (isString(a)) a = a.split(' '); + if (isString(b)) b = b.split(' '); + return a.filter(function(val) { + return b.indexOf(val) === -1; + }).join(' '); + } + + function prepareAnchoredAnimation(classes, outAnchor, inAnchor) { + var clone = jqLite(getDomNode(outAnchor).cloneNode(true)); + var startingClasses = filterCssClasses(getClassVal(clone)); + + outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); + inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); + + clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME); + + rootBodyElement.append(clone); + + var animatorIn, animatorOut = prepareOutAnimation(); + + // the user may not end up using the `out` animation and + // only making use of the `in` animation or vice-versa. + // In either case we should allow this and not assume the + // animation is over unless both animations are not used. + if (!animatorOut) { + animatorIn = prepareInAnimation(); + if (!animatorIn) { + return end(); + } + } + + var startingAnimator = animatorOut || animatorIn; + + return { + start: function() { + var runner; + + var currentAnimation = startingAnimator.start(); + currentAnimation.done(function() { + currentAnimation = null; + if (!animatorIn) { + animatorIn = prepareInAnimation(); + if (animatorIn) { + currentAnimation = animatorIn.start(); + currentAnimation.done(function() { + currentAnimation = null; + end(); + runner.complete(); + }); + return currentAnimation; + } + } + // in the event that there is no `in` animation + end(); + runner.complete(); + }); + + runner = new $$AnimateRunner({ + end: endFn, + cancel: endFn + }); + + return runner; + + function endFn() { + if (currentAnimation) { + currentAnimation.end(); + } + } + } + }; + + function calculateAnchorStyles(anchor) { + var styles = {}; + + var coords = getDomNode(anchor).getBoundingClientRect(); + + // we iterate directly since safari messes up and doesn't return + // all the keys for the coods object when iterated + forEach(['width','height','top','left'], function(key) { + var value = coords[key]; + switch (key) { + case 'top': + value += bodyNode.scrollTop; + break; + case 'left': + value += bodyNode.scrollLeft; + break; + } + styles[key] = Math.floor(value) + 'px'; + }); + return styles; + } + + function prepareOutAnimation() { + var animator = $animateCss(clone, { + addClass: NG_OUT_ANCHOR_CLASS_NAME, + delay: true, + from: calculateAnchorStyles(outAnchor) + }); + + // read the comment within `prepareRegularAnimation` to understand + // why this check is necessary + return animator.$$willAnimate ? animator : null; + } + + function getClassVal(element) { + return element.attr('class') || ''; + } + + function prepareInAnimation() { + var endingClasses = filterCssClasses(getClassVal(inAnchor)); + var toAdd = getUniqueValues(endingClasses, startingClasses); + var toRemove = getUniqueValues(startingClasses, endingClasses); + + var animator = $animateCss(clone, { + to: calculateAnchorStyles(inAnchor), + addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd, + removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove, + delay: true + }); + + // read the comment within `prepareRegularAnimation` to understand + // why this check is necessary + return animator.$$willAnimate ? animator : null; + } + + function end() { + clone.remove(); + outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); + inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); + } + } + + function prepareFromToAnchorAnimation(from, to, classes, anchors) { + var fromAnimation = prepareRegularAnimation(from); + var toAnimation = prepareRegularAnimation(to); + + var anchorAnimations = []; + forEach(anchors, function(anchor) { + var outElement = anchor['out']; + var inElement = anchor['in']; + var animator = prepareAnchoredAnimation(classes, outElement, inElement); + if (animator) { + anchorAnimations.push(animator); + } + }); + + // no point in doing anything when there are no elements to animate + if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return; + + return { + start: function() { + var animationRunners = []; + + if (fromAnimation) { + animationRunners.push(fromAnimation.start()); + } + + if (toAnimation) { + animationRunners.push(toAnimation.start()); + } + + forEach(anchorAnimations, function(animation) { + animationRunners.push(animation.start()); + }); + + var runner = new $$AnimateRunner({ + end: endFn, + cancel: endFn // CSS-driven animations cannot be cancelled, only ended + }); + + $$AnimateRunner.all(animationRunners, function(status) { + runner.complete(status); + }); + + return runner; + + function endFn() { + forEach(animationRunners, function(runner) { + runner.end(); + }); + } + } + }; + } + + function prepareRegularAnimation(animationDetails) { + var element = animationDetails.element; + var options = animationDetails.options || {}; + + if (animationDetails.structural) { + // structural animations ensure that the CSS classes are always applied + // before the detection starts. + options.structural = options.applyClassesEarly = true; + + // we special case the leave animation since we want to ensure that + // the element is removed as soon as the animation is over. Otherwise + // a flicker might appear or the element may not be removed at all + options.event = animationDetails.event; + if (options.event === 'leave') { + options.onDone = options.domOperation; + } + } else { + options.event = null; + } + + var animator = $animateCss(element, options); + + // the driver lookup code inside of $$animation attempts to spawn a + // driver one by one until a driver returns a.$$willAnimate animator object. + // $animateCss will always return an object, however, it will pass in + // a flag as a hint as to whether an animation was detected or not + return animator.$$willAnimate ? animator : null; + } + }]; +}]; + +// TODO(matsko): use caching here to speed things up for detection +// TODO(matsko): add documentation +// by the time... + +var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) { + this.$get = ['$injector', '$$AnimateRunner', '$$rAFMutex', '$$jqLite', + function($injector, $$AnimateRunner, $$rAFMutex, $$jqLite) { + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + // $animateJs(element, 'enter'); + return function(element, event, classes, options) { + // the `classes` argument is optional and if it is not used + // then the classes will be resolved from the element's className + // property as well as options.addClass/options.removeClass. + if (arguments.length === 3 && isObject(classes)) { + options = classes; + classes = null; + } + + options = prepareAnimationOptions(options); + if (!classes) { + classes = element.attr('class') || ''; + if (options.addClass) { + classes += ' ' + options.addClass; + } + if (options.removeClass) { + classes += ' ' + options.removeClass; + } + } + + var classesToAdd = options.addClass; + var classesToRemove = options.removeClass; + + // the lookupAnimations function returns a series of animation objects that are + // matched up with one or more of the CSS classes. These animation objects are + // defined via the module.animation factory function. If nothing is detected then + // we don't return anything which then makes $animation query the next driver. + var animations = lookupAnimations(classes); + var before, after; + if (animations.length) { + var afterFn, beforeFn; + if (event == 'leave') { + beforeFn = 'leave'; + afterFn = 'afterLeave'; // TODO(matsko): get rid of this + } else { + beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1); + afterFn = event; + } + + if (event !== 'enter' && event !== 'move') { + before = packageAnimations(element, event, options, animations, beforeFn); + } + after = packageAnimations(element, event, options, animations, afterFn); + } + + // no matching animations + if (!before && !after) return; + + function applyOptions() { + options.domOperation(); + applyAnimationClasses(element, options); + } + + return { + start: function() { + var closeActiveAnimations; + var chain = []; + + if (before) { + chain.push(function(fn) { + closeActiveAnimations = before(fn); + }); + } + + if (chain.length) { + chain.push(function(fn) { + applyOptions(); + fn(true); + }); + } else { + applyOptions(); + } + + if (after) { + chain.push(function(fn) { + closeActiveAnimations = after(fn); + }); + } + + var animationClosed = false; + var runner = new $$AnimateRunner({ + end: function() { + endAnimations(); + }, + cancel: function() { + endAnimations(true); + } + }); + + $$AnimateRunner.chain(chain, onComplete); + return runner; + + function onComplete(success) { + animationClosed = true; + applyOptions(); + applyAnimationStyles(element, options); + runner.complete(success); + } + + function endAnimations(cancelled) { + if (!animationClosed) { + (closeActiveAnimations || noop)(cancelled); + onComplete(cancelled); + } + } + } + }; + + function executeAnimationFn(fn, element, event, options, onDone) { + var args; + switch (event) { + case 'animate': + args = [element, options.from, options.to, onDone]; + break; + + case 'setClass': + args = [element, classesToAdd, classesToRemove, onDone]; + break; + + case 'addClass': + args = [element, classesToAdd, onDone]; + break; + + case 'removeClass': + args = [element, classesToRemove, onDone]; + break; + + default: + args = [element, onDone]; + break; + } + + args.push(options); + + var value = fn.apply(fn, args); + if (value) { + if (isFunction(value.start)) { + value = value.start(); + } + + if (value instanceof $$AnimateRunner) { + value.done(onDone); + } else if (isFunction(value)) { + // optional onEnd / onCancel callback + return value; + } + } + + return noop; + } + + function groupEventedAnimations(element, event, options, animations, fnName) { + var operations = []; + forEach(animations, function(ani) { + var animation = ani[fnName]; + if (!animation) return; + + // note that all of these animations will run in parallel + operations.push(function() { + var runner; + var endProgressCb; + + var resolved = false; + var onAnimationComplete = function(rejected) { + if (!resolved) { + resolved = true; + (endProgressCb || noop)(rejected); + runner.complete(!rejected); + } + }; + + runner = new $$AnimateRunner({ + end: function() { + onAnimationComplete(); + }, + cancel: function() { + onAnimationComplete(true); + } + }); + + endProgressCb = executeAnimationFn(animation, element, event, options, function(result) { + var cancelled = result === false; + onAnimationComplete(cancelled); + }); + + return runner; + }); + }); + + return operations; + } + + function packageAnimations(element, event, options, animations, fnName) { + var operations = groupEventedAnimations(element, event, options, animations, fnName); + if (operations.length === 0) { + var a,b; + if (fnName === 'beforeSetClass') { + a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass'); + b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass'); + } else if (fnName === 'setClass') { + a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass'); + b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass'); + } + + if (a) { + operations = operations.concat(a); + } + if (b) { + operations = operations.concat(b); + } + } + + if (operations.length === 0) return; + + // TODO(matsko): add documentation + return function startAnimation(callback) { + var runners = []; + if (operations.length) { + forEach(operations, function(animateFn) { + runners.push(animateFn()); + }); + } + + runners.length ? $$AnimateRunner.all(runners, callback) : callback(); + + return function endFn(reject) { + forEach(runners, function(runner) { + reject ? runner.cancel() : runner.end(); + }); + }; + }; + } + }; + + function lookupAnimations(classes) { + classes = isArray(classes) ? classes : classes.split(' '); + var matches = [], flagMap = {}; + for (var i=0; i < classes.length; i++) { + var klass = classes[i], + animationFactory = $animateProvider.$$registeredAnimations[klass]; + if (animationFactory && !flagMap[klass]) { + matches.push($injector.get(animationFactory)); + flagMap[klass] = true; + } + } + return matches; + } + }]; +}]; + +var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) { + $$animationProvider.drivers.push('$$animateJsDriver'); + this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) { + return function initDriverFn(animationDetails) { + if (animationDetails.from && animationDetails.to) { + var fromAnimation = prepareAnimation(animationDetails.from); + var toAnimation = prepareAnimation(animationDetails.to); + if (!fromAnimation && !toAnimation) return; + + return { + start: function() { + var animationRunners = []; + + if (fromAnimation) { + animationRunners.push(fromAnimation.start()); + } + + if (toAnimation) { + animationRunners.push(toAnimation.start()); + } + + $$AnimateRunner.all(animationRunners, done); + + var runner = new $$AnimateRunner({ + end: endFnFactory(), + cancel: endFnFactory() + }); + + return runner; + + function endFnFactory() { + return function() { + forEach(animationRunners, function(runner) { + // at this point we cannot cancel animations for groups just yet. 1.5+ + runner.end(); + }); + }; + } + + function done(status) { + runner.complete(status); + } + } + }; + } else { + return prepareAnimation(animationDetails); + } + }; + + function prepareAnimation(animationDetails) { + // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations + var element = animationDetails.element; + var event = animationDetails.event; + var options = animationDetails.options; + var classes = animationDetails.classes; + return $$animateJs(element, event, classes, options); + } + }]; +}]; + +var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; +var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; +var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { + var PRE_DIGEST_STATE = 1; + var RUNNING_STATE = 2; + + var rules = this.rules = { + skip: [], + cancel: [], + join: [] + }; + + function isAllowed(ruleType, element, currentAnimation, previousAnimation) { + return rules[ruleType].some(function(fn) { + return fn(element, currentAnimation, previousAnimation); + }); + } + + function hasAnimationClasses(options, and) { + options = options || {}; + var a = (options.addClass || '').length > 0; + var b = (options.removeClass || '').length > 0; + return and ? a && b : a || b; + } + + rules.join.push(function(element, newAnimation, currentAnimation) { + // if the new animation is class-based then we can just tack that on + return !newAnimation.structural && hasAnimationClasses(newAnimation.options); + }); + + rules.skip.push(function(element, newAnimation, currentAnimation) { + // there is no need to animate anything if no classes are being added and + // there is no structural animation that will be triggered + return !newAnimation.structural && !hasAnimationClasses(newAnimation.options); + }); + + rules.skip.push(function(element, newAnimation, currentAnimation) { + // why should we trigger a new structural animation if the element will + // be removed from the DOM anyway? + return currentAnimation.event == 'leave' && newAnimation.structural; + }); + + rules.skip.push(function(element, newAnimation, currentAnimation) { + // if there is a current animation then skip the class-based animation + return currentAnimation.structural && !newAnimation.structural; + }); + + rules.cancel.push(function(element, newAnimation, currentAnimation) { + // there can never be two structural animations running at the same time + return currentAnimation.structural && newAnimation.structural; + }); + + rules.cancel.push(function(element, newAnimation, currentAnimation) { + // if the previous animation is already running, but the new animation will + // be triggered, but the new animation is structural + return currentAnimation.state === RUNNING_STATE && newAnimation.structural; + }); + + rules.cancel.push(function(element, newAnimation, currentAnimation) { + var nO = newAnimation.options; + var cO = currentAnimation.options; + + // if the exact same CSS class is added/removed then it's safe to cancel it + return (nO.addClass && nO.addClass === cO.removeClass) || (nO.removeClass && nO.removeClass === cO.addClass); + }); + + this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$HashMap', + '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', + function($$rAF, $rootScope, $rootElement, $document, $$HashMap, + $$animation, $$AnimateRunner, $templateRequest, $$jqLite) { + + var activeAnimationsLookup = new $$HashMap(); + var disabledElementsLookup = new $$HashMap(); + + var animationsEnabled = null; + + // Wait until all directive and route-related templates are downloaded and + // compiled. The $templateRequest.totalPendingRequests variable keeps track of + // all of the remote templates being currently downloaded. If there are no + // templates currently downloading then the watcher will still fire anyway. + var deregisterWatch = $rootScope.$watch( + function() { return $templateRequest.totalPendingRequests === 0; }, + function(isEmpty) { + if (!isEmpty) return; + deregisterWatch(); + + // Now that all templates have been downloaded, $animate will wait until + // the post digest queue is empty before enabling animations. By having two + // calls to $postDigest calls we can ensure that the flag is enabled at the + // very end of the post digest queue. Since all of the animations in $animate + // use $postDigest, it's important that the code below executes at the end. + // This basically means that the page is fully downloaded and compiled before + // any animations are triggered. + $rootScope.$$postDigest(function() { + $rootScope.$$postDigest(function() { + // we check for null directly in the event that the application already called + // .enabled() with whatever arguments that it provided it with + if (animationsEnabled === null) { + animationsEnabled = true; + } + }); + }); + } + ); + + var bodyElement = jqLite($document[0].body); + + var callbackRegistry = {}; + + // remember that the classNameFilter is set during the provider/config + // stage therefore we can optimize here and setup a helper function + var classNameFilter = $animateProvider.classNameFilter(); + var isAnimatableClassName = !classNameFilter + ? function() { return true; } + : function(className) { + return classNameFilter.test(className); + }; + + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + function normalizeAnimationOptions(element, options) { + return mergeAnimationOptions(element, options, {}); + } + + function findCallbacks(element, event) { + var targetNode = getDomNode(element); + + var matches = []; + var entries = callbackRegistry[event]; + if (entries) { + forEach(entries, function(entry) { + if (entry.node.contains(targetNode)) { + matches.push(entry.callback); + } + }); + } + + return matches; + } + + function triggerCallback(event, element, phase, data) { + $$rAF(function() { + forEach(findCallbacks(element, event), function(callback) { + callback(element, phase, data); + }); + }); + } + + return { + on: function(event, container, callback) { + var node = extractElementNode(container); + callbackRegistry[event] = callbackRegistry[event] || []; + callbackRegistry[event].push({ + node: node, + callback: callback + }); + }, + + off: function(event, container, callback) { + var entries = callbackRegistry[event]; + if (!entries) return; + + callbackRegistry[event] = arguments.length === 1 + ? null + : filterFromRegistry(entries, container, callback); + + function filterFromRegistry(list, matchContainer, matchCallback) { + var containerNode = extractElementNode(matchContainer); + return list.filter(function(entry) { + var isMatch = entry.node === containerNode && + (!matchCallback || entry.callback === matchCallback); + return !isMatch; + }); + } + }, + + pin: function(element, parentElement) { + assertArg(isElement(element), 'element', 'not an element'); + assertArg(isElement(parentElement), 'parentElement', 'not an element'); + element.data(NG_ANIMATE_PIN_DATA, parentElement); + }, + + push: function(element, event, options, domOperation) { + options = options || {}; + options.domOperation = domOperation; + return queueAnimation(element, event, options); + }, + + // this method has four signatures: + // () - global getter + // (bool) - global setter + // (element) - element getter + // (element, bool) - element setter + enabled: function(element, bool) { + var argCount = arguments.length; + + if (argCount === 0) { + // () - Global getter + bool = !!animationsEnabled; + } else { + var hasElement = isElement(element); + + if (!hasElement) { + // (bool) - Global setter + bool = animationsEnabled = !!element; + } else { + var node = getDomNode(element); + var recordExists = disabledElementsLookup.get(node); + + if (argCount === 1) { + // (element) - Element getter + bool = !recordExists; + } else { + // (element, bool) - Element setter + bool = !!bool; + if (!bool) { + disabledElementsLookup.put(node, true); + } else if (recordExists) { + disabledElementsLookup.remove(node); + } + } + } + } + + return bool; + } + }; + + function queueAnimation(element, event, options) { + var node, parent; + element = stripCommentsFromElement(element); + if (element) { + node = getDomNode(element); + parent = element.parent(); + } + + options = prepareAnimationOptions(options); + + // we create a fake runner with a working promise. + // These methods will become available after the digest has passed + var runner = new $$AnimateRunner(); + + // there are situations where a directive issues an animation for + // a jqLite wrapper that contains only comment nodes... If this + // happens then there is no way we can perform an animation + if (!node) { + close(); + return runner; + } + + if (isArray(options.addClass)) { + options.addClass = options.addClass.join(' '); + } + + if (isArray(options.removeClass)) { + options.removeClass = options.removeClass.join(' '); + } + + if (options.from && !isObject(options.from)) { + options.from = null; + } + + if (options.to && !isObject(options.to)) { + options.to = null; + } + + var className = [node.className, options.addClass, options.removeClass].join(' '); + if (!isAnimatableClassName(className)) { + close(); + return runner; + } + + var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; + + // this is a hard disable of all animations for the application or on + // the element itself, therefore there is no need to continue further + // past this point if not enabled + var skipAnimations = !animationsEnabled || disabledElementsLookup.get(node); + var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {}; + var hasExistingAnimation = !!existingAnimation.state; + + // there is no point in traversing the same collection of parent ancestors if a followup + // animation will be run on the same element that already did all that checking work + if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state != PRE_DIGEST_STATE)) { + skipAnimations = !areAnimationsAllowed(element, parent, event); + } + + if (skipAnimations) { + close(); + return runner; + } + + if (isStructural) { + closeChildAnimations(element); + } + + var newAnimation = { + structural: isStructural, + element: element, + event: event, + close: close, + options: options, + runner: runner + }; + + if (hasExistingAnimation) { + var skipAnimationFlag = isAllowed('skip', element, newAnimation, existingAnimation); + if (skipAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + close(); + return runner; + } else { + mergeAnimationOptions(element, existingAnimation.options, options); + return existingAnimation.runner; + } + } + + var cancelAnimationFlag = isAllowed('cancel', element, newAnimation, existingAnimation); + if (cancelAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + // this will end the animation right away and it is safe + // to do so since the animation is already running and the + // runner callback code will run in async + existingAnimation.runner.end(); + } else if (existingAnimation.structural) { + // this means that the animation is queued into a digest, but + // hasn't started yet. Therefore it is safe to run the close + // method which will call the runner methods in async. + existingAnimation.close(); + } else { + // this will merge the existing animation options into this new follow-up animation + mergeAnimationOptions(element, newAnimation.options, existingAnimation.options); + } + } else { + // a joined animation means that this animation will take over the existing one + // so an example would involve a leave animation taking over an enter. Then when + // the postDigest kicks in the enter will be ignored. + var joinAnimationFlag = isAllowed('join', element, newAnimation, existingAnimation); + if (joinAnimationFlag) { + if (existingAnimation.state === RUNNING_STATE) { + normalizeAnimationOptions(element, options); + } else { + event = newAnimation.event = existingAnimation.event; + options = mergeAnimationOptions(element, existingAnimation.options, newAnimation.options); + return runner; + } + } + } + } else { + // normalization in this case means that it removes redundant CSS classes that + // already exist (addClass) or do not exist (removeClass) on the element + normalizeAnimationOptions(element, options); + } + + // when the options are merged and cleaned up we may end up not having to do + // an animation at all, therefore we should check this before issuing a post + // digest callback. Structural animations will always run no matter what. + var isValidAnimation = newAnimation.structural; + if (!isValidAnimation) { + // animate (from/to) can be quickly checked first, otherwise we check if any classes are present + isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0) + || hasAnimationClasses(newAnimation.options); + } + + if (!isValidAnimation) { + close(); + clearElementAnimationState(element); + return runner; + } + + if (isStructural) { + closeParentClassBasedAnimations(parent); + } + + // the counter keeps track of cancelled animations + var counter = (existingAnimation.counter || 0) + 1; + newAnimation.counter = counter; + + markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation); + + $rootScope.$$postDigest(function() { + var animationDetails = activeAnimationsLookup.get(node); + var animationCancelled = !animationDetails; + animationDetails = animationDetails || {}; + + // if addClass/removeClass is called before something like enter then the + // registered parent element may not be present. The code below will ensure + // that a final value for parent element is obtained + var parentElement = element.parent() || []; + + // animate/structural/class-based animations all have requirements. Otherwise there + // is no point in performing an animation. The parent node must also be set. + var isValidAnimation = parentElement.length > 0 + && (animationDetails.event === 'animate' + || animationDetails.structural + || hasAnimationClasses(animationDetails.options)); + + // this means that the previous animation was cancelled + // even if the follow-up animation is the same event + if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) { + // if another animation did not take over then we need + // to make sure that the domOperation and options are + // handled accordingly + if (animationCancelled) { + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + } + + // if the event changed from something like enter to leave then we do + // it, otherwise if it's the same then the end result will be the same too + if (animationCancelled || (isStructural && animationDetails.event !== event)) { + options.domOperation(); + runner.end(); + } + + // in the event that the element animation was not cancelled or a follow-up animation + // isn't allowed to animate from here then we need to clear the state of the element + // so that any future animations won't read the expired animation data. + if (!isValidAnimation) { + clearElementAnimationState(element); + } + + return; + } + + // this combined multiple class to addClass / removeClass into a setClass event + // so long as a structural event did not take over the animation + event = !animationDetails.structural && hasAnimationClasses(animationDetails.options, true) + ? 'setClass' + : animationDetails.event; + + if (animationDetails.structural) { + closeParentClassBasedAnimations(parentElement); + } + + markElementAnimationState(element, RUNNING_STATE); + var realRunner = $$animation(element, event, animationDetails.options); + realRunner.done(function(status) { + close(!status); + var animationDetails = activeAnimationsLookup.get(node); + if (animationDetails && animationDetails.counter === counter) { + clearElementAnimationState(getDomNode(element)); + } + notifyProgress(runner, event, 'close', {}); + }); + + // this will update the runner's flow-control events based on + // the `realRunner` object. + runner.setHost(realRunner); + notifyProgress(runner, event, 'start', {}); + }); + + return runner; + + function notifyProgress(runner, event, phase, data) { + triggerCallback(event, element, phase, data); + runner.progress(event, phase, data); + } + + function close(reject) { // jshint ignore:line + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + options.domOperation(); + runner.complete(!reject); + } + } + + function closeChildAnimations(element) { + var node = getDomNode(element); + var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']'); + forEach(children, function(child) { + var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME)); + var animationDetails = activeAnimationsLookup.get(child); + switch (state) { + case RUNNING_STATE: + animationDetails.runner.end(); + /* falls through */ + case PRE_DIGEST_STATE: + if (animationDetails) { + activeAnimationsLookup.remove(child); + } + break; + } + }); + } + + function clearElementAnimationState(element) { + var node = getDomNode(element); + node.removeAttribute(NG_ANIMATE_ATTR_NAME); + activeAnimationsLookup.remove(node); + } + + function isMatchingElement(nodeOrElmA, nodeOrElmB) { + return getDomNode(nodeOrElmA) === getDomNode(nodeOrElmB); + } + + function closeParentClassBasedAnimations(startingElement) { + var parentNode = getDomNode(startingElement); + do { + if (!parentNode || parentNode.nodeType !== ELEMENT_NODE) break; + + var animationDetails = activeAnimationsLookup.get(parentNode); + if (animationDetails) { + examineParentAnimation(parentNode, animationDetails); + } + + parentNode = parentNode.parentNode; + } while (true); + + // since animations are detected from CSS classes, we need to flush all parent + // class-based animations so that the parent classes are all present for child + // animations to properly function (otherwise any CSS selectors may not work) + function examineParentAnimation(node, animationDetails) { + // enter/leave/move always have priority + if (animationDetails.structural || !hasAnimationClasses(animationDetails.options)) return; + + if (animationDetails.state === RUNNING_STATE) { + animationDetails.runner.end(); + } + clearElementAnimationState(node); + } + } + + function areAnimationsAllowed(element, parentElement, event) { + var bodyElementDetected = false; + var rootElementDetected = false; + var parentAnimationDetected = false; + var animateChildren; + + var parentHost = element.data(NG_ANIMATE_PIN_DATA); + if (parentHost) { + parentElement = parentHost; + } + + while (parentElement && parentElement.length) { + if (!rootElementDetected) { + // angular doesn't want to attempt to animate elements outside of the application + // therefore we need to ensure that the rootElement is an ancestor of the current element + rootElementDetected = isMatchingElement(parentElement, $rootElement); + } + + var parentNode = parentElement[0]; + if (parentNode.nodeType !== ELEMENT_NODE) { + // no point in inspecting the #document element + break; + } + + var details = activeAnimationsLookup.get(parentNode) || {}; + // either an enter, leave or move animation will commence + // therefore we can't allow any animations to take place + // but if a parent animation is class-based then that's ok + if (!parentAnimationDetected) { + parentAnimationDetected = details.structural || disabledElementsLookup.get(parentNode); + } + + if (isUndefined(animateChildren) || animateChildren === true) { + var value = parentElement.data(NG_ANIMATE_CHILDREN_DATA); + if (isDefined(value)) { + animateChildren = value; + } + } + + // there is no need to continue traversing at this point + if (parentAnimationDetected && animateChildren === false) break; + + if (!rootElementDetected) { + // angular doesn't want to attempt to animate elements outside of the application + // therefore we need to ensure that the rootElement is an ancestor of the current element + rootElementDetected = isMatchingElement(parentElement, $rootElement); + if (!rootElementDetected) { + parentHost = parentElement.data(NG_ANIMATE_PIN_DATA); + if (parentHost) { + parentElement = parentHost; + } + } + } + + if (!bodyElementDetected) { + // we also need to ensure that the element is or will be apart of the body element + // otherwise it is pointless to even issue an animation to be rendered + bodyElementDetected = isMatchingElement(parentElement, bodyElement); + } + + parentElement = parentElement.parent(); + } + + var allowAnimation = !parentAnimationDetected || animateChildren; + return allowAnimation && rootElementDetected && bodyElementDetected; + } + + function markElementAnimationState(element, state, details) { + details = details || {}; + details.state = state; + + var node = getDomNode(element); + node.setAttribute(NG_ANIMATE_ATTR_NAME, state); + + var oldValue = activeAnimationsLookup.get(node); + var newValue = oldValue + ? extend(oldValue, details) + : details; + activeAnimationsLookup.put(node, newValue); + } + }]; +}]; + +var $$rAFMutexFactory = ['$$rAF', function($$rAF) { + return function() { + var passed = false; + $$rAF(function() { + passed = true; + }); + return function(fn) { + passed ? fn() : $$rAF(fn); + }; + }; +}]; + +var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) { + var INITIAL_STATE = 0; + var DONE_PENDING_STATE = 1; + var DONE_COMPLETE_STATE = 2; + + AnimateRunner.chain = function(chain, callback) { + var index = 0; + + next(); + function next() { + if (index === chain.length) { + callback(true); + return; + } + + chain[index](function(response) { + if (response === false) { + callback(false); + return; + } + index++; + next(); + }); + } + }; + + AnimateRunner.all = function(runners, callback) { + var count = 0; + var status = true; + forEach(runners, function(runner) { + runner.done(onProgress); + }); + + function onProgress(response) { + status = status && response; + if (++count === runners.length) { + callback(status); + } + } + }; + + function AnimateRunner(host) { + this.setHost(host); + + this._doneCallbacks = []; + this._runInAnimationFrame = $$rAFMutex(); + this._state = 0; + } + + AnimateRunner.prototype = { + setHost: function(host) { + this.host = host || {}; + }, + + done: function(fn) { + if (this._state === DONE_COMPLETE_STATE) { + fn(); + } else { + this._doneCallbacks.push(fn); + } + }, + + progress: noop, + + getPromise: function() { + if (!this.promise) { + var self = this; + this.promise = $q(function(resolve, reject) { + self.done(function(status) { + status === false ? reject() : resolve(); + }); + }); + } + return this.promise; + }, + + then: function(resolveHandler, rejectHandler) { + return this.getPromise().then(resolveHandler, rejectHandler); + }, + + 'catch': function(handler) { + return this.getPromise()['catch'](handler); + }, + + 'finally': function(handler) { + return this.getPromise()['finally'](handler); + }, + + pause: function() { + if (this.host.pause) { + this.host.pause(); + } + }, + + resume: function() { + if (this.host.resume) { + this.host.resume(); + } + }, + + end: function() { + if (this.host.end) { + this.host.end(); + } + this._resolve(true); + }, + + cancel: function() { + if (this.host.cancel) { + this.host.cancel(); + } + this._resolve(false); + }, + + complete: function(response) { + var self = this; + if (self._state === INITIAL_STATE) { + self._state = DONE_PENDING_STATE; + self._runInAnimationFrame(function() { + self._resolve(response); + }); + } + }, + + _resolve: function(response) { + if (this._state !== DONE_COMPLETE_STATE) { + forEach(this._doneCallbacks, function(fn) { + fn(response); + }); + this._doneCallbacks.length = 0; + this._state = DONE_COMPLETE_STATE; + } + } + }; + + return AnimateRunner; +}]; + +var $$AnimationProvider = ['$animateProvider', function($animateProvider) { + var NG_ANIMATE_REF_ATTR = 'ng-animate-ref'; + + var drivers = this.drivers = []; + + var RUNNER_STORAGE_KEY = '$$animationRunner'; + + function setRunner(element, runner) { + element.data(RUNNER_STORAGE_KEY, runner); + } + + function removeRunner(element) { + element.removeData(RUNNER_STORAGE_KEY); + } + + function getRunner(element) { + return element.data(RUNNER_STORAGE_KEY); + } + + this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$rAFScheduler', + function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$rAFScheduler) { + + var animationQueue = []; + var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); + + var totalPendingClassBasedAnimations = 0; + var totalActiveClassBasedAnimations = 0; + var classBasedAnimationsQueue = []; + + // TODO(matsko): document the signature in a better way + return function(element, event, options) { + options = prepareAnimationOptions(options); + var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; + + // there is no animation at the current moment, however + // these runner methods will get later updated with the + // methods leading into the driver's end/cancel methods + // for now they just stop the animation from starting + var runner = new $$AnimateRunner({ + end: function() { close(); }, + cancel: function() { close(true); } + }); + + if (!drivers.length) { + close(); + return runner; + } + + setRunner(element, runner); + + var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass)); + var tempClasses = options.tempClasses; + if (tempClasses) { + classes += ' ' + tempClasses; + options.tempClasses = null; + } + + var classBasedIndex; + if (!isStructural) { + classBasedIndex = totalPendingClassBasedAnimations; + totalPendingClassBasedAnimations += 1; + } + + animationQueue.push({ + // this data is used by the postDigest code and passed into + // the driver step function + element: element, + classes: classes, + event: event, + classBasedIndex: classBasedIndex, + structural: isStructural, + options: options, + beforeStart: beforeStart, + close: close + }); + + element.on('$destroy', handleDestroyedElement); + + // we only want there to be one function called within the post digest + // block. This way we can group animations for all the animations that + // were apart of the same postDigest flush call. + if (animationQueue.length > 1) return runner; + + $rootScope.$$postDigest(function() { + totalActiveClassBasedAnimations = totalPendingClassBasedAnimations; + totalPendingClassBasedAnimations = 0; + classBasedAnimationsQueue.length = 0; + + var animations = []; + forEach(animationQueue, function(entry) { + // the element was destroyed early on which removed the runner + // form its storage. This means we can't animate this element + // at all and it already has been closed due to destruction. + if (getRunner(entry.element)) { + animations.push(entry); + } + }); + + // now any future animations will be in another postDigest + animationQueue.length = 0; + + forEach(groupAnimations(animations), function(animationEntry) { + if (animationEntry.structural) { + triggerAnimationStart(); + } else { + classBasedAnimationsQueue.push({ + node: getDomNode(animationEntry.element), + fn: triggerAnimationStart + }); + + if (animationEntry.classBasedIndex === totalActiveClassBasedAnimations - 1) { + // we need to sort each of the animations in order of parent to child + // relationships. This ensures that the child classes are applied at the + // right time. + classBasedAnimationsQueue = classBasedAnimationsQueue.sort(function(a,b) { + return b.node.contains(a.node); + }).map(function(entry) { + return entry.fn; + }); + + $$rAFScheduler(classBasedAnimationsQueue); + } + } + + function triggerAnimationStart() { + // it's important that we apply the `ng-animate` CSS class and the + // temporary classes before we do any driver invoking since these + // CSS classes may be required for proper CSS detection. + animationEntry.beforeStart(); + + var startAnimationFn, closeFn = animationEntry.close; + + // in the event that the element was removed before the digest runs or + // during the RAF sequencing then we should not trigger the animation. + var targetElement = animationEntry.anchors + ? (animationEntry.from.element || animationEntry.to.element) + : animationEntry.element; + + if (getRunner(targetElement) && getDomNode(targetElement).parentNode) { + var operation = invokeFirstDriver(animationEntry); + if (operation) { + startAnimationFn = operation.start; + } + } + + if (!startAnimationFn) { + closeFn(); + } else { + var animationRunner = startAnimationFn(); + animationRunner.done(function(status) { + closeFn(!status); + }); + updateAnimationRunners(animationEntry, animationRunner); + } + } + }); + }); + + return runner; + + // TODO(matsko): change to reference nodes + function getAnchorNodes(node) { + var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']'; + var items = node.hasAttribute(NG_ANIMATE_REF_ATTR) + ? [node] + : node.querySelectorAll(SELECTOR); + var anchors = []; + forEach(items, function(node) { + var attr = node.getAttribute(NG_ANIMATE_REF_ATTR); + if (attr && attr.length) { + anchors.push(node); + } + }); + return anchors; + } + + function groupAnimations(animations) { + var preparedAnimations = []; + var refLookup = {}; + forEach(animations, function(animation, index) { + var element = animation.element; + var node = getDomNode(element); + var event = animation.event; + var enterOrMove = ['enter', 'move'].indexOf(event) >= 0; + var anchorNodes = animation.structural ? getAnchorNodes(node) : []; + + if (anchorNodes.length) { + var direction = enterOrMove ? 'to' : 'from'; + + forEach(anchorNodes, function(anchor) { + var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR); + refLookup[key] = refLookup[key] || {}; + refLookup[key][direction] = { + animationID: index, + element: jqLite(anchor) + }; + }); + } else { + preparedAnimations.push(animation); + } + }); + + var usedIndicesLookup = {}; + var anchorGroups = {}; + forEach(refLookup, function(operations, key) { + var from = operations.from; + var to = operations.to; + + if (!from || !to) { + // only one of these is set therefore we can't have an + // anchor animation since all three pieces are required + var index = from ? from.animationID : to.animationID; + var indexKey = index.toString(); + if (!usedIndicesLookup[indexKey]) { + usedIndicesLookup[indexKey] = true; + preparedAnimations.push(animations[index]); + } + return; + } + + var fromAnimation = animations[from.animationID]; + var toAnimation = animations[to.animationID]; + var lookupKey = from.animationID.toString(); + if (!anchorGroups[lookupKey]) { + var group = anchorGroups[lookupKey] = { + structural: true, + beforeStart: function() { + fromAnimation.beforeStart(); + toAnimation.beforeStart(); + }, + close: function() { + fromAnimation.close(); + toAnimation.close(); + }, + classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes), + from: fromAnimation, + to: toAnimation, + anchors: [] // TODO(matsko): change to reference nodes + }; + + // the anchor animations require that the from and to elements both have at least + // one shared CSS class which effictively marries the two elements together to use + // the same animation driver and to properly sequence the anchor animation. + if (group.classes.length) { + preparedAnimations.push(group); + } else { + preparedAnimations.push(fromAnimation); + preparedAnimations.push(toAnimation); + } + } + + anchorGroups[lookupKey].anchors.push({ + 'out': from.element, 'in': to.element + }); + }); + + return preparedAnimations; + } + + function cssClassesIntersection(a,b) { + a = a.split(' '); + b = b.split(' '); + var matches = []; + + for (var i = 0; i < a.length; i++) { + var aa = a[i]; + if (aa.substring(0,3) === 'ng-') continue; + + for (var j = 0; j < b.length; j++) { + if (aa === b[j]) { + matches.push(aa); + break; + } + } + } + + return matches.join(' '); + } + + function invokeFirstDriver(animationDetails) { + // we loop in reverse order since the more general drivers (like CSS and JS) + // may attempt more elements, but custom drivers are more particular + for (var i = drivers.length - 1; i >= 0; i--) { + var driverName = drivers[i]; + if (!$injector.has(driverName)) continue; // TODO(matsko): remove this check + + var factory = $injector.get(driverName); + var driver = factory(animationDetails); + if (driver) { + return driver; + } + } + } + + function beforeStart() { + element.addClass(NG_ANIMATE_CLASSNAME); + if (tempClasses) { + $$jqLite.addClass(element, tempClasses); + } + } + + function updateAnimationRunners(animation, newRunner) { + if (animation.from && animation.to) { + update(animation.from.element); + update(animation.to.element); + } else { + update(animation.element); + } + + function update(element) { + getRunner(element).setHost(newRunner); + } + } + + function handleDestroyedElement() { + var runner = getRunner(element); + if (runner && (event !== 'leave' || !options.$$domOperationFired)) { + runner.end(); + } + } + + function close(rejected) { // jshint ignore:line + element.off('$destroy', handleDestroyedElement); + removeRunner(element); + + applyAnimationClasses(element, options); + applyAnimationStyles(element, options); + options.domOperation(); + + if (tempClasses) { + $$jqLite.removeClass(element, tempClasses); + } + + element.removeClass(NG_ANIMATE_CLASSNAME); + runner.complete(!rejected); + } + }; + }]; +}]; + +/* global angularAnimateModule: true, + + $$rAFMutexFactory, + $$rAFSchedulerFactory, + $$AnimateChildrenDirective, + $$AnimateRunnerFactory, + $$AnimateQueueProvider, + $$AnimationProvider, + $AnimateCssProvider, + $$AnimateCssDriverProvider, + $$AnimateJsProvider, + $$AnimateJsDriverProvider, +*/ + +/** + * @ngdoc module + * @name ngAnimate + * @description + * + * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via + * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` then the animation hooks are enabled for an Angular app. + * + *
+ * + * # Usage + * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based + * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For + * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within + * the HTML element that the animation will be triggered on. + * + * ## Directive Support + * The following directives are "animation aware": + * + * | Directive | Supported Animations | + * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| + * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move | + * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave | + * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave | + * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave | + * | {@link ng.directive:ngIf#animations ngIf} | enter and leave | + * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) | + * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) | + * | {@link module:ngMessages#animations ngMessage} | enter and leave | + * + * (More information can be found by visiting each the documentation associated with each directive.) + * + * ## CSS-based Animations + * + * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML + * and CSS code we can create an animation that will be picked up by Angular when an the underlying directive performs an operation. + * + * The example below shows how an `enter` animation can be made possible on a element using `ng-if`: + * + * ```html + *
+ * Fade me in out + *
+ * + * + * ``` + * + * Notice the CSS class **fade**? We can now create the CSS transition code that references this class: + * + * ```css + * /* The starting CSS styles for the enter animation */ + * .fade.ng-enter { + * transition:0.5s linear all; + * opacity:0; + * } + * + * /* The finishing CSS styles for the enter animation */ + * .fade.ng-enter.ng-enter-active { + * opacity:1; + * } + * ``` + * + * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two + * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition + * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards. + * + * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions: + * + * ```css + * /* now the element will fade out before it is removed from the DOM */ + * .fade.ng-leave { + * transition:0.5s linear all; + * opacity:1; + * } + * .fade.ng-leave.ng-leave-active { + * opacity:0; + * } + * ``` + * + * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class: + * + * ```css + * /* there is no need to define anything inside of the destination + * CSS class since the keyframe will take charge of the animation */ + * .fade.ng-leave { + * animation: my_fade_animation 0.5s linear; + * -webkit-animation: my_fade_animation 0.5s linear; + * } + * + * @keyframes my_fade_animation { + * from { opacity:1; } + * to { opacity:0; } + * } + * + * @-webkit-keyframes my_fade_animation { + * from { opacity:1; } + * to { opacity:0; } + * } + * ``` + * + * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element. + * + * ### CSS Class-based Animations + * + * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different + * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added + * and removed. + * + * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class: + * + * ```html + *
+ * Show and hide me + *
+ * + * + * + * ``` + * + * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since + * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest. + * + * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation + * with CSS styles. + * + * ```html + *
+ * Highlight this box + *
+ * + * + * + * ``` + * + * We can also make use of CSS keyframes by placing them within the CSS classes. + * + * + * ### CSS Staggering Animations + * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a + * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be + * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for + * the animation. The style property expected within the stagger class can either be a **transition-delay** or an + * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). + * + * ```css + * .my-animation.ng-enter { + * /* standard transition code */ + * transition: 1s linear all; + * opacity:0; + * } + * .my-animation.ng-enter-stagger { + * /* this will have a 100ms delay between each successive leave animation */ + * transition-delay: 0.1s; + * + * /* in case the stagger doesn't work then the duration value + * must be set to 0 to avoid an accidental CSS inheritance */ + * transition-duration: 0s; + * } + * .my-animation.ng-enter.ng-enter-active { + * /* standard transition styles */ + * opacity:1; + * } + * ``` + * + * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations + * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this + * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation + * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired. + * + * The following code will issue the **ng-leave-stagger** event on the element provided: + * + * ```js + * var kids = parent.children(); + * + * $animate.leave(kids[0]); //stagger index=0 + * $animate.leave(kids[1]); //stagger index=1 + * $animate.leave(kids[2]); //stagger index=2 + * $animate.leave(kids[3]); //stagger index=3 + * $animate.leave(kids[4]); //stagger index=4 + * + * window.requestAnimationFrame(function() { + * //stagger has reset itself + * $animate.leave(kids[5]); //stagger index=0 + * $animate.leave(kids[6]); //stagger index=1 + * + * $scope.$digest(); + * }); + * ``` + * + * Stagger animations are currently only supported within CSS-defined animations. + * + * ### The `ng-animate` CSS class + * + * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation. + * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations). + * + * Therefore, animations can be applied to an element using this temporary class directly via CSS. + * + * ```css + * .zipper.ng-animate { + * transition:0.5s linear all; + * } + * .zipper.ng-enter { + * opacity:0; + * } + * .zipper.ng-enter.ng-enter-active { + * opacity:1; + * } + * .zipper.ng-leave { + * opacity:1; + * } + * .zipper.ng-leave.ng-leave-active { + * opacity:0; + * } + * ``` + * + * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove + * the CSS class once an animation has completed.) + * + * + * ## JavaScript-based Animations + * + * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared + * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the + * `module.animation()` module function we can register the ainmation. + * + * Let's see an example of a enter/leave animation using `ngRepeat`: + * + * ```html + *
+ * {{ item }} + *
+ * ``` + * + * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`: + * + * ```js + * myModule.animation('.slide', [function() { + * return { + * // make note that other events (like addClass/removeClass) + * // have different function input parameters + * enter: function(element, doneFn) { + * jQuery(element).fadeIn(1000, doneFn); + * + * // remember to call doneFn so that angular + * // knows that the animation has concluded + * }, + * + * move: function(element, doneFn) { + * jQuery(element).fadeIn(1000, doneFn); + * }, + * + * leave: function(element, doneFn) { + * jQuery(element).fadeOut(1000, doneFn); + * } + * } + * }] + * ``` + * + * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as + * greensock.js and velocity.js. + * + * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define + * our animations inside of the same registered animation, however, the function input arguments are a bit different: + * + * ```html + *
+ * this box is moody + *
+ * + * + * + * ``` + * + * ```js + * myModule.animation('.colorful', [function() { + * return { + * addClass: function(element, className, doneFn) { + * // do some cool animation and call the doneFn + * }, + * removeClass: function(element, className, doneFn) { + * // do some cool animation and call the doneFn + * }, + * setClass: function(element, addedClass, removedClass, doneFn) { + * // do some cool animation and call the doneFn + * } + * } + * }] + * ``` + * + * ## CSS + JS Animations Together + * + * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular, + * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking + * charge of the animation**: + * + * ```html + *
+ * Slide in and out + *
+ * ``` + * + * ```js + * myModule.animation('.slide', [function() { + * return { + * enter: function(element, doneFn) { + * jQuery(element).slideIn(1000, doneFn); + * } + * } + * }] + * ``` + * + * ```css + * .slide.ng-enter { + * transition:0.5s linear all; + * transform:translateY(-100px); + * } + * .slide.ng-enter.ng-enter-active { + * transform:translateY(0); + * } + * ``` + * + * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the + * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from + * our own JS-based animation code: + * + * ```js + * myModule.animation('.slide', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { +* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`. + * var runner = $animateCss(element, { + * event: 'enter', + * structural: true + * }).start(); +* runner.done(doneFn); + * } + * } + * }] + * ``` + * + * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework. + * + * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or + * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that + * data into `$animateCss` directly: + * + * ```js + * myModule.animation('.slide', ['$animateCss', function($animateCss) { + * return { + * enter: function(element, doneFn) { + * var runner = $animateCss(element, { + * event: 'enter', + * addClass: 'maroon-setting', + * from: { height:0 }, + * to: { height: 200 } + * }).start(); + * + * runner.done(doneFn); + * } + * } + * }] + * ``` + * + * Now we can fill in the rest via our transition CSS code: + * + * ```css + * /* the transition tells ngAnimate to make the animation happen */ + * .slide.ng-enter { transition:0.5s linear all; } + * + * /* this extra CSS class will be absorbed into the transition + * since the $animateCss code is adding the class */ + * .maroon-setting { background:red; } + * ``` + * + * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over. + * + * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}. + * + * ## Animation Anchoring (via `ng-animate-ref`) + * + * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between + * structural areas of an application (like views) by pairing up elements using an attribute + * called `ng-animate-ref`. + * + * Let's say for example we have two views that are managed by `ng-view` and we want to show + * that there is a relationship between two components situated in within these views. By using the + * `ng-animate-ref` attribute we can identify that the two components are paired together and we + * can then attach an animation, which is triggered when the view changes. + * + * Say for example we have the following template code: + * + * ```html + * + *
+ *
+ * + * + * + * + * + * + * + * + * ``` + * + * Now, when the view changes (once the link is clicked), ngAnimate will examine the + * HTML contents to see if there is a match reference between any components in the view + * that is leaving and the view that is entering. It will scan both the view which is being + * removed (leave) and inserted (enter) to see if there are any paired DOM elements that + * contain a matching ref value. + * + * The two images match since they share the same ref value. ngAnimate will now create a + * transport element (which is a clone of the first image element) and it will then attempt + * to animate to the position of the second image element in the next view. For the animation to + * work a special CSS class called `ng-anchor` will be added to the transported element. + * + * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then + * ngAnimate will handle the entire transition for us as well as the addition and removal of + * any changes of CSS classes between the elements: + * + * ```css + * .banner.ng-anchor { + * /* this animation will last for 1 second since there are + * two phases to the animation (an `in` and an `out` phase) */ + * transition:0.5s linear all; + * } + * ``` + * + * We also **must** include animations for the views that are being entered and removed + * (otherwise anchoring wouldn't be possible since the new view would be inserted right away). + * + * ```css + * .view-animation.ng-enter, .view-animation.ng-leave { + * transition:0.5s linear all; + * position:fixed; + * left:0; + * top:0; + * width:100%; + * } + * .view-animation.ng-enter { + * transform:translateX(100%); + * } + * .view-animation.ng-leave, + * .view-animation.ng-enter.ng-enter-active { + * transform:translateX(0%); + * } + * .view-animation.ng-leave.ng-leave-active { + * transform:translateX(-100%); + * } + * ``` + * + * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur: + * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away + * from its origin. Once that animation is over then the `in` stage occurs which animates the + * element to its destination. The reason why there are two animations is to give enough time + * for the enter animation on the new element to be ready. + * + * The example above sets up a transition for both the in and out phases, but we can also target the out or + * in phases directly via `ng-anchor-out` and `ng-anchor-in`. + * + * ```css + * .banner.ng-anchor-out { + * transition: 0.5s linear all; + * + * /* the scale will be applied during the out animation, + * but will be animated away when the in animation runs */ + * transform: scale(1.2); + * } + * + * .banner.ng-anchor-in { + * transition: 1s linear all; + * } + * ``` + * + * + * + * + * ### Anchoring Demo + * + + + Home +
+
+
+
+
+ + angular.module('anchoringExample', ['ngAnimate', 'ngRoute']) + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/', { + templateUrl: 'home.html', + controller: 'HomeController as home' + }); + $routeProvider.when('/profile/:id', { + templateUrl: 'profile.html', + controller: 'ProfileController as profile' + }); + }]) + .run(['$rootScope', function($rootScope) { + $rootScope.records = [ + { id:1, title: "Miss Beulah Roob" }, + { id:2, title: "Trent Morissette" }, + { id:3, title: "Miss Ava Pouros" }, + { id:4, title: "Rod Pouros" }, + { id:5, title: "Abdul Rice" }, + { id:6, title: "Laurie Rutherford Sr." }, + { id:7, title: "Nakia McLaughlin" }, + { id:8, title: "Jordon Blanda DVM" }, + { id:9, title: "Rhoda Hand" }, + { id:10, title: "Alexandrea Sauer" } + ]; + }]) + .controller('HomeController', [function() { + //empty + }]) + .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) { + var index = parseInt($routeParams.id, 10); + var record = $rootScope.records[index - 1]; + + this.title = record.title; + this.id = record.id; + }]); + + +

Welcome to the home page

+

Please click on an element

+ + {{ record.title }} + +
+ +
+ {{ profile.title }} +
+
+ + .record { + display:block; + font-size:20px; + } + .profile { + background:black; + color:white; + font-size:100px; + } + .view-container { + position:relative; + } + .view-container > .view.ng-animate { + position:absolute; + top:0; + left:0; + width:100%; + min-height:500px; + } + .view.ng-enter, .view.ng-leave, + .record.ng-anchor { + transition:0.5s linear all; + } + .view.ng-enter { + transform:translateX(100%); + } + .view.ng-enter.ng-enter-active, .view.ng-leave { + transform:translateX(0%); + } + .view.ng-leave.ng-leave-active { + transform:translateX(-100%); + } + .record.ng-anchor-out { + background:red; + } + +
+ * + * ### How is the element transported? + * + * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting + * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element + * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The + * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match + * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied + * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class + * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element + * will become visible since the shim class will be removed. + * + * ### How is the morphing handled? + * + * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out + * what CSS classes differ between the starting element and the destination element. These different CSS classes + * will be added/removed on the anchor element and a transition will be applied (the transition that is provided + * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will + * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that + * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since + * the cloned element is placed inside of root element which is likely close to the body element). + * + * Note that if the root element is on the `` element then the cloned node will be placed inside of body. + * + * + * ## Using $animate in your directive code + * + * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application? + * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's + * imagine we have a greeting box that shows and hides itself when the data changes + * + * ```html + * Hi there + * ``` + * + * ```js + * ngModule.directive('greetingBox', ['$animate', function($animate) { + * return function(scope, element, attrs) { + * attrs.$observe('active', function(value) { + * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on'); + * }); + * }); + * }]); + * ``` + * + * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element + * in our HTML code then we can trigger a CSS or JS animation to happen. + * + * ```css + * /* normally we would create a CSS class to reference on the element */ + * greeting-box.on { transition:0.5s linear all; background:green; color:white; } + * ``` + * + * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's + * possible be sure to visit the {@link ng.$animate $animate service API page}. + * + * + * ### Preventing Collisions With Third Party Libraries + * + * Some third-party frameworks place animation duration defaults across many element or className + * selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which + * is expecting actual animations on these elements and has to wait for their completion. + * + * You can prevent this unwanted behavior by using a prefix on all your animation classes: + * + * ```css + * /* prefixed with animate- */ + * .animate-fade-add.animate-fade-add-active { + * transition:1s linear all; + * opacity:0; + * } + * ``` + * + * You then configure `$animate` to enforce this prefix: + * + * ```js + * $animateProvider.classNameFilter(/animate-/); + * ``` + * + * This also may provide your application with a speed boost since only specific elements containing CSS class prefix + * will be evaluated for animation when any DOM changes occur in the application. + * + * ## Callbacks and Promises + * + * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger + * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has + * ended by chaining onto the returned promise that animation method returns. + * + * ```js + * // somewhere within the depths of the directive + * $animate.enter(element, parent).then(function() { + * //the animation has completed + * }); + * ``` + * + * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case + * anymore.) + * + * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering + * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view + * routing controller to hook into that: + * + * ```js + * ngModule.controller('HomePageController', ['$animate', function($animate) { + * $animate.on('enter', ngViewElement, function(element) { + * // the animation for this route has completed + * }]); + * }]) + * ``` + * + * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.) + */ + +/** + * @ngdoc service + * @name $animate + * @kind object + * + * @description + * The ngAnimate `$animate` service documentation is the same for the core `$animate` service. + * + * Click here {@link ng.$animate $animate to learn more about animations with `$animate`}. + */ +angular.module('ngAnimate', []) + .directive('ngAnimateChildren', $$AnimateChildrenDirective) + + .factory('$$rAFMutex', $$rAFMutexFactory) + .factory('$$rAFScheduler', $$rAFSchedulerFactory) + + .factory('$$AnimateRunner', $$AnimateRunnerFactory) + + .provider('$$animateQueue', $$AnimateQueueProvider) + .provider('$$animation', $$AnimationProvider) + + .provider('$animateCss', $AnimateCssProvider) + .provider('$$animateCssDriver', $$AnimateCssDriverProvider) + + .provider('$$animateJs', $$AnimateJsProvider) + .provider('$$animateJsDriver', $$AnimateJsDriverProvider); + + +})(window, window.angular); diff --git a/client/www/lib/angular-animate/angular-animate.min.js b/client/www/lib/angular-animate/angular-animate.min.js new file mode 100644 index 0000000..a99eac1 --- /dev/null +++ b/client/www/lib/angular-animate/angular-animate.min.js @@ -0,0 +1,52 @@ +/* + AngularJS v1.4.3 + (c) 2010-2015 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(F,t,W){'use strict';function ua(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function va(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Ea(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function ba(a,b,c){var d="";a=X(a)?a:a&&U(a)&&a.length?a.split(/\s+/):[];u(a,function(a,s){a&&0=F&&b>=J&&(C=!0,m())}if(!K)if(g.parentNode){var x,p=[],k=function(a){if(C)D&&a&&(D=!1,m());else if(D=!a,y.animationDuration)if(a= +ma(g,D),D)l.push(a);else{var b=l,c=b.indexOf(a);0<=a&&b.splice(c,1)}},r=0", + "license": "MIT", + "bugs": { + "url": "https://github.com/angular/angular.js/issues" + }, + "homepage": "http://angularjs.org" +} diff --git a/client/www/lib/angular-cookies/.bower.json b/client/www/lib/angular-cookies/.bower.json new file mode 100644 index 0000000..7650604 --- /dev/null +++ b/client/www/lib/angular-cookies/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "angular-cookies", + "version": "1.5.5", + "license": "MIT", + "main": "./angular-cookies.js", + "ignore": [], + "dependencies": { + "angular": "1.5.5" + }, + "homepage": "https://github.com/angular/bower-angular-cookies", + "_release": "1.5.5", + "_resolution": { + "type": "version", + "tag": "v1.5.5", + "commit": "657881516515f6197a240fc3cbfcd8ff912c8ed0" + }, + "_source": "https://github.com/angular/bower-angular-cookies.git", + "_target": "^1.5.5", + "_originalSource": "angular-cookies" +} \ No newline at end of file diff --git a/client/www/lib/angular-cookies/README.md b/client/www/lib/angular-cookies/README.md new file mode 100644 index 0000000..7b190d3 --- /dev/null +++ b/client/www/lib/angular-cookies/README.md @@ -0,0 +1,68 @@ +# packaged angular-cookies + +This repo is for distribution on `npm` and `bower`. The source for this module is in the +[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngCookies). +Please file issues and pull requests against that repo. + +## Install + +You can install this package either with `npm` or with `bower`. + +### npm + +```shell +npm install angular-cookies +``` + +Then add `ngCookies` as a dependency for your app: + +```javascript +angular.module('myApp', [require('angular-cookies')]); +``` + +### bower + +```shell +bower install angular-cookies +``` + +Add a ` +``` + +Then add `ngCookies` as a dependency for your app: + +```javascript +angular.module('myApp', ['ngCookies']); +``` + +## Documentation + +Documentation is available on the +[AngularJS docs site](http://docs.angularjs.org/api/ngCookies). + +## License + +The MIT License + +Copyright (c) 2010-2015 Google, Inc. http://angularjs.org + +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/client/www/lib/angular-cookies/angular-cookies.js b/client/www/lib/angular-cookies/angular-cookies.js new file mode 100644 index 0000000..435a105 --- /dev/null +++ b/client/www/lib/angular-cookies/angular-cookies.js @@ -0,0 +1,322 @@ +/** + * @license AngularJS v1.5.5 + * (c) 2010-2016 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular) {'use strict'; + +/** + * @ngdoc module + * @name ngCookies + * @description + * + * # ngCookies + * + * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies. + * + * + *
+ * + * See {@link ngCookies.$cookies `$cookies`} for usage. + */ + + +angular.module('ngCookies', ['ng']). + /** + * @ngdoc provider + * @name $cookiesProvider + * @description + * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service. + * */ + provider('$cookies', [function $CookiesProvider() { + /** + * @ngdoc property + * @name $cookiesProvider#defaults + * @description + * + * Object containing default options to pass when setting cookies. + * + * The object may have following properties: + * + * - **path** - `{string}` - The cookie will be available only for this path and its + * sub-paths. By default, this is the URL that appears in your `` tag. + * - **domain** - `{string}` - The cookie will be available only for this domain and + * its sub-domains. For security reasons the user agent will not accept the cookie + * if the current domain is not a sub-domain of this domain or equal to it. + * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" + * or a Date object indicating the exact date/time this cookie will expire. + * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a + * secured connection. + * + * Note: By default, the address that appears in your `` tag will be used as the path. + * This is important so that cookies will be visible for all routes when html5mode is enabled. + * + **/ + var defaults = this.defaults = {}; + + function calcOptions(options) { + return options ? angular.extend({}, defaults, options) : defaults; + } + + /** + * @ngdoc service + * @name $cookies + * + * @description + * Provides read/write access to browser's cookies. + * + *
+ * Up until Angular 1.3, `$cookies` exposed properties that represented the + * current browser cookie values. In version 1.4, this behavior has changed, and + * `$cookies` now provides a standard api of getters, setters etc. + *
+ * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + * @example + * + * ```js + * angular.module('cookiesExample', ['ngCookies']) + * .controller('ExampleController', ['$cookies', function($cookies) { + * // Retrieving a cookie + * var favoriteCookie = $cookies.get('myFavorite'); + * // Setting a cookie + * $cookies.put('myFavorite', 'oatmeal'); + * }]); + * ``` + */ + this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) { + return { + /** + * @ngdoc method + * @name $cookies#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {string} Raw cookie value. + */ + get: function(key) { + return $$cookieReader()[key]; + }, + + /** + * @ngdoc method + * @name $cookies#getObject + * + * @description + * Returns the deserialized value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value. + */ + getObject: function(key) { + var value = this.get(key); + return value ? angular.fromJson(value) : value; + }, + + /** + * @ngdoc method + * @name $cookies#getAll + * + * @description + * Returns a key value object with all the cookies + * + * @returns {Object} All cookies + */ + getAll: function() { + return $$cookieReader(); + }, + + /** + * @ngdoc method + * @name $cookies#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {string} value Raw value to be stored. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + put: function(key, value, options) { + $$cookieWriter(key, value, calcOptions(options)); + }, + + /** + * @ngdoc method + * @name $cookies#putObject + * + * @description + * Serializes and sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + putObject: function(key, value, options) { + this.put(key, angular.toJson(value), options); + }, + + /** + * @ngdoc method + * @name $cookies#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + * @param {Object=} options Options object. + * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} + */ + remove: function(key, options) { + $$cookieWriter(key, undefined, calcOptions(options)); + } + }; + }]; + }]); + +angular.module('ngCookies'). +/** + * @ngdoc service + * @name $cookieStore + * @deprecated + * @requires $cookies + * + * @description + * Provides a key-value (string-object) storage, that is backed by session cookies. + * Objects put or retrieved from this storage are automatically serialized or + * deserialized by angular's toJson/fromJson. + * + * Requires the {@link ngCookies `ngCookies`} module to be installed. + * + *
+ * **Note:** The $cookieStore service is **deprecated**. + * Please use the {@link ngCookies.$cookies `$cookies`} service instead. + *
+ * + * @example + * + * ```js + * angular.module('cookieStoreExample', ['ngCookies']) + * .controller('ExampleController', ['$cookieStore', function($cookieStore) { + * // Put cookie + * $cookieStore.put('myFavorite','oatmeal'); + * // Get cookie + * var favoriteCookie = $cookieStore.get('myFavorite'); + * // Removing a cookie + * $cookieStore.remove('myFavorite'); + * }]); + * ``` + */ + factory('$cookieStore', ['$cookies', function($cookies) { + + return { + /** + * @ngdoc method + * @name $cookieStore#get + * + * @description + * Returns the value of given cookie key + * + * @param {string} key Id to use for lookup. + * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist. + */ + get: function(key) { + return $cookies.getObject(key); + }, + + /** + * @ngdoc method + * @name $cookieStore#put + * + * @description + * Sets a value for given cookie key + * + * @param {string} key Id for the `value`. + * @param {Object} value Value to be stored. + */ + put: function(key, value) { + $cookies.putObject(key, value); + }, + + /** + * @ngdoc method + * @name $cookieStore#remove + * + * @description + * Remove given cookie + * + * @param {string} key Id of the key-value pair to delete. + */ + remove: function(key) { + $cookies.remove(key); + } + }; + + }]); + +/** + * @name $$cookieWriter + * @requires $document + * + * @description + * This is a private service for writing cookies + * + * @param {string} name Cookie name + * @param {string=} value Cookie value (if undefined, cookie will be deleted) + * @param {Object=} options Object with options that need to be stored for the cookie. + */ +function $$CookieWriter($document, $log, $browser) { + var cookiePath = $browser.baseHref(); + var rawDocument = $document[0]; + + function buildCookieString(name, value, options) { + var path, expires; + options = options || {}; + expires = options.expires; + path = angular.isDefined(options.path) ? options.path : cookiePath; + if (angular.isUndefined(value)) { + expires = 'Thu, 01 Jan 1970 00:00:00 GMT'; + value = ''; + } + if (angular.isString(expires)) { + expires = new Date(expires); + } + + var str = encodeURIComponent(name) + '=' + encodeURIComponent(value); + str += path ? ';path=' + path : ''; + str += options.domain ? ';domain=' + options.domain : ''; + str += expires ? ';expires=' + expires.toUTCString() : ''; + str += options.secure ? ';secure' : ''; + + // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum: + // - 300 cookies + // - 20 cookies per unique domain + // - 4096 bytes per cookie + var cookieLength = str.length + 1; + if (cookieLength > 4096) { + $log.warn("Cookie '" + name + + "' possibly not set or overflowed because it was too large (" + + cookieLength + " > 4096 bytes)!"); + } + + return str; + } + + return function(name, value, options) { + rawDocument.cookie = buildCookieString(name, value, options); + }; +} + +$$CookieWriter.$inject = ['$document', '$log', '$browser']; + +angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() { + this.$get = $$CookieWriter; +}); + + +})(window, window.angular); diff --git a/client/www/lib/angular-cookies/angular-cookies.min.js b/client/www/lib/angular-cookies/angular-cookies.min.js new file mode 100644 index 0000000..6130312 --- /dev/null +++ b/client/www/lib/angular-cookies/angular-cookies.min.js @@ -0,0 +1,9 @@ +/* + AngularJS v1.5.5 + (c) 2010-2016 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", +["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); +//# sourceMappingURL=angular-cookies.min.js.map diff --git a/client/www/lib/angular-cookies/angular-cookies.min.js.map b/client/www/lib/angular-cookies/angular-cookies.min.js.map new file mode 100644 index 0000000..42f748a --- /dev/null +++ b/client/www/lib/angular-cookies/angular-cookies.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-cookies.min.js", +"lineCount":8, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkB,CA2Q3BC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB,EACrBE,EAAA,CAAUF,CAAAE,QACVD,EAAA,CAAOX,CAAAa,UAAA,CAAkBH,CAAAC,KAAlB,C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M,CACpBW,CAAAH,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CAjCzB,CAqIAjC,EAAA6C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB9C,EAAA0B,OAAA,CAAe,WAAf,CAAAC,SAAA,CAAqC,gBAArC,CAAuDoB,QAA+B,EAAG,CACvF,IAAAjB,KAAA,CAAY7B,CAD2E,CAAzF,CAvT2B,CAA1B,CAAD,CA4TGF,MA5TH,CA4TWA,MAAAC,QA5TX;", +"sources":["angular-cookies.js"], +"names":["window","angular","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","undefined","factory","$cookies","$inject","$$CookieWriterProvider"] +} diff --git a/client/www/lib/angular-cookies/bower.json b/client/www/lib/angular-cookies/bower.json new file mode 100644 index 0000000..b154350 --- /dev/null +++ b/client/www/lib/angular-cookies/bower.json @@ -0,0 +1,10 @@ +{ + "name": "angular-cookies", + "version": "1.5.5", + "license": "MIT", + "main": "./angular-cookies.js", + "ignore": [], + "dependencies": { + "angular": "1.5.5" + } +} diff --git a/client/www/lib/angular-cookies/index.js b/client/www/lib/angular-cookies/index.js new file mode 100644 index 0000000..6576675 --- /dev/null +++ b/client/www/lib/angular-cookies/index.js @@ -0,0 +1,2 @@ +require('./angular-cookies'); +module.exports = 'ngCookies'; diff --git a/client/www/lib/angular-cookies/package.json b/client/www/lib/angular-cookies/package.json new file mode 100644 index 0000000..045bba3 --- /dev/null +++ b/client/www/lib/angular-cookies/package.json @@ -0,0 +1,26 @@ +{ + "name": "angular-cookies", + "version": "1.5.5", + "description": "AngularJS module for cookies", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/angular/angular.js.git" + }, + "keywords": [ + "angular", + "framework", + "browser", + "cookies", + "client-side" + ], + "author": "Angular Core Team ", + "license": "MIT", + "bugs": { + "url": "https://github.com/angular/angular.js/issues" + }, + "homepage": "http://angularjs.org" +} diff --git a/client/www/lib/angular-filter/.bower.json b/client/www/lib/angular-filter/.bower.json new file mode 100644 index 0000000..96364fe --- /dev/null +++ b/client/www/lib/angular-filter/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "angular-filter", + "main": [ + "./dist/angular-filter.min.js" + ], + "description": "Bunch of useful filters for angularJS(with no external dependencies!)", + "repository": { + "type": "git", + "url": "https://github.com/a8m/angular-filter.git" + }, + "dependencies": { + "angular": "*" + }, + "devDependencies": { + "angular-mocks": "*" + }, + "ignore": [ + "node_modules", + "bower_components", + "package.json", + "lib", + "test", + "src", + "Gruntfile.js", + ".gitignore", + "README.md", + "travis.yml", + ".bowercc" + ], + "homepage": "https://github.com/a8m/angular-filter", + "version": "0.5.8", + "_release": "0.5.8", + "_resolution": { + "type": "version", + "tag": "v0.5.8", + "commit": "eadb09d9fd168f67d4b2129771f64b8202ff8e30" + }, + "_source": "https://github.com/a8m/angular-filter.git", + "_target": "^0.5.8", + "_originalSource": "angular-filter" +} \ No newline at end of file diff --git a/client/www/lib/angular-filter/.bowerrc b/client/www/lib/angular-filter/.bowerrc new file mode 100644 index 0000000..69fad35 --- /dev/null +++ b/client/www/lib/angular-filter/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "bower_components" +} diff --git a/client/www/lib/angular-filter/.travis.yml b/client/www/lib/angular-filter/.travis.yml new file mode 100644 index 0000000..2c573b8 --- /dev/null +++ b/client/www/lib/angular-filter/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.10' +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - 'npm install -g bower grunt-cli' + - 'bower install --config.interactive=false' diff --git a/client/www/lib/angular-filter/bower.json b/client/www/lib/angular-filter/bower.json new file mode 100644 index 0000000..99299ba --- /dev/null +++ b/client/www/lib/angular-filter/bower.json @@ -0,0 +1,31 @@ +{ + "name": "angular-filter", + "main": "dist/angular-filter.js", + "description": "Bunch of useful filters for angularJS(with no external dependencies!)", + "repository": { + "type": "git", + "url": "https://github.com/a8m/angular-filter.git" + }, + "dependencies": { + "angular": "*" + }, + "devDependencies": { + "angular-mocks": "*" + }, + "main":[ + "./dist/angular-filter.min.js" + ], + "ignore": [ + "node_modules", + "bower_components", + "package.json", + "lib", + "test", + "src", + "Gruntfile.js", + ".gitignore", + "README.md", + "travis.yml", + ".bowercc" + ] +} diff --git a/client/www/lib/angular-filter/dist/angular-filter.js b/client/www/lib/angular-filter/dist/angular-filter.js new file mode 100644 index 0000000..f50d9f9 --- /dev/null +++ b/client/www/lib/angular-filter/dist/angular-filter.js @@ -0,0 +1,2287 @@ +/** + * Bunch of useful filters for angularJS(with no external dependencies!) + * @version v0.5.7 - 2015-10-04 * @link https://github.com/a8m/angular-filter + * @author Ariel Mashraki + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +(function ( window, angular, undefined ) { +/*jshint globalstrict:true*/ +'use strict'; + +var isDefined = angular.isDefined, + isUndefined = angular.isUndefined, + isFunction = angular.isFunction, + isString = angular.isString, + isNumber = angular.isNumber, + isObject = angular.isObject, + isArray = angular.isArray, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy, + equals = angular.equals; + + +/** + * @description + * get an object and return array of values + * @param object + * @returns {Array} + */ +function toArray(object) { + return isArray(object) + ? object + : Object.keys(object).map(function(key) { + return object[key]; + }); +} + +/** + * @param value + * @returns {boolean} + */ +function isNull(value) { + return value === null; +} + +/** + * @description + * return if object contains partial object + * @param partial{object} + * @param object{object} + * @returns {boolean} + */ +function objectContains(partial, object) { + var keys = Object.keys(partial); + + return keys.map(function(el) { + return (object[el] !== undefined) && (object[el] == partial[el]); + }).indexOf(false) == -1; + +} + +/** + * @description + * search for approximate pattern in string + * @param word + * @param pattern + * @returns {*} + */ +function hasApproxPattern(word, pattern) { + if(pattern === '') + return word; + + var index = word.indexOf(pattern.charAt(0)); + + if(index === -1) + return false; + + return hasApproxPattern(word.substr(index+1), pattern.substr(1)) +} + +/** + * @description + * return the first n element of an array, + * if expression provided, is returns as long the expression return truthy + * @param array + * @param n {number} + * @param expression {$parse} + * @return array or single object + */ +function getFirstMatches(array, n, expression) { + var count = 0; + + return array.filter(function(elm) { + var rest = isDefined(expression) ? (count < n && expression(elm)) : count < n; + count = rest ? count+1 : count; + + return rest; + }); +} +/** + * Polyfill to ECMA6 String.prototype.contains + */ +if (!String.prototype.contains) { + String.prototype.contains = function() { + return String.prototype.indexOf.apply(this, arguments) !== -1; + }; +} + +/** + * @param num {Number} + * @param decimal {Number} + * @param $math + * @returns {Number} + */ +function convertToDecimal(num, decimal, $math){ + return $math.round(num * $math.pow(10,decimal)) / ($math.pow(10,decimal)); +} + +/** + * @description + * Get an object, and return an array composed of it's properties names(nested too). + * @param obj {Object} + * @param stack {Array} + * @param parent {String} + * @returns {Array} + * @example + * parseKeys({ a:1, b: { c:2, d: { e: 3 } } }) ==> ["a", "b.c", "b.d.e"] + */ +function deepKeys(obj, stack, parent) { + stack = stack || []; + var keys = Object.keys(obj); + + keys.forEach(function(el) { + //if it's a nested object + if(isObject(obj[el]) && !isArray(obj[el])) { + //concatenate the new parent if exist + var p = parent ? parent + '.' + el : parent; + deepKeys(obj[el], stack, p || el); + } else { + //create and save the key + var key = parent ? parent + '.' + el : el; + stack.push(key) + } + }); + return stack +} + +/** + * @description + * Test if given object is a Scope instance + * @param obj + * @returns {Boolean} + */ +function isScope(obj) { + return obj && obj.$evalAsync && obj.$watch; +} + +/** + * @ngdoc filter + * @name a8m.angular + * @kind function + * + * @description + * reference to angular function + */ + +angular.module('a8m.angular', []) + + .filter('isUndefined', function () { + return function (input) { + return angular.isUndefined(input); + } + }) + .filter('isDefined', function() { + return function (input) { + return angular.isDefined(input); + } + }) + .filter('isFunction', function() { + return function (input) { + return angular.isFunction(input); + } + }) + .filter('isString', function() { + return function (input) { + return angular.isString(input) + } + }) + .filter('isNumber', function() { + return function (input) { + return angular.isNumber(input); + } + }) + .filter('isArray', function() { + return function (input) { + return angular.isArray(input); + } + }) + .filter('isObject', function() { + return function (input) { + return angular.isObject(input); + } + }) + .filter('isEqual', function() { + return function (o1, o2) { + return angular.equals(o1, o2); + } + }); + +/** + * @ngdoc filter + * @name a8m.conditions + * @kind function + * + * @description + * reference to math conditions + */ + angular.module('a8m.conditions', []) + + .filter({ + isGreaterThan : isGreaterThanFilter, + '>' : isGreaterThanFilter, + + isGreaterThanOrEqualTo : isGreaterThanOrEqualToFilter, + '>=' : isGreaterThanOrEqualToFilter, + + isLessThan : isLessThanFilter, + '<' : isLessThanFilter, + + isLessThanOrEqualTo : isLessThanOrEqualToFilter, + '<=' : isLessThanOrEqualToFilter, + + isEqualTo : isEqualToFilter, + '==' : isEqualToFilter, + + isNotEqualTo : isNotEqualToFilter, + '!=' : isNotEqualToFilter, + + isIdenticalTo : isIdenticalToFilter, + '===' : isIdenticalToFilter, + + isNotIdenticalTo : isNotIdenticalToFilter, + '!==' : isNotIdenticalToFilter + }); + + function isGreaterThanFilter() { + return function (input, check) { + return input > check; + }; + } + + function isGreaterThanOrEqualToFilter() { + return function (input, check) { + return input >= check; + }; + } + + function isLessThanFilter() { + return function (input, check) { + return input < check; + }; + } + + function isLessThanOrEqualToFilter() { + return function (input, check) { + return input <= check; + }; + } + + function isEqualToFilter() { + return function (input, check) { + return input == check; + }; + } + + function isNotEqualToFilter() { + return function (input, check) { + return input != check; + }; + } + + function isIdenticalToFilter() { + return function (input, check) { + return input === check; + }; + } + + function isNotIdenticalToFilter() { + return function (input, check) { + return input !== check; + }; + } +/** + * @ngdoc filter + * @name isNull + * @kind function + * + * @description + * checks if value is null or not + * @return Boolean + */ +angular.module('a8m.is-null', []) + .filter('isNull', function () { + return function(input) { + return isNull(input); + } + }); + +/** + * @ngdoc filter + * @name after-where + * @kind function + * + * @description + * get a collection and properties object, and returns all of the items + * in the collection after the first that found with the given properties. + * + */ +angular.module('a8m.after-where', []) + .filter('afterWhere', function() { + return function (collection, object) { + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection) || isUndefined(object)) return collection; + + var index = collection.map( function( elm ) { + return objectContains(object, elm); + }).indexOf( true ); + + return collection.slice((index === -1) ? 0 : index); + } + }); + +/** + * @ngdoc filter + * @name after + * @kind function + * + * @description + * get a collection and specified count, and returns all of the items + * in the collection after the specified count. + * + */ + +angular.module('a8m.after', []) + .filter('after', function() { + return function (collection, count) { + collection = isObject(collection) + ? toArray(collection) + : collection; + + return (isArray(collection)) + ? collection.slice(count) + : collection; + } + }); + +/** + * @ngdoc filter + * @name before-where + * @kind function + * + * @description + * get a collection and properties object, and returns all of the items + * in the collection before the first that found with the given properties. + */ +angular.module('a8m.before-where', []) + .filter('beforeWhere', function() { + return function (collection, object) { + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection) || isUndefined(object)) return collection; + + var index = collection.map( function( elm ) { + return objectContains(object, elm); + }).indexOf( true ); + + return collection.slice(0, (index === -1) ? collection.length : ++index); + } + }); + +/** + * @ngdoc filter + * @name before + * @kind function + * + * @description + * get a collection and specified count, and returns all of the items + * in the collection before the specified count. + */ +angular.module('a8m.before', []) + .filter('before', function() { + return function (collection, count) { + collection = isObject(collection) + ? toArray(collection) + : collection; + + return (isArray(collection)) + ? collection.slice(0, (!count) ? count : --count) + : collection; + } + }); + +/** + * @ngdoc filter + * @name chunkBy + * @kind function + * + * @description + * Collect data into fixed-length chunks or blocks + */ + +angular.module('a8m.chunk-by', ['a8m.filter-watcher']) + .filter('chunkBy', ['filterWatcher', function (filterWatcher) { + return function (array, n, fillVal) { + + return filterWatcher.isMemoized('chunkBy', arguments) || + filterWatcher.memoize('chunkBy', arguments, this, + _chunkBy(array, n, fillVal)); + /** + * @description + * Get array with size `n` in `val` inside it. + * @param n + * @param val + * @returns {Array} + */ + function fill(n, val) { + var ret = []; + while (n--) ret[n] = val; + return ret; + } + + function _chunkBy(array, n, fillVal) { + if (!isArray(array)) return array; + return array.map(function (el, i, self) { + i = i * n; + el = self.slice(i, i + n); + return !isUndefined(fillVal) && el.length < n + ? el.concat(fill(n - el.length, fillVal)) + : el; + }).slice(0, Math.ceil(array.length / n)); + } + } + }]); + +/** + * @ngdoc filter + * @name concat + * @kind function + * + * @description + * get (array/object, object/array) and return merged collection + */ +angular.module('a8m.concat', []) + .filter('concat', [function () { + return function (collection, joined) { + + if (isUndefined(joined)) return collection; + + if (isArray(collection)) { + return isObject(joined) + ? collection.concat(toArray(joined)) + : collection.concat(joined); + } + + if (isObject(collection)) { + var array = toArray(collection); + return (isObject(joined)) + ? array.concat(toArray(joined)) + : array.concat(joined); + } + return collection; + }; + } +]); + +/** + * @ngdoc filter + * @name contains + * @kind function + * + * @description + * Checks if given expression is present in one or more object in the collection + */ +angular.module('a8m.contains', []) + .filter({ + contains: ['$parse', containsFilter], + some: ['$parse', containsFilter] + }); + +function containsFilter($parse) { + return function (collection, expression) { + + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(expression)) { + return false; + } + + return collection.some(function(elm) { + return (isObject(elm) || isFunction(expression)) + ? $parse(expression)(elm) + : elm === expression; + }); + + } + } + +/** + * @ngdoc filter + * @name countBy + * @kind function + * + * @description + * Sorts a list into groups and returns a count for the number of objects in each group. + */ + +angular.module('a8m.count-by', []) + + .filter('countBy', [ '$parse', function ( $parse ) { + return function (collection, property) { + + var result = {}, + get = $parse(property), + prop; + + collection = (isObject(collection)) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(property)) { + return collection; + } + + collection.forEach( function( elm ) { + prop = get(elm); + + if(!result[prop]) { + result[prop] = 0; + } + + result[prop]++; + }); + + return result; + } + }]); + +/** + * @ngdoc filter + * @name defaults + * @kind function + * + * @description + * defaultsFilter allows to specify a default fallback value for properties that resolve to undefined. + */ +angular.module('a8m.defaults', []) + .filter('defaults', ['$parse', function( $parse ) { + return function(collection, defaults) { + + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || !isObject(defaults)) { + return collection; + } + + var keys = deepKeys(defaults); + + collection.forEach(function(elm) { + //loop through all the keys + keys.forEach(function(key) { + var getter = $parse(key); + var setter = getter.assign; + //if it's not exist + if(isUndefined(getter(elm))) { + //get from defaults, and set to the returned object + setter(elm, getter(defaults)) + } + }); + }); + + return collection; + } + }]); +/** + * @ngdoc filter + * @name every + * @kind function + * + * @description + * Checks if given expression is present in all members in the collection + * + */ +angular.module('a8m.every', []) + .filter('every', ['$parse', function($parse) { + return function (collection, expression) { + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(expression)) { + return true; + } + + return collection.every( function(elm) { + return (isObject(elm) || isFunction(expression)) + ? $parse(expression)(elm) + : elm === expression; + }); + } + }]); + +/** + * @ngdoc filter + * @name filterBy + * @kind function + * + * @description + * filter by specific properties, avoid the rest + */ +angular.module('a8m.filter-by', []) + .filter('filterBy', ['$parse', function( $parse ) { + return function(collection, properties, search) { + var comparator; + + search = (isString(search) || isNumber(search)) ? + String(search).toLowerCase() : undefined; + + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(search)) { + return collection; + } + + return collection.filter(function(elm) { + return properties.some(function(prop) { + + /** + * check if there is concatenate properties + * example: + * object: { first: 'foo', last:'bar' } + * filterBy: ['first + last'] => search by full name(i.e 'foo bar') + */ + if(!~prop.indexOf('+')) { + comparator = $parse(prop)(elm) + } else { + var propList = prop.replace(new RegExp('\\s', 'g'), '').split('+'); + comparator = propList.reduce(function(prev, cur, index) { + return (index === 1) ? $parse(prev)(elm) + ' ' + $parse(cur)(elm) : + prev + ' ' + $parse(cur)(elm); + }); + } + + return (isString(comparator) || isNumber(comparator)) + ? String(comparator).toLowerCase().contains(search) + : false; + }); + }); + } + }]); + +/** + * @ngdoc filter + * @name first + * @kind function + * + * @description + * Gets the first element or first n elements of an array + * if callback is provided, is returns as long the callback return truthy + */ +angular.module('a8m.first', []) + .filter('first', ['$parse', function( $parse ) { + return function(collection) { + var n + , getter + , args; + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection)) { + return collection; + } + + args = Array.prototype.slice.call(arguments, 1); + n = (isNumber(args[0])) ? args[0] : 1; + getter = (!isNumber(args[0])) ? args[0] : (!isNumber(args[1])) ? args[1] : undefined; + + return (args.length) ? getFirstMatches(collection, n,(getter) ? $parse(getter) : getter) : + collection[0]; + } + }]); + +/** + * @ngdoc filter + * @name flatten + * @kind function + * + * @description + * Flattens a nested array (the nesting can be to any depth). + * If you pass shallow, the array will only be flattened a single level + */ +angular.module('a8m.flatten', []) + .filter('flatten', function () { + return function(collection, shallow) { + + shallow = shallow || false; + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection)) { + return collection; + } + + return !shallow + ? flatten(collection, 0) + : [].concat.apply([], collection); + } + }); + +/** + * flatten nested array (the nesting can be to any depth). + * @param array {Array} + * @param i {int} + * @returns {Array} + * @private + */ +function flatten(array, i) { + i = i || 0; + + if(i >= array.length) + return array; + + if(isArray(array[i])) { + return flatten(array.slice(0,i) + .concat(array[i], array.slice(i+1)), i); + } + return flatten(array, i+1); +} + +/** + * @ngdoc filter + * @name fuzzyByKey + * @kind function + * + * @description + * fuzzy string searching by key + */ +angular.module('a8m.fuzzy-by', []) + .filter('fuzzyBy', ['$parse', function ( $parse ) { + return function (collection, property, search, csensitive) { + + var sensitive = csensitive || false, + prop, getter; + + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(property) + || isUndefined(search)) { + return collection; + } + + getter = $parse(property); + + return collection.filter(function(elm) { + + prop = getter(elm); + if(!isString(prop)) { + return false; + } + + prop = (sensitive) ? prop : prop.toLowerCase(); + search = (sensitive) ? search : search.toLowerCase(); + + return hasApproxPattern(prop, search) !== false + }) + } + + }]); +/** + * @ngdoc filter + * @name fuzzy + * @kind function + * + * @description + * fuzzy string searching for array of strings, objects + */ +angular.module('a8m.fuzzy', []) + .filter('fuzzy', function () { + return function (collection, search, csensitive) { + var sensitive = csensitive || false; + collection = isObject(collection) ? toArray(collection) : collection; + + if(!isArray(collection) || isUndefined(search)) { + return collection; + } + + search = (sensitive) ? search : search.toLowerCase(); + + return collection.filter(function(elm) { + if(isString(elm)) { + elm = (sensitive) ? elm : elm.toLowerCase(); + return hasApproxPattern(elm, search) !== false + } + return (isObject(elm)) ? _hasApproximateKey(elm, search) : false; + }); + + /** + * checks if object has key{string} that match + * to fuzzy search pattern + * @param object + * @param search + * @returns {boolean} + * @private + */ + function _hasApproximateKey(object, search) { + var properties = Object.keys(object), + prop, flag; + return 0 < properties.filter(function (elm) { + prop = object[elm]; + + //avoid iteration if we found some key that equal[performance] + if(flag) return true; + + if (isString(prop)) { + prop = (sensitive) ? prop : prop.toLowerCase(); + return flag = (hasApproxPattern(prop, search) !== false); + } + + return false; + + }).length; + } + } + }); + +/** + * @ngdoc filter + * @name groupBy + * @kind function + * + * @description + * Create an object composed of keys generated from the result of running each element of a collection, + * each key is an array of the elements. + */ + +angular.module('a8m.group-by', [ 'a8m.filter-watcher' ]) + .filter('groupBy', [ '$parse', 'filterWatcher', function ( $parse, filterWatcher ) { + return function (collection, property) { + + if(!isObject(collection) || isUndefined(property)) { + return collection; + } + + return filterWatcher.isMemoized('groupBy', arguments) || + filterWatcher.memoize('groupBy', arguments, this, + _groupBy(collection, $parse(property))); + + /** + * groupBy function + * @param collection + * @param getter + * @returns {{}} + */ + function _groupBy(collection, getter) { + var result = {}; + var prop; + + forEach( collection, function( elm ) { + prop = getter(elm); + + if(!result[prop]) { + result[prop] = []; + } + result[prop].push(elm); + }); + return result; + } + } + }]); + +/** + * @ngdoc filter + * @name isEmpty + * @kind function + * + * @description + * get collection or string and return if it empty + */ +angular.module('a8m.is-empty', []) + .filter('isEmpty', function () { + return function(collection) { + return isObject(collection) + ? !toArray(collection).length + : !collection.length; + } + }); + +/** + * @ngdoc filter + * @name join + * @kind function + * + * @description + * join a collection by a provided delimiter (space by default) + */ +angular.module('a8m.join', []) + .filter('join', function () { + return function (input, delimiter) { + if (isUndefined(input) || !isArray(input)) { + return input; + } + if (isUndefined(delimiter)) delimiter = ' '; + + return input.join(delimiter); + }; + }) +; + +/** + * @ngdoc filter + * @name last + * @kind function + * + * @description + * Gets the last element or last n elements of an array + * if callback is provided, is returns as long the callback return truthy + */ +angular.module('a8m.last', []) + .filter('last', ['$parse', function( $parse ) { + return function(collection) { + var n + , getter + , args + //cuz reverse change our src collection + //and we don't want side effects + , reversed = copy(collection); + + reversed = isObject(reversed) + ? toArray(reversed) + : reversed; + + if(!isArray(reversed)) { + return reversed; + } + + args = Array.prototype.slice.call(arguments, 1); + n = (isNumber(args[0])) ? args[0] : 1; + getter = (!isNumber(args[0])) ? args[0] : (!isNumber(args[1])) ? args[1] : undefined; + + return (args.length) + //send reversed collection as arguments, and reverse it back as result + ? getFirstMatches(reversed.reverse(), n,(getter) ? $parse(getter) : getter).reverse() + //get the last element + : reversed[reversed.length-1]; + } + }]); + +/** + * @ngdoc filter + * @name map + * @kind function + * + * @description + * Returns a new collection of the results of each expression execution. + */ +angular.module('a8m.map', []) + .filter('map', ['$parse', function($parse) { + return function (collection, expression) { + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection) || isUndefined(expression)) { + return collection; + } + + return collection.map(function (elm) { + return $parse(expression)(elm); + }); + } + }]); + +/** + * @ngdoc filter + * @name omit + * @kind function + * + * @description + * filter collection by expression + */ + +angular.module('a8m.omit', []) + + .filter('omit', ['$parse', function($parse) { + return function (collection, expression) { + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection) || isUndefined(expression)) { + return collection; + } + + return collection.filter(function (elm) { + return !($parse(expression)(elm)); + }); + } + }]); + +/** + * @ngdoc filter + * @name pick + * @kind function + * + * @description + * filter collection by expression + */ + +angular.module('a8m.pick', []) + + .filter('pick', ['$parse', function($parse) { + return function (collection, expression) { + + collection = isObject(collection) + ? toArray(collection) + : collection; + + if(!isArray(collection) || isUndefined(expression)) { + return collection; + } + + return collection.filter(function (elm) { + return $parse(expression)(elm); + }); + } + }]); + +/** + * @ngdoc filter + * @name range + * @kind function + * + * @description + * rangeFilter provides some support for a for loop using numbers + */ +angular.module('a8m.range', []) + .filter('range', function () { + return function (input, total) { + for (var i = 0; i < parseInt(total); i++) { + input.push(i); + } + return input; + }; + }); +/** + * @ngdoc filter + * @name removeWith + * @kind function + * + * @description + * get collection and properties object, and removed elements + * with this properties + */ + +angular.module('a8m.remove-with', []) + .filter('removeWith', function() { + return function (collection, object) { + + if(isUndefined(object)) { + return collection; + } + collection = isObject(collection) + ? toArray(collection) + : collection; + + return collection.filter(function (elm) { + return !objectContains(object, elm); + }); + } + }); + + +/** + * @ngdoc filter + * @name remove + * @kind function + * + * @description + * remove specific members from collection + */ + +angular.module('a8m.remove', []) + + .filter('remove', function () { + return function (collection) { + collection = isObject(collection) ? toArray(collection) : collection; + var args = Array.prototype.slice.call(arguments, 1); + + if(!isArray(collection)) { + return collection; + } + + return collection.filter( function( member ) { + return !args.some(function(nest) { + return equals(nest, member); + }) + }); + } + }); + +/** + * @ngdoc filter + * @name reverse + * @kind function + * + * @description + * Reverses a string or collection + */ +angular.module('a8m.reverse', []) + .filter('reverse',[ function () { + return function (input) { + input = isObject(input) ? toArray(input) : input; + + if(isString(input)) { + return input.split('').reverse().join(''); + } + + return isArray(input) + ? input.slice().reverse() + : input; + } + }]); + +/** + * @ngdoc filter + * @name searchField + * @kind function + * + * @description + * for each member, join several strings field and add them to + * new field called 'searchField' (use for search filtering) + */ +angular.module('a8m.search-field', []) + .filter('searchField', ['$parse', function ($parse) { + return function (collection) { + + var get, field; + + collection = isObject(collection) ? toArray(collection) : collection; + + var args = Array.prototype.slice.call(arguments, 1); + + if(!isArray(collection) || !args.length) { + return collection; + } + + return collection.map(function(member) { + + field = args.map(function(field) { + get = $parse(field); + return get(member); + }).join(' '); + + return extend(member, { searchField: field }); + }); + } + }]); + +/** + * @ngdoc filter + * @name toArray + * @kind function + * + * @description + * Convert objects into stable arrays. + * if addKey set to true,the filter also attaches a new property + * $key to the value containing the original key that was used in + * the object we are iterating over to reference the property + */ +angular.module('a8m.to-array', []) + .filter('toArray', function() { + return function (collection, addKey) { + + if(!isObject(collection)) { + return collection; + } + + return !addKey + ? toArray(collection) + : Object.keys(collection).map(function (key) { + return extend(collection[key], { $key: key }); + }); + } + }); + +/** + * @ngdoc filter + * @name unique/uniq + * @kind function + * + * @description + * get collection and filter duplicate members + * if uniqueFilter get a property(nested to) as argument it's + * filter by this property as unique identifier + */ + +angular.module('a8m.unique', []) + .filter({ + unique: ['$parse', uniqFilter], + uniq: ['$parse', uniqFilter] + }); + +function uniqFilter($parse) { + return function (collection, property) { + + collection = isObject(collection) ? toArray(collection) : collection; + + if (!isArray(collection)) { + return collection; + } + + //store all unique identifiers + var uniqueItems = [], + get = $parse(property); + + return (isUndefined(property)) + //if it's kind of primitive array + ? collection.filter(function (elm, pos, self) { + return self.indexOf(elm) === pos; + }) + //else compare with equals + : collection.filter(function (elm) { + var prop = get(elm); + if(some(uniqueItems, prop)) { + return false; + } + uniqueItems.push(prop); + return true; + }); + + //checked if the unique identifier is already exist + function some(array, member) { + if(isUndefined(member)) { + return false; + } + return array.some(function(el) { + return equals(el, member); + }); + } + } +} + +/** + * @ngdoc filter + * @name where + * @kind function + * + * @description + * of each element in a collection to the given properties object, + * returning an array of all elements that have equivalent property values. + * + */ +angular.module('a8m.where', []) + .filter('where', function() { + return function (collection, object) { + if(isUndefined(object)) return collection; + collection = isObject(collection) + ? toArray(collection) + : collection; + + return collection.filter(function (elm) { + return objectContains(object, elm); + }); + } + }); + +/** + * @ngdoc filter + * @name xor + * @kind function + * + * @description + * Exclusive or filter by expression + */ + +angular.module('a8m.xor', []) + + .filter('xor', ['$parse', function($parse) { + return function (col1, col2, expression) { + + expression = expression || false; + + col1 = isObject(col1) ? toArray(col1) : col1; + col2 = isObject(col2) ? toArray(col2) : col2; + + if(!isArray(col1) || !isArray(col2)) return col1; + + return col1.concat(col2) + .filter(function(elm) { + return !(some(elm, col1) && some(elm, col2)); + }); + + function some(el, col) { + var getter = $parse(expression); + return col.some(function(dElm) { + return expression + ? equals(getter(dElm), getter(el)) + : equals(dElm, el); + }); + } + } + }]); + +/** + * @ngdoc filter + * @name formatBytes + * @kind function + * + * @description + * Convert bytes into appropriate display + * 1024 bytes => 1 KB + */ +angular.module('a8m.math.byteFmt', ['a8m.math']) + .filter('byteFmt', ['$math', function ($math) { + return function (bytes, decimal) { + + if(isNumber(decimal) && isFinite(decimal) && decimal%1===0 && decimal >= 0 && + isNumber(bytes) && isFinite(bytes)) { + if(bytes < 1024) { // within 1 KB so B + return convertToDecimal(bytes, decimal, $math) + ' B'; + } else if(bytes < 1048576) { // within 1 MB so KB + return convertToDecimal((bytes / 1024), decimal, $math) + ' KB'; + } else if(bytes < 1073741824){ // within 1 GB so MB + return convertToDecimal((bytes / 1048576), decimal, $math) + ' MB'; + } else { // GB or more + return convertToDecimal((bytes / 1073741824), decimal, $math) + ' GB'; + } + + } + return "NaN"; + } + }]); +/** + * @ngdoc filter + * @name degrees + * @kind function + * + * @description + * Convert angle from radians to degrees + */ +angular.module('a8m.math.degrees', ['a8m.math']) + .filter('degrees', ['$math', function ($math) { + return function (radians, decimal) { + // if decimal is not an integer greater than -1, we cannot do. quit with error "NaN" + // if degrees is not a real number, we cannot do also. quit with error "NaN" + if(isNumber(decimal) && isFinite(decimal) && decimal%1===0 && decimal >= 0 && + isNumber(radians) && isFinite(radians)) { + var degrees = (radians * 180) / $math.PI; + return $math.round(degrees * $math.pow(10,decimal)) / ($math.pow(10,decimal)); + } else { + return "NaN"; + } + } + }]); + + + +/** + * @ngdoc filter + * @name formatBytes + * @kind function + * + * @description + * Convert bytes into appropriate display + * 1024 kilobytes => 1 MB + */ +angular.module('a8m.math.kbFmt', ['a8m.math']) + .filter('kbFmt', ['$math', function ($math) { + return function (bytes, decimal) { + + if(isNumber(decimal) && isFinite(decimal) && decimal%1===0 && decimal >= 0 && + isNumber(bytes) && isFinite(bytes)) { + if(bytes < 1024) { // within 1 MB so KB + return convertToDecimal(bytes, decimal, $math) + ' KB'; + } else if(bytes < 1048576) { // within 1 GB so MB + return convertToDecimal((bytes / 1024), decimal, $math) + ' MB'; + } else { + return convertToDecimal((bytes / 1048576), decimal, $math) + ' GB'; + } + } + return "NaN"; + } + }]); +/** + * @ngdoc module + * @name math + * @description + * reference to global Math object + */ +angular.module('a8m.math', []) + .factory('$math', ['$window', function ($window) { + return $window.Math; + }]); + +/** + * @ngdoc filter + * @name max + * @kind function + * + * @description + * Math.max will get an array and return the max value. if an expression + * is provided, will return max value by expression. + */ +angular.module('a8m.math.max', ['a8m.math']) + .filter('max', ['$math', '$parse', function ($math, $parse) { + return function (input, expression) { + + if(!isArray(input)) { + return input; + } + return isUndefined(expression) + ? $math.max.apply($math, input) + : input[indexByMax(input, expression)]; + }; + + /** + * @private + * @param array + * @param exp + * @returns {number|*|Number} + */ + function indexByMax(array, exp) { + var mappedArray = array.map(function(elm){ + return $parse(exp)(elm); + }); + return mappedArray.indexOf($math.max.apply($math, mappedArray)); + } + }]); +/** + * @ngdoc filter + * @name min + * @kind function + * + * @description + * Math.min will get an array and return the min value. if an expression + * is provided, will return min value by expression. + */ +angular.module('a8m.math.min', ['a8m.math']) + .filter('min', ['$math', '$parse', function ($math, $parse) { + return function (input, expression) { + + if(!isArray(input)) { + return input; + } + return isUndefined(expression) + ? $math.min.apply($math, input) + : input[indexByMin(input, expression)]; + }; + + /** + * @private + * @param array + * @param exp + * @returns {number|*|Number} + */ + function indexByMin(array, exp) { + var mappedArray = array.map(function(elm){ + return $parse(exp)(elm); + }); + return mappedArray.indexOf($math.min.apply($math, mappedArray)); + } + }]); +/** + * @ngdoc filter + * @name Percent + * @kind function + * + * @description + * percentage between two numbers + */ +angular.module('a8m.math.percent', ['a8m.math']) + .filter('percent', ['$math', '$window', function ($math, $window) { + return function (input, divided, round) { + + var divider = isString(input) ? $window.Number(input) : input; + divided = divided || 100; + round = round || false; + + if (!isNumber(divider) || $window.isNaN(divider)) return input; + + return round + ? $math.round((divider / divided) * 100) + : (divider / divided) * 100; + } + }]); + +/** + * @ngdoc filter + * @name toRadians + * @kind function + * + * @description + * Convert angle from degrees to radians + */ +angular.module('a8m.math.radians', ['a8m.math']) + .filter('radians', ['$math', function ($math) { + return function (degrees, decimal) { + // if decimal is not an integer greater than -1, we cannot do. quit with error "NaN" + // if degrees is not a real number, we cannot do also. quit with error "NaN" + if(isNumber(decimal) && isFinite(decimal) && decimal%1===0 && decimal >= 0 && + isNumber(degrees) && isFinite(degrees)) { + var radians = (degrees * 3.14159265359) / 180; + return $math.round(radians * $math.pow(10,decimal)) / ($math.pow(10,decimal)); + } + return "NaN"; + } + }]); + + + +/** + * @ngdoc filter + * @name Radix + * @kind function + * + * @description + * converting decimal numbers to different bases(radix) + */ +angular.module('a8m.math.radix', []) + .filter('radix', function () { + return function (input, radix) { + var RANGE = /^[2-9]$|^[1-2]\d$|^3[0-6]$/; + + if(!isNumber(input) || !RANGE.test(radix)) { + return input; + } + + return input.toString(radix).toUpperCase(); + } + }); + +/** + * @ngdoc filter + * @name formatBytes + * @kind function + * + * @description + * Convert number into abbreviations. + * i.e: K for one thousand, M for Million, B for billion + * e.g: number of users:235,221, decimal:1 => 235.2 K + */ +angular.module('a8m.math.shortFmt', ['a8m.math']) + .filter('shortFmt', ['$math', function ($math) { + return function (number, decimal) { + if(isNumber(decimal) && isFinite(decimal) && decimal%1===0 && decimal >= 0 && + isNumber(number) && isFinite(number)){ + if(number < 1e3) { + return number; + } else if(number < 1e6) { + return convertToDecimal((number / 1e3), decimal, $math) + ' K'; + } else if(number < 1e9){ + return convertToDecimal((number / 1e6), decimal, $math) + ' M'; + } else { + return convertToDecimal((number / 1e9), decimal, $math) + ' B'; + } + + } + return "NaN"; + } + }]); +/** + * @ngdoc filter + * @name sum + * @kind function + * + * @description + * Sum up all values within an array + */ +angular.module('a8m.math.sum', []) + .filter('sum', function () { + return function (input, initial) { + return !isArray(input) + ? input + : input.reduce(function(prev, curr) { + return prev + curr; + }, initial || 0); + } + }); + +/** + * @ngdoc filter + * @name endsWith + * @kind function + * + * @description + * checks whether string ends with the ends parameter. + */ +angular.module('a8m.ends-with', []) + + .filter('endsWith', function () { + return function (input, ends, csensitive) { + + var sensitive = csensitive || false, + position; + + if(!isString(input) || isUndefined(ends)) { + return input; + } + + input = (sensitive) ? input : input.toLowerCase(); + position = input.length - ends.length; + + return input.indexOf((sensitive) ? ends : ends.toLowerCase(), position) !== -1; + } + }); + +/** + * @ngdoc filter + * @name latinize + * @kind function + * + * @description + * remove accents/diacritics from a string + */ +angular.module('a8m.latinize', []) + .filter('latinize',[ function () { + var defaultDiacriticsRemovalap = [ + {'base':'A', 'letters':'\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F'}, + {'base':'AA','letters':'\uA732'}, + {'base':'AE','letters':'\u00C6\u01FC\u01E2'}, + {'base':'AO','letters':'\uA734'}, + {'base':'AU','letters':'\uA736'}, + {'base':'AV','letters':'\uA738\uA73A'}, + {'base':'AY','letters':'\uA73C'}, + {'base':'B', 'letters':'\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181'}, + {'base':'C', 'letters':'\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E'}, + {'base':'D', 'letters':'\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779'}, + {'base':'DZ','letters':'\u01F1\u01C4'}, + {'base':'Dz','letters':'\u01F2\u01C5'}, + {'base':'E', 'letters':'\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E'}, + {'base':'F', 'letters':'\u0046\u24BB\uFF26\u1E1E\u0191\uA77B'}, + {'base':'G', 'letters':'\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E'}, + {'base':'H', 'letters':'\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D'}, + {'base':'I', 'letters':'\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197'}, + {'base':'J', 'letters':'\u004A\u24BF\uFF2A\u0134\u0248'}, + {'base':'K', 'letters':'\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2'}, + {'base':'L', 'letters':'\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780'}, + {'base':'LJ','letters':'\u01C7'}, + {'base':'Lj','letters':'\u01C8'}, + {'base':'M', 'letters':'\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C'}, + {'base':'N', 'letters':'\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4'}, + {'base':'NJ','letters':'\u01CA'}, + {'base':'Nj','letters':'\u01CB'}, + {'base':'O', 'letters':'\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C'}, + {'base':'OI','letters':'\u01A2'}, + {'base':'OO','letters':'\uA74E'}, + {'base':'OU','letters':'\u0222'}, + {'base':'OE','letters':'\u008C\u0152'}, + {'base':'oe','letters':'\u009C\u0153'}, + {'base':'P', 'letters':'\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754'}, + {'base':'Q', 'letters':'\u0051\u24C6\uFF31\uA756\uA758\u024A'}, + {'base':'R', 'letters':'\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782'}, + {'base':'S', 'letters':'\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784'}, + {'base':'T', 'letters':'\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786'}, + {'base':'TZ','letters':'\uA728'}, + {'base':'U', 'letters':'\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244'}, + {'base':'V', 'letters':'\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245'}, + {'base':'VY','letters':'\uA760'}, + {'base':'W', 'letters':'\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72'}, + {'base':'X', 'letters':'\u0058\u24CD\uFF38\u1E8A\u1E8C'}, + {'base':'Y', 'letters':'\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE'}, + {'base':'Z', 'letters':'\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762'}, + {'base':'a', 'letters':'\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250'}, + {'base':'aa','letters':'\uA733'}, + {'base':'ae','letters':'\u00E6\u01FD\u01E3'}, + {'base':'ao','letters':'\uA735'}, + {'base':'au','letters':'\uA737'}, + {'base':'av','letters':'\uA739\uA73B'}, + {'base':'ay','letters':'\uA73D'}, + {'base':'b', 'letters':'\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253'}, + {'base':'c', 'letters':'\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184'}, + {'base':'d', 'letters':'\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A'}, + {'base':'dz','letters':'\u01F3\u01C6'}, + {'base':'e', 'letters':'\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD'}, + {'base':'f', 'letters':'\u0066\u24D5\uFF46\u1E1F\u0192\uA77C'}, + {'base':'g', 'letters':'\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F'}, + {'base':'h', 'letters':'\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265'}, + {'base':'hv','letters':'\u0195'}, + {'base':'i', 'letters':'\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131'}, + {'base':'j', 'letters':'\u006A\u24D9\uFF4A\u0135\u01F0\u0249'}, + {'base':'k', 'letters':'\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3'}, + {'base':'l', 'letters':'\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747'}, + {'base':'lj','letters':'\u01C9'}, + {'base':'m', 'letters':'\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F'}, + {'base':'n', 'letters':'\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5'}, + {'base':'nj','letters':'\u01CC'}, + {'base':'o', 'letters':'\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275'}, + {'base':'oi','letters':'\u01A3'}, + {'base':'ou','letters':'\u0223'}, + {'base':'oo','letters':'\uA74F'}, + {'base':'p','letters':'\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755'}, + {'base':'q','letters':'\u0071\u24E0\uFF51\u024B\uA757\uA759'}, + {'base':'r','letters':'\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783'}, + {'base':'s','letters':'\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B'}, + {'base':'t','letters':'\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787'}, + {'base':'tz','letters':'\uA729'}, + {'base':'u','letters': '\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289'}, + {'base':'v','letters':'\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C'}, + {'base':'vy','letters':'\uA761'}, + {'base':'w','letters':'\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73'}, + {'base':'x','letters':'\u0078\u24E7\uFF58\u1E8B\u1E8D'}, + {'base':'y','letters':'\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF'}, + {'base':'z','letters':'\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763'} + ]; + + var diacriticsMap = {}; + for (var i = 0; i < defaultDiacriticsRemovalap.length; i++) { + var letters = defaultDiacriticsRemovalap[i].letters.split(""); + for (var j = 0; j < letters.length ; j++){ + diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base; + } + } + + // "what?" version ... http://jsperf.com/diacritics/12 + function removeDiacritics (str) { + return str.replace(/[^\u0000-\u007E]/g, function(a){ + return diacriticsMap[a] || a; + }); + } + + return function (input) { + + return isString(input) + ? removeDiacritics(input) + : input; + } + }]); + +/** + * @ngdoc filter + * @name ltrim + * @kind function + * + * @description + * Left trim. Similar to trimFilter, but only for left side. + */ +angular.module('a8m.ltrim', []) + .filter('ltrim', function () { + return function(input, chars) { + + var trim = chars || '\\s'; + + return isString(input) + ? input.replace(new RegExp('^' + trim + '+'), '') + : input; + } + }); + +/** + * @ngdoc filter + * @name match + * @kind function + * + * @description + * Return the matched pattern in a string. + */ +angular.module('a8m.match', []) + .filter('match', function () { + return function (input, pattern, flag) { + + var reg = new RegExp(pattern, flag); + + return isString(input) + ? input.match(reg) + : null; + } + }); + +/** + * @ngdoc filter + * @name repeat + * @kind function + * + * @description + * Repeats a string n times + */ +angular.module('a8m.repeat', []) + .filter('repeat',[ function () { + return function (input, n, separator) { + + var times = ~~n; + + if(!isString(input)) { + return input; + } + + return !times + ? input + : strRepeat(input, --n, separator || ''); + } + }]); + +/** + * Repeats a string n times with given separator + * @param str string to repeat + * @param n number of times + * @param sep separator + * @returns {*} + */ +function strRepeat(str, n, sep) { + if(!n) { + return str; + } + return str + sep + strRepeat(str, --n, sep); +} +/** +* @ngdoc filter +* @name rtrim +* @kind function +* +* @description +* Right trim. Similar to trimFilter, but only for right side. +*/ +angular.module('a8m.rtrim', []) + .filter('rtrim', function () { + return function(input, chars) { + + var trim = chars || '\\s'; + + return isString(input) + ? input.replace(new RegExp(trim + '+$'), '') + : input; + } + }); + +/** + * @ngdoc filter + * @name slugify + * @kind function + * + * @description + * remove spaces from string, replace with "-" or given argument + */ +angular.module('a8m.slugify', []) + .filter('slugify',[ function () { + return function (input, sub) { + + var replace = (isUndefined(sub)) ? '-' : sub; + + return isString(input) + ? input.toLowerCase().replace(/\s+/g, replace) + : input; + } + }]); + +/** + * @ngdoc filter + * @name startWith + * @kind function + * + * @description + * checks whether string starts with the starts parameter. + */ +angular.module('a8m.starts-with', []) + .filter('startsWith', function () { + return function (input, start, csensitive) { + + var sensitive = csensitive || false; + + if(!isString(input) || isUndefined(start)) { + return input; + } + + input = (sensitive) ? input : input.toLowerCase(); + + return !input.indexOf((sensitive) ? start : start.toLowerCase()); + } + }); + +/** + * @ngdoc filter + * @name stringular + * @kind function + * + * @description + * get string with {n} and replace match with enumeration values + */ +angular.module('a8m.stringular', []) + .filter('stringular', function () { + return function(input) { + + var args = Array.prototype.slice.call(arguments, 1); + + return input.replace(/{(\d+)}/g, function (match, number) { + return isUndefined(args[number]) ? match : args[number]; + }); + } + }); + +/** + * @ngdoc filter + * @name stripTags + * @kind function + * + * @description + * strip html tags from string + */ +angular.module('a8m.strip-tags', []) + .filter('stripTags', function () { + return function(input) { + return isString(input) + ? input.replace(/<\S[^><]*>/g, '') + : input; + } + }); + +/** + * @ngdoc filter + * @name test + * @kind function + * + * @description + * test if a string match a pattern. + */ +angular.module('a8m.test', []) + .filter('test', function () { + return function (input, pattern, flag) { + + var reg = new RegExp(pattern, flag); + + return isString(input) + ? reg.test(input) + : input; + } + }); + +/** + * @ngdoc filter + * @name trim + * @kind function + * + * @description + * Strip whitespace (or other characters) from the beginning and end of a string + */ +angular.module('a8m.trim', []) + .filter('trim', function () { + return function(input, chars) { + + var trim = chars || '\\s'; + + return isString(input) + ? input.replace(new RegExp('^' + trim + '+|' + trim + '+$', 'g'), '') + : input; + } + }); + +/** + * @ngdoc filter + * @name truncate + * @kind function + * + * @description + * truncates a string given a specified length, providing a custom string to denote an omission. + */ +angular.module('a8m.truncate', []) + .filter('truncate', function () { + return function(input, length, suffix, preserve) { + + length = isUndefined(length) ? input.length : length; + preserve = preserve || false; + suffix = suffix || ''; + + if(!isString(input) || (input.length <= length)) return input; + + return input.substring(0, (preserve) + ? ((input.indexOf(' ', length) === -1) ? input.length : input.indexOf(' ', length)) + : length) + suffix; + }; + }); + +/** + * @ngdoc filter + * @name ucfirst + * @kind function + * + * @description + * ucfirst + */ +angular.module('a8m.ucfirst', []) + .filter('ucfirst', [function() { + return function(input) { + return isString(input) + ? input + .split(' ') + .map(function (ch) { + return ch.charAt(0).toUpperCase() + ch.substring(1); + }) + .join(' ') + : input; + } + }]); + +/** + * @ngdoc filter + * @name uriComponentEncode + * @kind function + * + * @description + * get string as parameter and return encoded string + */ +angular.module('a8m.uri-component-encode', []) + .filter('uriComponentEncode',['$window', function ($window) { + return function (input) { + return isString(input) + ? $window.encodeURIComponent(input) + : input; + } + }]); + +/** + * @ngdoc filter + * @name uriEncode + * @kind function + * + * @description + * get string as parameter and return encoded string + */ +angular.module('a8m.uri-encode', []) + .filter('uriEncode',['$window', function ($window) { + return function (input) { + return isString(input) + ? $window.encodeURI(input) + : input; + } + }]); + +/** + * @ngdoc filter + * @name wrap + * @kind function + * + * @description + * Wrap a string with another string + */ +angular.module('a8m.wrap', []) + .filter('wrap', function () { + return function(input, wrap, ends) { + return isString(input) && isDefined(wrap) + ? [wrap, input, ends || wrap].join('') + : input; + } + }); + +/** + * @ngdoc provider + * @name filterWatcher + * @kind function + * + * @description + * store specific filters result in $$cache, based on scope life time(avoid memory leak). + * on scope.$destroy remove it's cache from $$cache container + */ + +angular.module('a8m.filter-watcher', []) + .provider('filterWatcher', function() { + + this.$get = ['$window', '$rootScope', function($window, $rootScope) { + + /** + * Cache storing + * @type {Object} + */ + var $$cache = {}; + + /** + * Scope listeners container + * scope.$destroy => remove all cache keys + * bind to current scope. + * @type {Object} + */ + var $$listeners = {}; + + /** + * $timeout without triggering the digest cycle + * @type {function} + */ + var $$timeout = $window.setTimeout; + + /** + * @description + * get `HashKey` string based on the given arguments. + * @param fName + * @param args + * @returns {string} + */ + function getHashKey(fName, args) { + function replacerFactory() { + var cache = []; + return function(key, val) { + if(isObject(val) && !isNull(val)) { + if (~cache.indexOf(val)) return '[Circular]'; + cache.push(val) + } + if($window == val) return '$WINDOW'; + if($window.document == val) return '$DOCUMENT'; + if(isScope(val)) return '$SCOPE'; + return val; + } + } + return [fName, JSON.stringify(args, replacerFactory())] + .join('#') + .replace(/"/g,''); + } + + /** + * @description + * fir on $scope.$destroy, + * remove cache based scope from `$$cache`, + * and remove itself from `$$listeners` + * @param event + */ + function removeCache(event) { + var id = event.targetScope.$id; + forEach($$listeners[id], function(key) { + delete $$cache[key]; + }); + delete $$listeners[id]; + } + + /** + * @description + * for angular version that greater than v.1.3.0 + * it clear cache when the digest cycle is end. + */ + function cleanStateless() { + $$timeout(function() { + if(!$rootScope.$$phase) + $$cache = {}; + }, 2000); + } + + /** + * @description + * Store hashKeys in $$listeners container + * on scope.$destroy, remove them all(bind an event). + * @param scope + * @param hashKey + * @returns {*} + */ + function addListener(scope, hashKey) { + var id = scope.$id; + if(isUndefined($$listeners[id])) { + scope.$on('$destroy', removeCache); + $$listeners[id] = []; + } + return $$listeners[id].push(hashKey); + } + + /** + * @description + * return the `cacheKey` or undefined. + * @param filterName + * @param args + * @returns {*} + */ + function $$isMemoized(filterName, args) { + var hashKey = getHashKey(filterName, args); + return $$cache[hashKey]; + } + + /** + * @description + * store `result` in `$$cache` container, based on the hashKey. + * add $destroy listener and return result + * @param filterName + * @param args + * @param scope + * @param result + * @returns {*} + */ + function $$memoize(filterName, args, scope, result) { + var hashKey = getHashKey(filterName, args); + //store result in `$$cache` container + $$cache[hashKey] = result; + // for angular versions that less than 1.3 + // add to `$destroy` listener, a cleaner callback + if(isScope(scope)) { + addListener(scope, hashKey); + } else { + cleanStateless(); + } + return result; + } + + return { + isMemoized: $$isMemoized, + memoize: $$memoize + } + }]; + }); + + +/** + * @ngdoc module + * @name angular.filters + * @description + * Bunch of useful filters for angularJS + */ + +angular.module('angular.filter', [ + + 'a8m.ucfirst', + 'a8m.uri-encode', + 'a8m.uri-component-encode', + 'a8m.slugify', + 'a8m.latinize', + 'a8m.strip-tags', + 'a8m.stringular', + 'a8m.truncate', + 'a8m.starts-with', + 'a8m.ends-with', + 'a8m.wrap', + 'a8m.trim', + 'a8m.ltrim', + 'a8m.rtrim', + 'a8m.repeat', + 'a8m.test', + 'a8m.match', + + 'a8m.to-array', + 'a8m.concat', + 'a8m.contains', + 'a8m.unique', + 'a8m.is-empty', + 'a8m.after', + 'a8m.after-where', + 'a8m.before', + 'a8m.before-where', + 'a8m.defaults', + 'a8m.where', + 'a8m.reverse', + 'a8m.remove', + 'a8m.remove-with', + 'a8m.group-by', + 'a8m.count-by', + 'a8m.chunk-by', + 'a8m.search-field', + 'a8m.fuzzy-by', + 'a8m.fuzzy', + 'a8m.omit', + 'a8m.pick', + 'a8m.every', + 'a8m.filter-by', + 'a8m.xor', + 'a8m.map', + 'a8m.first', + 'a8m.last', + 'a8m.flatten', + 'a8m.join', + 'a8m.range', + + 'a8m.math', + 'a8m.math.max', + 'a8m.math.min', + 'a8m.math.percent', + 'a8m.math.radix', + 'a8m.math.sum', + 'a8m.math.degrees', + 'a8m.math.radians', + 'a8m.math.byteFmt', + 'a8m.math.kbFmt', + 'a8m.math.shortFmt', + + 'a8m.angular', + 'a8m.conditions', + 'a8m.is-null', + + 'a8m.filter-watcher' +]); +})( window, window.angular ); \ No newline at end of file diff --git a/client/www/lib/angular-filter/dist/angular-filter.min.js b/client/www/lib/angular-filter/dist/angular-filter.min.js new file mode 100644 index 0000000..11714a5 --- /dev/null +++ b/client/www/lib/angular-filter/dist/angular-filter.min.js @@ -0,0 +1,6 @@ +/** + * Bunch of useful filters for angularJS(with no external dependencies!) + * @version v0.5.7 - 2015-10-04 * @link https://github.com/a8m/angular-filter + * @author Ariel Mashraki + * @license MIT License, http://www.opensource.org/licenses/MIT + */!function(a,b,c){"use strict";function d(a){return D(a)?a:Object.keys(a).map(function(b){return a[b]})}function e(a){return null===a}function f(a,b){var d=Object.keys(a);return-1==d.map(function(d){return b[d]!==c&&b[d]==a[d]}).indexOf(!1)}function g(a,b){if(""===b)return a;var c=a.indexOf(b.charAt(0));return-1===c?!1:g(a.substr(c+1),b.substr(1))}function h(a,b,c){var d=0;return a.filter(function(a){var e=x(c)?b>d&&c(a):b>d;return d=e?d+1:d,e})}function i(a,b,c){return c.round(a*c.pow(10,b))/c.pow(10,b)}function j(a,b,c){b=b||[];var d=Object.keys(a);return d.forEach(function(d){if(C(a[d])&&!D(a[d])){var e=c?c+"."+d:c;j(a[d],b,e||d)}else{var f=c?c+"."+d:d;b.push(f)}}),b}function k(a){return a&&a.$evalAsync&&a.$watch}function l(){return function(a,b){return a>b}}function m(){return function(a,b){return a>=b}}function n(){return function(a,b){return b>a}}function o(){return function(a,b){return b>=a}}function p(){return function(a,b){return a==b}}function q(){return function(a,b){return a!=b}}function r(){return function(a,b){return a===b}}function s(){return function(a,b){return a!==b}}function t(a){return function(b,c){return b=C(b)?d(b):b,!D(b)||y(c)?!1:b.some(function(b){return C(b)||z(c)?a(c)(b):b===c})}}function u(a,b){return b=b||0,b>=a.length?a:D(a[b])?u(a.slice(0,b).concat(a[b],a.slice(b+1)),b):u(a,b+1)}function v(a){return function(b,c){function e(a,b){return y(b)?!1:a.some(function(a){return H(a,b)})}if(b=C(b)?d(b):b,!D(b))return b;var f=[],g=a(c);return y(c)?b.filter(function(a,b,c){return c.indexOf(a)===b}):b.filter(function(a){var b=g(a);return e(f,b)?!1:(f.push(b),!0)})}}function w(a,b,c){return b?a+c+w(a,--b,c):a}var x=b.isDefined,y=b.isUndefined,z=b.isFunction,A=b.isString,B=b.isNumber,C=b.isObject,D=b.isArray,E=b.forEach,F=b.extend,G=b.copy,H=b.equals;String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),b.module("a8m.angular",[]).filter("isUndefined",function(){return function(a){return b.isUndefined(a)}}).filter("isDefined",function(){return function(a){return b.isDefined(a)}}).filter("isFunction",function(){return function(a){return b.isFunction(a)}}).filter("isString",function(){return function(a){return b.isString(a)}}).filter("isNumber",function(){return function(a){return b.isNumber(a)}}).filter("isArray",function(){return function(a){return b.isArray(a)}}).filter("isObject",function(){return function(a){return b.isObject(a)}}).filter("isEqual",function(){return function(a,c){return b.equals(a,c)}}),b.module("a8m.conditions",[]).filter({isGreaterThan:l,">":l,isGreaterThanOrEqualTo:m,">=":m,isLessThan:n,"<":n,isLessThanOrEqualTo:o,"<=":o,isEqualTo:p,"==":p,isNotEqualTo:q,"!=":q,isIdenticalTo:r,"===":r,isNotIdenticalTo:s,"!==":s}),b.module("a8m.is-null",[]).filter("isNull",function(){return function(a){return e(a)}}),b.module("a8m.after-where",[]).filter("afterWhere",function(){return function(a,b){if(a=C(a)?d(a):a,!D(a)||y(b))return a;var c=a.map(function(a){return f(b,a)}).indexOf(!0);return a.slice(-1===c?0:c)}}),b.module("a8m.after",[]).filter("after",function(){return function(a,b){return a=C(a)?d(a):a,D(a)?a.slice(b):a}}),b.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(a,b){if(a=C(a)?d(a):a,!D(a)||y(b))return a;var c=a.map(function(a){return f(b,a)}).indexOf(!0);return a.slice(0,-1===c?a.length:++c)}}),b.module("a8m.before",[]).filter("before",function(){return function(a,b){return a=C(a)?d(a):a,D(a)?a.slice(0,b?--b:b):a}}),b.module("a8m.chunk-by",["a8m.filter-watcher"]).filter("chunkBy",["filterWatcher",function(a){return function(b,c,d){function e(a,b){for(var c=[];a--;)c[a]=b;return c}function f(a,b,c){return D(a)?a.map(function(a,d,f){return d*=b,a=f.slice(d,d+b),!y(c)&&a.length=0&&B(b)&&isFinite(b)?1024>b?i(b,c,a)+" B":1048576>b?i(b/1024,c,a)+" KB":1073741824>b?i(b/1048576,c,a)+" MB":i(b/1073741824,c,a)+" GB":"NaN"}}]),b.module("a8m.math.degrees",["a8m.math"]).filter("degrees",["$math",function(a){return function(b,c){if(B(c)&&isFinite(c)&&c%1===0&&c>=0&&B(b)&&isFinite(b)){var d=180*b/a.PI;return a.round(d*a.pow(10,c))/a.pow(10,c)}return"NaN"}}]),b.module("a8m.math.kbFmt",["a8m.math"]).filter("kbFmt",["$math",function(a){return function(b,c){return B(c)&&isFinite(c)&&c%1===0&&c>=0&&B(b)&&isFinite(b)?1024>b?i(b,c,a)+" KB":1048576>b?i(b/1024,c,a)+" MB":i(b/1048576,c,a)+" GB":"NaN"}}]),b.module("a8m.math",[]).factory("$math",["$window",function(a){return a.Math}]),b.module("a8m.math.max",["a8m.math"]).filter("max",["$math","$parse",function(a,b){function c(c,d){var e=c.map(function(a){return b(d)(a)});return e.indexOf(a.max.apply(a,e))}return function(b,d){return D(b)?y(d)?a.max.apply(a,b):b[c(b,d)]:b}}]),b.module("a8m.math.min",["a8m.math"]).filter("min",["$math","$parse",function(a,b){function c(c,d){var e=c.map(function(a){return b(d)(a)});return e.indexOf(a.min.apply(a,e))}return function(b,d){return D(b)?y(d)?a.min.apply(a,b):b[c(b,d)]:b}}]),b.module("a8m.math.percent",["a8m.math"]).filter("percent",["$math","$window",function(a,b){return function(c,d,e){var f=A(c)?b.Number(c):c;return d=d||100,e=e||!1,!B(f)||b.isNaN(f)?c:e?a.round(f/d*100):f/d*100}}]),b.module("a8m.math.radians",["a8m.math"]).filter("radians",["$math",function(a){return function(b,c){if(B(c)&&isFinite(c)&&c%1===0&&c>=0&&B(b)&&isFinite(b)){var d=3.14159265359*b/180;return a.round(d*a.pow(10,c))/a.pow(10,c)}return"NaN"}}]),b.module("a8m.math.radix",[]).filter("radix",function(){return function(a,b){var c=/^[2-9]$|^[1-2]\d$|^3[0-6]$/;return B(a)&&c.test(b)?a.toString(b).toUpperCase():a}}),b.module("a8m.math.shortFmt",["a8m.math"]).filter("shortFmt",["$math",function(a){return function(b,c){return B(c)&&isFinite(c)&&c%1===0&&c>=0&&B(b)&&isFinite(b)?1e3>b?b:1e6>b?i(b/1e3,c,a)+" K":1e9>b?i(b/1e6,c,a)+" M":i(b/1e9,c,a)+" B":"NaN"}}]),b.module("a8m.math.sum",[]).filter("sum",function(){return function(a,b){return D(a)?a.reduce(function(a,b){return a+b},b||0):a}}),b.module("a8m.ends-with",[]).filter("endsWith",function(){return function(a,b,c){var d,e=c||!1;return!A(a)||y(b)?a:(a=e?a:a.toLowerCase(),d=a.length-b.length,-1!==a.indexOf(e?b:b.toLowerCase(),d))}}),b.module("a8m.latinize",[]).filter("latinize",[function(){function a(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return c[a]||a})}for(var b=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],c={},d=0;d<]*>/g,""):a}}),b.module("a8m.test",[]).filter("test",function(){return function(a,b,c){var d=new RegExp(b,c);return A(a)?d.test(a):a}}),b.module("a8m.trim",[]).filter("trim",function(){return function(a,b){var c=b||"\\s";return A(a)?a.replace(new RegExp("^"+c+"+|"+c+"+$","g"),""):a}}),b.module("a8m.truncate",[]).filter("truncate",function(){return function(a,b,c,d){return b=y(b)?a.length:b,d=d||!1,c=c||"",!A(a)||a.length<=b?a:a.substring(0,d?-1===a.indexOf(" ",b)?a.length:a.indexOf(" ",b):b)+c}}),b.module("a8m.ucfirst",[]).filter("ucfirst",[function(){return function(a){return A(a)?a.split(" ").map(function(a){return a.charAt(0).toUpperCase()+a.substring(1)}).join(" "):a}}]),b.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(a){return function(b){return A(b)?a.encodeURIComponent(b):b}}]),b.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(a){return function(b){return A(b)?a.encodeURI(b):b}}]),b.module("a8m.wrap",[]).filter("wrap",function(){return function(a,b,c){return A(a)&&x(b)?[b,a,c||b].join(""):a}}),b.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(a,b){function c(b,c){function d(){var b=[];return function(c,d){if(C(d)&&!e(d)){if(~b.indexOf(d))return"[Circular]";b.push(d)}return a==d?"$WINDOW":a.document==d?"$DOCUMENT":k(d)?"$SCOPE":d}}return[b,JSON.stringify(c,d())].join("#").replace(/"/g,"")}function d(a){var b=a.targetScope.$id;E(l[b],function(a){delete j[a]}),delete l[b]}function f(){m(function(){b.$$phase||(j={})},2e3)}function g(a,b){var c=a.$id;return y(l[c])&&(a.$on("$destroy",d),l[c]=[]),l[c].push(b)}function h(a,b){var d=c(a,b);return j[d]}function i(a,b,d,e){var h=c(a,b);return j[h]=e,k(d)?g(d,h):f(),e}var j={},l={},m=a.setTimeout;return{isMemoized:h,memoize:i}}]}),b.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math","a8m.math.max","a8m.math.min","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular); \ No newline at end of file diff --git a/client/www/lib/angular-filter/dist/angular-filter.zip b/client/www/lib/angular-filter/dist/angular-filter.zip new file mode 100644 index 0000000000000000000000000000000000000000..7f18b4d1c7273c8e7034837e721274b3deb912f8 GIT binary patch literal 81020 zcmeIb*>jx7u_x+T?u{5moQV5yV;=6ye8g~s2H9wIH%XBM1<@b~$g)IIN0O~`4g??d z2B67CH{9LeB9IQr+INZ2E`pM*-Iioii;ab}A_gnZ+q}-(heyoB;9t1E%&hI}?`xo; z#de%HwAJXYB`Yf{D>ExAtLm;h{=DSKyF`gpCot7`=CCbEfKWvnZ65dQ^`V`!O)`Y2H7triOu|AL$a@{$fQC~L;-NxK}b)M+7Iv8aVAssinU{^c8>;`Flq4}9{v?;KQm3Zg-oh0HlVR|OX);i z=pJBH9`W2FlB5fqm>A0zs(}KMqzjzPo+{+(fdZ1G3-ng2ne%~sPLXUdPk#n%Wf4#* zl1*Gx&O5o1Aep(!xC@tls#?FC0Il6xoB$eQK$w?*oG;XJ)#5mfBJspXp$>X`73oU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^NAsesEw23Vy2LF#I9x`@^_@o-@<;eEpq&+n^}(hc=C)`j z6xZ`ba&Ta8PcF=2>iVo;w``&r+lbLNNs7JH!?=ikZMH9rgJAj&li=pk9=CJ2+`x%n ziVWn6x|6@53!(e?k-zB%y6I}8#!kp>Vu3sLn<#O@OG<~Z=`Yj!1>XY_%?t>-KrGm* zq?mr0@iHlD!YX+rYVsUeDT4^~i-Q-l>fZGxGNK{Goec(a$#~O{_Krz&xpvPv-d2w>1$tbFN~s02DkkjX;W7vw_$4OOOYl0n7RnLt@|_}q99*%+}54Hr~rVR z4c8Sz9>h92GV2ks!GiA<+F zjHr}f&ipqCjTa9>(NIle%<(U~=P8+v<~Ir2YT*Q{kW@YyVSMSGg754Ra|w|KsxGZ7 z_^VoW@ONeW%6DahOL?{h_^Vn6NOGk!Q>~JRkbmkk#QKLik;^}I>?Z%P2R-m&J`qED_nKLYvoFe{f(ah&|!L?o+UbUm@cH4q!l+4lGj|Fma-<)=B<&Od{J#GGW0 zpxK|QF*z>4$r78-U)8x(Db2^Ia0{TS!4aUGg9s~?rcN4is+<>*s`}g=|B?eN{8h!- z^LLCI)^p}7#Zm=+QZ$s!H6cPaNkyL61P*twKTW8iO)?QVHp#?l+9VadXA^9=2&bvr z^AvhuF?EZdN-!5|aN!1hG}LhscjxiVeZhOiL_2U2eUqAX0 z{r8{wK0o&(>K?ySwMH0?xBpoPZU1|-y8!RH=0.0.1", + "lodash": "3.X - 4.X", + "markerclustererplus": "^2.1.4", + "google-maps-utility-library-v3-markerwithlabel": "git://github.com/nmccready/google-maps-utility-library-v3-markerwithlabel.git", + "google-maps-utility-library-v3-infobox": "^1.1.14", + "google-maps-utility-library-v3-keydragzoom": "^2.0.9", + "js-rich-marker": "*" + }, + "ignore": [ + "*.json", + ".gitignore", + "travis.yml", + "*.html", + "package.js", + "*.markdown", + "example", + "src", + "grunt", + "website_libs", + "scripts", + "spec/coffee/directives", + "spec/coffee/providers", + "spec/coffee/usage", + "tmp", + "dist/coverage/", + "dist/architecture/" + ], + "devDependencies": { + "angular-mocks": "1.2 - 1.5", + "angular-route": "1.2 - 1.5", + "bootstrap-without-jquery": "git://github.com/tagawa/bootstrap-without-jquery.git", + "data-structures": "~1.4.2", + "OverlappingMarkerSpiderfier": "git://github.com/nmccready/OverlappingMarkerSpiderfier.git", + "underscore": "~1.8.3", + "uuid": "http://github.com/LiosK/UUID.js/archive/v3.2.tar.gz" + }, + "homepage": "https://github.com/angular-ui/angular-google-maps", + "_release": "2.3.3", + "_resolution": { + "type": "version", + "tag": "2.3.3", + "commit": "e9e767e8cc4ddeac9b90bbe14736a831d38e9356" + }, + "_source": "https://github.com/angular-ui/angular-google-maps.git", + "_target": "^2.3.2", + "_originalSource": "angular-google-maps" +} \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/.eslintrc b/client/www/lib/angular-google-maps/.eslintrc new file mode 100644 index 0000000..c637f57 --- /dev/null +++ b/client/www/lib/angular-google-maps/.eslintrc @@ -0,0 +1,12 @@ +{ +"globals": { + "angular": true, + "lodash": true, + "expect": true, + "describe": true, + "it": true, + "xit": true, + "spyOn": true +}, + "extends": "airbnb" +} diff --git a/client/www/lib/angular-google-maps/.npmignore b/client/www/lib/angular-google-maps/.npmignore new file mode 100644 index 0000000..1214ca4 --- /dev/null +++ b/client/www/lib/angular-google-maps/.npmignore @@ -0,0 +1,17 @@ +.* +spec/ +*.json +.gitignore +travis.yml +*.html +package.js +*.md +src/ +gulp/ +scripts/ +node_modules/ +bower_components/ +tmp/ +.versions +*.coffee +dist/coverage/ diff --git a/client/www/lib/angular-google-maps/.travis.yml b/client/www/lib/angular-google-maps/.travis.yml new file mode 100644 index 0000000..edfd108 --- /dev/null +++ b/client/www/lib/angular-google-maps/.travis.yml @@ -0,0 +1,30 @@ +language: node_js +node_js: +- '4' +before_script: PATH="$(npm bin):$PATH" npm install +script: npm run buildAll +branches: + only: + - master + - 2.3.X + - 2.2.X + - 2.1.X + - 2.0.X + - 1.2.X + - 1.0.X + - website +sudo: false +after_success: +- eval "$(ssh-agent -s)" +- chmod 600 .travis/deploy +- ssh-add .travis/deploy +- BRANCH=git branch +- echo Current Branch $BRANCH !!!!!!!!!!!!!!!!!!!! +- if [[ "$BRANCH" == "website" ]]; then echo "not syncing $BRANCH exiting"; exit 0; fi; +- git add -A +- git commit -am "buildAll from travis" +- git remote add deploy git@github.com:angular-ui/angular-google-maps.git +- git push deploy +"./.travis/deploy.enc": +- openssl aes-256-cbc -K $encrypted_471396ff623e_key -iv $encrypted_471396ff623e_iv + -in ./.travis/deploy.enc -out ./.travis/deploy -d diff --git a/client/www/lib/angular-google-maps/.travis/deploy.enc b/client/www/lib/angular-google-maps/.travis/deploy.enc new file mode 100644 index 0000000000000000000000000000000000000000..eb9159a0261ab9afdf9e9b68941fe8030c37df98 GIT binary patch literal 1680 zcmV;B25j9(vXoN+G;g+YP^0@tX`Kd?v-b53S-pK@C&1A*{7;SdO(8Yz>T?K=|o{U^D@k>d zW3%c(l7yp-a!0Skk@U3)ob$ln?^Ij8Z;P&Mqe6gl3$lcc8eDCW5b0S#;v>R<>Xes>dm0nhQ?@%CCw3bn^TN9Gq6)H? zDMucQk87^IP)_dE24-nQZ9XF=^(N;*1B_lxh2b{J!Hm}o_8@%DaUk!XessPsh-ccp z_eC~VI3@buG25rZ`P=gXg3K!mo?b2whVT0JKn-PIEGF;fLC!4gn}X6#Loi{Np8+@< zeAP%Tg z1%87vy!4{xxwdqo=+2-n!NK8d4yshUS1dY>RsVa~ckC1J&`IMqN~<5t!{fYpi zJoUY-?SXh+kLTT;q3kPv2$GpEM_92vPql7UE7mX7OwRuMfwH^u`3qZ|pKEA}G+xp8 zWQ=XI_67z$0WZS!uL|po^rxSOEF9L)HxWB(Fpmf-IaL^J4K%hLj;a{pM*SYf>6AoY zN(c8vPQxrhn=Sld)jg{IscUF1&dob#0hwhMB?w-iod9w~hu^;`jG~IXa3_!;m|vAs ze6PbzM3&W!rw3&LvnzILUcRL^Md8SGwqjMV9pX7|+8LrC6}Y1|9M{o_wq0{-Wp=+c zIo+GK3bYy^!nlneHVyAKG|y~C@7!MZG=jZ81mvz8L&6Mbm|Qk>^23l=t@&dI#yLly zc^+jta>h0Y28)e;Z#NnKn#vKAByY|HWS`3zmdLxNwXFb@6qE1W)bB{&92q&Orga}0 a8}_S2gcurQzs@T@Uc{)d? +### 3.3.2 (2016-05-13) + + + +### 2.3.2 (2016-02-11) + + +#### Bug Fixes + +* **angular 1.5:** working ([8ac35c3e](https://github.com/angular-ui/angular-google-maps/commit/8ac35c3e)) + + + +### 2.3.1 (2016-01-28) + + +#### Bug Fixes + +* **lodash:** #1682 check both directions 3.X to 4.X and 4.X to 3.X. ([cb3a20bd](https://github.com/angular-ui/angular-google-maps/commit/cb3a20bd)) + + + +### 2.2.2 (2016-01-21) + + +#### Bug Fixes + +* **EventsHelper removeEvents:** hasOwnProperty check to protect againt those that override Array.prototype issue ([4aa49942](https://github.com/angular-ui/angular-google-maps/commit/4aa49942)) +* **angular-simple-logger:** point to browser version of the lib ([6136cb81](https://github.com/angular-ui/angular-google-maps/commit/6136cb81)) +* **loader:** replace remove() with removeChild() to delete an existing ([86aa0fe8](https://github.com/angular-ui/angular-google-maps/commit/86aa0fe8)) +* **lodash:** lodash version also fixed to 3.X on devDependencies for node #1682 ([065568aa](https://github.com/angular-ui/angular-google-maps/commit/065568aa)) +* **lodash extensions:** fixed indenting and other mistakes ([4f303c08](https://github.com/angular-ui/angular-google-maps/commit/4f303c08)) +* **mapType:** options watch deep, is now watchCollection as it avoids infinite digests ([222e68f3](https://github.com/angular-ui/angular-google-maps/commit/222e68f3)) +* **travis:** remove underscore spec for now ([84db4848](https://github.com/angular-ui/angular-google-maps/commit/84db4848)) +* **window memory scope leaks:** - WindowsParent model now correctly destroys its child model's scopes. - coffeel ([42cca071](https://github.com/angular-ui/angular-google-maps/commit/42cca071)) + + + +### 2.2.1 (2015-09-11) + + +#### Bug Fixes + +* **meteor:** prepping for new release to have meteor working again ([6d01d4eb](https://github.com/angular-ui/angular-google-maps/commit/6d01d4eb)) + + + +### 2.2.0 (2015-09-06) + +#### Bug Fixes + +* **searchbox:** visibility fixes, issue #1471 ([265e2a3](https://github.com/angular-ui/angular-google-maps/commit/265e2a3)) + +#### Features + +* **uiGmapLogger:** internals outsourced to nemSimpleLogger which we now instantiate ([05af52c](https://github.com/angular-ui/angular-google-maps/commit/05af52c)) + + +### 2.1.6 (2015-08-27) + + +#### Bug Fixes + +* **circle:** scope properties update again even if the event attribute is not set in the dire ([b33d4a92](https://github.com/angular-ui/angular-google-maps/commit/b33d4a92)) +* **circle-parent-model:** circle radius and center events dupe firing fixed by boolean gates to not re-tri ([ae4f09b6](https://github.com/angular-ui/angular-google-maps/commit/ae4f09b6)) +* **is-ready max attempts:** Stop checking map's readiness after reaching max attempts issue #/1445 ([63637fe9](https://github.com/angular-ui/angular-google-maps/commit/63637fe9)) +* **lodash:** lodash polyfill for _.get , issue /#1433 ([705cd34c](https://github.com/angular-ui/angular-google-maps/commit/705cd34c)) +* **markerManager:** /#1449 adding destroy ([99609baa](https://github.com/angular-ui/angular-google-maps/commit/99609baa)) +* **markers-parent-model events:** internal events are not getting unhooked; added saftey check ([117be87a](https://github.com/angular-ui/angular-google-maps/commit/117be87a)) +* **markerspiderfier:** Check if spiderfier is on during an event to recreate the spiderfier if the mark ([cf178c87](https://github.com/angular-ui/angular-google-maps/commit/cf178c87)) +* **polylines polygons attribute watching:** updates not get set correctly fixes issue #1255 ([4274d5a0](https://github.com/angular-ui/angular-google-maps/commit/4274d5a0)) + + + +### 2.1.5 (2015-06-18) + + + +### 2.1.4 (2015-06-14) + + +#### Bug Fixes + +* **changelog:** on version bump the next version is used as the main header of the changelog ([cef77ecb](https://github.com/angular-ui/angular-google-maps/commit/cef77ecb)) +* **marker:** + * markers now update on model changes ([f46fd49e](https://github.com/angular-ui/angular-google-maps/commit/f46fd49e)) + * markers now update on model changes ([32086ad4](https://github.com/angular-ui/angular-google-maps/commit/32086ad4)) + + +#### Features + +* **RichMarker:** Build all post merge of feature RichMarker which marker and the markers directiv ([323e41f6](https://github.com/angular-ui/angular-google-maps/commit/323e41f6)) +* **better graphing:** switched to grunt-angular-architecture-graph ([b4f96dba](https://github.com/angular-ui/angular-google-maps/commit/b4f96dba)) +* **bump w changelog:** changelog added to all bumps ([e16a86e8](https://github.com/angular-ui/angular-google-maps/commit/e16a86e8)) +* **graphviz:** + * added to bump routines ([69b317fa](https://github.com/angular-ui/angular-google-maps/commit/69b317fa)) + * trying to aid in documentation and help people figure this out ([b6017de0](https://github.com/angular-ui/angular-google-maps/commit/b6017de0)) +* **grunt-changelog:** changelog added to our grunt build, sorry I did not know about this sooner. See ([84227c03](https://github.com/angular-ui/angular-google-maps/commit/84227c03)) diff --git a/client/www/lib/angular-google-maps/Gruntfile.coffee b/client/www/lib/angular-google-maps/Gruntfile.coffee new file mode 100644 index 0000000..edf39b8 --- /dev/null +++ b/client/www/lib/angular-google-maps/Gruntfile.coffee @@ -0,0 +1,144 @@ +log = require('util').log +_ = require 'lodash' +kickoff = require 'karma-kickoff' +argv = require('yargs').argv + +module.exports = (grunt) -> + # Load the required plugins + require('./grunt/bower')(grunt) + [ + "grunt-contrib-uglify" + "grunt-contrib-jshint" + "grunt-contrib-concat" + "grunt-contrib-clean" + "grunt-contrib-connect" + "grunt-contrib-copy" + "grunt-contrib-watch" + "grunt-open" + "grunt-mkdir" + "grunt-contrib-coffee" + "grunt-conventional-changelog" + "grunt-bump" + 'grunt-replace' + 'grunt-subgrunt' + 'grunt-debug-task' + 'grunt-verbosity' + 'grunt-webpack' + 'grunt-angular-architecture-graph' + 'grunt-ng-annotate' + ].forEach (gruntLib) -> grunt.loadNpmTasks gruntLib + + #squishing this file done by moving grunt options out to its own file. This way we can focus on tasks! + options = require('./grunt/options')(grunt) + + allExamples = grunt.file.expand('example/*.html') + + #map allExamples listed from grunt.file.expand to an open format of 'example' -> path + allExamplesOpen = {} + allExamples.forEach (path) -> + root = path.replace('example/', '').replace('.html', '') + pathValue = "http://localhost:3100/#{path}" + allExamplesOpen[root] = + path: pathValue + +# console.log allExamplesOpen, true + + showOpenType = (toIterate = allExamplesOpen) -> + _(toIterate).each (v, k) -> + log "#{k} -> #{v.path}" + #showAllExamples() + options.open = _.extend options.open, allExamplesOpen + grunt.initConfig options + + grunt.registerTask 'build', ['bower', 'clean:dist', 'jshint', 'mkdir', 'coffee', 'ngAnnotate', + 'concat:libs', 'replace', 'webpack'] + + grunt.registerTask 'buildDist', ['build', 'concat:dist'] + + grunt.registerTask "default", [ 'verbosity', 'buildDist', 'copy', 'uglify:dist', 'uglify:streetview', 'karma'] + + grunt.registerTask "buildAll", [ "build", "concat", + "uglify", "copy", "karma", "graph"] + + # run default "grunt" prior to generate _SpecRunner.html + grunt.registerTask "spec", [ 'verbosity', "buildDist", + "copy", "karma", "open:jasmine", "watch:spec"] + + grunt.registerTask "coverage", ['connect:coverage','open:coverage', "watch:spec"] + + grunt.registerTask 'default-no-specs', [ + "clean:dist", "jshint", "mkdir", "coffee", "concat:libs", "replace", "concat:dist", + "copy", "uglify:dist"] + + grunt.registerTask 'offline', ['default-no-specs', 'watch:offline'] + + dev = ["clean:dist", "jshint", "mkdir", "coffee", "concat:libs", "replace", "webpack", "concat", "copy"] + + grunt.registerTask "dev", dev.concat ["uglify:distMapped", "uglify:streetviewMapped", "karma"] + + grunt.registerTask "fast", dev.concat ["karma"] + + + grunt.registerTask "build-street-view", ['clean:streetview','mkdir','coffee', 'concat:libs', 'replace', + 'concat:streetview', 'concat:streetviewMapped', 'uglify:streetview', 'uglify:streetviewMapped'] + + + # Run the example page by creating a local copy of angular-google-maps.js + # and running a webserver on port 3100 with livereload. Web page is opened + # automatically in the default browser. + grunt.registerTask 'graph', ['angular_architecture_graph'] + + grunt.registerTask 'bump-@-preminor', ['changelog', 'bump-only:preminor', 'buildAll', 'bump-commit'] + grunt.registerTask 'bump-@-prerelease', ['changelog','bump-only:prerelease', 'buildAll', 'bump-commit'] + grunt.registerTask 'bump-@', ['changelog','bump-only', 'buildAll', 'bump-commit'] + grunt.registerTask 'bump-@-minor', ['changelog','bump-only:minor', 'buildAll', 'bump-commit'] + grunt.registerTask 'bump-@-major', ['changelog','bump-only:major', 'buildAll', 'bump-commit'] + + exampleOpenTasks = [] + + _.each allExamplesOpen, (v, key) -> + basicTask = "open:" + key + #register individual task (runs by itself) + + grunt.registerTask key, ["fast", "clean:example", "connect:server", basicTask, "watch:all"] + exampleOpenTasks.push basicTask + + allExamplesTaskToRun = ["fast", "clean:example", "connect:server"].concat(exampleOpenTasks).concat ['watch:all'] + + listWithQuotes = (collection, doLog = true) -> + last = collection.length - 1 + all = '' + collection.forEach (t, i) -> + all += if i < last then "'#{t}'," else "'#{t}'" + if doLog + return log all + all + + grunt.registerTask 'listExamples', showOpenType + grunt.registerTask 'listAllOpen', -> + showOpenType(options.open) + + grunt.registerTask 'listAllExamplesTasks', -> + listWithQuotes exampleOpenTasks + + grunt.registerTask 'allExamples', allExamplesTaskToRun + + grunt.registerTask 'server', ["connect:server", "watch:all"] + grunt.registerTask 's', 'server' + + grunt.registerTask 'karma', 'karma runner', -> + kickoff @async(), + logFn: grunt.log.oklns + configFile: require.resolve './karma.conf.coffee' + + grunt.registerTask 'karmaSpecific', 'karma runner', -> + kickoff @async(), + configFile: require.resolve './karma.conf.coffee' + logFn: grunt.log.oklns + appendFiles: argv.files.split(',') + lengthToPop: 1 + reporters: ['mocha'] + + grunt.registerTask 'buildSpecFile', ['buildDist', 'karmaSpecific'] + grunt.registerTask 'buildSpec', ['buildDist', 'karma'] +#to see all tasks available don't forget "grunt --help" !!! diff --git a/client/www/lib/angular-google-maps/bower.json b/client/www/lib/angular-google-maps/bower.json new file mode 100644 index 0000000..136a8e5 --- /dev/null +++ b/client/www/lib/angular-google-maps/bower.json @@ -0,0 +1,43 @@ +{ + "name": "angular-google-maps", + "version": "2.3.3", + "main": "./dist/angular-google-maps.js", + "dependencies": { + "angular": "1.2 - 1.5", + "angular-simple-logger": ">=0.0.1", + "lodash": "3.X - 4.X", + "markerclustererplus": "^2.1.4", + "google-maps-utility-library-v3-markerwithlabel": "git://github.com/nmccready/google-maps-utility-library-v3-markerwithlabel.git", + "google-maps-utility-library-v3-infobox": "^1.1.14", + "google-maps-utility-library-v3-keydragzoom": "^2.0.9", + "js-rich-marker": "*" + }, + "ignore": [ + "*.json", + ".gitignore", + "travis.yml", + "*.html", + "package.js", + "*.markdown", + "example", + "src", + "grunt", + "website_libs", + "scripts", + "spec/coffee/directives", + "spec/coffee/providers", + "spec/coffee/usage", + "tmp", + "dist/coverage/", + "dist/architecture/" + ], + "devDependencies": { + "angular-mocks": "1.2 - 1.5", + "angular-route": "1.2 - 1.5", + "bootstrap-without-jquery": "git://github.com/tagawa/bootstrap-without-jquery.git", + "data-structures": "~1.4.2", + "OverlappingMarkerSpiderfier": "git://github.com/nmccready/OverlappingMarkerSpiderfier.git", + "underscore": "~1.8.3", + "uuid": "http://github.com/LiosK/UUID.js/archive/v3.2.tar.gz" + } +} diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.js b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.js new file mode 100644 index 0000000..30b6b7c --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.js @@ -0,0 +1,677 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ +; +(function( window, angular, undefined ){ + 'use strict'; +/* +! +The MIT License + +Copyright (c) 2010-2013 Google, Inc. http://angularjs.org + +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. + +angular-google-maps +https://github.com/angular-ui/angular-google-maps + +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps.providers', ['nemLogging']); + + angular.module('uiGmapgoogle-maps.wrapped', []); + + angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']); + + angular.module('uiGmapgoogle-maps.directives.api.managers', []); + + angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']); + + angular.module('uiGmapgoogle-maps.directives.api.options.builders', []); + + angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']); + + angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']); + + angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']); + +}).call(this); +;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapuuid', function() { + //BEGIN REPLACE + /* istanbul ignore next */ + /* + Version: core-1.0 + The MIT License: Copyright (c) 2012 LiosK. +*/ +function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c}; + + //END REPLACE +return UUID; +}); +;(function() { + angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [ + '$q', 'uiGmapuuid', function($q, uuid) { + var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration; + scriptId = void 0; + usedConfiguration = void 0; + getScriptUrl = function(options) { + if (options.china) { + return 'http://maps.google.cn/maps/api/js?'; + } else { + if (options.transport === 'auto') { + return '//maps.googleapis.com/maps/api/js?'; + } else { + return options.transport + '://maps.googleapis.com/maps/api/js?'; + } + } + }; + includeScript = function(options) { + var omitOptions, query, script, scriptElem; + omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad']; + if (options.isGoogleMapsForWork) { + omitOptions.push('key'); + } + query = _.map(_.omit(options, omitOptions), function(v, k) { + return k + '=' + v; + }); + if (scriptId) { + scriptElem = document.getElementById(scriptId); + scriptElem.parentNode.removeChild(scriptElem); + } + query = query.join('&'); + script = document.createElement('script'); + script.id = scriptId = "ui_gmap_map_load_" + (uuid.generate()); + script.type = 'text/javascript'; + script.src = getScriptUrl(options) + query; + return document.body.appendChild(script); + }; + isGoogleMapsLoaded = function() { + return angular.isDefined(window.google) && angular.isDefined(window.google.maps); + }; + return { + load: function(options) { + var deferred, randomizedFunctionName; + deferred = $q.defer(); + if (isGoogleMapsLoaded()) { + deferred.resolve(window.google.maps); + return deferred.promise; + } + randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000); + window[randomizedFunctionName] = function() { + window[randomizedFunctionName] = null; + deferred.resolve(window.google.maps); + }; + if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) { + document.addEventListener('online', function() { + if (!isGoogleMapsLoaded()) { + return includeScript(options); + } + }); + } else if (!options.preventLoad) { + includeScript(options); + } + usedConfiguration = options; + usedConfiguration.randomizedFunctionName = randomizedFunctionName; + return deferred.promise; + }, + manualLoad: function() { + var config; + config = usedConfiguration; + if (!isGoogleMapsLoaded()) { + return includeScript(config); + } else { + if (window[config.randomizedFunctionName]) { + return window[config.randomizedFunctionName](); + } + } + } + }; + } + ]).provider('uiGmapGoogleMapApi', function() { + this.options = { + transport: 'https', + isGoogleMapsForWork: false, + china: false, + v: '3', + libraries: '', + language: 'en', + preventLoad: false + }; + this.configure = function(options) { + angular.extend(this.options, options); + }; + this.$get = [ + 'uiGmapMapScriptLoader', (function(_this) { + return function(loader) { + return loader.load(_this.options); + }; + })(this) + ]; + return this; + }).service('uiGmapGoogleMapApiManualLoader', [ + 'uiGmapMapScriptLoader', function(loader) { + return { + load: function() { + loader.manualLoad(); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [ + 'nemSimpleLogger', function(nemSimpleLogger) { + return nemSimpleLogger.spawn(); + } + ]); + +}).call(this); +; +/*global _:true, angular:true, google:true */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [ + 'uiGmapLogger', '$compile', function(Logger, $compile) { + var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords; + _isTruthy = function(value, bool, optionsArray) { + return value === bool || optionsArray.indexOf(value) !== -1; + }; + _isFalse = function(value) { + return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']); + }; + getLatitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[1]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[1]; + } else { + return value.latitude; + } + }; + getLongitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[0]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[0]; + } else { + return value.longitude; + } + }; + getCoords = function(value) { + if (!value) { + return; + } + if (value instanceof google.maps.LatLng) { + return value; + } else if (Array.isArray(value) && value.length === 2) { + return new google.maps.LatLng(value[1], value[0]); + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); + } else { + return new google.maps.LatLng(value.latitude, value.longitude); + } + }; + validateCoords = function(coords) { + if (angular.isUndefined(coords)) { + return false; + } + if (_.isArray(coords)) { + if (coords.length === 2) { + return true; + } + } else if ((coords != null) && (coords != null ? coords.type : void 0)) { + if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { + return true; + } + } + if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { + return true; + } + return false; + }; + return { + setCoordsFromEvent: function(prevValue, newLatLon) { + if (!prevValue) { + return; + } + if (Array.isArray(prevValue) && prevValue.length === 2) { + prevValue[1] = newLatLon.lat(); + prevValue[0] = newLatLon.lng(); + } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') { + prevValue.coordinates[1] = newLatLon.lat(); + prevValue.coordinates[0] = newLatLon.lng(); + } else { + prevValue.latitude = newLatLon.lat(); + prevValue.longitude = newLatLon.lng(); + } + return prevValue; + }, + getLabelPositionPoint: function(anchor) { + var xPos, yPos; + if (anchor === void 0) { + return void 0; + } + anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); + xPos = parseFloat(anchor[1]); + yPos = parseFloat(anchor[2]); + if ((xPos != null) && (yPos != null)) { + return new google.maps.Point(xPos, yPos); + } + }, + createWindowOptions: function(gMarker, scope, content, defaults) { + var options; + if ((content != null) && (defaults != null) && ($compile != null)) { + options = angular.extend({}, defaults, { + content: this.buildContent(scope, defaults, content), + position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) + }); + if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) { + if (options.boxClass == null) { + + } else { + options.pixelOffset = { + height: 0, + width: -2 + }; + } + } + return options; + } else { + if (!defaults) { + Logger.error('infoWindow defaults not defined'); + if (!content) { + return Logger.error('infoWindow content not defined'); + } + } else { + return defaults; + } + } + }, + buildContent: function(scope, defaults, content) { + var parsed, ret; + if (defaults.content != null) { + ret = defaults.content; + } else { + if ($compile != null) { + content = content.replace(/^\s+|\s+$/g, ''); + parsed = content === '' ? '' : $compile(content)(scope); + if (parsed.length > 0) { + ret = parsed[0]; + } + } else { + ret = content; + } + } + return ret; + }, + defaultDelay: 50, + isTrue: function(value) { + return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']); + }, + isFalse: _isFalse, + isFalsy: function(value) { + return _isTruthy(value, false, [void 0, null]) || _isFalse(value); + }, + getCoords: getCoords, + validateCoords: validateCoords, + equalCoords: function(coord1, coord2) { + return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); + }, + validatePath: function(path) { + var array, i, polygon, trackMaxVertices; + i = 0; + if (angular.isUndefined(path.type)) { + if (!Array.isArray(path) || path.length < 2) { + return false; + } + while (i < path.length) { + if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) { + return false; + } + i++; + } + return true; + } else { + if (angular.isUndefined(path.coordinates)) { + return false; + } + if (path.type === 'Polygon') { + if (path.coordinates[0].length < 4) { + return false; + } + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + polygon = path.coordinates[trackMaxVertices.index]; + array = polygon[0]; + if (array.length < 4) { + return false; + } + } else if (path.type === 'LineString') { + if (path.coordinates.length < 2) { + return false; + } + array = path.coordinates; + } else { + return false; + } + while (i < array.length) { + if (array[i].length !== 2) { + return false; + } + i++; + } + return true; + } + }, + convertPathPoints: function(path) { + var array, i, latlng, result, trackMaxVertices; + i = 0; + result = new google.maps.MVCArray(); + if (angular.isUndefined(path.type)) { + while (i < path.length) { + latlng; + if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { + latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); + } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') { + latlng = path[i]; + } + result.push(latlng); + i++; + } + } else { + array; + if (path.type === 'Polygon') { + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + array = path.coordinates[trackMaxVertices.index][0]; + } else if (path.type === 'LineString') { + array = path.coordinates; + } + while (i < array.length) { + result.push(new google.maps.LatLng(array[i][1], array[i][0])); + i++; + } + } + return result; + }, + getPath: function(object, key) { + var obj; + if ((key == null) || !_.isString(key)) { + return key; + } + obj = object; + _.each(key.split('.'), function(value) { + if (obj) { + return obj = obj[value]; + } + }); + return obj; + }, + validateBoundPoints: function(bounds) { + if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { + return false; + } + return true; + }, + convertBoundPoints: function(bounds) { + var result; + result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); + return result; + }, + fitMapBounds: function(map, bounds) { + return map.fitBounds(bounds); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper", [ + "uiGmapLogger", function($log) { + var _getEventsObj, _hasEvents; + _hasEvents = function(obj) { + return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events); + }; + _getEventsObj = function(scope, model) { + if (_hasEvents(scope)) { + return scope; + } + if (_hasEvents(model)) { + return model; + } + }; + return { + setEvents: function(gObject, scope, model, ignores) { + var eventObj; + eventObj = _getEventsObj(scope, model); + if (eventObj != null) { + return _.compact(_.map(eventObj.events, function(eventHandler, eventName) { + var doIgnore; + if (ignores) { + doIgnore = _(ignores).includes(eventName); + } + if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) { + return google.maps.event.addListener(gObject, eventName, function() { + if (!scope.$evalAsync) { + scope.$evalAsync = function() {}; + } + return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments])); + }); + } + })); + } + }, + removeEvents: function(listeners) { + var key, l; + if (!listeners) { + return; + } + for (key in listeners) { + l = listeners[key]; + if (l && listeners.hasOwnProperty(key)) { + google.maps.event.removeListener(l); + } + } + } + }; + } + ]); + +}).call(this); +; +/* +@authors: +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +StreetViewPanorama Directive to care of basic initialization of StreetViewPanorama + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) { + var name; + name = 'uiGmapStreetViewPanorama'; + return { + restrict: 'EMA', + template: '
', + replace: true, + scope: { + focalcoord: '=', + radius: '=?', + events: '=?', + options: '=?', + control: '=?', + povoptions: '=?', + imagestatus: '=' + }, + link: function(scope, element, attrs) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv; + pano = void 0; + sv = void 0; + didCreateOptionsFromDirective = false; + listeners = void 0; + opts = null; + povOpts = null; + clean = function() { + EventsHelper.removeEvents(listeners); + if (pano != null) { + pano.unbind('position'); + pano.setVisible(false); + } + if (sv != null) { + if ((sv != null ? sv.setVisible : void 0) != null) { + sv.setVisible(false); + } + return sv = void 0; + } + }; + handleSettings = function(perspectivePoint, focalPoint) { + var heading; + heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint); + didCreateOptionsFromDirective = true; + scope.radius = scope.radius || 50; + povOpts = angular.extend({ + heading: heading, + zoom: 1, + pitch: 0 + }, scope.povoptions || {}); + opts = opts = angular.extend({ + navigationControl: false, + addressControl: false, + linksControl: false, + position: perspectivePoint, + pov: povOpts, + visible: true + }, scope.options || {}); + return didCreateOptionsFromDirective = false; + }; + create = function() { + var focalPoint; + if (!scope.focalcoord) { + $log.error(name + ": focalCoord needs to be defined"); + return; + } + if (!scope.radius) { + $log.error(name + ": needs a radius to set the camera view from its focal target."); + return; + } + clean(); + if (sv == null) { + sv = new google.maps.StreetViewService(); + } + if (scope.events) { + listeners = EventsHelper.setEvents(sv, scope, scope); + } + focalPoint = GmapUtil.getCoords(scope.focalcoord); + return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) { + var ele, perspectivePoint, ref; + if (scope.imagestatus != null) { + scope.imagestatus = status; + } + if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) { + scope.events.image_status_changed(sv, 'image_status_changed', scope, status); + } + if (status === "OK") { + perspectivePoint = streetViewPanoramaData.location.latLng; + handleSettings(perspectivePoint, focalPoint); + ele = element[0]; + return pano = new google.maps.StreetViewPanorama(ele, opts); + } + }); + }; + if (scope.control != null) { + scope.control.getOptions = function() { + return opts; + }; + scope.control.getPovOptions = function() { + return povOpts; + }; + scope.control.getGObject = function() { + return sv; + }; + scope.control.getGPano = function() { + return pano; + }; + } + scope.$watch('options', function(newValue, oldValue) { + if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) { + return; + } + return create(); + }); + firstTime = true; + scope.$watch('focalcoord', function(newValue, oldValue) { + if (newValue === oldValue && !firstTime) { + return; + } + if (newValue == null) { + return; + } + firstTime = false; + return create(); + }); + return scope.$on('$destroy', function() { + return clean(); + }); + }; + })(this)); + } + }; + } + ]); + +}).call(this); +}( window,angular)); \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.min.js b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.min.js new file mode 100644 index 0000000..ab9f709 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view.min.js @@ -0,0 +1,7 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ + +!function(a,b,c){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h,i;return h=void 0,i=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c,f,g;return b=["transport","isGoogleMapsForWork","china","preventLoad"],a.isGoogleMapsForWork&&b.push("key"),c=_.map(_.omit(a,b),function(a,b){return b+"="+a}),h&&(g=document.getElementById(h),g.parentNode.removeChild(g)),c=c.join("&"),f=document.createElement("script"),f.id=h="ui_gmap_map_load_"+d.generate(),f.type="text/javascript",f.src=e(a)+c,document.body.appendChild(f)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE&&!b.preventLoad?document.addEventListener("online",function(){return g()?void 0:f(b)}):b.preventLoad||f(b),i=b,i.randomizedFunctionName=e,d.promise)},manualLoad:function(){var b;return b=i,g()?a[b.randomizedFunctionName]?a[b.randomizedFunctionName]():void 0:f(b)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(a){return{load:function(){a.manualLoad()}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?a instanceof google.maps.LatLng?a:Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return!(!a||!b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0)))},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;if(void 0!==a)return a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(g,h,i){return a.then(function(a){return function(a){var i,j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){return e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r?(null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0):void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;return null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c?(e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)):void 0})):void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){return a===b||a===o||k?void 0:j()}),l=!0,g.$watch("focalcoord",function(a,b){return a===b&&!l||null==a?void 0:(l=!1,j())}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this)}(window,angular); +//# sourceMappingURL=angular-google-maps-street-view_dev_mapped.min.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js new file mode 100644 index 0000000..2dd0788 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js @@ -0,0 +1,678 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ +; +(function( window, angular, undefined ){ + 'use strict'; +/* +! +The MIT License + +Copyright (c) 2010-2013 Google, Inc. http://angularjs.org + +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. + +angular-google-maps +https://github.com/angular-ui/angular-google-maps + +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps.providers', ['nemLogging']); + + angular.module('uiGmapgoogle-maps.wrapped', []); + + angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']); + + angular.module('uiGmapgoogle-maps.directives.api.managers', []); + + angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']); + + angular.module('uiGmapgoogle-maps.directives.api.options.builders', []); + + angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']); + + angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']); + + angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']); + +}).call(this); +;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapuuid', function() { + //BEGIN REPLACE + /* istanbul ignore next */ + /* + Version: core-1.0 + The MIT License: Copyright (c) 2012 LiosK. +*/ +function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c}; + + //END REPLACE +return UUID; +}); +;(function() { + angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [ + '$q', 'uiGmapuuid', function($q, uuid) { + var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration; + scriptId = void 0; + usedConfiguration = void 0; + getScriptUrl = function(options) { + if (options.china) { + return 'http://maps.google.cn/maps/api/js?'; + } else { + if (options.transport === 'auto') { + return '//maps.googleapis.com/maps/api/js?'; + } else { + return options.transport + '://maps.googleapis.com/maps/api/js?'; + } + } + }; + includeScript = function(options) { + var omitOptions, query, script, scriptElem; + omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad']; + if (options.isGoogleMapsForWork) { + omitOptions.push('key'); + } + query = _.map(_.omit(options, omitOptions), function(v, k) { + return k + '=' + v; + }); + if (scriptId) { + scriptElem = document.getElementById(scriptId); + scriptElem.parentNode.removeChild(scriptElem); + } + query = query.join('&'); + script = document.createElement('script'); + script.id = scriptId = "ui_gmap_map_load_" + (uuid.generate()); + script.type = 'text/javascript'; + script.src = getScriptUrl(options) + query; + return document.body.appendChild(script); + }; + isGoogleMapsLoaded = function() { + return angular.isDefined(window.google) && angular.isDefined(window.google.maps); + }; + return { + load: function(options) { + var deferred, randomizedFunctionName; + deferred = $q.defer(); + if (isGoogleMapsLoaded()) { + deferred.resolve(window.google.maps); + return deferred.promise; + } + randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000); + window[randomizedFunctionName] = function() { + window[randomizedFunctionName] = null; + deferred.resolve(window.google.maps); + }; + if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) { + document.addEventListener('online', function() { + if (!isGoogleMapsLoaded()) { + return includeScript(options); + } + }); + } else if (!options.preventLoad) { + includeScript(options); + } + usedConfiguration = options; + usedConfiguration.randomizedFunctionName = randomizedFunctionName; + return deferred.promise; + }, + manualLoad: function() { + var config; + config = usedConfiguration; + if (!isGoogleMapsLoaded()) { + return includeScript(config); + } else { + if (window[config.randomizedFunctionName]) { + return window[config.randomizedFunctionName](); + } + } + } + }; + } + ]).provider('uiGmapGoogleMapApi', function() { + this.options = { + transport: 'https', + isGoogleMapsForWork: false, + china: false, + v: '3', + libraries: '', + language: 'en', + preventLoad: false + }; + this.configure = function(options) { + angular.extend(this.options, options); + }; + this.$get = [ + 'uiGmapMapScriptLoader', (function(_this) { + return function(loader) { + return loader.load(_this.options); + }; + })(this) + ]; + return this; + }).service('uiGmapGoogleMapApiManualLoader', [ + 'uiGmapMapScriptLoader', function(loader) { + return { + load: function() { + loader.manualLoad(); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [ + 'nemSimpleLogger', function(nemSimpleLogger) { + return nemSimpleLogger.spawn(); + } + ]); + +}).call(this); +; +/*global _:true, angular:true, google:true */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [ + 'uiGmapLogger', '$compile', function(Logger, $compile) { + var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords; + _isTruthy = function(value, bool, optionsArray) { + return value === bool || optionsArray.indexOf(value) !== -1; + }; + _isFalse = function(value) { + return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']); + }; + getLatitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[1]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[1]; + } else { + return value.latitude; + } + }; + getLongitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[0]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[0]; + } else { + return value.longitude; + } + }; + getCoords = function(value) { + if (!value) { + return; + } + if (value instanceof google.maps.LatLng) { + return value; + } else if (Array.isArray(value) && value.length === 2) { + return new google.maps.LatLng(value[1], value[0]); + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); + } else { + return new google.maps.LatLng(value.latitude, value.longitude); + } + }; + validateCoords = function(coords) { + if (angular.isUndefined(coords)) { + return false; + } + if (_.isArray(coords)) { + if (coords.length === 2) { + return true; + } + } else if ((coords != null) && (coords != null ? coords.type : void 0)) { + if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { + return true; + } + } + if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { + return true; + } + return false; + }; + return { + setCoordsFromEvent: function(prevValue, newLatLon) { + if (!prevValue) { + return; + } + if (Array.isArray(prevValue) && prevValue.length === 2) { + prevValue[1] = newLatLon.lat(); + prevValue[0] = newLatLon.lng(); + } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') { + prevValue.coordinates[1] = newLatLon.lat(); + prevValue.coordinates[0] = newLatLon.lng(); + } else { + prevValue.latitude = newLatLon.lat(); + prevValue.longitude = newLatLon.lng(); + } + return prevValue; + }, + getLabelPositionPoint: function(anchor) { + var xPos, yPos; + if (anchor === void 0) { + return void 0; + } + anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); + xPos = parseFloat(anchor[1]); + yPos = parseFloat(anchor[2]); + if ((xPos != null) && (yPos != null)) { + return new google.maps.Point(xPos, yPos); + } + }, + createWindowOptions: function(gMarker, scope, content, defaults) { + var options; + if ((content != null) && (defaults != null) && ($compile != null)) { + options = angular.extend({}, defaults, { + content: this.buildContent(scope, defaults, content), + position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) + }); + if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) { + if (options.boxClass == null) { + + } else { + options.pixelOffset = { + height: 0, + width: -2 + }; + } + } + return options; + } else { + if (!defaults) { + Logger.error('infoWindow defaults not defined'); + if (!content) { + return Logger.error('infoWindow content not defined'); + } + } else { + return defaults; + } + } + }, + buildContent: function(scope, defaults, content) { + var parsed, ret; + if (defaults.content != null) { + ret = defaults.content; + } else { + if ($compile != null) { + content = content.replace(/^\s+|\s+$/g, ''); + parsed = content === '' ? '' : $compile(content)(scope); + if (parsed.length > 0) { + ret = parsed[0]; + } + } else { + ret = content; + } + } + return ret; + }, + defaultDelay: 50, + isTrue: function(value) { + return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']); + }, + isFalse: _isFalse, + isFalsy: function(value) { + return _isTruthy(value, false, [void 0, null]) || _isFalse(value); + }, + getCoords: getCoords, + validateCoords: validateCoords, + equalCoords: function(coord1, coord2) { + return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); + }, + validatePath: function(path) { + var array, i, polygon, trackMaxVertices; + i = 0; + if (angular.isUndefined(path.type)) { + if (!Array.isArray(path) || path.length < 2) { + return false; + } + while (i < path.length) { + if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) { + return false; + } + i++; + } + return true; + } else { + if (angular.isUndefined(path.coordinates)) { + return false; + } + if (path.type === 'Polygon') { + if (path.coordinates[0].length < 4) { + return false; + } + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + polygon = path.coordinates[trackMaxVertices.index]; + array = polygon[0]; + if (array.length < 4) { + return false; + } + } else if (path.type === 'LineString') { + if (path.coordinates.length < 2) { + return false; + } + array = path.coordinates; + } else { + return false; + } + while (i < array.length) { + if (array[i].length !== 2) { + return false; + } + i++; + } + return true; + } + }, + convertPathPoints: function(path) { + var array, i, latlng, result, trackMaxVertices; + i = 0; + result = new google.maps.MVCArray(); + if (angular.isUndefined(path.type)) { + while (i < path.length) { + latlng; + if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { + latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); + } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') { + latlng = path[i]; + } + result.push(latlng); + i++; + } + } else { + array; + if (path.type === 'Polygon') { + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + array = path.coordinates[trackMaxVertices.index][0]; + } else if (path.type === 'LineString') { + array = path.coordinates; + } + while (i < array.length) { + result.push(new google.maps.LatLng(array[i][1], array[i][0])); + i++; + } + } + return result; + }, + getPath: function(object, key) { + var obj; + if ((key == null) || !_.isString(key)) { + return key; + } + obj = object; + _.each(key.split('.'), function(value) { + if (obj) { + return obj = obj[value]; + } + }); + return obj; + }, + validateBoundPoints: function(bounds) { + if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { + return false; + } + return true; + }, + convertBoundPoints: function(bounds) { + var result; + result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); + return result; + }, + fitMapBounds: function(map, bounds) { + return map.fitBounds(bounds); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper", [ + "uiGmapLogger", function($log) { + var _getEventsObj, _hasEvents; + _hasEvents = function(obj) { + return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events); + }; + _getEventsObj = function(scope, model) { + if (_hasEvents(scope)) { + return scope; + } + if (_hasEvents(model)) { + return model; + } + }; + return { + setEvents: function(gObject, scope, model, ignores) { + var eventObj; + eventObj = _getEventsObj(scope, model); + if (eventObj != null) { + return _.compact(_.map(eventObj.events, function(eventHandler, eventName) { + var doIgnore; + if (ignores) { + doIgnore = _(ignores).includes(eventName); + } + if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) { + return google.maps.event.addListener(gObject, eventName, function() { + if (!scope.$evalAsync) { + scope.$evalAsync = function() {}; + } + return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments])); + }); + } + })); + } + }, + removeEvents: function(listeners) { + var key, l; + if (!listeners) { + return; + } + for (key in listeners) { + l = listeners[key]; + if (l && listeners.hasOwnProperty(key)) { + google.maps.event.removeListener(l); + } + } + } + }; + } + ]); + +}).call(this); +; +/* +@authors: +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +StreetViewPanorama Directive to care of basic initialization of StreetViewPanorama + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) { + var name; + name = 'uiGmapStreetViewPanorama'; + return { + restrict: 'EMA', + template: '
', + replace: true, + scope: { + focalcoord: '=', + radius: '=?', + events: '=?', + options: '=?', + control: '=?', + povoptions: '=?', + imagestatus: '=' + }, + link: function(scope, element, attrs) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv; + pano = void 0; + sv = void 0; + didCreateOptionsFromDirective = false; + listeners = void 0; + opts = null; + povOpts = null; + clean = function() { + EventsHelper.removeEvents(listeners); + if (pano != null) { + pano.unbind('position'); + pano.setVisible(false); + } + if (sv != null) { + if ((sv != null ? sv.setVisible : void 0) != null) { + sv.setVisible(false); + } + return sv = void 0; + } + }; + handleSettings = function(perspectivePoint, focalPoint) { + var heading; + heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint); + didCreateOptionsFromDirective = true; + scope.radius = scope.radius || 50; + povOpts = angular.extend({ + heading: heading, + zoom: 1, + pitch: 0 + }, scope.povoptions || {}); + opts = opts = angular.extend({ + navigationControl: false, + addressControl: false, + linksControl: false, + position: perspectivePoint, + pov: povOpts, + visible: true + }, scope.options || {}); + return didCreateOptionsFromDirective = false; + }; + create = function() { + var focalPoint; + if (!scope.focalcoord) { + $log.error(name + ": focalCoord needs to be defined"); + return; + } + if (!scope.radius) { + $log.error(name + ": needs a radius to set the camera view from its focal target."); + return; + } + clean(); + if (sv == null) { + sv = new google.maps.StreetViewService(); + } + if (scope.events) { + listeners = EventsHelper.setEvents(sv, scope, scope); + } + focalPoint = GmapUtil.getCoords(scope.focalcoord); + return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) { + var ele, perspectivePoint, ref; + if (scope.imagestatus != null) { + scope.imagestatus = status; + } + if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) { + scope.events.image_status_changed(sv, 'image_status_changed', scope, status); + } + if (status === "OK") { + perspectivePoint = streetViewPanoramaData.location.latLng; + handleSettings(perspectivePoint, focalPoint); + ele = element[0]; + return pano = new google.maps.StreetViewPanorama(ele, opts); + } + }); + }; + if (scope.control != null) { + scope.control.getOptions = function() { + return opts; + }; + scope.control.getPovOptions = function() { + return povOpts; + }; + scope.control.getGObject = function() { + return sv; + }; + scope.control.getGPano = function() { + return pano; + }; + } + scope.$watch('options', function(newValue, oldValue) { + if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) { + return; + } + return create(); + }); + firstTime = true; + scope.$watch('focalcoord', function(newValue, oldValue) { + if (newValue === oldValue && !firstTime) { + return; + } + if (newValue == null) { + return; + } + firstTime = false; + return create(); + }); + return scope.$on('$destroy', function() { + return clean(); + }); + }; + })(this)); + } + }; + } + ]); + +}).call(this); +}( window,angular)); +//# sourceMappingURL=angular-google-maps-street-view_dev_mapped.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js.map b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js.map new file mode 100644 index 0000000..be2014a --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../tmp/src/coffee/module.js","../tmp/wrapped_uuid.js","../tmp/src/coffee/providers/map-loader.js","../tmp/src/coffee/directives/api/utils/logger.js","../tmp/src/coffee/directives/api/utils/gmap-util.js","../tmp/src/coffee/directives/api/utils/events-helper.js","../tmp/src/coffee/directives/street-view-panorama.js"],"names":[],"mappings":";;;;;;eAAA;AACA,EAAE;AACF,CAAC;AACD,GAAG,CAAC,GAAG,CAAC,OAAO;AACf;AACA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG;AACzD;AACA,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;AAC5E,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,IAAI;AAC7E,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM;AAC5E,EAAE,CAAC,GAAG,CAAC,CAAC,IAA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gBAAgB,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,GAAG;AAChC,cAAc,GAAG;AACjB,cAAc,MAAM,CAAC,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;AACvD,gBAAgB,MAAM,CAAC,KAAK,GAAG;AAC/B,cAAc,GAAG;AACjB,YAAY,EAAE;AACd,UAAU,GAAG,IAAI,GAAG;AACpB,QAAQ,CAAC;AACT,MAAM,EAAE;AACR,IAAI,CAAC;AACL,EAAE,GAAG;AACL;AACA,GAAG,IAAI,CAAC,IAAI,EAAE","file":"angular-google-maps-street-view_dev_mapped.js","sourcesContent":["\n/*\n!\nThe MIT License\n\nCopyright (c) 2010-2013 Google, Inc. http://angularjs.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the 'Software'), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\nangular-google-maps\nhttps://github.com/angular-ui/angular-google-maps\n\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps.providers', ['nemLogging']);\n\n angular.module('uiGmapgoogle-maps.wrapped', []);\n\n angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']);\n\n angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']);\n\n angular.module('uiGmapgoogle-maps.directives.api.managers', []);\n\n angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']);\n\n angular.module('uiGmapgoogle-maps.directives.api.options.builders', []);\n\n angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']);\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']);\n\n angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']);\n\n angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']);\n\n}).call(this);\n","angular.module('uiGmapgoogle-maps.wrapped')\n.service('uiGmapuuid', function() {\n //BEGIN REPLACE\n /* istanbul ignore next */\n /*\n Version: core-1.0\n The MIT License: Copyright (c) 2012 LiosK.\n*/\nfunction UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+\"-\"+b(a(16),4)+\"-\"+b(16384|a(12),4)+\"-\"+b(32768|a(14),4)+\"-\"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c};\n\n //END REPLACE\nreturn UUID;\n});\n","(function() {\n angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [\n '$q', 'uiGmapuuid', function($q, uuid) {\n var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration;\n scriptId = void 0;\n usedConfiguration = void 0;\n getScriptUrl = function(options) {\n if (options.china) {\n return 'http://maps.google.cn/maps/api/js?';\n } else {\n if (options.transport === 'auto') {\n return '//maps.googleapis.com/maps/api/js?';\n } else {\n return options.transport + '://maps.googleapis.com/maps/api/js?';\n }\n }\n };\n includeScript = function(options) {\n var omitOptions, query, script, scriptElem;\n omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad'];\n if (options.isGoogleMapsForWork) {\n omitOptions.push('key');\n }\n query = _.map(_.omit(options, omitOptions), function(v, k) {\n return k + '=' + v;\n });\n if (scriptId) {\n scriptElem = document.getElementById(scriptId);\n scriptElem.parentNode.removeChild(scriptElem);\n }\n query = query.join('&');\n script = document.createElement('script');\n script.id = scriptId = \"ui_gmap_map_load_\" + (uuid.generate());\n script.type = 'text/javascript';\n script.src = getScriptUrl(options) + query;\n return document.body.appendChild(script);\n };\n isGoogleMapsLoaded = function() {\n return angular.isDefined(window.google) && angular.isDefined(window.google.maps);\n };\n return {\n load: function(options) {\n var deferred, randomizedFunctionName;\n deferred = $q.defer();\n if (isGoogleMapsLoaded()) {\n deferred.resolve(window.google.maps);\n return deferred.promise;\n }\n randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000);\n window[randomizedFunctionName] = function() {\n window[randomizedFunctionName] = null;\n deferred.resolve(window.google.maps);\n };\n if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) {\n document.addEventListener('online', function() {\n if (!isGoogleMapsLoaded()) {\n return includeScript(options);\n }\n });\n } else if (!options.preventLoad) {\n includeScript(options);\n }\n usedConfiguration = options;\n usedConfiguration.randomizedFunctionName = randomizedFunctionName;\n return deferred.promise;\n },\n manualLoad: function() {\n var config;\n config = usedConfiguration;\n if (!isGoogleMapsLoaded()) {\n return includeScript(config);\n } else {\n if (window[config.randomizedFunctionName]) {\n return window[config.randomizedFunctionName]();\n }\n }\n }\n };\n }\n ]).provider('uiGmapGoogleMapApi', function() {\n this.options = {\n transport: 'https',\n isGoogleMapsForWork: false,\n china: false,\n v: '3',\n libraries: '',\n language: 'en',\n preventLoad: false\n };\n this.configure = function(options) {\n angular.extend(this.options, options);\n };\n this.$get = [\n 'uiGmapMapScriptLoader', (function(_this) {\n return function(loader) {\n return loader.load(_this.options);\n };\n })(this)\n ];\n return this;\n }).service('uiGmapGoogleMapApiManualLoader', [\n 'uiGmapMapScriptLoader', function(loader) {\n return {\n load: function() {\n loader.manualLoad();\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [\n 'nemSimpleLogger', function(nemSimpleLogger) {\n return nemSimpleLogger.spawn();\n }\n ]);\n\n}).call(this);\n","\n/*global _:true, angular:true, google:true */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [\n 'uiGmapLogger', '$compile', function(Logger, $compile) {\n var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords;\n _isTruthy = function(value, bool, optionsArray) {\n return value === bool || optionsArray.indexOf(value) !== -1;\n };\n _isFalse = function(value) {\n return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']);\n };\n getLatitude = function(value) {\n if (Array.isArray(value) && value.length === 2) {\n return value[1];\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return value.coordinates[1];\n } else {\n return value.latitude;\n }\n };\n getLongitude = function(value) {\n if (Array.isArray(value) && value.length === 2) {\n return value[0];\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return value.coordinates[0];\n } else {\n return value.longitude;\n }\n };\n getCoords = function(value) {\n if (!value) {\n return;\n }\n if (value instanceof google.maps.LatLng) {\n return value;\n } else if (Array.isArray(value) && value.length === 2) {\n return new google.maps.LatLng(value[1], value[0]);\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]);\n } else {\n return new google.maps.LatLng(value.latitude, value.longitude);\n }\n };\n validateCoords = function(coords) {\n if (angular.isUndefined(coords)) {\n return false;\n }\n if (_.isArray(coords)) {\n if (coords.length === 2) {\n return true;\n }\n } else if ((coords != null) && (coords != null ? coords.type : void 0)) {\n if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) {\n return true;\n }\n }\n if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) {\n return true;\n }\n return false;\n };\n return {\n setCoordsFromEvent: function(prevValue, newLatLon) {\n if (!prevValue) {\n return;\n }\n if (Array.isArray(prevValue) && prevValue.length === 2) {\n prevValue[1] = newLatLon.lat();\n prevValue[0] = newLatLon.lng();\n } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') {\n prevValue.coordinates[1] = newLatLon.lat();\n prevValue.coordinates[0] = newLatLon.lng();\n } else {\n prevValue.latitude = newLatLon.lat();\n prevValue.longitude = newLatLon.lng();\n }\n return prevValue;\n },\n getLabelPositionPoint: function(anchor) {\n var xPos, yPos;\n if (anchor === void 0) {\n return void 0;\n }\n anchor = /^([-\\d\\.]+)\\s([-\\d\\.]+)$/.exec(anchor);\n xPos = parseFloat(anchor[1]);\n yPos = parseFloat(anchor[2]);\n if ((xPos != null) && (yPos != null)) {\n return new google.maps.Point(xPos, yPos);\n }\n },\n createWindowOptions: function(gMarker, scope, content, defaults) {\n var options;\n if ((content != null) && (defaults != null) && ($compile != null)) {\n options = angular.extend({}, defaults, {\n content: this.buildContent(scope, defaults, content),\n position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords)\n });\n if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) {\n if (options.boxClass == null) {\n\n } else {\n options.pixelOffset = {\n height: 0,\n width: -2\n };\n }\n }\n return options;\n } else {\n if (!defaults) {\n Logger.error('infoWindow defaults not defined');\n if (!content) {\n return Logger.error('infoWindow content not defined');\n }\n } else {\n return defaults;\n }\n }\n },\n buildContent: function(scope, defaults, content) {\n var parsed, ret;\n if (defaults.content != null) {\n ret = defaults.content;\n } else {\n if ($compile != null) {\n content = content.replace(/^\\s+|\\s+$/g, '');\n parsed = content === '' ? '' : $compile(content)(scope);\n if (parsed.length > 0) {\n ret = parsed[0];\n }\n } else {\n ret = content;\n }\n }\n return ret;\n },\n defaultDelay: 50,\n isTrue: function(value) {\n return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']);\n },\n isFalse: _isFalse,\n isFalsy: function(value) {\n return _isTruthy(value, false, [void 0, null]) || _isFalse(value);\n },\n getCoords: getCoords,\n validateCoords: validateCoords,\n equalCoords: function(coord1, coord2) {\n return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2);\n },\n validatePath: function(path) {\n var array, i, polygon, trackMaxVertices;\n i = 0;\n if (angular.isUndefined(path.type)) {\n if (!Array.isArray(path) || path.length < 2) {\n return false;\n }\n while (i < path.length) {\n if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) {\n return false;\n }\n i++;\n }\n return true;\n } else {\n if (angular.isUndefined(path.coordinates)) {\n return false;\n }\n if (path.type === 'Polygon') {\n if (path.coordinates[0].length < 4) {\n return false;\n }\n array = path.coordinates[0];\n } else if (path.type === 'MultiPolygon') {\n trackMaxVertices = {\n max: 0,\n index: 0\n };\n _.forEach(path.coordinates, function(polygon, index) {\n if (polygon[0].length > this.max) {\n this.max = polygon[0].length;\n return this.index = index;\n }\n }, trackMaxVertices);\n polygon = path.coordinates[trackMaxVertices.index];\n array = polygon[0];\n if (array.length < 4) {\n return false;\n }\n } else if (path.type === 'LineString') {\n if (path.coordinates.length < 2) {\n return false;\n }\n array = path.coordinates;\n } else {\n return false;\n }\n while (i < array.length) {\n if (array[i].length !== 2) {\n return false;\n }\n i++;\n }\n return true;\n }\n },\n convertPathPoints: function(path) {\n var array, i, latlng, result, trackMaxVertices;\n i = 0;\n result = new google.maps.MVCArray();\n if (angular.isUndefined(path.type)) {\n while (i < path.length) {\n latlng;\n if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) {\n latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude);\n } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') {\n latlng = path[i];\n }\n result.push(latlng);\n i++;\n }\n } else {\n array;\n if (path.type === 'Polygon') {\n array = path.coordinates[0];\n } else if (path.type === 'MultiPolygon') {\n trackMaxVertices = {\n max: 0,\n index: 0\n };\n _.forEach(path.coordinates, function(polygon, index) {\n if (polygon[0].length > this.max) {\n this.max = polygon[0].length;\n return this.index = index;\n }\n }, trackMaxVertices);\n array = path.coordinates[trackMaxVertices.index][0];\n } else if (path.type === 'LineString') {\n array = path.coordinates;\n }\n while (i < array.length) {\n result.push(new google.maps.LatLng(array[i][1], array[i][0]));\n i++;\n }\n }\n return result;\n },\n getPath: function(object, key) {\n var obj;\n if ((key == null) || !_.isString(key)) {\n return key;\n }\n obj = object;\n _.each(key.split('.'), function(value) {\n if (obj) {\n return obj = obj[value];\n }\n });\n return obj;\n },\n validateBoundPoints: function(bounds) {\n if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) {\n return false;\n }\n return true;\n },\n convertBoundPoints: function(bounds) {\n var result;\n result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude));\n return result;\n },\n fitMapBounds: function(map, bounds) {\n return map.fitBounds(bounds);\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").service(\"uiGmapEventsHelper\", [\n \"uiGmapLogger\", function($log) {\n var _getEventsObj, _hasEvents;\n _hasEvents = function(obj) {\n return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events);\n };\n _getEventsObj = function(scope, model) {\n if (_hasEvents(scope)) {\n return scope;\n }\n if (_hasEvents(model)) {\n return model;\n }\n };\n return {\n setEvents: function(gObject, scope, model, ignores) {\n var eventObj;\n eventObj = _getEventsObj(scope, model);\n if (eventObj != null) {\n return _.compact(_.map(eventObj.events, function(eventHandler, eventName) {\n var doIgnore;\n if (ignores) {\n doIgnore = _(ignores).includes(eventName);\n }\n if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) {\n return google.maps.event.addListener(gObject, eventName, function() {\n if (!scope.$evalAsync) {\n scope.$evalAsync = function() {};\n }\n return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments]));\n });\n }\n }));\n }\n },\n removeEvents: function(listeners) {\n var key, l;\n if (!listeners) {\n return;\n }\n for (key in listeners) {\n l = listeners[key];\n if (l && listeners.hasOwnProperty(key)) {\n google.maps.event.removeListener(l);\n }\n }\n }\n };\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors:\n- Nicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nStreetViewPanorama Directive to care of basic initialization of StreetViewPanorama\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [\n 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) {\n var name;\n name = 'uiGmapStreetViewPanorama';\n return {\n restrict: 'EMA',\n template: '
',\n replace: true,\n scope: {\n focalcoord: '=',\n radius: '=?',\n events: '=?',\n options: '=?',\n control: '=?',\n povoptions: '=?',\n imagestatus: '='\n },\n link: function(scope, element, attrs) {\n return GoogleMapApi.then((function(_this) {\n return function(maps) {\n var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv;\n pano = void 0;\n sv = void 0;\n didCreateOptionsFromDirective = false;\n listeners = void 0;\n opts = null;\n povOpts = null;\n clean = function() {\n EventsHelper.removeEvents(listeners);\n if (pano != null) {\n pano.unbind('position');\n pano.setVisible(false);\n }\n if (sv != null) {\n if ((sv != null ? sv.setVisible : void 0) != null) {\n sv.setVisible(false);\n }\n return sv = void 0;\n }\n };\n handleSettings = function(perspectivePoint, focalPoint) {\n var heading;\n heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint);\n didCreateOptionsFromDirective = true;\n scope.radius = scope.radius || 50;\n povOpts = angular.extend({\n heading: heading,\n zoom: 1,\n pitch: 0\n }, scope.povoptions || {});\n opts = opts = angular.extend({\n navigationControl: false,\n addressControl: false,\n linksControl: false,\n position: perspectivePoint,\n pov: povOpts,\n visible: true\n }, scope.options || {});\n return didCreateOptionsFromDirective = false;\n };\n create = function() {\n var focalPoint;\n if (!scope.focalcoord) {\n $log.error(name + \": focalCoord needs to be defined\");\n return;\n }\n if (!scope.radius) {\n $log.error(name + \": needs a radius to set the camera view from its focal target.\");\n return;\n }\n clean();\n if (sv == null) {\n sv = new google.maps.StreetViewService();\n }\n if (scope.events) {\n listeners = EventsHelper.setEvents(sv, scope, scope);\n }\n focalPoint = GmapUtil.getCoords(scope.focalcoord);\n return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) {\n var ele, perspectivePoint, ref;\n if (scope.imagestatus != null) {\n scope.imagestatus = status;\n }\n if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) {\n scope.events.image_status_changed(sv, 'image_status_changed', scope, status);\n }\n if (status === \"OK\") {\n perspectivePoint = streetViewPanoramaData.location.latLng;\n handleSettings(perspectivePoint, focalPoint);\n ele = element[0];\n return pano = new google.maps.StreetViewPanorama(ele, opts);\n }\n });\n };\n if (scope.control != null) {\n scope.control.getOptions = function() {\n return opts;\n };\n scope.control.getPovOptions = function() {\n return povOpts;\n };\n scope.control.getGObject = function() {\n return sv;\n };\n scope.control.getGPano = function() {\n return pano;\n };\n }\n scope.$watch('options', function(newValue, oldValue) {\n if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) {\n return;\n }\n return create();\n });\n firstTime = true;\n scope.$watch('focalcoord', function(newValue, oldValue) {\n if (newValue === oldValue && !firstTime) {\n return;\n }\n if (newValue == null) {\n return;\n }\n firstTime = false;\n return create();\n });\n return scope.$on('$destroy', function() {\n return clean();\n });\n };\n })(this));\n }\n };\n }\n ]);\n\n}).call(this);\n"]} \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js new file mode 100644 index 0000000..ab9f709 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js @@ -0,0 +1,7 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ + +!function(a,b,c){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h,i;return h=void 0,i=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c,f,g;return b=["transport","isGoogleMapsForWork","china","preventLoad"],a.isGoogleMapsForWork&&b.push("key"),c=_.map(_.omit(a,b),function(a,b){return b+"="+a}),h&&(g=document.getElementById(h),g.parentNode.removeChild(g)),c=c.join("&"),f=document.createElement("script"),f.id=h="ui_gmap_map_load_"+d.generate(),f.type="text/javascript",f.src=e(a)+c,document.body.appendChild(f)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE&&!b.preventLoad?document.addEventListener("online",function(){return g()?void 0:f(b)}):b.preventLoad||f(b),i=b,i.randomizedFunctionName=e,d.promise)},manualLoad:function(){var b;return b=i,g()?a[b.randomizedFunctionName]?a[b.randomizedFunctionName]():void 0:f(b)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(a){return{load:function(){a.manualLoad()}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?a instanceof google.maps.LatLng?a:Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return!(!a||!b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0)))},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;if(void 0!==a)return a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(g,h,i){return a.then(function(a){return function(a){var i,j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){return e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r?(null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0):void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;return null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c?(e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)):void 0})):void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){return a===b||a===o||k?void 0:j()}),l=!0,g.$watch("focalcoord",function(a,b){return a===b&&!l||null==a?void 0:(l=!1,j())}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this)}(window,angular); +//# sourceMappingURL=angular-google-maps-street-view_dev_mapped.min.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js.map b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js.map new file mode 100644 index 0000000..127b57d --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps-street-view_dev_mapped.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["angular-google-maps-street-view_dev_mapped.js"],"names":["window","angular","undefined","module","call","this","service","UUID","generate","a","_gri","b","_ha","NaN","Math","random","c","toString","d","length","e","factory","$q","uuid","getScriptUrl","includeScript","isGoogleMapsLoaded","scriptId","usedConfiguration","options","china","transport","omitOptions","query","script","scriptElem","isGoogleMapsForWork","push","_","map","omit","v","k","document","getElementById","parentNode","removeChild","join","createElement","id","type","src","body","appendChild","isDefined","google","maps","load","deferred","randomizedFunctionName","defer","resolve","promise","callback","round","navigator","connection","Connection","NONE","preventLoad","addEventListener","manualLoad","config","provider","libraries","language","configure","extend","$get","_this","loader","nemSimpleLogger","spawn","Logger","$compile","_isFalse","_isTruthy","getCoords","getLatitude","getLongitude","validateCoords","value","bool","optionsArray","indexOf","Array","isArray","coordinates","latitude","longitude","LatLng","coords","isUndefined","setCoordsFromEvent","prevValue","newLatLon","lat","lng","getLabelPositionPoint","anchor","xPos","yPos","exec","parseFloat","Point","createWindowOptions","gMarker","scope","content","defaults","buildContent","position","isObject","getPosition","pixelOffset","boxClass","height","width","error","parsed","ret","replace","defaultDelay","isTrue","isFalse","isFalsy","equalCoords","coord1","coord2","validatePath","path","array","i","polygon","trackMaxVertices","max","index","forEach","convertPathPoints","latlng","result","MVCArray","getPath","object","key","obj","isString","each","split","validateBoundPoints","bounds","sw","ne","convertBoundPoints","LatLngBounds","fitMapBounds","fitBounds","$log","_getEventsObj","_hasEvents","events","model","setEvents","gObject","ignores","eventObj","compact","eventHandler","eventName","doIgnore","includes","hasOwnProperty","isFunction","event","addListener","$evalAsync","apply","arguments","removeEvents","listeners","l","removeListener","directive","GoogleMapApi","GmapUtil","EventsHelper","name","restrict","template","focalcoord","radius","control","povoptions","imagestatus","link","element","attrs","then","clean","create","didCreateOptionsFromDirective","firstTime","handleSettings","opts","pano","povOpts","sv","unbind","setVisible","perspectivePoint","focalPoint","heading","geometry","spherical","computeHeading","zoom","pitch","navigationControl","addressControl","linksControl","pov","visible","StreetViewService","getPanoramaByLocation","streetViewPanoramaData","status","ele","ref","image_status_changed","location","latLng","StreetViewPanorama","getOptions","getPovOptions","getGObject","getGPano","$watch","newValue","oldValue","$on"],"mappings":";;;;;CAKC,SAAUA,EAAQC,EAASC,GAC1B,cAiCF,WACED,EAAQE,OAAO,+BAAgC,eAE/CF,EAAQE,OAAO,gCAEfF,EAAQE,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WAC3B,MAAOzC,SAGV3M,aAMVD,KAAKC,OACLL,OAAOC","file":"angular-google-maps-street-view_dev_mapped.min.js"} \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps.js b/client/www/lib/angular-google-maps/dist/angular-google-maps.js new file mode 100644 index 0000000..4fa689f --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps.js @@ -0,0 +1,14022 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ +; +(function( window, angular, undefined ){ + 'use strict'; +/* +! +The MIT License + +Copyright (c) 2010-2013 Google, Inc. http://angularjs.org + +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. + +angular-google-maps +https://github.com/angular-ui/angular-google-maps + +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps.providers', ['nemLogging']); + + angular.module('uiGmapgoogle-maps.wrapped', []); + + angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']); + + angular.module('uiGmapgoogle-maps.directives.api.managers', []); + + angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']); + + angular.module('uiGmapgoogle-maps.directives.api.options.builders', []); + + angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']); + + angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']); + + angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [ + '$q', 'uiGmapuuid', function($q, uuid) { + var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration; + scriptId = void 0; + usedConfiguration = void 0; + getScriptUrl = function(options) { + if (options.china) { + return 'http://maps.google.cn/maps/api/js?'; + } else { + if (options.transport === 'auto') { + return '//maps.googleapis.com/maps/api/js?'; + } else { + return options.transport + '://maps.googleapis.com/maps/api/js?'; + } + } + }; + includeScript = function(options) { + var omitOptions, query, script, scriptElem; + omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad']; + if (options.isGoogleMapsForWork) { + omitOptions.push('key'); + } + query = _.map(_.omit(options, omitOptions), function(v, k) { + return k + '=' + v; + }); + if (scriptId) { + scriptElem = document.getElementById(scriptId); + scriptElem.parentNode.removeChild(scriptElem); + } + query = query.join('&'); + script = document.createElement('script'); + script.id = scriptId = "ui_gmap_map_load_" + (uuid.generate()); + script.type = 'text/javascript'; + script.src = getScriptUrl(options) + query; + return document.body.appendChild(script); + }; + isGoogleMapsLoaded = function() { + return angular.isDefined(window.google) && angular.isDefined(window.google.maps); + }; + return { + load: function(options) { + var deferred, randomizedFunctionName; + deferred = $q.defer(); + if (isGoogleMapsLoaded()) { + deferred.resolve(window.google.maps); + return deferred.promise; + } + randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000); + window[randomizedFunctionName] = function() { + window[randomizedFunctionName] = null; + deferred.resolve(window.google.maps); + }; + if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) { + document.addEventListener('online', function() { + if (!isGoogleMapsLoaded()) { + return includeScript(options); + } + }); + } else if (!options.preventLoad) { + includeScript(options); + } + usedConfiguration = options; + usedConfiguration.randomizedFunctionName = randomizedFunctionName; + return deferred.promise; + }, + manualLoad: function() { + var config; + config = usedConfiguration; + if (!isGoogleMapsLoaded()) { + return includeScript(config); + } else { + if (window[config.randomizedFunctionName]) { + return window[config.randomizedFunctionName](); + } + } + } + }; + } + ]).provider('uiGmapGoogleMapApi', function() { + this.options = { + transport: 'https', + isGoogleMapsForWork: false, + china: false, + v: '3', + libraries: '', + language: 'en', + preventLoad: false + }; + this.configure = function(options) { + angular.extend(this.options, options); + }; + this.$get = [ + 'uiGmapMapScriptLoader', (function(_this) { + return function(loader) { + return loader.load(_this.options); + }; + })(this) + ]; + return this; + }).service('uiGmapGoogleMapApiManualLoader', [ + 'uiGmapMapScriptLoader', function(loader) { + return { + load: function() { + loader.manualLoad(); + } + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.extensions').service('uiGmapExtendGWin', function() { + return { + init: _.once(function() { + var uiGmapInfoBox; + if (!(google || (typeof google !== "undefined" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) { + return; + } + google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open; + google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close; + google.maps.InfoWindow.prototype._isOpen = false; + google.maps.InfoWindow.prototype.open = function(map, anchor, recurse) { + if (recurse != null) { + return; + } + this._isOpen = true; + this._open(map, anchor, true); + }; + google.maps.InfoWindow.prototype.close = function(recurse) { + if (recurse != null) { + return; + } + this._isOpen = false; + this._close(true); + }; + google.maps.InfoWindow.prototype.isOpen = function(val) { + if (val == null) { + val = void 0; + } + if (val == null) { + return this._isOpen; + } else { + return this._isOpen = val; + } + }; + + /* + Do the same for InfoBox + TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier + */ + if (window.InfoBox) { + window.InfoBox.prototype._open = window.InfoBox.prototype.open; + window.InfoBox.prototype._close = window.InfoBox.prototype.close; + window.InfoBox.prototype._isOpen = false; + window.InfoBox.prototype.open = function(map, anchor) { + this._isOpen = true; + this._open(map, anchor); + }; + window.InfoBox.prototype.close = function() { + this._isOpen = false; + this._close(); + }; + window.InfoBox.prototype.isOpen = function(val) { + if (val == null) { + val = void 0; + } + if (val == null) { + return this._isOpen; + } else { + return this._isOpen = val; + } + }; + uiGmapInfoBox = (function(superClass) { + extend(uiGmapInfoBox, superClass); + + function uiGmapInfoBox(opts) { + this.getOrigCloseBoxImg_ = bind(this.getOrigCloseBoxImg_, this); + this.getCloseBoxDiv_ = bind(this.getCloseBoxDiv_, this); + var box; + box = new window.InfoBox(opts); + _.extend(this, box); + if (opts.closeBoxDiv != null) { + this.closeBoxDiv_ = opts.closeBoxDiv; + } + } + + uiGmapInfoBox.prototype.getCloseBoxDiv_ = function() { + return this.closeBoxDiv_; + }; + + uiGmapInfoBox.prototype.getCloseBoxImg_ = function() { + var div, img; + div = this.getCloseBoxDiv_(); + img = this.getOrigCloseBoxImg_(); + return div || img; + }; + + uiGmapInfoBox.prototype.getOrigCloseBoxImg_ = function() { + var img; + img = ""; + if (this.closeBoxURL_ !== "") { + img = " 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + get = function(object, path, defaultValue) { + var result; + result = object === null ? void 0 : baseGet(object, toPath(path), path + ''); + if (result === void 0) { + return defaultValue; + } else { + return result; + } + }; + _.get = get; + } + + /* + Author Nick McCready + Intersection of Objects if the arrays have something in common each intersecting object will be returned + in an new array. + */ + this.intersectionObjects = function(array1, array2, comparison) { + var res; + if (comparison == null) { + comparison = void 0; + } + res = _.map(array1, function(obj1) { + return _.find(array2, function(obj2) { + if (comparison != null) { + return comparison(obj1, obj2); + } else { + return _.isEqual(obj1, obj2); + } + }); + }); + return _.filter(res, function(o) { + return o != null; + }); + }; + this.containsObject = _.includeObject = function(obj, target, comparison) { + if (comparison == null) { + comparison = void 0; + } + if (obj === null) { + return false; + } + return _.some(obj, function(value) { + if (comparison != null) { + return comparison(value, target); + } else { + return _.isEqual(value, target); + } + }); + }; + this.differenceObjects = function(array1, array2, comparison) { + if (comparison == null) { + comparison = void 0; + } + return _.filter(array1, (function(_this) { + return function(value) { + return !_this.containsObject(array2, value, comparison); + }; + })(this)); + }; + this.withoutObjects = this.differenceObjects; + this.indexOfObject = function(array, item, comparison, isSorted) { + var i, length; + if (array == null) { + return -1; + } + i = 0; + length = array.length; + if (isSorted) { + if (typeof isSorted === "number") { + i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); + } else { + i = _.sortedIndex(array, item); + return (array[i] === item ? i : -1); + } + } + while (i < length) { + if (comparison != null) { + if (comparison(array[i], item)) { + return i; + } + } else { + if (_.isEqual(array[i], item)) { + return i; + } + } + i++; + } + return -1; + }; + this.isNullOrUndefined = function(thing) { + return _.isNull(thing || _.isUndefined(thing)); + }; + return this; + }); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.extensions').factory('uiGmapString', function() { + return function(str) { + this.contains = function(value, fromIndex) { + return str.indexOf(value, fromIndex) !== -1; + }; + return this; + }; + }); + +}).call(this); +; +/*global _:true,angular:true, */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmap_sync', [ + function() { + return { + fakePromise: function() { + var _cb; + _cb = void 0; + return { + then: function(cb) { + return _cb = cb; + }, + resolve: function() { + return _cb.apply(void 0, arguments); + } + }; + } + }; + } + ]).service('uiGmap_async', [ + '$timeout', 'uiGmapPromise', 'uiGmapLogger', '$q', 'uiGmapDataStructures', 'uiGmapGmapUtil', function($timeout, uiGmapPromise, $log, $q, uiGmapDataStructures, uiGmapGmapUtil) { + var ExposedPromise, PromiseQueueManager, SniffedPromise, _getIterateeValue, _ignoreFields, defaultChunkSize, doChunk, doSkippPromise, each, errorObject, getArrayAndKeys, isInProgress, kickPromise, logTryCatch, managePromiseQueue, map, maybeCancelPromises, promiseStatus, promiseTypes, tryCatch; + promiseTypes = uiGmapPromise.promiseTypes; + isInProgress = uiGmapPromise.isInProgress; + promiseStatus = uiGmapPromise.promiseStatus; + ExposedPromise = uiGmapPromise.ExposedPromise; + SniffedPromise = uiGmapPromise.SniffedPromise; + kickPromise = function(sniffedPromise, cancelCb) { + var promise; + promise = sniffedPromise.promise(); + promise.promiseType = sniffedPromise.promiseType; + if (promise.$$state) { + $log.debug("promiseType: " + promise.promiseType + ", state: " + (promiseStatus(promise.$$state.status))); + } + promise.cancelCb = cancelCb; + return promise; + }; + doSkippPromise = function(sniffedPromise, lastPromise) { + if (sniffedPromise.promiseType === promiseTypes.create && lastPromise.promiseType !== promiseTypes["delete"] && lastPromise.promiseType !== promiseTypes.init) { + $log.debug("lastPromise.promiseType " + lastPromise.promiseType + ", newPromiseType: " + sniffedPromise.promiseType + ", SKIPPED MUST COME AFTER DELETE ONLY"); + return true; + } + return false; + }; + maybeCancelPromises = function(queue, sniffedPromise, lastPromise) { + var first; + if (sniffedPromise.promiseType === promiseTypes["delete"] && lastPromise.promiseType !== promiseTypes["delete"]) { + if ((lastPromise.cancelCb != null) && _.isFunction(lastPromise.cancelCb) && isInProgress(lastPromise)) { + $log.debug("promiseType: " + sniffedPromise.promiseType + ", CANCELING LAST PROMISE type: " + lastPromise.promiseType); + lastPromise.cancelCb('cancel safe'); + first = queue.peek(); + if ((first != null) && isInProgress(first)) { + if (first.hasOwnProperty("cancelCb") && _.isFunction(first.cancelCb)) { + $log.debug("promiseType: " + first.promiseType + ", CANCELING FIRST PROMISE type: " + first.promiseType); + return first.cancelCb('cancel safe'); + } else { + return $log.warn('first promise was not cancelable'); + } + } + } + } + }; + + /* + From a High Level: + This is a SniffedPromiseQueueManager (looking to rename) where the queue is existingPiecesObj.existingPieces. + This is a function and should not be considered a class. + So it is run to manage the state (cancel, skip, link) as needed. + Purpose: + The whole point is to check if there is existing async work going on. If so we wait on it. + + arguments: + - existingPiecesObj = Queue + - sniffedPromise = object wrapper holding a function to a pending (function) promise (promise: fnPromise) + with its intended type. + - cancelCb = callback which accepts a string, this string is intended to be returned at the end of _async.each iterator + + Where the cancelCb passed msg is 'cancel safe' _async.each will drop out and fall through. Thus canceling the promise + gracefully without messing up state. + + Synopsis: + + - Promises have been broken down to 4 states create, update,delete (3 main) and init. (Helps boil down problems in ordering) + where (init) is special to indicate that it is one of the first or to allow a create promise to work beyond being after a delete + + - Every Promise that comes in is enqueued and linked to the last promise in the queue. + + - A promise can be skipped or canceled to save cycles. + + Saved Cycles: + - Skipped - This will only happen if async work comes in out of order. Where a pending create promise (un-executed) comes in + after a delete promise. + - Canceled - Where an incoming promise (un-executed promise) is of type delete and the any lastPromise is not a delete type. + + + NOTE: + - You should not muck with existingPieces as its state is dependent on this functional loop. + - PromiseQueueManager should not be thought of as a class that has a life expectancy (it has none). It's sole + purpose is to link, skip, and kill promises. It also manages the promise queue existingPieces. + */ + PromiseQueueManager = function(existingPiecesObj, sniffedPromise, cancelCb) { + var lastPromise, newPromise; + if (!existingPiecesObj.existingPieces) { + existingPiecesObj.existingPieces = new uiGmapDataStructures.Queue(); + return existingPiecesObj.existingPieces.enqueue(kickPromise(sniffedPromise, cancelCb)); + } else { + lastPromise = _.last(existingPiecesObj.existingPieces._content); + if (doSkippPromise(sniffedPromise, lastPromise)) { + return; + } + maybeCancelPromises(existingPiecesObj.existingPieces, sniffedPromise, lastPromise); + newPromise = ExposedPromise(lastPromise["finally"](function() { + return kickPromise(sniffedPromise, cancelCb); + })); + newPromise.cancelCb = cancelCb; + newPromise.promiseType = sniffedPromise.promiseType; + existingPiecesObj.existingPieces.enqueue(newPromise); + return lastPromise["finally"](function() { + return existingPiecesObj.existingPieces.dequeue(); + }); + } + }; + managePromiseQueue = function(objectToLock, promiseType, msg, cancelCb, fnPromise) { + var cancelLogger; + if (msg == null) { + msg = ''; + } + cancelLogger = function(msg) { + $log.debug(msg + ": " + msg); + if ((cancelCb != null) && _.isFunction(cancelCb)) { + return cancelCb(msg); + } + }; + return PromiseQueueManager(objectToLock, SniffedPromise(fnPromise, promiseType), cancelLogger); + }; + defaultChunkSize = 80; + errorObject = { + value: null + }; + tryCatch = function(fn, ctx, args) { + var e, error1; + try { + return fn.apply(ctx, args); + } catch (error1) { + e = error1; + errorObject.value = e; + return errorObject; + } + }; + logTryCatch = function(fn, ctx, deferred, args) { + var msg, result; + result = tryCatch(fn, ctx, args); + if (result === errorObject) { + msg = "error within chunking iterator: " + errorObject.value; + $log.error(msg); + deferred.reject(msg); + } + if (result === 'cancel safe') { + return false; + } + return true; + }; + _getIterateeValue = function(collection, array, index) { + var _isArray, valOrKey; + _isArray = collection === array; + valOrKey = array[index]; + if (_isArray) { + return valOrKey; + } + return collection[valOrKey]; + }; + _ignoreFields = ['length', 'forEach', 'map']; + getArrayAndKeys = function(collection, keys, bailOutCb, cb) { + var array, propName, val; + if (angular.isArray(collection)) { + array = collection; + } else { + if (keys) { + array = keys; + } else { + array = []; + for (propName in collection) { + val = collection[propName]; + if (collection.hasOwnProperty(propName) && !_.includes(_ignoreFields, propName)) { + array.push(propName); + } + } + } + } + if (cb == null) { + cb = bailOutCb; + } + if (angular.isArray(array) && !(array != null ? array.length : void 0)) { + if (cb !== bailOutCb) { + return bailOutCb(); + } + } + return cb(array, keys); + }; + + /* + Author: Nicholas McCready & jfriend00 + _async handles things asynchronous-like :), to allow the UI to be free'd to do other things + Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui + + The design of any functionality of _async is to be like lodash/underscore and replicate it but call things + asynchronously underneath. Each should be sufficient for most things to be derived from. + + Optional Asynchronous Chunking via promises. + */ + doChunk = function(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, _keys) { + return getArrayAndKeys(collection, _keys, function(array, keys) { + var cnt, i, keepGoing, val; + if (chunkSizeOrDontChunk && chunkSizeOrDontChunk < array.length) { + cnt = chunkSizeOrDontChunk; + } else { + cnt = array.length; + } + i = index; + keepGoing = true; + while (keepGoing && cnt-- && i < (array ? array.length : i + 1)) { + val = _getIterateeValue(collection, array, i); + keepGoing = angular.isFunction(val) ? true : logTryCatch(chunkCb, void 0, overallD, [val, i]); + ++i; + } + if (array) { + if (keepGoing && i < array.length) { + index = i; + if (chunkSizeOrDontChunk) { + if ((pauseCb != null) && _.isFunction(pauseCb)) { + logTryCatch(pauseCb, void 0, overallD, []); + } + return $timeout(function() { + return doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, keys); + }, pauseMilli, false); + } + } else { + return overallD.resolve(); + } + } + }); + }; + each = function(collection, chunk, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) { + var error, overallD, ret; + if (chunkSizeOrDontChunk == null) { + chunkSizeOrDontChunk = defaultChunkSize; + } + if (index == null) { + index = 0; + } + if (pauseMilli == null) { + pauseMilli = 1; + } + ret = void 0; + overallD = uiGmapPromise.defer(); + ret = overallD.promise; + if (!pauseMilli) { + error = 'pause (delay) must be set from _async!'; + $log.error(error); + overallD.reject(error); + return ret; + } + return getArrayAndKeys(collection, _keys, function() { + overallD.resolve(); + return ret; + }, function(array, keys) { + doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunk, pauseCb, overallD, index, keys); + return ret; + }); + }; + map = function(collection, iterator, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) { + var results; + results = []; + return getArrayAndKeys(collection, _keys, function() { + return uiGmapPromise.resolve(results); + }, function(array, keys) { + return each(collection, function(o) { + return results.push(iterator(o)); + }, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, keys).then(function() { + return results; + }); + }); + }; + return { + each: each, + map: map, + managePromiseQueue: managePromiseQueue, + promiseLock: managePromiseQueue, + defaultChunkSize: defaultChunkSize, + getArrayAndKeys: getArrayAndKeys, + chunkSizeFrom: function(fromSize, ret) { + if (ret == null) { + ret = void 0; + } + if (_.isNumber(fromSize)) { + ret = fromSize; + } + if (uiGmapGmapUtil.isFalse(fromSize) || fromSize === false) { + ret = false; + } + return ret; + } + }; + } + ]); + +}).call(this); +;(function() { + var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapBaseObject', function() { + var BaseObject, baseObjectKeywords; + baseObjectKeywords = ['extended', 'included']; + BaseObject = (function() { + function BaseObject() {} + + BaseObject.extend = function(obj) { + var key, ref, value; + for (key in obj) { + value = obj[key]; + if (indexOf.call(baseObjectKeywords, key) < 0) { + this[key] = value; + } + } + if ((ref = obj.extended) != null) { + ref.apply(this); + } + return this; + }; + + BaseObject.include = function(obj) { + var key, ref, value; + for (key in obj) { + value = obj[key]; + if (indexOf.call(baseObjectKeywords, key) < 0) { + this.prototype[key] = value; + } + } + if ((ref = obj.included) != null) { + ref.apply(this); + } + return this; + }; + + return BaseObject; + + })(); + return BaseObject; + }); + +}).call(this); +; +/* + Useful function callbacks that should be defined at later time. + Mainly to be used for specs to verify creation / linking. + + This is to lead a common design in notifying child stuff. + */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapChildEvents', function() { + return { + onChildCreation: function(child) {} + }; + }); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapCtrlHandle', [ + '$q', function($q) { + var CtrlHandle; + return CtrlHandle = { + handle: function($scope, $element) { + $scope.$on('$destroy', function() { + return CtrlHandle.handle($scope); + }); + $scope.deferred = $q.defer(); + return { + getScope: function() { + return $scope; + } + }; + }, + mapPromise: function(scope, ctrl) { + var mapScope; + mapScope = ctrl.getScope(); + mapScope.deferred.promise.then(function(map) { + return scope.map = map; + }); + return mapScope.deferred.promise; + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper", [ + "uiGmapLogger", function($log) { + var _getEventsObj, _hasEvents; + _hasEvents = function(obj) { + return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events); + }; + _getEventsObj = function(scope, model) { + if (_hasEvents(scope)) { + return scope; + } + if (_hasEvents(model)) { + return model; + } + }; + return { + setEvents: function(gObject, scope, model, ignores) { + var eventObj; + eventObj = _getEventsObj(scope, model); + if (eventObj != null) { + return _.compact(_.map(eventObj.events, function(eventHandler, eventName) { + var doIgnore; + if (ignores) { + doIgnore = _(ignores).includes(eventName); + } + if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) { + return google.maps.event.addListener(gObject, eventName, function() { + if (!scope.$evalAsync) { + scope.$evalAsync = function() {}; + } + return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments])); + }); + } + })); + } + }, + removeEvents: function(listeners) { + var key, l; + if (!listeners) { + return; + } + for (key in listeners) { + l = listeners[key]; + if (l && listeners.hasOwnProperty(key)) { + google.maps.event.removeListener(l); + } + } + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapFitHelper', [ + 'uiGmapLogger', '$timeout', function($log, $timeout) { + return { + fit: function(markersOrPoints, gMap) { + var bounds, everSet, key, markerOrPoint, point; + if (gMap && (markersOrPoints != null ? markersOrPoints.length : void 0)) { + bounds = new google.maps.LatLngBounds(); + everSet = false; + for (key in markersOrPoints) { + markerOrPoint = markersOrPoints[key]; + if (markerOrPoint) { + if (!everSet) { + everSet = true; + } + point = _.isFunction(markerOrPoint.getPosition) ? markerOrPoint.getPosition() : markerOrPoint; + } + bounds.extend(point); + } + if (everSet) { + return $timeout(function() { + return gMap.fitBounds(bounds); + }); + } + } + } + }; + } + ]); + +}).call(this); +; +/*global _:true, angular:true, google:true */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [ + 'uiGmapLogger', '$compile', function(Logger, $compile) { + var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords; + _isTruthy = function(value, bool, optionsArray) { + return value === bool || optionsArray.indexOf(value) !== -1; + }; + _isFalse = function(value) { + return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']); + }; + getLatitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[1]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[1]; + } else { + return value.latitude; + } + }; + getLongitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[0]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[0]; + } else { + return value.longitude; + } + }; + getCoords = function(value) { + if (!value) { + return; + } + if (value instanceof google.maps.LatLng) { + return value; + } else if (Array.isArray(value) && value.length === 2) { + return new google.maps.LatLng(value[1], value[0]); + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); + } else { + return new google.maps.LatLng(value.latitude, value.longitude); + } + }; + validateCoords = function(coords) { + if (angular.isUndefined(coords)) { + return false; + } + if (_.isArray(coords)) { + if (coords.length === 2) { + return true; + } + } else if ((coords != null) && (coords != null ? coords.type : void 0)) { + if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { + return true; + } + } + if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { + return true; + } + return false; + }; + return { + setCoordsFromEvent: function(prevValue, newLatLon) { + if (!prevValue) { + return; + } + if (Array.isArray(prevValue) && prevValue.length === 2) { + prevValue[1] = newLatLon.lat(); + prevValue[0] = newLatLon.lng(); + } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') { + prevValue.coordinates[1] = newLatLon.lat(); + prevValue.coordinates[0] = newLatLon.lng(); + } else { + prevValue.latitude = newLatLon.lat(); + prevValue.longitude = newLatLon.lng(); + } + return prevValue; + }, + getLabelPositionPoint: function(anchor) { + var xPos, yPos; + if (anchor === void 0) { + return void 0; + } + anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); + xPos = parseFloat(anchor[1]); + yPos = parseFloat(anchor[2]); + if ((xPos != null) && (yPos != null)) { + return new google.maps.Point(xPos, yPos); + } + }, + createWindowOptions: function(gMarker, scope, content, defaults) { + var options; + if ((content != null) && (defaults != null) && ($compile != null)) { + options = angular.extend({}, defaults, { + content: this.buildContent(scope, defaults, content), + position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) + }); + if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) { + if (options.boxClass == null) { + + } else { + options.pixelOffset = { + height: 0, + width: -2 + }; + } + } + return options; + } else { + if (!defaults) { + Logger.error('infoWindow defaults not defined'); + if (!content) { + return Logger.error('infoWindow content not defined'); + } + } else { + return defaults; + } + } + }, + buildContent: function(scope, defaults, content) { + var parsed, ret; + if (defaults.content != null) { + ret = defaults.content; + } else { + if ($compile != null) { + content = content.replace(/^\s+|\s+$/g, ''); + parsed = content === '' ? '' : $compile(content)(scope); + if (parsed.length > 0) { + ret = parsed[0]; + } + } else { + ret = content; + } + } + return ret; + }, + defaultDelay: 50, + isTrue: function(value) { + return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']); + }, + isFalse: _isFalse, + isFalsy: function(value) { + return _isTruthy(value, false, [void 0, null]) || _isFalse(value); + }, + getCoords: getCoords, + validateCoords: validateCoords, + equalCoords: function(coord1, coord2) { + return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); + }, + validatePath: function(path) { + var array, i, polygon, trackMaxVertices; + i = 0; + if (angular.isUndefined(path.type)) { + if (!Array.isArray(path) || path.length < 2) { + return false; + } + while (i < path.length) { + if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) { + return false; + } + i++; + } + return true; + } else { + if (angular.isUndefined(path.coordinates)) { + return false; + } + if (path.type === 'Polygon') { + if (path.coordinates[0].length < 4) { + return false; + } + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + polygon = path.coordinates[trackMaxVertices.index]; + array = polygon[0]; + if (array.length < 4) { + return false; + } + } else if (path.type === 'LineString') { + if (path.coordinates.length < 2) { + return false; + } + array = path.coordinates; + } else { + return false; + } + while (i < array.length) { + if (array[i].length !== 2) { + return false; + } + i++; + } + return true; + } + }, + convertPathPoints: function(path) { + var array, i, latlng, result, trackMaxVertices; + i = 0; + result = new google.maps.MVCArray(); + if (angular.isUndefined(path.type)) { + while (i < path.length) { + latlng; + if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { + latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); + } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') { + latlng = path[i]; + } + result.push(latlng); + i++; + } + } else { + array; + if (path.type === 'Polygon') { + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + array = path.coordinates[trackMaxVertices.index][0]; + } else if (path.type === 'LineString') { + array = path.coordinates; + } + while (i < array.length) { + result.push(new google.maps.LatLng(array[i][1], array[i][0])); + i++; + } + } + return result; + }, + getPath: function(object, key) { + var obj; + if ((key == null) || !_.isString(key)) { + return key; + } + obj = object; + _.each(key.split('.'), function(value) { + if (obj) { + return obj = obj[value]; + } + }); + return obj; + }, + validateBoundPoints: function(bounds) { + if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { + return false; + } + return true; + }, + convertBoundPoints: function(bounds) { + var result; + result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); + return result; + }, + fitMapBounds: function(map, bounds) { + return map.fitBounds(bounds); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapIsReady', [ + '$q', '$timeout', function($q, $timeout) { + var _checkIfReady, _ctr, _promises, _proms; + _ctr = 0; + _proms = []; + _promises = function() { + return $q.all(_proms); + }; + _checkIfReady = function(deferred, expectedInstances, retriesLeft) { + return $timeout(function() { + if (retriesLeft <= 0) { + deferred.reject('Your maps are not found we have checked the maximum amount of times. :)'); + return; + } + if (_ctr !== expectedInstances) { + _checkIfReady(deferred, expectedInstances, retriesLeft - 1); + } else { + deferred.resolve(_promises()); + } + }, 100); + }; + return { + spawn: function() { + var d; + d = $q.defer(); + _proms.push(d.promise); + _ctr += 1; + return { + instance: _ctr, + deferred: d + }; + }, + promises: _promises, + instances: function() { + return _ctr; + }, + promise: function(expectedInstances, numRetries) { + var d; + if (expectedInstances == null) { + expectedInstances = 1; + } + if (numRetries == null) { + numRetries = 50; + } + d = $q.defer(); + _checkIfReady(d, expectedInstances, numRetries); + return d.promise; + }, + reset: function() { + _ctr = 0; + _proms.length = 0; + }, + decrement: function() { + if (_ctr > 0) { + _ctr -= 1; + } + if (_proms.length) { + _proms.length -= 1; + } + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked", [ + "uiGmapBaseObject", function(BaseObject) { + var Linked; + Linked = (function(superClass) { + extend(Linked, superClass); + + function Linked(scope, element, attrs, ctrls) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.ctrls = ctrls; + } + + return Linked; + + })(BaseObject); + return Linked; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [ + 'nemSimpleLogger', function(nemSimpleLogger) { + return nemSimpleLogger.spawn(); + } + ]); + +}).call(this); +; +/*global _:true, angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelKey', [ + 'uiGmapBaseObject', 'uiGmapGmapUtil', function(BaseObject, GmapUtil) { + return (function(superClass) { + extend(_Class, superClass); + + function _Class(scope1, _interface) { + this.scope = scope1; + this["interface"] = _interface != null ? _interface : { + scopeKeys: [] + }; + this.modelsLength = bind(this.modelsLength, this); + this.updateChild = bind(this.updateChild, this); + this.destroy = bind(this.destroy, this); + this.setChildScope = bind(this.setChildScope, this); + this.getChanges = bind(this.getChanges, this); + this.getProp = bind(this.getProp, this); + this.setIdKey = bind(this.setIdKey, this); + this.modelKeyComparison = bind(this.modelKeyComparison, this); + _Class.__super__.constructor.call(this); + this.defaultIdKey = 'id'; + this.idKey = void 0; + } + + _Class.prototype.evalModelHandle = function(model, modelKey) { + if ((model == null) || (modelKey == null)) { + return; + } + if (modelKey === 'self') { + return model; + } else { + if (_.isFunction(modelKey)) { + modelKey = modelKey(); + } + return GmapUtil.getPath(model, modelKey); + } + }; + + _Class.prototype.modelKeyComparison = function(model1, model2) { + var coord1, coord2, hasCoords, isEqual, scope, without; + hasCoords = this["interface"].scopeKeys.indexOf('coords') >= 0; + if (hasCoords && (this.scope.coords != null) || !hasCoords) { + scope = this.scope; + } + if (scope == null) { + throw 'No scope set!'; + } + if (hasCoords) { + coord1 = this.scopeOrModelVal('coords', scope, model1); + coord2 = this.scopeOrModelVal('coords', scope, model2); + isEqual = GmapUtil.equalCoords(coord1, coord2); + if (!isEqual) { + return isEqual; + } + } + without = _.without(this["interface"].scopeKeys, 'coords'); + isEqual = _.every(without, (function(_this) { + return function(k) { + return _this.scopeOrModelVal(scope[k], scope, model1) === _this.scopeOrModelVal(scope[k], scope, model2); + }; + })(this)); + return isEqual; + }; + + _Class.prototype.setIdKey = function(scope) { + return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey; + }; + + _Class.prototype.setVal = function(model, key, newValue) { + this.modelOrKey(model, key = newValue); + return model; + }; + + _Class.prototype.modelOrKey = function(model, key) { + if (key == null) { + return; + } + if (key !== 'self') { + return GmapUtil.getPath(model, key); + } + return model; + }; + + _Class.prototype.getProp = function(propName, scope, model) { + return this.scopeOrModelVal(propName, scope, model); + }; + + + /* + For the cases were watching a large object we only want to know the list of props + that actually changed. + Also we want to limit the amount of props we analyze to whitelisted props that are + actually tracked by scope. (should make things faster with whitelisted) + */ + + _Class.prototype.getChanges = function(now, prev, whitelistedProps) { + var c, changes, prop; + if (whitelistedProps) { + prev = _.pick(prev, whitelistedProps); + now = _.pick(now, whitelistedProps); + } + changes = {}; + prop = {}; + c = {}; + for (prop in now) { + if (!prev || prev[prop] !== now[prop]) { + if (_.isArray(now[prop])) { + changes[prop] = now[prop]; + } else if (_.isObject(now[prop])) { + c = this.getChanges(now[prop], (prev ? prev[prop] : null)); + if (!_.isEmpty(c)) { + changes[prop] = c; + } + } else { + changes[prop] = now[prop]; + } + } + } + return changes; + }; + + _Class.prototype.scopeOrModelVal = function(key, scope, model, doWrap) { + var maybeWrap, modelKey, modelProp, scopeProp; + if (doWrap == null) { + doWrap = false; + } + maybeWrap = function(isScope, ret, doWrap) { + if (doWrap == null) { + doWrap = false; + } + if (doWrap) { + return { + isScope: isScope, + value: ret + }; + } + return ret; + }; + scopeProp = _.get(scope, key); + if (_.isFunction(scopeProp)) { + return maybeWrap(true, scopeProp(model), doWrap); + } + if (_.isObject(scopeProp)) { + return maybeWrap(true, scopeProp, doWrap); + } + if (!_.isString(scopeProp)) { + return maybeWrap(true, scopeProp, doWrap); + } + modelKey = scopeProp; + if (!modelKey) { + modelProp = _.get(model, key); + } else { + modelProp = modelKey === 'self' ? model : _.get(model, modelKey); + } + if (_.isFunction(modelProp)) { + return maybeWrap(false, modelProp(), doWrap); + } + return maybeWrap(false, modelProp, doWrap); + }; + + _Class.prototype.setChildScope = function(keys, childScope, model) { + var isScopeObj, key, name, newValue; + for (key in keys) { + name = keys[key]; + isScopeObj = this.scopeOrModelVal(name, childScope, model, true); + if ((isScopeObj != null ? isScopeObj.value : void 0) != null) { + newValue = isScopeObj.value; + if (newValue !== childScope[name]) { + childScope[name] = newValue; + } + } + } + return childScope.model = model; + }; + + _Class.prototype.onDestroy = function(scope) {}; + + _Class.prototype.destroy = function(manualOverride) { + var ref; + if (manualOverride == null) { + manualOverride = false; + } + if ((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0) && (this.needToManualDestroy || manualOverride)) { + return this.scope.$destroy(); + } else { + return this.clean(); + } + }; + + _Class.prototype.updateChild = function(child, model) { + if (model[this.idKey] == null) { + this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); + return; + } + return child.updateModel(model); + }; + + _Class.prototype.modelsLength = function(arrayOrObjModels) { + var len, toCheck; + if (arrayOrObjModels == null) { + arrayOrObjModels = void 0; + } + len = 0; + toCheck = arrayOrObjModels ? arrayOrObjModels : this.scope.models; + if (toCheck == null) { + return len; + } + if (angular.isArray(toCheck) || (toCheck.length != null)) { + len = toCheck.length; + } else { + len = Object.keys(toCheck).length; + } + return len; + }; + + return _Class; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelsWatcher', [ + 'uiGmapLogger', 'uiGmap_async', '$q', 'uiGmapPromise', function(Logger, _async, $q, uiGmapPromise) { + return { + didQueueInitPromise: function(existingPiecesObj, scope) { + if (scope.models.length === 0) { + _async.promiseLock(existingPiecesObj, uiGmapPromise.promiseTypes.init, null, null, (function() { + return uiGmapPromise.resolve(); + })); + return true; + } + return false; + }, + figureOutState: function(idKey, scope, childObjects, comparison, callBack) { + var adds, children, mappedScopeModelIds, removals, updates; + adds = []; + mappedScopeModelIds = {}; + removals = []; + updates = []; + scope.models.forEach(function(m) { + var child; + if (m[idKey] != null) { + mappedScopeModelIds[m[idKey]] = {}; + if (childObjects.get(m[idKey]) == null) { + return adds.push(m); + } else { + child = childObjects.get(m[idKey]); + if (!comparison(m, child.clonedModel, scope)) { + return updates.push({ + model: m, + child: child + }); + } + } + } else { + return Logger.error(' id missing for model #{m.toString()},\ncan not use do comparison/insertion'); + } + }); + children = childObjects.values(); + children.forEach(function(c) { + var id; + if (c == null) { + Logger.error('child undefined in ModelsWatcher.'); + return; + } + if (c.model == null) { + Logger.error('child.model undefined in ModelsWatcher.'); + return; + } + id = c.model[idKey]; + if (mappedScopeModelIds[id] == null) { + return removals.push(c); + } + }); + return { + adds: adds, + removals: removals, + updates: updates + }; + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapPromise', [ + '$q', '$timeout', 'uiGmapLogger', function($q, $timeout, $log) { + var ExposedPromise, SniffedPromise, defer, isInProgress, isResolved, promise, promiseStatus, promiseStatuses, promiseTypes, resolve, strPromiseStatuses; + promiseTypes = { + create: 'create', + update: 'update', + "delete": 'delete', + init: 'init' + }; + promiseStatuses = { + IN_PROGRESS: 0, + RESOLVED: 1, + REJECTED: 2 + }; + strPromiseStatuses = (function() { + var obj; + obj = {}; + obj["" + promiseStatuses.IN_PROGRESS] = 'in-progress'; + obj["" + promiseStatuses.RESOLVED] = 'resolved'; + obj["" + promiseStatuses.REJECTED] = 'rejected'; + return obj; + })(); + isInProgress = function(promise) { + if (promise.$$state) { + return promise.$$state.status === promiseStatuses.IN_PROGRESS; + } + if (!promise.hasOwnProperty("$$v")) { + return true; + } + }; + isResolved = function(promise) { + if (promise.$$state) { + return promise.$$state.status === promiseStatuses.RESOLVED; + } + if (promise.hasOwnProperty("$$v")) { + return true; + } + }; + promiseStatus = function(status) { + return strPromiseStatuses[status] || 'done w error'; + }; + ExposedPromise = function(promise) { + var cancelDeferred, combined, wrapped; + cancelDeferred = $q.defer(); + combined = $q.all([promise, cancelDeferred.promise]); + wrapped = $q.defer(); + promise.then(cancelDeferred.resolve, (function() {}), function(notify) { + cancelDeferred.notify(notify); + return wrapped.notify(notify); + }); + combined.then(function(successes) { + return wrapped.resolve(successes[0] || successes[1]); + }, function(error) { + return wrapped.reject(error); + }); + wrapped.promise.cancel = function(reason) { + if (reason == null) { + reason = 'canceled'; + } + return cancelDeferred.reject(reason); + }; + wrapped.promise.notify = function(msg) { + if (msg == null) { + msg = 'cancel safe'; + } + wrapped.notify(msg); + if (promise.hasOwnProperty('notify')) { + return promise.notify(msg); + } + }; + if (promise.promiseType != null) { + wrapped.promise.promiseType = promise.promiseType; + } + return wrapped.promise; + }; + SniffedPromise = function(fnPromise, promiseType) { + return { + promise: fnPromise, + promiseType: promiseType + }; + }; + defer = function() { + return $q.defer(); + }; + resolve = function() { + var d; + d = $q.defer(); + d.resolve.apply(void 0, arguments); + return d.promise; + }; + promise = function(fnToWrap) { + var d; + if (!_.isFunction(fnToWrap)) { + $log.error("uiGmapPromise.promise() only accepts functions"); + return; + } + d = $q.defer(); + $timeout(function() { + var result; + result = fnToWrap(); + return d.resolve(result); + }); + return d.promise; + }; + return { + defer: defer, + promise: promise, + resolve: resolve, + promiseTypes: promiseTypes, + isInProgress: isInProgress, + isResolved: isResolved, + promiseStatus: promiseStatus, + ExposedPromise: ExposedPromise, + SniffedPromise: SniffedPromise + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap", function() { + + /* + Simple Object Map with a length property to make it easy to track length/size + */ + var PropMap; + return PropMap = (function() { + function PropMap() { + this.removeAll = bind(this.removeAll, this); + this.slice = bind(this.slice, this); + this.push = bind(this.push, this); + this.keys = bind(this.keys, this); + this.values = bind(this.values, this); + this.remove = bind(this.remove, this); + this.put = bind(this.put, this); + this.stateChanged = bind(this.stateChanged, this); + this.get = bind(this.get, this); + this.length = 0; + this.dict = {}; + this.didValsStateChange = false; + this.didKeysStateChange = false; + this.allVals = []; + this.allKeys = []; + } + + PropMap.prototype.get = function(key) { + return this.dict[key]; + }; + + PropMap.prototype.stateChanged = function() { + this.didValsStateChange = true; + return this.didKeysStateChange = true; + }; + + PropMap.prototype.put = function(key, value) { + if (this.get(key) == null) { + this.length++; + } + this.stateChanged(); + return this.dict[key] = value; + }; + + PropMap.prototype.remove = function(key, isSafe) { + var value; + if (isSafe == null) { + isSafe = false; + } + if (isSafe && !this.get(key)) { + return void 0; + } + value = this.dict[key]; + delete this.dict[key]; + this.length--; + this.stateChanged(); + return value; + }; + + PropMap.prototype.valuesOrKeys = function(str) { + var keys, vals; + if (str == null) { + str = 'Keys'; + } + if (!this["did" + str + "StateChange"]) { + return this['all' + str]; + } + vals = []; + keys = []; + _.each(this.dict, function(v, k) { + vals.push(v); + return keys.push(k); + }); + this.didKeysStateChange = false; + this.didValsStateChange = false; + this.allVals = vals; + this.allKeys = keys; + return this['all' + str]; + }; + + PropMap.prototype.values = function() { + return this.valuesOrKeys('Vals'); + }; + + PropMap.prototype.keys = function() { + return this.valuesOrKeys(); + }; + + PropMap.prototype.push = function(obj, key) { + if (key == null) { + key = "key"; + } + return this.put(obj[key], obj); + }; + + PropMap.prototype.slice = function() { + return this.keys().map((function(_this) { + return function(k) { + return _this.remove(k); + }; + })(this)); + }; + + PropMap.prototype.removeAll = function() { + return this.slice(); + }; + + PropMap.prototype.each = function(cb) { + return _.each(this.dict, function(v, k) { + return cb(v); + }); + }; + + PropMap.prototype.map = function(cb) { + return _.map(this.dict, function(v, k) { + return cb(v); + }); + }; + + return PropMap; + + })(); + }); + +}).call(this); +; +/*globals angular,_ */ + +(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction", [ + "uiGmapLogger", function(Logger) { + var PropertyAction; + PropertyAction = function(setterFn) { + this.setIfChange = function(callingKey) { + return function(newVal, oldVal) { + if (!_.isEqual(oldVal, newVal)) { + return setterFn(callingKey, newVal); + } + }; + }; + this.sic = this.setIfChange; + return this; + }; + return PropertyAction; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapClustererMarkerManager', [ + 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapEventsHelper', function($log, FitHelper, PropMap, EventsHelper) { + var ClustererMarkerManager; + ClustererMarkerManager = (function() { + ClustererMarkerManager.type = 'ClustererMarkerManager'; + + function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) { + if (opt_markers == null) { + opt_markers = {}; + } + this.opt_options = opt_options != null ? opt_options : {}; + this.opt_events = opt_events; + this.checkSync = bind(this.checkSync, this); + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.destroy = bind(this.destroy, this); + this.attachEvents = bind(this.attachEvents, this); + this.clear = bind(this.clear, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = ClustererMarkerManager.type; + this.clusterer = new NgMapMarkerClusterer(gMap, opt_markers, this.opt_options); + this.propMapGMarkers = new PropMap(); + this.attachEvents(this.opt_events, 'opt_events'); + this.clusterer.setIgnoreHidden(true); + this.noDrawOnSingleAddRemoves = true; + $log.info(this); + } + + ClustererMarkerManager.prototype.checkKey = function(gMarker) { + var msg; + if (gMarker.key == null) { + msg = 'gMarker.key undefined and it is REQUIRED!!'; + return $log.error(msg); + } + }; + + ClustererMarkerManager.prototype.add = function(gMarker) { + this.checkKey(gMarker); + this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.put(gMarker.key, gMarker); + return this.checkSync(); + }; + + ClustererMarkerManager.prototype.update = function(gMarker) { + this.remove(gMarker); + return this.add(gMarker); + }; + + ClustererMarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + ClustererMarkerManager.prototype.remove = function(gMarker) { + var exists; + this.checkKey(gMarker); + exists = this.propMapGMarkers.get(gMarker.key); + if (exists) { + this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.remove(gMarker.key); + } + return this.checkSync(); + }; + + ClustererMarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.remove(gMarker); + }; + })(this)); + }; + + ClustererMarkerManager.prototype.draw = function() { + return this.clusterer.repaint(); + }; + + ClustererMarkerManager.prototype.clear = function() { + this.removeMany(this.getGMarkers()); + return this.clusterer.repaint(); + }; + + ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) { + var eventHandler, eventName, results; + this.listeners = []; + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + results = []; + for (eventName in options) { + eventHandler = options[eventName]; + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Attaching event: " + eventName + " to clusterer"); + results.push(this.listeners.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName]))); + } else { + results.push(void 0); + } + } + return results; + } + }; + + ClustererMarkerManager.prototype.clearEvents = function() { + EventsHelper.removeEvents(this.listeners); + return this.listeners = []; + }; + + ClustererMarkerManager.prototype.destroy = function() { + this.clearEvents(); + return this.clear(); + }; + + ClustererMarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.clusterer.getMap()); + }; + + ClustererMarkerManager.prototype.getGMarkers = function() { + return this.clusterer.getMarkers().values(); + }; + + ClustererMarkerManager.prototype.checkSync = function() {}; + + return ClustererMarkerManager; + + })(); + return ClustererMarkerManager; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.managers').service('uiGmapGoogleMapObjectManager', [ + function() { + var _availableInstances, _usedInstances; + _availableInstances = []; + _usedInstances = []; + return { + createMapInstance: function(parentElement, options) { + var instance; + instance = null; + if (_availableInstances.length === 0) { + instance = new google.maps.Map(parentElement, options); + _usedInstances.push(instance); + } else { + instance = _availableInstances.pop(); + angular.element(parentElement).append(instance.getDiv()); + instance.setOptions(options); + _usedInstances.push(instance); + } + return instance; + }, + recycleMapInstance: function(instance) { + var index; + index = _usedInstances.indexOf(instance); + if (index < 0) { + throw new Error('Expected map instance to be a previously used instance'); + } + _usedInstances.splice(index, 1); + return _availableInstances.push(instance); + } + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager", [ + "uiGmapLogger", "uiGmapFitHelper", "uiGmapPropMap", function(Logger, FitHelper, PropMap) { + var MarkerManager; + MarkerManager = (function() { + MarkerManager.type = 'MarkerManager'; + + function MarkerManager(gMap, opt_markers, opt_options) { + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.handleOptDraw = bind(this.handleOptDraw, this); + this.clear = bind(this.clear, this); + this.destroy = bind(this.destroy, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = MarkerManager.type; + this.gMap = gMap; + this.gMarkers = new PropMap(); + this.$log = Logger; + this.$log.info(this); + } + + MarkerManager.prototype.add = function(gMarker, optDraw) { + var exists, msg; + if (optDraw == null) { + optDraw = true; + } + if (gMarker.key == null) { + msg = "gMarker.key undefined and it is REQUIRED!!"; + Logger.error(msg); + throw msg; + } + exists = this.gMarkers.get(gMarker.key); + if (!exists) { + this.handleOptDraw(gMarker, optDraw, true); + return this.gMarkers.put(gMarker.key, gMarker); + } + }; + + MarkerManager.prototype.update = function(gMarker, optDraw) { + if (optDraw == null) { + optDraw = true; + } + this.remove(gMarker, optDraw); + return this.add(gMarker, optDraw); + }; + + MarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + MarkerManager.prototype.remove = function(gMarker, optDraw) { + if (optDraw == null) { + optDraw = true; + } + this.handleOptDraw(gMarker, optDraw, false); + if (this.gMarkers.get(gMarker.key)) { + return this.gMarkers.remove(gMarker.key); + } + }; + + MarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(marker) { + return _this.remove(marker); + }; + })(this)); + }; + + MarkerManager.prototype.draw = function() { + var deletes; + deletes = []; + this.gMarkers.each((function(_this) { + return function(gMarker) { + if (!gMarker.isDrawn) { + if (gMarker.doAdd) { + gMarker.setMap(_this.gMap); + return gMarker.isDrawn = true; + } else { + return deletes.push(gMarker); + } + } + }; + })(this)); + return deletes.forEach((function(_this) { + return function(gMarker) { + gMarker.isDrawn = false; + return _this.remove(gMarker, true); + }; + })(this)); + }; + + MarkerManager.prototype.destroy = function() { + return this.clear(); + }; + + MarkerManager.prototype.clear = function() { + this.gMarkers.each(function(gMarker) { + return gMarker.setMap(null); + }); + delete this.gMarkers; + return this.gMarkers = new PropMap(); + }; + + MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) { + if (optDraw === true) { + if (doAdd) { + gMarker.setMap(this.gMap); + } else { + gMarker.setMap(null); + } + return gMarker.isDrawn = true; + } else { + gMarker.isDrawn = false; + return gMarker.doAdd = doAdd; + } + }; + + MarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.gMap); + }; + + MarkerManager.prototype.getGMarkers = function() { + return this.gMarkers.values(); + }; + + return MarkerManager; + + })(); + return MarkerManager; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapSpiderfierMarkerManager', [ + 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapMarkerSpiderfier', function($log, FitHelper, PropMap, MarkerSpiderfier) { + var SpiderfierMarkerManager; + return SpiderfierMarkerManager = (function() { + SpiderfierMarkerManager.type = 'SpiderfierMarkerManager'; + + function SpiderfierMarkerManager(gMap, opt_markers, opt_options, opt_events, scope) { + if (opt_markers == null) { + opt_markers = {}; + } + this.opt_options = opt_options != null ? opt_options : {}; + this.opt_events = opt_events; + this.scope = scope; + this.checkSync = bind(this.checkSync, this); + this.isSpiderfied = bind(this.isSpiderfied, this); + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.destroy = bind(this.destroy, this); + this.attachEvents = bind(this.attachEvents, this); + this.clear = bind(this.clear, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = SpiderfierMarkerManager.type; + this.markerSpiderfier = new MarkerSpiderfier(gMap, this.opt_options); + this.propMapGMarkers = new PropMap(); + this.attachEvents(this.opt_events, 'opt_events'); + this.noDrawOnSingleAddRemoves = true; + $log.info(this); + } + + SpiderfierMarkerManager.prototype.checkKey = function(gMarker) { + var msg; + if (gMarker.key == null) { + msg = 'gMarker.key undefined and it is REQUIRED!!'; + return $log.error(msg); + } + }; + + SpiderfierMarkerManager.prototype.add = function(gMarker) { + gMarker.setMap(this.markerSpiderfier.map); + this.checkKey(gMarker); + this.markerSpiderfier.addMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.put(gMarker.key, gMarker); + return this.checkSync(); + }; + + SpiderfierMarkerManager.prototype.update = function(gMarker) { + this.remove(gMarker); + return this.add(gMarker); + }; + + SpiderfierMarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + SpiderfierMarkerManager.prototype.remove = function(gMarker) { + var exists; + this.checkKey(gMarker); + exists = this.propMapGMarkers.get(gMarker.key); + if (exists) { + gMarker.setMap(null); + this.markerSpiderfier.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.remove(gMarker.key); + } + return this.checkSync(); + }; + + SpiderfierMarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.remove(gMarker); + }; + })(this)); + }; + + SpiderfierMarkerManager.prototype.draw = function() {}; + + SpiderfierMarkerManager.prototype.clear = function() { + return this.removeMany(this.getGMarkers()); + }; + + SpiderfierMarkerManager.prototype.attachEvents = function(options, optionsName) { + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + return _.each(options, (function(_this) { + return function(eventHandler, eventName) { + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Attaching event: " + eventName + " to markerSpiderfier"); + return _this.markerSpiderfier.addListener(eventName, function() { + if (eventName === 'spiderfy' || eventName === 'unspiderfy') { + return _this.scope.$evalAsync(options[eventName].apply(options, arguments)); + } else { + return _this.scope.$evalAsync(options[eventName].apply(options, [arguments[0], eventName, arguments[0].model, arguments])); + } + }); + } + }; + })(this)); + } + }; + + SpiderfierMarkerManager.prototype.clearEvents = function(options, optionsName) { + var eventHandler, eventName; + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + for (eventName in options) { + eventHandler = options[eventName]; + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Clearing event: " + eventName + " to markerSpiderfier"); + this.markerSpiderfier.clearListeners(eventName); + } + } + } + }; + + SpiderfierMarkerManager.prototype.destroy = function() { + this.clearEvents(this.opt_events, 'opt_events'); + return this.clear(); + }; + + SpiderfierMarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.markerSpiderfier.map); + }; + + SpiderfierMarkerManager.prototype.getGMarkers = function() { + return this.markerSpiderfier.getMarkers(); + }; + + SpiderfierMarkerManager.prototype.isSpiderfied = function() { + return _.find(this.getGMarkers(), function(gMarker) { + return (gMarker != null ? gMarker._omsData : void 0) != null; + }); + }; + + SpiderfierMarkerManager.prototype.checkSync = function() {}; + + return SpiderfierMarkerManager; + + })(); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').factory('uiGmapadd-events', [ + '$timeout', function($timeout) { + var addEvent, addEvents; + addEvent = function(target, eventName, handler) { + return google.maps.event.addListener(target, eventName, function() { + handler.apply(this, arguments); + return $timeout((function() {}), true); + }); + }; + addEvents = function(target, eventName, handler) { + var remove; + if (handler) { + return addEvent(target, eventName, handler); + } + remove = []; + angular.forEach(eventName, function(_handler, key) { + return remove.push(addEvent(target, key, _handler)); + }); + return function() { + angular.forEach(remove, function(listener) { + return google.maps.event.removeListener(listener); + }); + return remove = null; + }; + }; + return addEvents; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').factory('uiGmaparray-sync', [ + 'uiGmapadd-events', function(mapEvents) { + return function(mapArray, scope, pathEval, pathChangedFn) { + var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener; + isSetFromScope = false; + scopePath = scope.$eval(pathEval); + if (!scope["static"]) { + legacyHandlers = { + set_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return scopePath[index] = value; + } else { + scopePath[index].latitude = value.lat(); + return scopePath[index].longitude = value.lng(); + } + }, + insert_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return scopePath.splice(index, 0, value); + } else { + return scopePath.splice(index, 0, { + latitude: value.lat(), + longitude: value.lng() + }); + } + }, + remove_at: function(index) { + if (isSetFromScope) { + return; + } + return scopePath.splice(index, 1); + } + }; + geojsonArray; + if (scopePath.type === 'Polygon') { + geojsonArray = scopePath.coordinates[0]; + } else if (scopePath.type === 'LineString') { + geojsonArray = scopePath.coordinates; + } + geojsonHandlers = { + set_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!(value && value.lng && value.lat)) { + return; + } + geojsonArray[index][1] = value.lat(); + return geojsonArray[index][0] = value.lng(); + }, + insert_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return; + } + return geojsonArray.splice(index, 0, [value.lng(), value.lat()]); + }, + remove_at: function(index) { + if (isSetFromScope) { + return; + } + return geojsonArray.splice(index, 1); + } + }; + mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers); + } + legacyWatcher = function(newPath) { + var changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; + isSetFromScope = true; + oldArray = mapArray; + changed = false; + if (newPath) { + i = 0; + oldLength = oldArray.getLength(); + newLength = newPath.length; + l = Math.min(oldLength, newLength); + newValue = void 0; + while (i < l) { + oldValue = oldArray.getAt(i); + newValue = newPath[i]; + if (typeof newValue.equals === 'function') { + if (!newValue.equals(oldValue)) { + oldArray.setAt(i, newValue); + changed = true; + } + } else { + if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) { + oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude)); + changed = true; + } + } + i++; + } + while (i < newLength) { + newValue = newPath[i]; + if (typeof newValue.lat === 'function' && typeof newValue.lng === 'function') { + oldArray.push(newValue); + } else { + oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude)); + } + changed = true; + i++; + } + while (i < oldLength) { + oldArray.pop(); + changed = true; + i++; + } + } + isSetFromScope = false; + if (changed) { + return pathChangedFn(oldArray); + } + }; + geojsonWatcher = function(newPath) { + var array, changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; + isSetFromScope = true; + oldArray = mapArray; + changed = false; + if (newPath) { + array; + if (scopePath.type === 'Polygon') { + array = newPath.coordinates[0]; + } else if (scopePath.type === 'LineString') { + array = newPath.coordinates; + } + i = 0; + oldLength = oldArray.getLength(); + newLength = array.length; + l = Math.min(oldLength, newLength); + newValue = void 0; + while (i < l) { + oldValue = oldArray.getAt(i); + newValue = array[i]; + if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) { + oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0])); + changed = true; + } + i++; + } + while (i < newLength) { + newValue = array[i]; + oldArray.push(new google.maps.LatLng(newValue[1], newValue[0])); + changed = true; + i++; + } + while (i < oldLength) { + oldArray.pop(); + changed = true; + i++; + } + } + isSetFromScope = false; + if (changed) { + return pathChangedFn(oldArray); + } + }; + watchListener; + if (!scope["static"]) { + if (angular.isUndefined(scopePath.type)) { + watchListener = scope.$watchCollection(pathEval, legacyWatcher); + } else { + watchListener = scope.$watch(pathEval, geojsonWatcher, true); + } + } + return function() { + if (mapArrayListener) { + mapArrayListener(); + mapArrayListener = null; + } + if (watchListener) { + watchListener(); + return watchListener = null; + } + }; + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes", [ + '$timeout', function($timeout) { + return { + maybeRepaint: function(el) { + if (el) { + el.style.opacity = 0.9; + return $timeout(function() { + return el.style.opacity = 1; + }); + } + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').service('uiGmapObjectIterators', function() { + var _ignores, _iterators, _slapForEach, _slapMap; + _ignores = ['length', 'forEach', 'map']; + _iterators = []; + _slapForEach = function(object) { + object.forEach = function(cb) { + return _.each(_.omit(object, _ignores), function(val) { + if (!_.isFunction(val)) { + return cb(val); + } + }); + }; + return object; + }; + _iterators.push(_slapForEach); + _slapMap = function(object) { + object.map = function(cb) { + return _.map(_.omit(object, _ignores), function(val) { + if (!_.isFunction(val)) { + return cb(val); + } + }); + }; + return object; + }; + _iterators.push(_slapMap); + return { + slapMap: _slapMap, + slapForEach: _slapForEach, + slapAll: function(object) { + _iterators.forEach(function(it) { + return it(object); + }); + return object; + } + }; + }); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.options.builders').service('uiGmapCommonOptionsBuilder', [ + 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapModelKey', function(BaseObject, $log, ModelKey) { + var CommonOptionsBuilder; + return CommonOptionsBuilder = (function(superClass) { + extend(CommonOptionsBuilder, superClass); + + function CommonOptionsBuilder() { + this.watchProps = bind(this.watchProps, this); + this.buildOpts = bind(this.buildOpts, this); + return CommonOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + CommonOptionsBuilder.prototype.props = [ + 'clickable', 'draggable', 'editable', 'visible', { + prop: 'stroke', + isColl: true + } + ]; + + CommonOptionsBuilder.prototype.getCorrectModel = function(scope) { + if (angular.isDefined(scope != null ? scope.model : void 0)) { + return scope.model; + } else { + return scope; + } + }; + + CommonOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) { + var model, opts, stroke; + if (customOpts == null) { + customOpts = {}; + } + if (forEachOpts == null) { + forEachOpts = {}; + } + if (!this.scope) { + $log.error('this.scope not defined in CommonOptionsBuilder can not buildOpts'); + return; + } + if (!this.gMap) { + $log.error('this.map not defined in CommonOptionsBuilder can not buildOpts'); + return; + } + model = this.getCorrectModel(this.scope); + stroke = this.scopeOrModelVal('stroke', this.scope, model); + opts = angular.extend(customOpts, this.DEFAULTS, { + map: this.gMap, + strokeColor: stroke != null ? stroke.color : void 0, + strokeOpacity: stroke != null ? stroke.opacity : void 0, + strokeWeight: stroke != null ? stroke.weight : void 0 + }); + angular.forEach(angular.extend(forEachOpts, { + clickable: true, + draggable: false, + editable: false, + "static": false, + fit: false, + visible: true, + zIndex: 0, + icons: [] + }), (function(_this) { + return function(defaultValue, key) { + var val; + val = cachedEval ? cachedEval[key] : _this.scopeOrModelVal(key, _this.scope, model); + if (angular.isUndefined(val)) { + return opts[key] = defaultValue; + } else { + return opts[key] = model[key]; + } + }; + })(this)); + if (opts["static"]) { + opts.editable = false; + } + return opts; + }; + + CommonOptionsBuilder.prototype.watchProps = function(props) { + if (props == null) { + props = this.props; + } + return props.forEach((function(_this) { + return function(prop) { + if ((_this.attrs[prop] != null) || (_this.attrs[prop != null ? prop.prop : void 0] != null)) { + if (prop != null ? prop.isColl : void 0) { + return _this.scope.$watchCollection(prop.prop, _this.setMyOptions); + } else { + return _this.scope.$watch(prop, _this.setMyOptions); + } + } + }; + })(this)); + }; + + return CommonOptionsBuilder; + + })(ModelKey); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.options.builders').factory('uiGmapPolylineOptionsBuilder', [ + 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) { + var PolylineOptionsBuilder; + return PolylineOptionsBuilder = (function(superClass) { + extend(PolylineOptionsBuilder, superClass); + + function PolylineOptionsBuilder() { + return PolylineOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + PolylineOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) { + return PolylineOptionsBuilder.__super__.buildOpts.call(this, { + path: pathPoints + }, cachedEval, { + geodesic: false + }); + }; + + return PolylineOptionsBuilder; + + })(CommonOptionsBuilder); + } + ]).factory('uiGmapShapeOptionsBuilder', [ + 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) { + var ShapeOptionsBuilder; + return ShapeOptionsBuilder = (function(superClass) { + extend(ShapeOptionsBuilder, superClass); + + function ShapeOptionsBuilder() { + return ShapeOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + ShapeOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) { + var fill, model; + model = this.getCorrectModel(this.scope); + fill = cachedEval ? cachedEval['fill'] : this.scopeOrModelVal('fill', this.scope, model); + customOpts = angular.extend(customOpts, { + fillColor: fill != null ? fill.color : void 0, + fillOpacity: fill != null ? fill.opacity : void 0 + }); + return ShapeOptionsBuilder.__super__.buildOpts.call(this, customOpts, cachedEval, forEachOpts); + }; + + return ShapeOptionsBuilder; + + })(CommonOptionsBuilder); + } + ]).factory('uiGmapPolygonOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var PolygonOptionsBuilder; + return PolygonOptionsBuilder = (function(superClass) { + extend(PolygonOptionsBuilder, superClass); + + function PolygonOptionsBuilder() { + return PolygonOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + PolygonOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) { + return PolygonOptionsBuilder.__super__.buildOpts.call(this, { + path: pathPoints + }, cachedEval, { + geodesic: false + }); + }; + + return PolygonOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]).factory('uiGmapRectangleOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var RectangleOptionsBuilder; + return RectangleOptionsBuilder = (function(superClass) { + extend(RectangleOptionsBuilder, superClass); + + function RectangleOptionsBuilder() { + return RectangleOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + RectangleOptionsBuilder.prototype.buildOpts = function(bounds, cachedEval) { + return RectangleOptionsBuilder.__super__.buildOpts.call(this, { + bounds: bounds + }, cachedEval); + }; + + return RectangleOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]).factory('uiGmapCircleOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var CircleOptionsBuilder; + return CircleOptionsBuilder = (function(superClass) { + extend(CircleOptionsBuilder, superClass); + + function CircleOptionsBuilder() { + return CircleOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + CircleOptionsBuilder.prototype.buildOpts = function(center, radius, cachedEval) { + return CircleOptionsBuilder.__super__.buildOpts.call(this, { + center: center, + radius: radius + }, cachedEval); + }; + + return CircleOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.options').service('uiGmapMarkerOptions', [ + 'uiGmapLogger', 'uiGmapGmapUtil', function($log, GmapUtil) { + return _.extend(GmapUtil, { + createOptions: function(coords, icon, defaults, map) { + var opts; + if (defaults == null) { + defaults = {}; + } + opts = angular.extend({}, defaults, { + position: defaults.position != null ? defaults.position : GmapUtil.getCoords(coords), + visible: defaults.visible != null ? defaults.visible : GmapUtil.validateCoords(coords) + }); + if ((defaults.icon != null) || (icon != null)) { + opts = angular.extend(opts, { + icon: defaults.icon != null ? defaults.icon : icon + }); + } + if (map != null) { + opts.map = map; + } + return opts; + }, + isLabel: function(options) { + if (options == null) { + return false; + } + return (options.labelContent != null) || (options.labelAnchor != null) || (options.labelClass != null) || (options.labelStyle != null) || (options.labelVisible != null); + } + }); + } + ]); + +}).call(this); +; +/*global _,angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapBasePolyChildModel', [ + 'uiGmapLogger', '$timeout', 'uiGmaparray-sync', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function($log, $timeout, arraySync, GmapUtil, EventsHelper) { + return function(Builder, gFactory) { + var BasePolyChildModel; + return BasePolyChildModel = (function(superClass) { + extend(BasePolyChildModel, superClass); + + BasePolyChildModel.include(GmapUtil); + + function BasePolyChildModel(arg) { + var create, gObjectChangeCb, ref; + this.scope = arg.scope, this.attrs = arg.attrs, this.gMap = arg.gMap, this.defaults = arg.defaults, this.model = arg.model, gObjectChangeCb = arg.gObjectChangeCb, this.isScopeModel = (ref = arg.isScopeModel) != null ? ref : false; + this.clean = bind(this.clean, this); + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.isDragging = false; + this.internalEvents = { + dragend: (function(_this) { + return function() { + return _.defer(function() { + return _this.isDragging = false; + }); + }; + })(this), + dragstart: (function(_this) { + return function() { + return _this.isDragging = true; + }; + })(this) + }; + create = (function(_this) { + return function() { + var maybeCachedEval; + if (_this.isDragging) { + return; + } + _this.pathPoints = _this.convertPathPoints(_this.scope.path); + if (_this.gObject != null) { + _this.clean(); + } + if (_this.scope.model != null) { + maybeCachedEval = _this.scope; + } + if (_this.pathPoints.length > 0) { + _this.gObject = gFactory(_this.buildOpts(_this.pathPoints, maybeCachedEval)); + } + if (_this.gObject) { + arraySync(_this.gObject.getPath(), _this.scope, 'path', function(pathPoints) { + _this.pathPoints = pathPoints; + if (gObjectChangeCb != null) { + return gObjectChangeCb(); + } + }); + if (angular.isDefined(_this.scope.events) && angular.isObject(_this.scope.events)) { + _this.listeners = _this.model ? EventsHelper.setEvents(_this.gObject, _this.scope, _this.model) : EventsHelper.setEvents(_this.gObject, _this.scope, _this.scope); + } + return _this.internalListeners = _this.model ? EventsHelper.setEvents(_this.gObject, { + events: _this.internalEvents + }, _this.model) : EventsHelper.setEvents(_this.gObject, { + events: _this.internalEvents + }, _this.scope); + } + }; + })(this); + create(); + this.scope.$watch('path', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue) || !_this.gObject) { + return create(); + } + }; + })(this), true); + if (!this.scope["static"] && angular.isDefined(this.scope.editable)) { + this.scope.$watch('editable', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setEditable(newValue) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.draggable)) { + this.scope.$watch('draggable', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setDraggable(newValue) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.visible)) { + this.scope.$watch('visible', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + } + return (ref1 = _this.gObject) != null ? ref1.setVisible(newValue) : void 0; + }; + })(this), true); + } + if (angular.isDefined(this.scope.geodesic)) { + this.scope.$watch('geodesic', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.weight)) { + this.scope.$watch('stroke.weight', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.color)) { + this.scope.$watch('stroke.color', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.opacity)) { + this.scope.$watch('stroke.opacity', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.icons)) { + this.scope.$watch('icons', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + _this.clean(); + return _this.scope = null; + }; + })(this)); + if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.color)) { + this.scope.$watch('fill.color', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.opacity)) { + this.scope.$watch('fill.opacity', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + if (angular.isDefined(this.scope.zIndex)) { + this.scope.$watch('zIndex', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + } + + BasePolyChildModel.prototype.clean = function() { + var ref; + EventsHelper.removeEvents(this.listeners); + EventsHelper.removeEvents(this.internalListeners); + if ((ref = this.gObject) != null) { + ref.setMap(null); + } + return this.gObject = null; + }; + + return BasePolyChildModel; + + })(Builder); + }; + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready +Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawing-freehand , & + http://jsfiddle.net/YsQdh/88/ + */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapDrawFreeHandChildModel', [ + 'uiGmapLogger', '$q', function($log, $q) { + var drawFreeHand, freeHandMgr; + drawFreeHand = function(map, polys, done) { + var move, poly; + poly = new google.maps.Polyline({ + map: map, + clickable: false + }); + move = google.maps.event.addListener(map, 'mousemove', function(e) { + return poly.getPath().push(e.latLng); + }); + google.maps.event.addListenerOnce(map, 'mouseup', function(e) { + var path; + google.maps.event.removeListener(move); + path = poly.getPath(); + poly.setMap(null); + polys.push(new google.maps.Polygon({ + map: map, + path: path + })); + poly = null; + google.maps.event.clearListeners(map.getDiv(), 'mousedown'); + return done(); + }); + return void 0; + }; + freeHandMgr = function(map1, scope) { + var disableMap, enableMap; + this.map = map1; + disableMap = (function(_this) { + return function() { + var mapOptions; + mapOptions = { + draggable: false, + disableDefaultUI: true, + scrollwheel: false, + disableDoubleClickZoom: false + }; + $log.info('disabling map move'); + return _this.map.setOptions(mapOptions); + }; + })(this); + enableMap = (function(_this) { + return function() { + var mapOptions, ref; + mapOptions = { + draggable: true, + disableDefaultUI: false, + scrollwheel: true, + disableDoubleClickZoom: true + }; + if ((ref = _this.deferred) != null) { + ref.resolve(); + } + return _.defer(function() { + return _this.map.setOptions(_.extend(mapOptions, scope.options)); + }); + }; + })(this); + this.engage = (function(_this) { + return function(polys1) { + _this.polys = polys1; + _this.deferred = $q.defer(); + disableMap(); + $log.info('DrawFreeHandChildModel is engaged (drawing).'); + google.maps.event.addDomListener(_this.map.getDiv(), 'mousedown', function(e) { + return drawFreeHand(_this.map, _this.polys, enableMap); + }); + return _this.deferred.promise; + }; + })(this); + return this; + }; + return freeHandMgr; + } + ]); + +}).call(this); +; +/*global _:true,angular:true,google:true, RichMarker:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapMarkerChildModel', [ + 'uiGmapModelKey', 'uiGmapGmapUtil', 'uiGmapLogger', 'uiGmapEventsHelper', 'uiGmapPropertyAction', 'uiGmapMarkerOptions', 'uiGmapIMarker', 'uiGmapMarkerManager', 'uiGmapPromise', function(ModelKey, GmapUtil, $log, EventsHelper, PropertyAction, MarkerOptions, IMarker, MarkerManager, uiGmapPromise) { + var MarkerChildModel; + MarkerChildModel = (function(superClass) { + var destroy; + + extend(MarkerChildModel, superClass); + + MarkerChildModel.include(GmapUtil); + + MarkerChildModel.include(EventsHelper); + + MarkerChildModel.include(MarkerOptions); + + destroy = function(child) { + if ((child != null ? child.gObject : void 0) != null) { + child.removeEvents(child.externalListeners); + child.removeEvents(child.internalListeners); + if (child != null ? child.gObject : void 0) { + if (child.removeFromManager) { + child.gManager.remove(child.gObject); + } + child.gObject.setMap(null); + return child.gObject = null; + } + } + }; + + function MarkerChildModel(opts) { + this.internalEvents = bind(this.internalEvents, this); + this.setLabelOptions = bind(this.setLabelOptions, this); + this.setOptions = bind(this.setOptions, this); + this.setIcon = bind(this.setIcon, this); + this.setCoords = bind(this.setCoords, this); + this.isNotValid = bind(this.isNotValid, this); + this.maybeSetScopeValue = bind(this.maybeSetScopeValue, this); + this.createMarker = bind(this.createMarker, this); + this.setMyScope = bind(this.setMyScope, this); + this.updateModel = bind(this.updateModel, this); + this.handleModelChanges = bind(this.handleModelChanges, this); + this.destroy = bind(this.destroy, this); + var action, ref, ref1, ref2, ref3, ref4, scope; + scope = opts.scope, this.model = opts.model, this.keys = opts.keys, this.gMap = opts.gMap, this.defaults = (ref = opts.defaults) != null ? ref : {}, this.doClick = opts.doClick, this.gManager = opts.gManager, this.doDrawSelf = (ref1 = opts.doDrawSelf) != null ? ref1 : true, this.trackModel = (ref2 = opts.trackModel) != null ? ref2 : true, this.needRedraw = (ref3 = opts.needRedraw) != null ? ref3 : false, this.isScopeModel = (ref4 = opts.isScopeModel) != null ? ref4 : false; + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.deferred = uiGmapPromise.defer(); + _.each(this.keys, (function(_this) { + return function(v, k) { + var keyValue; + keyValue = _this.keys[k]; + if ((keyValue != null) && !_.isFunction(keyValue) && _.isString(keyValue)) { + return _this[k + 'Key'] = keyValue; + } + }; + })(this)); + this.idKey = this.idKeyKey || 'id'; + if (this.model[this.idKey] != null) { + this.id = this.model[this.idKey]; + } + MarkerChildModel.__super__.constructor.call(this, scope); + this.scope.getGMarker = (function(_this) { + return function() { + return _this.gObject; + }; + })(this); + this.firstTime = true; + if (this.trackModel) { + this.scope.model = this.model; + this.scope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.handleModelChanges(newValue, oldValue); + } + }; + })(this), true); + } else { + action = new PropertyAction((function(_this) { + return function(calledKey) { + if (_.isFunction(calledKey)) { + calledKey = 'all'; + } + if (!_this.firstTime) { + return _this.setMyScope(calledKey, scope); + } + }; + })(this), false); + _.each(this.keys, function(v, k) { + return scope.$watch(k, action.sic(k), true); + }); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + return destroy(_this); + }; + })(this)); + this.createMarker(this.model); + $log.info(this); + } + + MarkerChildModel.prototype.destroy = function(removeFromManager) { + if (removeFromManager == null) { + removeFromManager = true; + } + this.removeFromManager = removeFromManager; + return this.scope.$destroy(); + }; + + MarkerChildModel.prototype.handleModelChanges = function(newValue, oldValue) { + var changes, ctr, len; + changes = this.getChanges(newValue, oldValue, IMarker.keys); + if (!this.firstTime) { + ctr = 0; + len = _.keys(changes).length; + return _.each(changes, (function(_this) { + return function(v, k) { + var doDraw; + ctr += 1; + doDraw = len === ctr; + _this.setMyScope(k, newValue, oldValue, false, true, doDraw); + return _this.needRedraw = true; + }; + })(this)); + } + }; + + MarkerChildModel.prototype.updateModel = function(model) { + if (this.isScopeModel) { + this.clonedModel = _.clone(model, true); + } + return this.setMyScope('all', model, this.model); + }; + + MarkerChildModel.prototype.renderGMarker = function(doDraw, validCb) { + var coords, isSpiderfied, ref; + if (doDraw == null) { + doDraw = true; + } + coords = this.getProp('coords', this.scope, this.model); + if (((ref = this.gManager) != null ? ref.isSpiderfied : void 0) != null) { + isSpiderfied = this.gManager.isSpiderfied(); + } + if (coords != null) { + if (!this.validateCoords(coords)) { + $log.debug('MarkerChild does not have coords yet. They may be defined later.'); + return; + } + if (validCb != null) { + validCb(); + } + if (doDraw && this.gObject) { + this.gManager.add(this.gObject); + } + if (isSpiderfied) { + return this.gManager.markerSpiderfier.spiderListener(this.gObject, window.event); + } + } else { + if (doDraw && this.gObject) { + return this.gManager.remove(this.gObject); + } + } + }; + + MarkerChildModel.prototype.setMyScope = function(thingThatChanged, model, oldModel, isInit, doDraw) { + var justCreated; + if (oldModel == null) { + oldModel = void 0; + } + if (isInit == null) { + isInit = false; + } + if (doDraw == null) { + doDraw = true; + } + if (model == null) { + model = this.model; + } else { + this.model = model; + } + if (!this.gObject) { + this.setOptions(this.scope, doDraw); + justCreated = true; + } + switch (thingThatChanged) { + case 'all': + return _.each(this.keys, (function(_this) { + return function(v, k) { + return _this.setMyScope(k, model, oldModel, isInit, doDraw); + }; + })(this)); + case 'icon': + return this.maybeSetScopeValue({ + gSetter: this.setIcon, + doDraw: doDraw + }); + case 'coords': + return this.maybeSetScopeValue({ + gSetter: this.setCoords, + doDraw: doDraw + }); + case 'options': + if (!justCreated) { + return this.createMarker(model, oldModel, isInit, doDraw); + } + } + }; + + MarkerChildModel.prototype.createMarker = function(model, oldModel, isInit, doDraw) { + if (oldModel == null) { + oldModel = void 0; + } + if (isInit == null) { + isInit = false; + } + if (doDraw == null) { + doDraw = true; + } + this.maybeSetScopeValue({ + gSetter: this.setOptions, + doDraw: doDraw + }); + return this.firstTime = false; + }; + + MarkerChildModel.prototype.maybeSetScopeValue = function(arg) { + var doDraw, gSetter, ref; + gSetter = arg.gSetter, doDraw = (ref = arg.doDraw) != null ? ref : true; + if (gSetter != null) { + gSetter(this.scope, doDraw); + } + if (this.doDrawSelf && doDraw) { + return this.gManager.draw(); + } + }; + + MarkerChildModel.prototype.isNotValid = function(scope, doCheckGmarker) { + var hasIdenticalScopes, hasNoGmarker; + if (doCheckGmarker == null) { + doCheckGmarker = true; + } + hasNoGmarker = !doCheckGmarker ? false : this.gObject === void 0; + hasIdenticalScopes = !this.trackModel ? scope.$id !== this.scope.$id : false; + return hasIdenticalScopes || hasNoGmarker; + }; + + MarkerChildModel.prototype.setCoords = function(scope, doDraw) { + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope) || (this.gObject == null)) { + return; + } + return this.renderGMarker(doDraw, (function(_this) { + return function() { + var newGValue, newModelVal, oldGValue; + newModelVal = _this.getProp('coords', scope, _this.model); + newGValue = _this.getCoords(newModelVal); + oldGValue = _this.gObject.getPosition(); + if ((oldGValue != null) && (newGValue != null)) { + if (newGValue.lng() === oldGValue.lng() && newGValue.lat() === oldGValue.lat()) { + return; + } + } + _this.gObject.setPosition(newGValue); + return _this.gObject.setVisible(_this.validateCoords(newModelVal)); + }; + })(this)); + }; + + MarkerChildModel.prototype.setIcon = function(scope, doDraw) { + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope) || (this.gObject == null)) { + return; + } + return this.renderGMarker(doDraw, (function(_this) { + return function() { + var coords, newValue, oldValue; + oldValue = _this.gObject.getIcon(); + newValue = _this.getProp('icon', scope, _this.model); + if (oldValue === newValue) { + return; + } + _this.gObject.setIcon(newValue); + coords = _this.getProp('coords', scope, _this.model); + _this.gObject.setPosition(_this.getCoords(coords)); + return _this.gObject.setVisible(_this.validateCoords(coords)); + }; + })(this)); + }; + + MarkerChildModel.prototype.setOptions = function(scope, doDraw) { + var ref; + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope, false)) { + return; + } + this.renderGMarker(doDraw, (function(_this) { + return function() { + var _options, coords, icon; + coords = _this.getProp('coords', scope, _this.model); + icon = _this.getProp('icon', scope, _this.model); + _options = _this.getProp('options', scope, _this.model); + _this.opts = _this.createOptions(coords, icon, _options); + if (_this.isLabel(_this.gObject) !== _this.isLabel(_this.opts) && (_this.gObject != null)) { + _this.gManager.remove(_this.gObject); + _this.gObject = void 0; + } + if (_this.gObject != null) { + _this.gObject.setOptions(_this.setLabelOptions(_this.opts)); + } + if (!_this.gObject) { + if (_this.isLabel(_this.opts)) { + _this.gObject = new MarkerWithLabel(_this.setLabelOptions(_this.opts)); + } else if (_this.opts.content) { + _this.gObject = new RichMarker(_this.opts); + _this.gObject.getIcon = _this.gObject.getContent; + _this.gObject.setIcon = _this.gObject.setContent; + } else { + _this.gObject = new google.maps.Marker(_this.opts); + } + _.extend(_this.gObject, { + model: _this.model + }); + } + if (_this.externalListeners) { + _this.removeEvents(_this.externalListeners); + } + if (_this.internalListeners) { + _this.removeEvents(_this.internalListeners); + } + _this.externalListeners = _this.setEvents(_this.gObject, _this.scope, _this.model, ['dragend']); + _this.internalListeners = _this.setEvents(_this.gObject, { + events: _this.internalEvents(), + $evalAsync: function() {} + }, _this.model); + if (_this.id != null) { + return _this.gObject.key = _this.id; + } + }; + })(this)); + if (this.gObject && (this.gObject.getMap() || this.gManager.type !== MarkerManager.type)) { + this.deferred.resolve(this.gObject); + } else { + if (!this.gObject) { + return this.deferred.reject('gObject is null'); + } + if (!(((ref = this.gObject) != null ? ref.getMap() : void 0) && this.gManager.type === MarkerManager.type)) { + $log.debug('gObject has no map yet'); + this.deferred.resolve(this.gObject); + } + } + if (this.model[this.fitKey]) { + return this.gManager.fit(); + } + }; + + MarkerChildModel.prototype.setLabelOptions = function(opts) { + if (opts.labelAnchor) { + opts.labelAnchor = this.getLabelPositionPoint(opts.labelAnchor); + } + return opts; + }; + + MarkerChildModel.prototype.internalEvents = function() { + return { + dragend: (function(_this) { + return function(marker, eventName, model, mousearg) { + var events, modelToSet, newCoords; + modelToSet = _this.trackModel ? _this.scope.model : _this.model; + newCoords = _this.setCoordsFromEvent(_this.modelOrKey(modelToSet, _this.coordsKey), _this.gObject.getPosition()); + modelToSet = _this.setVal(model, _this.coordsKey, newCoords); + events = _this.scope.events; + if ((events != null ? events.dragend : void 0) != null) { + events.dragend(marker, eventName, modelToSet, mousearg); + } + return _this.scope.$apply(); + }; + })(this), + click: (function(_this) { + return function(marker, eventName, model, mousearg) { + var click; + click = _this.getProp('click', _this.scope, _this.model); + if (_this.doClick && angular.isFunction(click)) { + return _this.scope.$evalAsync(click(marker, eventName, _this.model, mousearg)); + } + }; + })(this) + }; + }; + + return MarkerChildModel; + + })(ModelKey); + return MarkerChildModel; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygonChildModel', [ + 'uiGmapBasePolyChildModel', 'uiGmapPolygonOptionsBuilder', function(BaseGen, Builder) { + var PolygonChildModel, base, gFactory; + gFactory = function(opts) { + return new google.maps.Polygon(opts); + }; + base = new BaseGen(Builder, gFactory); + return PolygonChildModel = (function(superClass) { + extend(PolygonChildModel, superClass); + + function PolygonChildModel() { + return PolygonChildModel.__super__.constructor.apply(this, arguments); + } + + return PolygonChildModel; + + })(base); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylineChildModel', [ + 'uiGmapBasePolyChildModel', 'uiGmapPolylineOptionsBuilder', function(BaseGen, Builder) { + var PolylineChildModel, base, gFactory; + gFactory = function(opts) { + return new google.maps.Polyline(opts); + }; + base = BaseGen(Builder, gFactory); + return PolylineChildModel = (function(superClass) { + extend(PolylineChildModel, superClass); + + function PolylineChildModel() { + return PolylineChildModel.__super__.constructor.apply(this, arguments); + } + + return PolylineChildModel; + + })(base); + } + ]); + +}).call(this); +; +/*global _:true,angular:true,google:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapWindowChildModel', [ + 'uiGmapBaseObject', 'uiGmapGmapUtil', 'uiGmapLogger', '$compile', '$http', '$templateCache', 'uiGmapChromeFixes', 'uiGmapEventsHelper', function(BaseObject, GmapUtil, $log, $compile, $http, $templateCache, ChromeFixes, EventsHelper) { + var WindowChildModel; + WindowChildModel = (function(superClass) { + extend(WindowChildModel, superClass); + + WindowChildModel.include(GmapUtil); + + WindowChildModel.include(EventsHelper); + + function WindowChildModel(opts) { + this.updateModel = bind(this.updateModel, this); + this.destroy = bind(this.destroy, this); + this.remove = bind(this.remove, this); + this.getLatestPosition = bind(this.getLatestPosition, this); + this.hideWindow = bind(this.hideWindow, this); + this.showWindow = bind(this.showWindow, this); + this.handleClick = bind(this.handleClick, this); + this.watchOptions = bind(this.watchOptions, this); + this.watchCoords = bind(this.watchCoords, this); + this.createGWin = bind(this.createGWin, this); + this.watchElement = bind(this.watchElement, this); + this.watchAndDoShow = bind(this.watchAndDoShow, this); + this.doShow = bind(this.doShow, this); + var maybeMarker, ref, ref1, ref2, ref3; + this.model = (ref = opts.model) != null ? ref : {}, this.scope = opts.scope, this.opts = opts.opts, this.isIconVisibleOnClick = opts.isIconVisibleOnClick, this.gMap = opts.gMap, this.markerScope = opts.markerScope, this.element = opts.element, this.needToManualDestroy = (ref1 = opts.needToManualDestroy) != null ? ref1 : false, this.markerIsVisibleAfterWindowClose = (ref2 = opts.markerIsVisibleAfterWindowClose) != null ? ref2 : true, this.isScopeModel = (ref3 = opts.isScopeModel) != null ? ref3 : false; + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.getGmarker = function() { + var ref4, ref5; + if (((ref4 = this.markerScope) != null ? ref4['getGMarker'] : void 0) != null) { + return (ref5 = this.markerScope) != null ? ref5.getGMarker() : void 0; + } + }; + this.listeners = []; + this.createGWin(); + maybeMarker = this.getGmarker(); + if (maybeMarker != null) { + maybeMarker.setClickable(true); + } + this.watchElement(); + this.watchOptions(); + this.watchCoords(); + this.watchAndDoShow(); + this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.destroy(); + }; + })(this)); + $log.info(this); + } + + WindowChildModel.prototype.doShow = function(wasOpen) { + if (this.scope.show === true || wasOpen) { + return this.showWindow(); + } else { + return this.hideWindow(); + } + }; + + WindowChildModel.prototype.watchAndDoShow = function() { + if (this.model.show != null) { + this.scope.show = this.model.show; + } + this.scope.$watch('show', this.doShow, true); + return this.doShow(); + }; + + WindowChildModel.prototype.watchElement = function() { + return this.scope.$watch((function(_this) { + return function() { + var ref, wasOpen; + if (!(_this.element || _this.html)) { + return; + } + if (_this.html !== _this.element.html() && _this.gObject) { + if ((ref = _this.opts) != null) { + ref.content = void 0; + } + wasOpen = _this.gObject.isOpen(); + _this.remove(); + return _this.createGWin(wasOpen); + } + }; + })(this)); + }; + + WindowChildModel.prototype.createGWin = function(isOpen) { + var _opts, defaults, maybeMarker, ref, ref1; + if (isOpen == null) { + isOpen = false; + } + maybeMarker = this.getGmarker(); + defaults = {}; + if (this.opts != null) { + if (this.scope.coords) { + this.opts.position = this.getCoords(this.scope.coords); + } + defaults = this.opts; + } + if (this.element) { + this.html = _.isObject(this.element) ? this.element.html() : this.element; + } + _opts = this.scope.options ? this.scope.options : defaults; + this.opts = this.createWindowOptions(maybeMarker, this.markerScope || this.scope, this.html, _opts); + if (this.opts != null) { + if (!this.gObject) { + if (this.opts.boxClass && (window.InfoBox && typeof window.InfoBox === 'function')) { + this.gObject = new window.InfoBox(this.opts); + } else { + this.gObject = new google.maps.InfoWindow(this.opts); + } + this.listeners.push(google.maps.event.addListener(this.gObject, 'domready', function() { + return ChromeFixes.maybeRepaint(this.content); + })); + this.listeners.push(google.maps.event.addListener(this.gObject, 'closeclick', (function(_this) { + return function() { + if (maybeMarker) { + maybeMarker.setAnimation(_this.oldMarkerAnimation); + if (_this.markerIsVisibleAfterWindowClose) { + _.delay(function() { + maybeMarker.setVisible(false); + return maybeMarker.setVisible(_this.markerIsVisibleAfterWindowClose); + }, 250); + } + } + _this.gObject.close(); + _this.model.show = false; + if (_this.scope.closeClick != null) { + return _this.scope.$evalAsync(_this.scope.closeClick()); + } else { + return _this.scope.$evalAsync(); + } + }; + })(this))); + } + this.gObject.setContent(this.opts.content); + this.handleClick(((ref = this.scope) != null ? (ref1 = ref.options) != null ? ref1.forceClick : void 0 : void 0) || isOpen); + return this.doShow(this.gObject.isOpen()); + } + }; + + WindowChildModel.prototype.watchCoords = function() { + var scope; + scope = this.markerScope != null ? this.markerScope : this.scope; + return scope.$watch('coords', (function(_this) { + return function(newValue, oldValue) { + var pos; + if (newValue !== oldValue) { + if (newValue == null) { + _this.hideWindow(); + } else if (!_this.validateCoords(newValue)) { + $log.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: " + (JSON.stringify(_this.model))); + return; + } + pos = _this.getCoords(newValue); + _this.doShow(); + _this.gObject.setPosition(pos); + if (_this.opts) { + return _this.opts.position = pos; + } + } + }; + })(this), true); + }; + + WindowChildModel.prototype.watchOptions = function() { + return this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.opts = newValue; + if (_this.gObject != null) { + _this.gObject.setOptions(_this.opts); + if ((_this.opts.visible != null) && _this.opts.visible) { + return _this.showWindow(); + } else if (_this.opts.visible != null) { + return _this.hideWindow(); + } + } + } + }; + })(this), true); + }; + + WindowChildModel.prototype.handleClick = function(forceClick) { + var click, maybeMarker; + if (this.gObject == null) { + return; + } + maybeMarker = this.getGmarker(); + click = (function(_this) { + return function() { + if (_this.gObject == null) { + _this.createGWin(); + } + _this.showWindow(); + if (maybeMarker != null) { + _this.initialMarkerVisibility = maybeMarker.getVisible(); + _this.oldMarkerAnimation = maybeMarker.getAnimation(); + return maybeMarker.setVisible(_this.isIconVisibleOnClick); + } + }; + })(this); + if (forceClick) { + click(); + } + if (maybeMarker) { + return this.listeners = this.listeners.concat(this.setEvents(maybeMarker, { + events: { + click: click + } + }, this.model)); + } + }; + + WindowChildModel.prototype.showWindow = function() { + var compiled, show, templateScope; + if (this.gObject == null) { + return; + } + templateScope = null; + show = (function(_this) { + return function() { + var isOpen, maybeMarker, pos; + if (!_this.gObject.isOpen()) { + maybeMarker = _this.getGmarker(); + if ((_this.gObject != null) && (_this.gObject.getPosition != null)) { + pos = _this.gObject.getPosition(); + } + if (maybeMarker) { + pos = maybeMarker.getPosition(); + } + if (!pos) { + return; + } + _this.gObject.open(_this.gMap, maybeMarker); + isOpen = _this.gObject.isOpen(); + if (_this.model.show !== isOpen) { + return _this.model.show = isOpen; + } + } + }; + })(this); + if (this.scope.templateUrl) { + $http.get(this.scope.templateUrl, { + cache: $templateCache + }).then((function(_this) { + return function(content) { + var compiled; + templateScope = _this.scope.$new(); + if (angular.isDefined(_this.scope.templateParameter)) { + templateScope.parameter = _this.scope.templateParameter; + } + compiled = $compile(content.data)(templateScope); + _this.gObject.setContent(compiled[0]); + return show(); + }; + })(this)); + } else if (this.scope.template) { + templateScope = this.scope.$new(); + if (angular.isDefined(this.scope.templateParameter)) { + templateScope.parameter = this.scope.templateParameter; + } + compiled = $compile(this.scope.template)(templateScope); + this.gObject.setContent(compiled[0]); + show(); + } else { + show(); + } + return this.scope.$on('destroy', function() { + return templateScope.$destroy(); + }); + }; + + WindowChildModel.prototype.hideWindow = function() { + if ((this.gObject != null) && this.gObject.isOpen()) { + return this.gObject.close(); + } + }; + + WindowChildModel.prototype.getLatestPosition = function(overridePos) { + var maybeMarker; + maybeMarker = this.getGmarker(); + if ((this.gObject != null) && (maybeMarker != null) && !overridePos) { + return this.gObject.setPosition(maybeMarker.getPosition()); + } else { + if (overridePos) { + return this.gObject.setPosition(overridePos); + } + } + }; + + WindowChildModel.prototype.remove = function() { + this.hideWindow(); + this.removeEvents(this.listeners); + this.listeners.length = 0; + delete this.gObject; + return delete this.opts; + }; + + WindowChildModel.prototype.destroy = function(manualOverride) { + var ref; + if (manualOverride == null) { + manualOverride = false; + } + this.remove(); + if (((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0)) && (this.needToManualDestroy || manualOverride)) { + return this.scope.$destroy(); + } + }; + + WindowChildModel.prototype.updateModel = function(model) { + if (this.isScopeModel) { + this.clonedModel = _.clone(model, true); + } + return _.extend(this.model, this.clonedModel || model); + }; + + return WindowChildModel; + + })(BaseObject); + return WindowChildModel; + } + ]); + +}).call(this); +; +/*global _, angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapBasePolysParentModel', [ + '$timeout', 'uiGmapLogger', 'uiGmapModelKey', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmap_async', 'uiGmapPromise', 'uiGmapFitHelper', function($timeout, $log, ModelKey, ModelsWatcher, PropMap, _async, uiGmapPromise, FitHelper) { + return function(IPoly, PolyChildModel, gObjectName) { + var BasePolysParentModel; + return BasePolysParentModel = (function(superClass) { + extend(BasePolysParentModel, superClass); + + BasePolysParentModel.include(ModelsWatcher); + + function BasePolysParentModel(scope, element, attrs, gMap1, defaults) { + this.element = element; + this.attrs = attrs; + this.gMap = gMap1; + this.defaults = defaults; + this.maybeFit = bind(this.maybeFit, this); + this.createChild = bind(this.createChild, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.createAllNew = bind(this.createAllNew, this); + this.watchIdKey = bind(this.watchIdKey, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.watchDestroy = bind(this.watchDestroy, this); + this.onDestroy = bind(this.onDestroy, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.doINeedToWipe = bind(this.doINeedToWipe, this); + this.watchModels = bind(this.watchModels, this); + BasePolysParentModel.__super__.constructor.call(this, scope); + this["interface"] = IPoly; + this.$log = $log; + this.plurals = new PropMap(); + _.each(IPoly.scopeKeys, (function(_this) { + return function(name) { + return _this[name + 'Key'] = void 0; + }; + })(this)); + this.models = void 0; + this.firstTime = true; + this.$log.info(this); + this.createChildScopes(); + } + + BasePolysParentModel.prototype.watchModels = function(scope) { + + /* + This was watchCollection but not all model changes were being caught. + TODO: Make the directive flexible in overriding whether we watch models (and depth) via watch or watchColleciton. + */ + return scope.$watch('models', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + if (_this.doINeedToWipe(newValue) || scope.doRebuildAll) { + return _this.rebuildAll(scope, true, true); + } else { + return _this.createChildScopes(false); + } + } + }; + })(this), true); + }; + + BasePolysParentModel.prototype.doINeedToWipe = function(newValue) { + var newValueIsEmpty; + newValueIsEmpty = newValue != null ? newValue.length === 0 : true; + return this.plurals.length > 0 && newValueIsEmpty; + }; + + BasePolysParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { + return this.onDestroy(doDelete).then((function(_this) { + return function() { + if (doCreate) { + return _this.createChildScopes(); + } + }; + })(this)); + }; + + BasePolysParentModel.prototype.onDestroy = function() { + BasePolysParentModel.__super__.onDestroy.call(this, this.scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.plurals.values(), function(child) { + return child.destroy(true); + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + var ref; + return (ref = _this.plurals) != null ? ref.removeAll() : void 0; + }); + }; + })(this)); + }; + + BasePolysParentModel.prototype.watchDestroy = function(scope) { + return scope.$on('$destroy', (function(_this) { + return function() { + return _this.rebuildAll(scope, false, true); + }; + })(this)); + }; + + BasePolysParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + if (isCreatingFromScratch == null) { + isCreatingFromScratch = true; + } + if (angular.isUndefined(this.scope.models)) { + this.$log.error("No models to create " + gObjectName + "s from! I Need direct models!"); + return; + } + if ((this.gMap == null) || (this.scope.models == null)) { + return; + } + this.watchIdKey(this.scope); + if (isCreatingFromScratch) { + return this.createAllNew(this.scope, false); + } else { + return this.pieceMeal(this.scope, false); + } + }; + + BasePolysParentModel.prototype.watchIdKey = function(scope) { + this.setIdKey(scope); + return scope.$watch('idKey', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && (newValue == null)) { + _this.idKey = newValue; + return _this.rebuildAll(scope, true, true); + } + }; + })(this)); + }; + + BasePolysParentModel.prototype.createAllNew = function(scope, isArray) { + var maybeCanceled; + if (isArray == null) { + isArray = false; + } + this.models = scope.models; + if (this.firstTime) { + this.watchModels(scope); + this.watchDestroy(scope); + } + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.map(scope.models, function(model) { + var child; + child = _this.createChild(model, _this.gMap); + if (maybeCanceled) { + $log.debug('createNew should fall through safely'); + child.isEnabled = false; + } + maybeCanceled; + return child.pathPoints.getArray(); + }, _async.chunkSizeFrom(scope.chunk)).then(function(pathPoints) { + _this.maybeFit(pathPoints); + return _this.firstTime = false; + }); + }; + })(this)); + }; + + BasePolysParentModel.prototype.pieceMeal = function(scope, isArray) { + var maybeCanceled, payload; + if (isArray == null) { + isArray = true; + } + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + this.models = scope.models; + if ((scope != null) && this.modelsLength() && this.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise(function() { + return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison); + }).then(function(state) { + payload = state; + if (payload.updates.length) { + _async.each(payload.updates, function(obj) { + _.extend(obj.child.scope, obj.model); + return obj.child.model = obj.model; + }); + } + return _async.each(payload.removals, function(child) { + if (child != null) { + child.destroy(); + _this.plurals.remove(child.model[_this.idKey]); + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + if (maybeCanceled) { + $log.debug('pieceMeal should fall through safely'); + } + _this.createChild(modelToAdd, _this.gMap); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + return _this.maybeFit(); + }); + }); + }; + })(this)); + } else { + this.inProgress = false; + return this.rebuildAll(this.scope, true, true); + } + }; + + BasePolysParentModel.prototype.createChild = function(model, gMap) { + var child, childScope; + childScope = this.scope.$new(false); + this.setChildScope(IPoly.scopeKeys, childScope, model); + childScope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.setChildScope(childScope, newValue); + } + }; + })(this), true); + childScope["static"] = this.scope["static"]; + child = new PolyChildModel({ + isScopeModel: true, + scope: childScope, + attrs: this.attrs, + gMap: gMap, + defaults: this.defaults, + model: model, + gObjectChangeCb: (function(_this) { + return function() { + return _this.maybeFit(); + }; + })(this) + }); + if (model[this.idKey] == null) { + this.$log.error(gObjectName + " model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."); + return; + } + this.plurals.put(model[this.idKey], child); + return child; + }; + + BasePolysParentModel.prototype.maybeFit = function(pathPoints) { + if (pathPoints == null) { + pathPoints = this.plurals.map(function(p) { + return p.pathPoints; + }); + } + if (this.scope.fit) { + pathPoints = _.flatten(pathPoints); + return FitHelper.fit(pathPoints, this.gMap); + } + }; + + return BasePolysParentModel; + + })(ModelKey); + }; + } + ]); + +}).call(this); +; +/*globals angular, _, google */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapCircleParentModel', [ + 'uiGmapLogger', '$timeout', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapCircleOptionsBuilder', function($log, $timeout, GmapUtil, EventsHelper, Builder) { + var CircleParentModel, _settingFromDirective; + _settingFromDirective = function(scope, fn) { + scope.settingFromDirective = true; + fn(); + return $timeout(function() { + return scope.settingFromDirective = false; + }); + }; + return CircleParentModel = (function(superClass) { + extend(CircleParentModel, superClass); + + CircleParentModel.include(GmapUtil); + + CircleParentModel.include(EventsHelper); + + function CircleParentModel(scope, element, attrs, gMap, DEFAULTS) { + var clean, gObject, lastRadius; + this.attrs = attrs; + this.gMap = gMap; + this.DEFAULTS = DEFAULTS; + this.scope = scope; + lastRadius = null; + clean = (function(_this) { + return function() { + lastRadius = null; + if (_this.listeners != null) { + _this.removeEvents(_this.listeners); + return _this.listeners = void 0; + } + }; + })(this); + gObject = new google.maps.Circle(this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); + this.setMyOptions = (function(_this) { + return function(newVals, oldVals) { + if (scope.settingFromDirective) { + return; + } + if (!(_.isEqual(newVals, oldVals) && newVals === oldVals && ((newVals != null) && (oldVals != null) ? newVals.coordinates === oldVals.coordinates : true))) { + return gObject.setOptions(_this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); + } + }; + })(this); + this.props = this.props.concat([ + { + prop: 'center', + isColl: true + }, { + prop: 'fill', + isColl: true + }, 'radius', 'zIndex' + ]); + this.watchProps(); + if (this.scope.control != null) { + this.scope.control.getCircle = function() { + return gObject; + }; + } + clean(); + this.listeners = this.setEvents(gObject, scope, scope, ['radius_changed']) || []; + this.listeners.push(google.maps.event.addListener(gObject, 'radius_changed', function() { + + /* + possible google bug, and or because a circle has two radii + radius_changed appears to fire twice (original and new) which is not too helpful + therefore we will check for radius changes manually and bail out if nothing has changed + */ + var newRadius, work; + newRadius = gObject.getRadius(); + if (newRadius === lastRadius) { + return; + } + lastRadius = newRadius; + work = function() { + return _settingFromDirective(scope, function() { + var ref, ref1; + if (newRadius !== scope.radius) { + scope.radius = newRadius; + } + if (((ref = scope.events) != null ? ref.radius_changed : void 0) && _.isFunction((ref1 = scope.events) != null ? ref1.radius_changed : void 0)) { + return scope.events.radius_changed(gObject, 'radius_changed', scope, arguments); + } + }); + }; + if (!angular.mock) { + return scope.$evalAsync(function() { + return work(); + }); + } else { + return work(); + } + })); + this.listeners.push(google.maps.event.addListener(gObject, 'center_changed', function() { + return scope.$evalAsync(function() { + return _settingFromDirective(scope, function() { + if (angular.isDefined(scope.center.type)) { + scope.center.coordinates[1] = gObject.getCenter().lat(); + return scope.center.coordinates[0] = gObject.getCenter().lng(); + } else { + scope.center.latitude = gObject.getCenter().lat(); + return scope.center.longitude = gObject.getCenter().lng(); + } + }); + }); + })); + scope.$on('$destroy', function() { + clean(); + return gObject.setMap(null); + }); + $log.info(this); + } + + return CircleParentModel; + + })(Builder); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapDrawingManagerParentModel', [ + 'uiGmapLogger', '$timeout', 'uiGmapBaseObject', 'uiGmapEventsHelper', function($log, $timeout, BaseObject, EventsHelper) { + var DrawingManagerParentModel; + return DrawingManagerParentModel = (function(superClass) { + extend(DrawingManagerParentModel, superClass); + + DrawingManagerParentModel.include(EventsHelper); + + function DrawingManagerParentModel(scope, element, attrs, map) { + var gObject, listeners; + this.scope = scope; + this.attrs = attrs; + this.map = map; + gObject = new google.maps.drawing.DrawingManager(this.scope.options); + gObject.setMap(this.map); + listeners = void 0; + if (this.scope.control != null) { + this.scope.control.getDrawingManager = function() { + return gObject; + }; + } + if (!this.scope["static"] && this.scope.options) { + this.scope.$watch('options', function(newValue) { + return gObject != null ? gObject.setOptions(newValue) : void 0; + }, true); + } + if (this.scope.events != null) { + listeners = this.setEvents(gObject, this.scope, this.scope); + this.scope.$watch('events', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + if (listeners != null) { + _this.removeEvents(listeners); + } + return listeners = _this.setEvents(gObject, _this.scope, _this.scope); + } + }; + })(this)); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + if (listeners != null) { + _this.removeEvents(listeners); + } + gObject.setMap(null); + return gObject = null; + }; + })(this)); + } + + return DrawingManagerParentModel; + + })(BaseObject); + } + ]); + +}).call(this); +; +/* + - interface for all markers to derrive from + - to enforce a minimum set of requirements + - attributes + - coords + - icon + - implementation needed on watches + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel", [ + "uiGmapModelKey", "uiGmapLogger", function(ModelKey, Logger) { + var IMarkerParentModel; + IMarkerParentModel = (function(superClass) { + extend(IMarkerParentModel, superClass); + + IMarkerParentModel.prototype.DEFAULTS = {}; + + function IMarkerParentModel(scope1, element, attrs, map) { + this.scope = scope1; + this.element = element; + this.attrs = attrs; + this.map = map; + this.onWatch = bind(this.onWatch, this); + this.watch = bind(this.watch, this); + this.validateScope = bind(this.validateScope, this); + IMarkerParentModel.__super__.constructor.call(this, this.scope); + this.$log = Logger; + if (!this.validateScope(this.scope)) { + throw new String("Unable to construct IMarkerParentModel due to invalid scope"); + } + this.doClick = angular.isDefined(this.attrs.click); + if (this.scope.options != null) { + this.DEFAULTS = this.scope.options; + } + this.watch('coords', this.scope); + this.watch('icon', this.scope); + this.watch('options', this.scope); + this.scope.$on("$destroy", (function(_this) { + return function() { + return _this.onDestroy(_this.scope); + }; + })(this)); + } + + IMarkerParentModel.prototype.validateScope = function(scope) { + var ret; + if (scope == null) { + this.$log.error(this.constructor.name + ": invalid scope used"); + return false; + } + ret = scope.coords != null; + if (!ret) { + this.$log.error(this.constructor.name + ": no valid coords attribute found"); + return false; + } + return ret; + }; + + IMarkerParentModel.prototype.watch = function(propNameToWatch, scope, equalityCheck) { + if (equalityCheck == null) { + equalityCheck = true; + } + return scope.$watch(propNameToWatch, (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + return _this.onWatch(propNameToWatch, scope, newValue, oldValue); + } + }; + })(this), equalityCheck); + }; + + IMarkerParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) {}; + + return IMarkerParentModel; + + })(ModelKey); + return IMarkerParentModel; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel", [ + "uiGmapModelKey", "uiGmapGmapUtil", "uiGmapLogger", function(ModelKey, GmapUtil, Logger) { + var IWindowParentModel; + return IWindowParentModel = (function(superClass) { + extend(IWindowParentModel, superClass); + + IWindowParentModel.include(GmapUtil); + + function IWindowParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache) { + IWindowParentModel.__super__.constructor.call(this, scope); + this.$log = Logger; + this.$timeout = $timeout; + this.$compile = $compile; + this.$http = $http; + this.$templateCache = $templateCache; + this.DEFAULTS = {}; + if (scope.options != null) { + this.DEFAULTS = scope.options; + } + } + + IWindowParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) { + if (modelsPropToIterate === 'models') { + return scope[modelsPropToIterate][index]; + } + return scope[modelsPropToIterate].get(index); + }; + + return IWindowParentModel; + + })(ModelKey); + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapLayerParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', '$timeout', function(BaseObject, Logger, $timeout) { + var LayerParentModel; + LayerParentModel = (function(superClass) { + extend(LayerParentModel, superClass); + + function LayerParentModel(scope, element, attrs, gMap, onLayerCreated, $log) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.onLayerCreated = onLayerCreated != null ? onLayerCreated : void 0; + this.$log = $log != null ? $log : Logger; + this.createGoogleLayer = bind(this.createGoogleLayer, this); + if (this.attrs.type == null) { + this.$log.info('type attribute for the layer directive is mandatory. Layer creation aborted!!'); + return; + } + this.createGoogleLayer(); + this.doShow = true; + if (angular.isDefined(this.attrs.show)) { + this.doShow = this.scope.show; + } + if (this.doShow && (this.gMap != null)) { + this.gObject.setMap(this.gMap); + } + this.scope.$watch('show', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.doShow = newValue; + if (newValue) { + return _this.gObject.setMap(_this.gMap); + } else { + return _this.gObject.setMap(null); + } + } + }; + })(this), true); + this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && _this.doShow) { + return _this.gObject.setOptions(newValue); + } + }; + })(this), true); + this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.gObject.setMap(null); + }; + })(this)); + } + + LayerParentModel.prototype.createGoogleLayer = function() { + var base; + if (this.attrs.options == null) { + this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type]() : new google.maps[this.attrs.namespace][this.attrs.type](); + } else { + this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options); + } + if ((this.gObject != null) && this.doShow) { + this.gObject.setMap(this.gMap); + } + if ((this.gObject != null) && (this.onLayerCreated != null)) { + return typeof (base = this.onLayerCreated(this.scope, this.gObject)) === "function" ? base(this.gObject) : void 0; + } + }; + + return LayerParentModel; + + })(BaseObject); + return LayerParentModel; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapMapTypeParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', function(BaseObject, Logger) { + var MapTypeParentModel; + MapTypeParentModel = (function(superClass) { + extend(MapTypeParentModel, superClass); + + function MapTypeParentModel(scope, element, attrs, gMap, $log) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.$log = $log != null ? $log : Logger; + this.hideOverlay = bind(this.hideOverlay, this); + this.showOverlay = bind(this.showOverlay, this); + this.refreshMapType = bind(this.refreshMapType, this); + this.createMapType = bind(this.createMapType, this); + if (this.attrs.options == null) { + this.$log.info('options attribute for the map-type directive is mandatory. Map type creation aborted!!'); + return; + } + this.id = this.gMap.overlayMapTypesCount = this.gMap.overlayMapTypesCount + 1 || 0; + this.doShow = true; + this.createMapType(); + if (angular.isDefined(this.attrs.show)) { + this.doShow = this.scope.show; + } + if (this.doShow && (this.gMap != null)) { + this.showOverlay(); + } + this.scope.$watch('show', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.doShow = newValue; + if (newValue) { + return _this.showOverlay(); + } else { + return _this.hideOverlay(); + } + } + }; + })(this), true); + this.scope.$watchCollection('options', (function(_this) { + return function(newValue, oldValue) { + var different, mapTypeProps; + if (!_.isEqual(newValue, oldValue)) { + mapTypeProps = ['tileSize', 'maxZoom', 'minZoom', 'name', 'alt']; + different = _.some(mapTypeProps, function(prop) { + return !oldValue || !newValue || !_.isEqual(newValue[prop], oldValue[prop]); + }); + if (different) { + return _this.refreshMapType(); + } + } + }; + })(this)); + if (angular.isDefined(this.attrs.refresh)) { + this.scope.$watch('refresh', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + return _this.refreshMapType(); + } + }; + })(this), true); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + _this.hideOverlay(); + return _this.mapType = null; + }; + })(this)); + } + + MapTypeParentModel.prototype.createMapType = function() { + if (this.scope.options.getTile != null) { + this.mapType = this.scope.options; + } else if (this.scope.options.getTileUrl != null) { + this.mapType = new google.maps.ImageMapType(this.scope.options); + } else { + this.$log.info('options should provide either getTile or getTileUrl methods. Map type creation aborted!!'); + return; + } + if (this.attrs.id && this.scope.id) { + this.gMap.mapTypes.set(this.scope.id, this.mapType); + if (!angular.isDefined(this.attrs.show)) { + this.doShow = false; + } + } + return this.mapType.layerId = this.id; + }; + + MapTypeParentModel.prototype.refreshMapType = function() { + this.hideOverlay(); + this.mapType = null; + this.createMapType(); + if (this.doShow && (this.gMap != null)) { + return this.showOverlay(); + } + }; + + MapTypeParentModel.prototype.showOverlay = function() { + return this.gMap.overlayMapTypes.push(this.mapType); + }; + + MapTypeParentModel.prototype.hideOverlay = function() { + var found; + found = false; + return this.gMap.overlayMapTypes.forEach((function(_this) { + return function(mapType, index) { + if (!found && mapType.layerId === _this.id) { + found = true; + _this.gMap.overlayMapTypes.removeAt(index); + } + }; + })(this)); + }; + + return MapTypeParentModel; + + })(BaseObject); + return MapTypeParentModel; + } + ]); + +}).call(this); +; +/*global _:true,angular:true, */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel", [ + "uiGmapIMarkerParentModel", "uiGmapModelsWatcher", "uiGmapPropMap", "uiGmapMarkerChildModel", "uiGmap_async", "uiGmapClustererMarkerManager", "uiGmapMarkerManager", "$timeout", "uiGmapIMarker", "uiGmapPromise", "uiGmapGmapUtil", "uiGmapLogger", "uiGmapSpiderfierMarkerManager", function(IMarkerParentModel, ModelsWatcher, PropMap, MarkerChildModel, _async, ClustererMarkerManager, MarkerManager, $timeout, IMarker, uiGmapPromise, GmapUtil, $log, SpiderfierMarkerManager) { + var MarkersParentModel, _setPlurals; + _setPlurals = function(val, objToSet) { + objToSet.plurals = new PropMap(); + objToSet.scope.plurals = objToSet.plurals; + return objToSet; + }; + MarkersParentModel = (function(superClass) { + extend(MarkersParentModel, superClass); + + MarkersParentModel.include(GmapUtil); + + MarkersParentModel.include(ModelsWatcher); + + function MarkersParentModel(scope, element, attrs, map) { + this.maybeExecMappedEvent = bind(this.maybeExecMappedEvent, this); + this.onDestroy = bind(this.onDestroy, this); + this.newChildMarker = bind(this.newChildMarker, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.createAllNew = bind(this.createAllNew, this); + this.bindToTypeEvents = bind(this.bindToTypeEvents, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.validateScope = bind(this.validateScope, this); + this.onWatch = bind(this.onWatch, this); + MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map); + this["interface"] = IMarker; + _setPlurals(new PropMap(), this); + this.scope.pluralsUpdate = { + updateCtr: 0 + }; + this.$log.info(this); + this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; + this.setIdKey(this.scope); + this.scope.$watch('doRebuildAll', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.doRebuildAll = newValue; + } + }; + })(this)); + if (!this.modelsLength()) { + this.modelsRendered = false; + } + this.scope.$watch('models', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue) || !_this.modelsRendered) { + if (newValue.length === 0 && oldValue.length === 0) { + return; + } + _this.modelsRendered = true; + return _this.onWatch('models', _this.scope, newValue, oldValue); + } + }; + })(this), !this.isTrue(attrs.modelsbyref)); + this.watch('doCluster', this.scope); + this.watch('type', this.scope); + this.watch('clusterOptions', this.scope); + this.watch('clusterEvents', this.scope); + this.watch('typeOptions', this.scope); + this.watch('typeEvents', this.scope); + this.watch('fit', this.scope); + this.watch('idKey', this.scope); + this.gManager = void 0; + this.createAllNew(this.scope); + } + + MarkersParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) { + if (propNameToWatch === "idKey" && newValue !== oldValue) { + this.idKey = newValue; + } + if (this.doRebuildAll || (propNameToWatch === 'doCluster' || propNameToWatch === 'type')) { + return this.rebuildAll(scope); + } else { + return this.pieceMeal(scope); + } + }; + + MarkersParentModel.prototype.validateScope = function(scope) { + var modelsNotDefined; + modelsNotDefined = angular.isUndefined(scope.models) || scope.models === void 0; + if (modelsNotDefined) { + this.$log.error(this.constructor.name + ": no valid models attribute found"); + } + return MarkersParentModel.__super__.validateScope.call(this, scope) || modelsNotDefined; + }; + + + /* + Not used internally by this parent + created for consistency for external control in the API + */ + + MarkersParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + if ((this.gMap == null) || (this.scope.models == null)) { + return; + } + if (isCreatingFromScratch) { + return this.createAllNew(this.scope, false); + } else { + return this.pieceMeal(this.scope, false); + } + }; + + MarkersParentModel.prototype.bindToTypeEvents = function(typeEvents, events) { + var internalHandles, self; + if (events == null) { + events = ['click', 'mouseout', 'mouseover']; + } + + /* + You should only be binding to events that produce groups/clusters of somthing. + Otherwise use the orginal event handle. + For Example: Click on a cluster pushes a cluster/group obj through which has getMarkers + However Spiderfy's click is for a single marker so this is not ideal for that. + */ + self = this; + if (!this.origTypeEvents) { + this.origTypeEvents = {}; + _.each(events, (function(_this) { + return function(eventName) { + return _this.origTypeEvents[eventName] = typeEvents != null ? typeEvents[eventName] : void 0; + }; + })(this)); + } else { + angular.extend(typeEvents, this.origTypeEvents); + } + internalHandles = {}; + _.each(events, function(eventName) { + return internalHandles[eventName] = function(group) { + return self.maybeExecMappedEvent(group, eventName); + }; + }); + return angular.extend(typeEvents, internalHandles); + }; + + MarkersParentModel.prototype.createAllNew = function(scope) { + var isSpiderfied, maybeCanceled, typeEvents, typeOptions; + if (this.gManager != null) { + if (this.gManager instanceof SpiderfierMarkerManager) { + isSpiderfied = this.gManager.isSpiderfied(); + } + this.gManager.clear(); + delete this.gManager; + } + typeEvents = scope.typeEvents || scope.clusterEvents; + typeOptions = scope.typeOptions || scope.clusterOptions; + if (scope.doCluster || scope.type === 'cluster') { + if (typeEvents != null) { + this.bindToTypeEvents(typeEvents); + } + this.gManager = new ClustererMarkerManager(this.map, void 0, typeOptions, typeEvents); + } else if (scope.type === 'spider') { + if (typeEvents != null) { + this.bindToTypeEvents(typeEvents, ['spiderfy', 'unspiderfy']); + } + this.gManager = new SpiderfierMarkerManager(this.map, void 0, typeOptions, typeEvents, this.scope); + if (isSpiderfied) { + this.gManager.spiderfy(); + } + } else { + this.gManager = new MarkerManager(this.map); + } + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.each(scope.models, function(model) { + _this.newChildMarker(model, scope); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + _this.modelsRendered = true; + if (scope.fit) { + _this.gManager.fit(); + } + _this.gManager.draw(); + return _this.scope.pluralsUpdate.updateCtr += 1; + }, _async.chunkSizeFrom(scope.chunk)); + }; + })(this)); + }; + + MarkersParentModel.prototype.rebuildAll = function(scope) { + var ref; + if (!scope.doRebuild && scope.doRebuild !== void 0) { + return; + } + if ((ref = this.scope.plurals) != null ? ref.length : void 0) { + return this.onDestroy(scope).then((function(_this) { + return function() { + return _this.createAllNew(scope); + }; + })(this)); + } else { + return this.createAllNew(scope); + } + }; + + MarkersParentModel.prototype.pieceMeal = function(scope) { + var maybeCanceled, payload; + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + if (this.modelsLength() && this.scope.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise((function() { + return _this.figureOutState(_this.idKey, scope, _this.scope.plurals, _this.modelKeyComparison); + })).then(function(state) { + payload = state; + return _async.each(payload.removals, function(child) { + if (child != null) { + if (child.destroy != null) { + child.destroy(); + } + _this.scope.plurals.remove(child.id); + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + _this.newChildMarker(modelToAdd, scope); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.updates, function(update) { + _this.updateChild(update.child, update.model); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + if (payload.adds.length > 0 || payload.removals.length > 0 || payload.updates.length > 0) { + scope.plurals = _this.scope.plurals; + if (scope.fit) { + _this.gManager.fit(); + } + _this.gManager.draw(); + } + return _this.scope.pluralsUpdate.updateCtr += 1; + }); + }; + })(this)); + } else { + this.inProgress = false; + return this.rebuildAll(scope); + } + }; + + MarkersParentModel.prototype.newChildMarker = function(model, scope) { + var child, childScope, keys; + if (!model) { + throw 'model undefined'; + } + if (model[this.idKey] == null) { + this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); + return; + } + this.$log.info('child', child, 'markers', this.scope.markerModels); + childScope = scope.$new(false); + childScope.events = scope.events; + keys = {}; + IMarker.scopeKeys.forEach(function(k) { + return keys[k] = scope[k]; + }); + child = new MarkerChildModel({ + scope: childScope, + model: model, + keys: keys, + gMap: this.map, + defaults: this.DEFAULTS, + doClick: this.doClick, + gManager: this.gManager, + doDrawSelf: false, + isScopeModel: true + }); + this.scope.plurals.put(model[this.idKey], child); + return child; + }; + + MarkersParentModel.prototype.onDestroy = function(scope) { + MarkersParentModel.__super__.onDestroy.call(this, scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.scope.plurals.values(), function(model) { + if (model != null) { + return model.destroy(false); + } + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + if (_this.gManager != null) { + _this.gManager.destroy(); + } + _this.plurals.removeAll(); + if (_this.plurals !== _this.scope.plurals) { + console.error('plurals out of sync for MarkersParentModel'); + } + return _this.scope.pluralsUpdate.updateCtr += 1; + }); + }; + })(this)); + }; + + MarkersParentModel.prototype.maybeExecMappedEvent = function(group, fnName) { + var pair, typeEvents; + if (this.scope.$$destroyed) { + return; + } + typeEvents = this.scope.typeEvents || this.scope.clusterEvents; + if (_.isFunction(typeEvents != null ? typeEvents[fnName] : void 0)) { + pair = this.mapTypeToPlurals(group); + if (this.origTypeEvents[fnName]) { + return this.origTypeEvents[fnName](pair.group, pair.mapped); + } + } + }; + + MarkersParentModel.prototype.mapTypeToPlurals = function(group) { + var arrayToMap, mapped, ref; + if (_.isArray(group)) { + arrayToMap = group; + } else if (_.isFunction(group.getMarkers)) { + arrayToMap = group.getMarkers(); + } + if (arrayToMap == null) { + $log.error("Unable to map event as we cannot find the array group to map"); + return; + } + if ((ref = this.scope.plurals.values()) != null ? ref.length : void 0) { + mapped = arrayToMap.map((function(_this) { + return function(g) { + return _this.scope.plurals.get(g.key).model; + }; + })(this)); + } else { + mapped = []; + } + return { + cluster: group, + mapped: mapped, + group: group + }; + }; + + MarkersParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) { + if (modelsPropToIterate === 'models') { + return scope[modelsPropToIterate][index]; + } + return scope[modelsPropToIterate].get(index); + }; + + return MarkersParentModel; + + })(IMarkerParentModel); + return MarkersParentModel; + } + ]); + +}).call(this); +;(function() { + ['Polygon', 'Polyline'].forEach(function(name) { + return angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory("uiGmap" + name + "sParentModel", [ + 'uiGmapBasePolysParentModel', "uiGmap" + name + "ChildModel", "uiGmapI" + name, function(BasePolysParentModel, ChildModel, IPoly) { + return BasePolysParentModel(IPoly, ChildModel, name); + } + ]); + }); + +}).call(this); +; +/*globals angular, _, google */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapRectangleParentModel', [ + 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapRectangleOptionsBuilder', function($log, GmapUtil, EventsHelper, Builder) { + var RectangleParentModel; + return RectangleParentModel = (function(superClass) { + extend(RectangleParentModel, superClass); + + RectangleParentModel.include(GmapUtil); + + RectangleParentModel.include(EventsHelper); + + function RectangleParentModel(scope, element, attrs, gMap, DEFAULTS) { + var bounds, clear, createBounds, dragging, fit, gObject, init, listeners, myListeners, settingBoundsFromScope, updateBounds; + this.scope = scope; + this.attrs = attrs; + this.gMap = gMap; + this.DEFAULTS = DEFAULTS; + bounds = void 0; + dragging = false; + myListeners = []; + listeners = void 0; + fit = (function(_this) { + return function() { + if (_this.isTrue(_this.attrs.fit)) { + return _this.fitMapBounds(_this.gMap, bounds); + } + }; + })(this); + createBounds = (function(_this) { + return function() { + var ref, ref1, ref2; + if ((_this.scope.bounds != null) && (((ref = _this.scope.bounds) != null ? ref.sw : void 0) != null) && (((ref1 = _this.scope.bounds) != null ? ref1.ne : void 0) != null) && _this.validateBoundPoints(_this.scope.bounds)) { + bounds = _this.convertBoundPoints(_this.scope.bounds); + return $log.info("new new bounds created: " + (JSON.stringify(bounds))); + } else if ((_this.scope.bounds.getNorthEast != null) && (_this.scope.bounds.getSouthWest != null)) { + return bounds = _this.scope.bounds; + } else { + if (_this.scope.bounds != null) { + return $log.error("Invalid bounds for newValue: " + (JSON.stringify((ref2 = _this.scope) != null ? ref2.bounds : void 0))); + } + } + }; + })(this); + createBounds(); + gObject = new google.maps.Rectangle(this.buildOpts(bounds)); + $log.info("gObject (rectangle) created: " + gObject); + settingBoundsFromScope = false; + updateBounds = (function(_this) { + return function() { + var b, ne, sw; + b = gObject.getBounds(); + ne = b.getNorthEast(); + sw = b.getSouthWest(); + if (settingBoundsFromScope) { + return; + } + return _this.scope.$evalAsync(function(s) { + if ((s.bounds != null) && (s.bounds.sw != null) && (s.bounds.ne != null)) { + s.bounds.ne = { + latitude: ne.lat(), + longitude: ne.lng() + }; + s.bounds.sw = { + latitude: sw.lat(), + longitude: sw.lng() + }; + } + if ((s.bounds.getNorthEast != null) && (s.bounds.getSouthWest != null)) { + return s.bounds = b; + } + }); + }; + })(this); + init = (function(_this) { + return function() { + fit(); + _this.removeEvents(myListeners); + myListeners.push(google.maps.event.addListener(gObject, 'dragstart', function() { + return dragging = true; + })); + myListeners.push(google.maps.event.addListener(gObject, 'dragend', function() { + dragging = false; + return updateBounds(); + })); + return myListeners.push(google.maps.event.addListener(gObject, 'bounds_changed', function() { + if (dragging) { + return; + } + return updateBounds(); + })); + }; + })(this); + clear = (function(_this) { + return function() { + _this.removeEvents(myListeners); + if (listeners != null) { + _this.removeEvents(listeners); + } + return gObject.setMap(null); + }; + })(this); + if (bounds != null) { + init(); + } + this.scope.$watch('bounds', (function(newValue, oldValue) { + var isNew; + if (_.isEqual(newValue, oldValue) && (bounds != null) || dragging) { + return; + } + settingBoundsFromScope = true; + if (newValue == null) { + clear(); + return; + } + if (bounds == null) { + isNew = true; + } else { + fit(); + } + createBounds(); + gObject.setBounds(bounds); + settingBoundsFromScope = false; + if (isNew && (bounds != null)) { + return init(); + } + }), true); + this.setMyOptions = (function(_this) { + return function(newVals, oldVals) { + if (!_.isEqual(newVals, oldVals)) { + if ((bounds != null) && (newVals != null)) { + return gObject.setOptions(_this.buildOpts(bounds)); + } + } + }; + })(this); + this.props.push('bounds'); + this.watchProps(this.props); + if (this.attrs.events != null) { + listeners = this.setEvents(gObject, this.scope, this.scope); + this.scope.$watch('events', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + if (listeners != null) { + _this.removeEvents(listeners); + } + return listeners = _this.setEvents(gObject, _this.scope, _this.scope); + } + }; + })(this)); + } + this.scope.$on('$destroy', function() { + return clear(); + }); + $log.info(this); + } + + return RectangleParentModel; + + })(Builder); + } + ]); + +}).call(this); +; +/*global angular:true, google:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapSearchBoxParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapEventsHelper', function(BaseObject, Logger, EventsHelper) { + var SearchBoxParentModel; + SearchBoxParentModel = (function(superClass) { + extend(SearchBoxParentModel, superClass); + + SearchBoxParentModel.include(EventsHelper); + + function SearchBoxParentModel(scope, element, attrs, gMap, ctrlPosition, template, $log) { + var controlDiv; + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.ctrlPosition = ctrlPosition; + this.template = template; + this.$log = $log != null ? $log : Logger; + this.setVisibility = bind(this.setVisibility, this); + this.getBounds = bind(this.getBounds, this); + this.setBounds = bind(this.setBounds, this); + this.createSearchBox = bind(this.createSearchBox, this); + this.addToParentDiv = bind(this.addToParentDiv, this); + this.addAsMapControl = bind(this.addAsMapControl, this); + this.init = bind(this.init, this); + if (this.attrs.template == null) { + this.$log.error('template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!'); + return; + } + if (angular.isUndefined(this.scope.options)) { + this.scope.options = {}; + this.scope.options.visible = true; + } + if (angular.isUndefined(this.scope.options.visible)) { + this.scope.options.visible = true; + } + if (angular.isUndefined(this.scope.options.autocomplete)) { + this.scope.options.autocomplete = false; + } + this.visible = this.scope.options.visible; + this.autocomplete = this.scope.options.autocomplete; + controlDiv = angular.element('
'); + controlDiv.append(this.template); + this.input = controlDiv.find('input')[0]; + this.init(); + } + + SearchBoxParentModel.prototype.init = function() { + this.createSearchBox(); + this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (angular.isObject(newValue)) { + if (newValue.bounds != null) { + _this.setBounds(newValue.bounds); + } + if (newValue.visible != null) { + if (_this.visible !== newValue.visible) { + return _this.setVisibility(newValue.visible); + } + } + } + }; + })(this), true); + if (this.attrs.parentdiv != null) { + this.addToParentDiv(); + } else { + this.addAsMapControl(); + } + if (!this.visible) { + this.setVisibility(this.visible); + } + if (this.autocomplete) { + this.listener = google.maps.event.addListener(this.gObject, 'place_changed', (function(_this) { + return function() { + return _this.places = _this.gObject.getPlace(); + }; + })(this)); + } else { + this.listener = google.maps.event.addListener(this.gObject, 'places_changed', (function(_this) { + return function() { + return _this.places = _this.gObject.getPlaces(); + }; + })(this)); + } + this.listeners = this.setEvents(this.gObject, this.scope, this.scope); + this.$log.info(this); + this.scope.$on('$stateChangeSuccess', (function(_this) { + return function() { + if (_this.attrs.parentdiv != null) { + return _this.addToParentDiv(); + } + }; + })(this)); + return this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.gObject = null; + }; + })(this)); + }; + + SearchBoxParentModel.prototype.addAsMapControl = function() { + return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input); + }; + + SearchBoxParentModel.prototype.addToParentDiv = function() { + var ref; + this.parentDiv = angular.element(document.getElementById(this.scope.parentdiv)); + if ((ref = this.parentDiv) != null ? ref.length : void 0) { + return this.parentDiv.append(this.input); + } + }; + + SearchBoxParentModel.prototype.createSearchBox = function() { + if (this.autocomplete) { + return this.gObject = new google.maps.places.Autocomplete(this.input, this.scope.options); + } else { + return this.gObject = new google.maps.places.SearchBox(this.input, this.scope.options); + } + }; + + SearchBoxParentModel.prototype.setBounds = function(bounds) { + if (angular.isUndefined(bounds.isEmpty)) { + this.$log.error('Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.'); + } else { + if (bounds.isEmpty() === false) { + if (this.gObject != null) { + return this.gObject.setBounds(bounds); + } + } + } + }; + + SearchBoxParentModel.prototype.getBounds = function() { + return this.gObject.getBounds(); + }; + + SearchBoxParentModel.prototype.setVisibility = function(val) { + if (this.attrs.parentdiv != null) { + if (val === false) { + this.parentDiv.addClass("ng-hide"); + } else { + this.parentDiv.removeClass("ng-hide"); + } + } else { + if (val === false) { + this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear(); + } else { + this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input); + } + } + return this.visible = val; + }; + + return SearchBoxParentModel; + + })(BaseObject); + return SearchBoxParentModel; + } + ]); + +}).call(this); +; +/*global _,angular */ + + +/* + WindowsChildModel generator where there are many ChildModels to a parent. + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapWindowsParentModel', [ + 'uiGmapIWindowParentModel', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmapWindowChildModel', 'uiGmapLinked', 'uiGmap_async', 'uiGmapLogger', '$timeout', '$compile', '$http', '$templateCache', '$interpolate', 'uiGmapPromise', 'uiGmapIWindow', 'uiGmapGmapUtil', function(IWindowParentModel, ModelsWatcher, PropMap, WindowChildModel, Linked, _async, $log, $timeout, $compile, $http, $templateCache, $interpolate, uiGmapPromise, IWindow, GmapUtil) { + var WindowsParentModel; + WindowsParentModel = (function(superClass) { + extend(WindowsParentModel, superClass); + + WindowsParentModel.include(ModelsWatcher); + + function WindowsParentModel(scope, element, attrs, ctrls, gMap1, markersScope) { + this.gMap = gMap1; + this.markersScope = markersScope; + this.modelKeyComparison = bind(this.modelKeyComparison, this); + this.interpolateContent = bind(this.interpolateContent, this); + this.setChildScope = bind(this.setChildScope, this); + this.createWindow = bind(this.createWindow, this); + this.setContentKeys = bind(this.setContentKeys, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.createAllNew = bind(this.createAllNew, this); + this.watchIdKey = bind(this.watchIdKey, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.watchOurScope = bind(this.watchOurScope, this); + this.watchDestroy = bind(this.watchDestroy, this); + this.onDestroy = bind(this.onDestroy, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.doINeedToWipe = bind(this.doINeedToWipe, this); + this.watchModels = bind(this.watchModels, this); + this.go = bind(this.go, this); + WindowsParentModel.__super__.constructor.call(this, scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache); + this["interface"] = IWindow; + this.plurals = new PropMap(); + _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + return _this[name + 'Key'] = void 0; + }; + })(this)); + this.linked = new Linked(scope, element, attrs, ctrls); + this.contentKeys = void 0; + this.isIconVisibleOnClick = void 0; + this.firstTime = true; + this.firstWatchModels = true; + this.$log.info(self); + this.parentScope = void 0; + this.go(scope); + } + + WindowsParentModel.prototype.go = function(scope) { + this.watchOurScope(scope); + this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; + scope.$watch('doRebuildAll', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.doRebuildAll = newValue; + } + }; + })(this)); + return this.createChildScopes(); + }; + + WindowsParentModel.prototype.watchModels = function(scope) { + var itemToWatch; + itemToWatch = this.markersScope != null ? 'pluralsUpdate' : 'models'; + return scope.$watch(itemToWatch, (function(_this) { + return function(newValue, oldValue) { + var doScratch; + if (!_.isEqual(newValue, oldValue) || _this.firstWatchModels) { + _this.firstWatchModels = false; + if (_this.doRebuildAll || _this.doINeedToWipe(scope.models)) { + return _this.rebuildAll(scope, true, true); + } else { + doScratch = _this.plurals.length === 0; + if (_this.existingPieces != null) { + return _.last(_this.existingPieces._content).then(function() { + return _this.createChildScopes(doScratch); + }); + } else { + return _this.createChildScopes(doScratch); + } + } + } + }; + })(this), true); + }; + + WindowsParentModel.prototype.doINeedToWipe = function(newValue) { + var newValueIsEmpty; + newValueIsEmpty = newValue != null ? newValue.length === 0 : true; + return this.plurals.length > 0 && newValueIsEmpty; + }; + + WindowsParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { + return this.onDestroy(doDelete).then((function(_this) { + return function() { + if (doCreate) { + return _this.createChildScopes(); + } + }; + })(this)); + }; + + WindowsParentModel.prototype.onDestroy = function(scope) { + WindowsParentModel.__super__.onDestroy.call(this, this.scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.plurals.values(), function(child) { + return child.destroy(true); + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + var ref; + return (ref = _this.plurals) != null ? ref.removeAll() : void 0; + }); + }; + })(this)); + }; + + WindowsParentModel.prototype.watchDestroy = function(scope) { + return scope.$on('$destroy', (function(_this) { + return function() { + _this.firstWatchModels = true; + _this.firstTime = true; + return _this.rebuildAll(scope, false, true); + }; + })(this)); + }; + + WindowsParentModel.prototype.watchOurScope = function(scope) { + return _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + var nameKey; + nameKey = name + 'Key'; + return _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; + }; + })(this)); + }; + + WindowsParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + var modelsNotDefined, ref, ref1; + if (isCreatingFromScratch == null) { + isCreatingFromScratch = true; + } + + /* + being that we cannot tell the difference in Key String vs. a normal value string (TemplateUrl) + we will assume that all scope values are string expressions either pointing to a key (propName) or using + 'self' to point the model as container/object of interest. + + This may force redundant information into the model, but this appears to be the most flexible approach. + */ + this.isIconVisibleOnClick = true; + if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) { + this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick; + } + modelsNotDefined = angular.isUndefined(this.linked.scope.models); + if (modelsNotDefined && (this.markersScope === void 0 || (((ref = this.markersScope) != null ? ref.plurals : void 0) === void 0 || ((ref1 = this.markersScope) != null ? ref1.models : void 0) === void 0))) { + this.$log.error('No models to create windows from! Need direct models or models derived from markers!'); + return; + } + if (this.gMap != null) { + if (this.linked.scope.models != null) { + this.watchIdKey(this.linked.scope); + if (isCreatingFromScratch) { + return this.createAllNew(this.linked.scope, false); + } else { + return this.pieceMeal(this.linked.scope, false); + } + } else { + this.parentScope = this.markersScope; + this.watchIdKey(this.parentScope); + if (isCreatingFromScratch) { + return this.createAllNew(this.markersScope, true, 'plurals', false); + } else { + return this.pieceMeal(this.markersScope, true, 'plurals', false); + } + } + } + }; + + WindowsParentModel.prototype.watchIdKey = function(scope) { + this.setIdKey(scope); + return scope.$watch('idKey', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && (newValue == null)) { + _this.idKey = newValue; + return _this.rebuildAll(scope, true, true); + } + }; + })(this)); + }; + + WindowsParentModel.prototype.createAllNew = function(scope, hasGMarker, modelsPropToIterate, isArray) { + var maybeCanceled; + if (modelsPropToIterate == null) { + modelsPropToIterate = 'models'; + } + if (isArray == null) { + isArray = false; + } + if (this.firstTime) { + this.watchModels(scope); + this.watchDestroy(scope); + } + this.setContentKeys(scope.models); + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.each(scope.models, function(model) { + var gMarker, ref; + gMarker = hasGMarker ? (ref = _this.getItem(scope, modelsPropToIterate, model[_this.idKey])) != null ? ref.gObject : void 0 : void 0; + if (!maybeCanceled) { + if (!gMarker && _this.markersScope) { + $log.error('Unable to get gMarker from markersScope!'); + } + _this.createWindow(model, gMarker, _this.gMap); + } + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + return _this.firstTime = false; + }); + }; + })(this)); + }; + + WindowsParentModel.prototype.pieceMeal = function(scope, hasGMarker, modelsPropToIterate, isArray) { + var maybeCanceled, payload; + if (modelsPropToIterate == null) { + modelsPropToIterate = 'models'; + } + if (isArray == null) { + isArray = true; + } + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + if ((scope != null) && this.modelsLength() && this.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise((function() { + return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison); + })).then(function(state) { + payload = state; + return _async.each(payload.removals, function(child) { + if (child != null) { + _this.plurals.remove(child.id); + if (child.destroy != null) { + child.destroy(true); + } + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + var gMarker, ref; + gMarker = (ref = _this.getItem(scope, modelsPropToIterate, modelToAdd[_this.idKey])) != null ? ref.gObject : void 0; + if (!gMarker) { + throw 'Gmarker undefined'; + } + _this.createWindow(modelToAdd, gMarker, _this.gMap); + return maybeCanceled; + }); + }).then(function() { + return _async.each(payload.updates, function(update) { + _this.updateChild(update.child, update.model); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }); + }; + })(this)); + } else { + $log.debug('pieceMeal: rebuildAll'); + return this.rebuildAll(this.scope, true, true); + } + }; + + WindowsParentModel.prototype.setContentKeys = function(models) { + if (this.modelsLength(models)) { + return this.contentKeys = Object.keys(models[0]); + } + }; + + WindowsParentModel.prototype.createWindow = function(model, gMarker, gMap) { + var child, childScope, fakeElement, opts, ref, ref1; + childScope = this.linked.scope.$new(false); + this.setChildScope(childScope, model); + childScope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.setChildScope(childScope, newValue); + } + }; + })(this), true); + fakeElement = { + html: (function(_this) { + return function() { + return _this.interpolateContent(_this.linked.element.html(), model); + }; + })(this) + }; + this.DEFAULTS = this.scopeOrModelVal(this.optionsKey, this.scope, model) || {}; + opts = this.createWindowOptions(gMarker, childScope, fakeElement.html(), this.DEFAULTS); + child = new WindowChildModel({ + model: model, + scope: childScope, + opts: opts, + isIconVisibleOnClick: this.isIconVisibleOnClick, + gMap: gMap, + markerScope: (ref = this.markersScope) != null ? (ref1 = ref.plurals.get(model[this.idKey])) != null ? ref1.scope : void 0 : void 0, + element: fakeElement, + needToManualDestroy: false, + markerIsVisibleAfterWindowClose: true, + isScopeModel: true + }); + if (model[this.idKey] == null) { + this.$log.error('Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.'); + return; + } + this.plurals.put(model[this.idKey], child); + return child; + }; + + WindowsParentModel.prototype.setChildScope = function(childScope, model) { + _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + var nameKey, newValue; + nameKey = name + 'Key'; + newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; + if (newValue !== childScope[name]) { + return childScope[name] = newValue; + } + }; + })(this)); + return childScope.model = model; + }; + + WindowsParentModel.prototype.interpolateContent = function(content, model) { + var exp, i, interpModel, key, len, ref; + if (this.contentKeys === void 0 || this.contentKeys.length === 0) { + return; + } + exp = $interpolate(content); + interpModel = {}; + ref = this.contentKeys; + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + interpModel[key] = model[key]; + } + return exp(interpModel); + }; + + WindowsParentModel.prototype.modelKeyComparison = function(model1, model2) { + var isEqual, scope; + scope = this.scope.coords != null ? this.scope : this.parentScope; + if (scope == null) { + throw 'No scope or parentScope set!'; + } + isEqual = GmapUtil.equalCoords(this.evalModelHandle(model1, scope.coords), this.evalModelHandle(model2, scope.coords)); + if (!isEqual) { + return isEqual; + } + isEqual = _.every(_.without(this["interface"].scopeKeys, 'coords'), (function(_this) { + return function(k) { + return _this.evalModelHandle(model1, scope[k]) === _this.evalModelHandle(model2, scope[k]); + }; + })(this)); + return isEqual; + }; + + return WindowsParentModel; + + })(IWindowParentModel); + return WindowsParentModel; + } + ]); + +}).call(this); +; +/*global angular, _ */ + +(function() { + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle", [ + "uiGmapICircle", "uiGmapCircleParentModel", function(ICircle, CircleParentModel) { + return _.extend(ICircle, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(gMap) { + return new CircleParentModel(scope, element, attrs, gMap); + }); + } + }); + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl", [ + "uiGmapIControl", "$http", "$templateCache", "$compile", "$controller", 'uiGmapGoogleMapApi', function(IControl, $http, $templateCache, $compile, $controller, GoogleMapApi) { + var Control; + return Control = (function(superClass) { + extend(Control, superClass); + + function Control() { + this.link = bind(this.link, this); + Control.__super__.constructor.call(this); + } + + Control.prototype.transclude = true; + + Control.prototype.link = function(scope, element, attrs, ctrl, transclude) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var hasTranscludedContent, index, position, transcludedContent; + transcludedContent = transclude(); + hasTranscludedContent = transclude().length > 0; + if (!hasTranscludedContent && angular.isUndefined(scope.template)) { + _this.$log.error('mapControl: could not find a valid template property or elements for transclusion'); + return; + } + index = angular.isDefined(scope.index && !isNaN(parseInt(scope.index))) ? parseInt(scope.index) : void 0; + position = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_CENTER'; + if (!maps.ControlPosition[position]) { + _this.$log.error('mapControl: invalid position property'); + return; + } + return IControl.mapPromise(scope, ctrl).then(function(map) { + var control, controlDiv, pushControl; + control = void 0; + controlDiv = angular.element('
'); + pushControl = function(map, control, index) { + if (index) { + control[0].index = index; + } + return map.controls[google.maps.ControlPosition[position]].push(control[0]); + }; + if (hasTranscludedContent) { + return transclude(function(transcludeEl) { + controlDiv.append(transcludeEl); + return pushControl(map, controlDiv, index); + }); + } else { + return $http.get(scope.template, { + cache: $templateCache + }).success(function(template) { + var templateCtrl, templateScope; + templateScope = scope.$new(); + controlDiv.append(template); + if (angular.isDefined(scope.controller)) { + templateCtrl = $controller(scope.controller, { + $scope: templateScope + }); + controlDiv.children().data('$ngControllerController', templateCtrl); + } + return control = $compile(controlDiv.children())(templateScope); + }).error(function(error) { + return _this.$log.error('mapControl: template could not be found'); + }).then(function() { + return pushControl(map, control, index); + }); + } + }); + }; + })(this)); + }; + + return Control; + + })(IControl); + } + ]); + +}).call(this); +; +/*globals angular, _ */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapDragZoom', [ + 'uiGmapCtrlHandle', 'uiGmapPropertyAction', function(CtrlHandle, PropertyAction) { + return { + restrict: 'EMA', + transclude: true, + template: '', + require: '^' + 'uiGmapGoogleMap', + scope: { + keyboardkey: '=', + options: '=', + spec: '=' + }, + controller: [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'uiGmapDragZoom'; + return _.extend(this, CtrlHandle.handle($scope, $element)); + } + ], + link: function(scope, element, attrs, ctrl) { + return CtrlHandle.mapPromise(scope, ctrl).then(function(map) { + var enableKeyDragZoom, setKeyAction, setOptionsAction; + enableKeyDragZoom = function(opts) { + return map.enableKeyDragZoom(opts); + }; + setKeyAction = new PropertyAction(function(key, newVal) { + if (newVal) { + return enableKeyDragZoom({ + key: newVal + }); + } else { + return enableKeyDragZoom(); + } + }); + setOptionsAction = new PropertyAction(function(key, newVal) { + if (newVal) { + return enableKeyDragZoom(newVal); + } + }); + scope.$watch('keyboardkey', setKeyAction.sic('keyboardkey')); + setKeyAction.sic(scope.keyboardkey); + scope.$watch('options', setOptionsAction.sic('options')); + return setOptionsAction.sic(scope.options); + }); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager", [ + "uiGmapIDrawingManager", "uiGmapDrawingManagerParentModel", function(IDrawingManager, DrawingManagerParentModel) { + return _.extend(IDrawingManager, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(map) { + return new DrawingManagerParentModel(scope, element, attrs, map); + }); + } + }); + } + ]); + +}).call(this); +; +/* + - Link up Polygons to be sent back to a controller + - inject the draw function into a controllers scope so that controller can call the directive to draw on demand + - draw function creates the DrawFreeHandChildModel which manages itself + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapApiFreeDrawPolygons', [ + 'uiGmapLogger', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapDrawFreeHandChildModel', 'uiGmapLodash', function($log, BaseObject, CtrlHandle, DrawFreeHandChildModel, uiGmapLodash) { + var FreeDrawPolygons; + return FreeDrawPolygons = (function(superClass) { + extend(FreeDrawPolygons, superClass); + + function FreeDrawPolygons() { + this.link = bind(this.link, this); + return FreeDrawPolygons.__super__.constructor.apply(this, arguments); + } + + FreeDrawPolygons.include(CtrlHandle); + + FreeDrawPolygons.prototype.restrict = 'EMA'; + + FreeDrawPolygons.prototype.replace = true; + + FreeDrawPolygons.prototype.require = '^' + 'uiGmapGoogleMap'; + + FreeDrawPolygons.prototype.scope = { + polygons: '=', + draw: '=' + }; + + FreeDrawPolygons.prototype.link = function(scope, element, attrs, ctrl) { + return this.mapPromise(scope, ctrl).then((function(_this) { + return function(map) { + var freeHand, listener; + if (!scope.polygons) { + return $log.error('No polygons to bind to!'); + } + if (!_.isArray(scope.polygons)) { + return $log.error('Free Draw Polygons must be of type Array!'); + } + freeHand = new DrawFreeHandChildModel(map, ctrl.getScope()); + listener = void 0; + return scope.draw = function() { + if (typeof listener === "function") { + listener(); + } + return freeHand.engage(scope.polygons).then(function() { + var firstTime; + firstTime = true; + return listener = scope.$watchCollection('polygons', function(newValue, oldValue) { + var removals; + if (firstTime || newValue === oldValue) { + firstTime = false; + return; + } + removals = uiGmapLodash.differenceObjects(oldValue, newValue); + return removals.forEach(function(p) { + return p.setMap(null); + }); + }); + }); + }; + }; + })(this)); + }; + + return FreeDrawPolygons; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle", [ + function() { + var DEFAULTS; + DEFAULTS = {}; + return { + restrict: "EA", + replace: true, + require: '^' + 'uiGmapGoogleMap', + scope: { + center: "=center", + radius: "=radius", + stroke: "=stroke", + fill: "=fill", + clickable: "=", + draggable: "=", + editable: "=", + geodesic: "=", + icons: "=icons", + visible: "=", + events: "=", + control: "=", + zIndex: "=zindex" + } + }; + } + ]); + +}).call(this); +; +/* + - interface for all controls to derive from + - to enforce a minimum set of requirements + - attributes + - template + - position + - controller + - index + */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl", [ + "uiGmapBaseObject", "uiGmapLogger", "uiGmapCtrlHandle", function(BaseObject, Logger, CtrlHandle) { + var IControl; + return IControl = (function(superClass) { + extend(IControl, superClass); + + IControl.extend(CtrlHandle); + + function IControl() { + this.restrict = 'EA'; + this.replace = true; + this.require = '^' + 'uiGmapGoogleMap'; + this.scope = { + template: '@template', + position: '@position', + controller: '@controller', + index: '@index' + }; + this.$log = Logger; + } + + IControl.prototype.link = function(scope, element, attrs, ctrl) { + throw new Exception("Not implemented!!"); + }; + + return IControl; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIDrawingManager', [ + function() { + return { + restrict: 'EA', + replace: true, + require: '^' + 'uiGmapGoogleMap', + scope: { + "static": '@', + control: '=', + options: '=', + events: '=' + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIMarker', [ + 'uiGmapBaseObject', 'uiGmapCtrlHandle', function(BaseObject, CtrlHandle) { + var IMarker; + return IMarker = (function(superClass) { + extend(IMarker, superClass); + + IMarker.scope = { + coords: '=coords', + icon: '=icon', + click: '&click', + options: '=options', + events: '=events', + fit: '=fit', + idKey: '=idkey', + control: '=control' + }; + + IMarker.scopeKeys = _.keys(IMarker.scope); + + IMarker.keys = IMarker.scopeKeys; + + IMarker.extend(CtrlHandle); + + function IMarker() { + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.replace = true; + this.scope = _.extend(this.scope || {}, IMarker.scope); + } + + return IMarker; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolygon', [ + 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) { + var IPolygon; + return IPolygon = (function(superClass) { + extend(IPolygon, superClass); + + IPolygon.scope = { + path: '=path', + stroke: '=stroke', + clickable: '=', + draggable: '=', + editable: '=', + geodesic: '=', + fill: '=', + icons: '=icons', + visible: '=', + "static": '=', + events: '=', + zIndex: '=zindex', + fit: '=', + control: '=control' + }; + + IPolygon.scopeKeys = _.keys(IPolygon.scope); + + IPolygon.include(GmapUtil); + + IPolygon.extend(CtrlHandle); + + function IPolygon() {} + + IPolygon.prototype.restrict = 'EMA'; + + IPolygon.prototype.replace = true; + + IPolygon.prototype.require = '^' + 'uiGmapGoogleMap'; + + IPolygon.prototype.scope = IPolygon.scope; + + IPolygon.prototype.DEFAULTS = {}; + + IPolygon.prototype.$log = Logger; + + return IPolygon; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolyline', [ + 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) { + var IPolyline; + return IPolyline = (function(superClass) { + extend(IPolyline, superClass); + + IPolyline.scope = { + path: '=', + stroke: '=', + clickable: '=', + draggable: '=', + editable: '=', + geodesic: '=', + icons: '=', + visible: '=', + "static": '=', + fit: '=', + events: '=', + zIndex: '=zindex' + }; + + IPolyline.scopeKeys = _.keys(IPolyline.scope); + + IPolyline.include(GmapUtil); + + IPolyline.extend(CtrlHandle); + + function IPolyline() {} + + IPolyline.prototype.restrict = 'EMA'; + + IPolyline.prototype.replace = true; + + IPolyline.prototype.require = '^' + 'uiGmapGoogleMap'; + + IPolyline.prototype.scope = IPolyline.scope; + + IPolyline.prototype.DEFAULTS = {}; + + IPolyline.prototype.$log = Logger; + + return IPolyline; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIRectangle', [ + function() { + 'use strict'; + var DEFAULTS; + DEFAULTS = {}; + return { + restrict: 'EMA', + require: '^' + 'uiGmapGoogleMap', + replace: true, + scope: { + bounds: '=', + stroke: '=', + clickable: '=', + draggable: '=', + editable: '=', + fill: '=', + visible: '=', + events: '=' + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIWindow', [ + 'uiGmapBaseObject', 'uiGmapChildEvents', 'uiGmapCtrlHandle', function(BaseObject, ChildEvents, CtrlHandle) { + var IWindow; + return IWindow = (function(superClass) { + extend(IWindow, superClass); + + IWindow.scope = { + coords: '=coords', + template: '=template', + templateUrl: '=templateurl', + templateParameter: '=templateparameter', + isIconVisibleOnClick: '=isiconvisibleonclick', + closeClick: '&closeclick', + options: '=options', + control: '=control', + show: '=show' + }; + + IWindow.scopeKeys = _.keys(IWindow.scope); + + IWindow.include(ChildEvents); + + IWindow.extend(CtrlHandle); + + function IWindow() { + this.restrict = 'EMA'; + this.template = void 0; + this.transclude = true; + this.priority = -100; + this.require = '^' + 'uiGmapGoogleMap'; + this.replace = true; + this.scope = _.extend(this.scope || {}, IWindow.scope); + } + + return IWindow; + + })(BaseObject); + } + ]); + +}).call(this); +; +/*globals angular,_,google */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', ['$timeout', '$q', '$log', 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapIsReady', 'uiGmapuuid', 'uiGmapExtendGWin', 'uiGmapExtendMarkerClusterer', 'uiGmapGoogleMapsUtilV3', 'uiGmapGoogleMapApi', 'uiGmapEventsHelper', 'uiGmapGoogleMapObjectManager', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) { + var DEFAULTS, Map, initializeItems; + DEFAULTS = void 0; + initializeItems = [uiGmapGoogleMapsUtilV3, uiGmapExtendGWin, uiGmapExtendMarkerClusterer]; + return Map = (function(superClass) { + extend(Map, superClass); + + Map.include(uiGmapGmapUtil); + + function Map() { + this.link = bind(this.link, this); + var ctrlFn; + ctrlFn = function($scope) { + var ctrlObj, retCtrl; + retCtrl = void 0; + $scope.$on('$destroy', function() { + return uiGmapIsReady.decrement(); + }); + ctrlObj = uiGmapCtrlHandle.handle($scope); + $scope.ctrlType = 'Map'; + $scope.deferred.promise.then(function() { + return initializeItems.forEach(function(i) { + return i.init(); + }); + }); + ctrlObj.getMap = function() { + return $scope.map; + }; + retCtrl = _.extend(this, ctrlObj); + return retCtrl; + }; + this.controller = ['$scope', ctrlFn]; + } + + Map.prototype.restrict = 'EMA'; + + Map.prototype.transclude = true; + + Map.prototype.replace = false; + + Map.prototype.template = "
\n
"; + + Map.prototype.scope = { + center: '=', + zoom: '=', + dragging: '=', + control: '=', + options: '=', + events: '=', + eventOpts: '=', + styles: '=', + bounds: '=', + update: '=' + }; + + Map.prototype.link = function(scope, element, attrs) { + var listeners; + listeners = []; + scope.$on('$destroy', function() { + uiGmapEventsHelper.removeEvents(listeners); + if (attrs.recycleMapInstance === 'true' && scope.map) { + uiGmapGoogleMapObjectManager.recycleMapInstance(scope.map); + return scope.map = null; + } + }); + scope.idleAndZoomChanged = false; + return uiGmapGoogleMapApi.then((function(_this) { + return function(maps) { + var _gMap, customListeners, disabledEvents, dragging, el, eventName, getEventHandler, mapOptions, maybeHookToEvent, opts, ref, resolveSpawned, settingFromDirective, spawned, type, updateCenter, zoomPromise; + DEFAULTS = { + mapTypeId: maps.MapTypeId.ROADMAP + }; + spawned = uiGmapIsReady.spawn(); + resolveSpawned = function() { + return spawned.deferred.resolve({ + instance: spawned.instance, + map: _gMap + }); + }; + if (!angular.isDefined(scope.center) && !angular.isDefined(scope.bounds)) { + $log.error('angular-google-maps: a center or bounds property is required'); + return; + } + if (!angular.isDefined(scope.center)) { + scope.center = new google.maps.LatLngBounds(_this.getCoords(scope.bounds.southwest), _this.getCoords(scope.bounds.northeast)).getCenter(); + } + if (!angular.isDefined(scope.zoom)) { + scope.zoom = 10; + } + el = angular.element(element); + el.addClass('angular-google-map'); + opts = { + options: {} + }; + if (attrs.options) { + opts.options = scope.options; + } + if (attrs.styles) { + opts.styles = scope.styles; + } + if (attrs.type) { + type = attrs.type.toUpperCase(); + if (google.maps.MapTypeId.hasOwnProperty(type)) { + opts.mapTypeId = google.maps.MapTypeId[attrs.type.toUpperCase()]; + } else { + $log.error("angular-google-maps: invalid map type '" + attrs.type + "'"); + } + } + mapOptions = angular.extend({}, DEFAULTS, opts, { + center: _this.getCoords(scope.center), + zoom: scope.zoom, + bounds: scope.bounds + }); + if (attrs.recycleMapInstance === 'true') { + _gMap = uiGmapGoogleMapObjectManager.createMapInstance(el.find('div')[1], mapOptions); + } else { + _gMap = new google.maps.Map(el.find('div')[1], mapOptions); + } + _gMap['uiGmap_id'] = uiGmapuuid.generate(); + dragging = false; + listeners.push(google.maps.event.addListenerOnce(_gMap, 'idle', function() { + scope.deferred.resolve(_gMap); + return resolveSpawned(); + })); + disabledEvents = attrs.events && (((ref = scope.events) != null ? ref.blacklist : void 0) != null) ? scope.events.blacklist : []; + if (_.isString(disabledEvents)) { + disabledEvents = [disabledEvents]; + } + maybeHookToEvent = function(eventName, fn, prefn) { + if (!_.includes(disabledEvents, eventName)) { + if (prefn) { + prefn(); + } + return listeners.push(google.maps.event.addListener(_gMap, eventName, function() { + var ref1; + if (!((ref1 = scope.update) != null ? ref1.lazy : void 0)) { + return fn(); + } + })); + } + }; + if (!_.includes(disabledEvents, 'all')) { + maybeHookToEvent('dragstart', function() { + dragging = true; + return scope.$evalAsync(function(s) { + if (s.dragging != null) { + return s.dragging = dragging; + } + }); + }); + maybeHookToEvent('dragend', function() { + dragging = false; + return scope.$evalAsync(function(s) { + if (s.dragging != null) { + return s.dragging = dragging; + } + }); + }); + updateCenter = function(c, s) { + if (c == null) { + c = _gMap.center; + } + if (s == null) { + s = scope; + } + if (_.includes(disabledEvents, 'center')) { + if (s.center.latitude !== c.lat()) { + s.center.latitude = c.lat(); + } + if (s.center.longitude !== c.lng()) { + return s.center.longitude = c.lng(); + } + } + }; + settingFromDirective = false; + maybeHookToEvent('idle', function() { + var b, ne, sw; + b = _gMap.getBounds(); + ne = b.getNorthEast(); + sw = b.getSouthWest(); + settingFromDirective = true; + return scope.$evalAsync(function(s) { + updateCenter(); + if (!_.isUndefined(s.bounds) && !_.includes(disabledEvents, 'bounds')) { + s.bounds.northeast = { + latitude: ne.lat(), + longitude: ne.lng() + }; + s.bounds.southwest = { + latitude: sw.lat(), + longitude: sw.lng() + }; + } + if (!_.includes(disabledEvents, 'zoom')) { + s.zoom = _gMap.zoom; + scope.idleAndZoomChanged = !scope.idleAndZoomChanged; + } + return settingFromDirective = false; + }); + }); + } + if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { + getEventHandler = function(eventName) { + return function() { + return scope.events[eventName].apply(scope, [_gMap, eventName, arguments]); + }; + }; + customListeners = []; + for (eventName in scope.events) { + if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) { + customListeners.push(google.maps.event.addListener(_gMap, eventName, getEventHandler(eventName))); + } + } + listeners.concat(customListeners); + } + _gMap.getOptions = function() { + return mapOptions; + }; + scope.map = _gMap; + if ((attrs.control != null) && (scope.control != null)) { + scope.control.refresh = function(maybeCoords) { + var coords, ref1, ref2; + if (_gMap == null) { + return; + } + if (((typeof google !== "undefined" && google !== null ? (ref1 = google.maps) != null ? (ref2 = ref1.event) != null ? ref2.trigger : void 0 : void 0 : void 0) != null) && (_gMap != null)) { + google.maps.event.trigger(_gMap, 'resize'); + } + if (((maybeCoords != null ? maybeCoords.latitude : void 0) != null) && ((maybeCoords != null ? maybeCoords.longitude : void 0) != null)) { + coords = _this.getCoords(maybeCoords); + if (_this.isTrue(attrs.pan)) { + return _gMap.panTo(coords); + } else { + return _gMap.setCenter(coords); + } + } + }; + scope.control.getGMap = function() { + return _gMap; + }; + scope.control.getMapOptions = function() { + return mapOptions; + }; + scope.control.getCustomEventListeners = function() { + return customListeners; + }; + scope.control.removeEvents = function(yourListeners) { + return uiGmapEventsHelper.removeEvents(yourListeners); + }; + } + scope.$watch('center', function(newValue, oldValue) { + var coords; + if (newValue === oldValue || settingFromDirective) { + return; + } + coords = _this.getCoords(scope.center); + if (coords.lat() === _gMap.center.lat() && coords.lng() === _gMap.center.lng()) { + return; + } + if (!dragging) { + if (!_this.validateCoords(newValue)) { + $log.error("Invalid center for newValue: " + (JSON.stringify(newValue))); + } + if (_this.isTrue(attrs.pan) && scope.zoom === _gMap.zoom) { + return _gMap.panTo(coords); + } else { + return _gMap.setCenter(coords); + } + } + }, true); + zoomPromise = null; + scope.$watch('zoom', function(newValue, oldValue) { + var ref1, ref2; + if (newValue == null) { + return; + } + if (_.isEqual(newValue, oldValue) || (_gMap != null ? _gMap.getZoom() : void 0) === (scope != null ? scope.zoom : void 0) || settingFromDirective) { + return; + } + if (zoomPromise != null) { + $timeout.cancel(zoomPromise); + } + return zoomPromise = $timeout(function() { + return _gMap.setZoom(newValue); + }, ((ref1 = scope.eventOpts) != null ? (ref2 = ref1.debounce) != null ? ref2.zoomMs : void 0 : void 0) + 20, false); + }); + scope.$watch('bounds', function(newValue, oldValue) { + var bounds, ne, ref1, ref2, ref3, ref4, sw; + if (newValue === oldValue) { + return; + } + if (((newValue != null ? (ref1 = newValue.northeast) != null ? ref1.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref2 = newValue.northeast) != null ? ref2.longitude : void 0 : void 0) == null) || ((newValue != null ? (ref3 = newValue.southwest) != null ? ref3.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref4 = newValue.southwest) != null ? ref4.longitude : void 0 : void 0) == null)) { + $log.error("Invalid map bounds for new value: " + (JSON.stringify(newValue))); + return; + } + ne = new google.maps.LatLng(newValue.northeast.latitude, newValue.northeast.longitude); + sw = new google.maps.LatLng(newValue.southwest.latitude, newValue.southwest.longitude); + bounds = new google.maps.LatLngBounds(sw, ne); + return _gMap.fitBounds(bounds); + }); + return ['options', 'styles'].forEach(function(toWatch) { + return scope.$watch(toWatch, function(newValue, oldValue) { + if (_.isEqual(newValue, oldValue)) { + return; + } + if (toWatch === 'options') { + opts.options = newValue; + } else { + opts.options[toWatch] = newValue; + } + if (_gMap != null) { + return _gMap.setOptions(opts); + } + }, true); + }); + }; + })(this)); + }; + + return Map; + + })(uiGmapBaseObject); + }]); + +}).call(this); +; +/*global _:true,angular:true */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker", [ + "uiGmapIMarker", "uiGmapMarkerChildModel", "uiGmapMarkerManager", "uiGmapLogger", function(IMarker, MarkerChildModel, MarkerManager, $log) { + var Marker; + return Marker = (function(superClass) { + extend(Marker, superClass); + + function Marker() { + Marker.__super__.constructor.call(this); + this.template = ''; + $log.info(this); + } + + Marker.prototype.controller = [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'Marker'; + return _.extend(this, IMarker.handle($scope, $element)); + } + ]; + + Marker.prototype.link = function(scope, element, attrs, ctrl) { + var mapPromise; + mapPromise = IMarker.mapPromise(scope, ctrl); + mapPromise.then(function(gMap) { + var gManager, keys, m; + gManager = new MarkerManager(gMap); + keys = _.object(IMarker.keys, IMarker.keys); + m = new MarkerChildModel({ + scope: scope, + model: scope, + keys: keys, + gMap: gMap, + doClick: true, + gManager: gManager, + doDrawSelf: false, + trackModel: false + }); + m.deferred.promise.then(function(gMarker) { + return scope.deferred.resolve(gMarker); + }); + if (scope.control != null) { + return scope.control.getGMarkers = gManager.getGMarkers; + } + }); + return scope.$on('$destroy', function() { + var gManager; + if (typeof gManager !== "undefined" && gManager !== null) { + gManager.clear(); + } + return gManager = null; + }); + }; + + return Marker; + + })(IMarker); + } + ]); + +}).call(this); +; +/*global _:true,angular:true */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers", [ + "uiGmapIMarker", "uiGmapPlural", "uiGmapMarkersParentModel", "uiGmap_sync", "uiGmapLogger", function(IMarker, Plural, MarkersParentModel, _sync, $log) { + var Markers; + return Markers = (function(superClass) { + extend(Markers, superClass); + + function Markers() { + Markers.__super__.constructor.call(this); + this.template = ''; + Plural.extend(this, { + doCluster: '=?docluster', + clusterOptions: '=clusteroptions', + clusterEvents: '=clusterevents', + modelsByRef: '=modelsbyref', + type: '=?type', + typeOptions: '=?typeoptions', + typeEvents: '=?typeevents' + }); + $log.info(this); + } + + Markers.prototype.controller = [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'Markers'; + return _.extend(this, IMarker.handle($scope, $element)); + } + ]; + + Markers.prototype.link = function(scope, element, attrs, ctrl) { + var parentModel, ready; + parentModel = void 0; + ready = function() { + return scope.deferred.resolve(); + }; + return IMarker.mapPromise(scope, ctrl).then(function(map) { + var mapScope; + mapScope = ctrl.getScope(); + mapScope.$watch('idleAndZoomChanged', function() { + return _.defer(parentModel.gManager.draw); + }); + parentModel = new MarkersParentModel(scope, element, attrs, map); + Plural.link(scope, parentModel); + if (scope.control != null) { + scope.control.getGMarkers = function() { + var ref; + return (ref = parentModel.gManager) != null ? ref.getGMarkers() : void 0; + }; + scope.control.getChildMarkers = function() { + return parentModel.plurals; + }; + } + return _.last(parentModel.existingPieces._content).then(function() { + return ready(); + }); + }); + }; + + return Markers; + + })(IMarker); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapPlural', [ + function() { + var _initControl; + _initControl = function(scope, parent) { + if (scope.control == null) { + return; + } + scope.control.updateModels = function(models) { + scope.models = models; + return parent.createChildScopes(false); + }; + scope.control.newModels = function(models) { + scope.models = models; + return parent.rebuildAll(scope, true, true); + }; + scope.control.clean = function() { + return parent.rebuildAll(scope, false, true); + }; + scope.control.getPlurals = function() { + return parent.plurals; + }; + scope.control.getManager = function() { + return parent.gManager; + }; + scope.control.hasManager = function() { + return (parent.gManager != null) === true; + }; + return scope.control.managerDraw = function() { + var ref; + if (scope.control.hasManager()) { + return (ref = scope.control.getManager()) != null ? ref.draw() : void 0; + } + }; + }; + return { + extend: function(obj, obj2) { + return _.extend(obj.scope || {}, obj2 || {}, { + idKey: '=idkey', + doRebuildAll: '=dorebuildall', + models: '=models', + chunk: '=chunk', + cleanchunk: '=cleanchunk', + control: '=control' + }); + }, + link: function(scope, parent) { + return _initControl(scope, parent); + } + }; + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygon', [ + 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonChildModel', function(IPolygon, $timeout, PolygonChild) { + var Polygon; + return Polygon = (function(superClass) { + extend(Polygon, superClass); + + function Polygon() { + this.link = bind(this.link, this); + return Polygon.__super__.constructor.apply(this, arguments); + } + + Polygon.prototype.link = function(scope, element, attrs, mapCtrl) { + var children, promise; + children = []; + promise = IPolygon.mapPromise(scope, mapCtrl); + if (scope.control != null) { + scope.control.getInstance = this; + scope.control.polygons = children; + scope.control.promise = promise; + } + return promise.then((function(_this) { + return function(gMap) { + return children.push(new PolygonChild({ + scope: scope, + attrs: attrs, + gMap: gMap, + defaults: _this.DEFAULTS + })); + }; + })(this)); + }; + + return Polygon; + + })(IPolygon); + } + ]); + +}).call(this); +; +/*global angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygons', [ + 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonsParentModel', 'uiGmapPlural', function(Interface, $timeout, ParentModel, Plural) { + var Polygons; + return Polygons = (function(superClass) { + extend(Polygons, superClass); + + function Polygons() { + this.link = bind(this.link, this); + Polygons.__super__.constructor.call(this); + Plural.extend(this); + this.$log.info(this); + } + + Polygons.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + if (angular.isUndefined(scope.path) || scope.path === null) { + _this.$log.warn('polygons: no valid path attribute found'); + } + if (!scope.models) { + _this.$log.warn('polygons: no models found to create from'); + } + return Plural.link(scope, new ParentModel(scope, element, attrs, map, _this.DEFAULTS)); + }; + })(this)); + }; + + return Polygons; + + })(Interface); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolyline', [ + 'uiGmapIPolyline', '$timeout', 'uiGmapPolylineChildModel', function(IPolyline, $timeout, PolylineChildModel) { + var Polyline; + return Polyline = (function(superClass) { + extend(Polyline, superClass); + + function Polyline() { + this.link = bind(this.link, this); + return Polyline.__super__.constructor.apply(this, arguments); + } + + Polyline.prototype.link = function(scope, element, attrs, mapCtrl) { + return IPolyline.mapPromise(scope, mapCtrl).then((function(_this) { + return function(gMap) { + if (angular.isUndefined(scope.path) || scope.path === null || !_this.validatePath(scope.path)) { + _this.$log.warn('polyline: no valid path attribute found'); + } + return new PolylineChildModel({ + scope: scope, + attrs: attrs, + gMap: gMap, + defaults: _this.DEFAULTS + }); + }; + })(this)); + }; + + return Polyline; + + })(IPolyline); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylines', [ + 'uiGmapIPolyline', '$timeout', 'uiGmapPolylinesParentModel', 'uiGmapPlural', function(IPolyline, $timeout, PolylinesParentModel, Plural) { + var Polylines; + return Polylines = (function(superClass) { + extend(Polylines, superClass); + + function Polylines() { + this.link = bind(this.link, this); + Polylines.__super__.constructor.call(this); + Plural.extend(this); + this.$log.info(this); + } + + Polylines.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(gMap) { + if (angular.isUndefined(scope.path) || scope.path === null) { + _this.$log.warn('polylines: no valid path attribute found'); + } + if (!scope.models) { + _this.$log.warn('polylines: no models found to create from'); + } + return Plural.link(scope, new PolylinesParentModel(scope, element, attrs, gMap, _this.DEFAULTS)); + }; + })(this)); + }; + + return Polylines; + + })(IPolyline); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapRectangle', [ + 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapIRectangle', 'uiGmapRectangleParentModel', function($log, GmapUtil, IRectangle, RectangleParentModel) { + return _.extend(IRectangle, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(gMap) { + return new RectangleParentModel(scope, element, attrs, gMap); + }); + } + }); + } + ]); + +}).call(this); +; +/*global angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindow', [ + 'uiGmapIWindow', 'uiGmapGmapUtil', 'uiGmapWindowChildModel', 'uiGmapLodash', 'uiGmapLogger', function(IWindow, GmapUtil, WindowChildModel, uiGmapLodash, $log) { + var Window; + return Window = (function(superClass) { + extend(Window, superClass); + + Window.include(GmapUtil); + + function Window() { + this.link = bind(this.link, this); + Window.__super__.constructor.call(this); + this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarker']; + this.template = ''; + $log.debug(this); + this.childWindows = []; + } + + Window.prototype.link = function(scope, element, attrs, ctrls) { + var markerCtrl, markerScope; + markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; + markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; + this.mapPromise = IWindow.mapPromise(scope, ctrls[0]); + return this.mapPromise.then((function(_this) { + return function(gMap) { + var isIconVisibleOnClick; + isIconVisibleOnClick = true; + if (angular.isDefined(attrs.isiconvisibleonclick)) { + isIconVisibleOnClick = scope.isIconVisibleOnClick; + } + if (!markerCtrl) { + _this.init(scope, element, isIconVisibleOnClick, gMap); + return; + } + return markerScope.deferred.promise.then(function(gMarker) { + return _this.init(scope, element, isIconVisibleOnClick, gMap, markerScope); + }); + }; + })(this)); + }; + + Window.prototype.init = function(scope, element, isIconVisibleOnClick, gMap, markerScope) { + var childWindow, defaults, gMarker, hasScopeCoords, opts; + defaults = scope.options != null ? scope.options : {}; + hasScopeCoords = (scope != null) && this.validateCoords(scope.coords); + if ((markerScope != null ? markerScope['getGMarker'] : void 0) != null) { + gMarker = markerScope.getGMarker(); + } + opts = hasScopeCoords ? this.createWindowOptions(gMarker, scope, element.html(), defaults) : defaults; + if (gMap != null) { + childWindow = new WindowChildModel({ + scope: scope, + opts: opts, + isIconVisibleOnClick: isIconVisibleOnClick, + gMap: gMap, + markerScope: markerScope, + element: element + }); + this.childWindows.push(childWindow); + scope.$on('$destroy', (function(_this) { + return function() { + _this.childWindows = uiGmapLodash.withoutObjects(_this.childWindows, [childWindow], function(child1, child2) { + return child1.scope.$id === child2.scope.$id; + }); + return _this.childWindows.length = 0; + }; + })(this)); + } + if (scope.control != null) { + scope.control.getGWindows = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.gObject; + }); + }; + })(this); + scope.control.getChildWindows = (function(_this) { + return function() { + return _this.childWindows; + }; + })(this); + scope.control.getPlurals = scope.control.getChildWindows; + scope.control.showWindow = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.showWindow(); + }); + }; + })(this); + scope.control.hideWindow = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.hideWindow(); + }); + }; + })(this); + } + if ((this.onChildCreation != null) && (childWindow != null)) { + return this.onChildCreation(childWindow); + } + }; + + return Window; + + })(IWindow); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindows', [ + 'uiGmapIWindow', 'uiGmapPlural', 'uiGmapWindowsParentModel', 'uiGmapPromise', 'uiGmapLogger', function(IWindow, Plural, WindowsParentModel, uiGmapPromise, $log) { + + /* + Windows directive where many windows map to the models property + */ + var Windows; + return Windows = (function(superClass) { + extend(Windows, superClass); + + function Windows() { + this.link = bind(this.link, this); + Windows.__super__.constructor.call(this); + this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarkers']; + this.template = ''; + Plural.extend(this); + $log.debug(this); + } + + Windows.prototype.link = function(scope, element, attrs, ctrls) { + var mapScope, markerCtrl, markerScope; + mapScope = ctrls[0].getScope(); + markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; + markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; + return mapScope.deferred.promise.then((function(_this) { + return function(map) { + var promise, ref; + promise = (markerScope != null ? (ref = markerScope.deferred) != null ? ref.promise : void 0 : void 0) || uiGmapPromise.resolve(); + return promise.then(function() { + var pieces, ref1; + pieces = (ref1 = _this.parentModel) != null ? ref1.existingPieces : void 0; + if (pieces) { + return pieces.then(function() { + return _this.init(scope, element, attrs, ctrls, map, markerScope); + }); + } else { + return _this.init(scope, element, attrs, ctrls, map, markerScope); + } + }); + }; + })(this)); + }; + + Windows.prototype.init = function(scope, element, attrs, ctrls, map, additionalScope) { + var parentModel; + parentModel = new WindowsParentModel(scope, element, attrs, ctrls, map, additionalScope); + Plural.link(scope, parentModel); + if (scope.control != null) { + scope.control.getGWindows = function() { + return parentModel.plurals.map(function(child) { + return child.gObject; + }); + }; + return scope.control.getChildWindows = function() { + return parentModel.plurals; + }; + } + }; + + return Windows; + + })(IWindow); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Nick Baugh - https://github.com/niftylettuce + */ + + +/*globals angular */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", ['uiGmapMap', function(uiGmapMap) { + return new uiGmapMap(); + }]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map marker directive + +This directive is used to create a marker on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute icon optional} string url to image used for marker icon +{attribute animate optional} if set to false, the marker won't be animated (on by default) + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapMarker', [ + '$timeout', 'uiGmapMarker', function($timeout, Marker) { + return new Marker($timeout); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map marker directive + +This directive is used to create a marker on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute icon optional} string url to image used for marker icon +{attribute animate optional} if set to false, the marker won't be animated (on by default) + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapMarkers', [ + '$timeout', 'uiGmapMarkers', function($timeout, Markers) { + return new Markers($timeout); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolygon', [ + 'uiGmapPolygon', function(Polygon) { + return new Polygon(); + } + ]); + +}).call(this); +; +/* +@authors +Julian Popescu - https://github.com/jpopesculian +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive("uiGmapCircle", [ + "uiGmapCircle", function(Circle) { + return Circle; + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapPolyline", [ + "uiGmapPolyline", function(Polyline) { + return new Polyline(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolylines', [ + 'uiGmapPolylines', function(Polylines) { + return new Polylines(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Chentsu Lin - https://github.com/ChenTsuLin + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapRectangle", [ + "uiGmapLogger", "uiGmapRectangle", function($log, Rectangle) { + return Rectangle; + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map info window directive + +This directive is used to create an info window on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute show optional} map will show when this expression returns true + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapWindow", [ + "$timeout", "$compile", "$http", "$templateCache", "uiGmapWindow", function($timeout, $compile, $http, $templateCache, Window) { + return new Window($timeout, $compile, $http, $templateCache); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map info window directive + +This directive is used to create an info window on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute show optional} map will show when this expression returns true + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapWindows", [ + "$timeout", "$compile", "$http", "$templateCache", "$interpolate", "uiGmapWindows", function($timeout, $compile, $http, $templateCache, $interpolate, Windows) { + return new Windows($timeout, $compile, $http, $templateCache, $interpolate); + } + ]); + +}).call(this); +; +/* +@authors: +- Nicolas Laplante https://plus.google.com/108189012221374960701 +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map Layer directive + +This directive is used to create any type of Layer from the google maps sdk. +This directive creates a new scope. + +{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps').directive('uiGmapLayer', [ + '$timeout', 'uiGmapLogger', 'uiGmapLayerParentModel', function($timeout, Logger, LayerParentModel) { + var Layer; + Layer = (function() { + function Layer() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + show: '=show', + type: '=type', + namespace: '=namespace', + options: '=options', + onCreated: '&oncreated' + }; + } + + Layer.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + if (scope.onCreated != null) { + return new LayerParentModel(scope, element, attrs, map, scope.onCreated); + } else { + return new LayerParentModel(scope, element, attrs, map); + } + }; + })(this)); + }; + + return Layer; + + })(); + return new Layer(); + } + ]); + +}).call(this); +; +/* +@authors +Adam Kreitals, kreitals@hotmail.com + */ + + +/* +mapControl directive + +This directive is used to create a custom control element on an existing map. +This directive creates a new scope. + +{attribute template required} string url of the template to be used for the control +{attribute position optional} string position of the control of the form top-left or TOP_LEFT defaults to TOP_CENTER +{attribute controller optional} string controller to be applied to the template +{attribute index optional} number index for controlling the order of similarly positioned mapControl elements + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapMapControl", [ + "uiGmapControl", function(Control) { + return new Control(); + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapDragZoom', [ + 'uiGmapDragZoom', function(DragZoom) { + return DragZoom; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').directive("uiGmapDrawingManager", [ + "uiGmapDrawingManager", function(DrawingManager) { + return DrawingManager; + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready + * Brunt of the work is in DrawFreeHandChildModel + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapFreeDrawPolygons', [ + 'uiGmapApiFreeDrawPolygons', function(FreeDrawPolygons) { + return new FreeDrawPolygons(); + } + ]); + +}).call(this); +; +/* +Map Layer directive + +This directive is used to create any type of Layer from the google maps sdk. +This directive creates a new scope. + +{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps").directive("uiGmapMapType", [ + "$timeout", "uiGmapLogger", "uiGmapMapTypeParentModel", function($timeout, Logger, MapTypeParentModel) { + var MapType; + MapType = (function() { + function MapType() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = "EMA"; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + show: "=show", + options: '=options', + refresh: '=refresh', + id: '@' + }; + } + + MapType.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + return new MapTypeParentModel(scope, element, attrs, map); + }; + })(this)); + }; + + return MapType; + + })(); + return new MapType(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolygons', [ + 'uiGmapPolygons', function(Polygons) { + return new Polygons(); + } + ]); + +}).call(this); +; +/* +@authors: +- Nicolas Laplante https://plus.google.com/108189012221374960701 +- Nicholas McCready - https://twitter.com/nmccready +- Carrie Kengle - http://about.me/carrie + */ + + +/* +Places Search Box directive + +This directive is used to create a Places Search Box. +This directive creates a new scope. + +{attribute input required} HTMLInputElement +{attribute options optional} The options that can be set on a SearchBox object (google.maps.places.SearchBoxOptions object specification) + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps').directive('uiGmapSearchBox', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapSearchBoxParentModel', '$http', '$templateCache', '$compile', function(GoogleMapApi, Logger, SearchBoxParentModel, $http, $templateCache, $compile) { + var SearchBox; + SearchBox = (function() { + SearchBox.prototype.require = 'ngModel'; + + function SearchBox() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + template: '=template', + events: '=events', + position: '=?position', + options: '=?options', + parentdiv: '=?parentdiv', + ngModel: "=?" + }; + } + + SearchBox.prototype.link = function(scope, element, attrs, mapCtrl) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + if (scope.template == null) { + $templateCache.put('uigmap-searchbox-default.tpl.html', ''); + scope.template = 'uigmap-searchbox-default.tpl.html'; + } + return $http.get(scope.template, { + cache: $templateCache + }).success(function(template) { + if (angular.isUndefined(scope.events)) { + _this.$log.error('searchBox: the events property is required'); + return; + } + return mapCtrl.getScope().deferred.promise.then(function(map) { + var ctrlPosition; + ctrlPosition = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_LEFT'; + if (!maps.ControlPosition[ctrlPosition]) { + _this.$log.error('searchBox: invalid position property'); + return; + } + return new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, $compile(template)(scope)); + }); + }); + }; + })(this)); + }; + + return SearchBox; + + })(); + return new SearchBox(); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapShow', [ + '$animate', 'uiGmapLogger', function($animate, $log) { + return { + scope: { + 'uiGmapShow': '=', + 'uiGmapAfterShow': '&', + 'uiGmapAfterHide': '&' + }, + link: function(scope, element) { + var angular_post_1_3_handle, angular_pre_1_3_handle, handle; + angular_post_1_3_handle = function(animateAction, cb) { + return $animate[animateAction](element, 'ng-hide').then(function() { + return cb(); + }); + }; + angular_pre_1_3_handle = function(animateAction, cb) { + return $animate[animateAction](element, 'ng-hide', cb); + }; + handle = function(animateAction, cb) { + if (angular.version.major > 1) { + return $log.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is " + angular.version.major + "\""); + } + if (angular.version.major === 1 && angular.version.minor < 3) { + return angular_pre_1_3_handle(animateAction, cb); + } + return angular_post_1_3_handle(animateAction, cb); + }; + return scope.$watch('uiGmapShow', function(show) { + if (show) { + handle('removeClass', scope.uiGmapAfterShow); + } + if (!show) { + return handle('addClass', scope.uiGmapAfterHide); + } + }); + } + }; + } + ]); + +}).call(this); +; +/* +@authors: +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +StreetViewPanorama Directive to care of basic initialization of StreetViewPanorama + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) { + var name; + name = 'uiGmapStreetViewPanorama'; + return { + restrict: 'EMA', + template: '
', + replace: true, + scope: { + focalcoord: '=', + radius: '=?', + events: '=?', + options: '=?', + control: '=?', + povoptions: '=?', + imagestatus: '=' + }, + link: function(scope, element, attrs) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv; + pano = void 0; + sv = void 0; + didCreateOptionsFromDirective = false; + listeners = void 0; + opts = null; + povOpts = null; + clean = function() { + EventsHelper.removeEvents(listeners); + if (pano != null) { + pano.unbind('position'); + pano.setVisible(false); + } + if (sv != null) { + if ((sv != null ? sv.setVisible : void 0) != null) { + sv.setVisible(false); + } + return sv = void 0; + } + }; + handleSettings = function(perspectivePoint, focalPoint) { + var heading; + heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint); + didCreateOptionsFromDirective = true; + scope.radius = scope.radius || 50; + povOpts = angular.extend({ + heading: heading, + zoom: 1, + pitch: 0 + }, scope.povoptions || {}); + opts = opts = angular.extend({ + navigationControl: false, + addressControl: false, + linksControl: false, + position: perspectivePoint, + pov: povOpts, + visible: true + }, scope.options || {}); + return didCreateOptionsFromDirective = false; + }; + create = function() { + var focalPoint; + if (!scope.focalcoord) { + $log.error(name + ": focalCoord needs to be defined"); + return; + } + if (!scope.radius) { + $log.error(name + ": needs a radius to set the camera view from its focal target."); + return; + } + clean(); + if (sv == null) { + sv = new google.maps.StreetViewService(); + } + if (scope.events) { + listeners = EventsHelper.setEvents(sv, scope, scope); + } + focalPoint = GmapUtil.getCoords(scope.focalcoord); + return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) { + var ele, perspectivePoint, ref; + if (scope.imagestatus != null) { + scope.imagestatus = status; + } + if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) { + scope.events.image_status_changed(sv, 'image_status_changed', scope, status); + } + if (status === "OK") { + perspectivePoint = streetViewPanoramaData.location.latLng; + handleSettings(perspectivePoint, focalPoint); + ele = element[0]; + return pano = new google.maps.StreetViewPanorama(ele, opts); + } + }); + }; + if (scope.control != null) { + scope.control.getOptions = function() { + return opts; + }; + scope.control.getPovOptions = function() { + return povOpts; + }; + scope.control.getGObject = function() { + return sv; + }; + scope.control.getGPano = function() { + return pano; + }; + } + scope.$watch('options', function(newValue, oldValue) { + if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) { + return; + } + return create(); + }); + firstTime = true; + scope.$watch('focalcoord', function(newValue, oldValue) { + if (newValue === oldValue && !firstTime) { + return; + } + if (newValue == null) { + return; + } + firstTime = false; + return create(); + }); + return scope.$on('$destroy', function() { + return clean(); + }); + }; + })(this)); + } + }; + } + ]); + +}).call(this); +;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapuuid', function() { + //BEGIN REPLACE + /* istanbul ignore next */ + /* + Version: core-1.0 + The MIT License: Copyright (c) 2012 LiosK. +*/ +function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c}; + + //END REPLACE +return UUID; +}); +;// wrap the utility libraries needed in ./lib +// http://google-maps-utility-library-v3.googlecode.com/svn/ +angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapGoogleMapsUtilV3', function () { + return { + init: _.once(function () { + //BEGIN REPLACE + /* istanbul ignore next */ + +function(){ + function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=cluster,this.className_=cluster.getMarkerClusterer().getClusterClass(),this.styles_=styles,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(cluster.getMap())}function Cluster(mc){this.markerClusterer_=mc,this.map_=mc.getMap(),this.gridSize_=mc.getGridSize(),this.minClusterSize_=mc.getMinimumClusterSize(),this.averageCenter_=mc.getAverageCenter(),this.hideLabel_=mc.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView),opt_markers=opt_markers||[],opt_options=opt_options||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=opt_options.gridSize||60,this.minClusterSize_=opt_options.minimumClusterSize||2,this.maxZoom_=opt_options.maxZoom||null,this.styles_=opt_options.styles||[],this.title_=opt_options.title||"",this.zoomOnClick_=!0,void 0!==opt_options.zoomOnClick&&(this.zoomOnClick_=opt_options.zoomOnClick),this.averageCenter_=!1,void 0!==opt_options.averageCenter&&(this.averageCenter_=opt_options.averageCenter),this.ignoreHidden_=!1,void 0!==opt_options.ignoreHidden&&(this.ignoreHidden_=opt_options.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==opt_options.enableRetinaIcons&&(this.enableRetinaIcons_=opt_options.enableRetinaIcons),this.hideLabel_=!1,void 0!==opt_options.hideLabel&&(this.hideLabel_=opt_options.hideLabel),this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=opt_options.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=opt_options.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(opt_markers,!0),this.setMap(map)}ClusterIcon.prototype.onAdd=function(){var cMouseDownInCluster,cDraggingMapByCluster,cClusterIcon=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){cDraggingMapByCluster=cMouseDownInCluster}),google.maps.event.addDomListener(this.div_,"mousedown",function(){cMouseDownInCluster=!0,cDraggingMapByCluster=!1}),google.maps.event.addDomListener(this.div_,"click",function(e){if(cMouseDownInCluster=!1,!cDraggingMapByCluster){var theBounds,mz,mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"click",cClusterIcon.cluster_),google.maps.event.trigger(mc,"clusterclick",cClusterIcon.cluster_),mc.getZoomOnClick()&&(mz=mc.getMaxZoom(),theBounds=cClusterIcon.cluster_.getBounds(),mc.getMap().fitBounds(theBounds),setTimeout(function(){mc.getMap().fitBounds(theBounds),null!==mz&&mc.getMap().getZoom()>mz&&mc.getMap().setZoom(mz+1)},100)),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseover",cClusterIcon.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseout",cClusterIcon.cluster_)})},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+"px",this.div_.style.left=pos.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var img="",bp=this.backgroundPosition_.split(" "),spriteH=parseInt(bp[0].trim(),10),spriteV=parseInt(bp[1].trim(),10),pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos),img="",this.div_.innerHTML=img+"
"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"
",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.useStyle=function(sums){this.sums_=sums;var index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);var style=this.styles_[index];this.url_=style.url,this.height_=style.height,this.width_=style.width,this.anchorText_=style.anchorText||[0,0],this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=style.textColor||"black",this.textSize_=style.textSize||11,this.textDecoration_=style.textDecoration||"none",this.fontWeight_=style.fontWeight||"bold",this.fontStyle_=style.fontStyle||"normal",this.fontFamily_=style.fontFamily||"Arial,sans-serif",this.backgroundPosition_=style.backgroundPosition||"0 0"},ClusterIcon.prototype.setCenter=function(center){this.center_=center},ClusterIcon.prototype.createCss=function(pos){var style=[];return style.push("cursor: pointer;"),style.push("position: absolute; top: "+pos.y+"px; left: "+pos.x+"px;"),style.push("width: "+this.width_+"px; height: "+this.height_+"px;"),style.join("")},ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);return pos.x-=this.anchorIcon_[1],pos.y-=this.anchorIcon_[0],pos.x=parseInt(pos.x,10),pos.y=parseInt(pos.y,10),pos},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){var i,bounds=new google.maps.LatLngBounds(this.center_,this.center_),markers=this.getMarkers();for(i=0;imz)marker.getMap()!==this.map_&&marker.setMap(this.map_);else if(mCounti;i++)this.markers_[i].setMap(null);else marker.setMap(null);return!0},Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())},Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)},Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length,mz=this.markerClusterer_.getMaxZoom();if(null!==mz&&this.map_.getZoom()>mz)return void this.clusterIcon_.hide();if(mCounti;i++)if(marker===this.markers_[i])return!0;return!1},MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){cMarkerClusterer.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){cMarkerClusterer.redraw_()})]},MarkerClusterer.prototype.onRemove=function(){var i;for(i=0;i0))for(i=0;id&&(distance=d,clusterToAddTo=cluster));clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker)?clusterToAddTo.addMarker(marker):(cluster=new Cluster(this),cluster.addMarker(marker),this.clusters_.push(cluster))},MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker,mapBounds,cMarkerClusterer=this;if(this.ready_){0===iFirst&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),mapBounds=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var bounds=this.getExtendedBounds(mapBounds),iLast=Math.min(iFirst+this.batchSize_,this.markers_.length);for(i=iFirst;iLast>i;i++)marker=this.markers_[i],!marker.isAdded&&this.isMarkerInBounds_(marker,bounds)&&(!this.ignoreHidden_||this.ignoreHidden_&&marker.getVisible())&&this.addToClosestCluster_(marker);if(iLastOverlayView class. + *

+ * An InfoBox behaves like a google.maps.InfoWindow, but it supports several + * additional properties for advanced styling. An InfoBox can also be used as a map label. + *

+ * An InfoBox also fires the same events as a google.maps.InfoWindow. + */ + +/*jslint browser:true */ +/*global google */ + +/** + * @name InfoBoxOptions + * @class This class represents the optional parameter passed to the {@link InfoBox} constructor. + * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node). + * @property {boolean} [disableAutoPan=false] Disable auto-pan on open. + * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. + * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox + * (or the bottom left corner if the alignBottom property is true) + * to the map pixel corresponding to position. + * @property {LatLng} position The geographic location at which to display the InfoBox. + * @property {number} zIndex The CSS z-index style value for the InfoBox. + * Note: This value overrides a zIndex setting specified in the boxStyle property. + * @property {string} [boxClass="infoBox"] The name of the CSS class defining the styles for the InfoBox container. + * @property {Object} [boxStyle] An object literal whose properties define specific CSS + * style values to be applied to the InfoBox. Style values defined here override those that may + * be defined in the boxClass style sheet. If this property is changed after the + * InfoBox has been created, all previously set styles (except those defined in the style sheet) + * are removed from the InfoBox before the new style values are applied. + * @property {string} closeBoxMargin The CSS margin style value for the close box. + * The default is "2px" (a 2-pixel margin on all sides). + * @property {string} closeBoxURL The URL of the image representing the close box. + * Note: The default is the URL for Google's standard close box. + * Set this property to "" if no close box is required. + * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the + * map edge after an auto-pan. + * @property {boolean} [isHidden=false] Hide the InfoBox on open. + * [Deprecated in favor of the visible property.] + * @property {boolean} [visible=true] Show the InfoBox on open. + * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the position + * location (default is false which means that the top left corner of the InfoBox is aligned). + * @property {string} pane The pane where the InfoBox is to appear (default is "floatPane"). + * Set the pane to "mapPane" if the InfoBox is being used as a map label. + * Valid pane names are the property names for the google.maps.MapPanes object. + * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout, + * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox + * (default is false to mimic the behavior of a google.maps.InfoWindow). Set + * this property to true if the InfoBox is being used as a map label. + */ + +/** + * Creates an InfoBox with the options specified in {@link InfoBoxOptions}. + * Call InfoBox.open to add the box to the map. + * @constructor + * @param {InfoBoxOptions} [opt_opts] + */ +function InfoBox(opt_opts) { + + opt_opts = opt_opts || {}; + + google.maps.OverlayView.apply(this, arguments); + + // Standard options (in common with google.maps.InfoWindow): + // + this.content_ = opt_opts.content || ""; + this.disableAutoPan_ = opt_opts.disableAutoPan || false; + this.maxWidth_ = opt_opts.maxWidth || 0; + this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0); + this.position_ = opt_opts.position || new google.maps.LatLng(0, 0); + this.zIndex_ = opt_opts.zIndex || null; + + // Additional options (unique to InfoBox): + // + this.boxClass_ = opt_opts.boxClass || "infoBox"; + this.boxStyle_ = opt_opts.boxStyle || {}; + this.closeBoxMargin_ = opt_opts.closeBoxMargin || "2px"; + this.closeBoxURL_ = opt_opts.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif"; + if (opt_opts.closeBoxURL === "") { + this.closeBoxURL_ = ""; + } + this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1); + + if (typeof opt_opts.visible === "undefined") { + if (typeof opt_opts.isHidden === "undefined") { + opt_opts.visible = true; + } else { + opt_opts.visible = !opt_opts.isHidden; + } + } + this.isHidden_ = !opt_opts.visible; + + this.alignBottom_ = opt_opts.alignBottom || false; + this.pane_ = opt_opts.pane || "floatPane"; + this.enableEventPropagation_ = opt_opts.enableEventPropagation || false; + + this.div_ = null; + this.closeListener_ = null; + this.moveListener_ = null; + this.contextListener_ = null; + this.eventListeners_ = null; + this.fixedWidthSet_ = null; +} + +/* InfoBox extends OverlayView in the Google Maps API v3. + */ +InfoBox.prototype = new google.maps.OverlayView(); + +/** + * Creates the DIV representing the InfoBox. + * @private + */ +InfoBox.prototype.createInfoBoxDiv_ = function () { + + var i; + var events; + var bw; + var me = this; + + // This handler prevents an event in the InfoBox from being passed on to the map. + // + var cancelHandler = function (e) { + e.cancelBubble = true; + if (e.stopPropagation) { + e.stopPropagation(); + } + }; + + // This handler ignores the current event in the InfoBox and conditionally prevents + // the event from being passed on to the map. It is used for the contextmenu event. + // + var ignoreHandler = function (e) { + + e.returnValue = false; + + if (e.preventDefault) { + + e.preventDefault(); + } + + if (!me.enableEventPropagation_) { + + cancelHandler(e); + } + }; + + if (!this.div_) { + + this.div_ = document.createElement("div"); + + this.setBoxStyle_(); + + if (typeof this.content_.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + this.content_; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(this.content_); + } + + // Add the InfoBox DIV to the DOM + this.getPanes()[this.pane_].appendChild(this.div_); + + this.addClickHandler_(); + + if (this.div_.style.width) { + + this.fixedWidthSet_ = true; + + } else { + + if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) { + + this.div_.style.width = this.maxWidth_; + this.div_.style.overflow = "auto"; + this.fixedWidthSet_ = true; + + } else { // The following code is needed to overcome problems with MSIE + + bw = this.getBoxWidths_(); + + this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + "px"; + this.fixedWidthSet_ = false; + } + } + + this.panBox_(this.disableAutoPan_); + + if (!this.enableEventPropagation_) { + + this.eventListeners_ = []; + + // Cancel event propagation. + // + // Note: mousemove not included (to resolve Issue 152) + events = ["mousedown", "mouseover", "mouseout", "mouseup", + "click", "dblclick", "touchstart", "touchend", "touchmove"]; + + for (i = 0; i < events.length; i++) { + + this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); + } + + // Workaround for Google bug that causes the cursor to change to a pointer + // when the mouse moves over a marker underneath InfoBox. + this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e) { + this.style.cursor = "default"; + })); + } + + this.contextListener_ = google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); + + /** + * This event is fired when the DIV containing the InfoBox's content is attached to the DOM. + * @name InfoBox#domready + * @event + */ + google.maps.event.trigger(this, "domready"); + } +}; + +/** + * Returns the HTML tag for the close box. + * @private + */ +InfoBox.prototype.getCloseBoxImg_ = function () { + + var img = ""; + + if (this.closeBoxURL_ !== "") { + + img = " mapWidth) { + xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; + } + if (this.alignBottom_) { + if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) { + yOffset = pixPosition.y + iwOffsetY - padY - iwHeight; + } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) { + yOffset = pixPosition.y + iwOffsetY + padY - mapHeight; + } + } else { + if (pixPosition.y < (-iwOffsetY + padY)) { + yOffset = pixPosition.y + iwOffsetY - padY; + } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) { + yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; + } + } + + if (!(xOffset === 0 && yOffset === 0)) { + + // Move the map to the shifted center. + // + var c = map.getCenter(); + map.panBy(xOffset, yOffset); + } + } + } +}; + +/** + * Sets the style of the InfoBox by setting the style sheet and applying + * other specific styles requested. + * @private + */ +InfoBox.prototype.setBoxStyle_ = function () { + + var i, boxStyle; + + if (this.div_) { + + // Apply style values from the style sheet defined in the boxClass parameter: + this.div_.className = this.boxClass_; + + // Clear existing inline style values: + this.div_.style.cssText = ""; + + // Apply style values defined in the boxStyle parameter: + boxStyle = this.boxStyle_; + for (i in boxStyle) { + + if (boxStyle.hasOwnProperty(i)) { + + this.div_.style[i] = boxStyle[i]; + } + } + + // Fix for iOS disappearing InfoBox problem. + // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad + this.div_.style.WebkitTransform = "translateZ(0)"; + + // Fix up opacity style for benefit of MSIE: + // + if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") { + // See http://www.quirksmode.org/css/opacity.html + this.div_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(Opacity=" + (this.div_.style.opacity * 100) + ")\""; + this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; + } + + // Apply required styles: + // + this.div_.style.position = "absolute"; + this.div_.style.visibility = 'hidden'; + if (this.zIndex_ !== null) { + + this.div_.style.zIndex = this.zIndex_; + } + } +}; + +/** + * Get the widths of the borders of the InfoBox. + * @private + * @return {Object} widths object (top, bottom left, right) + */ +InfoBox.prototype.getBoxWidths_ = function () { + + var computedStyle; + var bw = {top: 0, bottom: 0, left: 0, right: 0}; + var box = this.div_; + + if (document.defaultView && document.defaultView.getComputedStyle) { + + computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, ""); + + if (computedStyle) { + + // The computed styles are always in pixel units (good!) + bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; + } + + } else if (document.documentElement.currentStyle) { // MSIE + + if (box.currentStyle) { + + // The current styles may not be in pixel units, but assume they are (bad!) + bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0; + } + } + + return bw; +}; + +/** + * Invoked when close is called. Do not call it directly. + */ +InfoBox.prototype.onRemove = function () { + + if (this.div_) { + + this.div_.parentNode.removeChild(this.div_); + this.div_ = null; + } +}; + +/** + * Draws the InfoBox based on the current map projection and zoom level. + */ +InfoBox.prototype.draw = function () { + + this.createInfoBoxDiv_(); + + var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_); + + this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + "px"; + + if (this.alignBottom_) { + this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + "px"; + } else { + this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + "px"; + } + + if (this.isHidden_) { + + this.div_.style.visibility = "hidden"; + + } else { + + this.div_.style.visibility = "visible"; + } +}; + +/** + * Sets the options for the InfoBox. Note that changes to the maxWidth, + * closeBoxMargin, closeBoxURL, and enableEventPropagation + * properties have no affect until the current InfoBox is closed and a new one + * is opened. + * @param {InfoBoxOptions} opt_opts + */ +InfoBox.prototype.setOptions = function (opt_opts) { + if (typeof opt_opts.boxClass !== "undefined") { // Must be first + + this.boxClass_ = opt_opts.boxClass; + this.setBoxStyle_(); + } + if (typeof opt_opts.boxStyle !== "undefined") { // Must be second + + this.boxStyle_ = opt_opts.boxStyle; + this.setBoxStyle_(); + } + if (typeof opt_opts.content !== "undefined") { + + this.setContent(opt_opts.content); + } + if (typeof opt_opts.disableAutoPan !== "undefined") { + + this.disableAutoPan_ = opt_opts.disableAutoPan; + } + if (typeof opt_opts.maxWidth !== "undefined") { + + this.maxWidth_ = opt_opts.maxWidth; + } + if (typeof opt_opts.pixelOffset !== "undefined") { + + this.pixelOffset_ = opt_opts.pixelOffset; + } + if (typeof opt_opts.alignBottom !== "undefined") { + + this.alignBottom_ = opt_opts.alignBottom; + } + if (typeof opt_opts.position !== "undefined") { + + this.setPosition(opt_opts.position); + } + if (typeof opt_opts.zIndex !== "undefined") { + + this.setZIndex(opt_opts.zIndex); + } + if (typeof opt_opts.closeBoxMargin !== "undefined") { + + this.closeBoxMargin_ = opt_opts.closeBoxMargin; + } + if (typeof opt_opts.closeBoxURL !== "undefined") { + + this.closeBoxURL_ = opt_opts.closeBoxURL; + } + if (typeof opt_opts.infoBoxClearance !== "undefined") { + + this.infoBoxClearance_ = opt_opts.infoBoxClearance; + } + if (typeof opt_opts.isHidden !== "undefined") { + + this.isHidden_ = opt_opts.isHidden; + } + if (typeof opt_opts.visible !== "undefined") { + + this.isHidden_ = !opt_opts.visible; + } + if (typeof opt_opts.enableEventPropagation !== "undefined") { + + this.enableEventPropagation_ = opt_opts.enableEventPropagation; + } + + if (this.div_) { + + this.draw(); + } +}; + +/** + * Sets the content of the InfoBox. + * The content can be plain text or an HTML DOM node. + * @param {string|Node} content + */ +InfoBox.prototype.setContent = function (content) { + this.content_ = content; + + if (this.div_) { + + if (this.closeListener_) { + + google.maps.event.removeListener(this.closeListener_); + this.closeListener_ = null; + } + + // Odd code required to make things work with MSIE. + // + if (!this.fixedWidthSet_) { + + this.div_.style.width = ""; + } + + if (typeof content.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + content; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(content); + } + + // Perverse code required to make things work with MSIE. + // (Ensures the close box does, in fact, float to the right.) + // + if (!this.fixedWidthSet_) { + this.div_.style.width = this.div_.offsetWidth + "px"; + if (typeof content.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + content; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(content); + } + } + + this.addClickHandler_(); + } + + /** + * This event is fired when the content of the InfoBox changes. + * @name InfoBox#content_changed + * @event + */ + google.maps.event.trigger(this, "content_changed"); +}; + +/** + * Sets the geographic location of the InfoBox. + * @param {LatLng} latlng + */ +InfoBox.prototype.setPosition = function (latlng) { + + this.position_ = latlng; + + if (this.div_) { + + this.draw(); + } + + /** + * This event is fired when the position of the InfoBox changes. + * @name InfoBox#position_changed + * @event + */ + google.maps.event.trigger(this, "position_changed"); +}; + +/** + * Sets the zIndex style for the InfoBox. + * @param {number} index + */ +InfoBox.prototype.setZIndex = function (index) { + + this.zIndex_ = index; + + if (this.div_) { + + this.div_.style.zIndex = index; + } + + /** + * This event is fired when the zIndex of the InfoBox changes. + * @name InfoBox#zindex_changed + * @event + */ + google.maps.event.trigger(this, "zindex_changed"); +}; + +/** + * Sets the visibility of the InfoBox. + * @param {boolean} isVisible + */ +InfoBox.prototype.setVisible = function (isVisible) { + + this.isHidden_ = !isVisible; + if (this.div_) { + this.div_.style.visibility = (this.isHidden_ ? "hidden" : "visible"); + } +}; + +/** + * Returns the content of the InfoBox. + * @returns {string} + */ +InfoBox.prototype.getContent = function () { + + return this.content_; +}; + +/** + * Returns the geographic location of the InfoBox. + * @returns {LatLng} + */ +InfoBox.prototype.getPosition = function () { + + return this.position_; +}; + +/** + * Returns the zIndex for the InfoBox. + * @returns {number} + */ +InfoBox.prototype.getZIndex = function () { + + return this.zIndex_; +}; + +/** + * Returns a flag indicating whether the InfoBox is visible. + * @returns {boolean} + */ +InfoBox.prototype.getVisible = function () { + + var isVisible; + + if ((typeof this.getMap() === "undefined") || (this.getMap() === null)) { + isVisible = false; + } else { + isVisible = !this.isHidden_; + } + return isVisible; +}; + +/** + * Shows the InfoBox. [Deprecated; use setVisible instead.] + */ +InfoBox.prototype.show = function () { + + this.isHidden_ = false; + if (this.div_) { + this.div_.style.visibility = "visible"; + } +}; + +/** + * Hides the InfoBox. [Deprecated; use setVisible instead.] + */ +InfoBox.prototype.hide = function () { + + this.isHidden_ = true; + if (this.div_) { + this.div_.style.visibility = "hidden"; + } +}; + +/** + * Adds the InfoBox to the specified map or Street View panorama. If anchor + * (usually a google.maps.Marker) is specified, the position + * of the InfoBox is set to the position of the anchor. If the + * anchor is dragged to a new location, the InfoBox moves as well. + * @param {Map|StreetViewPanorama} map + * @param {MVCObject} [anchor] + */ +InfoBox.prototype.open = function (map, anchor) { + + var me = this; + + if (anchor) { + + this.position_ = anchor.getPosition(); + this.moveListener_ = google.maps.event.addListener(anchor, "position_changed", function () { + me.setPosition(this.getPosition()); + }); + } + + this.setMap(map); + + if (this.div_) { + + this.panBox_(); + } +}; + +/** + * Removes the InfoBox from the map. + */ +InfoBox.prototype.close = function () { + + var i; + + if (this.closeListener_) { + + google.maps.event.removeListener(this.closeListener_); + this.closeListener_ = null; + } + + if (this.eventListeners_) { + + for (i = 0; i < this.eventListeners_.length; i++) { + + google.maps.event.removeListener(this.eventListeners_[i]); + } + this.eventListeners_ = null; + } + + if (this.moveListener_) { + + google.maps.event.removeListener(this.moveListener_); + this.moveListener_ = null; + } + + if (this.contextListener_) { + + google.maps.event.removeListener(this.contextListener_); + this.contextListener_ = null; + } + + this.setMap(null); +}; + +/** + * google-maps-utility-library-v3-keydragzoom + * + * @version: 2.0.9 + * @author: Nianwei Liu [nianwei at gmail dot com] & Gary Little [gary at luxcentral dot com] + * @contributors: undefined + * @date: Fri May 13 2016 13:45:18 GMT-0400 (EDT) + * @license: Apache License 2.0 + */ +/** + * @fileoverview This library adds a drag zoom capability to a V3 Google map. + * When drag zoom is enabled, holding down a designated hot key (shift | ctrl | alt) + * while dragging a box around an area of interest will zoom the map in to that area when + * the mouse button is released. Optionally, a visual control can also be supplied for turning + * a drag zoom operation on and off. + * Only one line of code is needed: google.maps.Map.enableKeyDragZoom(); + *

+ * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2, + * it causes a context menu to appear when running on the Macintosh. + *

+ * Note that if the map's container has a border around it, the border widths must be specified + * in pixel units (or as thin, medium, or thick). This is required because of an MSIE limitation. + *

NL: 2009-05-28: initial port to core API V3. + *
NL: 2009-11-02: added a temp fix for -moz-transform for FF3.5.x using code from Paul Kulchenko (http://notebook.kulchenko.com/maps/gridmove). + *
NL: 2010-02-02: added a fix for IE flickering on divs onmousemove, caused by scroll value when get mouse position. + *
GL: 2010-06-15: added a visual control option. + */ +(function () { + /*jslint browser:true */ + /*global window,google */ + /* Utility functions use "var funName=function()" syntax to allow use of the */ + /* Dean Edwards Packer compression tool (with Shrink variables, without Base62 encode). */ + + /** + * Converts "thin", "medium", and "thick" to pixel widths + * in an MSIE environment. Not called for other browsers + * because getComputedStyle() returns pixel widths automatically. + * @param {string} widthValue The value of the border width parameter. + */ + var toPixels = function (widthValue) { + var px; + switch (widthValue) { + case "thin": + px = "2px"; + break; + case "medium": + px = "4px"; + break; + case "thick": + px = "6px"; + break; + default: + px = widthValue; + } + return px; + }; + /** + * Get the widths of the borders of an HTML element. + * + * @param {Node} h The HTML element. + * @return {Object} The width object {top, bottom left, right}. + */ + var getBorderWidths = function (h) { + var computedStyle; + var bw = {}; + if (document.defaultView && document.defaultView.getComputedStyle) { + computedStyle = h.ownerDocument.defaultView.getComputedStyle(h, ""); + if (computedStyle) { + // The computed styles are always in pixel units (good!) + bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; + return bw; + } + } else if (document.documentElement.currentStyle) { // MSIE + if (h.currentStyle) { + // The current styles may not be in pixel units so try to convert (bad!) + bw.top = parseInt(toPixels(h.currentStyle.borderTopWidth), 10) || 0; + bw.bottom = parseInt(toPixels(h.currentStyle.borderBottomWidth), 10) || 0; + bw.left = parseInt(toPixels(h.currentStyle.borderLeftWidth), 10) || 0; + bw.right = parseInt(toPixels(h.currentStyle.borderRightWidth), 10) || 0; + return bw; + } + } + // Shouldn't get this far for any modern browser + bw.top = parseInt(h.style["border-top-width"], 10) || 0; + bw.bottom = parseInt(h.style["border-bottom-width"], 10) || 0; + bw.left = parseInt(h.style["border-left-width"], 10) || 0; + bw.right = parseInt(h.style["border-right-width"], 10) || 0; + return bw; + }; + + // Page scroll values for use by getMousePosition. To prevent flickering on MSIE + // they are calculated only when the document actually scrolls, not every time the + // mouse moves (as they would be if they were calculated inside getMousePosition). + var scroll = { + x: 0, + y: 0 + }; + var getScrollValue = function (e) { + scroll.x = (typeof document.documentElement.scrollLeft !== "undefined" ? document.documentElement.scrollLeft : document.body.scrollLeft); + scroll.y = (typeof document.documentElement.scrollTop !== "undefined" ? document.documentElement.scrollTop : document.body.scrollTop); + }; + getScrollValue(); + + /** + * Get the position of the mouse relative to the document. + * @param {Event} e The mouse event. + * @return {Object} The position object {left, top}. + */ + var getMousePosition = function (e) { + var posX = 0, posY = 0; + e = e || window.event; + if (typeof e.pageX !== "undefined") { + posX = e.pageX; + posY = e.pageY; + } else if (typeof e.clientX !== "undefined") { // MSIE + posX = e.clientX + scroll.x; + posY = e.clientY + scroll.y; + } + return { + left: posX, + top: posY + }; + }; + /** + * Get the position of an HTML element relative to the document. + * @param {Node} h The HTML element. + * @return {Object} The position object {left, top}. + */ + var getElementPosition = function (h) { + var posX = h.offsetLeft; + var posY = h.offsetTop; + var parent = h.offsetParent; + // Add offsets for all ancestors in the hierarchy + while (parent !== null) { + // Adjust for scrolling elements which may affect the map position. + // + // See http://www.howtocreate.co.uk/tutorials/javascript/browserspecific + // + // "...make sure that every element [on a Web page] with an overflow + // of anything other than visible also has a position style set to + // something other than the default static..." + if (parent !== document.body && parent !== document.documentElement) { + posX -= parent.scrollLeft; + posY -= parent.scrollTop; + } + // See http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/4cb86c0c1037a5e5 + // Example: http://notebook.kulchenko.com/maps/gridmove + var m = parent; + // This is the "normal" way to get offset information: + var moffx = m.offsetLeft; + var moffy = m.offsetTop; + // This covers those cases where a transform is used: + if (!moffx && !moffy && window.getComputedStyle) { + var matrix = document.defaultView.getComputedStyle(m, null).MozTransform || + document.defaultView.getComputedStyle(m, null).WebkitTransform; + if (matrix) { + if (typeof matrix === "string") { + var parms = matrix.split(","); + moffx += parseInt(parms[4], 10) || 0; + moffy += parseInt(parms[5], 10) || 0; + } + } + } + posX += moffx; + posY += moffy; + parent = parent.offsetParent; + } + return { + left: posX, + top: posY + }; + }; + /** + * Set the properties of an object to those from another object. + * @param {Object} obj The target object. + * @param {Object} vals The source object. + */ + var setVals = function (obj, vals) { + if (obj && vals) { + for (var x in vals) { + if (vals.hasOwnProperty(x)) { + obj[x] = vals[x]; + } + } + } + return obj; + }; + /** + * Set the opacity. If op is not passed in, this function just performs an MSIE fix. + * @param {Node} h The HTML element. + * @param {number} op The opacity value (0-1). + */ + var setOpacity = function (h, op) { + if (typeof op !== "undefined") { + h.style.opacity = op; + } + if (typeof h.style.opacity !== "undefined" && h.style.opacity !== "") { + h.style.filter = "alpha(opacity=" + (h.style.opacity * 100) + ")"; + } + }; + /** + * @name KeyDragZoomOptions + * @class This class represents the optional parameter passed into google.maps.Map.enableKeyDragZoom. + * @property {string} [key="shift"] The hot key to hold down to activate a drag zoom, shift | ctrl | alt. + * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2, + * it causes a context menu to appear when running on the Macintosh. Also note that the + * alt hot key refers to the Option key on a Macintosh. + * @property {Object} [boxStyle={border: "4px solid #736AFF"}] + * An object literal defining the CSS styles of the zoom box. + * Border widths must be specified in pixel units (or as thin, medium, or thick). + * @property {Object} [veilStyle={backgroundColor: "gray", opacity: 0.25, cursor: "crosshair"}] + * An object literal defining the CSS styles of the veil pane which covers the map when a drag + * zoom is activated. The previous name for this property was paneStyle but the use + * of this name is now deprecated. + * @property {boolean} [noZoom=false] A flag indicating whether to disable zooming after an area is + * selected. Set this to true to allow KeyDragZoom to be used as a simple area + * selection tool. + * @property {boolean} [visualEnabled=false] A flag indicating whether a visual control is to be used. + * @property {string} [visualClass=""] The name of the CSS class defining the styles for the visual + * control. To prevent the visual control from being printed, set this property to the name of + * a class, defined inside a @media print rule, which sets the CSS + * display style to none. + * @property {ControlPosition} [visualPosition=google.maps.ControlPosition.LEFT_TOP] + * The position of the visual control. + * @property {Size} [visualPositionOffset=google.maps.Size(35, 0)] The width and height values + * provided by this property are the offsets (in pixels) from the location at which the control + * would normally be drawn to the desired drawing location. + * @property {number} [visualPositionIndex=null] The index of the visual control. + * The index is for controlling the placement of the control relative to other controls at the + * position given by visualPosition; controls with a lower index are placed first. + * Use a negative value to place the control before any default controls. No index is + * generally required. + * @property {String} [visualSprite="http://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png"] + * The URL of the sprite image used for showing the visual control in the on, off, and hot + * (i.e., when the mouse is over the control) states. The three images within the sprite must + * be the same size and arranged in on-hot-off order in a single row with no spaces between images. + * @property {Size} [visualSize=google.maps.Size(20, 20)] The width and height values provided by + * this property are the size (in pixels) of each of the images within visualSprite. + * @property {Object} [visualTips={off: "Turn on drag zoom mode", on: "Turn off drag zoom mode"}] + * An object literal defining the help tips that appear when + * the mouse moves over the visual control. The off property is the tip to be shown + * when the control is off and the on property is the tip to be shown when the + * control is on. + */ + /** + * @name DragZoom + * @class This class represents a drag zoom object for a map. The object is activated by holding down the hot key + * or by turning on the visual control. + * This object is created when google.maps.Map.enableKeyDragZoom is called; it cannot be created directly. + * Use google.maps.Map.getDragZoomObject to gain access to this object in order to attach event listeners. + * @param {Map} map The map to which the DragZoom object is to be attached. + * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters. + */ + function DragZoom(map, opt_zoomOpts) { + var me = this; + var ov = new google.maps.OverlayView(); + ov.onAdd = function () { + me.init_(map, opt_zoomOpts); + }; + ov.draw = function () { + }; + ov.onRemove = function () { + }; + ov.setMap(map); + this.prjov_ = ov; + } + /** + * Initialize the tool. + * @param {Map} map The map to which the DragZoom object is to be attached. + * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters. + */ + DragZoom.prototype.init_ = function (map, opt_zoomOpts) { + var i; + var me = this; + this.map_ = map; + opt_zoomOpts = opt_zoomOpts || {}; + this.key_ = opt_zoomOpts.key || "shift"; + this.key_ = this.key_.toLowerCase(); + this.borderWidths_ = getBorderWidths(this.map_.getDiv()); + this.veilDiv_ = []; + for (i = 0; i < 4; i++) { + this.veilDiv_[i] = document.createElement("div"); + // Prevents selection of other elements on the webpage + // when a drag zoom operation is in progress: + this.veilDiv_[i].onselectstart = function () { + return false; + }; + // Apply default style values for the veil: + setVals(this.veilDiv_[i].style, { + backgroundColor: "gray", + opacity: 0.25, + cursor: "crosshair" + }); + // Apply style values specified in veilStyle parameter: + setVals(this.veilDiv_[i].style, opt_zoomOpts.paneStyle); // Old option name was "paneStyle" + setVals(this.veilDiv_[i].style, opt_zoomOpts.veilStyle); // New name is "veilStyle" + // Apply mandatory style values: + setVals(this.veilDiv_[i].style, { + position: "absolute", + overflow: "hidden", + display: "none" + }); + // Workaround for Firefox Shift-Click problem: + if (this.key_ === "shift") { + this.veilDiv_[i].style.MozUserSelect = "none"; + } + setOpacity(this.veilDiv_[i]); + // An IE fix: If the background is transparent it cannot capture mousedown + // events, so if it is, change the background to white with 0 opacity. + if (this.veilDiv_[i].style.backgroundColor === "transparent") { + this.veilDiv_[i].style.backgroundColor = "white"; + setOpacity(this.veilDiv_[i], 0); + } + this.map_.getDiv().appendChild(this.veilDiv_[i]); + } + + this.noZoom_ = opt_zoomOpts.noZoom || false; + this.visualEnabled_ = opt_zoomOpts.visualEnabled || false; + this.visualClass_ = opt_zoomOpts.visualClass || ""; + this.visualPosition_ = opt_zoomOpts.visualPosition || google.maps.ControlPosition.LEFT_TOP; + this.visualPositionOffset_ = opt_zoomOpts.visualPositionOffset || new google.maps.Size(35, 0); + this.visualPositionIndex_ = opt_zoomOpts.visualPositionIndex || null; + this.visualSprite_ = opt_zoomOpts.visualSprite || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png"; + this.visualSize_ = opt_zoomOpts.visualSize || new google.maps.Size(20, 20); + this.visualTips_ = opt_zoomOpts.visualTips || {}; + this.visualTips_.off = this.visualTips_.off || "Turn on drag zoom mode"; + this.visualTips_.on = this.visualTips_.on || "Turn off drag zoom mode"; + + this.boxDiv_ = document.createElement("div"); + // Apply default style values for the zoom box: + setVals(this.boxDiv_.style, { + border: "4px solid #736AFF" + }); + // Apply style values specified in boxStyle parameter: + setVals(this.boxDiv_.style, opt_zoomOpts.boxStyle); + // Apply mandatory style values: + setVals(this.boxDiv_.style, { + position: "absolute", + display: "none" + }); + setOpacity(this.boxDiv_); + this.map_.getDiv().appendChild(this.boxDiv_); + this.boxBorderWidths_ = getBorderWidths(this.boxDiv_); + + this.listeners_ = [ + google.maps.event.addDomListener(document, "keydown", function (e) { + me.onKeyDown_(e); + }), + google.maps.event.addDomListener(document, "keyup", function (e) { + me.onKeyUp_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[0], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[1], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[2], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[3], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(document, "mousedown", function (e) { + me.onMouseDownDocument_(e); + }), + google.maps.event.addDomListener(document, "mousemove", function (e) { + me.onMouseMove_(e); + }), + google.maps.event.addDomListener(document, "mouseup", function (e) { + me.onMouseUp_(e); + }), + google.maps.event.addDomListener(window, "scroll", getScrollValue) + ]; + + this.hotKeyDown_ = false; + this.mouseDown_ = false; + this.dragging_ = false; + this.startPt_ = null; + this.endPt_ = null; + this.mapWidth_ = null; + this.mapHeight_ = null; + this.mousePosn_ = null; + this.mapPosn_ = null; + + if (this.visualEnabled_) { + this.buttonDiv_ = this.initControl_(this.visualPositionOffset_); + if (this.visualPositionIndex_ !== null) { + this.buttonDiv_.index = this.visualPositionIndex_; + } + this.map_.controls[this.visualPosition_].push(this.buttonDiv_); + this.controlIndex_ = this.map_.controls[this.visualPosition_].length - 1; + } + }; + /** + * Initializes the visual control and returns its DOM element. + * @param {Size} offset The offset of the control from its normal position. + * @return {Node} The DOM element containing the visual control. + */ + DragZoom.prototype.initControl_ = function (offset) { + var control; + var image; + var me = this; + + control = document.createElement("div"); + control.className = this.visualClass_; + control.style.position = "relative"; + control.style.overflow = "hidden"; + control.style.height = this.visualSize_.height + "px"; + control.style.width = this.visualSize_.width + "px"; + control.title = this.visualTips_.off; + image = document.createElement("img"); + image.src = this.visualSprite_; + image.style.position = "absolute"; + image.style.left = -(this.visualSize_.width * 2) + "px"; + image.style.top = 0 + "px"; + control.appendChild(image); + control.onclick = function (e) { + me.hotKeyDown_ = !me.hotKeyDown_; + if (me.hotKeyDown_) { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + "px"; + me.buttonDiv_.title = me.visualTips_.on; + me.activatedByControl_ = true; + google.maps.event.trigger(me, "activate"); + } else { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + "px"; + me.buttonDiv_.title = me.visualTips_.off; + google.maps.event.trigger(me, "deactivate"); + } + me.onMouseMove_(e); // Updates the veil + }; + control.onmouseover = function () { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 1) + "px"; + }; + control.onmouseout = function () { + if (me.hotKeyDown_) { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + "px"; + me.buttonDiv_.title = me.visualTips_.on; + } else { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + "px"; + me.buttonDiv_.title = me.visualTips_.off; + } + }; + control.ondragstart = function () { + return false; + }; + setVals(control.style, { + cursor: "pointer", + marginTop: offset.height + "px", + marginLeft: offset.width + "px" + }); + return control; + }; + /** + * Returns true if the hot key is being pressed when an event occurs. + * @param {Event} e The keyboard event. + * @return {boolean} Flag indicating whether the hot key is down. + */ + DragZoom.prototype.isHotKeyDown_ = function (e) { + var isHot; + e = e || window.event; + isHot = (e.shiftKey && this.key_ === "shift") || (e.altKey && this.key_ === "alt") || (e.ctrlKey && this.key_ === "ctrl"); + if (!isHot) { + // Need to look at keyCode for Opera because it + // doesn't set the shiftKey, altKey, ctrlKey properties + // unless a non-modifier event is being reported. + // + // See http://cross-browser.com/x/examples/shift_mode.php + // Also see http://unixpapa.com/js/key.html + switch (e.keyCode) { + case 16: + if (this.key_ === "shift") { + isHot = true; + } + break; + case 17: + if (this.key_ === "ctrl") { + isHot = true; + } + break; + case 18: + if (this.key_ === "alt") { + isHot = true; + } + break; + } + } + return isHot; + }; + /** + * Returns true if the mouse is on top of the map div. + * The position is captured in onMouseMove_. + * @return {boolean} + */ + DragZoom.prototype.isMouseOnMap_ = function () { + var mousePosn = this.mousePosn_; + if (mousePosn) { + var mapPosn = this.mapPosn_; + var mapDiv = this.map_.getDiv(); + return mousePosn.left > mapPosn.left && mousePosn.left < (mapPosn.left + mapDiv.offsetWidth) && + mousePosn.top > mapPosn.top && mousePosn.top < (mapPosn.top + mapDiv.offsetHeight); + } else { + // if user never moved mouse + return false; + } + }; + /** + * Show the veil if the hot key is down and the mouse is over the map, + * otherwise hide the veil. + */ + DragZoom.prototype.setVeilVisibility_ = function () { + var i; + if (this.map_ && this.hotKeyDown_ && this.isMouseOnMap_()) { + var mapDiv = this.map_.getDiv(); + this.mapWidth_ = mapDiv.offsetWidth - (this.borderWidths_.left + this.borderWidths_.right); + this.mapHeight_ = mapDiv.offsetHeight - (this.borderWidths_.top + this.borderWidths_.bottom); + if (this.activatedByControl_) { // Veil covers entire map (except control) + var left = parseInt(this.buttonDiv_.style.left, 10) + this.visualPositionOffset_.width; + var top = parseInt(this.buttonDiv_.style.top, 10) + this.visualPositionOffset_.height; + var width = this.visualSize_.width; + var height = this.visualSize_.height; + // Left veil rectangle: + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.width = left + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + // Right veil rectangle: + this.veilDiv_[1].style.top = "0px"; + this.veilDiv_[1].style.left = (left + width) + "px"; + this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + "px"; + this.veilDiv_[1].style.height = this.mapHeight_ + "px"; + // Top veil rectangle: + this.veilDiv_[2].style.top = "0px"; + this.veilDiv_[2].style.left = left + "px"; + this.veilDiv_[2].style.width = width + "px"; + this.veilDiv_[2].style.height = top + "px"; + // Bottom veil rectangle: + this.veilDiv_[3].style.top = (top + height) + "px"; + this.veilDiv_[3].style.left = left + "px"; + this.veilDiv_[3].style.width = width + "px"; + this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + "px"; + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "block"; + } + } else { + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.width = this.mapWidth_ + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + for (i = 1; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.width = "0px"; + this.veilDiv_[i].style.height = "0px"; + } + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "block"; + } + } + } else { + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "none"; + } + } + }; + /** + * Handle key down. Show the veil if the hot key has been pressed. + * @param {Event} e The keyboard event. + */ + DragZoom.prototype.onKeyDown_ = function (e) { + if (this.map_ && !this.hotKeyDown_ && this.isHotKeyDown_(e)) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.hotKeyDown_ = true; + this.activatedByControl_ = false; + this.setVeilVisibility_(); + /** + * This event is fired when the hot key is pressed. + * @name DragZoom#activate + * @event + */ + google.maps.event.trigger(this, "activate"); + } + }; + /** + * Get the google.maps.Point of the mouse position. + * @param {Event} e The mouse event. + * @return {Point} The mouse position. + */ + DragZoom.prototype.getMousePoint_ = function (e) { + var mousePosn = getMousePosition(e); + var p = new google.maps.Point(); + p.x = mousePosn.left - this.mapPosn_.left - this.borderWidths_.left; + p.y = mousePosn.top - this.mapPosn_.top - this.borderWidths_.top; + p.x = Math.min(p.x, this.mapWidth_); + p.y = Math.min(p.y, this.mapHeight_); + p.x = Math.max(p.x, 0); + p.y = Math.max(p.y, 0); + return p; + }; + /** + * Handle mouse down. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseDown_ = function (e) { + if (this.map_ && this.hotKeyDown_) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.dragging_ = true; + this.startPt_ = this.endPt_ = this.getMousePoint_(e); + this.boxDiv_.style.width = this.boxDiv_.style.height = "0px"; + var prj = this.prjov_.getProjection(); + var latlng = prj.fromContainerPixelToLatLng(this.startPt_); + /** + * This event is fired when the drag operation begins. + * The parameter passed is the geographic position of the starting point. + * @name DragZoom#dragstart + * @param {LatLng} latlng The geographic position of the starting point. + * @event + */ + google.maps.event.trigger(this, "dragstart", latlng); + } + }; + /** + * Handle mouse down at the document level. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseDownDocument_ = function (e) { + this.mouseDown_ = true; + }; + /** + * Handle mouse move. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseMove_ = function (e) { + this.mousePosn_ = getMousePosition(e); + if (this.dragging_) { + this.endPt_ = this.getMousePoint_(e); + var left = Math.min(this.startPt_.x, this.endPt_.x); + var top = Math.min(this.startPt_.y, this.endPt_.y); + var width = Math.abs(this.startPt_.x - this.endPt_.x); + var height = Math.abs(this.startPt_.y - this.endPt_.y); + // For benefit of MSIE 7/8 ensure following values are not negative: + var boxWidth = Math.max(0, width - (this.boxBorderWidths_.left + this.boxBorderWidths_.right)); + var boxHeight = Math.max(0, height - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom)); + // Left veil rectangle: + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.width = left + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + // Right veil rectangle: + this.veilDiv_[1].style.top = "0px"; + this.veilDiv_[1].style.left = (left + width) + "px"; + this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + "px"; + this.veilDiv_[1].style.height = this.mapHeight_ + "px"; + // Top veil rectangle: + this.veilDiv_[2].style.top = "0px"; + this.veilDiv_[2].style.left = left + "px"; + this.veilDiv_[2].style.width = width + "px"; + this.veilDiv_[2].style.height = top + "px"; + // Bottom veil rectangle: + this.veilDiv_[3].style.top = (top + height) + "px"; + this.veilDiv_[3].style.left = left + "px"; + this.veilDiv_[3].style.width = width + "px"; + this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + "px"; + // Selection rectangle: + this.boxDiv_.style.top = top + "px"; + this.boxDiv_.style.left = left + "px"; + this.boxDiv_.style.width = boxWidth + "px"; + this.boxDiv_.style.height = boxHeight + "px"; + this.boxDiv_.style.display = "block"; + /** + * This event is fired repeatedly while the user drags a box across the area of interest. + * The southwest and northeast point are passed as parameters of type google.maps.Point + * (for performance reasons), relative to the map container. Also passed is the projection object + * so that the event listener, if necessary, can convert the pixel positions to geographic + * coordinates using google.maps.MapCanvasProjection.fromContainerPixelToLatLng. + * @name DragZoom#drag + * @param {Point} southwestPixel The southwest point of the selection area. + * @param {Point} northeastPixel The northeast point of the selection area. + * @param {MapCanvasProjection} prj The projection object. + * @event + */ + google.maps.event.trigger(this, "drag", new google.maps.Point(left, top + height), new google.maps.Point(left + width, top), this.prjov_.getProjection()); + } else if (!this.mouseDown_) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.setVeilVisibility_(); + } + }; + /** + * Handle mouse up. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseUp_ = function (e) { + var z; + var me = this; + this.mouseDown_ = false; + if (this.dragging_) { + if ((this.getMousePoint_(e).x === this.startPt_.x) && (this.getMousePoint_(e).y === this.startPt_.y)) { + this.onKeyUp_(e); // Cancel event + return; + } + var left = Math.min(this.startPt_.x, this.endPt_.x); + var top = Math.min(this.startPt_.y, this.endPt_.y); + var width = Math.abs(this.startPt_.x - this.endPt_.x); + var height = Math.abs(this.startPt_.y - this.endPt_.y); + // Google Maps API bug: setCenter() doesn't work as expected if the map has a + // border on the left or top. The code here includes a workaround for this problem. + var kGoogleCenteringBug = true; + if (kGoogleCenteringBug) { + left += this.borderWidths_.left; + top += this.borderWidths_.top; + } + + var prj = this.prjov_.getProjection(); + var sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height)); + var ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top)); + var bnds = new google.maps.LatLngBounds(sw, ne); + + if (this.noZoom_) { + this.boxDiv_.style.display = "none"; + } else { + // Sometimes fitBounds causes a zoom OUT, so restore original zoom level if this happens. + z = this.map_.getZoom(); + this.map_.fitBounds(bnds); + if (this.map_.getZoom() < z) { + this.map_.setZoom(z); + } + + // Redraw box after zoom: + var swPt = prj.fromLatLngToContainerPixel(sw); + var nePt = prj.fromLatLngToContainerPixel(ne); + if (kGoogleCenteringBug) { + swPt.x -= this.borderWidths_.left; + swPt.y -= this.borderWidths_.top; + nePt.x -= this.borderWidths_.left; + nePt.y -= this.borderWidths_.top; + } + this.boxDiv_.style.left = swPt.x + "px"; + this.boxDiv_.style.top = nePt.y + "px"; + this.boxDiv_.style.width = (Math.abs(nePt.x - swPt.x) - (this.boxBorderWidths_.left + this.boxBorderWidths_.right)) + "px"; + this.boxDiv_.style.height = (Math.abs(nePt.y - swPt.y) - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom)) + "px"; + // Hide box asynchronously after 1 second: + setTimeout(function () { + me.boxDiv_.style.display = "none"; + }, 1000); + } + this.dragging_ = false; + this.onMouseMove_(e); // Updates the veil + /** + * This event is fired when the drag operation ends. + * The parameter passed is the geographic bounds of the selected area. + * Note that this event is not fired if the hot key is released before the drag operation ends. + * @name DragZoom#dragend + * @param {LatLngBounds} bnds The geographic bounds of the selected area. + * @event + */ + google.maps.event.trigger(this, "dragend", bnds); + // if the hot key isn't down, the drag zoom must have been activated by turning + // on the visual control. In this case, finish up by simulating a key up event. + if (!this.isHotKeyDown_(e)) { + this.onKeyUp_(e); + } + } + }; + /** + * Handle key up. + * @param {Event} e The keyboard event. + */ + DragZoom.prototype.onKeyUp_ = function (e) { + var i; + var left, top, width, height, prj, sw, ne; + var bnds = null; + if (this.map_ && this.hotKeyDown_) { + this.hotKeyDown_ = false; + if (this.dragging_) { + this.boxDiv_.style.display = "none"; + this.dragging_ = false; + // Calculate the bounds when drag zoom was cancelled + left = Math.min(this.startPt_.x, this.endPt_.x); + top = Math.min(this.startPt_.y, this.endPt_.y); + width = Math.abs(this.startPt_.x - this.endPt_.x); + height = Math.abs(this.startPt_.y - this.endPt_.y); + prj = this.prjov_.getProjection(); + sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height)); + ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top)); + bnds = new google.maps.LatLngBounds(sw, ne); + } + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "none"; + } + if (this.visualEnabled_) { + this.buttonDiv_.firstChild.style.left = -(this.visualSize_.width * 2) + "px"; + this.buttonDiv_.title = this.visualTips_.off; + this.buttonDiv_.style.display = ""; + } + /** + * This event is fired when the hot key is released. + * The parameter passed is the geographic bounds of the selected area immediately + * before the hot key was released. + * @name DragZoom#deactivate + * @param {LatLngBounds} bnds The geographic bounds of the selected area immediately + * before the hot key was released. + * @event + */ + google.maps.event.trigger(this, "deactivate", bnds); + } + }; + /** + * @name google.maps.Map + * @class These are new methods added to the Google Maps JavaScript API V3's + * Map + * class. + */ + /** + * Enables drag zoom. The user can zoom to an area of interest by holding down the hot key + * (shift | ctrl | alt ) while dragging a box around the area or by turning + * on the visual control then dragging a box around the area. + * @param {KeyDragZoomOptions} opt_zoomOpts The optional parameters. + */ + google.maps.Map.prototype.enableKeyDragZoom = function (opt_zoomOpts) { + this.dragZoom_ = new DragZoom(this, opt_zoomOpts); + }; + /** + * Disables drag zoom. + */ + google.maps.Map.prototype.disableKeyDragZoom = function () { + var i; + var d = this.dragZoom_; + if (d) { + for (i = 0; i < d.listeners_.length; ++i) { + google.maps.event.removeListener(d.listeners_[i]); + } + this.getDiv().removeChild(d.boxDiv_); + for (i = 0; i < d.veilDiv_.length; i++) { + this.getDiv().removeChild(d.veilDiv_[i]); + } + if (d.visualEnabled_) { + // Remove the custom control: + this.controls[d.visualPosition_].removeAt(d.controlIndex_); + } + d.prjov_.setMap(null); + this.dragZoom_ = null; + } + }; + /** + * Returns true if the drag zoom feature has been enabled. + * @return {boolean} + */ + google.maps.Map.prototype.keyDragZoomEnabled = function () { + return this.dragZoom_ !== null; + }; + /** + * Returns the DragZoom object which is created when google.maps.Map.enableKeyDragZoom is called. + * With this object you can use google.maps.event.addListener to attach event listeners + * for the "activate", "deactivate", "dragstart", "drag", and "dragend" events. + * @return {DragZoom} + */ + google.maps.Map.prototype.getDragZoomObject = function () { + return this.dragZoom_; + }; +})(); + +/** + * google-maps-utility-library-v3-markerwithlabel + * + * @version: 1.1.10 + * @author: Gary Little (inspired by code from Marc Ridey of Google). + * @contributors: Nicholas McCready + * @date: Fri May 13 2016 16:29:58 GMT-0400 (EDT) + * @license: Apache License 2.0 + */ +/** + * MarkerWithLabel allows you to define markers with associated labels. As you would expect, + * if the marker is draggable, so too will be the label. In addition, a marker with a label + * responds to all mouse events in the same manner as a regular marker. It also fires mouse + * events and "property changed" events just as a regular marker would. Version 1.1 adds + * support for the raiseOnDrag feature introduced in API V3.3. + *

+ * If you drag a marker by its label, you can cancel the drag and return the marker to its + * original position by pressing the Esc key. This doesn't work if you drag the marker + * itself because this feature is not (yet) supported in the google.maps.Marker class. + */ + +/*jslint browser:true */ +/*global document,google */ + +/** + * @param {Function} childCtor Child class. + * @param {Function} parentCtor Parent class. + * @private + */ +function inherits(childCtor, parentCtor) { + /* @constructor */ + function tempCtor() {} + tempCtor.prototype = parentCtor.prototype; + childCtor.superClass_ = parentCtor.prototype; + childCtor.prototype = new tempCtor(); + /* @override */ + childCtor.prototype.constructor = childCtor; +} + +/** + * This constructor creates a label and associates it with a marker. + * It is for the private use of the MarkerWithLabel class. + * @constructor + * @param {Marker} marker The marker with which the label is to be associated. + * @param {string} crossURL The URL of the cross image =. + * @param {string} handCursor The URL of the hand cursor. + * @private + */ +function MarkerLabel_(marker, crossURL, handCursorURL) { + this.marker_ = marker; + this.handCursorURL_ = marker.handCursorURL; + + this.labelDiv_ = document.createElement("div"); + this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;"; + + // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil + // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that + // events can be captured even if the label is in the shadow of a google.maps.InfoWindow. + // Code is included here to ensure the veil is always exactly the same size as the label. + this.eventDiv_ = document.createElement("div"); + this.eventDiv_.style.cssText = this.labelDiv_.style.cssText; + + // This is needed for proper behavior on MSIE: + this.eventDiv_.setAttribute("onselectstart", "return false;"); + this.eventDiv_.setAttribute("ondragstart", "return false;"); + + // Get the DIV for the "X" to be displayed when the marker is raised. + this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL); +} + +inherits(MarkerLabel_, google.maps.OverlayView); + +/** + * Returns the DIV for the cross used when dragging a marker when the + * raiseOnDrag parameter set to true. One cross is shared with all markers. + * @param {string} crossURL The URL of the cross image =. + * @private + */ +MarkerLabel_.getSharedCross = function (crossURL) { + var div; + if (typeof MarkerLabel_.getSharedCross.crossDiv === "undefined") { + div = document.createElement("img"); + div.style.cssText = "position: absolute; z-index: 1000002; display: none;"; + // Hopefully Google never changes the standard "X" attributes: + div.style.marginLeft = "-8px"; + div.style.marginTop = "-9px"; + div.src = crossURL; + MarkerLabel_.getSharedCross.crossDiv = div; + } + return MarkerLabel_.getSharedCross.crossDiv; +}; + +/** + * Adds the DIV representing the label to the DOM. This method is called + * automatically when the marker's setMap method is called. + * @private + */ +MarkerLabel_.prototype.onAdd = function () { + var me = this; + var cMouseIsDown = false; + var cDraggingLabel = false; + var cSavedZIndex; + var cLatOffset, cLngOffset; + var cIgnoreClick; + var cRaiseEnabled; + var cStartPosition; + var cStartCenter; + // Constants: + var cRaiseOffset = 20; + var cDraggingCursor = "url(" + this.handCursorURL_ + ")"; + + // Stops all processing of an event. + // + var cAbortEvent = function (e) { + if (e.preventDefault) { + e.preventDefault(); + } + e.cancelBubble = true; + if (e.stopPropagation) { + e.stopPropagation(); + } + }; + + var cStopBounce = function () { + me.marker_.setAnimation(null); + }; + + this.getPanes().overlayImage.appendChild(this.labelDiv_); + this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_); + // One cross is shared with all markers, so only add it once: + if (typeof MarkerLabel_.getSharedCross.processed === "undefined") { + this.getPanes().overlayImage.appendChild(this.crossDiv_); + MarkerLabel_.getSharedCross.processed = true; + } + + this.listeners_ = [ + google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + this.style.cursor = "pointer"; + google.maps.event.trigger(me.marker_, "mouseover", e); + } + }), + google.maps.event.addDomListener(this.eventDiv_, "mouseout", function (e) { + if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) { + this.style.cursor = me.marker_.getCursor(); + google.maps.event.trigger(me.marker_, "mouseout", e); + } + }), + google.maps.event.addDomListener(this.eventDiv_, "mousedown", function (e) { + cDraggingLabel = false; + if (me.marker_.getDraggable()) { + cMouseIsDown = true; + this.style.cursor = cDraggingCursor; + } + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + google.maps.event.trigger(me.marker_, "mousedown", e); + cAbortEvent(e); // Prevent map pan when starting a drag on a label + } + }), + google.maps.event.addDomListener(document, "mouseup", function (mEvent) { + var position; + if (cMouseIsDown) { + cMouseIsDown = false; + me.eventDiv_.style.cursor = "pointer"; + google.maps.event.trigger(me.marker_, "mouseup", mEvent); + } + if (cDraggingLabel) { + if (cRaiseEnabled) { // Lower the marker & label + position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition()); + position.y += cRaiseOffset; + me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); + // This is not the same bouncing style as when the marker portion is dragged, + // but it will have to do: + try { // Will fail if running Google Maps API earlier than V3.3 + me.marker_.setAnimation(google.maps.Animation.BOUNCE); + setTimeout(cStopBounce, 1406); + } catch (e) {} + } + me.crossDiv_.style.display = "none"; + me.marker_.setZIndex(cSavedZIndex); + cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag + cDraggingLabel = false; + mEvent.latLng = me.marker_.getPosition(); + google.maps.event.trigger(me.marker_, "dragend", mEvent); + } + }), + google.maps.event.addListener(me.marker_.getMap(), "mousemove", function (mEvent) { + var position; + if (cMouseIsDown) { + if (cDraggingLabel) { + // Change the reported location from the mouse position to the marker position: + mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset); + position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng); + if (cRaiseEnabled) { + me.crossDiv_.style.left = position.x + "px"; + me.crossDiv_.style.top = position.y + "px"; + me.crossDiv_.style.display = ""; + position.y -= cRaiseOffset; + } + me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); + if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly + me.eventDiv_.style.top = (position.y + cRaiseOffset) + "px"; + } + google.maps.event.trigger(me.marker_, "drag", mEvent); + } else { + // Calculate offsets from the click point to the marker position: + cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat(); + cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng(); + cSavedZIndex = me.marker_.getZIndex(); + cStartPosition = me.marker_.getPosition(); + cStartCenter = me.marker_.getMap().getCenter(); + cRaiseEnabled = me.marker_.get("raiseOnDrag"); + cDraggingLabel = true; + me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag + mEvent.latLng = me.marker_.getPosition(); + google.maps.event.trigger(me.marker_, "dragstart", mEvent); + } + } + }), + google.maps.event.addDomListener(document, "keydown", function (e) { + if (cDraggingLabel) { + if (e.keyCode === 27) { // Esc key + cRaiseEnabled = false; + me.marker_.setPosition(cStartPosition); + me.marker_.getMap().setCenter(cStartCenter); + google.maps.event.trigger(document, "mouseup", e); + } + } + }), + google.maps.event.addDomListener(this.eventDiv_, "click", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + if (cIgnoreClick) { // Ignore the click reported when a label drag ends + cIgnoreClick = false; + } else { + google.maps.event.trigger(me.marker_, "click", e); + cAbortEvent(e); // Prevent click from being passed on to map + } + } + }), + google.maps.event.addDomListener(this.eventDiv_, "dblclick", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + google.maps.event.trigger(me.marker_, "dblclick", e); + cAbortEvent(e); // Prevent map zoom when double-clicking on a label + } + }), + google.maps.event.addListener(this.marker_, "dragstart", function (mEvent) { + if (!cDraggingLabel) { + cRaiseEnabled = this.get("raiseOnDrag"); + } + }), + google.maps.event.addListener(this.marker_, "drag", function (mEvent) { + if (!cDraggingLabel) { + if (cRaiseEnabled) { + me.setPosition(cRaiseOffset); + // During a drag, the marker's z-index is temporarily set to 1000000 to + // ensure it appears above all other markers. Also set the label's z-index + // to 1000000 (plus or minus 1 depending on whether the label is supposed + // to be above or below the marker). + me.labelDiv_.style.zIndex = 1000000 + (this.get("labelInBackground") ? -1 : +1); + } + } + }), + google.maps.event.addListener(this.marker_, "dragend", function (mEvent) { + if (!cDraggingLabel) { + if (cRaiseEnabled) { + me.setPosition(0); // Also restores z-index of label + } + } + }), + google.maps.event.addListener(this.marker_, "position_changed", function () { + me.setPosition(); + }), + google.maps.event.addListener(this.marker_, "zindex_changed", function () { + me.setZIndex(); + }), + google.maps.event.addListener(this.marker_, "visible_changed", function () { + me.setVisible(); + }), + google.maps.event.addListener(this.marker_, "labelvisible_changed", function () { + me.setVisible(); + }), + google.maps.event.addListener(this.marker_, "title_changed", function () { + me.setTitle(); + }), + google.maps.event.addListener(this.marker_, "labelcontent_changed", function () { + me.setContent(); + }), + google.maps.event.addListener(this.marker_, "labelanchor_changed", function () { + me.setAnchor(); + }), + google.maps.event.addListener(this.marker_, "labelclass_changed", function () { + me.setStyles(); + }), + google.maps.event.addListener(this.marker_, "labelstyle_changed", function () { + me.setStyles(); + }) + ]; +}; + +/** + * Removes the DIV for the label from the DOM. It also removes all event handlers. + * This method is called automatically when the marker's setMap(null) + * method is called. + * @private + */ +MarkerLabel_.prototype.onRemove = function () { + var i; + this.labelDiv_.parentNode.removeChild(this.labelDiv_); + this.eventDiv_.parentNode.removeChild(this.eventDiv_); + + // Remove event listeners: + for (i = 0; i < this.listeners_.length; i++) { + google.maps.event.removeListener(this.listeners_[i]); + } +}; + +/** + * Draws the label on the map. + * @private + */ +MarkerLabel_.prototype.draw = function () { + this.setContent(); + this.setTitle(); + this.setStyles(); +}; + +/** + * Sets the content of the label. + * The content can be plain text or an HTML DOM node. + * @private + */ +MarkerLabel_.prototype.setContent = function () { + var content = this.marker_.get("labelContent"); + if (typeof content.nodeType === "undefined") { + this.labelDiv_.innerHTML = content; + this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; + } else { + this.labelDiv_.innerHTML = ""; // Remove current content + this.labelDiv_.appendChild(content); + content = content.cloneNode(true); + this.eventDiv_.innerHTML = ""; // Remove current content + this.eventDiv_.appendChild(content); + } +}; + +/** + * Sets the content of the tool tip for the label. It is + * always set to be the same as for the marker itself. + * @private + */ +MarkerLabel_.prototype.setTitle = function () { + this.eventDiv_.title = this.marker_.getTitle() || ""; +}; + +/** + * Sets the style of the label by setting the style sheet and applying + * other specific styles requested. + * @private + */ +MarkerLabel_.prototype.setStyles = function () { + var i, labelStyle; + + // Apply style values from the style sheet defined in the labelClass parameter: + this.labelDiv_.className = this.marker_.get("labelClass"); + this.eventDiv_.className = this.labelDiv_.className; + + // Clear existing inline style values: + this.labelDiv_.style.cssText = ""; + this.eventDiv_.style.cssText = ""; + // Apply style values defined in the labelStyle parameter: + labelStyle = this.marker_.get("labelStyle"); + for (i in labelStyle) { + if (labelStyle.hasOwnProperty(i)) { + this.labelDiv_.style[i] = labelStyle[i]; + this.eventDiv_.style[i] = labelStyle[i]; + } + } + this.setMandatoryStyles(); +}; + +/** + * Sets the mandatory styles to the DIV representing the label as well as to the + * associated event DIV. This includes setting the DIV position, z-index, and visibility. + * @private + */ +MarkerLabel_.prototype.setMandatoryStyles = function () { + this.labelDiv_.style.position = "absolute"; + this.labelDiv_.style.overflow = "hidden"; + // Make sure the opacity setting causes the desired effect on MSIE: + if (typeof this.labelDiv_.style.opacity !== "undefined" && this.labelDiv_.style.opacity !== "") { + this.labelDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")\""; + this.labelDiv_.style.filter = "alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")"; + } + + this.eventDiv_.style.position = this.labelDiv_.style.position; + this.eventDiv_.style.overflow = this.labelDiv_.style.overflow; + this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE + this.eventDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\""; + this.eventDiv_.style.filter = "alpha(opacity=1)"; // For MSIE + + this.setAnchor(); + this.setPosition(); // This also updates z-index, if necessary. + this.setVisible(); +}; + +/** + * Sets the anchor point of the label. + * @private + */ +MarkerLabel_.prototype.setAnchor = function () { + var anchor = this.marker_.get("labelAnchor"); + this.labelDiv_.style.marginLeft = -anchor.x + "px"; + this.labelDiv_.style.marginTop = -anchor.y + "px"; + this.eventDiv_.style.marginLeft = -anchor.x + "px"; + this.eventDiv_.style.marginTop = -anchor.y + "px"; +}; + +/** + * Sets the position of the label. The z-index is also updated, if necessary. + * @private + */ +MarkerLabel_.prototype.setPosition = function (yOffset) { + var position = this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition()); + if (typeof yOffset === "undefined") { + yOffset = 0; + } + this.labelDiv_.style.left = Math.round(position.x) + "px"; + this.labelDiv_.style.top = Math.round(position.y - yOffset) + "px"; + this.eventDiv_.style.left = this.labelDiv_.style.left; + this.eventDiv_.style.top = this.labelDiv_.style.top; + + this.setZIndex(); +}; + +/** + * Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index + * of the label is set to the vertical coordinate of the label. This is in keeping with the default + * stacking order for Google Maps: markers to the south are in front of markers to the north. + * @private + */ +MarkerLabel_.prototype.setZIndex = function () { + var zAdjust = (this.marker_.get("labelInBackground") ? -1 : +1); + if (typeof this.marker_.getZIndex() === "undefined") { + this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust; + this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; + } else { + this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust; + this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; + } +}; + +/** + * Sets the visibility of the label. The label is visible only if the marker itself is + * visible (i.e., its visible property is true) and the labelVisible property is true. + * @private + */ +MarkerLabel_.prototype.setVisible = function () { + if (this.marker_.get("labelVisible")) { + this.labelDiv_.style.display = this.marker_.getVisible() ? "block" : "none"; + } else { + this.labelDiv_.style.display = "none"; + } + this.eventDiv_.style.display = this.labelDiv_.style.display; +}; + +/** + * @name MarkerWithLabelOptions + * @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor. + * The properties available are the same as for google.maps.Marker with the addition + * of the properties listed below. To change any of these additional properties after the labeled + * marker has been created, call google.maps.Marker.set(propertyName, propertyValue). + *

+ * When any of these properties changes, a property changed event is fired. The names of these + * events are derived from the name of the property and are of the form propertyname_changed. + * For example, if the content of the label changes, a labelcontent_changed event + * is fired. + *

+ * @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node). + * @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so + * that its top left corner is positioned at the anchor point of the associated marker. Use this + * property to change the anchor point of the label. For example, to center a 50px-wide label + * beneath a marker, specify a labelAnchor of google.maps.Point(25, 0). + * (Note: x-values increase to the right and y-values increase to the top.) + * @property {string} [labelClass] The name of the CSS class defining the styles for the label. + * Note that style values for position, overflow, top, + * left, zIndex, display, marginLeft, and + * marginTop are ignored; these styles are for internal use only. + * @property {Object} [labelStyle] An object literal whose properties define specific CSS + * style values to be applied to the label. Style values defined here override those that may + * be defined in the labelClass style sheet. If this property is changed after the + * label has been created, all previously set styles (except those defined in the style sheet) + * are removed from the label before the new style values are applied. + * Note that style values for position, overflow, top, + * left, zIndex, display, marginLeft, and + * marginTop are ignored; these styles are for internal use only. + * @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its + * associated marker should appear in the background (i.e., in a plane below the marker). + * The default is false, which causes the label to appear in the foreground. + * @property {boolean} [labelVisible] A flag indicating whether the label is to be visible. + * The default is true. Note that even if labelVisible is + * true, the label will not be visible unless the associated marker is also + * visible (i.e., unless the marker's visible property is true). + * @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be + * raised when the marker is dragged. The default is true. If a draggable marker is + * being created and a version of Google Maps API earlier than V3.3 is being used, this property + * must be set to false. + * @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the + * marker. Important: The optimized rendering technique is not supported by MarkerWithLabel, + * so the value of this parameter is always forced to false. + * @property {string} [crossImage="http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"] + * The URL of the cross image to be displayed while dragging a marker. + * @property {string} [handCursor="http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"] + * The URL of the cursor to be displayed while dragging a marker. + */ +/** + * Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}. + * @constructor + * @param {MarkerWithLabelOptions} [opt_options] The optional parameters. + */ +function MarkerWithLabel(opt_options) { + opt_options = opt_options || {}; + opt_options.labelContent = opt_options.labelContent || ""; + opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0); + opt_options.labelClass = opt_options.labelClass || "markerLabels"; + opt_options.labelStyle = opt_options.labelStyle || {}; + opt_options.labelInBackground = opt_options.labelInBackground || false; + if (typeof opt_options.labelVisible === "undefined") { + opt_options.labelVisible = true; + } + if (typeof opt_options.raiseOnDrag === "undefined") { + opt_options.raiseOnDrag = true; + } + if (typeof opt_options.clickable === "undefined") { + opt_options.clickable = true; + } + if (typeof opt_options.draggable === "undefined") { + opt_options.draggable = false; + } + if (typeof opt_options.optimized === "undefined") { + opt_options.optimized = false; + } + opt_options.crossImage = opt_options.crossImage || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"; + opt_options.handCursor = opt_options.handCursor || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"; + opt_options.optimized = false; // Optimized rendering is not supported + + this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker + + // Call the parent constructor. It calls Marker.setValues to initialize, so all + // the new parameters are conveniently saved and can be accessed with get/set. + // Marker.set triggers a property changed event (called "propertyname_changed") + // that the marker label listens for in order to react to state changes. + google.maps.Marker.apply(this, arguments); +} + +inherits(MarkerWithLabel, google.maps.Marker); + +/** + * Overrides the standard Marker setMap function. + * @param {Map} theMap The map to which the marker is to be added. + * @private + */ +MarkerWithLabel.prototype.setMap = function (theMap) { + + // Call the inherited function... + google.maps.Marker.prototype.setMap.apply(this, arguments); + + // ... then deal with the label: + this.label.setMap(theMap); +}; + +// ==ClosureCompiler== +// @compilation_level ADVANCED_OPTIMIZATIONS +// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js +// @output_wrapper (function() {%output%})(); +// ==/ClosureCompiler== + +/** + * @license + * Copyright 2013 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A RichMarker that allows any HTML/DOM to be added to a map and be draggable. + * + * @param {Object.=} opt_options Optional properties to set. + * @extends {google.maps.OverlayView} + * @constructor + */ +function RichMarker(opt_options) { + var options = opt_options || {}; + + /** + * @type {boolean} + * @private + */ + this.ready_ = false; + + /** + * @type {boolean} + * @private + */ + this.dragging_ = false; + + if (opt_options['visible'] == undefined) { + opt_options['visible'] = true; + } + + if (opt_options['shadow'] == undefined) { + opt_options['shadow'] = '7px -3px 5px rgba(88,88,88,0.7)'; + } + + if (opt_options['anchor'] == undefined) { + opt_options['anchor'] = RichMarkerPosition['BOTTOM']; + } + + this.setValues(options); +} +RichMarker.prototype = new google.maps.OverlayView(); +window['RichMarker'] = RichMarker; + + +/** + * Returns the current visibility state of the marker. + * + * @return {boolean} The visiblity of the marker. + */ +RichMarker.prototype.getVisible = function() { + return /** @type {boolean} */ (this.get('visible')); +}; +RichMarker.prototype['getVisible'] = RichMarker.prototype.getVisible; + + +/** + * Sets the visiblility state of the marker. + * + * @param {boolean} visible The visiblilty of the marker. + */ +RichMarker.prototype.setVisible = function(visible) { + this.set('visible', visible); +}; +RichMarker.prototype['setVisible'] = RichMarker.prototype.setVisible; + + +/** + * The visible changed event. + */ +RichMarker.prototype.visible_changed = function() { + if (this.ready_) { + this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none'; + this.draw(); + } +}; +RichMarker.prototype['visible_changed'] = RichMarker.prototype.visible_changed; + + +/** + * Sets the marker to be flat. + * + * @param {boolean} flat If the marker is to be flat or not. + */ +RichMarker.prototype.setFlat = function(flat) { + this.set('flat', !!flat); +}; +RichMarker.prototype['setFlat'] = RichMarker.prototype.setFlat; + + +/** + * If the makrer is flat or not. + * + * @return {boolean} True the marker is flat. + */ +RichMarker.prototype.getFlat = function() { + return /** @type {boolean} */ (this.get('flat')); +}; +RichMarker.prototype['getFlat'] = RichMarker.prototype.getFlat; + + +/** + * Get the width of the marker. + * + * @return {Number} The width of the marker. + */ +RichMarker.prototype.getWidth = function() { + return /** @type {Number} */ (this.get('width')); +}; +RichMarker.prototype['getWidth'] = RichMarker.prototype.getWidth; + + +/** + * Get the height of the marker. + * + * @return {Number} The height of the marker. + */ +RichMarker.prototype.getHeight = function() { + return /** @type {Number} */ (this.get('height')); +}; +RichMarker.prototype['getHeight'] = RichMarker.prototype.getHeight; + + +/** + * Sets the marker's box shadow. + * + * @param {string} shadow The box shadow to set. + */ +RichMarker.prototype.setShadow = function(shadow) { + this.set('shadow', shadow); + this.flat_changed(); +}; +RichMarker.prototype['setShadow'] = RichMarker.prototype.setShadow; + + +/** + * Gets the marker's box shadow. + * + * @return {string} The box shadow. + */ +RichMarker.prototype.getShadow = function() { + return /** @type {string} */ (this.get('shadow')); +}; +RichMarker.prototype['getShadow'] = RichMarker.prototype.getShadow; + + +/** + * Flat changed event. + */ +RichMarker.prototype.flat_changed = function() { + if (!this.ready_) { + return; + } + + this.markerWrapper_.style['boxShadow'] = + this.markerWrapper_.style['webkitBoxShadow'] = + this.markerWrapper_.style['MozBoxShadow'] = + this.getFlat() ? '' : this.getShadow(); +}; +RichMarker.prototype['flat_changed'] = RichMarker.prototype.flat_changed; + + +/** + * Sets the zIndex of the marker. + * + * @param {Number} index The index to set. + */ +RichMarker.prototype.setZIndex = function(index) { + this.set('zIndex', index); +}; +RichMarker.prototype['setZIndex'] = RichMarker.prototype.setZIndex; + + +/** + * Gets the zIndex of the marker. + * + * @return {Number} The zIndex of the marker. + */ +RichMarker.prototype.getZIndex = function() { + return /** @type {Number} */ (this.get('zIndex')); +}; +RichMarker.prototype['getZIndex'] = RichMarker.prototype.getZIndex; + + +/** + * zIndex changed event. + */ +RichMarker.prototype.zIndex_changed = function() { + if (this.getZIndex() && this.ready_) { + this.markerWrapper_.style.zIndex = this.getZIndex(); + } +}; +RichMarker.prototype['zIndex_changed'] = RichMarker.prototype.zIndex_changed; + +/** + * Whether the marker is draggable or not. + * + * @return {boolean} True if the marker is draggable. + */ +RichMarker.prototype.getDraggable = function() { + return /** @type {boolean} */ (this.get('draggable')); +}; +RichMarker.prototype['getDraggable'] = RichMarker.prototype.getDraggable; + + +/** + * Sets the marker to be draggable or not. + * + * @param {boolean} draggable If the marker is draggable or not. + */ +RichMarker.prototype.setDraggable = function(draggable) { + this.set('draggable', !!draggable); +}; +RichMarker.prototype['setDraggable'] = RichMarker.prototype.setDraggable; + + +/** + * Draggable property changed callback. + */ +RichMarker.prototype.draggable_changed = function() { + if (this.ready_) { + if (this.getDraggable()) { + this.addDragging_(this.markerWrapper_); + } else { + this.removeDragListeners_(); + } + } +}; +RichMarker.prototype['draggable_changed'] = + RichMarker.prototype.draggable_changed; + + +/** + * Gets the postiton of the marker. + * + * @return {google.maps.LatLng} The position of the marker. + */ +RichMarker.prototype.getPosition = function() { + return /** @type {google.maps.LatLng} */ (this.get('position')); +}; +RichMarker.prototype['getPosition'] = RichMarker.prototype.getPosition; + + +/** + * Sets the position of the marker. + * + * @param {google.maps.LatLng} position The position to set. + */ +RichMarker.prototype.setPosition = function(position) { + this.set('position', position); +}; +RichMarker.prototype['setPosition'] = RichMarker.prototype.setPosition; + + +/** + * Position changed event. + */ +RichMarker.prototype.position_changed = function() { + this.draw(); +}; +RichMarker.prototype['position_changed'] = + RichMarker.prototype.position_changed; + + +/** + * Gets the anchor. + * + * @return {google.maps.Size} The position of the anchor. + */ +RichMarker.prototype.getAnchor = function() { + return /** @type {google.maps.Size} */ (this.get('anchor')); +}; +RichMarker.prototype['getAnchor'] = RichMarker.prototype.getAnchor; + + +/** + * Sets the anchor. + * + * @param {RichMarkerPosition|google.maps.Size} anchor The anchor to set. + */ +RichMarker.prototype.setAnchor = function(anchor) { + this.set('anchor', anchor); +}; +RichMarker.prototype['setAnchor'] = RichMarker.prototype.setAnchor; + + +/** + * Anchor changed event. + */ +RichMarker.prototype.anchor_changed = function() { + this.draw(); +}; +RichMarker.prototype['anchor_changed'] = RichMarker.prototype.anchor_changed; + + +/** + * Converts a HTML string to a document fragment. + * + * @param {string} htmlString The HTML string to convert. + * @return {Node} A HTML document fragment. + * @private + */ +RichMarker.prototype.htmlToDocumentFragment_ = function(htmlString) { + var tempDiv = document.createElement('DIV'); + tempDiv.innerHTML = htmlString; + if (tempDiv.childNodes.length == 1) { + return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild)); + } else { + var fragment = document.createDocumentFragment(); + while (tempDiv.firstChild) { + fragment.appendChild(tempDiv.firstChild); + } + return fragment; + } +}; + + +/** + * Removes all children from the node. + * + * @param {Node} node The node to remove all children from. + * @private + */ +RichMarker.prototype.removeChildren_ = function(node) { + if (!node) { + return; + } + + var child; + while (child = node.firstChild) { + node.removeChild(child); + } +}; + + +/** + * Sets the content of the marker. + * + * @param {string|Node} content The content to set. + */ +RichMarker.prototype.setContent = function(content) { + this.set('content', content); +}; +RichMarker.prototype['setContent'] = RichMarker.prototype.setContent; + + +/** + * Get the content of the marker. + * + * @return {string|Node} The marker content. + */ +RichMarker.prototype.getContent = function() { + return /** @type {Node|string} */ (this.get('content')); +}; +RichMarker.prototype['getContent'] = RichMarker.prototype.getContent; + + +/** + * Sets the marker content and adds loading events to images + */ +RichMarker.prototype.content_changed = function() { + if (!this.markerContent_) { + // Marker content area doesnt exist. + return; + } + + this.removeChildren_(this.markerContent_); + var content = this.getContent(); + if (content) { + if (typeof content == 'string') { + content = content.replace(/^\s*([\S\s]*)\b\s*$/, '$1'); + content = this.htmlToDocumentFragment_(content); + } + this.markerContent_.appendChild(content); + + var that = this; + var images = this.markerContent_.getElementsByTagName('IMG'); + for (var i = 0, image; image = images[i]; i++) { + // By default, a browser lets a image be dragged outside of the browser, + // so by calling preventDefault we stop this behaviour and allow the image + // to be dragged around the map and now out of the browser and onto the + // desktop. + google.maps.event.addDomListener(image, 'mousedown', function(e) { + if (that.getDraggable()) { + if (e.preventDefault) { + e.preventDefault(); + } + e.returnValue = false; + } + }); + + // Because we don't know the size of an image till it loads, add a + // listener to the image load so the marker can resize and reposition + // itself to be the correct height. + google.maps.event.addDomListener(image, 'load', function() { + that.draw(); + }); + } + + google.maps.event.trigger(this, 'domready'); + } + + if (this.ready_) { + this.draw(); + } +}; +RichMarker.prototype['content_changed'] = RichMarker.prototype.content_changed; + +/** + * Sets the cursor. + * + * @param {string} whichCursor What cursor to show. + * @private + */ +RichMarker.prototype.setCursor_ = function(whichCursor) { + if (!this.ready_) { + return; + } + + var cursor = ''; + if (navigator.userAgent.indexOf('Gecko/') !== -1) { + // Moz has some nice cursors :) + if (whichCursor == 'dragging') { + cursor = '-moz-grabbing'; + } + + if (whichCursor == 'dragready') { + cursor = '-moz-grab'; + } + + if (whichCursor == 'draggable') { + cursor = 'pointer'; + } + } else { + if (whichCursor == 'dragging' || whichCursor == 'dragready') { + cursor = 'move'; + } + + if (whichCursor == 'draggable') { + cursor = 'pointer'; + } + } + + if (this.markerWrapper_.style.cursor != cursor) { + this.markerWrapper_.style.cursor = cursor; + } +}; + +/** + * Start dragging. + * + * @param {Event} e The event. + */ +RichMarker.prototype.startDrag = function(e) { + if (!this.getDraggable()) { + return; + } + + if (!this.dragging_) { + this.dragging_ = true; + var map = this.getMap(); + this.mapDraggable_ = map.get('draggable'); + map.set('draggable', false); + + // Store the current mouse position + this.mouseX_ = e.clientX; + this.mouseY_ = e.clientY; + + this.setCursor_('dragready'); + + // Stop the text from being selectable while being dragged + this.markerWrapper_.style['MozUserSelect'] = 'none'; + this.markerWrapper_.style['KhtmlUserSelect'] = 'none'; + this.markerWrapper_.style['WebkitUserSelect'] = 'none'; + + this.markerWrapper_['unselectable'] = 'on'; + this.markerWrapper_['onselectstart'] = function() { + return false; + }; + + this.addDraggingListeners_(); + + google.maps.event.trigger(this, 'dragstart'); + } +}; + + +/** + * Stop dragging. + */ +RichMarker.prototype.stopDrag = function() { + if (!this.getDraggable()) { + return; + } + + if (this.dragging_) { + this.dragging_ = false; + this.getMap().set('draggable', this.mapDraggable_); + this.mouseX_ = this.mouseY_ = this.mapDraggable_ = null; + + // Allow the text to be selectable again + this.markerWrapper_.style['MozUserSelect'] = ''; + this.markerWrapper_.style['KhtmlUserSelect'] = ''; + this.markerWrapper_.style['WebkitUserSelect'] = ''; + this.markerWrapper_['unselectable'] = 'off'; + this.markerWrapper_['onselectstart'] = function() {}; + + this.removeDraggingListeners_(); + + this.setCursor_('draggable'); + google.maps.event.trigger(this, 'dragend'); + + this.draw(); + } +}; + + +/** + * Handles the drag event. + * + * @param {Event} e The event. + */ +RichMarker.prototype.drag = function(e) { + if (!this.getDraggable() || !this.dragging_) { + // This object isn't draggable or we have stopped dragging + this.stopDrag(); + return; + } + + var dx = this.mouseX_ - e.clientX; + var dy = this.mouseY_ - e.clientY; + + this.mouseX_ = e.clientX; + this.mouseY_ = e.clientY; + + var left = parseInt(this.markerWrapper_.style['left'], 10) - dx; + var top = parseInt(this.markerWrapper_.style['top'], 10) - dy; + + this.markerWrapper_.style['left'] = left + 'px'; + this.markerWrapper_.style['top'] = top + 'px'; + + var offset = this.getOffset_(); + + // Set the position property and adjust for the anchor offset + var point = new google.maps.Point(left - offset.width, top - offset.height); + var projection = this.getProjection(); + this.setPosition(projection.fromDivPixelToLatLng(point)); + + this.setCursor_('dragging'); + google.maps.event.trigger(this, 'drag'); +}; + + +/** + * Removes the drag listeners associated with the marker. + * + * @private + */ +RichMarker.prototype.removeDragListeners_ = function() { + if (this.draggableListener_) { + google.maps.event.removeListener(this.draggableListener_); + delete this.draggableListener_; + } + this.setCursor_(''); +}; + + +/** + * Add dragability events to the marker. + * + * @param {Node} node The node to apply dragging to. + * @private + */ +RichMarker.prototype.addDragging_ = function(node) { + if (!node) { + return; + } + + var that = this; + this.draggableListener_ = + google.maps.event.addDomListener(node, 'mousedown', function(e) { + that.startDrag(e); + }); + + this.setCursor_('draggable'); +}; + + +/** + * Add dragging listeners. + * + * @private + */ +RichMarker.prototype.addDraggingListeners_ = function() { + var that = this; + if (this.markerWrapper_.setCapture) { + this.markerWrapper_.setCapture(true); + this.draggingListeners_ = [ + google.maps.event.addDomListener(this.markerWrapper_, 'mousemove', function(e) { + that.drag(e); + }, true), + google.maps.event.addDomListener(this.markerWrapper_, 'mouseup', function() { + that.stopDrag(); + that.markerWrapper_.releaseCapture(); + }, true) + ]; + } else { + this.draggingListeners_ = [ + google.maps.event.addDomListener(window, 'mousemove', function(e) { + that.drag(e); + }, true), + google.maps.event.addDomListener(window, 'mouseup', function() { + that.stopDrag(); + }, true) + ]; + } +}; + + +/** + * Remove dragging listeners. + * + * @private + */ +RichMarker.prototype.removeDraggingListeners_ = function() { + if (this.draggingListeners_) { + for (var i = 0, listener; listener = this.draggingListeners_[i]; i++) { + google.maps.event.removeListener(listener); + } + this.draggingListeners_.length = 0; + } +}; + + +/** + * Get the anchor offset. + * + * @return {google.maps.Size} The size offset. + * @private + */ +RichMarker.prototype.getOffset_ = function() { + var anchor = this.getAnchor(); + if (typeof anchor == 'object') { + return /** @type {google.maps.Size} */ (anchor); + } + + var offset = new google.maps.Size(0, 0); + if (!this.markerContent_) { + return offset; + } + + var width = this.markerContent_.offsetWidth; + var height = this.markerContent_.offsetHeight; + + switch (anchor) { + case RichMarkerPosition['TOP_LEFT']: + break; + case RichMarkerPosition['TOP']: + offset.width = -width / 2; + break; + case RichMarkerPosition['TOP_RIGHT']: + offset.width = -width; + break; + case RichMarkerPosition['LEFT']: + offset.height = -height / 2; + break; + case RichMarkerPosition['MIDDLE']: + offset.width = -width / 2; + offset.height = -height / 2; + break; + case RichMarkerPosition['RIGHT']: + offset.width = -width; + offset.height = -height / 2; + break; + case RichMarkerPosition['BOTTOM_LEFT']: + offset.height = -height; + break; + case RichMarkerPosition['BOTTOM']: + offset.width = -width / 2; + offset.height = -height; + break; + case RichMarkerPosition['BOTTOM_RIGHT']: + offset.width = -width; + offset.height = -height; + break; + } + + return offset; +}; + + +/** + * Adding the marker to a map. + * Implementing the interface. + */ +RichMarker.prototype.onAdd = function() { + if (!this.markerWrapper_) { + this.markerWrapper_ = document.createElement('DIV'); + this.markerWrapper_.style['position'] = 'absolute'; + } + + if (this.getZIndex()) { + this.markerWrapper_.style['zIndex'] = this.getZIndex(); + } + + this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none'; + + if (!this.markerContent_) { + this.markerContent_ = document.createElement('DIV'); + this.markerWrapper_.appendChild(this.markerContent_); + + var that = this; + google.maps.event.addDomListener(this.markerContent_, 'click', function(e) { + google.maps.event.trigger(that, 'click'); + }); + google.maps.event.addDomListener(this.markerContent_, 'mouseover', function(e) { + google.maps.event.trigger(that, 'mouseover'); + }); + google.maps.event.addDomListener(this.markerContent_, 'mouseout', function(e) { + google.maps.event.trigger(that, 'mouseout'); + }); + } + + this.ready_ = true; + this.content_changed(); + this.flat_changed(); + this.draggable_changed(); + + var panes = this.getPanes(); + if (panes) { + panes.overlayMouseTarget.appendChild(this.markerWrapper_); + } + + google.maps.event.trigger(this, 'ready'); +}; +RichMarker.prototype['onAdd'] = RichMarker.prototype.onAdd; + + +/** + * Impelementing the interface. + */ +RichMarker.prototype.draw = function() { + if (!this.ready_ || this.dragging_) { + return; + } + + var projection = this.getProjection(); + + if (!projection) { + // The map projection is not ready yet so do nothing + return; + } + + var latLng = /** @type {google.maps.LatLng} */ (this.get('position')); + var pos = projection.fromLatLngToDivPixel(latLng); + + var offset = this.getOffset_(); + this.markerWrapper_.style['top'] = (pos.y + offset.height) + 'px'; + this.markerWrapper_.style['left'] = (pos.x + offset.width) + 'px'; + + var height = this.markerContent_.offsetHeight; + var width = this.markerContent_.offsetWidth; + + if (width != this.get('width')) { + this.set('width', width); + } + + if (height != this.get('height')) { + this.set('height', height); + } +}; +RichMarker.prototype['draw'] = RichMarker.prototype.draw; + + +/** + * Removing a marker from the map. + * Implementing the interface. + */ +RichMarker.prototype.onRemove = function() { + if (this.markerWrapper_ && this.markerWrapper_.parentNode) { + this.markerWrapper_.parentNode.removeChild(this.markerWrapper_); + } + this.removeDragListeners_(); +}; +RichMarker.prototype['onRemove'] = RichMarker.prototype.onRemove; + + +/** + * RichMarker Anchor positions + * @enum {number} + */ +var RichMarkerPosition = { + 'TOP_LEFT': 1, + 'TOP': 2, + 'TOP_RIGHT': 3, + 'LEFT': 4, + 'MIDDLE': 5, + 'RIGHT': 6, + 'BOTTOM_LEFT': 7, + 'BOTTOM': 8, + 'BOTTOM_RIGHT': 9 +}; +window['RichMarkerPosition'] = RichMarkerPosition; + + + //TODO: export / passthese on in the service instead of window + window.InfoBox = InfoBox; + window.Cluster = Cluster; + window.ClusterIcon = ClusterIcon; + window.MarkerClusterer = MarkerClusterer; + window.MarkerLabel_ = MarkerLabel_; + window.MarkerWithLabel = MarkerWithLabel; + window.RichMarker = RichMarker; + }(); + //END REPLACE + }) + }; +}); +;/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* istanbul ignore next */ + angular.module('uiGmapgoogle-maps.wrapped') + .service('uiGmapDataStructures', function() { + return { + Graph: __webpack_require__(1).Graph, + Queue: __webpack_require__(1).Queue + }; + }); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + (function() { + module.exports = { + Graph: __webpack_require__(2), + Heap: __webpack_require__(3), + LinkedList: __webpack_require__(4), + Map: __webpack_require__(5), + Queue: __webpack_require__(6), + RedBlackTree: __webpack_require__(7), + Trie: __webpack_require__(8) + }; + + }).call(this); + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /* + Graph implemented as a modified incidence list. O(1) for every typical + operation except `removeNode()` at O(E) where E is the number of edges. + + ## Overview example: + + ```js + var graph = new Graph; + graph.addNode('A'); // => a node object. For more info, log the output or check + // the documentation for addNode + graph.addNode('B'); + graph.addNode('C'); + graph.addEdge('A', 'C'); // => an edge object + graph.addEdge('A', 'B'); + graph.getEdge('B', 'A'); // => undefined. Directed edge! + graph.getEdge('A', 'B'); // => the edge object previously added + graph.getEdge('A', 'B').weight = 2 // weight is the only built-in handy property + // of an edge object. Feel free to attach + // other properties + graph.getInEdgesOf('B'); // => array of edge objects, in this case only one; + // connecting A to B + graph.getOutEdgesOf('A'); // => array of edge objects, one to B and one to C + graph.getAllEdgesOf('A'); // => all the in and out edges. Edge directed toward + // the node itself are only counted once + forEachNode(function(nodeObject) { + console.log(node); + }); + forEachEdge(function(edgeObject) { + console.log(edgeObject); + }); + graph.removeNode('C'); // => 'C'. The edge between A and C also removed + graph.removeEdge('A', 'B'); // => the edge object removed + ``` + + ## Properties: + + - nodeSize: total number of nodes. + - edgeSize: total number of edges. + */ + + + (function() { + var Graph, + __hasProp = {}.hasOwnProperty; + + Graph = (function() { + function Graph() { + this._nodes = {}; + this.nodeSize = 0; + this.edgeSize = 0; + } + + Graph.prototype.addNode = function(id) { + /* + The `id` is a unique identifier for the node, and should **not** change + after it's added. It will be used for adding, retrieving and deleting + related edges too. + + **Note** that, internally, the ids are kept in an object. JavaScript's + object hashes the id `'2'` and `2` to the same key, so please stick to a + simple id data type such as number or string. + + _Returns:_ the node object. Feel free to attach additional custom properties + on it for graph algorithms' needs. **Undefined if node id already exists**, + as to avoid accidental overrides. + */ + + if (!this._nodes[id]) { + this.nodeSize++; + return this._nodes[id] = { + _outEdges: {}, + _inEdges: {} + }; + } + }; + + Graph.prototype.getNode = function(id) { + /* + _Returns:_ the node object. Feel free to attach additional custom properties + on it for graph algorithms' needs. + */ + + return this._nodes[id]; + }; + + Graph.prototype.removeNode = function(id) { + /* + _Returns:_ the node object removed, or undefined if it didn't exist in the + first place. + */ + + var inEdgeId, nodeToRemove, outEdgeId, _ref, _ref1; + nodeToRemove = this._nodes[id]; + if (!nodeToRemove) { + return; + } else { + _ref = nodeToRemove._outEdges; + for (outEdgeId in _ref) { + if (!__hasProp.call(_ref, outEdgeId)) continue; + this.removeEdge(id, outEdgeId); + } + _ref1 = nodeToRemove._inEdges; + for (inEdgeId in _ref1) { + if (!__hasProp.call(_ref1, inEdgeId)) continue; + this.removeEdge(inEdgeId, id); + } + this.nodeSize--; + delete this._nodes[id]; + } + return nodeToRemove; + }; + + Graph.prototype.addEdge = function(fromId, toId, weight) { + var edgeToAdd, fromNode, toNode; + if (weight == null) { + weight = 1; + } + /* + `fromId` and `toId` are the node id specified when it was created using + `addNode()`. `weight` is optional and defaults to 1. Ignoring it effectively + makes this an unweighted graph. Under the hood, `weight` is just a normal + property of the edge object. + + _Returns:_ the edge object created. Feel free to attach additional custom + properties on it for graph algorithms' needs. **Or undefined** if the nodes + of id `fromId` or `toId` aren't found, or if an edge already exists between + the two nodes. + */ + + if (this.getEdge(fromId, toId)) { + return; + } + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + if (!fromNode || !toNode) { + return; + } + edgeToAdd = { + weight: weight + }; + fromNode._outEdges[toId] = edgeToAdd; + toNode._inEdges[fromId] = edgeToAdd; + this.edgeSize++; + return edgeToAdd; + }; + + Graph.prototype.getEdge = function(fromId, toId) { + /* + _Returns:_ the edge object, or undefined if the nodes of id `fromId` or + `toId` aren't found. + */ + + var fromNode, toNode; + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + if (!fromNode || !toNode) { + + } else { + return fromNode._outEdges[toId]; + } + }; + + Graph.prototype.removeEdge = function(fromId, toId) { + /* + _Returns:_ the edge object removed, or undefined of edge wasn't found. + */ + + var edgeToDelete, fromNode, toNode; + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + edgeToDelete = this.getEdge(fromId, toId); + if (!edgeToDelete) { + return; + } + delete fromNode._outEdges[toId]; + delete toNode._inEdges[fromId]; + this.edgeSize--; + return edgeToDelete; + }; + + Graph.prototype.getInEdgesOf = function(nodeId) { + /* + _Returns:_ an array of edge objects that are directed toward the node, or + empty array if no such edge or node exists. + */ + + var fromId, inEdges, toNode, _ref; + toNode = this._nodes[nodeId]; + inEdges = []; + _ref = toNode != null ? toNode._inEdges : void 0; + for (fromId in _ref) { + if (!__hasProp.call(_ref, fromId)) continue; + inEdges.push(this.getEdge(fromId, nodeId)); + } + return inEdges; + }; + + Graph.prototype.getOutEdgesOf = function(nodeId) { + /* + _Returns:_ an array of edge objects that go out of the node, or empty array + if no such edge or node exists. + */ + + var fromNode, outEdges, toId, _ref; + fromNode = this._nodes[nodeId]; + outEdges = []; + _ref = fromNode != null ? fromNode._outEdges : void 0; + for (toId in _ref) { + if (!__hasProp.call(_ref, toId)) continue; + outEdges.push(this.getEdge(nodeId, toId)); + } + return outEdges; + }; + + Graph.prototype.getAllEdgesOf = function(nodeId) { + /* + **Note:** not the same as concatenating `getInEdgesOf()` and + `getOutEdgesOf()`. Some nodes might have an edge pointing toward itself. + This method solves that duplication. + + _Returns:_ an array of edge objects linked to the node, no matter if they're + outgoing or coming. Duplicate edge created by self-pointing nodes are + removed. Only one copy stays. Empty array if node has no edge. + */ + + var i, inEdges, outEdges, selfEdge, _i, _ref, _ref1; + inEdges = this.getInEdgesOf(nodeId); + outEdges = this.getOutEdgesOf(nodeId); + if (inEdges.length === 0) { + return outEdges; + } + selfEdge = this.getEdge(nodeId, nodeId); + for (i = _i = 0, _ref = inEdges.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (inEdges[i] === selfEdge) { + _ref1 = [inEdges[inEdges.length - 1], inEdges[i]], inEdges[i] = _ref1[0], inEdges[inEdges.length - 1] = _ref1[1]; + inEdges.pop(); + break; + } + } + return inEdges.concat(outEdges); + }; + + Graph.prototype.forEachNode = function(operation) { + /* + Traverse through the graph in an arbitrary manner, visiting each node once. + Pass a function of the form `fn(nodeObject, nodeId)`. + + _Returns:_ undefined. + */ + + var nodeId, nodeObject, _ref; + _ref = this._nodes; + for (nodeId in _ref) { + if (!__hasProp.call(_ref, nodeId)) continue; + nodeObject = _ref[nodeId]; + operation(nodeObject, nodeId); + } + }; + + Graph.prototype.forEachEdge = function(operation) { + /* + Traverse through the graph in an arbitrary manner, visiting each edge once. + Pass a function of the form `fn(edgeObject)`. + + _Returns:_ undefined. + */ + + var edgeObject, nodeId, nodeObject, toId, _ref, _ref1; + _ref = this._nodes; + for (nodeId in _ref) { + if (!__hasProp.call(_ref, nodeId)) continue; + nodeObject = _ref[nodeId]; + _ref1 = nodeObject._outEdges; + for (toId in _ref1) { + if (!__hasProp.call(_ref1, toId)) continue; + edgeObject = _ref1[toId]; + operation(edgeObject); + } + } + }; + + return Graph; + + })(); + + module.exports = Graph; + + }).call(this); + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* + Minimum heap, i.e. smallest node at root. + + **Note:** does not accept null or undefined. This is by design. Those values + cause comparison problems and might report false negative during extraction. + + ## Overview example: + + ```js + var heap = new Heap([5, 6, 3, 4]); + heap.add(10); // => 10 + heap.removeMin(); // => 3 + heap.peekMin(); // => 4 + ``` + + ## Properties: + + - size: total number of items. + */ + + + (function() { + var Heap, _leftChild, _parent, _rightChild; + + Heap = (function() { + function Heap(dataToHeapify) { + var i, item, _i, _j, _len, _ref; + if (dataToHeapify == null) { + dataToHeapify = []; + } + /* + Pass an optional array to be heapified. Takes only O(n) time. + */ + + this._data = [void 0]; + for (_i = 0, _len = dataToHeapify.length; _i < _len; _i++) { + item = dataToHeapify[_i]; + if (item != null) { + this._data.push(item); + } + } + if (this._data.length > 1) { + for (i = _j = 2, _ref = this._data.length; 2 <= _ref ? _j < _ref : _j > _ref; i = 2 <= _ref ? ++_j : --_j) { + this._upHeap(i); + } + } + this.size = this._data.length - 1; + } + + Heap.prototype.add = function(value) { + /* + **Remember:** rejects null and undefined for mentioned reasons. + + _Returns:_ the value added. + */ + + if (value == null) { + return; + } + this._data.push(value); + this._upHeap(this._data.length - 1); + this.size++; + return value; + }; + + Heap.prototype.removeMin = function() { + /* + _Returns:_ the smallest item (the root). + */ + + var min; + if (this._data.length === 1) { + return; + } + this.size--; + if (this._data.length === 2) { + return this._data.pop(); + } + min = this._data[1]; + this._data[1] = this._data.pop(); + this._downHeap(); + return min; + }; + + Heap.prototype.peekMin = function() { + /* + Check the smallest item without removing it. + + _Returns:_ the smallest item (the root). + */ + + return this._data[1]; + }; + + Heap.prototype._upHeap = function(index) { + var valueHolder, _ref; + valueHolder = this._data[index]; + while (this._data[index] < this._data[_parent(index)] && index > 1) { + _ref = [this._data[_parent(index)], this._data[index]], this._data[index] = _ref[0], this._data[_parent(index)] = _ref[1]; + index = _parent(index); + } + }; + + Heap.prototype._downHeap = function() { + var currentIndex, smallerChildIndex, _ref; + currentIndex = 1; + while (_leftChild(currentIndex < this._data.length)) { + smallerChildIndex = _leftChild(currentIndex); + if (smallerChildIndex < this._data.length - 1) { + if (this._data[_rightChild(currentIndex)] < this._data[smallerChildIndex]) { + smallerChildIndex = _rightChild(currentIndex); + } + } + if (this._data[smallerChildIndex] < this._data[currentIndex]) { + _ref = [this._data[currentIndex], this._data[smallerChildIndex]], this._data[smallerChildIndex] = _ref[0], this._data[currentIndex] = _ref[1]; + currentIndex = smallerChildIndex; + } else { + break; + } + } + }; + + return Heap; + + })(); + + _parent = function(index) { + return index >> 1; + }; + + _leftChild = function(index) { + return index << 1; + }; + + _rightChild = function(index) { + return (index << 1) + 1; + }; + + module.exports = Heap; + + }).call(this); + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* + Doubly Linked. + + ## Overview example: + + ```js + var list = new LinkedList([5, 4, 9]); + list.add(12); // => 12 + list.head.next.value; // => 4 + list.tail.value; // => 12 + list.at(-1); // => 12 + list.removeAt(2); // => 9 + list.remove(4); // => 4 + list.indexOf(5); // => 0 + list.add(5, 1); // => 5. Second 5 at position 1. + list.indexOf(5, 1); // => 1 + ``` + + ## Properties: + + - head: first item. + - tail: last item. + - size: total number of items. + - item.value: value passed to the item when calling `add()`. + - item.prev: previous item. + - item.next: next item. + */ + + + (function() { + var LinkedList; + + LinkedList = (function() { + function LinkedList(valuesToAdd) { + var value, _i, _len; + if (valuesToAdd == null) { + valuesToAdd = []; + } + /* + Can pass an array of elements to link together during `new LinkedList()` + initiation. + */ + + this.head = { + prev: void 0, + value: void 0, + next: void 0 + }; + this.tail = { + prev: void 0, + value: void 0, + next: void 0 + }; + this.size = 0; + for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) { + value = valuesToAdd[_i]; + this.add(value); + } + } + + LinkedList.prototype.at = function(position) { + /* + Get the item at `position` (optional). Accepts negative index: + + ```js + myList.at(-1); // Returns the last element. + ``` + However, passing a negative index that surpasses the boundary will return + undefined: + + ```js + myList = new LinkedList([2, 6, 8, 3]) + myList.at(-5); // Undefined. + myList.at(-4); // 2. + ``` + _Returns:_ item gotten, or undefined if not found. + */ + + var currentNode, i, _i, _j, _ref; + if (!((-this.size <= position && position < this.size))) { + return; + } + position = this._adjust(position); + if (position * 2 < this.size) { + currentNode = this.head; + for (i = _i = 1; _i <= position; i = _i += 1) { + currentNode = currentNode.next; + } + } else { + currentNode = this.tail; + for (i = _j = 1, _ref = this.size - position - 1; _j <= _ref; i = _j += 1) { + currentNode = currentNode.prev; + } + } + return currentNode; + }; + + LinkedList.prototype.add = function(value, position) { + var currentNode, nodeToAdd, _ref, _ref1, _ref2; + if (position == null) { + position = this.size; + } + /* + Add a new item at `position` (optional). Defaults to adding at the end. + `position`, just like in `at()`, can be negative (within the negative + boundary). Position specifies the place the value's going to be, and the old + node will be pushed higher. `add(-2)` on list of size 7 is the same as + `add(5)`. + + _Returns:_ item added. + */ + + if (!((-this.size <= position && position <= this.size))) { + return; + } + nodeToAdd = { + value: value + }; + position = this._adjust(position); + if (this.size === 0) { + this.head = nodeToAdd; + } else { + if (position === 0) { + _ref = [nodeToAdd, this.head, nodeToAdd], this.head.prev = _ref[0], nodeToAdd.next = _ref[1], this.head = _ref[2]; + } else { + currentNode = this.at(position - 1); + _ref1 = [currentNode.next, nodeToAdd, nodeToAdd, currentNode], nodeToAdd.next = _ref1[0], (_ref2 = currentNode.next) != null ? _ref2.prev = _ref1[1] : void 0, currentNode.next = _ref1[2], nodeToAdd.prev = _ref1[3]; + } + } + if (position === this.size) { + this.tail = nodeToAdd; + } + this.size++; + return value; + }; + + LinkedList.prototype.removeAt = function(position) { + var currentNode, valueToReturn, _ref; + if (position == null) { + position = this.size - 1; + } + /* + Remove an item at index `position` (optional). Defaults to the last item. + Index can be negative (within the boundary). + + _Returns:_ item removed. + */ + + if (!((-this.size <= position && position < this.size))) { + return; + } + if (this.size === 0) { + return; + } + position = this._adjust(position); + if (this.size === 1) { + valueToReturn = this.head.value; + this.head.value = this.tail.value = void 0; + } else { + if (position === 0) { + valueToReturn = this.head.value; + this.head = this.head.next; + this.head.prev = void 0; + } else { + currentNode = this.at(position); + valueToReturn = currentNode.value; + currentNode.prev.next = currentNode.next; + if ((_ref = currentNode.next) != null) { + _ref.prev = currentNode.prev; + } + if (position === this.size - 1) { + this.tail = currentNode.prev; + } + } + } + this.size--; + return valueToReturn; + }; + + LinkedList.prototype.remove = function(value) { + /* + Remove the item using its value instead of position. **Will remove the fist + occurrence of `value`.** + + _Returns:_ the value, or undefined if value's not found. + */ + + var currentNode; + if (value == null) { + return; + } + currentNode = this.head; + while (currentNode && currentNode.value !== value) { + currentNode = currentNode.next; + } + if (!currentNode) { + return; + } + if (this.size === 1) { + this.head.value = this.tail.value = void 0; + } else if (currentNode === this.head) { + this.head = this.head.next; + this.head.prev = void 0; + } else if (currentNode === this.tail) { + this.tail = this.tail.prev; + this.tail.next = void 0; + } else { + currentNode.prev.next = currentNode.next; + currentNode.next.prev = currentNode.prev; + } + this.size--; + return value; + }; + + LinkedList.prototype.indexOf = function(value, startingPosition) { + var currentNode, position; + if (startingPosition == null) { + startingPosition = 0; + } + /* + Find the index of an item, similarly to `array.indexOf()`. Defaults to start + searching from the beginning, by can start at another position by passing + `startingPosition`. This parameter can also be negative; but unlike the + other methods of this class, `startingPosition` (optional) can be as small + as desired; a value of -999 for a list of size 5 will start searching + normally, at the beginning. + + **Note:** searches forwardly, **not** backwardly, i.e: + + ```js + var myList = new LinkedList([2, 3, 1, 4, 3, 5]) + myList.indexOf(3, -3); // Returns 4, not 1 + ``` + _Returns:_ index of item found, or -1 if not found. + */ + + if (((this.head.value == null) && !this.head.next) || startingPosition >= this.size) { + return -1; + } + startingPosition = Math.max(0, this._adjust(startingPosition)); + currentNode = this.at(startingPosition); + position = startingPosition; + while (currentNode) { + if (currentNode.value === value) { + break; + } + currentNode = currentNode.next; + position++; + } + if (position === this.size) { + return -1; + } else { + return position; + } + }; + + LinkedList.prototype._adjust = function(position) { + if (position < 0) { + return this.size + position; + } else { + return position; + } + }; + + return LinkedList; + + })(); + + module.exports = LinkedList; + + }).call(this); + + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /* + Kind of a stopgap measure for the upcoming [JavaScript + Map](http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets) + + **Note:** due to JavaScript's limitations, hashing something other than Boolean, + Number, String, Undefined, Null, RegExp, Function requires a hack that inserts a + hidden unique property into the object. This means `set`, `get`, `has` and + `delete` must employ the same object, and not a mere identical copy as in the + case of, say, a string. + + ## Overview example: + + ```js + var map = new Map({'alice': 'wonderland', 20: 'ok'}); + map.set('20', 5); // => 5 + map.get('20'); // => 5 + map.has('alice'); // => true + map.delete(20) // => true + var arr = [1, 2]; + map.add(arr, 'goody'); // => 'goody' + map.has(arr); // => true + map.has([1, 2]); // => false. Needs to compare by reference + map.forEach(function(key, value) { + console.log(key, value); + }); + ``` + + ## Properties: + + - size: The total number of `(key, value)` pairs. + */ + + + (function() { + var Map, SPECIAL_TYPE_KEY_PREFIX, _extractDataType, _isSpecialType, + __hasProp = {}.hasOwnProperty; + + SPECIAL_TYPE_KEY_PREFIX = '_mapId_'; + + Map = (function() { + Map._mapIdTracker = 0; + + Map._newMapId = function() { + return this._mapIdTracker++; + }; + + function Map(objectToMap) { + /* + Pass an optional object whose (key, value) pair will be hashed. **Careful** + not to pass something like {5: 'hi', '5': 'hello'}, since JavaScript's + native object behavior will crush the first 5 property before it gets to + constructor. + */ + + var key, value; + this._content = {}; + this._itemId = 0; + this._id = Map._newMapId(); + this.size = 0; + for (key in objectToMap) { + if (!__hasProp.call(objectToMap, key)) continue; + value = objectToMap[key]; + this.set(key, value); + } + } + + Map.prototype.hash = function(key, makeHash) { + var propertyForMap, type; + if (makeHash == null) { + makeHash = false; + } + /* + The hash function for hashing keys is public. Feel free to replace it with + your own. The `makeHash` parameter is optional and accepts a boolean + (defaults to `false`) indicating whether or not to produce a new hash (for + the first use, naturally). + + _Returns:_ the hash. + */ + + type = _extractDataType(key); + if (_isSpecialType(key)) { + propertyForMap = SPECIAL_TYPE_KEY_PREFIX + this._id; + if (makeHash && !key[propertyForMap]) { + key[propertyForMap] = this._itemId++; + } + return propertyForMap + '_' + key[propertyForMap]; + } else { + return type + '_' + key; + } + }; + + Map.prototype.set = function(key, value) { + /* + _Returns:_ value. + */ + + if (!this.has(key)) { + this.size++; + } + this._content[this.hash(key, true)] = [value, key]; + return value; + }; + + Map.prototype.get = function(key) { + /* + _Returns:_ value corresponding to the key, or undefined if not found. + */ + + var _ref; + return (_ref = this._content[this.hash(key)]) != null ? _ref[0] : void 0; + }; + + Map.prototype.has = function(key) { + /* + Check whether a value exists for the key. + + _Returns:_ true or false. + */ + + return this.hash(key) in this._content; + }; + + Map.prototype["delete"] = function(key) { + /* + Remove the (key, value) pair. + + _Returns:_ **true or false**. Unlike most of this library, this method + doesn't return the deleted value. This is so that it conforms to the future + JavaScript `map.delete()`'s behavior. + */ + + var hashedKey; + hashedKey = this.hash(key); + if (hashedKey in this._content) { + delete this._content[hashedKey]; + if (_isSpecialType(key)) { + delete key[SPECIAL_TYPE_KEY_PREFIX + this._id]; + } + this.size--; + return true; + } + return false; + }; + + Map.prototype.forEach = function(operation) { + /* + Traverse through the map. Pass a function of the form `fn(key, value)`. + + _Returns:_ undefined. + */ + + var key, value, _ref; + _ref = this._content; + for (key in _ref) { + if (!__hasProp.call(_ref, key)) continue; + value = _ref[key]; + operation(value[1], value[0]); + } + }; + + return Map; + + })(); + + _isSpecialType = function(key) { + var simpleHashableTypes, simpleType, type, _i, _len; + simpleHashableTypes = ['Boolean', 'Number', 'String', 'Undefined', 'Null', 'RegExp', 'Function']; + type = _extractDataType(key); + for (_i = 0, _len = simpleHashableTypes.length; _i < _len; _i++) { + simpleType = simpleHashableTypes[_i]; + if (type === simpleType) { + return false; + } + } + return true; + }; + + _extractDataType = function(type) { + return Object.prototype.toString.apply(type).match(/\[object (.+)\]/)[1]; + }; + + module.exports = Map; + + }).call(this); + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + /* + Amortized O(1) dequeue! + + ## Overview example: + + ```js + var queue = new Queue([1, 6, 4]); + queue.enqueue(10); // => 10 + queue.dequeue(); // => 1 + queue.dequeue(); // => 6 + queue.dequeue(); // => 4 + queue.peek(); // => 10 + queue.dequeue(); // => 10 + queue.peek(); // => undefined + ``` + + ## Properties: + + - size: The total number of items. + */ + + + (function() { + var Queue; + + Queue = (function() { + function Queue(initialArray) { + if (initialArray == null) { + initialArray = []; + } + /* + Pass an optional array to be transformed into a queue. The item at index 0 + is the first to be dequeued. + */ + + this._content = initialArray; + this._dequeueIndex = 0; + this.size = this._content.length; + } + + Queue.prototype.enqueue = function(item) { + /* + _Returns:_ the item. + */ + + this.size++; + this._content.push(item); + return item; + }; + + Queue.prototype.dequeue = function() { + /* + _Returns:_ the dequeued item. + */ + + var itemToDequeue; + if (this.size === 0) { + return; + } + this.size--; + itemToDequeue = this._content[this._dequeueIndex]; + this._dequeueIndex++; + if (this._dequeueIndex * 2 > this._content.length) { + this._content = this._content.slice(this._dequeueIndex); + this._dequeueIndex = 0; + } + return itemToDequeue; + }; + + Queue.prototype.peek = function() { + /* + Check the next item to be dequeued, without removing it. + + _Returns:_ the item. + */ + + return this._content[this._dequeueIndex]; + }; + + return Queue; + + })(); + + module.exports = Queue; + + }).call(this); + + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /* + Credit to Wikipedia's article on [Red-black + tree](http://en.wikipedia.org/wiki/Red–black_tree) + + **Note:** doesn't handle duplicate entries, undefined and null. This is by + design. + + ## Overview example: + + ```js + var rbt = new RedBlackTree([7, 5, 1, 8]); + rbt.add(2); // => 2 + rbt.add(10); // => 10 + rbt.has(5); // => true + rbt.peekMin(); // => 1 + rbt.peekMax(); // => 10 + rbt.removeMin(); // => 1 + rbt.removeMax(); // => 10 + rbt.remove(8); // => 8 + ``` + + ## Properties: + + - size: The total number of items. + */ + + + (function() { + var BLACK, NODE_FOUND, NODE_TOO_BIG, NODE_TOO_SMALL, RED, RedBlackTree, STOP_SEARCHING, _findNode, _grandParentOf, _isLeft, _leftOrRight, _peekMaxNode, _peekMinNode, _siblingOf, _uncleOf; + + NODE_FOUND = 0; + + NODE_TOO_BIG = 1; + + NODE_TOO_SMALL = 2; + + STOP_SEARCHING = 3; + + RED = 1; + + BLACK = 2; + + RedBlackTree = (function() { + function RedBlackTree(valuesToAdd) { + var value, _i, _len; + if (valuesToAdd == null) { + valuesToAdd = []; + } + /* + Pass an optional array to be turned into binary tree. **Note:** does not + accept duplicate, undefined and null. + */ + + this._root; + this.size = 0; + for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) { + value = valuesToAdd[_i]; + if (value != null) { + this.add(value); + } + } + } + + RedBlackTree.prototype.add = function(value) { + /* + Again, make sure to not pass a value already in the tree, or undefined, or + null. + + _Returns:_ value added. + */ + + var currentNode, foundNode, nodeToInsert, _ref; + if (value == null) { + return; + } + this.size++; + nodeToInsert = { + value: value, + _color: RED + }; + if (!this._root) { + this._root = nodeToInsert; + } else { + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else { + if (value < node.value) { + if (node._left) { + return NODE_TOO_BIG; + } else { + nodeToInsert._parent = node; + node._left = nodeToInsert; + return STOP_SEARCHING; + } + } else { + if (node._right) { + return NODE_TOO_SMALL; + } else { + nodeToInsert._parent = node; + node._right = nodeToInsert; + return STOP_SEARCHING; + } + } + } + }); + if (foundNode != null) { + return; + } + } + currentNode = nodeToInsert; + while (true) { + if (currentNode === this._root) { + currentNode._color = BLACK; + break; + } + if (currentNode._parent._color === BLACK) { + break; + } + if (((_ref = _uncleOf(currentNode)) != null ? _ref._color : void 0) === RED) { + currentNode._parent._color = BLACK; + _uncleOf(currentNode)._color = BLACK; + _grandParentOf(currentNode)._color = RED; + currentNode = _grandParentOf(currentNode); + continue; + } + if (!_isLeft(currentNode) && _isLeft(currentNode._parent)) { + this._rotateLeft(currentNode._parent); + currentNode = currentNode._left; + } else if (_isLeft(currentNode) && !_isLeft(currentNode._parent)) { + this._rotateRight(currentNode._parent); + currentNode = currentNode._right; + } + currentNode._parent._color = BLACK; + _grandParentOf(currentNode)._color = RED; + if (_isLeft(currentNode)) { + this._rotateRight(_grandParentOf(currentNode)); + } else { + this._rotateLeft(_grandParentOf(currentNode)); + } + break; + } + return value; + }; + + RedBlackTree.prototype.has = function(value) { + /* + _Returns:_ true or false. + */ + + var foundNode; + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else if (value < node.value) { + return NODE_TOO_BIG; + } else { + return NODE_TOO_SMALL; + } + }); + if (foundNode) { + return true; + } else { + return false; + } + }; + + RedBlackTree.prototype.peekMin = function() { + /* + Check the minimum value without removing it. + + _Returns:_ the minimum value. + */ + + var _ref; + return (_ref = _peekMinNode(this._root)) != null ? _ref.value : void 0; + }; + + RedBlackTree.prototype.peekMax = function() { + /* + Check the maximum value without removing it. + + _Returns:_ the maximum value. + */ + + var _ref; + return (_ref = _peekMaxNode(this._root)) != null ? _ref.value : void 0; + }; + + RedBlackTree.prototype.remove = function(value) { + /* + _Returns:_ the value removed, or undefined if the value's not found. + */ + + var foundNode; + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else if (value < node.value) { + return NODE_TOO_BIG; + } else { + return NODE_TOO_SMALL; + } + }); + if (!foundNode) { + return; + } + this._removeNode(this._root, foundNode); + this.size--; + return value; + }; + + RedBlackTree.prototype.removeMin = function() { + /* + _Returns:_ smallest item removed, or undefined if tree's empty. + */ + + var nodeToRemove, valueToReturn; + nodeToRemove = _peekMinNode(this._root); + if (!nodeToRemove) { + return; + } + valueToReturn = nodeToRemove.value; + this._removeNode(this._root, nodeToRemove); + return valueToReturn; + }; + + RedBlackTree.prototype.removeMax = function() { + /* + _Returns:_ biggest item removed, or undefined if tree's empty. + */ + + var nodeToRemove, valueToReturn; + nodeToRemove = _peekMaxNode(this._root); + if (!nodeToRemove) { + return; + } + valueToReturn = nodeToRemove.value; + this._removeNode(this._root, nodeToRemove); + return valueToReturn; + }; + + RedBlackTree.prototype._removeNode = function(root, node) { + var sibling, successor, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + if (node._left && node._right) { + successor = _peekMinNode(node._right); + node.value = successor.value; + node = successor; + } + successor = node._left || node._right; + if (!successor) { + successor = { + color: BLACK, + _right: void 0, + _left: void 0, + isLeaf: true + }; + } + successor._parent = node._parent; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = successor; + } + if (node._color === BLACK) { + if (successor._color === RED) { + successor._color = BLACK; + if (!successor._parent) { + this._root = successor; + } + } else { + while (true) { + if (!successor._parent) { + if (!successor.isLeaf) { + this._root = successor; + } else { + this._root = void 0; + } + break; + } + sibling = _siblingOf(successor); + if ((sibling != null ? sibling._color : void 0) === RED) { + successor._parent._color = RED; + sibling._color = BLACK; + if (_isLeft(successor)) { + this._rotateLeft(successor._parent); + } else { + this._rotateRight(successor._parent); + } + } + sibling = _siblingOf(successor); + if (successor._parent._color === BLACK && (!sibling || (sibling._color === BLACK && (!sibling._left || sibling._left._color === BLACK) && (!sibling._right || sibling._right._color === BLACK)))) { + if (sibling != null) { + sibling._color = RED; + } + if (successor.isLeaf) { + successor._parent[_leftOrRight(successor)] = void 0; + } + successor = successor._parent; + continue; + } + if (successor._parent._color === RED && (!sibling || (sibling._color === BLACK && (!sibling._left || ((_ref1 = sibling._left) != null ? _ref1._color : void 0) === BLACK) && (!sibling._right || ((_ref2 = sibling._right) != null ? _ref2._color : void 0) === BLACK)))) { + if (sibling != null) { + sibling._color = RED; + } + successor._parent._color = BLACK; + break; + } + if ((sibling != null ? sibling._color : void 0) === BLACK) { + if (_isLeft(successor) && (!sibling._right || sibling._right._color === BLACK) && ((_ref3 = sibling._left) != null ? _ref3._color : void 0) === RED) { + sibling._color = RED; + if ((_ref4 = sibling._left) != null) { + _ref4._color = BLACK; + } + this._rotateRight(sibling); + } else if (!_isLeft(successor) && (!sibling._left || sibling._left._color === BLACK) && ((_ref5 = sibling._right) != null ? _ref5._color : void 0) === RED) { + sibling._color = RED; + if ((_ref6 = sibling._right) != null) { + _ref6._color = BLACK; + } + this._rotateLeft(sibling); + } + break; + } + sibling = _siblingOf(successor); + sibling._color = successor._parent._color; + if (_isLeft(successor)) { + sibling._right._color = BLACK; + this._rotateRight(successor._parent); + } else { + sibling._left._color = BLACK; + this._rotateLeft(successor._parent); + } + } + } + } + if (successor.isLeaf) { + return (_ref7 = successor._parent) != null ? _ref7[_leftOrRight(successor)] = void 0 : void 0; + } + }; + + RedBlackTree.prototype._rotateLeft = function(node) { + var _ref, _ref1; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = node._right; + } + node._right._parent = node._parent; + node._parent = node._right; + node._right = node._right._left; + node._parent._left = node; + if ((_ref1 = node._right) != null) { + _ref1._parent = node; + } + if (node._parent._parent == null) { + return this._root = node._parent; + } + }; + + RedBlackTree.prototype._rotateRight = function(node) { + var _ref, _ref1; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = node._left; + } + node._left._parent = node._parent; + node._parent = node._left; + node._left = node._left._right; + node._parent._right = node; + if ((_ref1 = node._left) != null) { + _ref1._parent = node; + } + if (node._parent._parent == null) { + return this._root = node._parent; + } + }; + + return RedBlackTree; + + })(); + + _isLeft = function(node) { + return node === node._parent._left; + }; + + _leftOrRight = function(node) { + if (_isLeft(node)) { + return '_left'; + } else { + return '_right'; + } + }; + + _findNode = function(startingNode, comparator) { + var comparisonResult, currentNode, foundNode; + currentNode = startingNode; + foundNode = void 0; + while (currentNode) { + comparisonResult = comparator(currentNode); + if (comparisonResult === NODE_FOUND) { + foundNode = currentNode; + break; + } + if (comparisonResult === NODE_TOO_BIG) { + currentNode = currentNode._left; + } else if (comparisonResult === NODE_TOO_SMALL) { + currentNode = currentNode._right; + } else if (comparisonResult === STOP_SEARCHING) { + break; + } + } + return foundNode; + }; + + _peekMinNode = function(startingNode) { + return _findNode(startingNode, function(node) { + if (node._left) { + return NODE_TOO_BIG; + } else { + return NODE_FOUND; + } + }); + }; + + _peekMaxNode = function(startingNode) { + return _findNode(startingNode, function(node) { + if (node._right) { + return NODE_TOO_SMALL; + } else { + return NODE_FOUND; + } + }); + }; + + _grandParentOf = function(node) { + var _ref; + return (_ref = node._parent) != null ? _ref._parent : void 0; + }; + + _uncleOf = function(node) { + if (!_grandParentOf(node)) { + return; + } + if (_isLeft(node._parent)) { + return _grandParentOf(node)._right; + } else { + return _grandParentOf(node)._left; + } + }; + + _siblingOf = function(node) { + if (_isLeft(node)) { + return node._parent._right; + } else { + return node._parent._left; + } + }; + + module.exports = RedBlackTree; + + }).call(this); + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + /* + Good for fast insertion/removal/lookup of strings. + + ## Overview example: + + ```js + var trie = new Trie(['bear', 'beer']); + trie.add('hello'); // => 'hello' + trie.add('helloha!'); // => 'helloha!' + trie.has('bears'); // => false + trie.longestPrefixOf('beatrice'); // => 'bea' + trie.wordsWithPrefix('hel'); // => ['hello', 'helloha!'] + trie.remove('beers'); // => undefined. 'beer' still exists + trie.remove('Beer') // => undefined. Case-sensitive + trie.remove('beer') // => 'beer'. Removed + ``` + + ## Properties: + + - size: The total number of words. + */ + + + (function() { + var Queue, Trie, WORD_END, _hasAtLeastNChildren, + __hasProp = {}.hasOwnProperty; + + Queue = __webpack_require__(6); + + WORD_END = 'end'; + + Trie = (function() { + function Trie(words) { + var word, _i, _len; + if (words == null) { + words = []; + } + /* + Pass an optional array of strings to be inserted initially. + */ + + this._root = {}; + this.size = 0; + for (_i = 0, _len = words.length; _i < _len; _i++) { + word = words[_i]; + this.add(word); + } + } + + Trie.prototype.add = function(word) { + /* + Add a whole string to the trie. + + _Returns:_ the word added. Will return undefined (without adding the value) + if the word passed is null or undefined. + */ + + var currentNode, letter, _i, _len; + if (word == null) { + return; + } + this.size++; + currentNode = this._root; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + currentNode[letter] = {}; + } + currentNode = currentNode[letter]; + } + currentNode[WORD_END] = true; + return word; + }; + + Trie.prototype.has = function(word) { + /* + __Returns:_ true or false. + */ + + var currentNode, letter, _i, _len; + if (word == null) { + return false; + } + currentNode = this._root; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + return false; + } + currentNode = currentNode[letter]; + } + if (currentNode[WORD_END]) { + return true; + } else { + return false; + } + }; + + Trie.prototype.longestPrefixOf = function(word) { + /* + Find all words containing the prefix. The word itself counts as a prefix. + + ```js + var trie = new Trie; + trie.add('hello'); + trie.longestPrefixOf('he'); // 'he' + trie.longestPrefixOf('hello'); // 'hello' + trie.longestPrefixOf('helloha!'); // 'hello' + ``` + + _Returns:_ the prefix string, or empty string if no prefix found. + */ + + var currentNode, letter, prefix, _i, _len; + if (word == null) { + return ''; + } + currentNode = this._root; + prefix = ''; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + break; + } + prefix += letter; + currentNode = currentNode[letter]; + } + return prefix; + }; + + Trie.prototype.wordsWithPrefix = function(prefix) { + /* + Find all words containing the prefix. The word itself counts as a prefix. + **Watch out for edge cases.** + + ```js + var trie = new Trie; + trie.wordsWithPrefix(''); // []. Check later case below. + trie.add(''); + trie.wordsWithPrefix(''); // [''] + trie.add('he'); + trie.add('hello'); + trie.add('hell'); + trie.add('bear'); + trie.add('z'); + trie.add('zebra'); + trie.wordsWithPrefix('hel'); // ['hell', 'hello'] + ``` + + _Returns:_ an array of strings, or empty array if no word found. + */ + + var accumulatedLetters, currentNode, letter, node, queue, subNode, words, _i, _len, _ref; + if (prefix == null) { + return []; + } + (prefix != null) || (prefix = ''); + words = []; + currentNode = this._root; + for (_i = 0, _len = prefix.length; _i < _len; _i++) { + letter = prefix[_i]; + currentNode = currentNode[letter]; + if (currentNode == null) { + return []; + } + } + queue = new Queue(); + queue.enqueue([currentNode, '']); + while (queue.size !== 0) { + _ref = queue.dequeue(), node = _ref[0], accumulatedLetters = _ref[1]; + if (node[WORD_END]) { + words.push(prefix + accumulatedLetters); + } + for (letter in node) { + if (!__hasProp.call(node, letter)) continue; + subNode = node[letter]; + queue.enqueue([subNode, accumulatedLetters + letter]); + } + } + return words; + }; + + Trie.prototype.remove = function(word) { + /* + _Returns:_ the string removed, or undefined if the word in its whole doesn't + exist. **Note:** this means removing `beers` when only `beer` exists will + return undefined and conserve `beer`. + */ + + var currentNode, i, letter, prefix, _i, _j, _len, _ref; + if (word == null) { + return; + } + currentNode = this._root; + prefix = []; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + return; + } + currentNode = currentNode[letter]; + prefix.push([letter, currentNode]); + } + if (!currentNode[WORD_END]) { + return; + } + this.size--; + delete currentNode[WORD_END]; + if (_hasAtLeastNChildren(currentNode, 1)) { + return word; + } + for (i = _j = _ref = prefix.length - 1; _ref <= 1 ? _j <= 1 : _j >= 1; i = _ref <= 1 ? ++_j : --_j) { + if (!_hasAtLeastNChildren(prefix[i][1], 1)) { + delete prefix[i - 1][1][prefix[i][0]]; + } else { + break; + } + } + if (!_hasAtLeastNChildren(this._root[prefix[0][0]], 1)) { + delete this._root[prefix[0][0]]; + } + return word; + }; + + return Trie; + + })(); + + _hasAtLeastNChildren = function(node, n) { + var child, childCount; + if (n === 0) { + return true; + } + childCount = 0; + for (child in node) { + if (!__hasProp.call(node, child)) continue; + childCount++; + if (childCount >= n) { + return true; + } + } + return false; + }; + + module.exports = Trie; + + }).call(this); + + +/***/ } +/******/ ]);;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapMarkerSpiderfier', [ 'uiGmapGoogleMapApi', function(GoogleMapApi) { + var self = this; + /* istanbul ignore next */ + +function(){ + +/** @preserve OverlappingMarkerSpiderfier +https://github.com/jawj/OverlappingMarkerSpiderfier +Copyright (c) 2011 - 2013 George MacKerron +Released under the MIT licence: http://opensource.org/licenses/mit-license +Note: The Google Maps API v3 must be included *before* this code + */ +var hasProp = {}.hasOwnProperty, + slice = [].slice; + +this['OverlappingMarkerSpiderfier'] = (function() { + var ge, gm, j, lcH, lcU, len, mt, p, ref, twoPi, x; + + p = _Class.prototype; + + ref = [_Class, p]; + for (j = 0, len = ref.length; j < len; j++) { + x = ref[j]; + x['VERSION'] = '0.3.3'; + } + + gm = void 0; + + ge = void 0; + + mt = void 0; + + twoPi = Math.PI * 2; + + p['keepSpiderfied'] = false; + + p['markersWontHide'] = false; + + p['markersWontMove'] = false; + + p['nearbyDistance'] = 20; + + p['circleSpiralSwitchover'] = 9; + + p['circleFootSeparation'] = 23; + + p['circleStartAngle'] = twoPi / 12; + + p['spiralFootSeparation'] = 26; + + p['spiralLengthStart'] = 11; + + p['spiralLengthFactor'] = 4; + + p['spiderfiedZIndex'] = 1000; + + p['usualLegZIndex'] = 10; + + p['highlightedLegZIndex'] = 20; + + p['event'] = 'click'; + + p['minZoomLevel'] = false; + + p['legWeight'] = 1.5; + + p['legColors'] = { + 'usual': {}, + 'highlighted': {} + }; + + lcU = p['legColors']['usual']; + + lcH = p['legColors']['highlighted']; + + _Class['initializeGoogleMaps'] = function(google) { + gm = google.maps; + ge = gm.event; + mt = gm.MapTypeId; + lcU[mt.HYBRID] = lcU[mt.SATELLITE] = '#fff'; + lcH[mt.HYBRID] = lcH[mt.SATELLITE] = '#f00'; + lcU[mt.TERRAIN] = lcU[mt.ROADMAP] = '#444'; + lcH[mt.TERRAIN] = lcH[mt.ROADMAP] = '#f00'; + this.ProjHelper = function(map) { + return this.setMap(map); + }; + this.ProjHelper.prototype = new gm.OverlayView(); + return this.ProjHelper.prototype['draw'] = function() {}; + }; + + function _Class(map1, opts) { + var e, k, l, len1, ref1, v; + this.map = map1; + if (opts == null) { + opts = {}; + } + for (k in opts) { + if (!hasProp.call(opts, k)) continue; + v = opts[k]; + this[k] = v; + } + this.projHelper = new this.constructor.ProjHelper(this.map); + this.initMarkerArrays(); + this.listeners = {}; + ref1 = ['click', 'zoom_changed', 'maptypeid_changed']; + for (l = 0, len1 = ref1.length; l < len1; l++) { + e = ref1[l]; + ge.addListener(this.map, e, (function(_this) { + return function() { + return _this['unspiderfy'](); + }; + })(this)); + } + } + + p.initMarkerArrays = function() { + this.markers = []; + return this.markerListenerRefs = []; + }; + + p['addMarker'] = function(marker) { + var listenerRefs; + if (marker['_oms'] != null) { + return this; + } + marker['_oms'] = true; + listenerRefs = [ + ge.addListener(marker, this['event'], (function(_this) { + return function(event) { + return _this.spiderListener(marker, event); + }; + })(this)) + ]; + if (!this['markersWontHide']) { + listenerRefs.push(ge.addListener(marker, 'visible_changed', (function(_this) { + return function() { + return _this.markerChangeListener(marker, false); + }; + })(this))); + } + if (!this['markersWontMove']) { + listenerRefs.push(ge.addListener(marker, 'position_changed', (function(_this) { + return function() { + return _this.markerChangeListener(marker, true); + }; + })(this))); + } + this.markerListenerRefs.push(listenerRefs); + this.markers.push(marker); + return this; + }; + + p.markerChangeListener = function(marker, positionChanged) { + if ((marker['_omsData'] != null) && (positionChanged || !marker.getVisible()) && !((this.spiderfying != null) || (this.unspiderfying != null))) { + return this['unspiderfy'](positionChanged ? marker : null); + } + }; + + p['getMarkers'] = function() { + return this.markers.slice(0); + }; + + p['removeMarker'] = function(marker) { + var i, l, len1, listenerRef, listenerRefs; + if (marker['_omsData'] != null) { + this['unspiderfy'](); + } + i = this.arrIndexOf(this.markers, marker); + if (i < 0) { + return this; + } + listenerRefs = this.markerListenerRefs.splice(i, 1)[0]; + for (l = 0, len1 = listenerRefs.length; l < len1; l++) { + listenerRef = listenerRefs[l]; + ge.removeListener(listenerRef); + } + delete marker['_oms']; + this.markers.splice(i, 1); + return this; + }; + + p['clearMarkers'] = function() { + var i, l, len1, len2, listenerRef, listenerRefs, marker, n, ref1; + this['unspiderfy'](); + ref1 = this.markers; + for (i = l = 0, len1 = ref1.length; l < len1; i = ++l) { + marker = ref1[i]; + listenerRefs = this.markerListenerRefs[i]; + for (n = 0, len2 = listenerRefs.length; n < len2; n++) { + listenerRef = listenerRefs[n]; + ge.removeListener(listenerRef); + } + delete marker['_oms']; + } + this.initMarkerArrays(); + return this; + }; + + p['addListener'] = function(event, func) { + var base; + ((base = this.listeners)[event] != null ? base[event] : base[event] = []).push(func); + return this; + }; + + p['removeListener'] = function(event, func) { + var i; + i = this.arrIndexOf(this.listeners[event], func); + if (!(i < 0)) { + this.listeners[event].splice(i, 1); + } + return this; + }; + + p['clearListeners'] = function(event) { + this.listeners[event] = []; + return this; + }; + + p.trigger = function() { + var args, event, func, l, len1, ref1, ref2, results; + event = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : []; + ref2 = (ref1 = this.listeners[event]) != null ? ref1 : []; + results = []; + for (l = 0, len1 = ref2.length; l < len1; l++) { + func = ref2[l]; + results.push(func.apply(null, args)); + } + return results; + }; + + p.generatePtsCircle = function(count, centerPt) { + var angle, angleStep, circumference, i, l, legLength, ref1, results; + circumference = this['circleFootSeparation'] * (2 + count); + legLength = circumference / twoPi; + angleStep = twoPi / count; + results = []; + for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) { + angle = this['circleStartAngle'] + i * angleStep; + results.push(new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))); + } + return results; + }; + + p.generatePtsSpiral = function(count, centerPt) { + var angle, i, l, legLength, pt, ref1, results; + legLength = this['spiralLengthStart']; + angle = 0; + results = []; + for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) { + angle += this['spiralFootSeparation'] / legLength + i * 0.0005; + pt = new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle)); + legLength += twoPi * this['spiralLengthFactor'] / angle; + results.push(pt); + } + return results; + }; + + p.spiderListener = function(marker, event) { + var $this, clear, l, len1, m, mPt, markerPt, markerSpiderfied, nDist, nearbyMarkerData, nonNearbyMarkers, pxSq, ref1; + markerSpiderfied = marker['_omsData'] != null; + if (!(markerSpiderfied && this['keepSpiderfied'])) { + if (this['event'] === 'mouseover') { + $this = this; + clear = function() { + return $this['unspiderfy'](); + }; + window.clearTimeout(p.timeout); + p.timeout = setTimeout(clear, 3000); + } else { + this['unspiderfy'](); + } + } + if (markerSpiderfied || this.map.getStreetView().getVisible() || this.map.getMapTypeId() === 'GoogleEarthAPI') { + return this.trigger('click', marker, event); + } else { + nearbyMarkerData = []; + nonNearbyMarkers = []; + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + markerPt = this.llToPt(marker.position); + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + if (!((m.map != null) && m.getVisible())) { + continue; + } + mPt = this.llToPt(m.position); + if (this.ptDistanceSq(mPt, markerPt) < pxSq) { + nearbyMarkerData.push({ + marker: m, + markerPt: mPt + }); + } else { + nonNearbyMarkers.push(m); + } + } + if (nearbyMarkerData.length === 1) { + return this.trigger('click', marker, event); + } else { + return this.spiderfy(nearbyMarkerData, nonNearbyMarkers); + } + } + }; + + p['markersNearMarker'] = function(marker, firstOnly) { + var l, len1, m, mPt, markerPt, markers, nDist, pxSq, ref1, ref2, ref3; + if (firstOnly == null) { + firstOnly = false; + } + if (this.projHelper.getProjection() == null) { + throw "Must wait for 'idle' event on map before calling markersNearMarker"; + } + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + markerPt = this.llToPt(marker.position); + markers = []; + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + if (m === marker || (m.map == null) || !m.getVisible()) { + continue; + } + mPt = this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position); + if (this.ptDistanceSq(mPt, markerPt) < pxSq) { + markers.push(m); + if (firstOnly) { + break; + } + } + } + return markers; + }; + + p['markersNearAnyOtherMarker'] = function() { + var i, i1, i2, l, len1, len2, len3, m, m1, m1Data, m2, m2Data, mData, n, nDist, pxSq, q, ref1, ref2, ref3, results; + if (this.projHelper.getProjection() == null) { + throw "Must wait for 'idle' event on map before calling markersNearAnyOtherMarker"; + } + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + mData = (function() { + var l, len1, ref1, ref2, ref3, results; + ref1 = this.markers; + results = []; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + results.push({ + pt: this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position), + willSpiderfy: false + }); + } + return results; + }).call(this); + ref1 = this.markers; + for (i1 = l = 0, len1 = ref1.length; l < len1; i1 = ++l) { + m1 = ref1[i1]; + if (!((m1.map != null) && m1.getVisible())) { + continue; + } + m1Data = mData[i1]; + if (m1Data.willSpiderfy) { + continue; + } + ref2 = this.markers; + for (i2 = n = 0, len2 = ref2.length; n < len2; i2 = ++n) { + m2 = ref2[i2]; + if (i2 === i1) { + continue; + } + if (!((m2.map != null) && m2.getVisible())) { + continue; + } + m2Data = mData[i2]; + if (i2 < i1 && !m2Data.willSpiderfy) { + continue; + } + if (this.ptDistanceSq(m1Data.pt, m2Data.pt) < pxSq) { + m1Data.willSpiderfy = m2Data.willSpiderfy = true; + break; + } + } + } + ref3 = this.markers; + results = []; + for (i = q = 0, len3 = ref3.length; q < len3; i = ++q) { + m = ref3[i]; + if (mData[i].willSpiderfy) { + results.push(m); + } + } + return results; + }; + + p.makeHighlightListenerFuncs = function(marker) { + return { + highlight: (function(_this) { + return function() { + return marker['_omsData'].leg.setOptions({ + strokeColor: _this['legColors']['highlighted'][_this.map.mapTypeId], + zIndex: _this['highlightedLegZIndex'] + }); + }; + })(this), + unhighlight: (function(_this) { + return function() { + return marker['_omsData'].leg.setOptions({ + strokeColor: _this['legColors']['usual'][_this.map.mapTypeId], + zIndex: _this['usualLegZIndex'] + }); + }; + })(this) + }; + }; + + p.spiderfy = function(markerData, nonNearbyMarkers) { + var bodyPt, footLl, footPt, footPts, highlightListenerFuncs, leg, marker, md, nearestMarkerDatum, numFeet, spiderfiedMarkers; + if (this['minZoomLevel'] && this.map.getZoom() < this['minZoomLevel']) { + return false; + } + this.spiderfying = true; + numFeet = markerData.length; + bodyPt = this.ptAverage((function() { + var l, len1, results; + results = []; + for (l = 0, len1 = markerData.length; l < len1; l++) { + md = markerData[l]; + results.push(md.markerPt); + } + return results; + })()); + footPts = numFeet >= this['circleSpiralSwitchover'] ? this.generatePtsSpiral(numFeet, bodyPt).reverse() : this.generatePtsCircle(numFeet, bodyPt); + spiderfiedMarkers = (function() { + var l, len1, results; + results = []; + for (l = 0, len1 = footPts.length; l < len1; l++) { + footPt = footPts[l]; + footLl = this.ptToLl(footPt); + nearestMarkerDatum = this.minExtract(markerData, (function(_this) { + return function(md) { + return _this.ptDistanceSq(md.markerPt, footPt); + }; + })(this)); + marker = nearestMarkerDatum.marker; + leg = new gm.Polyline({ + map: this.map, + path: [marker.position, footLl], + strokeColor: this['legColors']['usual'][this.map.mapTypeId], + strokeWeight: this['legWeight'], + zIndex: this['usualLegZIndex'] + }); + marker['_omsData'] = { + usualPosition: marker.position, + leg: leg + }; + if (this['legColors']['highlighted'][this.map.mapTypeId] !== this['legColors']['usual'][this.map.mapTypeId]) { + highlightListenerFuncs = this.makeHighlightListenerFuncs(marker); + marker['_omsData'].hightlightListeners = { + highlight: ge.addListener(marker, 'mouseover', highlightListenerFuncs.highlight), + unhighlight: ge.addListener(marker, 'mouseout', highlightListenerFuncs.unhighlight) + }; + } + marker.setPosition(footLl); + marker.setZIndex(Math.round(this['spiderfiedZIndex'] + footPt.y)); + results.push(marker); + } + return results; + }).call(this); + delete this.spiderfying; + this.spiderfied = true; + return this.trigger('spiderfy', spiderfiedMarkers, nonNearbyMarkers); + }; + + p['unspiderfy'] = function(markerNotToMove) { + var l, len1, listeners, marker, nonNearbyMarkers, ref1, unspiderfiedMarkers; + if (markerNotToMove == null) { + markerNotToMove = null; + } + if (this.spiderfied == null) { + return this; + } + this.unspiderfying = true; + unspiderfiedMarkers = []; + nonNearbyMarkers = []; + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + marker = ref1[l]; + if (marker['_omsData'] != null) { + marker['_omsData'].leg.setMap(null); + if (marker !== markerNotToMove) { + marker.setPosition(marker['_omsData'].usualPosition); + } + marker.setZIndex(null); + listeners = marker['_omsData'].hightlightListeners; + if (listeners != null) { + ge.removeListener(listeners.highlight); + ge.removeListener(listeners.unhighlight); + } + delete marker['_omsData']; + unspiderfiedMarkers.push(marker); + } else { + nonNearbyMarkers.push(marker); + } + } + delete this.unspiderfying; + delete this.spiderfied; + this.trigger('unspiderfy', unspiderfiedMarkers, nonNearbyMarkers); + return this; + }; + + p.ptDistanceSq = function(pt1, pt2) { + var dx, dy; + dx = pt1.x - pt2.x; + dy = pt1.y - pt2.y; + return dx * dx + dy * dy; + }; + + p.ptAverage = function(pts) { + var l, len1, numPts, pt, sumX, sumY; + sumX = sumY = 0; + for (l = 0, len1 = pts.length; l < len1; l++) { + pt = pts[l]; + sumX += pt.x; + sumY += pt.y; + } + numPts = pts.length; + return new gm.Point(sumX / numPts, sumY / numPts); + }; + + p.llToPt = function(ll) { + return this.projHelper.getProjection().fromLatLngToDivPixel(ll); + }; + + p.ptToLl = function(pt) { + return this.projHelper.getProjection().fromDivPixelToLatLng(pt); + }; + + p.minExtract = function(set, func) { + var bestIndex, bestVal, index, item, l, len1, val; + for (index = l = 0, len1 = set.length; l < len1; index = ++l) { + item = set[index]; + val = func(item); + if ((typeof bestIndex === "undefined" || bestIndex === null) || val < bestVal) { + bestVal = val; + bestIndex = index; + } + } + return set.splice(bestIndex, 1)[0]; + }; + + p.arrIndexOf = function(arr, obj) { + var i, l, len1, o; + if (arr.indexOf != null) { + return arr.indexOf(obj); + } + for (i = l = 0, len1 = arr.length; l < len1; i = ++l) { + o = arr[i]; + if (o === obj) { + return i; + } + } + return -1; + }; + + return _Class; + +})(); + + }.apply(self); + + GoogleMapApi.then(function(){ + self.OverlappingMarkerSpiderfier.initializeGoogleMaps(window.google); + }); + return this.OverlappingMarkerSpiderfier; +}]); +;/** + * Performance overrides on MarkerClusterer custom to Angular Google Maps + * + * Created by Petr Bruna ccg1415 and Nick McCready on 7/13/14. + */ +angular.module('uiGmapgoogle-maps.extensions') +.service('uiGmapExtendMarkerClusterer',['uiGmapLodash', 'uiGmapPropMap', function (uiGmapLodash, PropMap) { + return { + init: _.once(function () { + (function () { + var __hasProp = {}.hasOwnProperty, + __extends = function (child, parent) { + for (var key in parent) { + if (__hasProp.call(parent, key)) child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }; + + window.NgMapCluster = (function (_super) { + __extends(NgMapCluster, _super); + + function NgMapCluster(opts) { + NgMapCluster.__super__.constructor.call(this, opts); + this.markers_ = new PropMap(); + } + + /** + * Adds a marker to the cluster. + * + * @param {google.maps.Marker} marker The marker to be added. + * @return {boolean} True if the marker was added. + * @ignore + */ + NgMapCluster.prototype.addMarker = function (marker) { + var i; + var mCount; + var mz; + + if (this.isMarkerAlreadyAdded_(marker)) { + var oldMarker = this.markers_.get(marker.key); + if (oldMarker.getPosition().lat() == marker.getPosition().lat() && oldMarker.getPosition().lon() == marker.getPosition().lon()) //if nothing has changed + return false; + } + + if (!this.center_) { + this.center_ = marker.getPosition(); + this.calculateBounds_(); + } else { + if (this.averageCenter_) { + var l = this.markers_.length + 1; + var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; + var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; + this.center_ = new google.maps.LatLng(lat, lng); + this.calculateBounds_(); + } + } + marker.isAdded = true; + this.markers_.push(marker); + + mCount = this.markers_.length; + mz = this.markerClusterer_.getMaxZoom(); + if (mz !== null && this.map_.getZoom() > mz) { + // Zoomed in past max zoom, so show the marker. + if (marker.getMap() !== this.map_) { + marker.setMap(this.map_); + } + } else if (mCount < this.minClusterSize_) { + // Min cluster size not reached so show the marker. + if (marker.getMap() !== this.map_) { + marker.setMap(this.map_); + } + } else if (mCount === this.minClusterSize_) { + // Hide the markers that were showing. + this.markers_.each(function (m) { + m.setMap(null); + }); + } else { + marker.setMap(null); + } + + //this.updateIcon_(); + return true; + }; + + /** + * Determines if a marker has already been added to the cluster. + * + * @param {google.maps.Marker} marker The marker to check. + * @return {boolean} True if the marker has already been added. + */ + NgMapCluster.prototype.isMarkerAlreadyAdded_ = function (marker) { + return uiGmapLodash.isNullOrUndefined(this.markers_.get(marker.key)); + }; + + + /** + * Returns the bounds of the cluster. + * + * @return {google.maps.LatLngBounds} the cluster bounds. + * @ignore + */ + NgMapCluster.prototype.getBounds = function () { + var i; + var bounds = new google.maps.LatLngBounds(this.center_, this.center_); + this.getMarkers().each(function(m){ + bounds.extend(m.getPosition()); + }); + return bounds; + }; + + + /** + * Removes the cluster from the map. + * + * @ignore + */ + NgMapCluster.prototype.remove = function () { + this.clusterIcon_.setMap(null); + this.markers_ = new PropMap(); + delete this.markers_; + }; + + + return NgMapCluster; + + })(Cluster); + + + window.NgMapMarkerClusterer = (function (_super) { + __extends(NgMapMarkerClusterer, _super); + + function NgMapMarkerClusterer(map, opt_markers, opt_options) { + NgMapMarkerClusterer.__super__.constructor.call(this, map, opt_markers, opt_options); + this.markers_ = new PropMap(); + } + + /** + * Removes all clusters and markers from the map and also removes all markers + * managed by the clusterer. + */ + NgMapMarkerClusterer.prototype.clearMarkers = function () { + this.resetViewport_(true); + this.markers_ = new PropMap(); + }; + /** + * Removes a marker and returns true if removed, false if not. + * + * @param {google.maps.Marker} marker The marker to remove + * @return {boolean} Whether the marker was removed or not + */ + NgMapMarkerClusterer.prototype.removeMarker_ = function (marker) { + if (!this.markers_.get(marker.key)) { + return false; + } + marker.setMap(null); + this.markers_.remove(marker.key); // Remove the marker from the list of managed markers + return true; + }; + + /** + * Creates the clusters. This is done in batches to avoid timeout errors + * in some browsers when there is a huge number of markers. + * + * @param {number} iFirst The index of the first marker in the batch of + * markers to be added to clusters. + */ + NgMapMarkerClusterer.prototype.createClusters_ = function (iFirst) { + var i, marker; + var mapBounds; + var cMarkerClusterer = this; + if (!this.ready_) { + return; + } + + // Cancel previous batch processing if we're working on the first batch: + if (iFirst === 0) { + /** + * This event is fired when the MarkerClusterer begins + * clustering markers. + * @name MarkerClusterer#clusteringbegin + * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. + * @event + */ + google.maps.event.trigger(this, 'clusteringbegin', this); + + if (typeof this.timerRefStatic !== 'undefined') { + clearTimeout(this.timerRefStatic); + delete this.timerRefStatic; + } + } + + // Get our current map view bounds. + // Create a new bounds object so we don't affect the map. + // + // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: + if (this.getMap().getZoom() > 3) { + mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), + this.getMap().getBounds().getNorthEast()); + } else { + mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); + } + var bounds = this.getExtendedBounds(mapBounds); + + var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); + + var _ms = this.markers_.values(); + for (i = iFirst; i < iLast; i++) { + marker = _ms[i]; + if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { + if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { + this.addToClosestCluster_(marker); + } + } + } + + if (iLast < this.markers_.length) { + this.timerRefStatic = setTimeout(function () { + cMarkerClusterer.createClusters_(iLast); + }, 0); + } else { + // custom addition by ui-gmap + // update icon for all clusters + for (i = 0; i < this.clusters_.length; i++) { + this.clusters_[i].updateIcon_(); + } + + delete this.timerRefStatic; + + /** + * This event is fired when the MarkerClusterer stops + * clustering markers. + * @name MarkerClusterer#clusteringend + * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. + * @event + */ + google.maps.event.trigger(this, 'clusteringend', this); + } + }; + + /** + * Adds a marker to a cluster, or creates a new cluster. + * + * @param {google.maps.Marker} marker The marker to add. + */ + NgMapMarkerClusterer.prototype.addToClosestCluster_ = function (marker) { + var i, d, cluster, center; + var distance = 40000; // Some large number + var clusterToAddTo = null; + for (i = 0; i < this.clusters_.length; i++) { + cluster = this.clusters_[i]; + center = cluster.getCenter(); + if (center) { + d = this.distanceBetweenPoints_(center, marker.getPosition()); + if (d < distance) { + distance = d; + clusterToAddTo = cluster; + } + } + } + + if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { + clusterToAddTo.addMarker(marker); + } else { + cluster = new NgMapCluster(this); + cluster.addMarker(marker); + this.clusters_.push(cluster); + } + }; + + /** + * Redraws all the clusters. + */ + NgMapMarkerClusterer.prototype.redraw_ = function () { + this.createClusters_(0); + }; + + + /** + * Removes all clusters from the map. The markers are also removed from the map + * if opt_hide is set to true. + * + * @param {boolean} [opt_hide] Set to true to also remove the markers + * from the map. + */ + NgMapMarkerClusterer.prototype.resetViewport_ = function (opt_hide) { + var i, marker; + // Remove all the clusters + for (i = 0; i < this.clusters_.length; i++) { + this.clusters_[i].remove(); + } + this.clusters_ = []; + + // Reset the markers to not be added and to be removed from the map. + this.markers_.each(function (marker) { + marker.isAdded = false; + if (opt_hide) { + marker.setMap(null); + } + }); + }; + + /** + * Extends an object's prototype by another's. + * + * @param {Object} obj1 The object to be extended. + * @param {Object} obj2 The object to extend with. + * @return {Object} The new extended object. + * @ignore + */ + NgMapMarkerClusterer.prototype.extend = function (obj1, obj2) { + return (function (object) { + var property; + for (property in object.prototype) { + if (property !== 'constructor') + this.prototype[property] = object.prototype[property]; + } + return this; + }).apply(obj1, [obj2]); + }; + //////////////////////////////////////////////////////////////////////////////// + /* + Other overrides relevant to MarkerClusterPlus + */ + //////////////////////////////////////////////////////////////////////////////// + /** + * Positions and shows the icon. + */ + ClusterIcon.prototype.show = function () { + if (this.div_) { + var img = ""; + // NOTE: values must be specified in px units + var bp = this.backgroundPosition_.split(" "); + var spriteH = parseInt(bp[0].trim(), 10); + var spriteV = parseInt(bp[1].trim(), 10); + var pos = this.getPosFromLatLng_(this.center_); + this.div_.style.cssText = this.createCss(pos); + img = ""; + this.div_.innerHTML = img + "

" + this.sums_.text + "
"; + if (typeof this.sums_.title === "undefined" || this.sums_.title === "") { + this.div_.title = this.cluster_.getMarkerClusterer().getTitle(); + } else { + this.div_.title = this.sums_.title; + } + this.div_.style.display = ""; + } + this.visible_ = true; + }; + //END OTHER OVERRIDES + //////////////////////////////////////////////////////////////////////////////// + + return NgMapMarkerClusterer; + + })(MarkerClusterer); + }).call(this); + }) + }; +}]); +}( window,angular)); \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps.min.js b/client/www/lib/angular-google-maps/dist/angular-google-maps.min.js new file mode 100644 index 0000000..efc1b88 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps.min.js @@ -0,0 +1,13 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ + +!function(a,b,c){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h,i;return h=void 0,i=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c,f,g;return b=["transport","isGoogleMapsForWork","china","preventLoad"],a.isGoogleMapsForWork&&b.push("key"),c=_.map(_.omit(a,b),function(a,b){return b+"="+a}),h&&(g=document.getElementById(h),g.parentNode.removeChild(g)),c=c.join("&"),f=document.createElement("script"),f.id=h="ui_gmap_map_load_"+d.generate(),f.type="text/javascript",f.src=e(a)+c,document.body.appendChild(f)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE&&!b.preventLoad?document.addEventListener("online",function(){return g()?void 0:f(b)}):b.preventLoad||f(b),i=b,i.randomizedFunctionName=e,d.promise)},manualLoad:function(){var b;return b=i,g()?a[b.randomizedFunctionName]?a[b.randomizedFunctionName]():void 0:f(b)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(a){return{load:function(){a.manualLoad()}}}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){var b;if(google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow)return google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(a,b,c){null==c&&(this._isOpen=!0,this._open(a,b,!0))},google.maps.InfoWindow.prototype.close=function(a){null==a&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},a.InfoBox&&(a.InfoBox.prototype._open=a.InfoBox.prototype.open,a.InfoBox.prototype._close=a.InfoBox.prototype.close,a.InfoBox.prototype._isOpen=!1,a.InfoBox.prototype.open=function(a,b){this._isOpen=!0,this._open(a,b)},a.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},a.InfoBox.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},b=function(b){function e(b){this.getOrigCloseBoxImg_=c(this.getOrigCloseBoxImg_,this),this.getCloseBoxDiv_=c(this.getCloseBoxDiv_,this);var d;d=new a.InfoBox(b),_.extend(this,d),null!=b.closeBoxDiv&&(this.closeBoxDiv_=b.closeBoxDiv)}return d(e,b),e.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},e.prototype.getCloseBoxImg_=function(){var a,b;return a=this.getCloseBoxDiv_(),b=this.getOrigCloseBoxImg_(),a||b},e.prototype.getOrigCloseBoxImg_=function(){var a;return a="",""!==this.closeBoxURL_&&(a="d;)a=a[b[d++]];return d&&d===e?a:void 0}},d=function(b,c,d){var e;return e=null===b?void 0:a(b,h(c),c+""),void 0===e?d:e},_.get=d),this.intersectionObjects=function(a,b,c){var d;return null==c&&(c=void 0),d=_.map(a,function(a){return _.find(b,function(b){return null!=c?c(a,b):_.isEqual(a,b)})}),_.filter(d,function(a){return null!=a})},this.containsObject=_.includeObject=function(a,b,c){return null==c&&(c=void 0),null===a?!1:_.some(a,function(a){return null!=c?c(a,b):_.isEqual(a,b)})},this.differenceObjects=function(a,b,c){return null==c&&(c=void 0),_.filter(a,function(a){return function(d){return!a.containsObject(b,d,c)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(a,b,c,d){var e,f;if(null==a)return-1;if(e=0,f=a.length,d){if("number"!=typeof d)return e=_.sortedIndex(a,b),a[e]===b?e:-1;e=0>d?Math.max(0,f+d):d}for(;f>e;){if(null!=c){if(c(a[e],b))return e}else if(_.isEqual(a[e],b))return e;e++}return-1},this.isNullOrUndefined=function(a){return _.isNull(a||_.isUndefined(a))},this})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(a){return this.contains=function(b,c){return-1!==a.indexOf(b,c)},this}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var a;return a=void 0,{then:function(b){return a=b},resolve:function(){return a.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(a,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A;return z=c.promiseTypes,s=c.isInProgress,y=c.promiseStatus,h=c.ExposedPromise,j=c.SniffedPromise,t=function(a,b){var c;return c=a.promise(),c.promiseType=a.promiseType,c.$$state&&d.debug("promiseType: "+c.promiseType+", state: "+y(c.$$state.status)),c.cancelCb=b,c},o=function(a,b){return a.promiseType===z.create&&b.promiseType!==z["delete"]&&b.promiseType!==z.init?(d.debug("lastPromise.promiseType "+b.promiseType+", newPromiseType: "+a.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},x=function(a,b,c){var e;return b.promiseType===z["delete"]&&c.promiseType!==z["delete"]&&null!=c.cancelCb&&_.isFunction(c.cancelCb)&&s(c)&&(d.debug("promiseType: "+b.promiseType+", CANCELING LAST PROMISE type: "+c.promiseType),c.cancelCb("cancel safe"),e=a.peek(),null!=e&&s(e))?e.hasOwnProperty("cancelCb")&&_.isFunction(e.cancelCb)?(d.debug("promiseType: "+e.promiseType+", CANCELING FIRST PROMISE type: "+e.promiseType),e.cancelCb("cancel safe")):d.warn("first promise was not cancelable"):void 0},i=function(a,b,c){var d,e;if(a.existingPieces){if(d=_.last(a.existingPieces._content),o(b,d))return;return x(a.existingPieces,b,d),e=h(d["finally"](function(){return t(b,c)})),e.cancelCb=c,e.promiseType=b.promiseType,a.existingPieces.enqueue(e),d["finally"](function(){return a.existingPieces.dequeue()})}return a.existingPieces=new f.Queue,a.existingPieces.enqueue(t(b,c))},v=function(a,b,c,e,f){var g;return null==c&&(c=""),g=function(a){return d.debug(a+": "+a),null!=e&&_.isFunction(e)?e(a):void 0},i(a,j(f,b),g)},m=80,q={value:null},A=function(a,b,c){var d,e;try{return a.apply(b,c)}catch(e){return d=e,q.value=d,q}},u=function(a,b,c,e){var f,g;return g=A(a,b,e),g===q&&(f="error within chunking iterator: "+q.value,d.error(f),c.reject(f)),"cancel safe"!==g},k=function(a,b,c){var d,e;return d=a===b,e=b[c],d?e:a[e]},l=["length","forEach","map"],r=function(a,c,d,e){var f,g,h;if(b.isArray(a))f=a;else if(c)f=c;else{f=[];for(g in a)h=a[g],a.hasOwnProperty(g)&&!_.includes(l,g)&&f.push(g)}return null==e&&(e=d),b.isArray(f)&&!(null!=f?f.length:void 0)&&e!==d?d():e(f,c)},n=function(c,d,e,f,g,h,i,j){return r(c,j,function(j,l){var m,o,p,q;for(m=d&&db;b++)if(b in this&&this[b]===a)return b;return-1};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var b,c;return c=["extended","included"],b=function(){function b(){}return b.extend=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this[d]=f);return null!=(e=b.extended)&&e.apply(this),this},b.include=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this.prototype[d]=f);return null!=(e=b.included)&&e.apply(this),this},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(a){}}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(a){var b;return b={handle:function(c,d){return c.$on("$destroy",function(){return b.handle(c)}),c.deferred=a.defer(),{getScope:function(){return c}}},mapPromise:function(a,b){var c;return c=b.getScope(),c.deferred.promise.then(function(b){return a.map=b}),c.deferred.promise}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(a){var c,d;return d=function(a){return b.isDefined(a.events)&&null!=a.events&&b.isObject(a.events)},c=function(a,b){return d(a)?a:d(b)?b:void 0},{setEvents:function(a,d,e,f){var g;return g=c(d,e),null!=g?_.compact(_.map(g.events,function(c,h){var i;return f&&(i=_(f).includes(h)),g.events.hasOwnProperty(h)&&b.isFunction(g.events[h])&&!i?google.maps.event.addListener(a,h,function(){return d.$evalAsync||(d.$evalAsync=function(){}),d.$evalAsync(c.apply(d,[a,h,e,arguments]))}):void 0})):void 0},removeEvents:function(a){var b,c;if(a)for(b in a)c=a[b],c&&a.hasOwnProperty(b)&&google.maps.event.removeListener(c)}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger","$timeout",function(a,b){return{fit:function(a,c){var d,e,f,g,h;if(c&&(null!=a?a.length:void 0)){d=new google.maps.LatLngBounds,e=!1;for(f in a)g=a[f],g&&(e||(e=!0),h=_.isFunction(g.getPosition)?g.getPosition():g),d.extend(h);if(e)return b(function(){return c.fitBounds(d)})}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?a instanceof google.maps.LatLng?a:Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return!(!a||!b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0)))},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;if(void 0!==a)return a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d=g?void a.reject("Your maps are not found we have checked the maximum amount of times. :)"):void(d!==f?c(a,f,g-1):a.resolve(e()))},100)},{spawn:function(){var b;return b=a.defer(),f.push(b.promise),d+=1,{instance:d,deferred:b}},promises:e,instances:function(){return d},promise:function(b,d){var e;return null==b&&(b=1),null==d&&(d=50),e=a.defer(),c(e,b,d),e.promise},reset:function(){d=0,f.length=0},decrement:function(){d>0&&(d-=1),f.length&&(f.length-=1)}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(b){var c;return c=function(b){function c(a,b,c,d){this.scope=a,this.element=b,this.attrs=c,this.ctrls=d}return a(c,b),c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil",function(d,e){return function(d){function f(b,c){this.scope=b,this["interface"]=null!=c?c:{scopeKeys:[]},this.modelsLength=a(this.modelsLength,this),this.updateChild=a(this.updateChild,this),this.destroy=a(this.destroy,this),this.setChildScope=a(this.setChildScope,this),this.getChanges=a(this.getChanges,this),this.getProp=a(this.getProp,this),this.setIdKey=a(this.setIdKey,this),this.modelKeyComparison=a(this.modelKeyComparison,this),f.__super__.constructor.call(this),this.defaultIdKey="id",this.idKey=void 0}return c(f,d),f.prototype.evalModelHandle=function(a,b){return null!=a&&null!=b?"self"===b?a:(_.isFunction(b)&&(b=b()),e.getPath(a,b)):void 0},f.prototype.modelKeyComparison=function(a,b){var c,d,f,g,h,i;if(f=this["interface"].scopeKeys.indexOf("coords")>=0,(f&&null!=this.scope.coords||!f)&&(h=this.scope),null==h)throw"No scope set!";return f&&(c=this.scopeOrModelVal("coords",h,a),d=this.scopeOrModelVal("coords",h,b),g=e.equalCoords(c,d),!g)?g:(i=_.without(this["interface"].scopeKeys,"coords"),g=_.every(i,function(c){return function(d){return c.scopeOrModelVal(h[d],h,a)===c.scopeOrModelVal(h[d],h,b)}}(this)))},f.prototype.setIdKey=function(a){return this.idKey=null!=a.idKey?a.idKey:this.defaultIdKey},f.prototype.setVal=function(a,b,c){return this.modelOrKey(a,b=c),a},f.prototype.modelOrKey=function(a,b){return null!=b?"self"!==b?e.getPath(a,b):a:void 0},f.prototype.getProp=function(a,b,c){return this.scopeOrModelVal(a,b,c)},f.prototype.getChanges=function(a,b,c){var d,e,f;c&&(b=_.pick(b,c),a=_.pick(a,c)),e={},f={},d={};for(f in a)b&&b[f]===a[f]||(_.isArray(a[f])?e[f]=a[f]:_.isObject(a[f])?(d=this.getChanges(a[f],b?b[f]:null),_.isEmpty(d)||(e[f]=d)):e[f]=a[f]);return e},f.prototype.scopeOrModelVal=function(a,b,c,d){var e,f,g,h;return null==d&&(d=!1),e=function(a,b,c){return null==c&&(c=!1),c?{isScope:a,value:b}:b},h=_.get(b,a),_.isFunction(h)?e(!0,h(c),d):_.isObject(h)?e(!0,h,d):_.isString(h)?(f=h,g=f?"self"===f?c:_.get(c,f):_.get(c,a),_.isFunction(g)?e(!1,g(),d):e(!1,g,d)):e(!0,h,d)},f.prototype.setChildScope=function(a,b,c){var d,e,f,g;for(e in a)f=a[e],d=this.scopeOrModelVal(f,b,c,!0),null!=(null!=d?d.value:void 0)&&(g=d.value,g!==b[f]&&(b[f]=g));return b.model=c},f.prototype.onDestroy=function(a){},f.prototype.destroy=function(a){var b;return null==a&&(a=!1),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(a,b){return null==b[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):a.updateModel(b)},f.prototype.modelsLength=function(a){var c,d;return null==a&&(a=void 0),c=0,d=a?a:this.scope.models,null==d?c:c=b.isArray(d)||null!=d.length?d.length:Object.keys(d).length},f}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(a,b,c,d){return{didQueueInitPromise:function(a,c){return 0===c.models.length?(b.promiseLock(a,d.promiseTypes.init,null,null,function(){return d.resolve()}),!0):!1},figureOutState:function(b,c,d,e,f){var g,h,i,j,k;return g=[],i={},j=[],k=[],c.models.forEach(function(f){var h;return null==f[b]?a.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(i[f[b]]={},null==d.get(f[b])?g.push(f):(h=d.get(f[b]),e(f,h.clonedModel,c)?void 0:k.push({model:f,child:h})))}),h=d.values(),h.forEach(function(c){var d;return null==c?void a.error("child undefined in ModelsWatcher."):null==c.model?void a.error("child.model undefined in ModelsWatcher."):(d=c.model[b],null==i[d]?j.push(c):void 0)}),{adds:g,removals:j,updates:k}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;return l={create:"create",update:"update","delete":"delete",init:"init"},k={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},n=function(){var a;return a={},a[""+k.IN_PROGRESS]="in-progress",a[""+k.RESOLVED]="resolved",a[""+k.REJECTED]="rejected",a}(),g=function(a){return a.$$state?a.$$state.status===k.IN_PROGRESS:a.hasOwnProperty("$$v")?void 0:!0},h=function(a){return a.$$state?a.$$state.status===k.RESOLVED:a.hasOwnProperty("$$v")?!0:void 0},j=function(a){return n[a]||"done w error"},d=function(b){var c,d,e;return c=a.defer(),d=a.all([b,c.promise]),e=a.defer(),b.then(c.resolve,function(){},function(a){return c.notify(a),e.notify(a)}),d.then(function(a){return e.resolve(a[0]||a[1])},function(a){return e.reject(a)}),e.promise.cancel=function(a){return null==a&&(a="canceled"),c.reject(a)},e.promise.notify=function(a){return null==a&&(a="cancel safe"),e.notify(a),b.hasOwnProperty("notify")?b.notify(a):void 0},null!=b.promiseType&&(e.promise.promiseType=b.promiseType),e.promise},e=function(a,b){return{promise:a,promiseType:b}},f=function(){return a.defer()},m=function(){var b;return b=a.defer(),b.resolve.apply(void 0,arguments),b.promise},i=function(d){var e;return _.isFunction(d)?(e=a.defer(),b(function(){var a;return a=d(),e.resolve(a)}),e.promise):void c.error("uiGmapPromise.promise() only accepts functions")},{defer:f,promise:i,resolve:m,promiseTypes:l,isInProgress:g,isResolved:h,promiseStatus:j,ExposedPromise:d,SniffedPromise:e}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var b;return b=function(){function b(){this.removeAll=a(this.removeAll,this),this.slice=a(this.slice,this),this.push=a(this.push,this),this.keys=a(this.keys,this),this.values=a(this.values,this),this.remove=a(this.remove,this),this.put=a(this.put,this),this.stateChanged=a(this.stateChanged,this),this.get=a(this.get,this),this.length=0,this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return b.prototype.get=function(a){return this.dict[a]},b.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},b.prototype.put=function(a,b){return null==this.get(a)&&this.length++,this.stateChanged(),this.dict[a]=b},b.prototype.remove=function(a,b){var c;return null==b&&(b=!1),!b||this.get(a)?(c=this.dict[a],delete this.dict[a],this.length--,this.stateChanged(),c):void 0},b.prototype.valuesOrKeys=function(a){var b,c;return null==a&&(a="Keys"),this["did"+a+"StateChange"]?(c=[],b=[],_.each(this.dict,function(a,d){return c.push(a),b.push(d)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=c,this.allKeys=b,this["all"+a]):this["all"+a]},b.prototype.values=function(){return this.valuesOrKeys("Vals")},b.prototype.keys=function(){return this.valuesOrKeys()},b.prototype.push=function(a,b){return null==b&&(b="key"),this.put(a[b],a)},b.prototype.slice=function(){return this.keys().map(function(a){return function(b){return a.remove(b)}}(this))},b.prototype.removeAll=function(){return this.slice()},b.prototype.each=function(a){return _.each(this.dict,function(b,c){return a(b)})},b.prototype.map=function(a){return _.map(this.dict,function(b,c){return a(b)})},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(a){var b;return b=function(a){return this.setIfChange=function(b){return function(c,d){return _.isEqual(d,c)?void 0:a(b,c)}},this.sic=this.setIfChange,this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(c,d,e,f){var g;return g=function(){function g(b,d,f,h){null==d&&(d={}),this.opt_options=null!=f?f:{},this.opt_events=h,this.checkSync=a(this.checkSync,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.clusterer=new NgMapMarkerClusterer(b,d,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="ClustererMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},g.prototype.add=function(a){return this.checkKey(a),this.clusterer.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(this.clusterer.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){return this.clusterer.repaint()},g.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},g.prototype.attachEvents=function(a,d){var e,f,g;if(this.listeners=[],b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Attaching event: "+f+" to clusterer"),g.push(this.listeners.push(google.maps.event.addListener(this.clusterer,f,a[f])))):g.push(void 0);return g}},g.prototype.clearEvents=function(){return f.removeEvents(this.listeners),this.listeners=[]},g.prototype.destroy=function(){return this.clearEvents(),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.clusterer.getMap())},g.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var a,c;return a=[],c=[],{createMapInstance:function(d,e){var f;return f=null,0===a.length?(f=new google.maps.Map(d,e),c.push(f)):(f=a.pop(),b.element(d).append(f.getDiv()),f.setOptions(e),c.push(f)),f},recycleMapInstance:function(b){var d;if(d=c.indexOf(b),0>d)throw new Error("Expected map instance to be a previously used instance");return c.splice(d,1),a.push(b)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(b,c,d){var e;return e=function(){function e(c,f,g){this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.handleOptDraw=a(this.handleOptDraw,this),this.clear=a(this.clear,this),this.destroy=a(this.destroy,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=e.type,this.gMap=c,this.gMarkers=new d,this.$log=b,this.$log.info(this)}return e.type="MarkerManager",e.prototype.add=function(a,c){var d,e;if(null==c&&(c=!0),null==a.key)throw e="gMarker.key undefined and it is REQUIRED!!",b.error(e),e;return d=this.gMarkers.get(a.key),d?void 0:(this.handleOptDraw(a,c,!0),this.gMarkers.put(a.key,a))},e.prototype.update=function(a,b){return null==b&&(b=!0),this.remove(a,b),this.add(a,b)},e.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},e.prototype.remove=function(a,b){return null==b&&(b=!0),this.handleOptDraw(a,b,!1),this.gMarkers.get(a.key)?this.gMarkers.remove(a.key):void 0},e.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},e.prototype.draw=function(){var a;return a=[],this.gMarkers.each(function(b){return function(c){return c.isDrawn?void 0:c.doAdd?(c.setMap(b.gMap),c.isDrawn=!0):a.push(c)}}(this)),a.forEach(function(a){return function(b){return b.isDrawn=!1,a.remove(b,!0); +}}(this))},e.prototype.destroy=function(){return this.clear()},e.prototype.clear=function(){return this.gMarkers.each(function(a){return a.setMap(null)}),delete this.gMarkers,this.gMarkers=new d},e.prototype.handleOptDraw=function(a,b,c){return b===!0?(c?a.setMap(this.gMap):a.setMap(null),a.isDrawn=!0):(a.isDrawn=!1,a.doAdd=c)},e.prototype.fit=function(){return c.fit(this.getGMarkers(),this.gMap)},e.prototype.getGMarkers=function(){return this.gMarkers.values()},e}()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(c,d,e,f){var g;return g=function(){function g(b,d,h,i,j){null==d&&(d={}),this.opt_options=null!=h?h:{},this.opt_events=i,this.scope=j,this.checkSync=a(this.checkSync,this),this.isSpiderfied=a(this.isSpiderfied,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.markerSpiderfier=new f(b,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="SpiderfierMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},g.prototype.add=function(a){return a.setMap(this.markerSpiderfier.map),this.checkKey(a),this.markerSpiderfier.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(a.setMap(null),this.markerSpiderfier.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){},g.prototype.clear=function(){return this.removeMany(this.getGMarkers())},g.prototype.attachEvents=function(a,d){return b.isDefined(a)&&null!=a&&b.isObject(a)?_.each(a,function(e){return function(f,g){return a.hasOwnProperty(g)&&b.isFunction(a[g])?(c.info(d+": Attaching event: "+g+" to markerSpiderfier"),e.markerSpiderfier.addListener(g,function(){return"spiderfy"===g||"unspiderfy"===g?e.scope.$evalAsync(a[g].apply(a,arguments)):e.scope.$evalAsync(a[g].apply(a,[arguments[0],g,arguments[0].model,arguments]))})):void 0}}(this)):void 0},g.prototype.clearEvents=function(a,d){var e,f;if(b.isDefined(a)&&null!=a&&b.isObject(a))for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])&&(c.info(d+": Clearing event: "+f+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(f))},g.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.markerSpiderfier.map)},g.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},g.prototype.isSpiderfied=function(){return _.find(this.getGMarkers(),function(a){return null!=(null!=a?a._omsData:void 0)})},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(a){var c,d;return c=function(b,c,d){return google.maps.event.addListener(b,c,function(){return d.apply(this,arguments),a(function(){},!0)})},d=function(a,d,e){var f;return e?c(a,d,e):(f=[],b.forEach(d,function(b,d){return f.push(c(a,d,b))}),function(){return b.forEach(f,function(a){return google.maps.event.removeListener(a)}),f=null})}}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(a){return function(c,d,e,f){var g,h,i,j,k,l,m,n,o;return j=!1,n=d.$eval(e),d["static"]||(k={set_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?(n[a].latitude=b.lat(),n[a].longitude=b.lng()):n[a]=b},insert_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?n.splice(a,0,{latitude:b.lat(),longitude:b.lng()}):n.splice(a,0,b)},remove_at:function(a){return j?void 0:n.splice(a,1)}},"Polygon"===n.type?g=n.coordinates[0]:"LineString"===n.type&&(g=n.coordinates),h={set_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g[a][1]=b.lat(),g[a][0]=b.lng()},insert_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g.splice(a,0,[b.lng(),b.lat()])},remove_at:function(a){return j?void 0:g.splice(a,1)}},m=a(c,b.isUndefined(n.type)?k:h)),l=function(a){var b,d,e,g,h,i,k,l;if(j=!0,i=c,b=!1,a){for(d=0,k=i.getLength(),g=a.length,e=Math.min(k,g),h=void 0;e>d;)l=i.getAt(d),h=a[d],"function"==typeof h.equals?h.equals(l)||(i.setAt(d,h),b=!0):l.lat()===h.latitude&&l.lng()===h.longitude||(i.setAt(d,new google.maps.LatLng(h.latitude,h.longitude)),b=!0),d++;for(;g>d;)h=a[d],"function"==typeof h.lat&&"function"==typeof h.lng?i.push(h):i.push(new google.maps.LatLng(h.latitude,h.longitude)),b=!0,d++;for(;k>d;)i.pop(),b=!0,d++}return j=!1,b?f(i):void 0},i=function(a){var b,d,e,g,h,i,k,l,m;if(j=!0,k=c,d=!1,a){for("Polygon"===n.type?b=a.coordinates[0]:"LineString"===n.type&&(b=a.coordinates),e=0,l=k.getLength(),h=b.length,g=Math.min(l,h),i=void 0;g>e;)m=k.getAt(e),i=b[e],m.lat()===i[1]&&m.lng()===i[0]||(k.setAt(e,new google.maps.LatLng(i[1],i[0])),d=!0),e++;for(;h>e;)i=b[e],k.push(new google.maps.LatLng(i[1],i[0])),d=!0,e++;for(;l>e;)k.pop(),d=!0,e++}return j=!1,d?f(k):void 0},d["static"]||(o=b.isUndefined(n.type)?d.$watchCollection(e,l):d.$watch(e,i,!0)),function(){return m&&(m(),m=null),o?(o(),o=null):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(a){return{maybeRepaint:function(b){return b?(b.style.opacity=.9,a(function(){return b.style.opacity=1})):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var a,b,c,d;return a=["length","forEach","map"],b=[],c=function(b){return b.forEach=function(c){return _.each(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(c),d=function(b){return b.map=function(c){return _.map(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(d),{slapMap:d,slapForEach:c,slapAll:function(a){return b.forEach(function(b){return b(a)}),a}}})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(d,e,f){var g;return g=function(d){function f(){return this.watchProps=a(this.watchProps,this),this.buildOpts=a(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(a){return b.isDefined(null!=a?a.model:void 0)?a.model:a},f.prototype.buildOpts=function(a,c,d){var f,g,h;return null==a&&(a={}),null==d&&(d={}),this.scope?this.gMap?(f=this.getCorrectModel(this.scope),h=this.scopeOrModelVal("stroke",this.scope,f),g=b.extend(a,this.DEFAULTS,{map:this.gMap,strokeColor:null!=h?h.color:void 0,strokeOpacity:null!=h?h.opacity:void 0,strokeWeight:null!=h?h.weight:void 0}),b.forEach(b.extend(d,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(a){return function(d,e){var h;return h=c?c[e]:a.scopeOrModelVal(e,a.scope,f),b.isUndefined(h)?g[e]=d:g[e]=f[e]}}(this)),g["static"]&&(g.editable=!1),g):void e.error("this.map not defined in CommonOptionsBuilder can not buildOpts"):void e.error("this.scope not defined in CommonOptionsBuilder can not buildOpts")},f.prototype.watchProps=function(a){return null==a&&(a=this.props),a.forEach(function(a){return function(b){return null!=a.attrs[b]||null!=a.attrs[null!=b?b.prop:void 0]?(null!=b?b.isColl:void 0)?a.scope.$watchCollection(b.prop,a.setMyOptions):a.scope.$watch(b,a.setMyOptions):void 0}}(this))},f}(f)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(c){var d;return d=function(c){function d(){return d.__super__.constructor.apply(this,arguments)}return a(d,c),d.prototype.buildOpts=function(a,c,e){var f,g;return g=this.getCorrectModel(this.scope),f=c?c.fill:this.scopeOrModelVal("fill",this.scope,g),a=b.extend(a,{fillColor:null!=f?f.color:void 0,fillOpacity:null!=f?f.opacity:void 0}),d.__super__.buildOpts.call(this,a,c,e)},d}(c)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{bounds:a},b)},c}(b)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b,d){return c.__super__.buildOpts.call(this,{center:a,radius:b},d)},c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(a,c){return _.extend(c,{createOptions:function(a,d,e,f){var g;return null==e&&(e={}),g=b.extend({},e,{position:null!=e.position?e.position:c.getCoords(a),visible:null!=e.visible?e.visible:c.validateCoords(a)}),null==e.icon&&null==d||(g=b.extend(g,{icon:null!=e.icon?e.icon:d})),null!=f&&(g.map=f),g},isLabel:function(a){return null==a?!1:null!=a.labelContent||null!=a.labelAnchor||null!=a.labelClass||null!=a.labelStyle||null!=a.labelVisible}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(d,e,f,g,h){return function(d,e){var i;return i=function(d){function i(c){var d,g,i;this.scope=c.scope,this.attrs=c.attrs,this.gMap=c.gMap,this.defaults=c.defaults,this.model=c.model,g=c.gObjectChangeCb,this.isScopeModel=null!=(i=c.isScopeModel)?i:!1,this.clean=a(this.clean,this),this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.isDragging=!1,this.internalEvents={dragend:function(a){return function(){return _.defer(function(){return a.isDragging=!1})}}(this),dragstart:function(a){return function(){return a.isDragging=!0}}(this)},d=function(a){return function(){var c;if(!a.isDragging)return a.pathPoints=a.convertPathPoints(a.scope.path),null!=a.gObject&&a.clean(),null!=a.scope.model&&(c=a.scope),a.pathPoints.length>0&&(a.gObject=e(a.buildOpts(a.pathPoints,c))),a.gObject?(f(a.gObject.getPath(),a.scope,"path",function(b){return a.pathPoints=b,null!=g?g():void 0}),b.isDefined(a.scope.events)&&b.isObject(a.scope.events)&&(a.listeners=a.model?h.setEvents(a.gObject,a.scope,a.model):h.setEvents(a.gObject,a.scope,a.scope)),a.internalListeners=a.model?h.setEvents(a.gObject,{events:a.internalEvents},a.model):h.setEvents(a.gObject,{events:a.internalEvents},a.scope)):void 0}}(this),d(),this.scope.$watch("path",function(a){return function(b,c){return _.isEqual(b,c)&&a.gObject?void 0:d()}}(this),!0),!this.scope["static"]&&b.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setEditable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setDraggable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(a){return function(b,c){var d;return b!==c&&(b=!a.isFalse(b)),null!=(d=a.gObject)?d.setVisible(b):void 0}}(this),!0),b.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(a){return function(){return a.clean(),a.scope=null}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this))}return c(i,d),i.include(g),i.prototype.clean=function(){var a;return h.removeEvents(this.listeners),h.removeEvents(this.internalListeners),null!=(a=this.gObject)&&a.setMap(null),this.gObject=null},i}(d)}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(a,b){var c,d;return c=function(a,b,c){var d,e;e=new google.maps.Polyline({map:a,clickable:!1}),d=google.maps.event.addListener(a,"mousemove",function(a){return e.getPath().push(a.latLng)}),google.maps.event.addListenerOnce(a,"mouseup",function(f){var g;return google.maps.event.removeListener(d),g=e.getPath(),e.setMap(null),b.push(new google.maps.Polygon({map:a,path:g})),e=null,google.maps.event.clearListeners(a.getDiv(),"mousedown"),c()})},d=function(d,e){var f,g;return this.map=d,f=function(b){return function(){var c;return c={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},a.info("disabling map move"),b.map.setOptions(c)}}(this),g=function(a){return function(){var b,c;return b={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},null!=(c=a.deferred)&&c.resolve(),_.defer(function(){return a.map.setOptions(_.extend(b,e.options))})}}(this),this.engage=function(d){return function(e){return d.polys=e,d.deferred=b.defer(),f(),a.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(d.map.getDiv(),"mousedown",function(a){return c(d.map,d.polys,g)}),d.deferred.promise}}(this),this}}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(e,f,g,h,i,j,k,l,m){var n;return n=function(e){function n(a){this.internalEvents=c(this.internalEvents,this),this.setLabelOptions=c(this.setLabelOptions,this),this.setOptions=c(this.setOptions,this),this.setIcon=c(this.setIcon,this),this.setCoords=c(this.setCoords,this),this.isNotValid=c(this.isNotValid,this),this.maybeSetScopeValue=c(this.maybeSetScopeValue,this),this.createMarker=c(this.createMarker,this),this.setMyScope=c(this.setMyScope,this),this.updateModel=c(this.updateModel,this),this.handleModelChanges=c(this.handleModelChanges,this),this.destroy=c(this.destroy,this);var b,d,e,f,h,j,k;k=a.scope,this.model=a.model,this.keys=a.keys,this.gMap=a.gMap,this.defaults=null!=(d=a.defaults)?d:{},this.doClick=a.doClick,this.gManager=a.gManager,this.doDrawSelf=null!=(e=a.doDrawSelf)?e:!0,this.trackModel=null!=(f=a.trackModel)?f:!0,this.needRedraw=null!=(h=a.needRedraw)?h:!1,this.isScopeModel=null!=(j=a.isScopeModel)?j:!1,this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.deferred=m.defer(),_.each(this.keys,function(a){return function(b,c){var d;return d=a.keys[c],null!=d&&!_.isFunction(d)&&_.isString(d)?a[c+"Key"]=d:void 0}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),n.__super__.constructor.call(this,k),this.scope.getGMarker=function(a){return function(){return a.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(a){return function(b,c){return b!==c?a.handleModelChanges(b,c):void 0}}(this),!0)):(b=new i(function(a){return function(b){return _.isFunction(b)&&(b="all"),a.firstTime?void 0:a.setMyScope(b,k)}}(this),!1),_.each(this.keys,function(a,c){return k.$watch(c,b.sic(c),!0)})),this.scope.$on("$destroy",function(a){return function(){return o(a)}}(this)),this.createMarker(this.model),g.info(this)}var o;return d(n,e),n.include(f),n.include(h),n.include(j),o=function(a){return null!=(null!=a?a.gObject:void 0)&&(a.removeEvents(a.externalListeners),a.removeEvents(a.internalListeners),null!=a?a.gObject:void 0)?(a.removeFromManager&&a.gManager.remove(a.gObject),a.gObject.setMap(null),a.gObject=null):void 0},n.prototype.destroy=function(a){return null==a&&(a=!0),this.removeFromManager=a,this.scope.$destroy()},n.prototype.handleModelChanges=function(a,b){var c,d,e;return c=this.getChanges(a,b,k.keys),this.firstTime?void 0:(d=0,e=_.keys(c).length,_.each(c,function(c){return function(f,g){var h;return d+=1,h=e===d,c.setMyScope(g,a,b,!1,!0,h),c.needRedraw=!0}}(this)))},n.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=_.clone(a,!0)),this.setMyScope("all",a,this.model)},n.prototype.renderGMarker=function(b,c){var d,e,f;if(null==b&&(b=!0),d=this.getProp("coords",this.scope,this.model),null!=(null!=(f=this.gManager)?f.isSpiderfied:void 0)&&(e=this.gManager.isSpiderfied()),null!=d){if(!this.validateCoords(d))return void g.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=c&&c(),b&&this.gObject&&this.gManager.add(this.gObject),e)return this.gManager.markerSpiderfier.spiderListener(this.gObject,a.event)}else if(b&&this.gObject)return this.gManager.remove(this.gObject)},n.prototype.setMyScope=function(a,b,c,d,e){var f;switch(null==c&&(c=void 0),null==d&&(d=!1),null==e&&(e=!0),null==b?b=this.model:this.model=b,this.gObject||(this.setOptions(this.scope,e),f=!0),a){case"all":return _.each(this.keys,function(a){return function(f,g){return a.setMyScope(g,b,c,d,e)}}(this));case"icon":return this.maybeSetScopeValue({gSetter:this.setIcon,doDraw:e});case"coords":return this.maybeSetScopeValue({gSetter:this.setCoords,doDraw:e});case"options":if(!f)return this.createMarker(b,c,d,e)}},n.prototype.createMarker=function(a,b,c,d){return null==b&&(b=void 0),null==c&&(c=!1),null==d&&(d=!0),this.maybeSetScopeValue({gSetter:this.setOptions,doDraw:d}),this.firstTime=!1},n.prototype.maybeSetScopeValue=function(a){var b,c,d;return c=a.gSetter,b=null!=(d=a.doDraw)?d:!0,null!=c&&c(this.scope,b),this.doDrawSelf&&b?this.gManager.draw():void 0},n.prototype.isNotValid=function(a,b){var c,d;return null==b&&(b=!0),d=b?void 0===this.gObject:!1,c=this.trackModel?!1:a.$id!==this.scope.$id,c||d},n.prototype.setCoords=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),c=b.getCoords(d),e=b.gObject.getPosition(),null==e||null==c||c.lng()!==e.lng()||c.lat()!==e.lat()?(b.gObject.setPosition(c),b.gObject.setVisible(b.validateCoords(d))):void 0}}(this))},n.prototype.setIcon=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return e=b.gObject.getIcon(),d=b.getProp("icon",a,b.model),e!==d?(b.gObject.setIcon(d),c=b.getProp("coords",a,b.model),b.gObject.setPosition(b.getCoords(c)),b.gObject.setVisible(b.validateCoords(c))):void 0}}(this))},n.prototype.setOptions=function(a,b){var c;if(null==b&&(b=!0),!this.isNotValid(a,!1)){if(this.renderGMarker(b,function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),e=b.getProp("icon",a,b.model),c=b.getProp("options",a,b.model),b.opts=b.createOptions(d,e,c),b.isLabel(b.gObject)!==b.isLabel(b.opts)&&null!=b.gObject&&(b.gManager.remove(b.gObject),b.gObject=void 0),null!=b.gObject&&b.gObject.setOptions(b.setLabelOptions(b.opts)),b.gObject||(b.isLabel(b.opts)?b.gObject=new MarkerWithLabel(b.setLabelOptions(b.opts)):b.opts.content?(b.gObject=new RichMarker(b.opts),b.gObject.getIcon=b.gObject.getContent,b.gObject.setIcon=b.gObject.setContent):b.gObject=new google.maps.Marker(b.opts),_.extend(b.gObject,{model:b.model})),b.externalListeners&&b.removeEvents(b.externalListeners),b.internalListeners&&b.removeEvents(b.internalListeners),b.externalListeners=b.setEvents(b.gObject,b.scope,b.model,["dragend"]),b.internalListeners=b.setEvents(b.gObject,{events:b.internalEvents(),$evalAsync:function(){}},b.model),null!=b.id?b.gObject.key=b.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==l.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");(null!=(c=this.gObject)?c.getMap():0)&&this.gManager.type===l.type||(g.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},n.prototype.setLabelOptions=function(a){return a.labelAnchor&&(a.labelAnchor=this.getLabelPositionPoint(a.labelAnchor)),a},n.prototype.internalEvents=function(){return{dragend:function(a){return function(b,c,d,e){var f,g,h;return g=a.trackModel?a.scope.model:a.model,h=a.setCoordsFromEvent(a.modelOrKey(g,a.coordsKey),a.gObject.getPosition()),g=a.setVal(d,a.coordsKey,h),f=a.scope.events,null!=(null!=f?f.dragend:void 0)&&f.dragend(b,c,g,e),a.scope.$apply()}}(this),click:function(a){return function(c,d,e,f){var g;return g=a.getProp("click",a.scope,a.model),a.doClick&&b.isFunction(g)?a.scope.$evalAsync(g(c,d,a.model,f)):void 0}}(this)}},n}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polygon(a)},e=new b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polyline(a)},e=b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(e,f,g,h,i,j,k,l){var m;return m=function(e){function m(a){this.updateModel=c(this.updateModel,this),this.destroy=c(this.destroy,this),this.remove=c(this.remove,this),this.getLatestPosition=c(this.getLatestPosition,this),this.hideWindow=c(this.hideWindow,this),this.showWindow=c(this.showWindow,this),this.handleClick=c(this.handleClick,this),this.watchOptions=c(this.watchOptions,this),this.watchCoords=c(this.watchCoords,this),this.createGWin=c(this.createGWin,this),this.watchElement=c(this.watchElement,this),this.watchAndDoShow=c(this.watchAndDoShow,this),this.doShow=c(this.doShow,this);var b,d,e,f,h;this.model=null!=(d=a.model)?d:{},this.scope=a.scope,this.opts=a.opts,this.isIconVisibleOnClick=a.isIconVisibleOnClick,this.gMap=a.gMap,this.markerScope=a.markerScope,this.element=a.element,this.needToManualDestroy=null!=(e=a.needToManualDestroy)?e:!1,this.markerIsVisibleAfterWindowClose=null!=(f=a.markerIsVisibleAfterWindowClose)?f:!0,this.isScopeModel=null!=(h=a.isScopeModel)?h:!1,this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.getGmarker=function(){var a,b;return null!=(null!=(a=this.markerScope)?a.getGMarker:void 0)&&null!=(b=this.markerScope)?b.getGMarker():void 0},this.listeners=[],this.createGWin(),b=this.getGmarker(),null!=b&&b.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(a){return function(){return a.destroy()}}(this)),g.info(this)}return d(m,e),m.include(f),m.include(l),m.prototype.doShow=function(a){return this.scope.show===!0||a?this.showWindow():this.hideWindow()},m.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},m.prototype.watchElement=function(){return this.scope.$watch(function(a){return function(){var b,c;if(a.element||a.html)return a.html!==a.element.html()&&a.gObject?(null!=(b=a.opts)&&(b.content=void 0),c=a.gObject.isOpen(),a.remove(),a.createGWin(c)):void 0}}(this))},m.prototype.createGWin=function(b){var c,d,e,f,g;return null==b&&(b=!1),e=this.getGmarker(),d={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),d=this.opts),this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),c=this.scope.options?this.scope.options:d,this.opts=this.createWindowOptions(e,this.markerScope||this.scope,this.html,c),null!=this.opts?(this.gObject||(this.opts.boxClass&&a.InfoBox&&"function"==typeof a.InfoBox?this.gObject=new a.InfoBox(this.opts):this.gObject=new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return k.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(a){return function(){return e&&(e.setAnimation(a.oldMarkerAnimation),a.markerIsVisibleAfterWindowClose&&_.delay(function(){return e.setVisible(!1),e.setVisible(a.markerIsVisibleAfterWindowClose)},250)),a.gObject.close(),a.model.show=!1,null!=a.scope.closeClick?a.scope.$evalAsync(a.scope.closeClick()):a.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(f=this.scope)&&null!=(g=f.options)?g.forceClick:void 0)||b),this.doShow(this.gObject.isOpen())):void 0},m.prototype.watchCoords=function(){var a;return a=null!=this.markerScope?this.markerScope:this.scope,a.$watch("coords",function(a){return function(b,c){var d;if(b!==c){if(null==b)a.hideWindow();else if(!a.validateCoords(b))return void g.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(a.model));if(d=a.getCoords(b),a.doShow(),a.gObject.setPosition(d),a.opts)return a.opts.position=d}}}(this),!0)},m.prototype.watchOptions=function(){return this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&(a.opts=b,null!=a.gObject)){if(a.gObject.setOptions(a.opts),null!=a.opts.visible&&a.opts.visible)return a.showWindow();if(null!=a.opts.visible)return a.hideWindow()}}}(this),!0)},m.prototype.handleClick=function(a){var b,c;if(null!=this.gObject)return c=this.getGmarker(),b=function(a){return function(){return null==a.gObject&&a.createGWin(),a.showWindow(),null!=c?(a.initialMarkerVisibility=c.getVisible(),a.oldMarkerAnimation=c.getAnimation(),c.setVisible(a.isIconVisibleOnClick)):void 0}}(this),a&&b(),c?this.listeners=this.listeners.concat(this.setEvents(c,{events:{click:b}},this.model)):void 0},m.prototype.showWindow=function(){var a,c,d;if(null!=this.gObject)return d=null,c=function(a){return function(){var b,c,d;if(!a.gObject.isOpen()){if(c=a.getGmarker(),null!=a.gObject&&null!=a.gObject.getPosition&&(d=a.gObject.getPosition()),c&&(d=c.getPosition()),!d)return;if(a.gObject.open(a.gMap,c),b=a.gObject.isOpen(),a.model.show!==b)return a.model.show=b}}}(this),this.scope.templateUrl?i.get(this.scope.templateUrl,{cache:j}).then(function(a){return function(e){var f;return d=a.scope.$new(),b.isDefined(a.scope.templateParameter)&&(d.parameter=a.scope.templateParameter),f=h(e.data)(d),a.gObject.setContent(f[0]),c()}}(this)):this.scope.template?(d=this.scope.$new(),b.isDefined(this.scope.templateParameter)&&(d.parameter=this.scope.templateParameter),a=h(this.scope.template)(d),this.gObject.setContent(a[0]),c()):c(),this.scope.$on("destroy",function(){return d.$destroy()})},m.prototype.hideWindow=function(){return null!=this.gObject&&this.gObject.isOpen()?this.gObject.close():void 0},m.prototype.getLatestPosition=function(a){var b;return b=this.getGmarker(),null==this.gObject||null==b||a?a?this.gObject.setPosition(a):void 0:this.gObject.setPosition(b.getPosition())},m.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject, +delete this.opts},m.prototype.destroy=function(a){var b;return null==a&&(a=!1),this.remove(),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?void 0:this.scope.$destroy()},m.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=_.clone(a,!0)),_.extend(this.model,this.clonedModel||a)},m}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(d,e,f,g,h,i,j,k){return function(d,l,m){var n;return n=function(f){function n(b,c,f,g,i){this.element=c,this.attrs=f,this.gMap=g,this.defaults=i,this.maybeFit=a(this.maybeFit,this),this.createChild=a(this.createChild,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),n.__super__.constructor.call(this,b),this["interface"]=d,this.$log=e,this.plurals=new h,_.each(d.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return c(n,f),n.include(g),n.prototype.watchModels=function(a){return a.$watch("models",function(b){return function(c,d){return c!==d?b.doINeedToWipe(c)||a.doRebuildAll?b.rebuildAll(a,!0,!0):b.createChildScopes(!1):void 0}}(this),!0)},n.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},n.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},n.prototype.onDestroy=function(){return n.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,j.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},n.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.rebuildAll(a,!1,!0)}}(this))},n.prototype.createChildScopes=function(a){return null==a&&(a=!0),b.isUndefined(this.scope.models)?void this.$log.error("No models to create "+m+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},n.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},n.prototype.createAllNew=function(a,b){var c;return null==b&&(b=!1),this.models=a.models,this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.didQueueInitPromise(this,a)?void 0:(c=null,i.promiseLock(this,j.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return i.map(a.models,function(a){var d;return d=b.createChild(a,b.gMap),c&&(e.debug("createNew should fall through safely"),d.isEnabled=!1),d.pathPoints.getArray()},i.chunkSizeFrom(a.chunk)).then(function(a){return b.maybeFit(a),b.firstTime=!1})}}(this)))},n.prototype.pieceMeal=function(a,b){var c,d;return null==b&&(b=!0),a.$$destroyed?void 0:(c=null,d=null,this.models=a.models,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,j.promiseTypes.update,"pieceMeal",function(a){return c=a},function(b){return function(){return j.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(e){return d=e,d.updates.length&&i.each(d.updates,function(a){return _.extend(a.child.scope,a.model),a.child.model=a.model}),i.each(d.removals,function(a){return null!=a?(a.destroy(),b.plurals.remove(a.model[b.idKey]),c):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(d.adds,function(a){return c&&e.debug("pieceMeal should fall through safely"),b.createChild(a,b.gMap),c},i.chunkSizeFrom(a.chunk)).then(function(){return b.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0)))},n.prototype.createChild=function(a,b){var c,e;return e=this.scope.$new(!1),this.setChildScope(d.scopeKeys,e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),e["static"]=this.scope["static"],c=new l({isScopeModel:!0,scope:e,attrs:this.attrs,gMap:b,defaults:this.defaults,model:a,gObjectChangeCb:function(a){return function(){return a.maybeFit()}}(this)}),null==a[this.idKey]?void this.$log.error(m+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):(this.plurals.put(a[this.idKey],c),c)},n.prototype.maybeFit=function(a){return null==a&&(a=this.plurals.map(function(a){return a.pathPoints})),this.scope.fit?(a=_.flatten(a),k.fit(a,this.gMap)):void 0},n}(f)}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(c,d,e,f,g){var h,i;return i=function(a,b){return a.settingFromDirective=!0,b(),d(function(){return a.settingFromDirective=!1})},h=function(d){function g(a,d,f,g,h){var j,k,l;this.attrs=f,this.gMap=g,this.DEFAULTS=h,this.scope=a,l=null,j=function(a){return function(){return l=null,null!=a.listeners?(a.removeEvents(a.listeners),a.listeners=void 0):void 0}}(this),k=new google.maps.Circle(this.buildOpts(e.getCoords(a.center),a.radius)),this.setMyOptions=function(b){return function(c,d){return a.settingFromDirective?void 0:!_.isEqual(c,d)||c!==d||(null!=c&&null!=d?c.coordinates!==d.coordinates:0)?k.setOptions(b.buildOpts(e.getCoords(a.center),a.radius)):void 0}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),null!=this.scope.control&&(this.scope.control.getCircle=function(){return k}),j(),this.listeners=this.setEvents(k,a,a,["radius_changed"])||[],this.listeners.push(google.maps.event.addListener(k,"radius_changed",function(){var c,d;return c=k.getRadius(),c!==l?(l=c,d=function(){return i(a,function(){var b,d;return c!==a.radius&&(a.radius=c),(null!=(b=a.events)?b.radius_changed:void 0)&&_.isFunction(null!=(d=a.events)?d.radius_changed:void 0)?a.events.radius_changed(k,"radius_changed",a,arguments):void 0})},b.mock?d():a.$evalAsync(function(){return d()})):void 0})),this.listeners.push(google.maps.event.addListener(k,"center_changed",function(){return a.$evalAsync(function(){return i(a,function(){return b.isDefined(a.center.type)?(a.center.coordinates[1]=k.getCenter().lat(),a.center.coordinates[0]=k.getCenter().lng()):(a.center.latitude=k.getCenter().lat(),a.center.longitude=k.getCenter().lng())})})})),a.$on("$destroy",function(){return j(),k.setMap(null)}),c.info(this)}return a(g,d),g.include(e),g.include(f),g}(g)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(b,c,d,e){var f;return f=function(b){function c(a,b,c,d){var e,f;this.scope=a,this.attrs=c,this.map=d,e=new google.maps.drawing.DrawingManager(this.scope.options),e.setMap(this.map),f=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return e}),!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(a){return null!=e?e.setOptions(a):void 0},!0),null!=this.scope.events&&(f=this.setEvents(e,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=f&&a.removeEvents(f),f=a.setEvents(e,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(a){return function(){return null!=f&&a.removeEvents(f),e.setMap(null),e=null}}(this))}return a(c,b),c.include(e),c}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,g,h){if(this.scope=c,this.element=d,this.attrs=g,this.map=h,this.onWatch=a(this.onWatch,this),this.watch=a(this.watch,this),this.validateScope=a(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=e,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=b.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(a){return function(){return a.onDestroy(a.scope)}}(this))}return c(f,d),f.prototype.DEFAULTS={},f.prototype.validateScope=function(a){var b;return null==a?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(b=null!=a.coords,b?b:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},f.prototype.watch=function(a,b,c){return null==c&&(c=!0),b.$watch(a,function(c){return function(d,e){return _.isEqual(d,e)?void 0:c.onWatch(a,b,d,e)}}(this),c)},f.prototype.onWatch=function(a,b,c,d){},f}(d)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(b,c,d){var e;return e=function(b){function e(a,b,c,f,g,h,i,j){e.__super__.constructor.call(this,a),this.$log=d,this.$timeout=g,this.$compile=h,this.$http=i,this.$templateCache=j,this.DEFAULTS={},null!=a.options&&(this.DEFAULTS=a.options)}return a(e,b),e.include(c),e.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(d,e,f){var g;return g=function(d){function f(c,d,f,g,h,i){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.onLayerCreated=null!=h?h:void 0,this.$log=null!=i?i:e,this.createGoogleLayer=a(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.gObject.setMap(a.gMap):a.gObject.setMap(null)):void 0}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){return b!==c&&a.doShow?a.gObject.setOptions(b):void 0}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.gObject.setMap(null)}}(this)))}return c(f,d),f.prototype.createGoogleLayer=function(){var a;return null==this.attrs.options?this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&this.doShow&&this.gObject.setMap(this.gMap),null!=this.gObject&&null!=this.onLayerCreated&&"function"==typeof(a=this.onLayerCreated(this.scope,this.gObject))?a(this.gObject):void 0},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,f,g,h){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.$log=null!=h?h:e,this.hideOverlay=a(this.hideOverlay,this),this.showOverlay=a(this.showOverlay,this),this.refreshMapType=a(this.refreshMapType,this),this.createMapType=a(this.createMapType,this),null==this.attrs.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.showOverlay(),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.showOverlay():a.hideOverlay()):void 0}}(this),!0),this.scope.$watchCollection("options",function(a){return function(b,c){var d,e;return!_.isEqual(b,c)&&(e=["tileSize","maxZoom","minZoom","name","alt"],d=_.some(e,function(a){return!c||!b||!_.isEqual(b[a],c[a])}))?a.refreshMapType():void 0}}(this)),b.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(a){return function(b,c){return _.isEqual(b,c)?void 0:a.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.hideOverlay(),a.mapType=null}}(this)))}return c(f,d),f.prototype.createMapType=function(){if(null!=this.scope.options.getTile)this.mapType=this.scope.options;else{if(null==this.scope.options.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(this.scope.options)}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),b.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var a;return a=!1,this.gMap.overlayMapTypes.forEach(function(b){return function(c,d){a||c.layerId!==b.id||(a=!0,b.gMap.overlayMapTypes.removeAt(d))}}(this))},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p){var q,r;return r=function(a,b){return b.plurals=new f,b.scope.plurals=b.plurals,b},q=function(d){function k(b,c,d,e){this.maybeExecMappedEvent=a(this.maybeExecMappedEvent,this),this.onDestroy=a(this.onDestroy,this),this.newChildMarker=a(this.newChildMarker,this),this.pieceMeal=a(this.pieceMeal,this),this.rebuildAll=a(this.rebuildAll,this),this.createAllNew=a(this.createAllNew,this),this.bindToTypeEvents=a(this.bindToTypeEvents,this),this.createChildScopes=a(this.createChildScopes,this),this.validateScope=a(this.validateScope,this),this.onWatch=a(this.onWatch,this),k.__super__.constructor.call(this,b,c,d,e),this["interface"]=l,r(new f,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,this.setIdKey(this.scope),this.scope.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(a){return function(b,c){if(!_.isEqual(b,c)||!a.modelsRendered){if(0===b.length&&0===c.length)return;return a.modelsRendered=!0,a.onWatch("models",a.scope,b,c)}}}(this),!this.isTrue(d.modelsbyref)),this.watch("doCluster",this.scope),this.watch("type",this.scope),this.watch("clusterOptions",this.scope),this.watch("clusterEvents",this.scope),this.watch("typeOptions",this.scope),this.watch("typeEvents",this.scope),this.watch("fit",this.scope),this.watch("idKey",this.scope),this.gManager=void 0,this.createAllNew(this.scope)}return c(k,d),k.include(n),k.include(e),k.prototype.onWatch=function(a,b,c,d){return"idKey"===a&&c!==d&&(this.idKey=c),this.doRebuildAll||"doCluster"===a||"type"===a?this.rebuildAll(b):this.pieceMeal(b)},k.prototype.validateScope=function(a){var c;return c=b.isUndefined(a.models)||void 0===a.models,c&&this.$log.error(this.constructor.name+": no valid models attribute found"),k.__super__.validateScope.call(this,a)||c},k.prototype.createChildScopes=function(a){return null!=this.gMap&&null!=this.scope.models?a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1):void 0},k.prototype.bindToTypeEvents=function(a,c){var d,e;return null==c&&(c=["click","mouseout","mouseover"]),e=this,this.origTypeEvents?b.extend(a,this.origTypeEvents):(this.origTypeEvents={},_.each(c,function(b){return function(c){return b.origTypeEvents[c]=null!=a?a[c]:void 0}}(this))),d={},_.each(c,function(a){return d[a]=function(b){return e.maybeExecMappedEvent(b,a)}}),b.extend(a,d)},k.prototype.createAllNew=function(a){var b,c,d,e;return null!=this.gManager&&(this.gManager instanceof p&&(b=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),d=a.typeEvents||a.clusterEvents,e=a.typeOptions||a.clusterOptions,a.doCluster||"cluster"===a.type?(null!=d&&this.bindToTypeEvents(d),this.gManager=new i(this.map,void 0,e,d)):"spider"===a.type?(null!=d&&this.bindToTypeEvents(d,["spiderfy","unspiderfy"]),this.gManager=new p(this.map,void 0,e,d,this.scope),b&&this.gManager.spiderfy()):this.gManager=new j(this.map),this.didQueueInitPromise(this,a)?void 0:(c=null,h.promiseLock(this,m.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return h.each(a.models,function(d){return b.newChildMarker(d,a),c},h.chunkSizeFrom(a.chunk)).then(function(){return b.modelsRendered=!0,a.fit&&b.gManager.fit(),b.gManager.draw(),b.scope.pluralsUpdate.updateCtr+=1},h.chunkSizeFrom(a.chunk))}}(this)))},k.prototype.rebuildAll=function(a){var b;if(a.doRebuild||void 0===a.doRebuild)return(null!=(b=this.scope.plurals)?b.length:void 0)?this.onDestroy(a).then(function(b){return function(){return b.createAllNew(a)}}(this)):this.createAllNew(a)},k.prototype.pieceMeal=function(a){var b,c;if(!a.$$destroyed)return b=null,c=null,this.modelsLength()&&this.scope.plurals.length?h.promiseLock(this,m.promiseTypes.update,"pieceMeal",function(a){return b=a},function(d){return function(){return m.promise(function(){return d.figureOutState(d.idKey,a,d.scope.plurals,d.modelKeyComparison)}).then(function(e){return c=e,h.each(c.removals,function(a){return null!=a?(null!=a.destroy&&a.destroy(),d.scope.plurals.remove(a.id),b):void 0},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.adds,function(c){return d.newChildMarker(c,a),b},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.updates,function(a){return d.updateChild(a.child,a.model),b},h.chunkSizeFrom(a.chunk))}).then(function(){return(c.adds.length>0||c.removals.length>0||c.updates.length>0)&&(a.plurals=d.scope.plurals,a.fit&&d.gManager.fit(),d.gManager.draw()),d.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(a))},k.prototype.newChildMarker=function(a,b){var c,d,e;if(!a)throw"model undefined";return null==a[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.$log.info("child",c,"markers",this.scope.markerModels),d=b.$new(!1),d.events=b.events,e={},l.scopeKeys.forEach(function(a){return e[a]=b[a]}),c=new g({scope:d,model:a,keys:e,gMap:this.map,defaults:this.DEFAULTS,doClick:this.doClick,gManager:this.gManager,doDrawSelf:!1,isScopeModel:!0}),this.scope.plurals.put(a[this.idKey],c),c)},k.prototype.onDestroy=function(a){return k.__super__.onDestroy.call(this,a),h.promiseLock(this,m.promiseTypes["delete"],void 0,void 0,function(a){return function(){return h.each(a.scope.plurals.values(),function(a){return null!=a?a.destroy(!1):void 0},h.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){return null!=a.gManager&&a.gManager.destroy(),a.plurals.removeAll(),a.plurals!==a.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),a.scope.pluralsUpdate.updateCtr+=1})}}(this))},k.prototype.maybeExecMappedEvent=function(a,b){var c,d;if(!this.scope.$$destroyed)return d=this.scope.typeEvents||this.scope.clusterEvents,_.isFunction(null!=d?d[b]:void 0)&&(c=this.mapTypeToPlurals(a),this.origTypeEvents[b])?this.origTypeEvents[b](c.group,c.mapped):void 0},k.prototype.mapTypeToPlurals=function(a){var b,c,d;return _.isArray(a)?b=a:_.isFunction(a.getMarkers)&&(b=a.getMarkers()),null==b?void o.error("Unable to map event as we cannot find the array group to map"):(c=(null!=(d=this.scope.plurals.values())?d.length:void 0)?b.map(function(a){return function(b){return a.scope.plurals.get(b.key).model}}(this)):[],{cluster:a,mapped:c,group:a})},k.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},k}(d)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(a){return b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+a+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+a+"ChildModel","uiGmapI"+a,function(b,c,d){return b(d,c,a)}])})}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(b,c,d,e){var f;return f=function(e){function f(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;this.scope=a,this.attrs=d,this.gMap=e,this.DEFAULTS=f,g=void 0,j=!1,o=[],n=void 0,k=function(a){return function(){return a.isTrue(a.attrs.fit)?a.fitMapBounds(a.gMap,g):void 0}}(this),i=function(a){return function(){var c,d,e;return null!=a.scope.bounds&&null!=(null!=(c=a.scope.bounds)?c.sw:void 0)&&null!=(null!=(d=a.scope.bounds)?d.ne:void 0)&&a.validateBoundPoints(a.scope.bounds)?(g=a.convertBoundPoints(a.scope.bounds),b.info("new new bounds created: "+JSON.stringify(g))):null!=a.scope.bounds.getNorthEast&&null!=a.scope.bounds.getSouthWest?g=a.scope.bounds:null!=a.scope.bounds?b.error("Invalid bounds for newValue: "+JSON.stringify(null!=(e=a.scope)?e.bounds:void 0)):void 0}}(this),i(),l=new google.maps.Rectangle(this.buildOpts(g)),b.info("gObject (rectangle) created: "+l),p=!1,q=function(a){return function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),p?void 0:a.scope.$evalAsync(function(a){return null!=a.bounds&&null!=a.bounds.sw&&null!=a.bounds.ne&&(a.bounds.ne={latitude:c.lat(),longitude:c.lng()},a.bounds.sw={latitude:d.lat(),longitude:d.lng()}),null!=a.bounds.getNorthEast&&null!=a.bounds.getSouthWest?a.bounds=b:void 0})}}(this),m=function(a){return function(){return k(),a.removeEvents(o),o.push(google.maps.event.addListener(l,"dragstart",function(){return j=!0})),o.push(google.maps.event.addListener(l,"dragend",function(){return j=!1,q()})),o.push(google.maps.event.addListener(l,"bounds_changed",function(){return j?void 0:q()}))}}(this),h=function(a){return function(){return a.removeEvents(o),null!=n&&a.removeEvents(n),l.setMap(null)}}(this),null!=g&&m(),this.scope.$watch("bounds",function(a,b){var c;if(!(_.isEqual(a,b)&&null!=g||j))return p=!0,null==a?void h():(null==g?c=!0:k(),i(),l.setBounds(g),p=!1,c&&null!=g?m():void 0)},!0),this.setMyOptions=function(a){return function(b,c){return _.isEqual(b,c)||null==g||null==b?void 0:l.setOptions(a.buildOpts(g))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(n=this.setEvents(l,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=n&&a.removeEvents(n),n=a.setEvents(l,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(){return h()}),b.info(this)}return a(f,e),f.include(c),f.include(d),f}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper",function(d,e,f){var g;return g=function(d){function g(c,d,f,g,h,i,j){var k;return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.ctrlPosition=h,this.template=i,this.$log=null!=j?j:e,this.setVisibility=a(this.setVisibility,this),this.getBounds=a(this.getBounds,this),this.setBounds=a(this.setBounds,this),this.createSearchBox=a(this.createSearchBox,this),this.addToParentDiv=a(this.addToParentDiv,this),this.addAsMapControl=a(this.addAsMapControl,this),this.init=a(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):(b.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),b.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),b.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,k=b.element("
"),k.append(this.template),this.input=k.find("input")[0],void this.init())}return c(g,d),g.include(f),g.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(a){return function(c,d){return b.isObject(c)&&(null!=c.bounds&&a.setBounds(c.bounds),null!=c.visible&&a.visible!==c.visible)?a.setVisibility(c.visible):void 0}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.autocomplete?this.listener=google.maps.event.addListener(this.gObject,"place_changed",function(a){return function(){return a.places=a.gObject.getPlace()}}(this)):this.listener=google.maps.event.addListener(this.gObject,"places_changed",function(a){return function(){return a.places=a.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$stateChangeSuccess",function(a){return function(){return null!=a.attrs.parentdiv?a.addToParentDiv():void 0}}(this)),this.scope.$on("$destroy",function(a){return function(){return a.gObject=null}}(this))},g.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},g.prototype.addToParentDiv=function(){var a;return this.parentDiv=b.element(document.getElementById(this.scope.parentdiv)),(null!=(a=this.parentDiv)?a.length:void 0)?this.parentDiv.append(this.input):void 0},g.prototype.createSearchBox=function(){return this.autocomplete?this.gObject=new google.maps.places.Autocomplete(this.input,this.scope.options):this.gObject=new google.maps.places.SearchBox(this.input,this.scope.options)},g.prototype.setBounds=function(a){if(b.isUndefined(a.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(a.isEmpty()===!1&&null!=this.gObject)return this.gObject.setBounds(a)},g.prototype.getBounds=function(){return this.gObject.getBounds()},g.prototype.setVisibility=function(a){return null!=this.attrs.parentdiv?a===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):a===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=a},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s;return s=function(d){function s(b,c,d,e,g,i){this.gMap=g,this.markersScope=i,this.modelKeyComparison=a(this.modelKeyComparison,this),this.interpolateContent=a(this.interpolateContent,this),this.setChildScope=a(this.setChildScope,this),this.createWindow=a(this.createWindow,this),this.setContentKeys=a(this.setContentKeys,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchOurScope=a(this.watchOurScope,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),this.go=a(this.go,this),s.__super__.constructor.call(this,b,c,d,e,k,l,m,n),this["interface"]=q,this.plurals=new f,_.each(q.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.linked=new h(b,c,d,e),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(b)}return c(s,d),s.include(e),s.prototype.go=function(a){return this.watchOurScope(a),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,a.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.createChildScopes()},s.prototype.watchModels=function(a){var b;return b=null!=this.markersScope?"pluralsUpdate":"models", +a.$watch(b,function(b){return function(c,d){var e;return!_.isEqual(c,d)||b.firstWatchModels?(b.firstWatchModels=!1,b.doRebuildAll||b.doINeedToWipe(a.models)?b.rebuildAll(a,!0,!0):(e=0===b.plurals.length,null!=b.existingPieces?_.last(b.existingPieces._content).then(function(){return b.createChildScopes(e)}):b.createChildScopes(e))):void 0}}(this),!0)},s.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},s.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},s.prototype.onDestroy=function(a){return s.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},s.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.firstWatchModels=!0,b.firstTime=!0,b.rebuildAll(a,!1,!0)}}(this))},s.prototype.watchOurScope=function(a){return _.each(q.scopeKeys,function(b){return function(c){var d;return d=c+"Key",b[d]="function"==typeof a[c]?a[c]():a[c]}}(this))},s.prototype.createChildScopes=function(a){var c,d,e;return null==a&&(a=!0),this.isIconVisibleOnClick=!0,b.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),c=b.isUndefined(this.linked.scope.models),!c||void 0!==this.markersScope&&void 0!==(null!=(d=this.markersScope)?d.plurals:void 0)&&void 0!==(null!=(e=this.markersScope)?e.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),a?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),a?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},s.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},s.prototype.createAllNew=function(a,b,c,d){var e;return null==c&&(c="models"),null==d&&(d=!1),this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.setContentKeys(a.models),this.didQueueInitPromise(this,a)?void 0:(e=null,i.promiseLock(this,p.promiseTypes.create,"createAllNew",function(a){return e=a},function(d){return function(){return i.each(a.models,function(f){var g,h;return g=b&&null!=(h=d.getItem(a,c,f[d.idKey]))?h.gObject:void 0,e||(!g&&d.markersScope&&j.error("Unable to get gMarker from markersScope!"),d.createWindow(f,g,d.gMap)),e},i.chunkSizeFrom(a.chunk)).then(function(){return d.firstTime=!1})}}(this)))},s.prototype.pieceMeal=function(a,b,c,d){var e,f;return null==c&&(c="models"),null==d&&(d=!0),a.$$destroyed?void 0:(e=null,f=null,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(a){return e=a},function(b){return function(){return p.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(c){return f=c,i.each(f.removals,function(a){return null!=a?(b.plurals.remove(a.id),null!=a.destroy&&a.destroy(!0),e):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(f.adds,function(d){var f,g;if(f=null!=(g=b.getItem(a,c,d[b.idKey]))?g.gObject:void 0,!f)throw"Gmarker undefined";return b.createWindow(d,f,b.gMap),e})}).then(function(){return i.each(f.updates,function(a){return b.updateChild(a.child,a.model),e},i.chunkSizeFrom(a.chunk))})}}(this)):(j.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0)))},s.prototype.setContentKeys=function(a){return this.modelsLength(a)?this.contentKeys=Object.keys(a[0]):void 0},s.prototype.createWindow=function(a,b,c){var d,e,f,h,i,j;return e=this.linked.scope.$new(!1),this.setChildScope(e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),f={html:function(b){return function(){return b.interpolateContent(b.linked.element.html(),a)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,a)||{},h=this.createWindowOptions(b,e,f.html(),this.DEFAULTS),d=new g({model:a,scope:e,opts:h,isIconVisibleOnClick:this.isIconVisibleOnClick,gMap:c,markerScope:null!=(i=this.markersScope)&&null!=(j=i.plurals.get(a[this.idKey]))?j.scope:void 0,element:f,needToManualDestroy:!1,markerIsVisibleAfterWindowClose:!0,isScopeModel:!0}),null==a[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(a[this.idKey],d),d)},s.prototype.setChildScope=function(a,b){return _.each(q.scopeKeys,function(c){return function(d){var e,f;return e=d+"Key",f="self"===c[e]?b:b[c[e]],f!==a[d]?a[d]=f:void 0}}(this)),a.model=b},s.prototype.interpolateContent=function(a,b){var c,d,e,f,g,h;if(void 0!==this.contentKeys&&0!==this.contentKeys.length){for(c=o(a),e={},h=this.contentKeys,d=0,g=h.length;g>d;d++)f=h[d],e[f]=b[f];return c(e)}},s.prototype.modelKeyComparison=function(a,b){var c,d;if(d=null!=this.scope.coords?this.scope:this.parentScope,null==d)throw"No scope or parentScope set!";return(c=r.equalCoords(this.evalModelHandle(a,d.coords),this.evalModelHandle(b,d.coords)))?c=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(e){return c.evalModelHandle(a,d[e])===c.evalModelHandle(b,d[e])}}(this)):c},s}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(d,e,f,g,h,i){var j;return j=function(j){function k(){this.link=a(this.link,this),k.__super__.constructor.call(this)}return c(k,j),k.prototype.transclude=!0,k.prototype.link=function(a,c,j,k,l){return i.then(function(c){return function(i){var j,m,n,o;return o=l(),j=l().length>0,!j&&b.isUndefined(a.template)?void c.$log.error("mapControl: could not find a valid template property or elements for transclusion"):(m=b.isDefined(a.index&&!isNaN(parseInt(a.index)))?parseInt(a.index):void 0,n=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",i.ControlPosition[n]?d.mapPromise(a,k).then(function(d){var i,k,o;return i=void 0,k=b.element("
"),o=function(a,b,c){return c&&(b[0].index=c),a.controls[google.maps.ControlPosition[n]].push(b[0])},j?l(function(a){return k.append(a),o(d,k,m)}):e.get(a.template,{cache:f}).success(function(c){var d,e;return e=a.$new(),k.append(c),b.isDefined(a.controller)&&(d=h(a.controller,{$scope:e}),k.children().data("$ngControllerController",d)),i=g(k.children())(e)}).error(function(a){return c.$log.error("mapControl: template could not be found")}).then(function(){return o(d,i,m)})}):void c.$log.error("mapControl: invalid position property"))}}(this))},k}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(a,b){return{restrict:"EMA",transclude:!0,template:'',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(b,c){return b.ctrlType="uiGmapDragZoom",_.extend(this,a.handle(b,c))}],link:function(c,d,e,f){return a.mapPromise(c,f).then(function(a){var d,e,f;return d=function(b){return a.enableKeyDragZoom(b)},e=new b(function(a,b){return b?d({key:b}):d()}),f=new b(function(a,b){return b?d(b):void 0}),c.$watch("keyboardkey",e.sic("keyboardkey")),e.sic(c.keyboardkey),c.$watch("options",f.sic("options")),f.sic(c.options)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(b,d,e,f,g){var h;return h=function(d){function h(){return this.link=a(this.link,this),h.__super__.constructor.apply(this,arguments)}return c(h,d),h.include(e),h.prototype.restrict="EMA",h.prototype.replace=!0,h.prototype.require="^uiGmapGoogleMap",h.prototype.scope={polygons:"=",draw:"="},h.prototype.link=function(a,c,d,e){return this.mapPromise(a,e).then(function(c){return function(c){var d,h;return a.polygons?_.isArray(a.polygons)?(d=new f(c,e.getScope()),h=void 0,a.draw=function(){return"function"==typeof h&&h(),d.engage(a.polygons).then(function(){var b;return b=!0,h=a.$watchCollection("polygons",function(a,c){var d;return b||a===c?void(b=!1):(d=g.differenceObjects(c,a),d.forEach(function(a){return a.setMap(null)}))})})}):b.error("Free Draw Polygons must be of type Array!"):b.error("No polygons to bind to!")}}(this))},h}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var a;return a={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",control:"=",zIndex:"=zindex"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"},this.$log=c}return a(e,b),e.extend(d),e.prototype.link=function(a,b,c,d){throw new Exception("Not implemented!!")},e}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(b,c){var d;return d=function(b){function d(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=_.extend(this.scope||{},d.scope)}return a(d,b),d.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},d.scopeKeys=_.keys(d.scope),d.keys=d.scopeKeys,d.extend(c),d}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var a;return a={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=_.extend(this.scope||{},e.scope)}return a(e,b),e.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},e.scopeKeys=_.keys(e.scope),e.include(c),e.extend(d),e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","$log","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s,t;return r=void 0,t=[n,l,m],s=function(e){function h(){this.link=a(this.link,this);var b;b=function(a){var b,c;return c=void 0,a.$on("$destroy",function(){return j.decrement()}),b=i.handle(a),a.ctrlType="Map",a.deferred.promise.then(function(){return t.forEach(function(a){return a.init()})}),b.getMap=function(){return a.map},c=_.extend(this,b)},this.controller=["$scope",b]}return c(h,e),h.include(g),h.prototype.restrict="EMA",h.prototype.transclude=!0,h.prototype.replace=!1,h.prototype.template='
\n
',h.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},h.prototype.link=function(a,c,e){var g;return g=[],a.$on("$destroy",function(){return p.removeEvents(g),"true"===e.recycleMapInstance&&a.map?(q.recycleMapInstance(a.map),a.map=null):void 0}),a.idleAndZoomChanged=!1,o.then(function(h){return function(i){var l,m,n,o,s,t,u,v,w,x,y,z,A,B,C,D,E;if(r={mapTypeId:i.MapTypeId.ROADMAP},B=j.spawn(),z=function(){return B.deferred.resolve({instance:B.instance,map:l})},!b.isDefined(a.center)&&!b.isDefined(a.bounds))return void f.error("angular-google-maps: a center or bounds property is required");if(b.isDefined(a.center)||(a.center=new google.maps.LatLngBounds(h.getCoords(a.bounds.southwest),h.getCoords(a.bounds.northeast)).getCenter()),b.isDefined(a.zoom)||(a.zoom=10),s=b.element(c),s.addClass("angular-google-map"),x={options:{}},e.options&&(x.options=a.options),e.styles&&(x.styles=a.styles),e.type&&(C=e.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(C)?x.mapTypeId=google.maps.MapTypeId[e.type.toUpperCase()]:f.error("angular-google-maps: invalid map type '"+e.type+"'")),v=b.extend({},r,x,{center:h.getCoords(a.center),zoom:a.zoom,bounds:a.bounds}),l="true"===e.recycleMapInstance?q.createMapInstance(s.find("div")[1],v):new google.maps.Map(s.find("div")[1],v),l.uiGmap_id=k.generate(),o=!1,g.push(google.maps.event.addListenerOnce(l,"idle",function(){return a.deferred.resolve(l),z()})),n=e.events&&null!=(null!=(y=a.events)?y.blacklist:void 0)?a.events.blacklist:[],_.isString(n)&&(n=[n]),w=function(b,c,d){return _.includes(n,b)?void 0:(d&&d(),g.push(google.maps.event.addListener(l,b,function(){var b;return(null!=(b=a.update)?b.lazy:void 0)?void 0:c()})))},_.includes(n,"all")||(w("dragstart",function(){return o=!0,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),w("dragend",function(){return o=!1,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),D=function(b,c){return null==b&&(b=l.center),null==c&&(c=a),_.includes(n,"center")&&(c.center.latitude!==b.lat()&&(c.center.latitude=b.lat()),c.center.longitude!==b.lng())?c.center.longitude=b.lng():void 0},A=!1,w("idle",function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),A=!0,a.$evalAsync(function(b){return D(),_.isUndefined(b.bounds)||_.includes(n,"bounds")||(b.bounds.northeast={latitude:c.lat(),longitude:c.lng()},b.bounds.southwest={latitude:d.lat(),longitude:d.lng()}),_.includes(n,"zoom")||(b.zoom=l.zoom,a.idleAndZoomChanged=!a.idleAndZoomChanged),A=!1})})),b.isDefined(a.events)&&null!==a.events&&b.isObject(a.events)){u=function(b){return function(){return a.events[b].apply(a,[l,b,arguments])}},m=[];for(t in a.events)a.events.hasOwnProperty(t)&&b.isFunction(a.events[t])&&m.push(google.maps.event.addListener(l,t,u(t)));g.concat(m)}return l.getOptions=function(){return v},a.map=l,null!=e.control&&null!=a.control&&(a.control.refresh=function(a){var b,c,d;if(null!=l)return null!=("undefined"!=typeof google&&null!==google&&null!=(c=google.maps)&&null!=(d=c.event)?d.trigger:void 0)&&null!=l&&google.maps.event.trigger(l,"resize"),null!=(null!=a?a.latitude:void 0)&&null!=(null!=a?a.longitude:void 0)?(b=h.getCoords(a),h.isTrue(e.pan)?l.panTo(b):l.setCenter(b)):void 0},a.control.getGMap=function(){return l},a.control.getMapOptions=function(){return v},a.control.getCustomEventListeners=function(){return m},a.control.removeEvents=function(a){return p.removeEvents(a)}),a.$watch("center",function(b,c){var d;if(b!==c&&!A&&(d=h.getCoords(a.center),d.lat()!==l.center.lat()||d.lng()!==l.center.lng()))return o?void 0:(h.validateCoords(b)||f.error("Invalid center for newValue: "+JSON.stringify(b)),h.isTrue(e.pan)&&a.zoom===l.zoom?l.panTo(d):l.setCenter(d))},!0),E=null,a.$watch("zoom",function(b,c){var e,f;if(null!=b&&!_.isEqual(b,c)&&(null!=l?l.getZoom():void 0)!==(null!=a?a.zoom:void 0)&&!A)return null!=E&&d.cancel(E),E=d(function(){return l.setZoom(b)},(null!=(e=a.eventOpts)&&null!=(f=e.debounce)?f.zoomMs:void 0)+20,!1)}),a.$watch("bounds",function(a,b){var c,d,e,g,h,i,j;if(a!==b)return null==(null!=a&&null!=(e=a.northeast)?e.latitude:void 0)||null==(null!=a&&null!=(g=a.northeast)?g.longitude:void 0)||null==(null!=a&&null!=(h=a.southwest)?h.latitude:void 0)||null==(null!=a&&null!=(i=a.southwest)?i.longitude:void 0)?void f.error("Invalid map bounds for new value: "+JSON.stringify(a)):(d=new google.maps.LatLng(a.northeast.latitude,a.northeast.longitude),j=new google.maps.LatLng(a.southwest.latitude,a.southwest.longitude),c=new google.maps.LatLngBounds(j,d),l.fitBounds(c))}),["options","styles"].forEach(function(b){return a.$watch(b,function(a,c){return _.isEqual(a,c)?void 0:("options"===b?x.options=a:x.options[b]=a,null!=l?l.setOptions(x):void 0)},!0)})}}(this))},h}(h)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(b,c,d,e){var f;return f=function(f){function g(){g.__super__.constructor.call(this),this.template='',e.info(this)}return a(g,f),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Marker",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h;return h=b.mapPromise(a,g),h.then(function(e){var f,g,h;return f=new d(e),g=_.object(b.keys,b.keys),h=new c({scope:a,model:a,keys:g,gMap:e,doClick:!0,gManager:f,doDrawSelf:!1,trackModel:!1}),h.deferred.promise.then(function(b){return a.deferred.resolve(b)}),null!=a.control?a.control.getGMarkers=f.getGMarkers:void 0}),a.$on("$destroy",function(){var a;return"undefined"!=typeof a&&null!==a&&a.clear(),a=null})},g}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(b,c,d,e,f){var g;return g=function(e){function g(){g.__super__.constructor.call(this),this.template='',c.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents"}),f.info(this)}return a(g,e),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Markers",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h,i;return h=void 0,i=function(){return a.deferred.resolve()},b.mapPromise(a,g).then(function(b){var j;return j=g.getScope(),j.$watch("idleAndZoomChanged",function(){return _.defer(h.gManager.draw)}),h=new d(a,e,f,b),c.link(a,h),null!=a.control&&(a.control.getGMarkers=function(){var a;return null!=(a=h.gManager)?a.getGMarkers():void 0},a.control.getChildMarkers=function(){return h.plurals}),_.last(h.existingPieces._content).then(function(){return i()})})},g}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var a;return a=function(a,b){return null!=a.control?(a.control.updateModels=function(c){return a.models=c,b.createChildScopes(!1)},a.control.newModels=function(c){return a.models=c,b.rebuildAll(a,!0,!0)},a.control.clean=function(){return b.rebuildAll(a,!1,!0)},a.control.getPlurals=function(){return b.plurals},a.control.getManager=function(){return b.gManager},a.control.hasManager=function(){return null!=b.gManager==!0},a.control.managerDraw=function(){var b;return a.control.hasManager()&&null!=(b=a.control.getManager())?b.draw():void 0}):void 0},{extend:function(a,b){return _.extend(a.scope||{},b||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(b,c){return a(b,c)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(b,d,e){var f;return f=function(d){function f(){return this.link=a(this.link,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.link=function(a,c,d,f){var g,h;return g=[],h=b.mapPromise(a,f),null!=a.control&&(a.control.getInstance=this,a.control.polygons=g,a.control.promise=h),h.then(function(b){return function(c){return g.push(new e({scope:a,attrs:d,gMap:c,defaults:b.DEFAULTS}))}}(this))},f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polygons: no valid path attribute found"),a.models||e.$log.warn("polygons: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(d,e,f){var g;return g=function(e){function g(){return this.link=a(this.link,this),g.__super__.constructor.apply(this,arguments)}return c(g,e),g.prototype.link=function(a,c,e,g){return d.mapPromise(a,g).then(function(c){return function(d){return!b.isUndefined(a.path)&&null!==a.path&&c.validatePath(a.path)||c.$log.warn("polyline: no valid path attribute found"),new f({scope:a,attrs:e,gMap:d,defaults:c.DEFAULTS})}}(this))},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polylines: no valid path attribute found"),a.models||e.$log.warn("polylines: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(a,b,c,d){return _.extend(c,{link:function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return new d(a,b,c,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(d,e,f,g,h){var i;return i=function(i){function j(){this.link=a(this.link,this),j.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='',h.debug(this),this.childWindows=[]}return c(j,i),j.include(e),j.prototype.link=function(a,c,e,f){var g,h;return g=f.length>1&&null!=f[1]?f[1]:void 0,h=null!=g?g.getScope():void 0,this.mapPromise=d.mapPromise(a,f[0]),this.mapPromise.then(function(d){return function(f){var i;return i=!0,b.isDefined(e.isiconvisibleonclick)&&(i=a.isIconVisibleOnClick),g?h.deferred.promise.then(function(b){return d.init(a,c,i,f,h)}):void d.init(a,c,i,f)}}(this))},j.prototype.init=function(a,b,c,d,e){var h,i,j,k,l;return i=null!=a.options?a.options:{},k=null!=a&&this.validateCoords(a.coords),null!=(null!=e?e.getGMarker:void 0)&&(j=e.getGMarker()),l=k?this.createWindowOptions(j,a,b.html(),i):i,null!=d&&(h=new f({scope:a,opts:l,isIconVisibleOnClick:c,gMap:d,markerScope:e,element:b}),this.childWindows.push(h),a.$on("$destroy",function(a){return function(){return a.childWindows=g.withoutObjects(a.childWindows,[h],function(a,b){return a.scope.$id===b.scope.$id}),a.childWindows.length=0}}(this))),null!=a.control&&(a.control.getGWindows=function(a){return function(){return a.childWindows.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return a.childWindows}}(this),a.control.getPlurals=a.control.getChildWindows,a.control.showWindow=function(a){return function(){return a.childWindows.map(function(a){return a.showWindow()})}}(this),a.control.hideWindow=function(a){return function(){return a.childWindows.map(function(a){return a.hideWindow()})}}(this)),null!=this.onChildCreation&&null!=h?this.onChildCreation(h):void 0},j}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(b,d,e,f,g){var h;return h=function(b){function h(){this.link=a(this.link,this),h.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='',d.extend(this),g.debug(this)}return c(h,b),h.prototype.link=function(a,b,c,d){var e,g,h;return e=d[0].getScope(),g=d.length>1&&null!=d[1]?d[1]:void 0,h=null!=g?g.getScope():void 0,e.deferred.promise.then(function(e){return function(g){var i,j;return i=(null!=h&&null!=(j=h.deferred)?j.promise:void 0)||f.resolve(),i.then(function(){var f,i;return f=null!=(i=e.parentModel)?i.existingPieces:void 0,f?f.then(function(){return e.init(a,b,c,d,g,h)}):e.init(a,b,c,d,g,h)})}}(this))},h.prototype.init=function(a,b,c,f,g,h){var i;return i=new e(a,b,c,f,g,h),d.link(a,i),null!=a.control?(a.control.getGWindows=function(){return i.plurals.map(function(a){return a.gObject})},a.control.getChildWindows=function(){return i.plurals}):void 0},h}(b)}]); +}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(a,b){return b}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(a,b,c,d,e){return new e(a,b,c,d)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(a,b,c,d,e,f){return new f(a,b,c,d,e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return null!=a.onCreated?new d(a,b,c,e,a.onCreated):new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='',this.replace=!0,this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(c,d,e,f,g,h){var i;return new(i=function(){function i(){this.link=a(this.link,this),this.$log=d,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return i.prototype.require="ngModel",i.prototype.link=function(a,d,i,j){return c.then(function(c){return function(k){return null==a.template&&(g.put("uigmap-searchbox-default.tpl.html",''),a.template="uigmap-searchbox-default.tpl.html"),f.get(a.template,{cache:g}).success(function(f){return b.isUndefined(a.events)?void c.$log.error("searchBox: the events property is required"):j.getScope().deferred.promise.then(function(g){var j;return j=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",k.ControlPosition[j]?new e(a,d,i,g,j,h(f)(a)):void c.$log.error("searchBox: invalid position property")})})}}(this))},i}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(a,c){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(d,e){var f,g,h;return f=function(b,c){return a[b](e,"ng-hide").then(function(){return c()})},g=function(b,c){return a[b](e,"ng-hide",c)},h=function(a,d){return b.version.major>1?c.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+b.version.major+'"'):1===b.version.major&&b.version.minor<3?g(a,d):f(a,d)},d.$watch("uiGmapShow",function(a){return a&&h("removeClass",d.uiGmapAfterShow),a?void 0:h("addClass",d.uiGmapAfterHide)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(a,c,d,e){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'
',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(g,h,i){return a.then(function(a){return function(a){var i,j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){return e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r?(null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0):void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;return null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c?(e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)):void 0})):void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){return a===b||a===o||k?void 0:j()}),l=!0,g.$watch("focalcoord",function(a,b){return a===b&&!l||null==a?void 0:(l=!1,j())}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:_.once(function(){+function(){function b(a,c){a.getMarkerClusterer().extend(b,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=c,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function d(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.hideLabel_=a.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new b(this,a.getStyles())}function e(a,b,c){this.extend(e,google.maps.OverlayView),b=b||[],c=c||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=c.gridSize||60,this.minClusterSize_=c.minimumClusterSize||2,this.maxZoom_=c.maxZoom||null,this.styles_=c.styles||[],this.title_=c.title||"",this.zoomOnClick_=!0,void 0!==c.zoomOnClick&&(this.zoomOnClick_=c.zoomOnClick),this.averageCenter_=!1,void 0!==c.averageCenter&&(this.averageCenter_=c.averageCenter),this.ignoreHidden_=!1,void 0!==c.ignoreHidden&&(this.ignoreHidden_=c.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==c.enableRetinaIcons&&(this.enableRetinaIcons_=c.enableRetinaIcons),this.hideLabel_=!1,void 0!==c.hideLabel&&(this.hideLabel_=c.hideLabel),this.imagePath_=c.imagePath||e.IMAGE_PATH,this.imageExtension_=c.imageExtension||e.IMAGE_EXTENSION,this.imageSizes_=c.imageSizes||e.IMAGE_SIZES,this.calculator_=c.calculator||e.CALCULATOR,this.batchSize_=c.batchSize||e.BATCH_SIZE,this.batchSizeIE_=c.batchSizeIE||e.BATCH_SIZE_IE,this.clusterClass_=c.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function f(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===a.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof a.visible&&("undefined"==typeof a.isHidden?a.visible=!0:a.visible=!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.alignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}function g(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function h(a,b,c){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=h.getSharedCross(b)}function i(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=new h(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}function j(a){var b=a||{};this.ready_=!1,this.dragging_=!1,a.visible==c&&(a.visible=!0),a.shadow==c&&(a.shadow="7px -3px 5px rgba(88,88,88,0.7)"),a.anchor==c&&(a.anchor=k.BOTTOM),this.setValues(b)}b.prototype.onAdd=function(){var a,b,c=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!0,b=!1}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},b.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},b.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=a.x+"px"}},b.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},b.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="",this.div_.innerHTML=a+"
"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"
",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},b.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},b.prototype.setCenter=function(a){this.center_=a},b.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+this.width_+"px; height: "+this.height_+"px;"),b.join("")},b.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},d.prototype.getSize=function(){return this.markers_.length},d.prototype.getMarkers=function(){return this.markers_},d.prototype.getCenter=function(){return this.center_},d.prototype.getMap=function(){return this.map_},d.prototype.getMarkerClusterer=function(){return this.markerClusterer_},d.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;ad)a.getMap()!==this.map_&&a.setMap(this.map_);else if(cb;b++)this.markers_[b].setMap(null);else a.setMap(null);return!0},d.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},d.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},d.prototype.updateIcon_=function(){var a=this.markers_.length,b=this.markerClusterer_.getMaxZoom();if(null!==b&&this.map_.getZoom()>b)return void this.clusterIcon_.hide();if(ab;b++)if(a===this.markers_[b])return!0;return!1},e.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]},e.prototype.onRemove=function(){var a;for(a=0;a0))for(a=0;ac&&(g=c,h=e));h&&h.isMarkerInClusterBounds(a)?h.addMarker(a):(e=new d(this),e.addMarker(a),this.clusters_.push(e))},e.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;g>b;b++)c=this.markers_[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(gthis.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(c=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-c.left-c.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],b=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;ag&&(d=o.x+k+i+m-g),this.alignBottom_?o.y<-j+n+l?e=o.y+j-n-l:o.y+j+n>h&&(e=o.y+j+n-h):o.y<-j+n?e=o.y+j-n:o.y+l+j+n>h&&(e=o.y+l+j+n-h),0!==d||0!==e){b.getCenter();b.panBy(d,e)}}},f.prototype.setBoxStyle_=function(){var a,b;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",b=this.boxStyle_;for(a in b)b.hasOwnProperty(a)&&(this.div_.style[a]=b[a]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},f.prototype.getBoxWidths_=function(){var a,b={top:0,bottom:0,left:0,right:0},c=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=c.ownerDocument.defaultView.getComputedStyle(c,""),a&&(b.top=parseInt(a.borderTopWidth,10)||0,b.bottom=parseInt(a.borderBottomWidth,10)||0,b.left=parseInt(a.borderLeftWidth,10)||0,b.right=parseInt(a.borderRightWidth,10)||0)):document.documentElement.currentStyle&&c.currentStyle&&(b.top=parseInt(c.currentStyle.borderTopWidth,10)||0,b.bottom=parseInt(c.currentStyle.borderBottomWidth,10)||0,b.left=parseInt(c.currentStyle.borderLeftWidth,10)||0,b.right=parseInt(c.currentStyle.borderRightWidth,10)||0),b},f.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},f.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},f.prototype.setOptions=function(a){"undefined"!=typeof a.boxClass&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),"undefined"!=typeof a.boxStyle&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),"undefined"!=typeof a.content&&this.setContent(a.content),"undefined"!=typeof a.disableAutoPan&&(this.disableAutoPan_=a.disableAutoPan),"undefined"!=typeof a.maxWidth&&(this.maxWidth_=a.maxWidth),"undefined"!=typeof a.pixelOffset&&(this.pixelOffset_=a.pixelOffset),"undefined"!=typeof a.alignBottom&&(this.alignBottom_=a.alignBottom),"undefined"!=typeof a.position&&this.setPosition(a.position),"undefined"!=typeof a.zIndex&&this.setZIndex(a.zIndex),"undefined"!=typeof a.closeBoxMargin&&(this.closeBoxMargin_=a.closeBoxMargin),"undefined"!=typeof a.closeBoxURL&&(this.closeBoxURL_=a.closeBoxURL),"undefined"!=typeof a.infoBoxClearance&&(this.infoBoxClearance_=a.infoBoxClearance),"undefined"!=typeof a.isHidden&&(this.isHidden_=a.isHidden),"undefined"!=typeof a.visible&&(this.isHidden_=!a.visible),"undefined"!=typeof a.enableEventPropagation&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw(); +},f.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},f.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},f.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),google.maps.event.trigger(this,"zindex_changed")},f.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},f.prototype.getContent=function(){return this.content_},f.prototype.getPosition=function(){return this.position_},f.prototype.getZIndex=function(){return this.zIndex_},f.prototype.getVisible=function(){var a;return a="undefined"==typeof this.getMap()||null===this.getMap()?!1:!this.isHidden_},f.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},f.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},f.prototype.open=function(a,b){var c=this;b&&(this.position_=b.getPosition(),this.moveListener_=google.maps.event.addListener(b,"position_changed",function(){c.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},f.prototype.close=function(){var a;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;ae;e++)this.veilDiv_[e]=document.createElement("div"),this.veilDiv_[e].onselectstart=function(){return!1},i(this.veilDiv_[e].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[e].style,c.paneStyle),i(this.veilDiv_[e].style,c.veilStyle),i(this.veilDiv_[e].style,{position:"absolute",overflow:"hidden",display:"none"}),"shift"===this.key_&&(this.veilDiv_[e].style.MozUserSelect="none"),j(this.veilDiv_[e]),"transparent"===this.veilDiv_[e].style.backgroundColor&&(this.veilDiv_[e].style.backgroundColor="white",j(this.veilDiv_[e],0)),this.map_.getDiv().appendChild(this.veilDiv_[e]);this.noZoom_=c.noZoom||!1,this.visualEnabled_=c.visualEnabled||!1,this.visualClass_=c.visualClass||"",this.visualPosition_=c.visualPosition||google.maps.ControlPosition.LEFT_TOP,this.visualPositionOffset_=c.visualPositionOffset||new google.maps.Size(35,0),this.visualPositionIndex_=c.visualPositionIndex||null,this.visualSprite_=c.visualSprite||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png",this.visualSize_=c.visualSize||new google.maps.Size(20,20),this.visualTips_=c.visualTips||{},this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode",this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode",this.boxDiv_=document.createElement("div"),i(this.boxDiv_.style,{border:"4px solid #736AFF"}),i(this.boxDiv_.style,c.boxStyle),i(this.boxDiv_.style,{position:"absolute",display:"none"}),j(this.boxDiv_),this.map_.getDiv().appendChild(this.boxDiv_),this.boxBorderWidths_=d(this.boxDiv_),this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(a){g.onKeyDown_(a)}),google.maps.event.addDomListener(document,"keyup",function(a){g.onKeyUp_(a)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(document,"mousedown",function(a){g.onMouseDownDocument_(a)}),google.maps.event.addDomListener(document,"mousemove",function(a){g.onMouseMove_(a)}),google.maps.event.addDomListener(document,"mouseup",function(a){g.onMouseUp_(a)}),google.maps.event.addDomListener(a,"scroll",f)],this.hotKeyDown_=!1,this.mouseDown_=!1,this.dragging_=!1,this.startPt_=null,this.endPt_=null,this.mapWidth_=null,this.mapHeight_=null,this.mousePosn_=null,this.mapPosn_=null,this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),null!==this.visualPositionIndex_&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)},b.prototype.initControl_=function(a){var b,c,d=this;return b=document.createElement("div"),b.className=this.visualClass_,b.style.position="relative",b.style.overflow="hidden",b.style.height=this.visualSize_.height+"px",b.style.width=this.visualSize_.width+"px",b.title=this.visualTips_.off,c=document.createElement("img"),c.src=this.visualSprite_,c.style.position="absolute",c.style.left=-(2*this.visualSize_.width)+"px",c.style.top="0px",b.appendChild(c),b.onclick=function(a){d.hotKeyDown_=!d.hotKeyDown_,d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on,d.activatedByControl_=!0,google.maps.event.trigger(d,"activate")):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off,google.maps.event.trigger(d,"deactivate")),d.onMouseMove_(a)},b.onmouseover=function(){d.buttonDiv_.firstChild.style.left=-(1*d.visualSize_.width)+"px"},b.onmouseout=function(){d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off)},b.ondragstart=function(){return!1},i(b.style,{cursor:"pointer",marginTop:a.height+"px",marginLeft:a.width+"px"}),b},b.prototype.isHotKeyDown_=function(b){var c;if(b=b||a.event,c=b.shiftKey&&"shift"===this.key_||b.altKey&&"alt"===this.key_||b.ctrlKey&&"ctrl"===this.key_,!c)switch(b.keyCode){case 16:"shift"===this.key_&&(c=!0);break;case 17:"ctrl"===this.key_&&(c=!0);break;case 18:"alt"===this.key_&&(c=!0)}return c},b.prototype.isMouseOnMap_=function(){var a=this.mousePosn_;if(a){var b=this.mapPosn_,c=this.map_.getDiv();return a.left>b.left&&a.leftb.top&&a.top=0?g>f:f>g;b=g>=0?++f:--f)if(c[b]===e){h=[c[c.length-1],c[b]],c[b]=h[0],c[c.length-1]=h[1],c.pop();break}return c.concat(d)},a.prototype.forEachNode=function(a){var b,d,e;e=this._nodes;for(b in e)c.call(e,b)&&(d=e[b],a(d,b))},a.prototype.forEachEdge=function(a){var b,d,e,f,g,h;g=this._nodes;for(d in g)if(c.call(g,d)){e=g[d],h=e._outEdges;for(f in h)c.call(h,f)&&(b=h[f],a(b))}},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e;b=function(){function a(a){var b,c,d,e,f,g;for(null==a&&(a=[]),this._data=[void 0],d=0,f=a.length;f>d;d++)c=a[d],null!=c&&this._data.push(c);if(this._data.length>1)for(b=e=2,g=this._data.length;g>=2?g>e:e>g;b=g>=2?++e:--e)this._upHeap(b);this.size=this._data.length-1}return a.prototype.add=function(a){return null!=a?(this._data.push(a),this._upHeap(this._data.length-1),this.size++,a):void 0},a.prototype.removeMin=function(){var a;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(a=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),a)},a.prototype.peekMin=function(){return this._data[1]},a.prototype._upHeap=function(a){var b,c;for(b=this._data[a];this._data[a]1;)c=[this._data[d(a)],this._data[a]],this._data[a]=c[0],this._data[d(a)]=c[1],a=d(a)},a.prototype._downHeap=function(){var a,b,d;for(a=1;c(a>1},c=function(a){return a<<1},e=function(a){return(a<<1)+1},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.at=function(a){var b,c,d,e,f;if(-this.size<=a&&a=d;c=d+=1)b=b.next;else for(b=this.tail,c=e=1,f=this.size-a-1;f>=e;c=e+=1)b=b.prev;return b}},a.prototype.add=function(a,b){var c,d,e,f,g;return null==b&&(b=this.size),-this.size<=b&&b<=this.size?(d={value:a},b=this._adjust(b),0===this.size?this.head=d:0===b?(e=[d,this.head,d],this.head.prev=e[0],d.next=e[1],this.head=e[2]):(c=this.at(b-1),f=[c.next,d,d,c],d.next=f[0],null!=(g=c.next)?g.prev=f[1]:void 0,c.next=f[2],d.prev=f[3]),b===this.size&&(this.tail=d),this.size++,a):void 0},a.prototype.removeAt=function(a){var b,c,d;return null==a&&(a=this.size-1),-this.size<=a&&a=this.size)return-1;for(b=Math.max(0,this._adjust(b)),c=this.at(b),d=b;c&&c.value!==a;)c=c.next,d++;return d===this.size?-1:d},a.prototype._adjust=function(a){return 0>a?this.size+a:a},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f={}.hasOwnProperty;c="_mapId_",b=function(){function a(b){var c,d;this._content={},this._itemId=0,this._id=a._newMapId(),this.size=0;for(c in b)f.call(b,c)&&(d=b[c],this.set(c,d))}return a._mapIdTracker=0,a._newMapId=function(){return this._mapIdTracker++},a.prototype.hash=function(a,b){var f,g;return null==b&&(b=!1),g=d(a),e(a)?(f=c+this._id,b&&!a[f]&&(a[f]=this._itemId++),f+"_"+a[f]):g+"_"+a},a.prototype.set=function(a,b){return this.has(a)||this.size++,this._content[this.hash(a,!0)]=[b,a],b},a.prototype.get=function(a){var b;return null!=(b=this._content[this.hash(a)])?b[0]:void 0},a.prototype.has=function(a){return this.hash(a)in this._content},a.prototype["delete"]=function(a){var b;return b=this.hash(a),b in this._content?(delete this._content[b],e(a)&&delete a[c+this._id],this.size--,!0):!1},a.prototype.forEach=function(a){var b,c,d;d=this._content;for(b in d)f.call(d,b)&&(c=d[b],a(c[1],c[0]))},a}(),e=function(a){var b,c,e,f,g;for(b=["Boolean","Number","String","Undefined","Null","RegExp","Function"],e=d(a),f=0,g=b.length;g>f;f++)if(c=b[f],e===c)return!1;return!0},d=function(a){return Object.prototype.toString.apply(a).match(/\[object (.+)\]/)[1]},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){null==a&&(a=[]),this._content=a,this._dequeueIndex=0,this.size=this._content.length}return a.prototype.enqueue=function(a){return this.size++,this._content.push(a),a},a.prototype.dequeue=function(){var a;if(0!==this.size)return this.size--,a=this._content[this._dequeueIndex],this._dequeueIndex++,2*this._dequeueIndex>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),a},a.prototype.peek=function(){return this._content[this._dequeueIndex]},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=0,d=1,e=2,h=3,f=1,b=2,g=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root,this.size=0,c=0,d=a.length;d>c;c++)b=a[c],null!=b&&this.add(b)}return a.prototype.add=function(a){var g,l,m,n;if(null!=a){if(this.size++,m={value:a,_color:f},this._root){if(l=i(this._root,function(b){return a===b.value?c:ac;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d,f;if(null!=a){for(this.size++,b=this._root,d=0,f=a.length;f>d;d++)c=a[d],null==b[c]&&(b[c]={}),b=b[c];return b[e]=!0,a}},a.prototype.has=function(a){var b,c,d,f;if(null==a)return!1;for(b=this._root,d=0,f=a.length;f>d;d++){if(c=a[d],null==b[c])return!1;b=b[c]}return!!b[e]},a.prototype.longestPrefixOf=function(a){var b,c,d,e,f;if(null==a)return"";for(b=this._root,d="",e=0,f=a.length;f>e&&(c=a[e],null!=b[c]);e++)d+=c,b=b[c];return d},a.prototype.wordsWithPrefix=function(a){var c,d,f,h,i,j,k,l,m,n;if(null==a)return[];for(null!=a||(a=""),k=[],d=this._root,l=0,m=a.length;m>l;l++)if(f=a[l],d=d[f],null==d)return[];for(i=new b,i.enqueue([d,""]);0!==i.size;){n=i.dequeue(),h=n[0],c=n[1],h[e]&&k.push(a+c);for(f in h)g.call(h,f)&&(j=h[f],i.enqueue([j,c+f]))}return k},a.prototype.remove=function(a){var b,c,d,g,h,i,j,k;if(null!=a){for(b=this._root,g=[],h=0,j=a.length;j>h;h++){if(d=a[h],null==b[d])return;b=b[d],g.push([d,b])}if(b[e]){if(this.size--,delete b[e],f(b,1))return a;for(c=i=k=g.length-1;(1>=k?1>=i:i>=1)&&!f(g[c][1],1);c=1>=k?++i:--i)delete g[c-1][1][g[c][0]];return f(this._root[g[0][0]],1)||delete this._root[g[0][0]],a}}},a}(),f=function(a,b){var c,d;if(0===b)return!0;d=0;for(c in a)if(g.call(a,c)&&(d++,d>=b))return!0;return!1},a.exports=d}).call(this)}]),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(b){var c=this;return+function(){var b={}.hasOwnProperty,c=[].slice;this.OverlappingMarkerSpiderfier=function(){function d(a,c){var d,f,g,h,i,j;this.map=a,null==c&&(c={});for(f in c)b.call(c,f)&&(j=c[f],this[f]=j);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},i=["click","zoom_changed","maptypeid_changed"],g=0,h=i.length;h>g;g++)d=i[g],e.addListener(this.map,d,function(a){return function(){return a.unspiderfy()}}(this))}var e,f,g,h,i,j,k,l,m,n,o;for(l=d.prototype,m=[d,l],g=0,j=m.length;j>g;g++)o=m[g],o.VERSION="0.3.3";return f=void 0,e=void 0,k=void 0,n=2*Math.PI,l.keepSpiderfied=!1,l.markersWontHide=!1,l.markersWontMove=!1,l.nearbyDistance=20,l.circleSpiralSwitchover=9,l.circleFootSeparation=23,l.circleStartAngle=n/12,l.spiralFootSeparation=26,l.spiralLengthStart=11,l.spiralLengthFactor=4,l.spiderfiedZIndex=1e3,l.usualLegZIndex=10,l.highlightedLegZIndex=20,l.event="click",l.minZoomLevel=!1,l.legWeight=1.5,l.legColors={usual:{},highlighted:{}},i=l.legColors.usual,h=l.legColors.highlighted,d.initializeGoogleMaps=function(a){return f=a.maps,e=f.event,k=f.MapTypeId,i[k.HYBRID]=i[k.SATELLITE]="#fff",h[k.HYBRID]=h[k.SATELLITE]="#f00",i[k.TERRAIN]=i[k.ROADMAP]="#444",h[k.TERRAIN]=h[k.ROADMAP]="#f00",this.ProjHelper=function(a){return this.setMap(a)},this.ProjHelper.prototype=new f.OverlayView,this.ProjHelper.prototype.draw=function(){}},l.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},l.addMarker=function(a){var b;return null!=a._oms?this:(a._oms=!0,b=[e.addListener(a,this.event,function(b){return function(c){return b.spiderListener(a,c)}}(this))],this.markersWontHide||b.push(e.addListener(a,"visible_changed",function(b){return function(){return b.markerChangeListener(a,!1)}}(this))),this.markersWontMove||b.push(e.addListener(a,"position_changed",function(b){return function(){return b.markerChangeListener(a,!0)}}(this))),this.markerListenerRefs.push(b),this.markers.push(a),this)},l.markerChangeListener=function(a,b){return null==a._omsData||!b&&a.getVisible()||null!=this.spiderfying||null!=this.unspiderfying?void 0:this.unspiderfy(b?a:null)},l.getMarkers=function(){return this.markers.slice(0)},l.removeMarker=function(a){var b,c,d,f,g;if(null!=a._omsData&&this.unspiderfy(),b=this.arrIndexOf(this.markers,a),0>b)return this;for(g=this.markerListenerRefs.splice(b,1)[0],c=0,d=g.length;d>c;c++)f=g[c],e.removeListener(f);return delete a._oms,this.markers.splice(b,1),this},l.clearMarkers=function(){var a,b,c,d,f,g,h,i,j;for(this.unspiderfy(),j=this.markers,a=b=0,c=j.length;c>b;a=++b){for(h=j[a],g=this.markerListenerRefs[a],i=0,d=g.length;d>i;i++)f=g[i],e.removeListener(f);delete h._oms}return this.initMarkerArrays(),this},l.addListener=function(a,b){var c;return(null!=(c=this.listeners)[a]?c[a]:c[a]=[]).push(b),this},l.removeListener=function(a,b){var c;return c=this.arrIndexOf(this.listeners[a],b),0>c||this.listeners[a].splice(c,1),this},l.clearListeners=function(a){return this.listeners[a]=[],this},l.trigger=function(){var a,b,d,e,f,g,h,i;for(b=arguments[0],a=2<=arguments.length?c.call(arguments,1):[],h=null!=(g=this.listeners[b])?g:[],i=[],e=0,f=h.length;f>e;e++)d=h[e],i.push(d.apply(null,a));return i},l.generatePtsCircle=function(a,b){var c,d,e,g,h,i,j,k;for(e=this.circleFootSeparation*(2+a),i=e/n,d=n/a,k=[],g=h=0,j=a;j>=0?j>h:h>j;g=j>=0?++h:--h)c=this.circleStartAngle+g*d,k.push(new f.Point(b.x+i*Math.cos(c),b.y+i*Math.sin(c)));return k},l.generatePtsSpiral=function(a,b){var c,d,e,g,h,i,j;for(g=this.spiralLengthStart,c=0,j=[],d=e=0,i=a;i>=0?i>e:e>i;d=i>=0?++e:--e)c+=this.spiralFootSeparation/g+5e-4*d,h=new f.Point(b.x+g*Math.cos(c),b.y+g*Math.sin(c)),g+=n*this.spiralLengthFactor/c,j.push(h);return j},l.spiderListener=function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,q;if(k=null!=b._omsData,k&&this.keepSpiderfied||("mouseover"===this.event?(d=this,e=function(){return d.unspiderfy()},a.clearTimeout(l.timeout),l.timeout=setTimeout(e,3e3)):this.unspiderfy()),k||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",b,c);for(n=[],o=[],m=this.nearbyDistance,p=m*m,j=this.llToPt(b.position),q=this.markers,f=0,g=q.length;g>f;f++)h=q[f],null!=h.map&&h.getVisible()&&(i=this.llToPt(h.position),this.ptDistanceSq(i,j)c&&(e=k[c],!(e!==a&&null!=e.map&&e.getVisible()&&(f=this.llToPt(null!=(l=null!=(m=e._omsData)?m.usualPosition:void 0)?l:e.position),this.ptDistanceSq(f,g)a;a++)h=c[a],f.push({pt:this.llToPt(null!=(d=null!=(e=h._omsData)?e.usualPosition:void 0)?d:h.position),willSpiderfy:!1});return f}.call(this),r=this.markers,b=d=0,e=r.length;e>d;b=++d)if(i=r[b],null!=i.map&&i.getVisible()&&(j=m[b],!j.willSpiderfy))for(s=this.markers,c=n=0,f=s.length;f>n;c=++n)if(k=s[c],c!==b&&null!=k.map&&k.getVisible()&&(l=m[c],(!(b>c)||l.willSpiderfy)&&this.ptDistanceSq(j.pt,l.pt)q;a=++q)h=t[a],m[a].willSpiderfy&&u.push(h);return u},l.makeHighlightListenerFuncs=function(a){return{highlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.highlighted[b.map.mapTypeId],zIndex:b.highlightedLegZIndex})}}(this),unhighlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.usual[b.map.mapTypeId],zIndex:b.usualLegZIndex})}}(this)}},l.spiderfy=function(a,b){var c,d,g,h,i,j,k,l,m,n,o;return this.minZoomLevel&&this.map.getZoom()b;b++)l=a[b],d.push(l.markerPt);return d}()),h=n>=this.circleSpiralSwitchover?this.generatePtsSpiral(n,c).reverse():this.generatePtsCircle(n,c),o=function(){var b,c,l;for(l=[],b=0,c=h.length;c>b;b++)g=h[b],d=this.ptToLl(g),m=this.minExtract(a,function(a){return function(b){return a.ptDistanceSq(b.markerPt,g)}}(this)),k=m.marker,j=new f.Polyline({map:this.map,path:[k.position,d],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),k._omsData={usualPosition:k.position,leg:j},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(i=this.makeHighlightListenerFuncs(k),k._omsData.hightlightListeners={highlight:e.addListener(k,"mouseover",i.highlight),unhighlight:e.addListener(k,"mouseout",i.unhighlight)}),k.setPosition(d),k.setZIndex(Math.round(this.spiderfiedZIndex+g.y)),l.push(k);return l}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",o,b))},l.unspiderfy=function(a){var b,c,d,f,g,h,i;if(null==a&&(a=null),null==this.spiderfied)return this;for(this.unspiderfying=!0,i=[],g=[],h=this.markers,b=0,c=h.length;c>b;b++)f=h[b],null!=f._omsData?(f._omsData.leg.setMap(null),f!==a&&f.setPosition(f._omsData.usualPosition),f.setZIndex(null),d=f._omsData.hightlightListeners,null!=d&&(e.removeListener(d.highlight),e.removeListener(d.unhighlight)),delete f._omsData,i.push(f)):g.push(f);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",i,g),this},l.ptDistanceSq=function(a,b){var c,d;return c=a.x-b.x,d=a.y-b.y,c*c+d*d},l.ptAverage=function(a){var b,c,d,e,g,h;for(g=h=0,b=0,c=a.length;c>b;b++)e=a[b],g+=e.x,h+=e.y;return d=a.length,new f.Point(g/d,h/d)},l.llToPt=function(a){return this.projHelper.getProjection().fromLatLngToDivPixel(a)},l.ptToLl=function(a){return this.projHelper.getProjection().fromDivPixelToLatLng(a)},l.minExtract=function(a,b){var c,d,e,f,g,h,i;for(e=g=0,h=a.length;h>g;e=++g)f=a[e],i=b(f),("undefined"==typeof c||null===c||d>i)&&(d=i,c=e);return a.splice(c,1)[0]},l.arrIndexOf=function(a,b){var c,d,e,f;if(null!=a.indexOf)return a.indexOf(b);for(c=d=0,e=a.length;e>d;c=++d)if(f=a[c],f===b)return c;return-1},d}()}.apply(c),b.then(function(){c.OverlappingMarkerSpiderfier.initializeGoogleMaps(a.google)}),this.OverlappingMarkerSpiderfier}]),b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(b,c){return{init:_.once(function(){(function(){var d={}.hasOwnProperty,e=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};a.NgMapCluster=function(a){function d(a){d.__super__.constructor.call(this,a),this.markers_=new c}return e(d,a),d.prototype.addMarker=function(a){var b,c;if(this.isMarkerAlreadyAdded_(a)){var d=this.markers_.get(a.key);if(d.getPosition().lat()==a.getPosition().lat()&&d.getPosition().lon()==a.getPosition().lon())return!1}if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-1)+a.getPosition().lat())/e,g=(this.center_.lng()*(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();return a.isAdded=!0,this.markers_.push(a),b=this.markers_.length,c=this.markerClusterer_.getMaxZoom(),null!==c&&this.map_.getZoom()>c?a.getMap()!==this.map_&&a.setMap(this.map_):b3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length),h=this.markers_.values();for(b=a;g>b;b++)c=h[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(gc&&(f=c,g=d));g&&g.isMarkerInClusterBounds(a)?g.addMarker(a):(d=new NgMapCluster(this),d.addMarker(a),this.clusters_.push(d))},b.prototype.redraw_=function(){this.createClusters_(0)},b.prototype.resetViewport_=function(a){var b;for(b=0;b",this.div_.innerHTML=a+"
"+this.sums_.text+"
","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},b}(MarkerClusterer)}).call(this)})}}])}(window,angular); +//# sourceMappingURL=angular-google-maps-street-view_dev_mapped.min.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js new file mode 100644 index 0000000..43acbc1 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js @@ -0,0 +1,14023 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ +; +(function( window, angular, undefined ){ + 'use strict'; +/* +! +The MIT License + +Copyright (c) 2010-2013 Google, Inc. http://angularjs.org + +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. + +angular-google-maps +https://github.com/angular-ui/angular-google-maps + +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps.providers', ['nemLogging']); + + angular.module('uiGmapgoogle-maps.wrapped', []); + + angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']); + + angular.module('uiGmapgoogle-maps.directives.api.managers', []); + + angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']); + + angular.module('uiGmapgoogle-maps.directives.api.options.builders', []); + + angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']); + + angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']); + + angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']); + + angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [ + '$q', 'uiGmapuuid', function($q, uuid) { + var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration; + scriptId = void 0; + usedConfiguration = void 0; + getScriptUrl = function(options) { + if (options.china) { + return 'http://maps.google.cn/maps/api/js?'; + } else { + if (options.transport === 'auto') { + return '//maps.googleapis.com/maps/api/js?'; + } else { + return options.transport + '://maps.googleapis.com/maps/api/js?'; + } + } + }; + includeScript = function(options) { + var omitOptions, query, script, scriptElem; + omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad']; + if (options.isGoogleMapsForWork) { + omitOptions.push('key'); + } + query = _.map(_.omit(options, omitOptions), function(v, k) { + return k + '=' + v; + }); + if (scriptId) { + scriptElem = document.getElementById(scriptId); + scriptElem.parentNode.removeChild(scriptElem); + } + query = query.join('&'); + script = document.createElement('script'); + script.id = scriptId = "ui_gmap_map_load_" + (uuid.generate()); + script.type = 'text/javascript'; + script.src = getScriptUrl(options) + query; + return document.body.appendChild(script); + }; + isGoogleMapsLoaded = function() { + return angular.isDefined(window.google) && angular.isDefined(window.google.maps); + }; + return { + load: function(options) { + var deferred, randomizedFunctionName; + deferred = $q.defer(); + if (isGoogleMapsLoaded()) { + deferred.resolve(window.google.maps); + return deferred.promise; + } + randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000); + window[randomizedFunctionName] = function() { + window[randomizedFunctionName] = null; + deferred.resolve(window.google.maps); + }; + if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) { + document.addEventListener('online', function() { + if (!isGoogleMapsLoaded()) { + return includeScript(options); + } + }); + } else if (!options.preventLoad) { + includeScript(options); + } + usedConfiguration = options; + usedConfiguration.randomizedFunctionName = randomizedFunctionName; + return deferred.promise; + }, + manualLoad: function() { + var config; + config = usedConfiguration; + if (!isGoogleMapsLoaded()) { + return includeScript(config); + } else { + if (window[config.randomizedFunctionName]) { + return window[config.randomizedFunctionName](); + } + } + } + }; + } + ]).provider('uiGmapGoogleMapApi', function() { + this.options = { + transport: 'https', + isGoogleMapsForWork: false, + china: false, + v: '3', + libraries: '', + language: 'en', + preventLoad: false + }; + this.configure = function(options) { + angular.extend(this.options, options); + }; + this.$get = [ + 'uiGmapMapScriptLoader', (function(_this) { + return function(loader) { + return loader.load(_this.options); + }; + })(this) + ]; + return this; + }).service('uiGmapGoogleMapApiManualLoader', [ + 'uiGmapMapScriptLoader', function(loader) { + return { + load: function() { + loader.manualLoad(); + } + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.extensions').service('uiGmapExtendGWin', function() { + return { + init: _.once(function() { + var uiGmapInfoBox; + if (!(google || (typeof google !== "undefined" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) { + return; + } + google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open; + google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close; + google.maps.InfoWindow.prototype._isOpen = false; + google.maps.InfoWindow.prototype.open = function(map, anchor, recurse) { + if (recurse != null) { + return; + } + this._isOpen = true; + this._open(map, anchor, true); + }; + google.maps.InfoWindow.prototype.close = function(recurse) { + if (recurse != null) { + return; + } + this._isOpen = false; + this._close(true); + }; + google.maps.InfoWindow.prototype.isOpen = function(val) { + if (val == null) { + val = void 0; + } + if (val == null) { + return this._isOpen; + } else { + return this._isOpen = val; + } + }; + + /* + Do the same for InfoBox + TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier + */ + if (window.InfoBox) { + window.InfoBox.prototype._open = window.InfoBox.prototype.open; + window.InfoBox.prototype._close = window.InfoBox.prototype.close; + window.InfoBox.prototype._isOpen = false; + window.InfoBox.prototype.open = function(map, anchor) { + this._isOpen = true; + this._open(map, anchor); + }; + window.InfoBox.prototype.close = function() { + this._isOpen = false; + this._close(); + }; + window.InfoBox.prototype.isOpen = function(val) { + if (val == null) { + val = void 0; + } + if (val == null) { + return this._isOpen; + } else { + return this._isOpen = val; + } + }; + uiGmapInfoBox = (function(superClass) { + extend(uiGmapInfoBox, superClass); + + function uiGmapInfoBox(opts) { + this.getOrigCloseBoxImg_ = bind(this.getOrigCloseBoxImg_, this); + this.getCloseBoxDiv_ = bind(this.getCloseBoxDiv_, this); + var box; + box = new window.InfoBox(opts); + _.extend(this, box); + if (opts.closeBoxDiv != null) { + this.closeBoxDiv_ = opts.closeBoxDiv; + } + } + + uiGmapInfoBox.prototype.getCloseBoxDiv_ = function() { + return this.closeBoxDiv_; + }; + + uiGmapInfoBox.prototype.getCloseBoxImg_ = function() { + var div, img; + div = this.getCloseBoxDiv_(); + img = this.getOrigCloseBoxImg_(); + return div || img; + }; + + uiGmapInfoBox.prototype.getOrigCloseBoxImg_ = function() { + var img; + img = ""; + if (this.closeBoxURL_ !== "") { + img = " 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + get = function(object, path, defaultValue) { + var result; + result = object === null ? void 0 : baseGet(object, toPath(path), path + ''); + if (result === void 0) { + return defaultValue; + } else { + return result; + } + }; + _.get = get; + } + + /* + Author Nick McCready + Intersection of Objects if the arrays have something in common each intersecting object will be returned + in an new array. + */ + this.intersectionObjects = function(array1, array2, comparison) { + var res; + if (comparison == null) { + comparison = void 0; + } + res = _.map(array1, function(obj1) { + return _.find(array2, function(obj2) { + if (comparison != null) { + return comparison(obj1, obj2); + } else { + return _.isEqual(obj1, obj2); + } + }); + }); + return _.filter(res, function(o) { + return o != null; + }); + }; + this.containsObject = _.includeObject = function(obj, target, comparison) { + if (comparison == null) { + comparison = void 0; + } + if (obj === null) { + return false; + } + return _.some(obj, function(value) { + if (comparison != null) { + return comparison(value, target); + } else { + return _.isEqual(value, target); + } + }); + }; + this.differenceObjects = function(array1, array2, comparison) { + if (comparison == null) { + comparison = void 0; + } + return _.filter(array1, (function(_this) { + return function(value) { + return !_this.containsObject(array2, value, comparison); + }; + })(this)); + }; + this.withoutObjects = this.differenceObjects; + this.indexOfObject = function(array, item, comparison, isSorted) { + var i, length; + if (array == null) { + return -1; + } + i = 0; + length = array.length; + if (isSorted) { + if (typeof isSorted === "number") { + i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); + } else { + i = _.sortedIndex(array, item); + return (array[i] === item ? i : -1); + } + } + while (i < length) { + if (comparison != null) { + if (comparison(array[i], item)) { + return i; + } + } else { + if (_.isEqual(array[i], item)) { + return i; + } + } + i++; + } + return -1; + }; + this.isNullOrUndefined = function(thing) { + return _.isNull(thing || _.isUndefined(thing)); + }; + return this; + }); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.extensions').factory('uiGmapString', function() { + return function(str) { + this.contains = function(value, fromIndex) { + return str.indexOf(value, fromIndex) !== -1; + }; + return this; + }; + }); + +}).call(this); +; +/*global _:true,angular:true, */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmap_sync', [ + function() { + return { + fakePromise: function() { + var _cb; + _cb = void 0; + return { + then: function(cb) { + return _cb = cb; + }, + resolve: function() { + return _cb.apply(void 0, arguments); + } + }; + } + }; + } + ]).service('uiGmap_async', [ + '$timeout', 'uiGmapPromise', 'uiGmapLogger', '$q', 'uiGmapDataStructures', 'uiGmapGmapUtil', function($timeout, uiGmapPromise, $log, $q, uiGmapDataStructures, uiGmapGmapUtil) { + var ExposedPromise, PromiseQueueManager, SniffedPromise, _getIterateeValue, _ignoreFields, defaultChunkSize, doChunk, doSkippPromise, each, errorObject, getArrayAndKeys, isInProgress, kickPromise, logTryCatch, managePromiseQueue, map, maybeCancelPromises, promiseStatus, promiseTypes, tryCatch; + promiseTypes = uiGmapPromise.promiseTypes; + isInProgress = uiGmapPromise.isInProgress; + promiseStatus = uiGmapPromise.promiseStatus; + ExposedPromise = uiGmapPromise.ExposedPromise; + SniffedPromise = uiGmapPromise.SniffedPromise; + kickPromise = function(sniffedPromise, cancelCb) { + var promise; + promise = sniffedPromise.promise(); + promise.promiseType = sniffedPromise.promiseType; + if (promise.$$state) { + $log.debug("promiseType: " + promise.promiseType + ", state: " + (promiseStatus(promise.$$state.status))); + } + promise.cancelCb = cancelCb; + return promise; + }; + doSkippPromise = function(sniffedPromise, lastPromise) { + if (sniffedPromise.promiseType === promiseTypes.create && lastPromise.promiseType !== promiseTypes["delete"] && lastPromise.promiseType !== promiseTypes.init) { + $log.debug("lastPromise.promiseType " + lastPromise.promiseType + ", newPromiseType: " + sniffedPromise.promiseType + ", SKIPPED MUST COME AFTER DELETE ONLY"); + return true; + } + return false; + }; + maybeCancelPromises = function(queue, sniffedPromise, lastPromise) { + var first; + if (sniffedPromise.promiseType === promiseTypes["delete"] && lastPromise.promiseType !== promiseTypes["delete"]) { + if ((lastPromise.cancelCb != null) && _.isFunction(lastPromise.cancelCb) && isInProgress(lastPromise)) { + $log.debug("promiseType: " + sniffedPromise.promiseType + ", CANCELING LAST PROMISE type: " + lastPromise.promiseType); + lastPromise.cancelCb('cancel safe'); + first = queue.peek(); + if ((first != null) && isInProgress(first)) { + if (first.hasOwnProperty("cancelCb") && _.isFunction(first.cancelCb)) { + $log.debug("promiseType: " + first.promiseType + ", CANCELING FIRST PROMISE type: " + first.promiseType); + return first.cancelCb('cancel safe'); + } else { + return $log.warn('first promise was not cancelable'); + } + } + } + } + }; + + /* + From a High Level: + This is a SniffedPromiseQueueManager (looking to rename) where the queue is existingPiecesObj.existingPieces. + This is a function and should not be considered a class. + So it is run to manage the state (cancel, skip, link) as needed. + Purpose: + The whole point is to check if there is existing async work going on. If so we wait on it. + + arguments: + - existingPiecesObj = Queue + - sniffedPromise = object wrapper holding a function to a pending (function) promise (promise: fnPromise) + with its intended type. + - cancelCb = callback which accepts a string, this string is intended to be returned at the end of _async.each iterator + + Where the cancelCb passed msg is 'cancel safe' _async.each will drop out and fall through. Thus canceling the promise + gracefully without messing up state. + + Synopsis: + + - Promises have been broken down to 4 states create, update,delete (3 main) and init. (Helps boil down problems in ordering) + where (init) is special to indicate that it is one of the first or to allow a create promise to work beyond being after a delete + + - Every Promise that comes in is enqueued and linked to the last promise in the queue. + + - A promise can be skipped or canceled to save cycles. + + Saved Cycles: + - Skipped - This will only happen if async work comes in out of order. Where a pending create promise (un-executed) comes in + after a delete promise. + - Canceled - Where an incoming promise (un-executed promise) is of type delete and the any lastPromise is not a delete type. + + + NOTE: + - You should not muck with existingPieces as its state is dependent on this functional loop. + - PromiseQueueManager should not be thought of as a class that has a life expectancy (it has none). It's sole + purpose is to link, skip, and kill promises. It also manages the promise queue existingPieces. + */ + PromiseQueueManager = function(existingPiecesObj, sniffedPromise, cancelCb) { + var lastPromise, newPromise; + if (!existingPiecesObj.existingPieces) { + existingPiecesObj.existingPieces = new uiGmapDataStructures.Queue(); + return existingPiecesObj.existingPieces.enqueue(kickPromise(sniffedPromise, cancelCb)); + } else { + lastPromise = _.last(existingPiecesObj.existingPieces._content); + if (doSkippPromise(sniffedPromise, lastPromise)) { + return; + } + maybeCancelPromises(existingPiecesObj.existingPieces, sniffedPromise, lastPromise); + newPromise = ExposedPromise(lastPromise["finally"](function() { + return kickPromise(sniffedPromise, cancelCb); + })); + newPromise.cancelCb = cancelCb; + newPromise.promiseType = sniffedPromise.promiseType; + existingPiecesObj.existingPieces.enqueue(newPromise); + return lastPromise["finally"](function() { + return existingPiecesObj.existingPieces.dequeue(); + }); + } + }; + managePromiseQueue = function(objectToLock, promiseType, msg, cancelCb, fnPromise) { + var cancelLogger; + if (msg == null) { + msg = ''; + } + cancelLogger = function(msg) { + $log.debug(msg + ": " + msg); + if ((cancelCb != null) && _.isFunction(cancelCb)) { + return cancelCb(msg); + } + }; + return PromiseQueueManager(objectToLock, SniffedPromise(fnPromise, promiseType), cancelLogger); + }; + defaultChunkSize = 80; + errorObject = { + value: null + }; + tryCatch = function(fn, ctx, args) { + var e, error1; + try { + return fn.apply(ctx, args); + } catch (error1) { + e = error1; + errorObject.value = e; + return errorObject; + } + }; + logTryCatch = function(fn, ctx, deferred, args) { + var msg, result; + result = tryCatch(fn, ctx, args); + if (result === errorObject) { + msg = "error within chunking iterator: " + errorObject.value; + $log.error(msg); + deferred.reject(msg); + } + if (result === 'cancel safe') { + return false; + } + return true; + }; + _getIterateeValue = function(collection, array, index) { + var _isArray, valOrKey; + _isArray = collection === array; + valOrKey = array[index]; + if (_isArray) { + return valOrKey; + } + return collection[valOrKey]; + }; + _ignoreFields = ['length', 'forEach', 'map']; + getArrayAndKeys = function(collection, keys, bailOutCb, cb) { + var array, propName, val; + if (angular.isArray(collection)) { + array = collection; + } else { + if (keys) { + array = keys; + } else { + array = []; + for (propName in collection) { + val = collection[propName]; + if (collection.hasOwnProperty(propName) && !_.includes(_ignoreFields, propName)) { + array.push(propName); + } + } + } + } + if (cb == null) { + cb = bailOutCb; + } + if (angular.isArray(array) && !(array != null ? array.length : void 0)) { + if (cb !== bailOutCb) { + return bailOutCb(); + } + } + return cb(array, keys); + }; + + /* + Author: Nicholas McCready & jfriend00 + _async handles things asynchronous-like :), to allow the UI to be free'd to do other things + Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui + + The design of any functionality of _async is to be like lodash/underscore and replicate it but call things + asynchronously underneath. Each should be sufficient for most things to be derived from. + + Optional Asynchronous Chunking via promises. + */ + doChunk = function(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, _keys) { + return getArrayAndKeys(collection, _keys, function(array, keys) { + var cnt, i, keepGoing, val; + if (chunkSizeOrDontChunk && chunkSizeOrDontChunk < array.length) { + cnt = chunkSizeOrDontChunk; + } else { + cnt = array.length; + } + i = index; + keepGoing = true; + while (keepGoing && cnt-- && i < (array ? array.length : i + 1)) { + val = _getIterateeValue(collection, array, i); + keepGoing = angular.isFunction(val) ? true : logTryCatch(chunkCb, void 0, overallD, [val, i]); + ++i; + } + if (array) { + if (keepGoing && i < array.length) { + index = i; + if (chunkSizeOrDontChunk) { + if ((pauseCb != null) && _.isFunction(pauseCb)) { + logTryCatch(pauseCb, void 0, overallD, []); + } + return $timeout(function() { + return doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, keys); + }, pauseMilli, false); + } + } else { + return overallD.resolve(); + } + } + }); + }; + each = function(collection, chunk, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) { + var error, overallD, ret; + if (chunkSizeOrDontChunk == null) { + chunkSizeOrDontChunk = defaultChunkSize; + } + if (index == null) { + index = 0; + } + if (pauseMilli == null) { + pauseMilli = 1; + } + ret = void 0; + overallD = uiGmapPromise.defer(); + ret = overallD.promise; + if (!pauseMilli) { + error = 'pause (delay) must be set from _async!'; + $log.error(error); + overallD.reject(error); + return ret; + } + return getArrayAndKeys(collection, _keys, function() { + overallD.resolve(); + return ret; + }, function(array, keys) { + doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunk, pauseCb, overallD, index, keys); + return ret; + }); + }; + map = function(collection, iterator, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) { + var results; + results = []; + return getArrayAndKeys(collection, _keys, function() { + return uiGmapPromise.resolve(results); + }, function(array, keys) { + return each(collection, function(o) { + return results.push(iterator(o)); + }, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, keys).then(function() { + return results; + }); + }); + }; + return { + each: each, + map: map, + managePromiseQueue: managePromiseQueue, + promiseLock: managePromiseQueue, + defaultChunkSize: defaultChunkSize, + getArrayAndKeys: getArrayAndKeys, + chunkSizeFrom: function(fromSize, ret) { + if (ret == null) { + ret = void 0; + } + if (_.isNumber(fromSize)) { + ret = fromSize; + } + if (uiGmapGmapUtil.isFalse(fromSize) || fromSize === false) { + ret = false; + } + return ret; + } + }; + } + ]); + +}).call(this); +;(function() { + var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapBaseObject', function() { + var BaseObject, baseObjectKeywords; + baseObjectKeywords = ['extended', 'included']; + BaseObject = (function() { + function BaseObject() {} + + BaseObject.extend = function(obj) { + var key, ref, value; + for (key in obj) { + value = obj[key]; + if (indexOf.call(baseObjectKeywords, key) < 0) { + this[key] = value; + } + } + if ((ref = obj.extended) != null) { + ref.apply(this); + } + return this; + }; + + BaseObject.include = function(obj) { + var key, ref, value; + for (key in obj) { + value = obj[key]; + if (indexOf.call(baseObjectKeywords, key) < 0) { + this.prototype[key] = value; + } + } + if ((ref = obj.included) != null) { + ref.apply(this); + } + return this; + }; + + return BaseObject; + + })(); + return BaseObject; + }); + +}).call(this); +; +/* + Useful function callbacks that should be defined at later time. + Mainly to be used for specs to verify creation / linking. + + This is to lead a common design in notifying child stuff. + */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapChildEvents', function() { + return { + onChildCreation: function(child) {} + }; + }); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapCtrlHandle', [ + '$q', function($q) { + var CtrlHandle; + return CtrlHandle = { + handle: function($scope, $element) { + $scope.$on('$destroy', function() { + return CtrlHandle.handle($scope); + }); + $scope.deferred = $q.defer(); + return { + getScope: function() { + return $scope; + } + }; + }, + mapPromise: function(scope, ctrl) { + var mapScope; + mapScope = ctrl.getScope(); + mapScope.deferred.promise.then(function(map) { + return scope.map = map; + }); + return mapScope.deferred.promise; + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper", [ + "uiGmapLogger", function($log) { + var _getEventsObj, _hasEvents; + _hasEvents = function(obj) { + return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events); + }; + _getEventsObj = function(scope, model) { + if (_hasEvents(scope)) { + return scope; + } + if (_hasEvents(model)) { + return model; + } + }; + return { + setEvents: function(gObject, scope, model, ignores) { + var eventObj; + eventObj = _getEventsObj(scope, model); + if (eventObj != null) { + return _.compact(_.map(eventObj.events, function(eventHandler, eventName) { + var doIgnore; + if (ignores) { + doIgnore = _(ignores).includes(eventName); + } + if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) { + return google.maps.event.addListener(gObject, eventName, function() { + if (!scope.$evalAsync) { + scope.$evalAsync = function() {}; + } + return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments])); + }); + } + })); + } + }, + removeEvents: function(listeners) { + var key, l; + if (!listeners) { + return; + } + for (key in listeners) { + l = listeners[key]; + if (l && listeners.hasOwnProperty(key)) { + google.maps.event.removeListener(l); + } + } + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapFitHelper', [ + 'uiGmapLogger', '$timeout', function($log, $timeout) { + return { + fit: function(markersOrPoints, gMap) { + var bounds, everSet, key, markerOrPoint, point; + if (gMap && (markersOrPoints != null ? markersOrPoints.length : void 0)) { + bounds = new google.maps.LatLngBounds(); + everSet = false; + for (key in markersOrPoints) { + markerOrPoint = markersOrPoints[key]; + if (markerOrPoint) { + if (!everSet) { + everSet = true; + } + point = _.isFunction(markerOrPoint.getPosition) ? markerOrPoint.getPosition() : markerOrPoint; + } + bounds.extend(point); + } + if (everSet) { + return $timeout(function() { + return gMap.fitBounds(bounds); + }); + } + } + } + }; + } + ]); + +}).call(this); +; +/*global _:true, angular:true, google:true */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [ + 'uiGmapLogger', '$compile', function(Logger, $compile) { + var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords; + _isTruthy = function(value, bool, optionsArray) { + return value === bool || optionsArray.indexOf(value) !== -1; + }; + _isFalse = function(value) { + return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']); + }; + getLatitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[1]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[1]; + } else { + return value.latitude; + } + }; + getLongitude = function(value) { + if (Array.isArray(value) && value.length === 2) { + return value[0]; + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return value.coordinates[0]; + } else { + return value.longitude; + } + }; + getCoords = function(value) { + if (!value) { + return; + } + if (value instanceof google.maps.LatLng) { + return value; + } else if (Array.isArray(value) && value.length === 2) { + return new google.maps.LatLng(value[1], value[0]); + } else if (angular.isDefined(value.type) && value.type === 'Point') { + return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); + } else { + return new google.maps.LatLng(value.latitude, value.longitude); + } + }; + validateCoords = function(coords) { + if (angular.isUndefined(coords)) { + return false; + } + if (_.isArray(coords)) { + if (coords.length === 2) { + return true; + } + } else if ((coords != null) && (coords != null ? coords.type : void 0)) { + if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { + return true; + } + } + if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { + return true; + } + return false; + }; + return { + setCoordsFromEvent: function(prevValue, newLatLon) { + if (!prevValue) { + return; + } + if (Array.isArray(prevValue) && prevValue.length === 2) { + prevValue[1] = newLatLon.lat(); + prevValue[0] = newLatLon.lng(); + } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') { + prevValue.coordinates[1] = newLatLon.lat(); + prevValue.coordinates[0] = newLatLon.lng(); + } else { + prevValue.latitude = newLatLon.lat(); + prevValue.longitude = newLatLon.lng(); + } + return prevValue; + }, + getLabelPositionPoint: function(anchor) { + var xPos, yPos; + if (anchor === void 0) { + return void 0; + } + anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); + xPos = parseFloat(anchor[1]); + yPos = parseFloat(anchor[2]); + if ((xPos != null) && (yPos != null)) { + return new google.maps.Point(xPos, yPos); + } + }, + createWindowOptions: function(gMarker, scope, content, defaults) { + var options; + if ((content != null) && (defaults != null) && ($compile != null)) { + options = angular.extend({}, defaults, { + content: this.buildContent(scope, defaults, content), + position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) + }); + if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) { + if (options.boxClass == null) { + + } else { + options.pixelOffset = { + height: 0, + width: -2 + }; + } + } + return options; + } else { + if (!defaults) { + Logger.error('infoWindow defaults not defined'); + if (!content) { + return Logger.error('infoWindow content not defined'); + } + } else { + return defaults; + } + } + }, + buildContent: function(scope, defaults, content) { + var parsed, ret; + if (defaults.content != null) { + ret = defaults.content; + } else { + if ($compile != null) { + content = content.replace(/^\s+|\s+$/g, ''); + parsed = content === '' ? '' : $compile(content)(scope); + if (parsed.length > 0) { + ret = parsed[0]; + } + } else { + ret = content; + } + } + return ret; + }, + defaultDelay: 50, + isTrue: function(value) { + return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']); + }, + isFalse: _isFalse, + isFalsy: function(value) { + return _isTruthy(value, false, [void 0, null]) || _isFalse(value); + }, + getCoords: getCoords, + validateCoords: validateCoords, + equalCoords: function(coord1, coord2) { + return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); + }, + validatePath: function(path) { + var array, i, polygon, trackMaxVertices; + i = 0; + if (angular.isUndefined(path.type)) { + if (!Array.isArray(path) || path.length < 2) { + return false; + } + while (i < path.length) { + if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) { + return false; + } + i++; + } + return true; + } else { + if (angular.isUndefined(path.coordinates)) { + return false; + } + if (path.type === 'Polygon') { + if (path.coordinates[0].length < 4) { + return false; + } + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + polygon = path.coordinates[trackMaxVertices.index]; + array = polygon[0]; + if (array.length < 4) { + return false; + } + } else if (path.type === 'LineString') { + if (path.coordinates.length < 2) { + return false; + } + array = path.coordinates; + } else { + return false; + } + while (i < array.length) { + if (array[i].length !== 2) { + return false; + } + i++; + } + return true; + } + }, + convertPathPoints: function(path) { + var array, i, latlng, result, trackMaxVertices; + i = 0; + result = new google.maps.MVCArray(); + if (angular.isUndefined(path.type)) { + while (i < path.length) { + latlng; + if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { + latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); + } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') { + latlng = path[i]; + } + result.push(latlng); + i++; + } + } else { + array; + if (path.type === 'Polygon') { + array = path.coordinates[0]; + } else if (path.type === 'MultiPolygon') { + trackMaxVertices = { + max: 0, + index: 0 + }; + _.forEach(path.coordinates, function(polygon, index) { + if (polygon[0].length > this.max) { + this.max = polygon[0].length; + return this.index = index; + } + }, trackMaxVertices); + array = path.coordinates[trackMaxVertices.index][0]; + } else if (path.type === 'LineString') { + array = path.coordinates; + } + while (i < array.length) { + result.push(new google.maps.LatLng(array[i][1], array[i][0])); + i++; + } + } + return result; + }, + getPath: function(object, key) { + var obj; + if ((key == null) || !_.isString(key)) { + return key; + } + obj = object; + _.each(key.split('.'), function(value) { + if (obj) { + return obj = obj[value]; + } + }); + return obj; + }, + validateBoundPoints: function(bounds) { + if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { + return false; + } + return true; + }, + convertBoundPoints: function(bounds) { + var result; + result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); + return result; + }, + fitMapBounds: function(map, bounds) { + return map.fitBounds(bounds); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapIsReady', [ + '$q', '$timeout', function($q, $timeout) { + var _checkIfReady, _ctr, _promises, _proms; + _ctr = 0; + _proms = []; + _promises = function() { + return $q.all(_proms); + }; + _checkIfReady = function(deferred, expectedInstances, retriesLeft) { + return $timeout(function() { + if (retriesLeft <= 0) { + deferred.reject('Your maps are not found we have checked the maximum amount of times. :)'); + return; + } + if (_ctr !== expectedInstances) { + _checkIfReady(deferred, expectedInstances, retriesLeft - 1); + } else { + deferred.resolve(_promises()); + } + }, 100); + }; + return { + spawn: function() { + var d; + d = $q.defer(); + _proms.push(d.promise); + _ctr += 1; + return { + instance: _ctr, + deferred: d + }; + }, + promises: _promises, + instances: function() { + return _ctr; + }, + promise: function(expectedInstances, numRetries) { + var d; + if (expectedInstances == null) { + expectedInstances = 1; + } + if (numRetries == null) { + numRetries = 50; + } + d = $q.defer(); + _checkIfReady(d, expectedInstances, numRetries); + return d.promise; + }, + reset: function() { + _ctr = 0; + _proms.length = 0; + }, + decrement: function() { + if (_ctr > 0) { + _ctr -= 1; + } + if (_proms.length) { + _proms.length -= 1; + } + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked", [ + "uiGmapBaseObject", function(BaseObject) { + var Linked; + Linked = (function(superClass) { + extend(Linked, superClass); + + function Linked(scope, element, attrs, ctrls) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.ctrls = ctrls; + } + + return Linked; + + })(BaseObject); + return Linked; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [ + 'nemSimpleLogger', function(nemSimpleLogger) { + return nemSimpleLogger.spawn(); + } + ]); + +}).call(this); +; +/*global _:true, angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelKey', [ + 'uiGmapBaseObject', 'uiGmapGmapUtil', function(BaseObject, GmapUtil) { + return (function(superClass) { + extend(_Class, superClass); + + function _Class(scope1, _interface) { + this.scope = scope1; + this["interface"] = _interface != null ? _interface : { + scopeKeys: [] + }; + this.modelsLength = bind(this.modelsLength, this); + this.updateChild = bind(this.updateChild, this); + this.destroy = bind(this.destroy, this); + this.setChildScope = bind(this.setChildScope, this); + this.getChanges = bind(this.getChanges, this); + this.getProp = bind(this.getProp, this); + this.setIdKey = bind(this.setIdKey, this); + this.modelKeyComparison = bind(this.modelKeyComparison, this); + _Class.__super__.constructor.call(this); + this.defaultIdKey = 'id'; + this.idKey = void 0; + } + + _Class.prototype.evalModelHandle = function(model, modelKey) { + if ((model == null) || (modelKey == null)) { + return; + } + if (modelKey === 'self') { + return model; + } else { + if (_.isFunction(modelKey)) { + modelKey = modelKey(); + } + return GmapUtil.getPath(model, modelKey); + } + }; + + _Class.prototype.modelKeyComparison = function(model1, model2) { + var coord1, coord2, hasCoords, isEqual, scope, without; + hasCoords = this["interface"].scopeKeys.indexOf('coords') >= 0; + if (hasCoords && (this.scope.coords != null) || !hasCoords) { + scope = this.scope; + } + if (scope == null) { + throw 'No scope set!'; + } + if (hasCoords) { + coord1 = this.scopeOrModelVal('coords', scope, model1); + coord2 = this.scopeOrModelVal('coords', scope, model2); + isEqual = GmapUtil.equalCoords(coord1, coord2); + if (!isEqual) { + return isEqual; + } + } + without = _.without(this["interface"].scopeKeys, 'coords'); + isEqual = _.every(without, (function(_this) { + return function(k) { + return _this.scopeOrModelVal(scope[k], scope, model1) === _this.scopeOrModelVal(scope[k], scope, model2); + }; + })(this)); + return isEqual; + }; + + _Class.prototype.setIdKey = function(scope) { + return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey; + }; + + _Class.prototype.setVal = function(model, key, newValue) { + this.modelOrKey(model, key = newValue); + return model; + }; + + _Class.prototype.modelOrKey = function(model, key) { + if (key == null) { + return; + } + if (key !== 'self') { + return GmapUtil.getPath(model, key); + } + return model; + }; + + _Class.prototype.getProp = function(propName, scope, model) { + return this.scopeOrModelVal(propName, scope, model); + }; + + + /* + For the cases were watching a large object we only want to know the list of props + that actually changed. + Also we want to limit the amount of props we analyze to whitelisted props that are + actually tracked by scope. (should make things faster with whitelisted) + */ + + _Class.prototype.getChanges = function(now, prev, whitelistedProps) { + var c, changes, prop; + if (whitelistedProps) { + prev = _.pick(prev, whitelistedProps); + now = _.pick(now, whitelistedProps); + } + changes = {}; + prop = {}; + c = {}; + for (prop in now) { + if (!prev || prev[prop] !== now[prop]) { + if (_.isArray(now[prop])) { + changes[prop] = now[prop]; + } else if (_.isObject(now[prop])) { + c = this.getChanges(now[prop], (prev ? prev[prop] : null)); + if (!_.isEmpty(c)) { + changes[prop] = c; + } + } else { + changes[prop] = now[prop]; + } + } + } + return changes; + }; + + _Class.prototype.scopeOrModelVal = function(key, scope, model, doWrap) { + var maybeWrap, modelKey, modelProp, scopeProp; + if (doWrap == null) { + doWrap = false; + } + maybeWrap = function(isScope, ret, doWrap) { + if (doWrap == null) { + doWrap = false; + } + if (doWrap) { + return { + isScope: isScope, + value: ret + }; + } + return ret; + }; + scopeProp = _.get(scope, key); + if (_.isFunction(scopeProp)) { + return maybeWrap(true, scopeProp(model), doWrap); + } + if (_.isObject(scopeProp)) { + return maybeWrap(true, scopeProp, doWrap); + } + if (!_.isString(scopeProp)) { + return maybeWrap(true, scopeProp, doWrap); + } + modelKey = scopeProp; + if (!modelKey) { + modelProp = _.get(model, key); + } else { + modelProp = modelKey === 'self' ? model : _.get(model, modelKey); + } + if (_.isFunction(modelProp)) { + return maybeWrap(false, modelProp(), doWrap); + } + return maybeWrap(false, modelProp, doWrap); + }; + + _Class.prototype.setChildScope = function(keys, childScope, model) { + var isScopeObj, key, name, newValue; + for (key in keys) { + name = keys[key]; + isScopeObj = this.scopeOrModelVal(name, childScope, model, true); + if ((isScopeObj != null ? isScopeObj.value : void 0) != null) { + newValue = isScopeObj.value; + if (newValue !== childScope[name]) { + childScope[name] = newValue; + } + } + } + return childScope.model = model; + }; + + _Class.prototype.onDestroy = function(scope) {}; + + _Class.prototype.destroy = function(manualOverride) { + var ref; + if (manualOverride == null) { + manualOverride = false; + } + if ((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0) && (this.needToManualDestroy || manualOverride)) { + return this.scope.$destroy(); + } else { + return this.clean(); + } + }; + + _Class.prototype.updateChild = function(child, model) { + if (model[this.idKey] == null) { + this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); + return; + } + return child.updateModel(model); + }; + + _Class.prototype.modelsLength = function(arrayOrObjModels) { + var len, toCheck; + if (arrayOrObjModels == null) { + arrayOrObjModels = void 0; + } + len = 0; + toCheck = arrayOrObjModels ? arrayOrObjModels : this.scope.models; + if (toCheck == null) { + return len; + } + if (angular.isArray(toCheck) || (toCheck.length != null)) { + len = toCheck.length; + } else { + len = Object.keys(toCheck).length; + } + return len; + }; + + return _Class; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelsWatcher', [ + 'uiGmapLogger', 'uiGmap_async', '$q', 'uiGmapPromise', function(Logger, _async, $q, uiGmapPromise) { + return { + didQueueInitPromise: function(existingPiecesObj, scope) { + if (scope.models.length === 0) { + _async.promiseLock(existingPiecesObj, uiGmapPromise.promiseTypes.init, null, null, (function() { + return uiGmapPromise.resolve(); + })); + return true; + } + return false; + }, + figureOutState: function(idKey, scope, childObjects, comparison, callBack) { + var adds, children, mappedScopeModelIds, removals, updates; + adds = []; + mappedScopeModelIds = {}; + removals = []; + updates = []; + scope.models.forEach(function(m) { + var child; + if (m[idKey] != null) { + mappedScopeModelIds[m[idKey]] = {}; + if (childObjects.get(m[idKey]) == null) { + return adds.push(m); + } else { + child = childObjects.get(m[idKey]); + if (!comparison(m, child.clonedModel, scope)) { + return updates.push({ + model: m, + child: child + }); + } + } + } else { + return Logger.error(' id missing for model #{m.toString()},\ncan not use do comparison/insertion'); + } + }); + children = childObjects.values(); + children.forEach(function(c) { + var id; + if (c == null) { + Logger.error('child undefined in ModelsWatcher.'); + return; + } + if (c.model == null) { + Logger.error('child.model undefined in ModelsWatcher.'); + return; + } + id = c.model[idKey]; + if (mappedScopeModelIds[id] == null) { + return removals.push(c); + } + }); + return { + adds: adds, + removals: removals, + updates: updates + }; + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapPromise', [ + '$q', '$timeout', 'uiGmapLogger', function($q, $timeout, $log) { + var ExposedPromise, SniffedPromise, defer, isInProgress, isResolved, promise, promiseStatus, promiseStatuses, promiseTypes, resolve, strPromiseStatuses; + promiseTypes = { + create: 'create', + update: 'update', + "delete": 'delete', + init: 'init' + }; + promiseStatuses = { + IN_PROGRESS: 0, + RESOLVED: 1, + REJECTED: 2 + }; + strPromiseStatuses = (function() { + var obj; + obj = {}; + obj["" + promiseStatuses.IN_PROGRESS] = 'in-progress'; + obj["" + promiseStatuses.RESOLVED] = 'resolved'; + obj["" + promiseStatuses.REJECTED] = 'rejected'; + return obj; + })(); + isInProgress = function(promise) { + if (promise.$$state) { + return promise.$$state.status === promiseStatuses.IN_PROGRESS; + } + if (!promise.hasOwnProperty("$$v")) { + return true; + } + }; + isResolved = function(promise) { + if (promise.$$state) { + return promise.$$state.status === promiseStatuses.RESOLVED; + } + if (promise.hasOwnProperty("$$v")) { + return true; + } + }; + promiseStatus = function(status) { + return strPromiseStatuses[status] || 'done w error'; + }; + ExposedPromise = function(promise) { + var cancelDeferred, combined, wrapped; + cancelDeferred = $q.defer(); + combined = $q.all([promise, cancelDeferred.promise]); + wrapped = $q.defer(); + promise.then(cancelDeferred.resolve, (function() {}), function(notify) { + cancelDeferred.notify(notify); + return wrapped.notify(notify); + }); + combined.then(function(successes) { + return wrapped.resolve(successes[0] || successes[1]); + }, function(error) { + return wrapped.reject(error); + }); + wrapped.promise.cancel = function(reason) { + if (reason == null) { + reason = 'canceled'; + } + return cancelDeferred.reject(reason); + }; + wrapped.promise.notify = function(msg) { + if (msg == null) { + msg = 'cancel safe'; + } + wrapped.notify(msg); + if (promise.hasOwnProperty('notify')) { + return promise.notify(msg); + } + }; + if (promise.promiseType != null) { + wrapped.promise.promiseType = promise.promiseType; + } + return wrapped.promise; + }; + SniffedPromise = function(fnPromise, promiseType) { + return { + promise: fnPromise, + promiseType: promiseType + }; + }; + defer = function() { + return $q.defer(); + }; + resolve = function() { + var d; + d = $q.defer(); + d.resolve.apply(void 0, arguments); + return d.promise; + }; + promise = function(fnToWrap) { + var d; + if (!_.isFunction(fnToWrap)) { + $log.error("uiGmapPromise.promise() only accepts functions"); + return; + } + d = $q.defer(); + $timeout(function() { + var result; + result = fnToWrap(); + return d.resolve(result); + }); + return d.promise; + }; + return { + defer: defer, + promise: promise, + resolve: resolve, + promiseTypes: promiseTypes, + isInProgress: isInProgress, + isResolved: isResolved, + promiseStatus: promiseStatus, + ExposedPromise: ExposedPromise, + SniffedPromise: SniffedPromise + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap", function() { + + /* + Simple Object Map with a length property to make it easy to track length/size + */ + var PropMap; + return PropMap = (function() { + function PropMap() { + this.removeAll = bind(this.removeAll, this); + this.slice = bind(this.slice, this); + this.push = bind(this.push, this); + this.keys = bind(this.keys, this); + this.values = bind(this.values, this); + this.remove = bind(this.remove, this); + this.put = bind(this.put, this); + this.stateChanged = bind(this.stateChanged, this); + this.get = bind(this.get, this); + this.length = 0; + this.dict = {}; + this.didValsStateChange = false; + this.didKeysStateChange = false; + this.allVals = []; + this.allKeys = []; + } + + PropMap.prototype.get = function(key) { + return this.dict[key]; + }; + + PropMap.prototype.stateChanged = function() { + this.didValsStateChange = true; + return this.didKeysStateChange = true; + }; + + PropMap.prototype.put = function(key, value) { + if (this.get(key) == null) { + this.length++; + } + this.stateChanged(); + return this.dict[key] = value; + }; + + PropMap.prototype.remove = function(key, isSafe) { + var value; + if (isSafe == null) { + isSafe = false; + } + if (isSafe && !this.get(key)) { + return void 0; + } + value = this.dict[key]; + delete this.dict[key]; + this.length--; + this.stateChanged(); + return value; + }; + + PropMap.prototype.valuesOrKeys = function(str) { + var keys, vals; + if (str == null) { + str = 'Keys'; + } + if (!this["did" + str + "StateChange"]) { + return this['all' + str]; + } + vals = []; + keys = []; + _.each(this.dict, function(v, k) { + vals.push(v); + return keys.push(k); + }); + this.didKeysStateChange = false; + this.didValsStateChange = false; + this.allVals = vals; + this.allKeys = keys; + return this['all' + str]; + }; + + PropMap.prototype.values = function() { + return this.valuesOrKeys('Vals'); + }; + + PropMap.prototype.keys = function() { + return this.valuesOrKeys(); + }; + + PropMap.prototype.push = function(obj, key) { + if (key == null) { + key = "key"; + } + return this.put(obj[key], obj); + }; + + PropMap.prototype.slice = function() { + return this.keys().map((function(_this) { + return function(k) { + return _this.remove(k); + }; + })(this)); + }; + + PropMap.prototype.removeAll = function() { + return this.slice(); + }; + + PropMap.prototype.each = function(cb) { + return _.each(this.dict, function(v, k) { + return cb(v); + }); + }; + + PropMap.prototype.map = function(cb) { + return _.map(this.dict, function(v, k) { + return cb(v); + }); + }; + + return PropMap; + + })(); + }); + +}).call(this); +; +/*globals angular,_ */ + +(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction", [ + "uiGmapLogger", function(Logger) { + var PropertyAction; + PropertyAction = function(setterFn) { + this.setIfChange = function(callingKey) { + return function(newVal, oldVal) { + if (!_.isEqual(oldVal, newVal)) { + return setterFn(callingKey, newVal); + } + }; + }; + this.sic = this.setIfChange; + return this; + }; + return PropertyAction; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapClustererMarkerManager', [ + 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapEventsHelper', function($log, FitHelper, PropMap, EventsHelper) { + var ClustererMarkerManager; + ClustererMarkerManager = (function() { + ClustererMarkerManager.type = 'ClustererMarkerManager'; + + function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) { + if (opt_markers == null) { + opt_markers = {}; + } + this.opt_options = opt_options != null ? opt_options : {}; + this.opt_events = opt_events; + this.checkSync = bind(this.checkSync, this); + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.destroy = bind(this.destroy, this); + this.attachEvents = bind(this.attachEvents, this); + this.clear = bind(this.clear, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = ClustererMarkerManager.type; + this.clusterer = new NgMapMarkerClusterer(gMap, opt_markers, this.opt_options); + this.propMapGMarkers = new PropMap(); + this.attachEvents(this.opt_events, 'opt_events'); + this.clusterer.setIgnoreHidden(true); + this.noDrawOnSingleAddRemoves = true; + $log.info(this); + } + + ClustererMarkerManager.prototype.checkKey = function(gMarker) { + var msg; + if (gMarker.key == null) { + msg = 'gMarker.key undefined and it is REQUIRED!!'; + return $log.error(msg); + } + }; + + ClustererMarkerManager.prototype.add = function(gMarker) { + this.checkKey(gMarker); + this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.put(gMarker.key, gMarker); + return this.checkSync(); + }; + + ClustererMarkerManager.prototype.update = function(gMarker) { + this.remove(gMarker); + return this.add(gMarker); + }; + + ClustererMarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + ClustererMarkerManager.prototype.remove = function(gMarker) { + var exists; + this.checkKey(gMarker); + exists = this.propMapGMarkers.get(gMarker.key); + if (exists) { + this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.remove(gMarker.key); + } + return this.checkSync(); + }; + + ClustererMarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.remove(gMarker); + }; + })(this)); + }; + + ClustererMarkerManager.prototype.draw = function() { + return this.clusterer.repaint(); + }; + + ClustererMarkerManager.prototype.clear = function() { + this.removeMany(this.getGMarkers()); + return this.clusterer.repaint(); + }; + + ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) { + var eventHandler, eventName, results; + this.listeners = []; + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + results = []; + for (eventName in options) { + eventHandler = options[eventName]; + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Attaching event: " + eventName + " to clusterer"); + results.push(this.listeners.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName]))); + } else { + results.push(void 0); + } + } + return results; + } + }; + + ClustererMarkerManager.prototype.clearEvents = function() { + EventsHelper.removeEvents(this.listeners); + return this.listeners = []; + }; + + ClustererMarkerManager.prototype.destroy = function() { + this.clearEvents(); + return this.clear(); + }; + + ClustererMarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.clusterer.getMap()); + }; + + ClustererMarkerManager.prototype.getGMarkers = function() { + return this.clusterer.getMarkers().values(); + }; + + ClustererMarkerManager.prototype.checkSync = function() {}; + + return ClustererMarkerManager; + + })(); + return ClustererMarkerManager; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.managers').service('uiGmapGoogleMapObjectManager', [ + function() { + var _availableInstances, _usedInstances; + _availableInstances = []; + _usedInstances = []; + return { + createMapInstance: function(parentElement, options) { + var instance; + instance = null; + if (_availableInstances.length === 0) { + instance = new google.maps.Map(parentElement, options); + _usedInstances.push(instance); + } else { + instance = _availableInstances.pop(); + angular.element(parentElement).append(instance.getDiv()); + instance.setOptions(options); + _usedInstances.push(instance); + } + return instance; + }, + recycleMapInstance: function(instance) { + var index; + index = _usedInstances.indexOf(instance); + if (index < 0) { + throw new Error('Expected map instance to be a previously used instance'); + } + _usedInstances.splice(index, 1); + return _availableInstances.push(instance); + } + }; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager", [ + "uiGmapLogger", "uiGmapFitHelper", "uiGmapPropMap", function(Logger, FitHelper, PropMap) { + var MarkerManager; + MarkerManager = (function() { + MarkerManager.type = 'MarkerManager'; + + function MarkerManager(gMap, opt_markers, opt_options) { + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.handleOptDraw = bind(this.handleOptDraw, this); + this.clear = bind(this.clear, this); + this.destroy = bind(this.destroy, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = MarkerManager.type; + this.gMap = gMap; + this.gMarkers = new PropMap(); + this.$log = Logger; + this.$log.info(this); + } + + MarkerManager.prototype.add = function(gMarker, optDraw) { + var exists, msg; + if (optDraw == null) { + optDraw = true; + } + if (gMarker.key == null) { + msg = "gMarker.key undefined and it is REQUIRED!!"; + Logger.error(msg); + throw msg; + } + exists = this.gMarkers.get(gMarker.key); + if (!exists) { + this.handleOptDraw(gMarker, optDraw, true); + return this.gMarkers.put(gMarker.key, gMarker); + } + }; + + MarkerManager.prototype.update = function(gMarker, optDraw) { + if (optDraw == null) { + optDraw = true; + } + this.remove(gMarker, optDraw); + return this.add(gMarker, optDraw); + }; + + MarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + MarkerManager.prototype.remove = function(gMarker, optDraw) { + if (optDraw == null) { + optDraw = true; + } + this.handleOptDraw(gMarker, optDraw, false); + if (this.gMarkers.get(gMarker.key)) { + return this.gMarkers.remove(gMarker.key); + } + }; + + MarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(marker) { + return _this.remove(marker); + }; + })(this)); + }; + + MarkerManager.prototype.draw = function() { + var deletes; + deletes = []; + this.gMarkers.each((function(_this) { + return function(gMarker) { + if (!gMarker.isDrawn) { + if (gMarker.doAdd) { + gMarker.setMap(_this.gMap); + return gMarker.isDrawn = true; + } else { + return deletes.push(gMarker); + } + } + }; + })(this)); + return deletes.forEach((function(_this) { + return function(gMarker) { + gMarker.isDrawn = false; + return _this.remove(gMarker, true); + }; + })(this)); + }; + + MarkerManager.prototype.destroy = function() { + return this.clear(); + }; + + MarkerManager.prototype.clear = function() { + this.gMarkers.each(function(gMarker) { + return gMarker.setMap(null); + }); + delete this.gMarkers; + return this.gMarkers = new PropMap(); + }; + + MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) { + if (optDraw === true) { + if (doAdd) { + gMarker.setMap(this.gMap); + } else { + gMarker.setMap(null); + } + return gMarker.isDrawn = true; + } else { + gMarker.isDrawn = false; + return gMarker.doAdd = doAdd; + } + }; + + MarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.gMap); + }; + + MarkerManager.prototype.getGMarkers = function() { + return this.gMarkers.values(); + }; + + return MarkerManager; + + })(); + return MarkerManager; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapSpiderfierMarkerManager', [ + 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapMarkerSpiderfier', function($log, FitHelper, PropMap, MarkerSpiderfier) { + var SpiderfierMarkerManager; + return SpiderfierMarkerManager = (function() { + SpiderfierMarkerManager.type = 'SpiderfierMarkerManager'; + + function SpiderfierMarkerManager(gMap, opt_markers, opt_options, opt_events, scope) { + if (opt_markers == null) { + opt_markers = {}; + } + this.opt_options = opt_options != null ? opt_options : {}; + this.opt_events = opt_events; + this.scope = scope; + this.checkSync = bind(this.checkSync, this); + this.isSpiderfied = bind(this.isSpiderfied, this); + this.getGMarkers = bind(this.getGMarkers, this); + this.fit = bind(this.fit, this); + this.destroy = bind(this.destroy, this); + this.attachEvents = bind(this.attachEvents, this); + this.clear = bind(this.clear, this); + this.draw = bind(this.draw, this); + this.removeMany = bind(this.removeMany, this); + this.remove = bind(this.remove, this); + this.addMany = bind(this.addMany, this); + this.update = bind(this.update, this); + this.add = bind(this.add, this); + this.type = SpiderfierMarkerManager.type; + this.markerSpiderfier = new MarkerSpiderfier(gMap, this.opt_options); + this.propMapGMarkers = new PropMap(); + this.attachEvents(this.opt_events, 'opt_events'); + this.noDrawOnSingleAddRemoves = true; + $log.info(this); + } + + SpiderfierMarkerManager.prototype.checkKey = function(gMarker) { + var msg; + if (gMarker.key == null) { + msg = 'gMarker.key undefined and it is REQUIRED!!'; + return $log.error(msg); + } + }; + + SpiderfierMarkerManager.prototype.add = function(gMarker) { + gMarker.setMap(this.markerSpiderfier.map); + this.checkKey(gMarker); + this.markerSpiderfier.addMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.put(gMarker.key, gMarker); + return this.checkSync(); + }; + + SpiderfierMarkerManager.prototype.update = function(gMarker) { + this.remove(gMarker); + return this.add(gMarker); + }; + + SpiderfierMarkerManager.prototype.addMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.add(gMarker); + }; + })(this)); + }; + + SpiderfierMarkerManager.prototype.remove = function(gMarker) { + var exists; + this.checkKey(gMarker); + exists = this.propMapGMarkers.get(gMarker.key); + if (exists) { + gMarker.setMap(null); + this.markerSpiderfier.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); + this.propMapGMarkers.remove(gMarker.key); + } + return this.checkSync(); + }; + + SpiderfierMarkerManager.prototype.removeMany = function(gMarkers) { + return gMarkers.forEach((function(_this) { + return function(gMarker) { + return _this.remove(gMarker); + }; + })(this)); + }; + + SpiderfierMarkerManager.prototype.draw = function() {}; + + SpiderfierMarkerManager.prototype.clear = function() { + return this.removeMany(this.getGMarkers()); + }; + + SpiderfierMarkerManager.prototype.attachEvents = function(options, optionsName) { + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + return _.each(options, (function(_this) { + return function(eventHandler, eventName) { + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Attaching event: " + eventName + " to markerSpiderfier"); + return _this.markerSpiderfier.addListener(eventName, function() { + if (eventName === 'spiderfy' || eventName === 'unspiderfy') { + return _this.scope.$evalAsync(options[eventName].apply(options, arguments)); + } else { + return _this.scope.$evalAsync(options[eventName].apply(options, [arguments[0], eventName, arguments[0].model, arguments])); + } + }); + } + }; + })(this)); + } + }; + + SpiderfierMarkerManager.prototype.clearEvents = function(options, optionsName) { + var eventHandler, eventName; + if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { + for (eventName in options) { + eventHandler = options[eventName]; + if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { + $log.info(optionsName + ": Clearing event: " + eventName + " to markerSpiderfier"); + this.markerSpiderfier.clearListeners(eventName); + } + } + } + }; + + SpiderfierMarkerManager.prototype.destroy = function() { + this.clearEvents(this.opt_events, 'opt_events'); + return this.clear(); + }; + + SpiderfierMarkerManager.prototype.fit = function() { + return FitHelper.fit(this.getGMarkers(), this.markerSpiderfier.map); + }; + + SpiderfierMarkerManager.prototype.getGMarkers = function() { + return this.markerSpiderfier.getMarkers(); + }; + + SpiderfierMarkerManager.prototype.isSpiderfied = function() { + return _.find(this.getGMarkers(), function(gMarker) { + return (gMarker != null ? gMarker._omsData : void 0) != null; + }); + }; + + SpiderfierMarkerManager.prototype.checkSync = function() {}; + + return SpiderfierMarkerManager; + + })(); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').factory('uiGmapadd-events', [ + '$timeout', function($timeout) { + var addEvent, addEvents; + addEvent = function(target, eventName, handler) { + return google.maps.event.addListener(target, eventName, function() { + handler.apply(this, arguments); + return $timeout((function() {}), true); + }); + }; + addEvents = function(target, eventName, handler) { + var remove; + if (handler) { + return addEvent(target, eventName, handler); + } + remove = []; + angular.forEach(eventName, function(_handler, key) { + return remove.push(addEvent(target, key, _handler)); + }); + return function() { + angular.forEach(remove, function(listener) { + return google.maps.event.removeListener(listener); + }); + return remove = null; + }; + }; + return addEvents; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').factory('uiGmaparray-sync', [ + 'uiGmapadd-events', function(mapEvents) { + return function(mapArray, scope, pathEval, pathChangedFn) { + var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener; + isSetFromScope = false; + scopePath = scope.$eval(pathEval); + if (!scope["static"]) { + legacyHandlers = { + set_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return scopePath[index] = value; + } else { + scopePath[index].latitude = value.lat(); + return scopePath[index].longitude = value.lng(); + } + }, + insert_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return scopePath.splice(index, 0, value); + } else { + return scopePath.splice(index, 0, { + latitude: value.lat(), + longitude: value.lng() + }); + } + }, + remove_at: function(index) { + if (isSetFromScope) { + return; + } + return scopePath.splice(index, 1); + } + }; + geojsonArray; + if (scopePath.type === 'Polygon') { + geojsonArray = scopePath.coordinates[0]; + } else if (scopePath.type === 'LineString') { + geojsonArray = scopePath.coordinates; + } + geojsonHandlers = { + set_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!(value && value.lng && value.lat)) { + return; + } + geojsonArray[index][1] = value.lat(); + return geojsonArray[index][0] = value.lng(); + }, + insert_at: function(index) { + var value; + if (isSetFromScope) { + return; + } + value = mapArray.getAt(index); + if (!value) { + return; + } + if (!value.lng || !value.lat) { + return; + } + return geojsonArray.splice(index, 0, [value.lng(), value.lat()]); + }, + remove_at: function(index) { + if (isSetFromScope) { + return; + } + return geojsonArray.splice(index, 1); + } + }; + mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers); + } + legacyWatcher = function(newPath) { + var changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; + isSetFromScope = true; + oldArray = mapArray; + changed = false; + if (newPath) { + i = 0; + oldLength = oldArray.getLength(); + newLength = newPath.length; + l = Math.min(oldLength, newLength); + newValue = void 0; + while (i < l) { + oldValue = oldArray.getAt(i); + newValue = newPath[i]; + if (typeof newValue.equals === 'function') { + if (!newValue.equals(oldValue)) { + oldArray.setAt(i, newValue); + changed = true; + } + } else { + if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) { + oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude)); + changed = true; + } + } + i++; + } + while (i < newLength) { + newValue = newPath[i]; + if (typeof newValue.lat === 'function' && typeof newValue.lng === 'function') { + oldArray.push(newValue); + } else { + oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude)); + } + changed = true; + i++; + } + while (i < oldLength) { + oldArray.pop(); + changed = true; + i++; + } + } + isSetFromScope = false; + if (changed) { + return pathChangedFn(oldArray); + } + }; + geojsonWatcher = function(newPath) { + var array, changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; + isSetFromScope = true; + oldArray = mapArray; + changed = false; + if (newPath) { + array; + if (scopePath.type === 'Polygon') { + array = newPath.coordinates[0]; + } else if (scopePath.type === 'LineString') { + array = newPath.coordinates; + } + i = 0; + oldLength = oldArray.getLength(); + newLength = array.length; + l = Math.min(oldLength, newLength); + newValue = void 0; + while (i < l) { + oldValue = oldArray.getAt(i); + newValue = array[i]; + if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) { + oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0])); + changed = true; + } + i++; + } + while (i < newLength) { + newValue = array[i]; + oldArray.push(new google.maps.LatLng(newValue[1], newValue[0])); + changed = true; + i++; + } + while (i < oldLength) { + oldArray.pop(); + changed = true; + i++; + } + } + isSetFromScope = false; + if (changed) { + return pathChangedFn(oldArray); + } + }; + watchListener; + if (!scope["static"]) { + if (angular.isUndefined(scopePath.type)) { + watchListener = scope.$watchCollection(pathEval, legacyWatcher); + } else { + watchListener = scope.$watch(pathEval, geojsonWatcher, true); + } + } + return function() { + if (mapArrayListener) { + mapArrayListener(); + mapArrayListener = null; + } + if (watchListener) { + watchListener(); + return watchListener = null; + } + }; + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes", [ + '$timeout', function($timeout) { + return { + maybeRepaint: function(el) { + if (el) { + el.style.opacity = 0.9; + return $timeout(function() { + return el.style.opacity = 1; + }); + } + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').service('uiGmapObjectIterators', function() { + var _ignores, _iterators, _slapForEach, _slapMap; + _ignores = ['length', 'forEach', 'map']; + _iterators = []; + _slapForEach = function(object) { + object.forEach = function(cb) { + return _.each(_.omit(object, _ignores), function(val) { + if (!_.isFunction(val)) { + return cb(val); + } + }); + }; + return object; + }; + _iterators.push(_slapForEach); + _slapMap = function(object) { + object.map = function(cb) { + return _.map(_.omit(object, _ignores), function(val) { + if (!_.isFunction(val)) { + return cb(val); + } + }); + }; + return object; + }; + _iterators.push(_slapMap); + return { + slapMap: _slapMap, + slapForEach: _slapForEach, + slapAll: function(object) { + _iterators.forEach(function(it) { + return it(object); + }); + return object; + } + }; + }); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.options.builders').service('uiGmapCommonOptionsBuilder', [ + 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapModelKey', function(BaseObject, $log, ModelKey) { + var CommonOptionsBuilder; + return CommonOptionsBuilder = (function(superClass) { + extend(CommonOptionsBuilder, superClass); + + function CommonOptionsBuilder() { + this.watchProps = bind(this.watchProps, this); + this.buildOpts = bind(this.buildOpts, this); + return CommonOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + CommonOptionsBuilder.prototype.props = [ + 'clickable', 'draggable', 'editable', 'visible', { + prop: 'stroke', + isColl: true + } + ]; + + CommonOptionsBuilder.prototype.getCorrectModel = function(scope) { + if (angular.isDefined(scope != null ? scope.model : void 0)) { + return scope.model; + } else { + return scope; + } + }; + + CommonOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) { + var model, opts, stroke; + if (customOpts == null) { + customOpts = {}; + } + if (forEachOpts == null) { + forEachOpts = {}; + } + if (!this.scope) { + $log.error('this.scope not defined in CommonOptionsBuilder can not buildOpts'); + return; + } + if (!this.gMap) { + $log.error('this.map not defined in CommonOptionsBuilder can not buildOpts'); + return; + } + model = this.getCorrectModel(this.scope); + stroke = this.scopeOrModelVal('stroke', this.scope, model); + opts = angular.extend(customOpts, this.DEFAULTS, { + map: this.gMap, + strokeColor: stroke != null ? stroke.color : void 0, + strokeOpacity: stroke != null ? stroke.opacity : void 0, + strokeWeight: stroke != null ? stroke.weight : void 0 + }); + angular.forEach(angular.extend(forEachOpts, { + clickable: true, + draggable: false, + editable: false, + "static": false, + fit: false, + visible: true, + zIndex: 0, + icons: [] + }), (function(_this) { + return function(defaultValue, key) { + var val; + val = cachedEval ? cachedEval[key] : _this.scopeOrModelVal(key, _this.scope, model); + if (angular.isUndefined(val)) { + return opts[key] = defaultValue; + } else { + return opts[key] = model[key]; + } + }; + })(this)); + if (opts["static"]) { + opts.editable = false; + } + return opts; + }; + + CommonOptionsBuilder.prototype.watchProps = function(props) { + if (props == null) { + props = this.props; + } + return props.forEach((function(_this) { + return function(prop) { + if ((_this.attrs[prop] != null) || (_this.attrs[prop != null ? prop.prop : void 0] != null)) { + if (prop != null ? prop.isColl : void 0) { + return _this.scope.$watchCollection(prop.prop, _this.setMyOptions); + } else { + return _this.scope.$watch(prop, _this.setMyOptions); + } + } + }; + })(this)); + }; + + return CommonOptionsBuilder; + + })(ModelKey); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.options.builders').factory('uiGmapPolylineOptionsBuilder', [ + 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) { + var PolylineOptionsBuilder; + return PolylineOptionsBuilder = (function(superClass) { + extend(PolylineOptionsBuilder, superClass); + + function PolylineOptionsBuilder() { + return PolylineOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + PolylineOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) { + return PolylineOptionsBuilder.__super__.buildOpts.call(this, { + path: pathPoints + }, cachedEval, { + geodesic: false + }); + }; + + return PolylineOptionsBuilder; + + })(CommonOptionsBuilder); + } + ]).factory('uiGmapShapeOptionsBuilder', [ + 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) { + var ShapeOptionsBuilder; + return ShapeOptionsBuilder = (function(superClass) { + extend(ShapeOptionsBuilder, superClass); + + function ShapeOptionsBuilder() { + return ShapeOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + ShapeOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) { + var fill, model; + model = this.getCorrectModel(this.scope); + fill = cachedEval ? cachedEval['fill'] : this.scopeOrModelVal('fill', this.scope, model); + customOpts = angular.extend(customOpts, { + fillColor: fill != null ? fill.color : void 0, + fillOpacity: fill != null ? fill.opacity : void 0 + }); + return ShapeOptionsBuilder.__super__.buildOpts.call(this, customOpts, cachedEval, forEachOpts); + }; + + return ShapeOptionsBuilder; + + })(CommonOptionsBuilder); + } + ]).factory('uiGmapPolygonOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var PolygonOptionsBuilder; + return PolygonOptionsBuilder = (function(superClass) { + extend(PolygonOptionsBuilder, superClass); + + function PolygonOptionsBuilder() { + return PolygonOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + PolygonOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) { + return PolygonOptionsBuilder.__super__.buildOpts.call(this, { + path: pathPoints + }, cachedEval, { + geodesic: false + }); + }; + + return PolygonOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]).factory('uiGmapRectangleOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var RectangleOptionsBuilder; + return RectangleOptionsBuilder = (function(superClass) { + extend(RectangleOptionsBuilder, superClass); + + function RectangleOptionsBuilder() { + return RectangleOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + RectangleOptionsBuilder.prototype.buildOpts = function(bounds, cachedEval) { + return RectangleOptionsBuilder.__super__.buildOpts.call(this, { + bounds: bounds + }, cachedEval); + }; + + return RectangleOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]).factory('uiGmapCircleOptionsBuilder', [ + 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) { + var CircleOptionsBuilder; + return CircleOptionsBuilder = (function(superClass) { + extend(CircleOptionsBuilder, superClass); + + function CircleOptionsBuilder() { + return CircleOptionsBuilder.__super__.constructor.apply(this, arguments); + } + + CircleOptionsBuilder.prototype.buildOpts = function(center, radius, cachedEval) { + return CircleOptionsBuilder.__super__.buildOpts.call(this, { + center: center, + radius: radius + }, cachedEval); + }; + + return CircleOptionsBuilder; + + })(ShapeOptionsBuilder); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api.options').service('uiGmapMarkerOptions', [ + 'uiGmapLogger', 'uiGmapGmapUtil', function($log, GmapUtil) { + return _.extend(GmapUtil, { + createOptions: function(coords, icon, defaults, map) { + var opts; + if (defaults == null) { + defaults = {}; + } + opts = angular.extend({}, defaults, { + position: defaults.position != null ? defaults.position : GmapUtil.getCoords(coords), + visible: defaults.visible != null ? defaults.visible : GmapUtil.validateCoords(coords) + }); + if ((defaults.icon != null) || (icon != null)) { + opts = angular.extend(opts, { + icon: defaults.icon != null ? defaults.icon : icon + }); + } + if (map != null) { + opts.map = map; + } + return opts; + }, + isLabel: function(options) { + if (options == null) { + return false; + } + return (options.labelContent != null) || (options.labelAnchor != null) || (options.labelClass != null) || (options.labelStyle != null) || (options.labelVisible != null); + } + }); + } + ]); + +}).call(this); +; +/*global _,angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapBasePolyChildModel', [ + 'uiGmapLogger', '$timeout', 'uiGmaparray-sync', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function($log, $timeout, arraySync, GmapUtil, EventsHelper) { + return function(Builder, gFactory) { + var BasePolyChildModel; + return BasePolyChildModel = (function(superClass) { + extend(BasePolyChildModel, superClass); + + BasePolyChildModel.include(GmapUtil); + + function BasePolyChildModel(arg) { + var create, gObjectChangeCb, ref; + this.scope = arg.scope, this.attrs = arg.attrs, this.gMap = arg.gMap, this.defaults = arg.defaults, this.model = arg.model, gObjectChangeCb = arg.gObjectChangeCb, this.isScopeModel = (ref = arg.isScopeModel) != null ? ref : false; + this.clean = bind(this.clean, this); + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.isDragging = false; + this.internalEvents = { + dragend: (function(_this) { + return function() { + return _.defer(function() { + return _this.isDragging = false; + }); + }; + })(this), + dragstart: (function(_this) { + return function() { + return _this.isDragging = true; + }; + })(this) + }; + create = (function(_this) { + return function() { + var maybeCachedEval; + if (_this.isDragging) { + return; + } + _this.pathPoints = _this.convertPathPoints(_this.scope.path); + if (_this.gObject != null) { + _this.clean(); + } + if (_this.scope.model != null) { + maybeCachedEval = _this.scope; + } + if (_this.pathPoints.length > 0) { + _this.gObject = gFactory(_this.buildOpts(_this.pathPoints, maybeCachedEval)); + } + if (_this.gObject) { + arraySync(_this.gObject.getPath(), _this.scope, 'path', function(pathPoints) { + _this.pathPoints = pathPoints; + if (gObjectChangeCb != null) { + return gObjectChangeCb(); + } + }); + if (angular.isDefined(_this.scope.events) && angular.isObject(_this.scope.events)) { + _this.listeners = _this.model ? EventsHelper.setEvents(_this.gObject, _this.scope, _this.model) : EventsHelper.setEvents(_this.gObject, _this.scope, _this.scope); + } + return _this.internalListeners = _this.model ? EventsHelper.setEvents(_this.gObject, { + events: _this.internalEvents + }, _this.model) : EventsHelper.setEvents(_this.gObject, { + events: _this.internalEvents + }, _this.scope); + } + }; + })(this); + create(); + this.scope.$watch('path', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue) || !_this.gObject) { + return create(); + } + }; + })(this), true); + if (!this.scope["static"] && angular.isDefined(this.scope.editable)) { + this.scope.$watch('editable', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setEditable(newValue) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.draggable)) { + this.scope.$watch('draggable', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setDraggable(newValue) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.visible)) { + this.scope.$watch('visible', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + } + return (ref1 = _this.gObject) != null ? ref1.setVisible(newValue) : void 0; + }; + })(this), true); + } + if (angular.isDefined(this.scope.geodesic)) { + this.scope.$watch('geodesic', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + newValue = !_this.isFalse(newValue); + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.weight)) { + this.scope.$watch('stroke.weight', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.color)) { + this.scope.$watch('stroke.color', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.opacity)) { + this.scope.$watch('stroke.opacity', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + if (angular.isDefined(this.scope.icons)) { + this.scope.$watch('icons', (function(_this) { + return function(newValue, oldValue) { + var ref1; + if (newValue !== oldValue) { + return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0; + } + }; + })(this), true); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + _this.clean(); + return _this.scope = null; + }; + })(this)); + if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.color)) { + this.scope.$watch('fill.color', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.opacity)) { + this.scope.$watch('fill.opacity', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + if (angular.isDefined(this.scope.zIndex)) { + this.scope.$watch('zIndex', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath())); + } + }; + })(this)); + } + } + + BasePolyChildModel.prototype.clean = function() { + var ref; + EventsHelper.removeEvents(this.listeners); + EventsHelper.removeEvents(this.internalListeners); + if ((ref = this.gObject) != null) { + ref.setMap(null); + } + return this.gObject = null; + }; + + return BasePolyChildModel; + + })(Builder); + }; + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready +Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawing-freehand , & + http://jsfiddle.net/YsQdh/88/ + */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapDrawFreeHandChildModel', [ + 'uiGmapLogger', '$q', function($log, $q) { + var drawFreeHand, freeHandMgr; + drawFreeHand = function(map, polys, done) { + var move, poly; + poly = new google.maps.Polyline({ + map: map, + clickable: false + }); + move = google.maps.event.addListener(map, 'mousemove', function(e) { + return poly.getPath().push(e.latLng); + }); + google.maps.event.addListenerOnce(map, 'mouseup', function(e) { + var path; + google.maps.event.removeListener(move); + path = poly.getPath(); + poly.setMap(null); + polys.push(new google.maps.Polygon({ + map: map, + path: path + })); + poly = null; + google.maps.event.clearListeners(map.getDiv(), 'mousedown'); + return done(); + }); + return void 0; + }; + freeHandMgr = function(map1, scope) { + var disableMap, enableMap; + this.map = map1; + disableMap = (function(_this) { + return function() { + var mapOptions; + mapOptions = { + draggable: false, + disableDefaultUI: true, + scrollwheel: false, + disableDoubleClickZoom: false + }; + $log.info('disabling map move'); + return _this.map.setOptions(mapOptions); + }; + })(this); + enableMap = (function(_this) { + return function() { + var mapOptions, ref; + mapOptions = { + draggable: true, + disableDefaultUI: false, + scrollwheel: true, + disableDoubleClickZoom: true + }; + if ((ref = _this.deferred) != null) { + ref.resolve(); + } + return _.defer(function() { + return _this.map.setOptions(_.extend(mapOptions, scope.options)); + }); + }; + })(this); + this.engage = (function(_this) { + return function(polys1) { + _this.polys = polys1; + _this.deferred = $q.defer(); + disableMap(); + $log.info('DrawFreeHandChildModel is engaged (drawing).'); + google.maps.event.addDomListener(_this.map.getDiv(), 'mousedown', function(e) { + return drawFreeHand(_this.map, _this.polys, enableMap); + }); + return _this.deferred.promise; + }; + })(this); + return this; + }; + return freeHandMgr; + } + ]); + +}).call(this); +; +/*global _:true,angular:true,google:true, RichMarker:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapMarkerChildModel', [ + 'uiGmapModelKey', 'uiGmapGmapUtil', 'uiGmapLogger', 'uiGmapEventsHelper', 'uiGmapPropertyAction', 'uiGmapMarkerOptions', 'uiGmapIMarker', 'uiGmapMarkerManager', 'uiGmapPromise', function(ModelKey, GmapUtil, $log, EventsHelper, PropertyAction, MarkerOptions, IMarker, MarkerManager, uiGmapPromise) { + var MarkerChildModel; + MarkerChildModel = (function(superClass) { + var destroy; + + extend(MarkerChildModel, superClass); + + MarkerChildModel.include(GmapUtil); + + MarkerChildModel.include(EventsHelper); + + MarkerChildModel.include(MarkerOptions); + + destroy = function(child) { + if ((child != null ? child.gObject : void 0) != null) { + child.removeEvents(child.externalListeners); + child.removeEvents(child.internalListeners); + if (child != null ? child.gObject : void 0) { + if (child.removeFromManager) { + child.gManager.remove(child.gObject); + } + child.gObject.setMap(null); + return child.gObject = null; + } + } + }; + + function MarkerChildModel(opts) { + this.internalEvents = bind(this.internalEvents, this); + this.setLabelOptions = bind(this.setLabelOptions, this); + this.setOptions = bind(this.setOptions, this); + this.setIcon = bind(this.setIcon, this); + this.setCoords = bind(this.setCoords, this); + this.isNotValid = bind(this.isNotValid, this); + this.maybeSetScopeValue = bind(this.maybeSetScopeValue, this); + this.createMarker = bind(this.createMarker, this); + this.setMyScope = bind(this.setMyScope, this); + this.updateModel = bind(this.updateModel, this); + this.handleModelChanges = bind(this.handleModelChanges, this); + this.destroy = bind(this.destroy, this); + var action, ref, ref1, ref2, ref3, ref4, scope; + scope = opts.scope, this.model = opts.model, this.keys = opts.keys, this.gMap = opts.gMap, this.defaults = (ref = opts.defaults) != null ? ref : {}, this.doClick = opts.doClick, this.gManager = opts.gManager, this.doDrawSelf = (ref1 = opts.doDrawSelf) != null ? ref1 : true, this.trackModel = (ref2 = opts.trackModel) != null ? ref2 : true, this.needRedraw = (ref3 = opts.needRedraw) != null ? ref3 : false, this.isScopeModel = (ref4 = opts.isScopeModel) != null ? ref4 : false; + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.deferred = uiGmapPromise.defer(); + _.each(this.keys, (function(_this) { + return function(v, k) { + var keyValue; + keyValue = _this.keys[k]; + if ((keyValue != null) && !_.isFunction(keyValue) && _.isString(keyValue)) { + return _this[k + 'Key'] = keyValue; + } + }; + })(this)); + this.idKey = this.idKeyKey || 'id'; + if (this.model[this.idKey] != null) { + this.id = this.model[this.idKey]; + } + MarkerChildModel.__super__.constructor.call(this, scope); + this.scope.getGMarker = (function(_this) { + return function() { + return _this.gObject; + }; + })(this); + this.firstTime = true; + if (this.trackModel) { + this.scope.model = this.model; + this.scope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.handleModelChanges(newValue, oldValue); + } + }; + })(this), true); + } else { + action = new PropertyAction((function(_this) { + return function(calledKey) { + if (_.isFunction(calledKey)) { + calledKey = 'all'; + } + if (!_this.firstTime) { + return _this.setMyScope(calledKey, scope); + } + }; + })(this), false); + _.each(this.keys, function(v, k) { + return scope.$watch(k, action.sic(k), true); + }); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + return destroy(_this); + }; + })(this)); + this.createMarker(this.model); + $log.info(this); + } + + MarkerChildModel.prototype.destroy = function(removeFromManager) { + if (removeFromManager == null) { + removeFromManager = true; + } + this.removeFromManager = removeFromManager; + return this.scope.$destroy(); + }; + + MarkerChildModel.prototype.handleModelChanges = function(newValue, oldValue) { + var changes, ctr, len; + changes = this.getChanges(newValue, oldValue, IMarker.keys); + if (!this.firstTime) { + ctr = 0; + len = _.keys(changes).length; + return _.each(changes, (function(_this) { + return function(v, k) { + var doDraw; + ctr += 1; + doDraw = len === ctr; + _this.setMyScope(k, newValue, oldValue, false, true, doDraw); + return _this.needRedraw = true; + }; + })(this)); + } + }; + + MarkerChildModel.prototype.updateModel = function(model) { + if (this.isScopeModel) { + this.clonedModel = _.clone(model, true); + } + return this.setMyScope('all', model, this.model); + }; + + MarkerChildModel.prototype.renderGMarker = function(doDraw, validCb) { + var coords, isSpiderfied, ref; + if (doDraw == null) { + doDraw = true; + } + coords = this.getProp('coords', this.scope, this.model); + if (((ref = this.gManager) != null ? ref.isSpiderfied : void 0) != null) { + isSpiderfied = this.gManager.isSpiderfied(); + } + if (coords != null) { + if (!this.validateCoords(coords)) { + $log.debug('MarkerChild does not have coords yet. They may be defined later.'); + return; + } + if (validCb != null) { + validCb(); + } + if (doDraw && this.gObject) { + this.gManager.add(this.gObject); + } + if (isSpiderfied) { + return this.gManager.markerSpiderfier.spiderListener(this.gObject, window.event); + } + } else { + if (doDraw && this.gObject) { + return this.gManager.remove(this.gObject); + } + } + }; + + MarkerChildModel.prototype.setMyScope = function(thingThatChanged, model, oldModel, isInit, doDraw) { + var justCreated; + if (oldModel == null) { + oldModel = void 0; + } + if (isInit == null) { + isInit = false; + } + if (doDraw == null) { + doDraw = true; + } + if (model == null) { + model = this.model; + } else { + this.model = model; + } + if (!this.gObject) { + this.setOptions(this.scope, doDraw); + justCreated = true; + } + switch (thingThatChanged) { + case 'all': + return _.each(this.keys, (function(_this) { + return function(v, k) { + return _this.setMyScope(k, model, oldModel, isInit, doDraw); + }; + })(this)); + case 'icon': + return this.maybeSetScopeValue({ + gSetter: this.setIcon, + doDraw: doDraw + }); + case 'coords': + return this.maybeSetScopeValue({ + gSetter: this.setCoords, + doDraw: doDraw + }); + case 'options': + if (!justCreated) { + return this.createMarker(model, oldModel, isInit, doDraw); + } + } + }; + + MarkerChildModel.prototype.createMarker = function(model, oldModel, isInit, doDraw) { + if (oldModel == null) { + oldModel = void 0; + } + if (isInit == null) { + isInit = false; + } + if (doDraw == null) { + doDraw = true; + } + this.maybeSetScopeValue({ + gSetter: this.setOptions, + doDraw: doDraw + }); + return this.firstTime = false; + }; + + MarkerChildModel.prototype.maybeSetScopeValue = function(arg) { + var doDraw, gSetter, ref; + gSetter = arg.gSetter, doDraw = (ref = arg.doDraw) != null ? ref : true; + if (gSetter != null) { + gSetter(this.scope, doDraw); + } + if (this.doDrawSelf && doDraw) { + return this.gManager.draw(); + } + }; + + MarkerChildModel.prototype.isNotValid = function(scope, doCheckGmarker) { + var hasIdenticalScopes, hasNoGmarker; + if (doCheckGmarker == null) { + doCheckGmarker = true; + } + hasNoGmarker = !doCheckGmarker ? false : this.gObject === void 0; + hasIdenticalScopes = !this.trackModel ? scope.$id !== this.scope.$id : false; + return hasIdenticalScopes || hasNoGmarker; + }; + + MarkerChildModel.prototype.setCoords = function(scope, doDraw) { + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope) || (this.gObject == null)) { + return; + } + return this.renderGMarker(doDraw, (function(_this) { + return function() { + var newGValue, newModelVal, oldGValue; + newModelVal = _this.getProp('coords', scope, _this.model); + newGValue = _this.getCoords(newModelVal); + oldGValue = _this.gObject.getPosition(); + if ((oldGValue != null) && (newGValue != null)) { + if (newGValue.lng() === oldGValue.lng() && newGValue.lat() === oldGValue.lat()) { + return; + } + } + _this.gObject.setPosition(newGValue); + return _this.gObject.setVisible(_this.validateCoords(newModelVal)); + }; + })(this)); + }; + + MarkerChildModel.prototype.setIcon = function(scope, doDraw) { + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope) || (this.gObject == null)) { + return; + } + return this.renderGMarker(doDraw, (function(_this) { + return function() { + var coords, newValue, oldValue; + oldValue = _this.gObject.getIcon(); + newValue = _this.getProp('icon', scope, _this.model); + if (oldValue === newValue) { + return; + } + _this.gObject.setIcon(newValue); + coords = _this.getProp('coords', scope, _this.model); + _this.gObject.setPosition(_this.getCoords(coords)); + return _this.gObject.setVisible(_this.validateCoords(coords)); + }; + })(this)); + }; + + MarkerChildModel.prototype.setOptions = function(scope, doDraw) { + var ref; + if (doDraw == null) { + doDraw = true; + } + if (this.isNotValid(scope, false)) { + return; + } + this.renderGMarker(doDraw, (function(_this) { + return function() { + var _options, coords, icon; + coords = _this.getProp('coords', scope, _this.model); + icon = _this.getProp('icon', scope, _this.model); + _options = _this.getProp('options', scope, _this.model); + _this.opts = _this.createOptions(coords, icon, _options); + if (_this.isLabel(_this.gObject) !== _this.isLabel(_this.opts) && (_this.gObject != null)) { + _this.gManager.remove(_this.gObject); + _this.gObject = void 0; + } + if (_this.gObject != null) { + _this.gObject.setOptions(_this.setLabelOptions(_this.opts)); + } + if (!_this.gObject) { + if (_this.isLabel(_this.opts)) { + _this.gObject = new MarkerWithLabel(_this.setLabelOptions(_this.opts)); + } else if (_this.opts.content) { + _this.gObject = new RichMarker(_this.opts); + _this.gObject.getIcon = _this.gObject.getContent; + _this.gObject.setIcon = _this.gObject.setContent; + } else { + _this.gObject = new google.maps.Marker(_this.opts); + } + _.extend(_this.gObject, { + model: _this.model + }); + } + if (_this.externalListeners) { + _this.removeEvents(_this.externalListeners); + } + if (_this.internalListeners) { + _this.removeEvents(_this.internalListeners); + } + _this.externalListeners = _this.setEvents(_this.gObject, _this.scope, _this.model, ['dragend']); + _this.internalListeners = _this.setEvents(_this.gObject, { + events: _this.internalEvents(), + $evalAsync: function() {} + }, _this.model); + if (_this.id != null) { + return _this.gObject.key = _this.id; + } + }; + })(this)); + if (this.gObject && (this.gObject.getMap() || this.gManager.type !== MarkerManager.type)) { + this.deferred.resolve(this.gObject); + } else { + if (!this.gObject) { + return this.deferred.reject('gObject is null'); + } + if (!(((ref = this.gObject) != null ? ref.getMap() : void 0) && this.gManager.type === MarkerManager.type)) { + $log.debug('gObject has no map yet'); + this.deferred.resolve(this.gObject); + } + } + if (this.model[this.fitKey]) { + return this.gManager.fit(); + } + }; + + MarkerChildModel.prototype.setLabelOptions = function(opts) { + if (opts.labelAnchor) { + opts.labelAnchor = this.getLabelPositionPoint(opts.labelAnchor); + } + return opts; + }; + + MarkerChildModel.prototype.internalEvents = function() { + return { + dragend: (function(_this) { + return function(marker, eventName, model, mousearg) { + var events, modelToSet, newCoords; + modelToSet = _this.trackModel ? _this.scope.model : _this.model; + newCoords = _this.setCoordsFromEvent(_this.modelOrKey(modelToSet, _this.coordsKey), _this.gObject.getPosition()); + modelToSet = _this.setVal(model, _this.coordsKey, newCoords); + events = _this.scope.events; + if ((events != null ? events.dragend : void 0) != null) { + events.dragend(marker, eventName, modelToSet, mousearg); + } + return _this.scope.$apply(); + }; + })(this), + click: (function(_this) { + return function(marker, eventName, model, mousearg) { + var click; + click = _this.getProp('click', _this.scope, _this.model); + if (_this.doClick && angular.isFunction(click)) { + return _this.scope.$evalAsync(click(marker, eventName, _this.model, mousearg)); + } + }; + })(this) + }; + }; + + return MarkerChildModel; + + })(ModelKey); + return MarkerChildModel; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygonChildModel', [ + 'uiGmapBasePolyChildModel', 'uiGmapPolygonOptionsBuilder', function(BaseGen, Builder) { + var PolygonChildModel, base, gFactory; + gFactory = function(opts) { + return new google.maps.Polygon(opts); + }; + base = new BaseGen(Builder, gFactory); + return PolygonChildModel = (function(superClass) { + extend(PolygonChildModel, superClass); + + function PolygonChildModel() { + return PolygonChildModel.__super__.constructor.apply(this, arguments); + } + + return PolygonChildModel; + + })(base); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylineChildModel', [ + 'uiGmapBasePolyChildModel', 'uiGmapPolylineOptionsBuilder', function(BaseGen, Builder) { + var PolylineChildModel, base, gFactory; + gFactory = function(opts) { + return new google.maps.Polyline(opts); + }; + base = BaseGen(Builder, gFactory); + return PolylineChildModel = (function(superClass) { + extend(PolylineChildModel, superClass); + + function PolylineChildModel() { + return PolylineChildModel.__super__.constructor.apply(this, arguments); + } + + return PolylineChildModel; + + })(base); + } + ]); + +}).call(this); +; +/*global _:true,angular:true,google:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapWindowChildModel', [ + 'uiGmapBaseObject', 'uiGmapGmapUtil', 'uiGmapLogger', '$compile', '$http', '$templateCache', 'uiGmapChromeFixes', 'uiGmapEventsHelper', function(BaseObject, GmapUtil, $log, $compile, $http, $templateCache, ChromeFixes, EventsHelper) { + var WindowChildModel; + WindowChildModel = (function(superClass) { + extend(WindowChildModel, superClass); + + WindowChildModel.include(GmapUtil); + + WindowChildModel.include(EventsHelper); + + function WindowChildModel(opts) { + this.updateModel = bind(this.updateModel, this); + this.destroy = bind(this.destroy, this); + this.remove = bind(this.remove, this); + this.getLatestPosition = bind(this.getLatestPosition, this); + this.hideWindow = bind(this.hideWindow, this); + this.showWindow = bind(this.showWindow, this); + this.handleClick = bind(this.handleClick, this); + this.watchOptions = bind(this.watchOptions, this); + this.watchCoords = bind(this.watchCoords, this); + this.createGWin = bind(this.createGWin, this); + this.watchElement = bind(this.watchElement, this); + this.watchAndDoShow = bind(this.watchAndDoShow, this); + this.doShow = bind(this.doShow, this); + var maybeMarker, ref, ref1, ref2, ref3; + this.model = (ref = opts.model) != null ? ref : {}, this.scope = opts.scope, this.opts = opts.opts, this.isIconVisibleOnClick = opts.isIconVisibleOnClick, this.gMap = opts.gMap, this.markerScope = opts.markerScope, this.element = opts.element, this.needToManualDestroy = (ref1 = opts.needToManualDestroy) != null ? ref1 : false, this.markerIsVisibleAfterWindowClose = (ref2 = opts.markerIsVisibleAfterWindowClose) != null ? ref2 : true, this.isScopeModel = (ref3 = opts.isScopeModel) != null ? ref3 : false; + if (this.isScopeModel) { + this.clonedModel = _.clone(this.model, true); + } + this.getGmarker = function() { + var ref4, ref5; + if (((ref4 = this.markerScope) != null ? ref4['getGMarker'] : void 0) != null) { + return (ref5 = this.markerScope) != null ? ref5.getGMarker() : void 0; + } + }; + this.listeners = []; + this.createGWin(); + maybeMarker = this.getGmarker(); + if (maybeMarker != null) { + maybeMarker.setClickable(true); + } + this.watchElement(); + this.watchOptions(); + this.watchCoords(); + this.watchAndDoShow(); + this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.destroy(); + }; + })(this)); + $log.info(this); + } + + WindowChildModel.prototype.doShow = function(wasOpen) { + if (this.scope.show === true || wasOpen) { + return this.showWindow(); + } else { + return this.hideWindow(); + } + }; + + WindowChildModel.prototype.watchAndDoShow = function() { + if (this.model.show != null) { + this.scope.show = this.model.show; + } + this.scope.$watch('show', this.doShow, true); + return this.doShow(); + }; + + WindowChildModel.prototype.watchElement = function() { + return this.scope.$watch((function(_this) { + return function() { + var ref, wasOpen; + if (!(_this.element || _this.html)) { + return; + } + if (_this.html !== _this.element.html() && _this.gObject) { + if ((ref = _this.opts) != null) { + ref.content = void 0; + } + wasOpen = _this.gObject.isOpen(); + _this.remove(); + return _this.createGWin(wasOpen); + } + }; + })(this)); + }; + + WindowChildModel.prototype.createGWin = function(isOpen) { + var _opts, defaults, maybeMarker, ref, ref1; + if (isOpen == null) { + isOpen = false; + } + maybeMarker = this.getGmarker(); + defaults = {}; + if (this.opts != null) { + if (this.scope.coords) { + this.opts.position = this.getCoords(this.scope.coords); + } + defaults = this.opts; + } + if (this.element) { + this.html = _.isObject(this.element) ? this.element.html() : this.element; + } + _opts = this.scope.options ? this.scope.options : defaults; + this.opts = this.createWindowOptions(maybeMarker, this.markerScope || this.scope, this.html, _opts); + if (this.opts != null) { + if (!this.gObject) { + if (this.opts.boxClass && (window.InfoBox && typeof window.InfoBox === 'function')) { + this.gObject = new window.InfoBox(this.opts); + } else { + this.gObject = new google.maps.InfoWindow(this.opts); + } + this.listeners.push(google.maps.event.addListener(this.gObject, 'domready', function() { + return ChromeFixes.maybeRepaint(this.content); + })); + this.listeners.push(google.maps.event.addListener(this.gObject, 'closeclick', (function(_this) { + return function() { + if (maybeMarker) { + maybeMarker.setAnimation(_this.oldMarkerAnimation); + if (_this.markerIsVisibleAfterWindowClose) { + _.delay(function() { + maybeMarker.setVisible(false); + return maybeMarker.setVisible(_this.markerIsVisibleAfterWindowClose); + }, 250); + } + } + _this.gObject.close(); + _this.model.show = false; + if (_this.scope.closeClick != null) { + return _this.scope.$evalAsync(_this.scope.closeClick()); + } else { + return _this.scope.$evalAsync(); + } + }; + })(this))); + } + this.gObject.setContent(this.opts.content); + this.handleClick(((ref = this.scope) != null ? (ref1 = ref.options) != null ? ref1.forceClick : void 0 : void 0) || isOpen); + return this.doShow(this.gObject.isOpen()); + } + }; + + WindowChildModel.prototype.watchCoords = function() { + var scope; + scope = this.markerScope != null ? this.markerScope : this.scope; + return scope.$watch('coords', (function(_this) { + return function(newValue, oldValue) { + var pos; + if (newValue !== oldValue) { + if (newValue == null) { + _this.hideWindow(); + } else if (!_this.validateCoords(newValue)) { + $log.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: " + (JSON.stringify(_this.model))); + return; + } + pos = _this.getCoords(newValue); + _this.doShow(); + _this.gObject.setPosition(pos); + if (_this.opts) { + return _this.opts.position = pos; + } + } + }; + })(this), true); + }; + + WindowChildModel.prototype.watchOptions = function() { + return this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.opts = newValue; + if (_this.gObject != null) { + _this.gObject.setOptions(_this.opts); + if ((_this.opts.visible != null) && _this.opts.visible) { + return _this.showWindow(); + } else if (_this.opts.visible != null) { + return _this.hideWindow(); + } + } + } + }; + })(this), true); + }; + + WindowChildModel.prototype.handleClick = function(forceClick) { + var click, maybeMarker; + if (this.gObject == null) { + return; + } + maybeMarker = this.getGmarker(); + click = (function(_this) { + return function() { + if (_this.gObject == null) { + _this.createGWin(); + } + _this.showWindow(); + if (maybeMarker != null) { + _this.initialMarkerVisibility = maybeMarker.getVisible(); + _this.oldMarkerAnimation = maybeMarker.getAnimation(); + return maybeMarker.setVisible(_this.isIconVisibleOnClick); + } + }; + })(this); + if (forceClick) { + click(); + } + if (maybeMarker) { + return this.listeners = this.listeners.concat(this.setEvents(maybeMarker, { + events: { + click: click + } + }, this.model)); + } + }; + + WindowChildModel.prototype.showWindow = function() { + var compiled, show, templateScope; + if (this.gObject == null) { + return; + } + templateScope = null; + show = (function(_this) { + return function() { + var isOpen, maybeMarker, pos; + if (!_this.gObject.isOpen()) { + maybeMarker = _this.getGmarker(); + if ((_this.gObject != null) && (_this.gObject.getPosition != null)) { + pos = _this.gObject.getPosition(); + } + if (maybeMarker) { + pos = maybeMarker.getPosition(); + } + if (!pos) { + return; + } + _this.gObject.open(_this.gMap, maybeMarker); + isOpen = _this.gObject.isOpen(); + if (_this.model.show !== isOpen) { + return _this.model.show = isOpen; + } + } + }; + })(this); + if (this.scope.templateUrl) { + $http.get(this.scope.templateUrl, { + cache: $templateCache + }).then((function(_this) { + return function(content) { + var compiled; + templateScope = _this.scope.$new(); + if (angular.isDefined(_this.scope.templateParameter)) { + templateScope.parameter = _this.scope.templateParameter; + } + compiled = $compile(content.data)(templateScope); + _this.gObject.setContent(compiled[0]); + return show(); + }; + })(this)); + } else if (this.scope.template) { + templateScope = this.scope.$new(); + if (angular.isDefined(this.scope.templateParameter)) { + templateScope.parameter = this.scope.templateParameter; + } + compiled = $compile(this.scope.template)(templateScope); + this.gObject.setContent(compiled[0]); + show(); + } else { + show(); + } + return this.scope.$on('destroy', function() { + return templateScope.$destroy(); + }); + }; + + WindowChildModel.prototype.hideWindow = function() { + if ((this.gObject != null) && this.gObject.isOpen()) { + return this.gObject.close(); + } + }; + + WindowChildModel.prototype.getLatestPosition = function(overridePos) { + var maybeMarker; + maybeMarker = this.getGmarker(); + if ((this.gObject != null) && (maybeMarker != null) && !overridePos) { + return this.gObject.setPosition(maybeMarker.getPosition()); + } else { + if (overridePos) { + return this.gObject.setPosition(overridePos); + } + } + }; + + WindowChildModel.prototype.remove = function() { + this.hideWindow(); + this.removeEvents(this.listeners); + this.listeners.length = 0; + delete this.gObject; + return delete this.opts; + }; + + WindowChildModel.prototype.destroy = function(manualOverride) { + var ref; + if (manualOverride == null) { + manualOverride = false; + } + this.remove(); + if (((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0)) && (this.needToManualDestroy || manualOverride)) { + return this.scope.$destroy(); + } + }; + + WindowChildModel.prototype.updateModel = function(model) { + if (this.isScopeModel) { + this.clonedModel = _.clone(model, true); + } + return _.extend(this.model, this.clonedModel || model); + }; + + return WindowChildModel; + + })(BaseObject); + return WindowChildModel; + } + ]); + +}).call(this); +; +/*global _, angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapBasePolysParentModel', [ + '$timeout', 'uiGmapLogger', 'uiGmapModelKey', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmap_async', 'uiGmapPromise', 'uiGmapFitHelper', function($timeout, $log, ModelKey, ModelsWatcher, PropMap, _async, uiGmapPromise, FitHelper) { + return function(IPoly, PolyChildModel, gObjectName) { + var BasePolysParentModel; + return BasePolysParentModel = (function(superClass) { + extend(BasePolysParentModel, superClass); + + BasePolysParentModel.include(ModelsWatcher); + + function BasePolysParentModel(scope, element, attrs, gMap1, defaults) { + this.element = element; + this.attrs = attrs; + this.gMap = gMap1; + this.defaults = defaults; + this.maybeFit = bind(this.maybeFit, this); + this.createChild = bind(this.createChild, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.createAllNew = bind(this.createAllNew, this); + this.watchIdKey = bind(this.watchIdKey, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.watchDestroy = bind(this.watchDestroy, this); + this.onDestroy = bind(this.onDestroy, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.doINeedToWipe = bind(this.doINeedToWipe, this); + this.watchModels = bind(this.watchModels, this); + BasePolysParentModel.__super__.constructor.call(this, scope); + this["interface"] = IPoly; + this.$log = $log; + this.plurals = new PropMap(); + _.each(IPoly.scopeKeys, (function(_this) { + return function(name) { + return _this[name + 'Key'] = void 0; + }; + })(this)); + this.models = void 0; + this.firstTime = true; + this.$log.info(this); + this.createChildScopes(); + } + + BasePolysParentModel.prototype.watchModels = function(scope) { + + /* + This was watchCollection but not all model changes were being caught. + TODO: Make the directive flexible in overriding whether we watch models (and depth) via watch or watchColleciton. + */ + return scope.$watch('models', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + if (_this.doINeedToWipe(newValue) || scope.doRebuildAll) { + return _this.rebuildAll(scope, true, true); + } else { + return _this.createChildScopes(false); + } + } + }; + })(this), true); + }; + + BasePolysParentModel.prototype.doINeedToWipe = function(newValue) { + var newValueIsEmpty; + newValueIsEmpty = newValue != null ? newValue.length === 0 : true; + return this.plurals.length > 0 && newValueIsEmpty; + }; + + BasePolysParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { + return this.onDestroy(doDelete).then((function(_this) { + return function() { + if (doCreate) { + return _this.createChildScopes(); + } + }; + })(this)); + }; + + BasePolysParentModel.prototype.onDestroy = function() { + BasePolysParentModel.__super__.onDestroy.call(this, this.scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.plurals.values(), function(child) { + return child.destroy(true); + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + var ref; + return (ref = _this.plurals) != null ? ref.removeAll() : void 0; + }); + }; + })(this)); + }; + + BasePolysParentModel.prototype.watchDestroy = function(scope) { + return scope.$on('$destroy', (function(_this) { + return function() { + return _this.rebuildAll(scope, false, true); + }; + })(this)); + }; + + BasePolysParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + if (isCreatingFromScratch == null) { + isCreatingFromScratch = true; + } + if (angular.isUndefined(this.scope.models)) { + this.$log.error("No models to create " + gObjectName + "s from! I Need direct models!"); + return; + } + if ((this.gMap == null) || (this.scope.models == null)) { + return; + } + this.watchIdKey(this.scope); + if (isCreatingFromScratch) { + return this.createAllNew(this.scope, false); + } else { + return this.pieceMeal(this.scope, false); + } + }; + + BasePolysParentModel.prototype.watchIdKey = function(scope) { + this.setIdKey(scope); + return scope.$watch('idKey', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && (newValue == null)) { + _this.idKey = newValue; + return _this.rebuildAll(scope, true, true); + } + }; + })(this)); + }; + + BasePolysParentModel.prototype.createAllNew = function(scope, isArray) { + var maybeCanceled; + if (isArray == null) { + isArray = false; + } + this.models = scope.models; + if (this.firstTime) { + this.watchModels(scope); + this.watchDestroy(scope); + } + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.map(scope.models, function(model) { + var child; + child = _this.createChild(model, _this.gMap); + if (maybeCanceled) { + $log.debug('createNew should fall through safely'); + child.isEnabled = false; + } + maybeCanceled; + return child.pathPoints.getArray(); + }, _async.chunkSizeFrom(scope.chunk)).then(function(pathPoints) { + _this.maybeFit(pathPoints); + return _this.firstTime = false; + }); + }; + })(this)); + }; + + BasePolysParentModel.prototype.pieceMeal = function(scope, isArray) { + var maybeCanceled, payload; + if (isArray == null) { + isArray = true; + } + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + this.models = scope.models; + if ((scope != null) && this.modelsLength() && this.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise(function() { + return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison); + }).then(function(state) { + payload = state; + if (payload.updates.length) { + _async.each(payload.updates, function(obj) { + _.extend(obj.child.scope, obj.model); + return obj.child.model = obj.model; + }); + } + return _async.each(payload.removals, function(child) { + if (child != null) { + child.destroy(); + _this.plurals.remove(child.model[_this.idKey]); + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + if (maybeCanceled) { + $log.debug('pieceMeal should fall through safely'); + } + _this.createChild(modelToAdd, _this.gMap); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + return _this.maybeFit(); + }); + }); + }; + })(this)); + } else { + this.inProgress = false; + return this.rebuildAll(this.scope, true, true); + } + }; + + BasePolysParentModel.prototype.createChild = function(model, gMap) { + var child, childScope; + childScope = this.scope.$new(false); + this.setChildScope(IPoly.scopeKeys, childScope, model); + childScope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.setChildScope(childScope, newValue); + } + }; + })(this), true); + childScope["static"] = this.scope["static"]; + child = new PolyChildModel({ + isScopeModel: true, + scope: childScope, + attrs: this.attrs, + gMap: gMap, + defaults: this.defaults, + model: model, + gObjectChangeCb: (function(_this) { + return function() { + return _this.maybeFit(); + }; + })(this) + }); + if (model[this.idKey] == null) { + this.$log.error(gObjectName + " model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."); + return; + } + this.plurals.put(model[this.idKey], child); + return child; + }; + + BasePolysParentModel.prototype.maybeFit = function(pathPoints) { + if (pathPoints == null) { + pathPoints = this.plurals.map(function(p) { + return p.pathPoints; + }); + } + if (this.scope.fit) { + pathPoints = _.flatten(pathPoints); + return FitHelper.fit(pathPoints, this.gMap); + } + }; + + return BasePolysParentModel; + + })(ModelKey); + }; + } + ]); + +}).call(this); +; +/*globals angular, _, google */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapCircleParentModel', [ + 'uiGmapLogger', '$timeout', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapCircleOptionsBuilder', function($log, $timeout, GmapUtil, EventsHelper, Builder) { + var CircleParentModel, _settingFromDirective; + _settingFromDirective = function(scope, fn) { + scope.settingFromDirective = true; + fn(); + return $timeout(function() { + return scope.settingFromDirective = false; + }); + }; + return CircleParentModel = (function(superClass) { + extend(CircleParentModel, superClass); + + CircleParentModel.include(GmapUtil); + + CircleParentModel.include(EventsHelper); + + function CircleParentModel(scope, element, attrs, gMap, DEFAULTS) { + var clean, gObject, lastRadius; + this.attrs = attrs; + this.gMap = gMap; + this.DEFAULTS = DEFAULTS; + this.scope = scope; + lastRadius = null; + clean = (function(_this) { + return function() { + lastRadius = null; + if (_this.listeners != null) { + _this.removeEvents(_this.listeners); + return _this.listeners = void 0; + } + }; + })(this); + gObject = new google.maps.Circle(this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); + this.setMyOptions = (function(_this) { + return function(newVals, oldVals) { + if (scope.settingFromDirective) { + return; + } + if (!(_.isEqual(newVals, oldVals) && newVals === oldVals && ((newVals != null) && (oldVals != null) ? newVals.coordinates === oldVals.coordinates : true))) { + return gObject.setOptions(_this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); + } + }; + })(this); + this.props = this.props.concat([ + { + prop: 'center', + isColl: true + }, { + prop: 'fill', + isColl: true + }, 'radius', 'zIndex' + ]); + this.watchProps(); + if (this.scope.control != null) { + this.scope.control.getCircle = function() { + return gObject; + }; + } + clean(); + this.listeners = this.setEvents(gObject, scope, scope, ['radius_changed']) || []; + this.listeners.push(google.maps.event.addListener(gObject, 'radius_changed', function() { + + /* + possible google bug, and or because a circle has two radii + radius_changed appears to fire twice (original and new) which is not too helpful + therefore we will check for radius changes manually and bail out if nothing has changed + */ + var newRadius, work; + newRadius = gObject.getRadius(); + if (newRadius === lastRadius) { + return; + } + lastRadius = newRadius; + work = function() { + return _settingFromDirective(scope, function() { + var ref, ref1; + if (newRadius !== scope.radius) { + scope.radius = newRadius; + } + if (((ref = scope.events) != null ? ref.radius_changed : void 0) && _.isFunction((ref1 = scope.events) != null ? ref1.radius_changed : void 0)) { + return scope.events.radius_changed(gObject, 'radius_changed', scope, arguments); + } + }); + }; + if (!angular.mock) { + return scope.$evalAsync(function() { + return work(); + }); + } else { + return work(); + } + })); + this.listeners.push(google.maps.event.addListener(gObject, 'center_changed', function() { + return scope.$evalAsync(function() { + return _settingFromDirective(scope, function() { + if (angular.isDefined(scope.center.type)) { + scope.center.coordinates[1] = gObject.getCenter().lat(); + return scope.center.coordinates[0] = gObject.getCenter().lng(); + } else { + scope.center.latitude = gObject.getCenter().lat(); + return scope.center.longitude = gObject.getCenter().lng(); + } + }); + }); + })); + scope.$on('$destroy', function() { + clean(); + return gObject.setMap(null); + }); + $log.info(this); + } + + return CircleParentModel; + + })(Builder); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapDrawingManagerParentModel', [ + 'uiGmapLogger', '$timeout', 'uiGmapBaseObject', 'uiGmapEventsHelper', function($log, $timeout, BaseObject, EventsHelper) { + var DrawingManagerParentModel; + return DrawingManagerParentModel = (function(superClass) { + extend(DrawingManagerParentModel, superClass); + + DrawingManagerParentModel.include(EventsHelper); + + function DrawingManagerParentModel(scope, element, attrs, map) { + var gObject, listeners; + this.scope = scope; + this.attrs = attrs; + this.map = map; + gObject = new google.maps.drawing.DrawingManager(this.scope.options); + gObject.setMap(this.map); + listeners = void 0; + if (this.scope.control != null) { + this.scope.control.getDrawingManager = function() { + return gObject; + }; + } + if (!this.scope["static"] && this.scope.options) { + this.scope.$watch('options', function(newValue) { + return gObject != null ? gObject.setOptions(newValue) : void 0; + }, true); + } + if (this.scope.events != null) { + listeners = this.setEvents(gObject, this.scope, this.scope); + this.scope.$watch('events', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + if (listeners != null) { + _this.removeEvents(listeners); + } + return listeners = _this.setEvents(gObject, _this.scope, _this.scope); + } + }; + })(this)); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + if (listeners != null) { + _this.removeEvents(listeners); + } + gObject.setMap(null); + return gObject = null; + }; + })(this)); + } + + return DrawingManagerParentModel; + + })(BaseObject); + } + ]); + +}).call(this); +; +/* + - interface for all markers to derrive from + - to enforce a minimum set of requirements + - attributes + - coords + - icon + - implementation needed on watches + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel", [ + "uiGmapModelKey", "uiGmapLogger", function(ModelKey, Logger) { + var IMarkerParentModel; + IMarkerParentModel = (function(superClass) { + extend(IMarkerParentModel, superClass); + + IMarkerParentModel.prototype.DEFAULTS = {}; + + function IMarkerParentModel(scope1, element, attrs, map) { + this.scope = scope1; + this.element = element; + this.attrs = attrs; + this.map = map; + this.onWatch = bind(this.onWatch, this); + this.watch = bind(this.watch, this); + this.validateScope = bind(this.validateScope, this); + IMarkerParentModel.__super__.constructor.call(this, this.scope); + this.$log = Logger; + if (!this.validateScope(this.scope)) { + throw new String("Unable to construct IMarkerParentModel due to invalid scope"); + } + this.doClick = angular.isDefined(this.attrs.click); + if (this.scope.options != null) { + this.DEFAULTS = this.scope.options; + } + this.watch('coords', this.scope); + this.watch('icon', this.scope); + this.watch('options', this.scope); + this.scope.$on("$destroy", (function(_this) { + return function() { + return _this.onDestroy(_this.scope); + }; + })(this)); + } + + IMarkerParentModel.prototype.validateScope = function(scope) { + var ret; + if (scope == null) { + this.$log.error(this.constructor.name + ": invalid scope used"); + return false; + } + ret = scope.coords != null; + if (!ret) { + this.$log.error(this.constructor.name + ": no valid coords attribute found"); + return false; + } + return ret; + }; + + IMarkerParentModel.prototype.watch = function(propNameToWatch, scope, equalityCheck) { + if (equalityCheck == null) { + equalityCheck = true; + } + return scope.$watch(propNameToWatch, (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + return _this.onWatch(propNameToWatch, scope, newValue, oldValue); + } + }; + })(this), equalityCheck); + }; + + IMarkerParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) {}; + + return IMarkerParentModel; + + })(ModelKey); + return IMarkerParentModel; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel", [ + "uiGmapModelKey", "uiGmapGmapUtil", "uiGmapLogger", function(ModelKey, GmapUtil, Logger) { + var IWindowParentModel; + return IWindowParentModel = (function(superClass) { + extend(IWindowParentModel, superClass); + + IWindowParentModel.include(GmapUtil); + + function IWindowParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache) { + IWindowParentModel.__super__.constructor.call(this, scope); + this.$log = Logger; + this.$timeout = $timeout; + this.$compile = $compile; + this.$http = $http; + this.$templateCache = $templateCache; + this.DEFAULTS = {}; + if (scope.options != null) { + this.DEFAULTS = scope.options; + } + } + + IWindowParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) { + if (modelsPropToIterate === 'models') { + return scope[modelsPropToIterate][index]; + } + return scope[modelsPropToIterate].get(index); + }; + + return IWindowParentModel; + + })(ModelKey); + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapLayerParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', '$timeout', function(BaseObject, Logger, $timeout) { + var LayerParentModel; + LayerParentModel = (function(superClass) { + extend(LayerParentModel, superClass); + + function LayerParentModel(scope, element, attrs, gMap, onLayerCreated, $log) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.onLayerCreated = onLayerCreated != null ? onLayerCreated : void 0; + this.$log = $log != null ? $log : Logger; + this.createGoogleLayer = bind(this.createGoogleLayer, this); + if (this.attrs.type == null) { + this.$log.info('type attribute for the layer directive is mandatory. Layer creation aborted!!'); + return; + } + this.createGoogleLayer(); + this.doShow = true; + if (angular.isDefined(this.attrs.show)) { + this.doShow = this.scope.show; + } + if (this.doShow && (this.gMap != null)) { + this.gObject.setMap(this.gMap); + } + this.scope.$watch('show', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.doShow = newValue; + if (newValue) { + return _this.gObject.setMap(_this.gMap); + } else { + return _this.gObject.setMap(null); + } + } + }; + })(this), true); + this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && _this.doShow) { + return _this.gObject.setOptions(newValue); + } + }; + })(this), true); + this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.gObject.setMap(null); + }; + })(this)); + } + + LayerParentModel.prototype.createGoogleLayer = function() { + var base; + if (this.attrs.options == null) { + this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type]() : new google.maps[this.attrs.namespace][this.attrs.type](); + } else { + this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options); + } + if ((this.gObject != null) && this.doShow) { + this.gObject.setMap(this.gMap); + } + if ((this.gObject != null) && (this.onLayerCreated != null)) { + return typeof (base = this.onLayerCreated(this.scope, this.gObject)) === "function" ? base(this.gObject) : void 0; + } + }; + + return LayerParentModel; + + })(BaseObject); + return LayerParentModel; + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapMapTypeParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', function(BaseObject, Logger) { + var MapTypeParentModel; + MapTypeParentModel = (function(superClass) { + extend(MapTypeParentModel, superClass); + + function MapTypeParentModel(scope, element, attrs, gMap, $log) { + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.$log = $log != null ? $log : Logger; + this.hideOverlay = bind(this.hideOverlay, this); + this.showOverlay = bind(this.showOverlay, this); + this.refreshMapType = bind(this.refreshMapType, this); + this.createMapType = bind(this.createMapType, this); + if (this.attrs.options == null) { + this.$log.info('options attribute for the map-type directive is mandatory. Map type creation aborted!!'); + return; + } + this.id = this.gMap.overlayMapTypesCount = this.gMap.overlayMapTypesCount + 1 || 0; + this.doShow = true; + this.createMapType(); + if (angular.isDefined(this.attrs.show)) { + this.doShow = this.scope.show; + } + if (this.doShow && (this.gMap != null)) { + this.showOverlay(); + } + this.scope.$watch('show', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + _this.doShow = newValue; + if (newValue) { + return _this.showOverlay(); + } else { + return _this.hideOverlay(); + } + } + }; + })(this), true); + this.scope.$watchCollection('options', (function(_this) { + return function(newValue, oldValue) { + var different, mapTypeProps; + if (!_.isEqual(newValue, oldValue)) { + mapTypeProps = ['tileSize', 'maxZoom', 'minZoom', 'name', 'alt']; + different = _.some(mapTypeProps, function(prop) { + return !oldValue || !newValue || !_.isEqual(newValue[prop], oldValue[prop]); + }); + if (different) { + return _this.refreshMapType(); + } + } + }; + })(this)); + if (angular.isDefined(this.attrs.refresh)) { + this.scope.$watch('refresh', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + return _this.refreshMapType(); + } + }; + })(this), true); + } + this.scope.$on('$destroy', (function(_this) { + return function() { + _this.hideOverlay(); + return _this.mapType = null; + }; + })(this)); + } + + MapTypeParentModel.prototype.createMapType = function() { + if (this.scope.options.getTile != null) { + this.mapType = this.scope.options; + } else if (this.scope.options.getTileUrl != null) { + this.mapType = new google.maps.ImageMapType(this.scope.options); + } else { + this.$log.info('options should provide either getTile or getTileUrl methods. Map type creation aborted!!'); + return; + } + if (this.attrs.id && this.scope.id) { + this.gMap.mapTypes.set(this.scope.id, this.mapType); + if (!angular.isDefined(this.attrs.show)) { + this.doShow = false; + } + } + return this.mapType.layerId = this.id; + }; + + MapTypeParentModel.prototype.refreshMapType = function() { + this.hideOverlay(); + this.mapType = null; + this.createMapType(); + if (this.doShow && (this.gMap != null)) { + return this.showOverlay(); + } + }; + + MapTypeParentModel.prototype.showOverlay = function() { + return this.gMap.overlayMapTypes.push(this.mapType); + }; + + MapTypeParentModel.prototype.hideOverlay = function() { + var found; + found = false; + return this.gMap.overlayMapTypes.forEach((function(_this) { + return function(mapType, index) { + if (!found && mapType.layerId === _this.id) { + found = true; + _this.gMap.overlayMapTypes.removeAt(index); + } + }; + })(this)); + }; + + return MapTypeParentModel; + + })(BaseObject); + return MapTypeParentModel; + } + ]); + +}).call(this); +; +/*global _:true,angular:true, */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel", [ + "uiGmapIMarkerParentModel", "uiGmapModelsWatcher", "uiGmapPropMap", "uiGmapMarkerChildModel", "uiGmap_async", "uiGmapClustererMarkerManager", "uiGmapMarkerManager", "$timeout", "uiGmapIMarker", "uiGmapPromise", "uiGmapGmapUtil", "uiGmapLogger", "uiGmapSpiderfierMarkerManager", function(IMarkerParentModel, ModelsWatcher, PropMap, MarkerChildModel, _async, ClustererMarkerManager, MarkerManager, $timeout, IMarker, uiGmapPromise, GmapUtil, $log, SpiderfierMarkerManager) { + var MarkersParentModel, _setPlurals; + _setPlurals = function(val, objToSet) { + objToSet.plurals = new PropMap(); + objToSet.scope.plurals = objToSet.plurals; + return objToSet; + }; + MarkersParentModel = (function(superClass) { + extend(MarkersParentModel, superClass); + + MarkersParentModel.include(GmapUtil); + + MarkersParentModel.include(ModelsWatcher); + + function MarkersParentModel(scope, element, attrs, map) { + this.maybeExecMappedEvent = bind(this.maybeExecMappedEvent, this); + this.onDestroy = bind(this.onDestroy, this); + this.newChildMarker = bind(this.newChildMarker, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.createAllNew = bind(this.createAllNew, this); + this.bindToTypeEvents = bind(this.bindToTypeEvents, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.validateScope = bind(this.validateScope, this); + this.onWatch = bind(this.onWatch, this); + MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map); + this["interface"] = IMarker; + _setPlurals(new PropMap(), this); + this.scope.pluralsUpdate = { + updateCtr: 0 + }; + this.$log.info(this); + this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; + this.setIdKey(this.scope); + this.scope.$watch('doRebuildAll', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.doRebuildAll = newValue; + } + }; + })(this)); + if (!this.modelsLength()) { + this.modelsRendered = false; + } + this.scope.$watch('models', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue) || !_this.modelsRendered) { + if (newValue.length === 0 && oldValue.length === 0) { + return; + } + _this.modelsRendered = true; + return _this.onWatch('models', _this.scope, newValue, oldValue); + } + }; + })(this), !this.isTrue(attrs.modelsbyref)); + this.watch('doCluster', this.scope); + this.watch('type', this.scope); + this.watch('clusterOptions', this.scope); + this.watch('clusterEvents', this.scope); + this.watch('typeOptions', this.scope); + this.watch('typeEvents', this.scope); + this.watch('fit', this.scope); + this.watch('idKey', this.scope); + this.gManager = void 0; + this.createAllNew(this.scope); + } + + MarkersParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) { + if (propNameToWatch === "idKey" && newValue !== oldValue) { + this.idKey = newValue; + } + if (this.doRebuildAll || (propNameToWatch === 'doCluster' || propNameToWatch === 'type')) { + return this.rebuildAll(scope); + } else { + return this.pieceMeal(scope); + } + }; + + MarkersParentModel.prototype.validateScope = function(scope) { + var modelsNotDefined; + modelsNotDefined = angular.isUndefined(scope.models) || scope.models === void 0; + if (modelsNotDefined) { + this.$log.error(this.constructor.name + ": no valid models attribute found"); + } + return MarkersParentModel.__super__.validateScope.call(this, scope) || modelsNotDefined; + }; + + + /* + Not used internally by this parent + created for consistency for external control in the API + */ + + MarkersParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + if ((this.gMap == null) || (this.scope.models == null)) { + return; + } + if (isCreatingFromScratch) { + return this.createAllNew(this.scope, false); + } else { + return this.pieceMeal(this.scope, false); + } + }; + + MarkersParentModel.prototype.bindToTypeEvents = function(typeEvents, events) { + var internalHandles, self; + if (events == null) { + events = ['click', 'mouseout', 'mouseover']; + } + + /* + You should only be binding to events that produce groups/clusters of somthing. + Otherwise use the orginal event handle. + For Example: Click on a cluster pushes a cluster/group obj through which has getMarkers + However Spiderfy's click is for a single marker so this is not ideal for that. + */ + self = this; + if (!this.origTypeEvents) { + this.origTypeEvents = {}; + _.each(events, (function(_this) { + return function(eventName) { + return _this.origTypeEvents[eventName] = typeEvents != null ? typeEvents[eventName] : void 0; + }; + })(this)); + } else { + angular.extend(typeEvents, this.origTypeEvents); + } + internalHandles = {}; + _.each(events, function(eventName) { + return internalHandles[eventName] = function(group) { + return self.maybeExecMappedEvent(group, eventName); + }; + }); + return angular.extend(typeEvents, internalHandles); + }; + + MarkersParentModel.prototype.createAllNew = function(scope) { + var isSpiderfied, maybeCanceled, typeEvents, typeOptions; + if (this.gManager != null) { + if (this.gManager instanceof SpiderfierMarkerManager) { + isSpiderfied = this.gManager.isSpiderfied(); + } + this.gManager.clear(); + delete this.gManager; + } + typeEvents = scope.typeEvents || scope.clusterEvents; + typeOptions = scope.typeOptions || scope.clusterOptions; + if (scope.doCluster || scope.type === 'cluster') { + if (typeEvents != null) { + this.bindToTypeEvents(typeEvents); + } + this.gManager = new ClustererMarkerManager(this.map, void 0, typeOptions, typeEvents); + } else if (scope.type === 'spider') { + if (typeEvents != null) { + this.bindToTypeEvents(typeEvents, ['spiderfy', 'unspiderfy']); + } + this.gManager = new SpiderfierMarkerManager(this.map, void 0, typeOptions, typeEvents, this.scope); + if (isSpiderfied) { + this.gManager.spiderfy(); + } + } else { + this.gManager = new MarkerManager(this.map); + } + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.each(scope.models, function(model) { + _this.newChildMarker(model, scope); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + _this.modelsRendered = true; + if (scope.fit) { + _this.gManager.fit(); + } + _this.gManager.draw(); + return _this.scope.pluralsUpdate.updateCtr += 1; + }, _async.chunkSizeFrom(scope.chunk)); + }; + })(this)); + }; + + MarkersParentModel.prototype.rebuildAll = function(scope) { + var ref; + if (!scope.doRebuild && scope.doRebuild !== void 0) { + return; + } + if ((ref = this.scope.plurals) != null ? ref.length : void 0) { + return this.onDestroy(scope).then((function(_this) { + return function() { + return _this.createAllNew(scope); + }; + })(this)); + } else { + return this.createAllNew(scope); + } + }; + + MarkersParentModel.prototype.pieceMeal = function(scope) { + var maybeCanceled, payload; + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + if (this.modelsLength() && this.scope.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise((function() { + return _this.figureOutState(_this.idKey, scope, _this.scope.plurals, _this.modelKeyComparison); + })).then(function(state) { + payload = state; + return _async.each(payload.removals, function(child) { + if (child != null) { + if (child.destroy != null) { + child.destroy(); + } + _this.scope.plurals.remove(child.id); + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + _this.newChildMarker(modelToAdd, scope); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.updates, function(update) { + _this.updateChild(update.child, update.model); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + if (payload.adds.length > 0 || payload.removals.length > 0 || payload.updates.length > 0) { + scope.plurals = _this.scope.plurals; + if (scope.fit) { + _this.gManager.fit(); + } + _this.gManager.draw(); + } + return _this.scope.pluralsUpdate.updateCtr += 1; + }); + }; + })(this)); + } else { + this.inProgress = false; + return this.rebuildAll(scope); + } + }; + + MarkersParentModel.prototype.newChildMarker = function(model, scope) { + var child, childScope, keys; + if (!model) { + throw 'model undefined'; + } + if (model[this.idKey] == null) { + this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); + return; + } + this.$log.info('child', child, 'markers', this.scope.markerModels); + childScope = scope.$new(false); + childScope.events = scope.events; + keys = {}; + IMarker.scopeKeys.forEach(function(k) { + return keys[k] = scope[k]; + }); + child = new MarkerChildModel({ + scope: childScope, + model: model, + keys: keys, + gMap: this.map, + defaults: this.DEFAULTS, + doClick: this.doClick, + gManager: this.gManager, + doDrawSelf: false, + isScopeModel: true + }); + this.scope.plurals.put(model[this.idKey], child); + return child; + }; + + MarkersParentModel.prototype.onDestroy = function(scope) { + MarkersParentModel.__super__.onDestroy.call(this, scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.scope.plurals.values(), function(model) { + if (model != null) { + return model.destroy(false); + } + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + if (_this.gManager != null) { + _this.gManager.destroy(); + } + _this.plurals.removeAll(); + if (_this.plurals !== _this.scope.plurals) { + console.error('plurals out of sync for MarkersParentModel'); + } + return _this.scope.pluralsUpdate.updateCtr += 1; + }); + }; + })(this)); + }; + + MarkersParentModel.prototype.maybeExecMappedEvent = function(group, fnName) { + var pair, typeEvents; + if (this.scope.$$destroyed) { + return; + } + typeEvents = this.scope.typeEvents || this.scope.clusterEvents; + if (_.isFunction(typeEvents != null ? typeEvents[fnName] : void 0)) { + pair = this.mapTypeToPlurals(group); + if (this.origTypeEvents[fnName]) { + return this.origTypeEvents[fnName](pair.group, pair.mapped); + } + } + }; + + MarkersParentModel.prototype.mapTypeToPlurals = function(group) { + var arrayToMap, mapped, ref; + if (_.isArray(group)) { + arrayToMap = group; + } else if (_.isFunction(group.getMarkers)) { + arrayToMap = group.getMarkers(); + } + if (arrayToMap == null) { + $log.error("Unable to map event as we cannot find the array group to map"); + return; + } + if ((ref = this.scope.plurals.values()) != null ? ref.length : void 0) { + mapped = arrayToMap.map((function(_this) { + return function(g) { + return _this.scope.plurals.get(g.key).model; + }; + })(this)); + } else { + mapped = []; + } + return { + cluster: group, + mapped: mapped, + group: group + }; + }; + + MarkersParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) { + if (modelsPropToIterate === 'models') { + return scope[modelsPropToIterate][index]; + } + return scope[modelsPropToIterate].get(index); + }; + + return MarkersParentModel; + + })(IMarkerParentModel); + return MarkersParentModel; + } + ]); + +}).call(this); +;(function() { + ['Polygon', 'Polyline'].forEach(function(name) { + return angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory("uiGmap" + name + "sParentModel", [ + 'uiGmapBasePolysParentModel', "uiGmap" + name + "ChildModel", "uiGmapI" + name, function(BasePolysParentModel, ChildModel, IPoly) { + return BasePolysParentModel(IPoly, ChildModel, name); + } + ]); + }); + +}).call(this); +; +/*globals angular, _, google */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapRectangleParentModel', [ + 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapRectangleOptionsBuilder', function($log, GmapUtil, EventsHelper, Builder) { + var RectangleParentModel; + return RectangleParentModel = (function(superClass) { + extend(RectangleParentModel, superClass); + + RectangleParentModel.include(GmapUtil); + + RectangleParentModel.include(EventsHelper); + + function RectangleParentModel(scope, element, attrs, gMap, DEFAULTS) { + var bounds, clear, createBounds, dragging, fit, gObject, init, listeners, myListeners, settingBoundsFromScope, updateBounds; + this.scope = scope; + this.attrs = attrs; + this.gMap = gMap; + this.DEFAULTS = DEFAULTS; + bounds = void 0; + dragging = false; + myListeners = []; + listeners = void 0; + fit = (function(_this) { + return function() { + if (_this.isTrue(_this.attrs.fit)) { + return _this.fitMapBounds(_this.gMap, bounds); + } + }; + })(this); + createBounds = (function(_this) { + return function() { + var ref, ref1, ref2; + if ((_this.scope.bounds != null) && (((ref = _this.scope.bounds) != null ? ref.sw : void 0) != null) && (((ref1 = _this.scope.bounds) != null ? ref1.ne : void 0) != null) && _this.validateBoundPoints(_this.scope.bounds)) { + bounds = _this.convertBoundPoints(_this.scope.bounds); + return $log.info("new new bounds created: " + (JSON.stringify(bounds))); + } else if ((_this.scope.bounds.getNorthEast != null) && (_this.scope.bounds.getSouthWest != null)) { + return bounds = _this.scope.bounds; + } else { + if (_this.scope.bounds != null) { + return $log.error("Invalid bounds for newValue: " + (JSON.stringify((ref2 = _this.scope) != null ? ref2.bounds : void 0))); + } + } + }; + })(this); + createBounds(); + gObject = new google.maps.Rectangle(this.buildOpts(bounds)); + $log.info("gObject (rectangle) created: " + gObject); + settingBoundsFromScope = false; + updateBounds = (function(_this) { + return function() { + var b, ne, sw; + b = gObject.getBounds(); + ne = b.getNorthEast(); + sw = b.getSouthWest(); + if (settingBoundsFromScope) { + return; + } + return _this.scope.$evalAsync(function(s) { + if ((s.bounds != null) && (s.bounds.sw != null) && (s.bounds.ne != null)) { + s.bounds.ne = { + latitude: ne.lat(), + longitude: ne.lng() + }; + s.bounds.sw = { + latitude: sw.lat(), + longitude: sw.lng() + }; + } + if ((s.bounds.getNorthEast != null) && (s.bounds.getSouthWest != null)) { + return s.bounds = b; + } + }); + }; + })(this); + init = (function(_this) { + return function() { + fit(); + _this.removeEvents(myListeners); + myListeners.push(google.maps.event.addListener(gObject, 'dragstart', function() { + return dragging = true; + })); + myListeners.push(google.maps.event.addListener(gObject, 'dragend', function() { + dragging = false; + return updateBounds(); + })); + return myListeners.push(google.maps.event.addListener(gObject, 'bounds_changed', function() { + if (dragging) { + return; + } + return updateBounds(); + })); + }; + })(this); + clear = (function(_this) { + return function() { + _this.removeEvents(myListeners); + if (listeners != null) { + _this.removeEvents(listeners); + } + return gObject.setMap(null); + }; + })(this); + if (bounds != null) { + init(); + } + this.scope.$watch('bounds', (function(newValue, oldValue) { + var isNew; + if (_.isEqual(newValue, oldValue) && (bounds != null) || dragging) { + return; + } + settingBoundsFromScope = true; + if (newValue == null) { + clear(); + return; + } + if (bounds == null) { + isNew = true; + } else { + fit(); + } + createBounds(); + gObject.setBounds(bounds); + settingBoundsFromScope = false; + if (isNew && (bounds != null)) { + return init(); + } + }), true); + this.setMyOptions = (function(_this) { + return function(newVals, oldVals) { + if (!_.isEqual(newVals, oldVals)) { + if ((bounds != null) && (newVals != null)) { + return gObject.setOptions(_this.buildOpts(bounds)); + } + } + }; + })(this); + this.props.push('bounds'); + this.watchProps(this.props); + if (this.attrs.events != null) { + listeners = this.setEvents(gObject, this.scope, this.scope); + this.scope.$watch('events', (function(_this) { + return function(newValue, oldValue) { + if (!_.isEqual(newValue, oldValue)) { + if (listeners != null) { + _this.removeEvents(listeners); + } + return listeners = _this.setEvents(gObject, _this.scope, _this.scope); + } + }; + })(this)); + } + this.scope.$on('$destroy', function() { + return clear(); + }); + $log.info(this); + } + + return RectangleParentModel; + + })(Builder); + } + ]); + +}).call(this); +; +/*global angular:true, google:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapSearchBoxParentModel', [ + 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapEventsHelper', function(BaseObject, Logger, EventsHelper) { + var SearchBoxParentModel; + SearchBoxParentModel = (function(superClass) { + extend(SearchBoxParentModel, superClass); + + SearchBoxParentModel.include(EventsHelper); + + function SearchBoxParentModel(scope, element, attrs, gMap, ctrlPosition, template, $log) { + var controlDiv; + this.scope = scope; + this.element = element; + this.attrs = attrs; + this.gMap = gMap; + this.ctrlPosition = ctrlPosition; + this.template = template; + this.$log = $log != null ? $log : Logger; + this.setVisibility = bind(this.setVisibility, this); + this.getBounds = bind(this.getBounds, this); + this.setBounds = bind(this.setBounds, this); + this.createSearchBox = bind(this.createSearchBox, this); + this.addToParentDiv = bind(this.addToParentDiv, this); + this.addAsMapControl = bind(this.addAsMapControl, this); + this.init = bind(this.init, this); + if (this.attrs.template == null) { + this.$log.error('template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!'); + return; + } + if (angular.isUndefined(this.scope.options)) { + this.scope.options = {}; + this.scope.options.visible = true; + } + if (angular.isUndefined(this.scope.options.visible)) { + this.scope.options.visible = true; + } + if (angular.isUndefined(this.scope.options.autocomplete)) { + this.scope.options.autocomplete = false; + } + this.visible = this.scope.options.visible; + this.autocomplete = this.scope.options.autocomplete; + controlDiv = angular.element('
'); + controlDiv.append(this.template); + this.input = controlDiv.find('input')[0]; + this.init(); + } + + SearchBoxParentModel.prototype.init = function() { + this.createSearchBox(); + this.scope.$watch('options', (function(_this) { + return function(newValue, oldValue) { + if (angular.isObject(newValue)) { + if (newValue.bounds != null) { + _this.setBounds(newValue.bounds); + } + if (newValue.visible != null) { + if (_this.visible !== newValue.visible) { + return _this.setVisibility(newValue.visible); + } + } + } + }; + })(this), true); + if (this.attrs.parentdiv != null) { + this.addToParentDiv(); + } else { + this.addAsMapControl(); + } + if (!this.visible) { + this.setVisibility(this.visible); + } + if (this.autocomplete) { + this.listener = google.maps.event.addListener(this.gObject, 'place_changed', (function(_this) { + return function() { + return _this.places = _this.gObject.getPlace(); + }; + })(this)); + } else { + this.listener = google.maps.event.addListener(this.gObject, 'places_changed', (function(_this) { + return function() { + return _this.places = _this.gObject.getPlaces(); + }; + })(this)); + } + this.listeners = this.setEvents(this.gObject, this.scope, this.scope); + this.$log.info(this); + this.scope.$on('$stateChangeSuccess', (function(_this) { + return function() { + if (_this.attrs.parentdiv != null) { + return _this.addToParentDiv(); + } + }; + })(this)); + return this.scope.$on('$destroy', (function(_this) { + return function() { + return _this.gObject = null; + }; + })(this)); + }; + + SearchBoxParentModel.prototype.addAsMapControl = function() { + return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input); + }; + + SearchBoxParentModel.prototype.addToParentDiv = function() { + var ref; + this.parentDiv = angular.element(document.getElementById(this.scope.parentdiv)); + if ((ref = this.parentDiv) != null ? ref.length : void 0) { + return this.parentDiv.append(this.input); + } + }; + + SearchBoxParentModel.prototype.createSearchBox = function() { + if (this.autocomplete) { + return this.gObject = new google.maps.places.Autocomplete(this.input, this.scope.options); + } else { + return this.gObject = new google.maps.places.SearchBox(this.input, this.scope.options); + } + }; + + SearchBoxParentModel.prototype.setBounds = function(bounds) { + if (angular.isUndefined(bounds.isEmpty)) { + this.$log.error('Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.'); + } else { + if (bounds.isEmpty() === false) { + if (this.gObject != null) { + return this.gObject.setBounds(bounds); + } + } + } + }; + + SearchBoxParentModel.prototype.getBounds = function() { + return this.gObject.getBounds(); + }; + + SearchBoxParentModel.prototype.setVisibility = function(val) { + if (this.attrs.parentdiv != null) { + if (val === false) { + this.parentDiv.addClass("ng-hide"); + } else { + this.parentDiv.removeClass("ng-hide"); + } + } else { + if (val === false) { + this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear(); + } else { + this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input); + } + } + return this.visible = val; + }; + + return SearchBoxParentModel; + + })(BaseObject); + return SearchBoxParentModel; + } + ]); + +}).call(this); +; +/*global _,angular */ + + +/* + WindowsChildModel generator where there are many ChildModels to a parent. + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapWindowsParentModel', [ + 'uiGmapIWindowParentModel', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmapWindowChildModel', 'uiGmapLinked', 'uiGmap_async', 'uiGmapLogger', '$timeout', '$compile', '$http', '$templateCache', '$interpolate', 'uiGmapPromise', 'uiGmapIWindow', 'uiGmapGmapUtil', function(IWindowParentModel, ModelsWatcher, PropMap, WindowChildModel, Linked, _async, $log, $timeout, $compile, $http, $templateCache, $interpolate, uiGmapPromise, IWindow, GmapUtil) { + var WindowsParentModel; + WindowsParentModel = (function(superClass) { + extend(WindowsParentModel, superClass); + + WindowsParentModel.include(ModelsWatcher); + + function WindowsParentModel(scope, element, attrs, ctrls, gMap1, markersScope) { + this.gMap = gMap1; + this.markersScope = markersScope; + this.modelKeyComparison = bind(this.modelKeyComparison, this); + this.interpolateContent = bind(this.interpolateContent, this); + this.setChildScope = bind(this.setChildScope, this); + this.createWindow = bind(this.createWindow, this); + this.setContentKeys = bind(this.setContentKeys, this); + this.pieceMeal = bind(this.pieceMeal, this); + this.createAllNew = bind(this.createAllNew, this); + this.watchIdKey = bind(this.watchIdKey, this); + this.createChildScopes = bind(this.createChildScopes, this); + this.watchOurScope = bind(this.watchOurScope, this); + this.watchDestroy = bind(this.watchDestroy, this); + this.onDestroy = bind(this.onDestroy, this); + this.rebuildAll = bind(this.rebuildAll, this); + this.doINeedToWipe = bind(this.doINeedToWipe, this); + this.watchModels = bind(this.watchModels, this); + this.go = bind(this.go, this); + WindowsParentModel.__super__.constructor.call(this, scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache); + this["interface"] = IWindow; + this.plurals = new PropMap(); + _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + return _this[name + 'Key'] = void 0; + }; + })(this)); + this.linked = new Linked(scope, element, attrs, ctrls); + this.contentKeys = void 0; + this.isIconVisibleOnClick = void 0; + this.firstTime = true; + this.firstWatchModels = true; + this.$log.info(self); + this.parentScope = void 0; + this.go(scope); + } + + WindowsParentModel.prototype.go = function(scope) { + this.watchOurScope(scope); + this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; + scope.$watch('doRebuildAll', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.doRebuildAll = newValue; + } + }; + })(this)); + return this.createChildScopes(); + }; + + WindowsParentModel.prototype.watchModels = function(scope) { + var itemToWatch; + itemToWatch = this.markersScope != null ? 'pluralsUpdate' : 'models'; + return scope.$watch(itemToWatch, (function(_this) { + return function(newValue, oldValue) { + var doScratch; + if (!_.isEqual(newValue, oldValue) || _this.firstWatchModels) { + _this.firstWatchModels = false; + if (_this.doRebuildAll || _this.doINeedToWipe(scope.models)) { + return _this.rebuildAll(scope, true, true); + } else { + doScratch = _this.plurals.length === 0; + if (_this.existingPieces != null) { + return _.last(_this.existingPieces._content).then(function() { + return _this.createChildScopes(doScratch); + }); + } else { + return _this.createChildScopes(doScratch); + } + } + } + }; + })(this), true); + }; + + WindowsParentModel.prototype.doINeedToWipe = function(newValue) { + var newValueIsEmpty; + newValueIsEmpty = newValue != null ? newValue.length === 0 : true; + return this.plurals.length > 0 && newValueIsEmpty; + }; + + WindowsParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { + return this.onDestroy(doDelete).then((function(_this) { + return function() { + if (doCreate) { + return _this.createChildScopes(); + } + }; + })(this)); + }; + + WindowsParentModel.prototype.onDestroy = function(scope) { + WindowsParentModel.__super__.onDestroy.call(this, this.scope); + return _async.promiseLock(this, uiGmapPromise.promiseTypes["delete"], void 0, void 0, (function(_this) { + return function() { + return _async.each(_this.plurals.values(), function(child) { + return child.destroy(true); + }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() { + var ref; + return (ref = _this.plurals) != null ? ref.removeAll() : void 0; + }); + }; + })(this)); + }; + + WindowsParentModel.prototype.watchDestroy = function(scope) { + return scope.$on('$destroy', (function(_this) { + return function() { + _this.firstWatchModels = true; + _this.firstTime = true; + return _this.rebuildAll(scope, false, true); + }; + })(this)); + }; + + WindowsParentModel.prototype.watchOurScope = function(scope) { + return _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + var nameKey; + nameKey = name + 'Key'; + return _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; + }; + })(this)); + }; + + WindowsParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { + var modelsNotDefined, ref, ref1; + if (isCreatingFromScratch == null) { + isCreatingFromScratch = true; + } + + /* + being that we cannot tell the difference in Key String vs. a normal value string (TemplateUrl) + we will assume that all scope values are string expressions either pointing to a key (propName) or using + 'self' to point the model as container/object of interest. + + This may force redundant information into the model, but this appears to be the most flexible approach. + */ + this.isIconVisibleOnClick = true; + if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) { + this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick; + } + modelsNotDefined = angular.isUndefined(this.linked.scope.models); + if (modelsNotDefined && (this.markersScope === void 0 || (((ref = this.markersScope) != null ? ref.plurals : void 0) === void 0 || ((ref1 = this.markersScope) != null ? ref1.models : void 0) === void 0))) { + this.$log.error('No models to create windows from! Need direct models or models derived from markers!'); + return; + } + if (this.gMap != null) { + if (this.linked.scope.models != null) { + this.watchIdKey(this.linked.scope); + if (isCreatingFromScratch) { + return this.createAllNew(this.linked.scope, false); + } else { + return this.pieceMeal(this.linked.scope, false); + } + } else { + this.parentScope = this.markersScope; + this.watchIdKey(this.parentScope); + if (isCreatingFromScratch) { + return this.createAllNew(this.markersScope, true, 'plurals', false); + } else { + return this.pieceMeal(this.markersScope, true, 'plurals', false); + } + } + } + }; + + WindowsParentModel.prototype.watchIdKey = function(scope) { + this.setIdKey(scope); + return scope.$watch('idKey', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue && (newValue == null)) { + _this.idKey = newValue; + return _this.rebuildAll(scope, true, true); + } + }; + })(this)); + }; + + WindowsParentModel.prototype.createAllNew = function(scope, hasGMarker, modelsPropToIterate, isArray) { + var maybeCanceled; + if (modelsPropToIterate == null) { + modelsPropToIterate = 'models'; + } + if (isArray == null) { + isArray = false; + } + if (this.firstTime) { + this.watchModels(scope); + this.watchDestroy(scope); + } + this.setContentKeys(scope.models); + if (this.didQueueInitPromise(this, scope)) { + return; + } + maybeCanceled = null; + return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return _async.each(scope.models, function(model) { + var gMarker, ref; + gMarker = hasGMarker ? (ref = _this.getItem(scope, modelsPropToIterate, model[_this.idKey])) != null ? ref.gObject : void 0 : void 0; + if (!maybeCanceled) { + if (!gMarker && _this.markersScope) { + $log.error('Unable to get gMarker from markersScope!'); + } + _this.createWindow(model, gMarker, _this.gMap); + } + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)).then(function() { + return _this.firstTime = false; + }); + }; + })(this)); + }; + + WindowsParentModel.prototype.pieceMeal = function(scope, hasGMarker, modelsPropToIterate, isArray) { + var maybeCanceled, payload; + if (modelsPropToIterate == null) { + modelsPropToIterate = 'models'; + } + if (isArray == null) { + isArray = true; + } + if (scope.$$destroyed) { + return; + } + maybeCanceled = null; + payload = null; + if ((scope != null) && this.modelsLength() && this.plurals.length) { + return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) { + return maybeCanceled = canceledMsg; + }), (function(_this) { + return function() { + return uiGmapPromise.promise((function() { + return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison); + })).then(function(state) { + payload = state; + return _async.each(payload.removals, function(child) { + if (child != null) { + _this.plurals.remove(child.id); + if (child.destroy != null) { + child.destroy(true); + } + return maybeCanceled; + } + }, _async.chunkSizeFrom(scope.chunk)); + }).then(function() { + return _async.each(payload.adds, function(modelToAdd) { + var gMarker, ref; + gMarker = (ref = _this.getItem(scope, modelsPropToIterate, modelToAdd[_this.idKey])) != null ? ref.gObject : void 0; + if (!gMarker) { + throw 'Gmarker undefined'; + } + _this.createWindow(modelToAdd, gMarker, _this.gMap); + return maybeCanceled; + }); + }).then(function() { + return _async.each(payload.updates, function(update) { + _this.updateChild(update.child, update.model); + return maybeCanceled; + }, _async.chunkSizeFrom(scope.chunk)); + }); + }; + })(this)); + } else { + $log.debug('pieceMeal: rebuildAll'); + return this.rebuildAll(this.scope, true, true); + } + }; + + WindowsParentModel.prototype.setContentKeys = function(models) { + if (this.modelsLength(models)) { + return this.contentKeys = Object.keys(models[0]); + } + }; + + WindowsParentModel.prototype.createWindow = function(model, gMarker, gMap) { + var child, childScope, fakeElement, opts, ref, ref1; + childScope = this.linked.scope.$new(false); + this.setChildScope(childScope, model); + childScope.$watch('model', (function(_this) { + return function(newValue, oldValue) { + if (newValue !== oldValue) { + return _this.setChildScope(childScope, newValue); + } + }; + })(this), true); + fakeElement = { + html: (function(_this) { + return function() { + return _this.interpolateContent(_this.linked.element.html(), model); + }; + })(this) + }; + this.DEFAULTS = this.scopeOrModelVal(this.optionsKey, this.scope, model) || {}; + opts = this.createWindowOptions(gMarker, childScope, fakeElement.html(), this.DEFAULTS); + child = new WindowChildModel({ + model: model, + scope: childScope, + opts: opts, + isIconVisibleOnClick: this.isIconVisibleOnClick, + gMap: gMap, + markerScope: (ref = this.markersScope) != null ? (ref1 = ref.plurals.get(model[this.idKey])) != null ? ref1.scope : void 0 : void 0, + element: fakeElement, + needToManualDestroy: false, + markerIsVisibleAfterWindowClose: true, + isScopeModel: true + }); + if (model[this.idKey] == null) { + this.$log.error('Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.'); + return; + } + this.plurals.put(model[this.idKey], child); + return child; + }; + + WindowsParentModel.prototype.setChildScope = function(childScope, model) { + _.each(IWindow.scopeKeys, (function(_this) { + return function(name) { + var nameKey, newValue; + nameKey = name + 'Key'; + newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; + if (newValue !== childScope[name]) { + return childScope[name] = newValue; + } + }; + })(this)); + return childScope.model = model; + }; + + WindowsParentModel.prototype.interpolateContent = function(content, model) { + var exp, i, interpModel, key, len, ref; + if (this.contentKeys === void 0 || this.contentKeys.length === 0) { + return; + } + exp = $interpolate(content); + interpModel = {}; + ref = this.contentKeys; + for (i = 0, len = ref.length; i < len; i++) { + key = ref[i]; + interpModel[key] = model[key]; + } + return exp(interpModel); + }; + + WindowsParentModel.prototype.modelKeyComparison = function(model1, model2) { + var isEqual, scope; + scope = this.scope.coords != null ? this.scope : this.parentScope; + if (scope == null) { + throw 'No scope or parentScope set!'; + } + isEqual = GmapUtil.equalCoords(this.evalModelHandle(model1, scope.coords), this.evalModelHandle(model2, scope.coords)); + if (!isEqual) { + return isEqual; + } + isEqual = _.every(_.without(this["interface"].scopeKeys, 'coords'), (function(_this) { + return function(k) { + return _this.evalModelHandle(model1, scope[k]) === _this.evalModelHandle(model2, scope[k]); + }; + })(this)); + return isEqual; + }; + + return WindowsParentModel; + + })(IWindowParentModel); + return WindowsParentModel; + } + ]); + +}).call(this); +; +/*global angular, _ */ + +(function() { + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle", [ + "uiGmapICircle", "uiGmapCircleParentModel", function(ICircle, CircleParentModel) { + return _.extend(ICircle, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(gMap) { + return new CircleParentModel(scope, element, attrs, gMap); + }); + } + }); + } + ]); + +}).call(this); +;(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl", [ + "uiGmapIControl", "$http", "$templateCache", "$compile", "$controller", 'uiGmapGoogleMapApi', function(IControl, $http, $templateCache, $compile, $controller, GoogleMapApi) { + var Control; + return Control = (function(superClass) { + extend(Control, superClass); + + function Control() { + this.link = bind(this.link, this); + Control.__super__.constructor.call(this); + } + + Control.prototype.transclude = true; + + Control.prototype.link = function(scope, element, attrs, ctrl, transclude) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var hasTranscludedContent, index, position, transcludedContent; + transcludedContent = transclude(); + hasTranscludedContent = transclude().length > 0; + if (!hasTranscludedContent && angular.isUndefined(scope.template)) { + _this.$log.error('mapControl: could not find a valid template property or elements for transclusion'); + return; + } + index = angular.isDefined(scope.index && !isNaN(parseInt(scope.index))) ? parseInt(scope.index) : void 0; + position = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_CENTER'; + if (!maps.ControlPosition[position]) { + _this.$log.error('mapControl: invalid position property'); + return; + } + return IControl.mapPromise(scope, ctrl).then(function(map) { + var control, controlDiv, pushControl; + control = void 0; + controlDiv = angular.element('
'); + pushControl = function(map, control, index) { + if (index) { + control[0].index = index; + } + return map.controls[google.maps.ControlPosition[position]].push(control[0]); + }; + if (hasTranscludedContent) { + return transclude(function(transcludeEl) { + controlDiv.append(transcludeEl); + return pushControl(map, controlDiv, index); + }); + } else { + return $http.get(scope.template, { + cache: $templateCache + }).success(function(template) { + var templateCtrl, templateScope; + templateScope = scope.$new(); + controlDiv.append(template); + if (angular.isDefined(scope.controller)) { + templateCtrl = $controller(scope.controller, { + $scope: templateScope + }); + controlDiv.children().data('$ngControllerController', templateCtrl); + } + return control = $compile(controlDiv.children())(templateScope); + }).error(function(error) { + return _this.$log.error('mapControl: template could not be found'); + }).then(function() { + return pushControl(map, control, index); + }); + } + }); + }; + })(this)); + }; + + return Control; + + })(IControl); + } + ]); + +}).call(this); +; +/*globals angular, _ */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapDragZoom', [ + 'uiGmapCtrlHandle', 'uiGmapPropertyAction', function(CtrlHandle, PropertyAction) { + return { + restrict: 'EMA', + transclude: true, + template: '', + require: '^' + 'uiGmapGoogleMap', + scope: { + keyboardkey: '=', + options: '=', + spec: '=' + }, + controller: [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'uiGmapDragZoom'; + return _.extend(this, CtrlHandle.handle($scope, $element)); + } + ], + link: function(scope, element, attrs, ctrl) { + return CtrlHandle.mapPromise(scope, ctrl).then(function(map) { + var enableKeyDragZoom, setKeyAction, setOptionsAction; + enableKeyDragZoom = function(opts) { + return map.enableKeyDragZoom(opts); + }; + setKeyAction = new PropertyAction(function(key, newVal) { + if (newVal) { + return enableKeyDragZoom({ + key: newVal + }); + } else { + return enableKeyDragZoom(); + } + }); + setOptionsAction = new PropertyAction(function(key, newVal) { + if (newVal) { + return enableKeyDragZoom(newVal); + } + }); + scope.$watch('keyboardkey', setKeyAction.sic('keyboardkey')); + setKeyAction.sic(scope.keyboardkey); + scope.$watch('options', setOptionsAction.sic('options')); + return setOptionsAction.sic(scope.options); + }); + } + }; + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager", [ + "uiGmapIDrawingManager", "uiGmapDrawingManagerParentModel", function(IDrawingManager, DrawingManagerParentModel) { + return _.extend(IDrawingManager, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(map) { + return new DrawingManagerParentModel(scope, element, attrs, map); + }); + } + }); + } + ]); + +}).call(this); +; +/* + - Link up Polygons to be sent back to a controller + - inject the draw function into a controllers scope so that controller can call the directive to draw on demand + - draw function creates the DrawFreeHandChildModel which manages itself + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapApiFreeDrawPolygons', [ + 'uiGmapLogger', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapDrawFreeHandChildModel', 'uiGmapLodash', function($log, BaseObject, CtrlHandle, DrawFreeHandChildModel, uiGmapLodash) { + var FreeDrawPolygons; + return FreeDrawPolygons = (function(superClass) { + extend(FreeDrawPolygons, superClass); + + function FreeDrawPolygons() { + this.link = bind(this.link, this); + return FreeDrawPolygons.__super__.constructor.apply(this, arguments); + } + + FreeDrawPolygons.include(CtrlHandle); + + FreeDrawPolygons.prototype.restrict = 'EMA'; + + FreeDrawPolygons.prototype.replace = true; + + FreeDrawPolygons.prototype.require = '^' + 'uiGmapGoogleMap'; + + FreeDrawPolygons.prototype.scope = { + polygons: '=', + draw: '=' + }; + + FreeDrawPolygons.prototype.link = function(scope, element, attrs, ctrl) { + return this.mapPromise(scope, ctrl).then((function(_this) { + return function(map) { + var freeHand, listener; + if (!scope.polygons) { + return $log.error('No polygons to bind to!'); + } + if (!_.isArray(scope.polygons)) { + return $log.error('Free Draw Polygons must be of type Array!'); + } + freeHand = new DrawFreeHandChildModel(map, ctrl.getScope()); + listener = void 0; + return scope.draw = function() { + if (typeof listener === "function") { + listener(); + } + return freeHand.engage(scope.polygons).then(function() { + var firstTime; + firstTime = true; + return listener = scope.$watchCollection('polygons', function(newValue, oldValue) { + var removals; + if (firstTime || newValue === oldValue) { + firstTime = false; + return; + } + removals = uiGmapLodash.differenceObjects(oldValue, newValue); + return removals.forEach(function(p) { + return p.setMap(null); + }); + }); + }); + }; + }; + })(this)); + }; + + return FreeDrawPolygons; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle", [ + function() { + var DEFAULTS; + DEFAULTS = {}; + return { + restrict: "EA", + replace: true, + require: '^' + 'uiGmapGoogleMap', + scope: { + center: "=center", + radius: "=radius", + stroke: "=stroke", + fill: "=fill", + clickable: "=", + draggable: "=", + editable: "=", + geodesic: "=", + icons: "=icons", + visible: "=", + events: "=", + control: "=", + zIndex: "=zindex" + } + }; + } + ]); + +}).call(this); +; +/* + - interface for all controls to derive from + - to enforce a minimum set of requirements + - attributes + - template + - position + - controller + - index + */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl", [ + "uiGmapBaseObject", "uiGmapLogger", "uiGmapCtrlHandle", function(BaseObject, Logger, CtrlHandle) { + var IControl; + return IControl = (function(superClass) { + extend(IControl, superClass); + + IControl.extend(CtrlHandle); + + function IControl() { + this.restrict = 'EA'; + this.replace = true; + this.require = '^' + 'uiGmapGoogleMap'; + this.scope = { + template: '@template', + position: '@position', + controller: '@controller', + index: '@index' + }; + this.$log = Logger; + } + + IControl.prototype.link = function(scope, element, attrs, ctrl) { + throw new Exception("Not implemented!!"); + }; + + return IControl; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIDrawingManager', [ + function() { + return { + restrict: 'EA', + replace: true, + require: '^' + 'uiGmapGoogleMap', + scope: { + "static": '@', + control: '=', + options: '=', + events: '=' + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIMarker', [ + 'uiGmapBaseObject', 'uiGmapCtrlHandle', function(BaseObject, CtrlHandle) { + var IMarker; + return IMarker = (function(superClass) { + extend(IMarker, superClass); + + IMarker.scope = { + coords: '=coords', + icon: '=icon', + click: '&click', + options: '=options', + events: '=events', + fit: '=fit', + idKey: '=idkey', + control: '=control' + }; + + IMarker.scopeKeys = _.keys(IMarker.scope); + + IMarker.keys = IMarker.scopeKeys; + + IMarker.extend(CtrlHandle); + + function IMarker() { + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.replace = true; + this.scope = _.extend(this.scope || {}, IMarker.scope); + } + + return IMarker; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolygon', [ + 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) { + var IPolygon; + return IPolygon = (function(superClass) { + extend(IPolygon, superClass); + + IPolygon.scope = { + path: '=path', + stroke: '=stroke', + clickable: '=', + draggable: '=', + editable: '=', + geodesic: '=', + fill: '=', + icons: '=icons', + visible: '=', + "static": '=', + events: '=', + zIndex: '=zindex', + fit: '=', + control: '=control' + }; + + IPolygon.scopeKeys = _.keys(IPolygon.scope); + + IPolygon.include(GmapUtil); + + IPolygon.extend(CtrlHandle); + + function IPolygon() {} + + IPolygon.prototype.restrict = 'EMA'; + + IPolygon.prototype.replace = true; + + IPolygon.prototype.require = '^' + 'uiGmapGoogleMap'; + + IPolygon.prototype.scope = IPolygon.scope; + + IPolygon.prototype.DEFAULTS = {}; + + IPolygon.prototype.$log = Logger; + + return IPolygon; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolyline', [ + 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) { + var IPolyline; + return IPolyline = (function(superClass) { + extend(IPolyline, superClass); + + IPolyline.scope = { + path: '=', + stroke: '=', + clickable: '=', + draggable: '=', + editable: '=', + geodesic: '=', + icons: '=', + visible: '=', + "static": '=', + fit: '=', + events: '=', + zIndex: '=zindex' + }; + + IPolyline.scopeKeys = _.keys(IPolyline.scope); + + IPolyline.include(GmapUtil); + + IPolyline.extend(CtrlHandle); + + function IPolyline() {} + + IPolyline.prototype.restrict = 'EMA'; + + IPolyline.prototype.replace = true; + + IPolyline.prototype.require = '^' + 'uiGmapGoogleMap'; + + IPolyline.prototype.scope = IPolyline.scope; + + IPolyline.prototype.DEFAULTS = {}; + + IPolyline.prototype.$log = Logger; + + return IPolyline; + + })(BaseObject); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIRectangle', [ + function() { + 'use strict'; + var DEFAULTS; + DEFAULTS = {}; + return { + restrict: 'EMA', + require: '^' + 'uiGmapGoogleMap', + replace: true, + scope: { + bounds: '=', + stroke: '=', + clickable: '=', + draggable: '=', + editable: '=', + fill: '=', + visible: '=', + events: '=' + } + }; + } + ]); + +}).call(this); +;(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIWindow', [ + 'uiGmapBaseObject', 'uiGmapChildEvents', 'uiGmapCtrlHandle', function(BaseObject, ChildEvents, CtrlHandle) { + var IWindow; + return IWindow = (function(superClass) { + extend(IWindow, superClass); + + IWindow.scope = { + coords: '=coords', + template: '=template', + templateUrl: '=templateurl', + templateParameter: '=templateparameter', + isIconVisibleOnClick: '=isiconvisibleonclick', + closeClick: '&closeclick', + options: '=options', + control: '=control', + show: '=show' + }; + + IWindow.scopeKeys = _.keys(IWindow.scope); + + IWindow.include(ChildEvents); + + IWindow.extend(CtrlHandle); + + function IWindow() { + this.restrict = 'EMA'; + this.template = void 0; + this.transclude = true; + this.priority = -100; + this.require = '^' + 'uiGmapGoogleMap'; + this.replace = true; + this.scope = _.extend(this.scope || {}, IWindow.scope); + } + + return IWindow; + + })(BaseObject); + } + ]); + +}).call(this); +; +/*globals angular,_,google */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', ['$timeout', '$q', '$log', 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapIsReady', 'uiGmapuuid', 'uiGmapExtendGWin', 'uiGmapExtendMarkerClusterer', 'uiGmapGoogleMapsUtilV3', 'uiGmapGoogleMapApi', 'uiGmapEventsHelper', 'uiGmapGoogleMapObjectManager', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) { + var DEFAULTS, Map, initializeItems; + DEFAULTS = void 0; + initializeItems = [uiGmapGoogleMapsUtilV3, uiGmapExtendGWin, uiGmapExtendMarkerClusterer]; + return Map = (function(superClass) { + extend(Map, superClass); + + Map.include(uiGmapGmapUtil); + + function Map() { + this.link = bind(this.link, this); + var ctrlFn; + ctrlFn = function($scope) { + var ctrlObj, retCtrl; + retCtrl = void 0; + $scope.$on('$destroy', function() { + return uiGmapIsReady.decrement(); + }); + ctrlObj = uiGmapCtrlHandle.handle($scope); + $scope.ctrlType = 'Map'; + $scope.deferred.promise.then(function() { + return initializeItems.forEach(function(i) { + return i.init(); + }); + }); + ctrlObj.getMap = function() { + return $scope.map; + }; + retCtrl = _.extend(this, ctrlObj); + return retCtrl; + }; + this.controller = ['$scope', ctrlFn]; + } + + Map.prototype.restrict = 'EMA'; + + Map.prototype.transclude = true; + + Map.prototype.replace = false; + + Map.prototype.template = "
\n
"; + + Map.prototype.scope = { + center: '=', + zoom: '=', + dragging: '=', + control: '=', + options: '=', + events: '=', + eventOpts: '=', + styles: '=', + bounds: '=', + update: '=' + }; + + Map.prototype.link = function(scope, element, attrs) { + var listeners; + listeners = []; + scope.$on('$destroy', function() { + uiGmapEventsHelper.removeEvents(listeners); + if (attrs.recycleMapInstance === 'true' && scope.map) { + uiGmapGoogleMapObjectManager.recycleMapInstance(scope.map); + return scope.map = null; + } + }); + scope.idleAndZoomChanged = false; + return uiGmapGoogleMapApi.then((function(_this) { + return function(maps) { + var _gMap, customListeners, disabledEvents, dragging, el, eventName, getEventHandler, mapOptions, maybeHookToEvent, opts, ref, resolveSpawned, settingFromDirective, spawned, type, updateCenter, zoomPromise; + DEFAULTS = { + mapTypeId: maps.MapTypeId.ROADMAP + }; + spawned = uiGmapIsReady.spawn(); + resolveSpawned = function() { + return spawned.deferred.resolve({ + instance: spawned.instance, + map: _gMap + }); + }; + if (!angular.isDefined(scope.center) && !angular.isDefined(scope.bounds)) { + $log.error('angular-google-maps: a center or bounds property is required'); + return; + } + if (!angular.isDefined(scope.center)) { + scope.center = new google.maps.LatLngBounds(_this.getCoords(scope.bounds.southwest), _this.getCoords(scope.bounds.northeast)).getCenter(); + } + if (!angular.isDefined(scope.zoom)) { + scope.zoom = 10; + } + el = angular.element(element); + el.addClass('angular-google-map'); + opts = { + options: {} + }; + if (attrs.options) { + opts.options = scope.options; + } + if (attrs.styles) { + opts.styles = scope.styles; + } + if (attrs.type) { + type = attrs.type.toUpperCase(); + if (google.maps.MapTypeId.hasOwnProperty(type)) { + opts.mapTypeId = google.maps.MapTypeId[attrs.type.toUpperCase()]; + } else { + $log.error("angular-google-maps: invalid map type '" + attrs.type + "'"); + } + } + mapOptions = angular.extend({}, DEFAULTS, opts, { + center: _this.getCoords(scope.center), + zoom: scope.zoom, + bounds: scope.bounds + }); + if (attrs.recycleMapInstance === 'true') { + _gMap = uiGmapGoogleMapObjectManager.createMapInstance(el.find('div')[1], mapOptions); + } else { + _gMap = new google.maps.Map(el.find('div')[1], mapOptions); + } + _gMap['uiGmap_id'] = uiGmapuuid.generate(); + dragging = false; + listeners.push(google.maps.event.addListenerOnce(_gMap, 'idle', function() { + scope.deferred.resolve(_gMap); + return resolveSpawned(); + })); + disabledEvents = attrs.events && (((ref = scope.events) != null ? ref.blacklist : void 0) != null) ? scope.events.blacklist : []; + if (_.isString(disabledEvents)) { + disabledEvents = [disabledEvents]; + } + maybeHookToEvent = function(eventName, fn, prefn) { + if (!_.includes(disabledEvents, eventName)) { + if (prefn) { + prefn(); + } + return listeners.push(google.maps.event.addListener(_gMap, eventName, function() { + var ref1; + if (!((ref1 = scope.update) != null ? ref1.lazy : void 0)) { + return fn(); + } + })); + } + }; + if (!_.includes(disabledEvents, 'all')) { + maybeHookToEvent('dragstart', function() { + dragging = true; + return scope.$evalAsync(function(s) { + if (s.dragging != null) { + return s.dragging = dragging; + } + }); + }); + maybeHookToEvent('dragend', function() { + dragging = false; + return scope.$evalAsync(function(s) { + if (s.dragging != null) { + return s.dragging = dragging; + } + }); + }); + updateCenter = function(c, s) { + if (c == null) { + c = _gMap.center; + } + if (s == null) { + s = scope; + } + if (_.includes(disabledEvents, 'center')) { + if (s.center.latitude !== c.lat()) { + s.center.latitude = c.lat(); + } + if (s.center.longitude !== c.lng()) { + return s.center.longitude = c.lng(); + } + } + }; + settingFromDirective = false; + maybeHookToEvent('idle', function() { + var b, ne, sw; + b = _gMap.getBounds(); + ne = b.getNorthEast(); + sw = b.getSouthWest(); + settingFromDirective = true; + return scope.$evalAsync(function(s) { + updateCenter(); + if (!_.isUndefined(s.bounds) && !_.includes(disabledEvents, 'bounds')) { + s.bounds.northeast = { + latitude: ne.lat(), + longitude: ne.lng() + }; + s.bounds.southwest = { + latitude: sw.lat(), + longitude: sw.lng() + }; + } + if (!_.includes(disabledEvents, 'zoom')) { + s.zoom = _gMap.zoom; + scope.idleAndZoomChanged = !scope.idleAndZoomChanged; + } + return settingFromDirective = false; + }); + }); + } + if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { + getEventHandler = function(eventName) { + return function() { + return scope.events[eventName].apply(scope, [_gMap, eventName, arguments]); + }; + }; + customListeners = []; + for (eventName in scope.events) { + if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) { + customListeners.push(google.maps.event.addListener(_gMap, eventName, getEventHandler(eventName))); + } + } + listeners.concat(customListeners); + } + _gMap.getOptions = function() { + return mapOptions; + }; + scope.map = _gMap; + if ((attrs.control != null) && (scope.control != null)) { + scope.control.refresh = function(maybeCoords) { + var coords, ref1, ref2; + if (_gMap == null) { + return; + } + if (((typeof google !== "undefined" && google !== null ? (ref1 = google.maps) != null ? (ref2 = ref1.event) != null ? ref2.trigger : void 0 : void 0 : void 0) != null) && (_gMap != null)) { + google.maps.event.trigger(_gMap, 'resize'); + } + if (((maybeCoords != null ? maybeCoords.latitude : void 0) != null) && ((maybeCoords != null ? maybeCoords.longitude : void 0) != null)) { + coords = _this.getCoords(maybeCoords); + if (_this.isTrue(attrs.pan)) { + return _gMap.panTo(coords); + } else { + return _gMap.setCenter(coords); + } + } + }; + scope.control.getGMap = function() { + return _gMap; + }; + scope.control.getMapOptions = function() { + return mapOptions; + }; + scope.control.getCustomEventListeners = function() { + return customListeners; + }; + scope.control.removeEvents = function(yourListeners) { + return uiGmapEventsHelper.removeEvents(yourListeners); + }; + } + scope.$watch('center', function(newValue, oldValue) { + var coords; + if (newValue === oldValue || settingFromDirective) { + return; + } + coords = _this.getCoords(scope.center); + if (coords.lat() === _gMap.center.lat() && coords.lng() === _gMap.center.lng()) { + return; + } + if (!dragging) { + if (!_this.validateCoords(newValue)) { + $log.error("Invalid center for newValue: " + (JSON.stringify(newValue))); + } + if (_this.isTrue(attrs.pan) && scope.zoom === _gMap.zoom) { + return _gMap.panTo(coords); + } else { + return _gMap.setCenter(coords); + } + } + }, true); + zoomPromise = null; + scope.$watch('zoom', function(newValue, oldValue) { + var ref1, ref2; + if (newValue == null) { + return; + } + if (_.isEqual(newValue, oldValue) || (_gMap != null ? _gMap.getZoom() : void 0) === (scope != null ? scope.zoom : void 0) || settingFromDirective) { + return; + } + if (zoomPromise != null) { + $timeout.cancel(zoomPromise); + } + return zoomPromise = $timeout(function() { + return _gMap.setZoom(newValue); + }, ((ref1 = scope.eventOpts) != null ? (ref2 = ref1.debounce) != null ? ref2.zoomMs : void 0 : void 0) + 20, false); + }); + scope.$watch('bounds', function(newValue, oldValue) { + var bounds, ne, ref1, ref2, ref3, ref4, sw; + if (newValue === oldValue) { + return; + } + if (((newValue != null ? (ref1 = newValue.northeast) != null ? ref1.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref2 = newValue.northeast) != null ? ref2.longitude : void 0 : void 0) == null) || ((newValue != null ? (ref3 = newValue.southwest) != null ? ref3.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref4 = newValue.southwest) != null ? ref4.longitude : void 0 : void 0) == null)) { + $log.error("Invalid map bounds for new value: " + (JSON.stringify(newValue))); + return; + } + ne = new google.maps.LatLng(newValue.northeast.latitude, newValue.northeast.longitude); + sw = new google.maps.LatLng(newValue.southwest.latitude, newValue.southwest.longitude); + bounds = new google.maps.LatLngBounds(sw, ne); + return _gMap.fitBounds(bounds); + }); + return ['options', 'styles'].forEach(function(toWatch) { + return scope.$watch(toWatch, function(newValue, oldValue) { + if (_.isEqual(newValue, oldValue)) { + return; + } + if (toWatch === 'options') { + opts.options = newValue; + } else { + opts.options[toWatch] = newValue; + } + if (_gMap != null) { + return _gMap.setOptions(opts); + } + }, true); + }); + }; + })(this)); + }; + + return Map; + + })(uiGmapBaseObject); + }]); + +}).call(this); +; +/*global _:true,angular:true */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker", [ + "uiGmapIMarker", "uiGmapMarkerChildModel", "uiGmapMarkerManager", "uiGmapLogger", function(IMarker, MarkerChildModel, MarkerManager, $log) { + var Marker; + return Marker = (function(superClass) { + extend(Marker, superClass); + + function Marker() { + Marker.__super__.constructor.call(this); + this.template = ''; + $log.info(this); + } + + Marker.prototype.controller = [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'Marker'; + return _.extend(this, IMarker.handle($scope, $element)); + } + ]; + + Marker.prototype.link = function(scope, element, attrs, ctrl) { + var mapPromise; + mapPromise = IMarker.mapPromise(scope, ctrl); + mapPromise.then(function(gMap) { + var gManager, keys, m; + gManager = new MarkerManager(gMap); + keys = _.object(IMarker.keys, IMarker.keys); + m = new MarkerChildModel({ + scope: scope, + model: scope, + keys: keys, + gMap: gMap, + doClick: true, + gManager: gManager, + doDrawSelf: false, + trackModel: false + }); + m.deferred.promise.then(function(gMarker) { + return scope.deferred.resolve(gMarker); + }); + if (scope.control != null) { + return scope.control.getGMarkers = gManager.getGMarkers; + } + }); + return scope.$on('$destroy', function() { + var gManager; + if (typeof gManager !== "undefined" && gManager !== null) { + gManager.clear(); + } + return gManager = null; + }); + }; + + return Marker; + + })(IMarker); + } + ]); + +}).call(this); +; +/*global _:true,angular:true */ + +(function() { + var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers", [ + "uiGmapIMarker", "uiGmapPlural", "uiGmapMarkersParentModel", "uiGmap_sync", "uiGmapLogger", function(IMarker, Plural, MarkersParentModel, _sync, $log) { + var Markers; + return Markers = (function(superClass) { + extend(Markers, superClass); + + function Markers() { + Markers.__super__.constructor.call(this); + this.template = ''; + Plural.extend(this, { + doCluster: '=?docluster', + clusterOptions: '=clusteroptions', + clusterEvents: '=clusterevents', + modelsByRef: '=modelsbyref', + type: '=?type', + typeOptions: '=?typeoptions', + typeEvents: '=?typeevents' + }); + $log.info(this); + } + + Markers.prototype.controller = [ + '$scope', '$element', function($scope, $element) { + $scope.ctrlType = 'Markers'; + return _.extend(this, IMarker.handle($scope, $element)); + } + ]; + + Markers.prototype.link = function(scope, element, attrs, ctrl) { + var parentModel, ready; + parentModel = void 0; + ready = function() { + return scope.deferred.resolve(); + }; + return IMarker.mapPromise(scope, ctrl).then(function(map) { + var mapScope; + mapScope = ctrl.getScope(); + mapScope.$watch('idleAndZoomChanged', function() { + return _.defer(parentModel.gManager.draw); + }); + parentModel = new MarkersParentModel(scope, element, attrs, map); + Plural.link(scope, parentModel); + if (scope.control != null) { + scope.control.getGMarkers = function() { + var ref; + return (ref = parentModel.gManager) != null ? ref.getGMarkers() : void 0; + }; + scope.control.getChildMarkers = function() { + return parentModel.plurals; + }; + } + return _.last(parentModel.existingPieces._content).then(function() { + return ready(); + }); + }); + }; + + return Markers; + + })(IMarker); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapPlural', [ + function() { + var _initControl; + _initControl = function(scope, parent) { + if (scope.control == null) { + return; + } + scope.control.updateModels = function(models) { + scope.models = models; + return parent.createChildScopes(false); + }; + scope.control.newModels = function(models) { + scope.models = models; + return parent.rebuildAll(scope, true, true); + }; + scope.control.clean = function() { + return parent.rebuildAll(scope, false, true); + }; + scope.control.getPlurals = function() { + return parent.plurals; + }; + scope.control.getManager = function() { + return parent.gManager; + }; + scope.control.hasManager = function() { + return (parent.gManager != null) === true; + }; + return scope.control.managerDraw = function() { + var ref; + if (scope.control.hasManager()) { + return (ref = scope.control.getManager()) != null ? ref.draw() : void 0; + } + }; + }; + return { + extend: function(obj, obj2) { + return _.extend(obj.scope || {}, obj2 || {}, { + idKey: '=idkey', + doRebuildAll: '=dorebuildall', + models: '=models', + chunk: '=chunk', + cleanchunk: '=cleanchunk', + control: '=control' + }); + }, + link: function(scope, parent) { + return _initControl(scope, parent); + } + }; + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygon', [ + 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonChildModel', function(IPolygon, $timeout, PolygonChild) { + var Polygon; + return Polygon = (function(superClass) { + extend(Polygon, superClass); + + function Polygon() { + this.link = bind(this.link, this); + return Polygon.__super__.constructor.apply(this, arguments); + } + + Polygon.prototype.link = function(scope, element, attrs, mapCtrl) { + var children, promise; + children = []; + promise = IPolygon.mapPromise(scope, mapCtrl); + if (scope.control != null) { + scope.control.getInstance = this; + scope.control.polygons = children; + scope.control.promise = promise; + } + return promise.then((function(_this) { + return function(gMap) { + return children.push(new PolygonChild({ + scope: scope, + attrs: attrs, + gMap: gMap, + defaults: _this.DEFAULTS + })); + }; + })(this)); + }; + + return Polygon; + + })(IPolygon); + } + ]); + +}).call(this); +; +/*global angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygons', [ + 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonsParentModel', 'uiGmapPlural', function(Interface, $timeout, ParentModel, Plural) { + var Polygons; + return Polygons = (function(superClass) { + extend(Polygons, superClass); + + function Polygons() { + this.link = bind(this.link, this); + Polygons.__super__.constructor.call(this); + Plural.extend(this); + this.$log.info(this); + } + + Polygons.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + if (angular.isUndefined(scope.path) || scope.path === null) { + _this.$log.warn('polygons: no valid path attribute found'); + } + if (!scope.models) { + _this.$log.warn('polygons: no models found to create from'); + } + return Plural.link(scope, new ParentModel(scope, element, attrs, map, _this.DEFAULTS)); + }; + })(this)); + }; + + return Polygons; + + })(Interface); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolyline', [ + 'uiGmapIPolyline', '$timeout', 'uiGmapPolylineChildModel', function(IPolyline, $timeout, PolylineChildModel) { + var Polyline; + return Polyline = (function(superClass) { + extend(Polyline, superClass); + + function Polyline() { + this.link = bind(this.link, this); + return Polyline.__super__.constructor.apply(this, arguments); + } + + Polyline.prototype.link = function(scope, element, attrs, mapCtrl) { + return IPolyline.mapPromise(scope, mapCtrl).then((function(_this) { + return function(gMap) { + if (angular.isUndefined(scope.path) || scope.path === null || !_this.validatePath(scope.path)) { + _this.$log.warn('polyline: no valid path attribute found'); + } + return new PolylineChildModel({ + scope: scope, + attrs: attrs, + gMap: gMap, + defaults: _this.DEFAULTS + }); + }; + })(this)); + }; + + return Polyline; + + })(IPolyline); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylines', [ + 'uiGmapIPolyline', '$timeout', 'uiGmapPolylinesParentModel', 'uiGmapPlural', function(IPolyline, $timeout, PolylinesParentModel, Plural) { + var Polylines; + return Polylines = (function(superClass) { + extend(Polylines, superClass); + + function Polylines() { + this.link = bind(this.link, this); + Polylines.__super__.constructor.call(this); + Plural.extend(this); + this.$log.info(this); + } + + Polylines.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(gMap) { + if (angular.isUndefined(scope.path) || scope.path === null) { + _this.$log.warn('polylines: no valid path attribute found'); + } + if (!scope.models) { + _this.$log.warn('polylines: no models found to create from'); + } + return Plural.link(scope, new PolylinesParentModel(scope, element, attrs, gMap, _this.DEFAULTS)); + }; + })(this)); + }; + + return Polylines; + + })(IPolyline); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapRectangle', [ + 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapIRectangle', 'uiGmapRectangleParentModel', function($log, GmapUtil, IRectangle, RectangleParentModel) { + return _.extend(IRectangle, { + link: function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then(function(gMap) { + return new RectangleParentModel(scope, element, attrs, gMap); + }); + } + }); + } + ]); + +}).call(this); +; +/*global angular:true */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindow', [ + 'uiGmapIWindow', 'uiGmapGmapUtil', 'uiGmapWindowChildModel', 'uiGmapLodash', 'uiGmapLogger', function(IWindow, GmapUtil, WindowChildModel, uiGmapLodash, $log) { + var Window; + return Window = (function(superClass) { + extend(Window, superClass); + + Window.include(GmapUtil); + + function Window() { + this.link = bind(this.link, this); + Window.__super__.constructor.call(this); + this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarker']; + this.template = ''; + $log.debug(this); + this.childWindows = []; + } + + Window.prototype.link = function(scope, element, attrs, ctrls) { + var markerCtrl, markerScope; + markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; + markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; + this.mapPromise = IWindow.mapPromise(scope, ctrls[0]); + return this.mapPromise.then((function(_this) { + return function(gMap) { + var isIconVisibleOnClick; + isIconVisibleOnClick = true; + if (angular.isDefined(attrs.isiconvisibleonclick)) { + isIconVisibleOnClick = scope.isIconVisibleOnClick; + } + if (!markerCtrl) { + _this.init(scope, element, isIconVisibleOnClick, gMap); + return; + } + return markerScope.deferred.promise.then(function(gMarker) { + return _this.init(scope, element, isIconVisibleOnClick, gMap, markerScope); + }); + }; + })(this)); + }; + + Window.prototype.init = function(scope, element, isIconVisibleOnClick, gMap, markerScope) { + var childWindow, defaults, gMarker, hasScopeCoords, opts; + defaults = scope.options != null ? scope.options : {}; + hasScopeCoords = (scope != null) && this.validateCoords(scope.coords); + if ((markerScope != null ? markerScope['getGMarker'] : void 0) != null) { + gMarker = markerScope.getGMarker(); + } + opts = hasScopeCoords ? this.createWindowOptions(gMarker, scope, element.html(), defaults) : defaults; + if (gMap != null) { + childWindow = new WindowChildModel({ + scope: scope, + opts: opts, + isIconVisibleOnClick: isIconVisibleOnClick, + gMap: gMap, + markerScope: markerScope, + element: element + }); + this.childWindows.push(childWindow); + scope.$on('$destroy', (function(_this) { + return function() { + _this.childWindows = uiGmapLodash.withoutObjects(_this.childWindows, [childWindow], function(child1, child2) { + return child1.scope.$id === child2.scope.$id; + }); + return _this.childWindows.length = 0; + }; + })(this)); + } + if (scope.control != null) { + scope.control.getGWindows = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.gObject; + }); + }; + })(this); + scope.control.getChildWindows = (function(_this) { + return function() { + return _this.childWindows; + }; + })(this); + scope.control.getPlurals = scope.control.getChildWindows; + scope.control.showWindow = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.showWindow(); + }); + }; + })(this); + scope.control.hideWindow = (function(_this) { + return function() { + return _this.childWindows.map(function(child) { + return child.hideWindow(); + }); + }; + })(this); + } + if ((this.onChildCreation != null) && (childWindow != null)) { + return this.onChildCreation(childWindow); + } + }; + + return Window; + + })(IWindow); + } + ]); + +}).call(this); +; +/*global angular */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindows', [ + 'uiGmapIWindow', 'uiGmapPlural', 'uiGmapWindowsParentModel', 'uiGmapPromise', 'uiGmapLogger', function(IWindow, Plural, WindowsParentModel, uiGmapPromise, $log) { + + /* + Windows directive where many windows map to the models property + */ + var Windows; + return Windows = (function(superClass) { + extend(Windows, superClass); + + function Windows() { + this.link = bind(this.link, this); + Windows.__super__.constructor.call(this); + this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarkers']; + this.template = ''; + Plural.extend(this); + $log.debug(this); + } + + Windows.prototype.link = function(scope, element, attrs, ctrls) { + var mapScope, markerCtrl, markerScope; + mapScope = ctrls[0].getScope(); + markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; + markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; + return mapScope.deferred.promise.then((function(_this) { + return function(map) { + var promise, ref; + promise = (markerScope != null ? (ref = markerScope.deferred) != null ? ref.promise : void 0 : void 0) || uiGmapPromise.resolve(); + return promise.then(function() { + var pieces, ref1; + pieces = (ref1 = _this.parentModel) != null ? ref1.existingPieces : void 0; + if (pieces) { + return pieces.then(function() { + return _this.init(scope, element, attrs, ctrls, map, markerScope); + }); + } else { + return _this.init(scope, element, attrs, ctrls, map, markerScope); + } + }); + }; + })(this)); + }; + + Windows.prototype.init = function(scope, element, attrs, ctrls, map, additionalScope) { + var parentModel; + parentModel = new WindowsParentModel(scope, element, attrs, ctrls, map, additionalScope); + Plural.link(scope, parentModel); + if (scope.control != null) { + scope.control.getGWindows = function() { + return parentModel.plurals.map(function(child) { + return child.gObject; + }); + }; + return scope.control.getChildWindows = function() { + return parentModel.plurals; + }; + } + }; + + return Windows; + + })(IWindow); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Nick Baugh - https://github.com/niftylettuce + */ + + +/*globals angular */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", ['uiGmapMap', function(uiGmapMap) { + return new uiGmapMap(); + }]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map marker directive + +This directive is used to create a marker on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute icon optional} string url to image used for marker icon +{attribute animate optional} if set to false, the marker won't be animated (on by default) + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapMarker', [ + '$timeout', 'uiGmapMarker', function($timeout, Marker) { + return new Marker($timeout); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map marker directive + +This directive is used to create a marker on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute icon optional} string url to image used for marker icon +{attribute animate optional} if set to false, the marker won't be animated (on by default) + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapMarkers', [ + '$timeout', 'uiGmapMarkers', function($timeout, Markers) { + return new Markers($timeout); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolygon', [ + 'uiGmapPolygon', function(Polygon) { + return new Polygon(); + } + ]); + +}).call(this); +; +/* +@authors +Julian Popescu - https://github.com/jpopesculian +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive("uiGmapCircle", [ + "uiGmapCircle", function(Circle) { + return Circle; + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapPolyline", [ + "uiGmapPolyline", function(Polyline) { + return new Polyline(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolylines', [ + 'uiGmapPolylines', function(Polylines) { + return new Polylines(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Chentsu Lin - https://github.com/ChenTsuLin + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapRectangle", [ + "uiGmapLogger", "uiGmapRectangle", function($log, Rectangle) { + return Rectangle; + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map info window directive + +This directive is used to create an info window on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute show optional} map will show when this expression returns true + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapWindow", [ + "$timeout", "$compile", "$http", "$templateCache", "uiGmapWindow", function($timeout, $compile, $http, $templateCache, Window) { + return new Window($timeout, $compile, $http, $templateCache); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map info window directive + +This directive is used to create an info window on an existing map. +This directive creates a new scope. + +{attribute coords required} object containing latitude and longitude properties +{attribute show optional} map will show when this expression returns true + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapWindows", [ + "$timeout", "$compile", "$http", "$templateCache", "$interpolate", "uiGmapWindows", function($timeout, $compile, $http, $templateCache, $interpolate, Windows) { + return new Windows($timeout, $compile, $http, $templateCache, $interpolate); + } + ]); + +}).call(this); +; +/* +@authors: +- Nicolas Laplante https://plus.google.com/108189012221374960701 +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +Map Layer directive + +This directive is used to create any type of Layer from the google maps sdk. +This directive creates a new scope. + +{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps').directive('uiGmapLayer', [ + '$timeout', 'uiGmapLogger', 'uiGmapLayerParentModel', function($timeout, Logger, LayerParentModel) { + var Layer; + Layer = (function() { + function Layer() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + show: '=show', + type: '=type', + namespace: '=namespace', + options: '=options', + onCreated: '&oncreated' + }; + } + + Layer.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + if (scope.onCreated != null) { + return new LayerParentModel(scope, element, attrs, map, scope.onCreated); + } else { + return new LayerParentModel(scope, element, attrs, map); + } + }; + })(this)); + }; + + return Layer; + + })(); + return new Layer(); + } + ]); + +}).call(this); +; +/* +@authors +Adam Kreitals, kreitals@hotmail.com + */ + + +/* +mapControl directive + +This directive is used to create a custom control element on an existing map. +This directive creates a new scope. + +{attribute template required} string url of the template to be used for the control +{attribute position optional} string position of the control of the form top-left or TOP_LEFT defaults to TOP_CENTER +{attribute controller optional} string controller to be applied to the template +{attribute index optional} number index for controlling the order of similarly positioned mapControl elements + */ + +(function() { + angular.module("uiGmapgoogle-maps").directive("uiGmapMapControl", [ + "uiGmapControl", function(Control) { + return new Control(); + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapDragZoom', [ + 'uiGmapDragZoom', function(DragZoom) { + return DragZoom; + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').directive("uiGmapDrawingManager", [ + "uiGmapDrawingManager", function(DrawingManager) { + return DrawingManager; + } + ]); + +}).call(this); +; +/* +@authors +Nicholas McCready - https://twitter.com/nmccready + * Brunt of the work is in DrawFreeHandChildModel + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapFreeDrawPolygons', [ + 'uiGmapApiFreeDrawPolygons', function(FreeDrawPolygons) { + return new FreeDrawPolygons(); + } + ]); + +}).call(this); +; +/* +Map Layer directive + +This directive is used to create any type of Layer from the google maps sdk. +This directive creates a new scope. + +{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module("uiGmapgoogle-maps").directive("uiGmapMapType", [ + "$timeout", "uiGmapLogger", "uiGmapMapTypeParentModel", function($timeout, Logger, MapTypeParentModel) { + var MapType; + MapType = (function() { + function MapType() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = "EMA"; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + show: "=show", + options: '=options', + refresh: '=refresh', + id: '@' + }; + } + + MapType.prototype.link = function(scope, element, attrs, mapCtrl) { + return mapCtrl.getScope().deferred.promise.then((function(_this) { + return function(map) { + return new MapTypeParentModel(scope, element, attrs, map); + }; + })(this)); + }; + + return MapType; + + })(); + return new MapType(); + } + ]); + +}).call(this); +; +/* +@authors +Nicolas Laplante - https://plus.google.com/108189012221374960701 +Nicholas McCready - https://twitter.com/nmccready +Rick Huizinga - https://plus.google.com/+RickHuizinga + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapPolygons', [ + 'uiGmapPolygons', function(Polygons) { + return new Polygons(); + } + ]); + +}).call(this); +; +/* +@authors: +- Nicolas Laplante https://plus.google.com/108189012221374960701 +- Nicholas McCready - https://twitter.com/nmccready +- Carrie Kengle - http://about.me/carrie + */ + + +/* +Places Search Box directive + +This directive is used to create a Places Search Box. +This directive creates a new scope. + +{attribute input required} HTMLInputElement +{attribute options optional} The options that can be set on a SearchBox object (google.maps.places.SearchBoxOptions object specification) + */ + +(function() { + var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + angular.module('uiGmapgoogle-maps').directive('uiGmapSearchBox', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapSearchBoxParentModel', '$http', '$templateCache', '$compile', function(GoogleMapApi, Logger, SearchBoxParentModel, $http, $templateCache, $compile) { + var SearchBox; + SearchBox = (function() { + SearchBox.prototype.require = 'ngModel'; + + function SearchBox() { + this.link = bind(this.link, this); + this.$log = Logger; + this.restrict = 'EMA'; + this.require = '^' + 'uiGmapGoogleMap'; + this.priority = -1; + this.transclude = true; + this.template = ''; + this.replace = true; + this.scope = { + template: '=template', + events: '=events', + position: '=?position', + options: '=?options', + parentdiv: '=?parentdiv', + ngModel: "=?" + }; + } + + SearchBox.prototype.link = function(scope, element, attrs, mapCtrl) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + if (scope.template == null) { + $templateCache.put('uigmap-searchbox-default.tpl.html', ''); + scope.template = 'uigmap-searchbox-default.tpl.html'; + } + return $http.get(scope.template, { + cache: $templateCache + }).success(function(template) { + if (angular.isUndefined(scope.events)) { + _this.$log.error('searchBox: the events property is required'); + return; + } + return mapCtrl.getScope().deferred.promise.then(function(map) { + var ctrlPosition; + ctrlPosition = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_LEFT'; + if (!maps.ControlPosition[ctrlPosition]) { + _this.$log.error('searchBox: invalid position property'); + return; + } + return new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, $compile(template)(scope)); + }); + }); + }; + })(this)); + }; + + return SearchBox; + + })(); + return new SearchBox(); + } + ]); + +}).call(this); +;(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapShow', [ + '$animate', 'uiGmapLogger', function($animate, $log) { + return { + scope: { + 'uiGmapShow': '=', + 'uiGmapAfterShow': '&', + 'uiGmapAfterHide': '&' + }, + link: function(scope, element) { + var angular_post_1_3_handle, angular_pre_1_3_handle, handle; + angular_post_1_3_handle = function(animateAction, cb) { + return $animate[animateAction](element, 'ng-hide').then(function() { + return cb(); + }); + }; + angular_pre_1_3_handle = function(animateAction, cb) { + return $animate[animateAction](element, 'ng-hide', cb); + }; + handle = function(animateAction, cb) { + if (angular.version.major > 1) { + return $log.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is " + angular.version.major + "\""); + } + if (angular.version.major === 1 && angular.version.minor < 3) { + return angular_pre_1_3_handle(animateAction, cb); + } + return angular_post_1_3_handle(animateAction, cb); + }; + return scope.$watch('uiGmapShow', function(show) { + if (show) { + handle('removeClass', scope.uiGmapAfterShow); + } + if (!show) { + return handle('addClass', scope.uiGmapAfterHide); + } + }); + } + }; + } + ]); + +}).call(this); +; +/* +@authors: +- Nicholas McCready - https://twitter.com/nmccready + */ + + +/* +StreetViewPanorama Directive to care of basic initialization of StreetViewPanorama + */ + +(function() { + angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [ + 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) { + var name; + name = 'uiGmapStreetViewPanorama'; + return { + restrict: 'EMA', + template: '
', + replace: true, + scope: { + focalcoord: '=', + radius: '=?', + events: '=?', + options: '=?', + control: '=?', + povoptions: '=?', + imagestatus: '=' + }, + link: function(scope, element, attrs) { + return GoogleMapApi.then((function(_this) { + return function(maps) { + var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv; + pano = void 0; + sv = void 0; + didCreateOptionsFromDirective = false; + listeners = void 0; + opts = null; + povOpts = null; + clean = function() { + EventsHelper.removeEvents(listeners); + if (pano != null) { + pano.unbind('position'); + pano.setVisible(false); + } + if (sv != null) { + if ((sv != null ? sv.setVisible : void 0) != null) { + sv.setVisible(false); + } + return sv = void 0; + } + }; + handleSettings = function(perspectivePoint, focalPoint) { + var heading; + heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint); + didCreateOptionsFromDirective = true; + scope.radius = scope.radius || 50; + povOpts = angular.extend({ + heading: heading, + zoom: 1, + pitch: 0 + }, scope.povoptions || {}); + opts = opts = angular.extend({ + navigationControl: false, + addressControl: false, + linksControl: false, + position: perspectivePoint, + pov: povOpts, + visible: true + }, scope.options || {}); + return didCreateOptionsFromDirective = false; + }; + create = function() { + var focalPoint; + if (!scope.focalcoord) { + $log.error(name + ": focalCoord needs to be defined"); + return; + } + if (!scope.radius) { + $log.error(name + ": needs a radius to set the camera view from its focal target."); + return; + } + clean(); + if (sv == null) { + sv = new google.maps.StreetViewService(); + } + if (scope.events) { + listeners = EventsHelper.setEvents(sv, scope, scope); + } + focalPoint = GmapUtil.getCoords(scope.focalcoord); + return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) { + var ele, perspectivePoint, ref; + if (scope.imagestatus != null) { + scope.imagestatus = status; + } + if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) { + scope.events.image_status_changed(sv, 'image_status_changed', scope, status); + } + if (status === "OK") { + perspectivePoint = streetViewPanoramaData.location.latLng; + handleSettings(perspectivePoint, focalPoint); + ele = element[0]; + return pano = new google.maps.StreetViewPanorama(ele, opts); + } + }); + }; + if (scope.control != null) { + scope.control.getOptions = function() { + return opts; + }; + scope.control.getPovOptions = function() { + return povOpts; + }; + scope.control.getGObject = function() { + return sv; + }; + scope.control.getGPano = function() { + return pano; + }; + } + scope.$watch('options', function(newValue, oldValue) { + if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) { + return; + } + return create(); + }); + firstTime = true; + scope.$watch('focalcoord', function(newValue, oldValue) { + if (newValue === oldValue && !firstTime) { + return; + } + if (newValue == null) { + return; + } + firstTime = false; + return create(); + }); + return scope.$on('$destroy', function() { + return clean(); + }); + }; + })(this)); + } + }; + } + ]); + +}).call(this); +;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapuuid', function() { + //BEGIN REPLACE + /* istanbul ignore next */ + /* + Version: core-1.0 + The MIT License: Copyright (c) 2012 LiosK. +*/ +function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c}; + + //END REPLACE +return UUID; +}); +;// wrap the utility libraries needed in ./lib +// http://google-maps-utility-library-v3.googlecode.com/svn/ +angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapGoogleMapsUtilV3', function () { + return { + init: _.once(function () { + //BEGIN REPLACE + /* istanbul ignore next */ + +function(){ + function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=cluster,this.className_=cluster.getMarkerClusterer().getClusterClass(),this.styles_=styles,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(cluster.getMap())}function Cluster(mc){this.markerClusterer_=mc,this.map_=mc.getMap(),this.gridSize_=mc.getGridSize(),this.minClusterSize_=mc.getMinimumClusterSize(),this.averageCenter_=mc.getAverageCenter(),this.hideLabel_=mc.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView),opt_markers=opt_markers||[],opt_options=opt_options||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=opt_options.gridSize||60,this.minClusterSize_=opt_options.minimumClusterSize||2,this.maxZoom_=opt_options.maxZoom||null,this.styles_=opt_options.styles||[],this.title_=opt_options.title||"",this.zoomOnClick_=!0,void 0!==opt_options.zoomOnClick&&(this.zoomOnClick_=opt_options.zoomOnClick),this.averageCenter_=!1,void 0!==opt_options.averageCenter&&(this.averageCenter_=opt_options.averageCenter),this.ignoreHidden_=!1,void 0!==opt_options.ignoreHidden&&(this.ignoreHidden_=opt_options.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==opt_options.enableRetinaIcons&&(this.enableRetinaIcons_=opt_options.enableRetinaIcons),this.hideLabel_=!1,void 0!==opt_options.hideLabel&&(this.hideLabel_=opt_options.hideLabel),this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=opt_options.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=opt_options.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(opt_markers,!0),this.setMap(map)}ClusterIcon.prototype.onAdd=function(){var cMouseDownInCluster,cDraggingMapByCluster,cClusterIcon=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){cDraggingMapByCluster=cMouseDownInCluster}),google.maps.event.addDomListener(this.div_,"mousedown",function(){cMouseDownInCluster=!0,cDraggingMapByCluster=!1}),google.maps.event.addDomListener(this.div_,"click",function(e){if(cMouseDownInCluster=!1,!cDraggingMapByCluster){var theBounds,mz,mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"click",cClusterIcon.cluster_),google.maps.event.trigger(mc,"clusterclick",cClusterIcon.cluster_),mc.getZoomOnClick()&&(mz=mc.getMaxZoom(),theBounds=cClusterIcon.cluster_.getBounds(),mc.getMap().fitBounds(theBounds),setTimeout(function(){mc.getMap().fitBounds(theBounds),null!==mz&&mc.getMap().getZoom()>mz&&mc.getMap().setZoom(mz+1)},100)),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseover",cClusterIcon.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,"mouseout",cClusterIcon.cluster_)})},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+"px",this.div_.style.left=pos.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var img="",bp=this.backgroundPosition_.split(" "),spriteH=parseInt(bp[0].trim(),10),spriteV=parseInt(bp[1].trim(),10),pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos),img="",this.div_.innerHTML=img+"
"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"
",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.useStyle=function(sums){this.sums_=sums;var index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);var style=this.styles_[index];this.url_=style.url,this.height_=style.height,this.width_=style.width,this.anchorText_=style.anchorText||[0,0],this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=style.textColor||"black",this.textSize_=style.textSize||11,this.textDecoration_=style.textDecoration||"none",this.fontWeight_=style.fontWeight||"bold",this.fontStyle_=style.fontStyle||"normal",this.fontFamily_=style.fontFamily||"Arial,sans-serif",this.backgroundPosition_=style.backgroundPosition||"0 0"},ClusterIcon.prototype.setCenter=function(center){this.center_=center},ClusterIcon.prototype.createCss=function(pos){var style=[];return style.push("cursor: pointer;"),style.push("position: absolute; top: "+pos.y+"px; left: "+pos.x+"px;"),style.push("width: "+this.width_+"px; height: "+this.height_+"px;"),style.join("")},ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);return pos.x-=this.anchorIcon_[1],pos.y-=this.anchorIcon_[0],pos.x=parseInt(pos.x,10),pos.y=parseInt(pos.y,10),pos},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){var i,bounds=new google.maps.LatLngBounds(this.center_,this.center_),markers=this.getMarkers();for(i=0;imz)marker.getMap()!==this.map_&&marker.setMap(this.map_);else if(mCounti;i++)this.markers_[i].setMap(null);else marker.setMap(null);return!0},Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())},Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)},Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length,mz=this.markerClusterer_.getMaxZoom();if(null!==mz&&this.map_.getZoom()>mz)return void this.clusterIcon_.hide();if(mCounti;i++)if(marker===this.markers_[i])return!0;return!1},MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){cMarkerClusterer.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){cMarkerClusterer.redraw_()})]},MarkerClusterer.prototype.onRemove=function(){var i;for(i=0;i0))for(i=0;id&&(distance=d,clusterToAddTo=cluster));clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker)?clusterToAddTo.addMarker(marker):(cluster=new Cluster(this),cluster.addMarker(marker),this.clusters_.push(cluster))},MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker,mapBounds,cMarkerClusterer=this;if(this.ready_){0===iFirst&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),mapBounds=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var bounds=this.getExtendedBounds(mapBounds),iLast=Math.min(iFirst+this.batchSize_,this.markers_.length);for(i=iFirst;iLast>i;i++)marker=this.markers_[i],!marker.isAdded&&this.isMarkerInBounds_(marker,bounds)&&(!this.ignoreHidden_||this.ignoreHidden_&&marker.getVisible())&&this.addToClosestCluster_(marker);if(iLastOverlayView class. + *

+ * An InfoBox behaves like a google.maps.InfoWindow, but it supports several + * additional properties for advanced styling. An InfoBox can also be used as a map label. + *

+ * An InfoBox also fires the same events as a google.maps.InfoWindow. + */ + +/*jslint browser:true */ +/*global google */ + +/** + * @name InfoBoxOptions + * @class This class represents the optional parameter passed to the {@link InfoBox} constructor. + * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node). + * @property {boolean} [disableAutoPan=false] Disable auto-pan on open. + * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. + * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox + * (or the bottom left corner if the alignBottom property is true) + * to the map pixel corresponding to position. + * @property {LatLng} position The geographic location at which to display the InfoBox. + * @property {number} zIndex The CSS z-index style value for the InfoBox. + * Note: This value overrides a zIndex setting specified in the boxStyle property. + * @property {string} [boxClass="infoBox"] The name of the CSS class defining the styles for the InfoBox container. + * @property {Object} [boxStyle] An object literal whose properties define specific CSS + * style values to be applied to the InfoBox. Style values defined here override those that may + * be defined in the boxClass style sheet. If this property is changed after the + * InfoBox has been created, all previously set styles (except those defined in the style sheet) + * are removed from the InfoBox before the new style values are applied. + * @property {string} closeBoxMargin The CSS margin style value for the close box. + * The default is "2px" (a 2-pixel margin on all sides). + * @property {string} closeBoxURL The URL of the image representing the close box. + * Note: The default is the URL for Google's standard close box. + * Set this property to "" if no close box is required. + * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the + * map edge after an auto-pan. + * @property {boolean} [isHidden=false] Hide the InfoBox on open. + * [Deprecated in favor of the visible property.] + * @property {boolean} [visible=true] Show the InfoBox on open. + * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the position + * location (default is false which means that the top left corner of the InfoBox is aligned). + * @property {string} pane The pane where the InfoBox is to appear (default is "floatPane"). + * Set the pane to "mapPane" if the InfoBox is being used as a map label. + * Valid pane names are the property names for the google.maps.MapPanes object. + * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout, + * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox + * (default is false to mimic the behavior of a google.maps.InfoWindow). Set + * this property to true if the InfoBox is being used as a map label. + */ + +/** + * Creates an InfoBox with the options specified in {@link InfoBoxOptions}. + * Call InfoBox.open to add the box to the map. + * @constructor + * @param {InfoBoxOptions} [opt_opts] + */ +function InfoBox(opt_opts) { + + opt_opts = opt_opts || {}; + + google.maps.OverlayView.apply(this, arguments); + + // Standard options (in common with google.maps.InfoWindow): + // + this.content_ = opt_opts.content || ""; + this.disableAutoPan_ = opt_opts.disableAutoPan || false; + this.maxWidth_ = opt_opts.maxWidth || 0; + this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0); + this.position_ = opt_opts.position || new google.maps.LatLng(0, 0); + this.zIndex_ = opt_opts.zIndex || null; + + // Additional options (unique to InfoBox): + // + this.boxClass_ = opt_opts.boxClass || "infoBox"; + this.boxStyle_ = opt_opts.boxStyle || {}; + this.closeBoxMargin_ = opt_opts.closeBoxMargin || "2px"; + this.closeBoxURL_ = opt_opts.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif"; + if (opt_opts.closeBoxURL === "") { + this.closeBoxURL_ = ""; + } + this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1); + + if (typeof opt_opts.visible === "undefined") { + if (typeof opt_opts.isHidden === "undefined") { + opt_opts.visible = true; + } else { + opt_opts.visible = !opt_opts.isHidden; + } + } + this.isHidden_ = !opt_opts.visible; + + this.alignBottom_ = opt_opts.alignBottom || false; + this.pane_ = opt_opts.pane || "floatPane"; + this.enableEventPropagation_ = opt_opts.enableEventPropagation || false; + + this.div_ = null; + this.closeListener_ = null; + this.moveListener_ = null; + this.contextListener_ = null; + this.eventListeners_ = null; + this.fixedWidthSet_ = null; +} + +/* InfoBox extends OverlayView in the Google Maps API v3. + */ +InfoBox.prototype = new google.maps.OverlayView(); + +/** + * Creates the DIV representing the InfoBox. + * @private + */ +InfoBox.prototype.createInfoBoxDiv_ = function () { + + var i; + var events; + var bw; + var me = this; + + // This handler prevents an event in the InfoBox from being passed on to the map. + // + var cancelHandler = function (e) { + e.cancelBubble = true; + if (e.stopPropagation) { + e.stopPropagation(); + } + }; + + // This handler ignores the current event in the InfoBox and conditionally prevents + // the event from being passed on to the map. It is used for the contextmenu event. + // + var ignoreHandler = function (e) { + + e.returnValue = false; + + if (e.preventDefault) { + + e.preventDefault(); + } + + if (!me.enableEventPropagation_) { + + cancelHandler(e); + } + }; + + if (!this.div_) { + + this.div_ = document.createElement("div"); + + this.setBoxStyle_(); + + if (typeof this.content_.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + this.content_; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(this.content_); + } + + // Add the InfoBox DIV to the DOM + this.getPanes()[this.pane_].appendChild(this.div_); + + this.addClickHandler_(); + + if (this.div_.style.width) { + + this.fixedWidthSet_ = true; + + } else { + + if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) { + + this.div_.style.width = this.maxWidth_; + this.div_.style.overflow = "auto"; + this.fixedWidthSet_ = true; + + } else { // The following code is needed to overcome problems with MSIE + + bw = this.getBoxWidths_(); + + this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + "px"; + this.fixedWidthSet_ = false; + } + } + + this.panBox_(this.disableAutoPan_); + + if (!this.enableEventPropagation_) { + + this.eventListeners_ = []; + + // Cancel event propagation. + // + // Note: mousemove not included (to resolve Issue 152) + events = ["mousedown", "mouseover", "mouseout", "mouseup", + "click", "dblclick", "touchstart", "touchend", "touchmove"]; + + for (i = 0; i < events.length; i++) { + + this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); + } + + // Workaround for Google bug that causes the cursor to change to a pointer + // when the mouse moves over a marker underneath InfoBox. + this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e) { + this.style.cursor = "default"; + })); + } + + this.contextListener_ = google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); + + /** + * This event is fired when the DIV containing the InfoBox's content is attached to the DOM. + * @name InfoBox#domready + * @event + */ + google.maps.event.trigger(this, "domready"); + } +}; + +/** + * Returns the HTML tag for the close box. + * @private + */ +InfoBox.prototype.getCloseBoxImg_ = function () { + + var img = ""; + + if (this.closeBoxURL_ !== "") { + + img = " mapWidth) { + xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; + } + if (this.alignBottom_) { + if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) { + yOffset = pixPosition.y + iwOffsetY - padY - iwHeight; + } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) { + yOffset = pixPosition.y + iwOffsetY + padY - mapHeight; + } + } else { + if (pixPosition.y < (-iwOffsetY + padY)) { + yOffset = pixPosition.y + iwOffsetY - padY; + } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) { + yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; + } + } + + if (!(xOffset === 0 && yOffset === 0)) { + + // Move the map to the shifted center. + // + var c = map.getCenter(); + map.panBy(xOffset, yOffset); + } + } + } +}; + +/** + * Sets the style of the InfoBox by setting the style sheet and applying + * other specific styles requested. + * @private + */ +InfoBox.prototype.setBoxStyle_ = function () { + + var i, boxStyle; + + if (this.div_) { + + // Apply style values from the style sheet defined in the boxClass parameter: + this.div_.className = this.boxClass_; + + // Clear existing inline style values: + this.div_.style.cssText = ""; + + // Apply style values defined in the boxStyle parameter: + boxStyle = this.boxStyle_; + for (i in boxStyle) { + + if (boxStyle.hasOwnProperty(i)) { + + this.div_.style[i] = boxStyle[i]; + } + } + + // Fix for iOS disappearing InfoBox problem. + // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad + this.div_.style.WebkitTransform = "translateZ(0)"; + + // Fix up opacity style for benefit of MSIE: + // + if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") { + // See http://www.quirksmode.org/css/opacity.html + this.div_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(Opacity=" + (this.div_.style.opacity * 100) + ")\""; + this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; + } + + // Apply required styles: + // + this.div_.style.position = "absolute"; + this.div_.style.visibility = 'hidden'; + if (this.zIndex_ !== null) { + + this.div_.style.zIndex = this.zIndex_; + } + } +}; + +/** + * Get the widths of the borders of the InfoBox. + * @private + * @return {Object} widths object (top, bottom left, right) + */ +InfoBox.prototype.getBoxWidths_ = function () { + + var computedStyle; + var bw = {top: 0, bottom: 0, left: 0, right: 0}; + var box = this.div_; + + if (document.defaultView && document.defaultView.getComputedStyle) { + + computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, ""); + + if (computedStyle) { + + // The computed styles are always in pixel units (good!) + bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; + } + + } else if (document.documentElement.currentStyle) { // MSIE + + if (box.currentStyle) { + + // The current styles may not be in pixel units, but assume they are (bad!) + bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0; + } + } + + return bw; +}; + +/** + * Invoked when close is called. Do not call it directly. + */ +InfoBox.prototype.onRemove = function () { + + if (this.div_) { + + this.div_.parentNode.removeChild(this.div_); + this.div_ = null; + } +}; + +/** + * Draws the InfoBox based on the current map projection and zoom level. + */ +InfoBox.prototype.draw = function () { + + this.createInfoBoxDiv_(); + + var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_); + + this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + "px"; + + if (this.alignBottom_) { + this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + "px"; + } else { + this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + "px"; + } + + if (this.isHidden_) { + + this.div_.style.visibility = "hidden"; + + } else { + + this.div_.style.visibility = "visible"; + } +}; + +/** + * Sets the options for the InfoBox. Note that changes to the maxWidth, + * closeBoxMargin, closeBoxURL, and enableEventPropagation + * properties have no affect until the current InfoBox is closed and a new one + * is opened. + * @param {InfoBoxOptions} opt_opts + */ +InfoBox.prototype.setOptions = function (opt_opts) { + if (typeof opt_opts.boxClass !== "undefined") { // Must be first + + this.boxClass_ = opt_opts.boxClass; + this.setBoxStyle_(); + } + if (typeof opt_opts.boxStyle !== "undefined") { // Must be second + + this.boxStyle_ = opt_opts.boxStyle; + this.setBoxStyle_(); + } + if (typeof opt_opts.content !== "undefined") { + + this.setContent(opt_opts.content); + } + if (typeof opt_opts.disableAutoPan !== "undefined") { + + this.disableAutoPan_ = opt_opts.disableAutoPan; + } + if (typeof opt_opts.maxWidth !== "undefined") { + + this.maxWidth_ = opt_opts.maxWidth; + } + if (typeof opt_opts.pixelOffset !== "undefined") { + + this.pixelOffset_ = opt_opts.pixelOffset; + } + if (typeof opt_opts.alignBottom !== "undefined") { + + this.alignBottom_ = opt_opts.alignBottom; + } + if (typeof opt_opts.position !== "undefined") { + + this.setPosition(opt_opts.position); + } + if (typeof opt_opts.zIndex !== "undefined") { + + this.setZIndex(opt_opts.zIndex); + } + if (typeof opt_opts.closeBoxMargin !== "undefined") { + + this.closeBoxMargin_ = opt_opts.closeBoxMargin; + } + if (typeof opt_opts.closeBoxURL !== "undefined") { + + this.closeBoxURL_ = opt_opts.closeBoxURL; + } + if (typeof opt_opts.infoBoxClearance !== "undefined") { + + this.infoBoxClearance_ = opt_opts.infoBoxClearance; + } + if (typeof opt_opts.isHidden !== "undefined") { + + this.isHidden_ = opt_opts.isHidden; + } + if (typeof opt_opts.visible !== "undefined") { + + this.isHidden_ = !opt_opts.visible; + } + if (typeof opt_opts.enableEventPropagation !== "undefined") { + + this.enableEventPropagation_ = opt_opts.enableEventPropagation; + } + + if (this.div_) { + + this.draw(); + } +}; + +/** + * Sets the content of the InfoBox. + * The content can be plain text or an HTML DOM node. + * @param {string|Node} content + */ +InfoBox.prototype.setContent = function (content) { + this.content_ = content; + + if (this.div_) { + + if (this.closeListener_) { + + google.maps.event.removeListener(this.closeListener_); + this.closeListener_ = null; + } + + // Odd code required to make things work with MSIE. + // + if (!this.fixedWidthSet_) { + + this.div_.style.width = ""; + } + + if (typeof content.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + content; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(content); + } + + // Perverse code required to make things work with MSIE. + // (Ensures the close box does, in fact, float to the right.) + // + if (!this.fixedWidthSet_) { + this.div_.style.width = this.div_.offsetWidth + "px"; + if (typeof content.nodeType === "undefined") { + this.div_.innerHTML = this.getCloseBoxImg_() + content; + } else { + this.div_.innerHTML = this.getCloseBoxImg_(); + this.div_.appendChild(content); + } + } + + this.addClickHandler_(); + } + + /** + * This event is fired when the content of the InfoBox changes. + * @name InfoBox#content_changed + * @event + */ + google.maps.event.trigger(this, "content_changed"); +}; + +/** + * Sets the geographic location of the InfoBox. + * @param {LatLng} latlng + */ +InfoBox.prototype.setPosition = function (latlng) { + + this.position_ = latlng; + + if (this.div_) { + + this.draw(); + } + + /** + * This event is fired when the position of the InfoBox changes. + * @name InfoBox#position_changed + * @event + */ + google.maps.event.trigger(this, "position_changed"); +}; + +/** + * Sets the zIndex style for the InfoBox. + * @param {number} index + */ +InfoBox.prototype.setZIndex = function (index) { + + this.zIndex_ = index; + + if (this.div_) { + + this.div_.style.zIndex = index; + } + + /** + * This event is fired when the zIndex of the InfoBox changes. + * @name InfoBox#zindex_changed + * @event + */ + google.maps.event.trigger(this, "zindex_changed"); +}; + +/** + * Sets the visibility of the InfoBox. + * @param {boolean} isVisible + */ +InfoBox.prototype.setVisible = function (isVisible) { + + this.isHidden_ = !isVisible; + if (this.div_) { + this.div_.style.visibility = (this.isHidden_ ? "hidden" : "visible"); + } +}; + +/** + * Returns the content of the InfoBox. + * @returns {string} + */ +InfoBox.prototype.getContent = function () { + + return this.content_; +}; + +/** + * Returns the geographic location of the InfoBox. + * @returns {LatLng} + */ +InfoBox.prototype.getPosition = function () { + + return this.position_; +}; + +/** + * Returns the zIndex for the InfoBox. + * @returns {number} + */ +InfoBox.prototype.getZIndex = function () { + + return this.zIndex_; +}; + +/** + * Returns a flag indicating whether the InfoBox is visible. + * @returns {boolean} + */ +InfoBox.prototype.getVisible = function () { + + var isVisible; + + if ((typeof this.getMap() === "undefined") || (this.getMap() === null)) { + isVisible = false; + } else { + isVisible = !this.isHidden_; + } + return isVisible; +}; + +/** + * Shows the InfoBox. [Deprecated; use setVisible instead.] + */ +InfoBox.prototype.show = function () { + + this.isHidden_ = false; + if (this.div_) { + this.div_.style.visibility = "visible"; + } +}; + +/** + * Hides the InfoBox. [Deprecated; use setVisible instead.] + */ +InfoBox.prototype.hide = function () { + + this.isHidden_ = true; + if (this.div_) { + this.div_.style.visibility = "hidden"; + } +}; + +/** + * Adds the InfoBox to the specified map or Street View panorama. If anchor + * (usually a google.maps.Marker) is specified, the position + * of the InfoBox is set to the position of the anchor. If the + * anchor is dragged to a new location, the InfoBox moves as well. + * @param {Map|StreetViewPanorama} map + * @param {MVCObject} [anchor] + */ +InfoBox.prototype.open = function (map, anchor) { + + var me = this; + + if (anchor) { + + this.position_ = anchor.getPosition(); + this.moveListener_ = google.maps.event.addListener(anchor, "position_changed", function () { + me.setPosition(this.getPosition()); + }); + } + + this.setMap(map); + + if (this.div_) { + + this.panBox_(); + } +}; + +/** + * Removes the InfoBox from the map. + */ +InfoBox.prototype.close = function () { + + var i; + + if (this.closeListener_) { + + google.maps.event.removeListener(this.closeListener_); + this.closeListener_ = null; + } + + if (this.eventListeners_) { + + for (i = 0; i < this.eventListeners_.length; i++) { + + google.maps.event.removeListener(this.eventListeners_[i]); + } + this.eventListeners_ = null; + } + + if (this.moveListener_) { + + google.maps.event.removeListener(this.moveListener_); + this.moveListener_ = null; + } + + if (this.contextListener_) { + + google.maps.event.removeListener(this.contextListener_); + this.contextListener_ = null; + } + + this.setMap(null); +}; + +/** + * google-maps-utility-library-v3-keydragzoom + * + * @version: 2.0.9 + * @author: Nianwei Liu [nianwei at gmail dot com] & Gary Little [gary at luxcentral dot com] + * @contributors: undefined + * @date: Fri May 13 2016 13:45:18 GMT-0400 (EDT) + * @license: Apache License 2.0 + */ +/** + * @fileoverview This library adds a drag zoom capability to a V3 Google map. + * When drag zoom is enabled, holding down a designated hot key (shift | ctrl | alt) + * while dragging a box around an area of interest will zoom the map in to that area when + * the mouse button is released. Optionally, a visual control can also be supplied for turning + * a drag zoom operation on and off. + * Only one line of code is needed: google.maps.Map.enableKeyDragZoom(); + *

+ * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2, + * it causes a context menu to appear when running on the Macintosh. + *

+ * Note that if the map's container has a border around it, the border widths must be specified + * in pixel units (or as thin, medium, or thick). This is required because of an MSIE limitation. + *

NL: 2009-05-28: initial port to core API V3. + *
NL: 2009-11-02: added a temp fix for -moz-transform for FF3.5.x using code from Paul Kulchenko (http://notebook.kulchenko.com/maps/gridmove). + *
NL: 2010-02-02: added a fix for IE flickering on divs onmousemove, caused by scroll value when get mouse position. + *
GL: 2010-06-15: added a visual control option. + */ +(function () { + /*jslint browser:true */ + /*global window,google */ + /* Utility functions use "var funName=function()" syntax to allow use of the */ + /* Dean Edwards Packer compression tool (with Shrink variables, without Base62 encode). */ + + /** + * Converts "thin", "medium", and "thick" to pixel widths + * in an MSIE environment. Not called for other browsers + * because getComputedStyle() returns pixel widths automatically. + * @param {string} widthValue The value of the border width parameter. + */ + var toPixels = function (widthValue) { + var px; + switch (widthValue) { + case "thin": + px = "2px"; + break; + case "medium": + px = "4px"; + break; + case "thick": + px = "6px"; + break; + default: + px = widthValue; + } + return px; + }; + /** + * Get the widths of the borders of an HTML element. + * + * @param {Node} h The HTML element. + * @return {Object} The width object {top, bottom left, right}. + */ + var getBorderWidths = function (h) { + var computedStyle; + var bw = {}; + if (document.defaultView && document.defaultView.getComputedStyle) { + computedStyle = h.ownerDocument.defaultView.getComputedStyle(h, ""); + if (computedStyle) { + // The computed styles are always in pixel units (good!) + bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; + bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; + bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; + return bw; + } + } else if (document.documentElement.currentStyle) { // MSIE + if (h.currentStyle) { + // The current styles may not be in pixel units so try to convert (bad!) + bw.top = parseInt(toPixels(h.currentStyle.borderTopWidth), 10) || 0; + bw.bottom = parseInt(toPixels(h.currentStyle.borderBottomWidth), 10) || 0; + bw.left = parseInt(toPixels(h.currentStyle.borderLeftWidth), 10) || 0; + bw.right = parseInt(toPixels(h.currentStyle.borderRightWidth), 10) || 0; + return bw; + } + } + // Shouldn't get this far for any modern browser + bw.top = parseInt(h.style["border-top-width"], 10) || 0; + bw.bottom = parseInt(h.style["border-bottom-width"], 10) || 0; + bw.left = parseInt(h.style["border-left-width"], 10) || 0; + bw.right = parseInt(h.style["border-right-width"], 10) || 0; + return bw; + }; + + // Page scroll values for use by getMousePosition. To prevent flickering on MSIE + // they are calculated only when the document actually scrolls, not every time the + // mouse moves (as they would be if they were calculated inside getMousePosition). + var scroll = { + x: 0, + y: 0 + }; + var getScrollValue = function (e) { + scroll.x = (typeof document.documentElement.scrollLeft !== "undefined" ? document.documentElement.scrollLeft : document.body.scrollLeft); + scroll.y = (typeof document.documentElement.scrollTop !== "undefined" ? document.documentElement.scrollTop : document.body.scrollTop); + }; + getScrollValue(); + + /** + * Get the position of the mouse relative to the document. + * @param {Event} e The mouse event. + * @return {Object} The position object {left, top}. + */ + var getMousePosition = function (e) { + var posX = 0, posY = 0; + e = e || window.event; + if (typeof e.pageX !== "undefined") { + posX = e.pageX; + posY = e.pageY; + } else if (typeof e.clientX !== "undefined") { // MSIE + posX = e.clientX + scroll.x; + posY = e.clientY + scroll.y; + } + return { + left: posX, + top: posY + }; + }; + /** + * Get the position of an HTML element relative to the document. + * @param {Node} h The HTML element. + * @return {Object} The position object {left, top}. + */ + var getElementPosition = function (h) { + var posX = h.offsetLeft; + var posY = h.offsetTop; + var parent = h.offsetParent; + // Add offsets for all ancestors in the hierarchy + while (parent !== null) { + // Adjust for scrolling elements which may affect the map position. + // + // See http://www.howtocreate.co.uk/tutorials/javascript/browserspecific + // + // "...make sure that every element [on a Web page] with an overflow + // of anything other than visible also has a position style set to + // something other than the default static..." + if (parent !== document.body && parent !== document.documentElement) { + posX -= parent.scrollLeft; + posY -= parent.scrollTop; + } + // See http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/4cb86c0c1037a5e5 + // Example: http://notebook.kulchenko.com/maps/gridmove + var m = parent; + // This is the "normal" way to get offset information: + var moffx = m.offsetLeft; + var moffy = m.offsetTop; + // This covers those cases where a transform is used: + if (!moffx && !moffy && window.getComputedStyle) { + var matrix = document.defaultView.getComputedStyle(m, null).MozTransform || + document.defaultView.getComputedStyle(m, null).WebkitTransform; + if (matrix) { + if (typeof matrix === "string") { + var parms = matrix.split(","); + moffx += parseInt(parms[4], 10) || 0; + moffy += parseInt(parms[5], 10) || 0; + } + } + } + posX += moffx; + posY += moffy; + parent = parent.offsetParent; + } + return { + left: posX, + top: posY + }; + }; + /** + * Set the properties of an object to those from another object. + * @param {Object} obj The target object. + * @param {Object} vals The source object. + */ + var setVals = function (obj, vals) { + if (obj && vals) { + for (var x in vals) { + if (vals.hasOwnProperty(x)) { + obj[x] = vals[x]; + } + } + } + return obj; + }; + /** + * Set the opacity. If op is not passed in, this function just performs an MSIE fix. + * @param {Node} h The HTML element. + * @param {number} op The opacity value (0-1). + */ + var setOpacity = function (h, op) { + if (typeof op !== "undefined") { + h.style.opacity = op; + } + if (typeof h.style.opacity !== "undefined" && h.style.opacity !== "") { + h.style.filter = "alpha(opacity=" + (h.style.opacity * 100) + ")"; + } + }; + /** + * @name KeyDragZoomOptions + * @class This class represents the optional parameter passed into google.maps.Map.enableKeyDragZoom. + * @property {string} [key="shift"] The hot key to hold down to activate a drag zoom, shift | ctrl | alt. + * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2, + * it causes a context menu to appear when running on the Macintosh. Also note that the + * alt hot key refers to the Option key on a Macintosh. + * @property {Object} [boxStyle={border: "4px solid #736AFF"}] + * An object literal defining the CSS styles of the zoom box. + * Border widths must be specified in pixel units (or as thin, medium, or thick). + * @property {Object} [veilStyle={backgroundColor: "gray", opacity: 0.25, cursor: "crosshair"}] + * An object literal defining the CSS styles of the veil pane which covers the map when a drag + * zoom is activated. The previous name for this property was paneStyle but the use + * of this name is now deprecated. + * @property {boolean} [noZoom=false] A flag indicating whether to disable zooming after an area is + * selected. Set this to true to allow KeyDragZoom to be used as a simple area + * selection tool. + * @property {boolean} [visualEnabled=false] A flag indicating whether a visual control is to be used. + * @property {string} [visualClass=""] The name of the CSS class defining the styles for the visual + * control. To prevent the visual control from being printed, set this property to the name of + * a class, defined inside a @media print rule, which sets the CSS + * display style to none. + * @property {ControlPosition} [visualPosition=google.maps.ControlPosition.LEFT_TOP] + * The position of the visual control. + * @property {Size} [visualPositionOffset=google.maps.Size(35, 0)] The width and height values + * provided by this property are the offsets (in pixels) from the location at which the control + * would normally be drawn to the desired drawing location. + * @property {number} [visualPositionIndex=null] The index of the visual control. + * The index is for controlling the placement of the control relative to other controls at the + * position given by visualPosition; controls with a lower index are placed first. + * Use a negative value to place the control before any default controls. No index is + * generally required. + * @property {String} [visualSprite="http://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png"] + * The URL of the sprite image used for showing the visual control in the on, off, and hot + * (i.e., when the mouse is over the control) states. The three images within the sprite must + * be the same size and arranged in on-hot-off order in a single row with no spaces between images. + * @property {Size} [visualSize=google.maps.Size(20, 20)] The width and height values provided by + * this property are the size (in pixels) of each of the images within visualSprite. + * @property {Object} [visualTips={off: "Turn on drag zoom mode", on: "Turn off drag zoom mode"}] + * An object literal defining the help tips that appear when + * the mouse moves over the visual control. The off property is the tip to be shown + * when the control is off and the on property is the tip to be shown when the + * control is on. + */ + /** + * @name DragZoom + * @class This class represents a drag zoom object for a map. The object is activated by holding down the hot key + * or by turning on the visual control. + * This object is created when google.maps.Map.enableKeyDragZoom is called; it cannot be created directly. + * Use google.maps.Map.getDragZoomObject to gain access to this object in order to attach event listeners. + * @param {Map} map The map to which the DragZoom object is to be attached. + * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters. + */ + function DragZoom(map, opt_zoomOpts) { + var me = this; + var ov = new google.maps.OverlayView(); + ov.onAdd = function () { + me.init_(map, opt_zoomOpts); + }; + ov.draw = function () { + }; + ov.onRemove = function () { + }; + ov.setMap(map); + this.prjov_ = ov; + } + /** + * Initialize the tool. + * @param {Map} map The map to which the DragZoom object is to be attached. + * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters. + */ + DragZoom.prototype.init_ = function (map, opt_zoomOpts) { + var i; + var me = this; + this.map_ = map; + opt_zoomOpts = opt_zoomOpts || {}; + this.key_ = opt_zoomOpts.key || "shift"; + this.key_ = this.key_.toLowerCase(); + this.borderWidths_ = getBorderWidths(this.map_.getDiv()); + this.veilDiv_ = []; + for (i = 0; i < 4; i++) { + this.veilDiv_[i] = document.createElement("div"); + // Prevents selection of other elements on the webpage + // when a drag zoom operation is in progress: + this.veilDiv_[i].onselectstart = function () { + return false; + }; + // Apply default style values for the veil: + setVals(this.veilDiv_[i].style, { + backgroundColor: "gray", + opacity: 0.25, + cursor: "crosshair" + }); + // Apply style values specified in veilStyle parameter: + setVals(this.veilDiv_[i].style, opt_zoomOpts.paneStyle); // Old option name was "paneStyle" + setVals(this.veilDiv_[i].style, opt_zoomOpts.veilStyle); // New name is "veilStyle" + // Apply mandatory style values: + setVals(this.veilDiv_[i].style, { + position: "absolute", + overflow: "hidden", + display: "none" + }); + // Workaround for Firefox Shift-Click problem: + if (this.key_ === "shift") { + this.veilDiv_[i].style.MozUserSelect = "none"; + } + setOpacity(this.veilDiv_[i]); + // An IE fix: If the background is transparent it cannot capture mousedown + // events, so if it is, change the background to white with 0 opacity. + if (this.veilDiv_[i].style.backgroundColor === "transparent") { + this.veilDiv_[i].style.backgroundColor = "white"; + setOpacity(this.veilDiv_[i], 0); + } + this.map_.getDiv().appendChild(this.veilDiv_[i]); + } + + this.noZoom_ = opt_zoomOpts.noZoom || false; + this.visualEnabled_ = opt_zoomOpts.visualEnabled || false; + this.visualClass_ = opt_zoomOpts.visualClass || ""; + this.visualPosition_ = opt_zoomOpts.visualPosition || google.maps.ControlPosition.LEFT_TOP; + this.visualPositionOffset_ = opt_zoomOpts.visualPositionOffset || new google.maps.Size(35, 0); + this.visualPositionIndex_ = opt_zoomOpts.visualPositionIndex || null; + this.visualSprite_ = opt_zoomOpts.visualSprite || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png"; + this.visualSize_ = opt_zoomOpts.visualSize || new google.maps.Size(20, 20); + this.visualTips_ = opt_zoomOpts.visualTips || {}; + this.visualTips_.off = this.visualTips_.off || "Turn on drag zoom mode"; + this.visualTips_.on = this.visualTips_.on || "Turn off drag zoom mode"; + + this.boxDiv_ = document.createElement("div"); + // Apply default style values for the zoom box: + setVals(this.boxDiv_.style, { + border: "4px solid #736AFF" + }); + // Apply style values specified in boxStyle parameter: + setVals(this.boxDiv_.style, opt_zoomOpts.boxStyle); + // Apply mandatory style values: + setVals(this.boxDiv_.style, { + position: "absolute", + display: "none" + }); + setOpacity(this.boxDiv_); + this.map_.getDiv().appendChild(this.boxDiv_); + this.boxBorderWidths_ = getBorderWidths(this.boxDiv_); + + this.listeners_ = [ + google.maps.event.addDomListener(document, "keydown", function (e) { + me.onKeyDown_(e); + }), + google.maps.event.addDomListener(document, "keyup", function (e) { + me.onKeyUp_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[0], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[1], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[2], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(this.veilDiv_[3], "mousedown", function (e) { + me.onMouseDown_(e); + }), + google.maps.event.addDomListener(document, "mousedown", function (e) { + me.onMouseDownDocument_(e); + }), + google.maps.event.addDomListener(document, "mousemove", function (e) { + me.onMouseMove_(e); + }), + google.maps.event.addDomListener(document, "mouseup", function (e) { + me.onMouseUp_(e); + }), + google.maps.event.addDomListener(window, "scroll", getScrollValue) + ]; + + this.hotKeyDown_ = false; + this.mouseDown_ = false; + this.dragging_ = false; + this.startPt_ = null; + this.endPt_ = null; + this.mapWidth_ = null; + this.mapHeight_ = null; + this.mousePosn_ = null; + this.mapPosn_ = null; + + if (this.visualEnabled_) { + this.buttonDiv_ = this.initControl_(this.visualPositionOffset_); + if (this.visualPositionIndex_ !== null) { + this.buttonDiv_.index = this.visualPositionIndex_; + } + this.map_.controls[this.visualPosition_].push(this.buttonDiv_); + this.controlIndex_ = this.map_.controls[this.visualPosition_].length - 1; + } + }; + /** + * Initializes the visual control and returns its DOM element. + * @param {Size} offset The offset of the control from its normal position. + * @return {Node} The DOM element containing the visual control. + */ + DragZoom.prototype.initControl_ = function (offset) { + var control; + var image; + var me = this; + + control = document.createElement("div"); + control.className = this.visualClass_; + control.style.position = "relative"; + control.style.overflow = "hidden"; + control.style.height = this.visualSize_.height + "px"; + control.style.width = this.visualSize_.width + "px"; + control.title = this.visualTips_.off; + image = document.createElement("img"); + image.src = this.visualSprite_; + image.style.position = "absolute"; + image.style.left = -(this.visualSize_.width * 2) + "px"; + image.style.top = 0 + "px"; + control.appendChild(image); + control.onclick = function (e) { + me.hotKeyDown_ = !me.hotKeyDown_; + if (me.hotKeyDown_) { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + "px"; + me.buttonDiv_.title = me.visualTips_.on; + me.activatedByControl_ = true; + google.maps.event.trigger(me, "activate"); + } else { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + "px"; + me.buttonDiv_.title = me.visualTips_.off; + google.maps.event.trigger(me, "deactivate"); + } + me.onMouseMove_(e); // Updates the veil + }; + control.onmouseover = function () { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 1) + "px"; + }; + control.onmouseout = function () { + if (me.hotKeyDown_) { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + "px"; + me.buttonDiv_.title = me.visualTips_.on; + } else { + me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + "px"; + me.buttonDiv_.title = me.visualTips_.off; + } + }; + control.ondragstart = function () { + return false; + }; + setVals(control.style, { + cursor: "pointer", + marginTop: offset.height + "px", + marginLeft: offset.width + "px" + }); + return control; + }; + /** + * Returns true if the hot key is being pressed when an event occurs. + * @param {Event} e The keyboard event. + * @return {boolean} Flag indicating whether the hot key is down. + */ + DragZoom.prototype.isHotKeyDown_ = function (e) { + var isHot; + e = e || window.event; + isHot = (e.shiftKey && this.key_ === "shift") || (e.altKey && this.key_ === "alt") || (e.ctrlKey && this.key_ === "ctrl"); + if (!isHot) { + // Need to look at keyCode for Opera because it + // doesn't set the shiftKey, altKey, ctrlKey properties + // unless a non-modifier event is being reported. + // + // See http://cross-browser.com/x/examples/shift_mode.php + // Also see http://unixpapa.com/js/key.html + switch (e.keyCode) { + case 16: + if (this.key_ === "shift") { + isHot = true; + } + break; + case 17: + if (this.key_ === "ctrl") { + isHot = true; + } + break; + case 18: + if (this.key_ === "alt") { + isHot = true; + } + break; + } + } + return isHot; + }; + /** + * Returns true if the mouse is on top of the map div. + * The position is captured in onMouseMove_. + * @return {boolean} + */ + DragZoom.prototype.isMouseOnMap_ = function () { + var mousePosn = this.mousePosn_; + if (mousePosn) { + var mapPosn = this.mapPosn_; + var mapDiv = this.map_.getDiv(); + return mousePosn.left > mapPosn.left && mousePosn.left < (mapPosn.left + mapDiv.offsetWidth) && + mousePosn.top > mapPosn.top && mousePosn.top < (mapPosn.top + mapDiv.offsetHeight); + } else { + // if user never moved mouse + return false; + } + }; + /** + * Show the veil if the hot key is down and the mouse is over the map, + * otherwise hide the veil. + */ + DragZoom.prototype.setVeilVisibility_ = function () { + var i; + if (this.map_ && this.hotKeyDown_ && this.isMouseOnMap_()) { + var mapDiv = this.map_.getDiv(); + this.mapWidth_ = mapDiv.offsetWidth - (this.borderWidths_.left + this.borderWidths_.right); + this.mapHeight_ = mapDiv.offsetHeight - (this.borderWidths_.top + this.borderWidths_.bottom); + if (this.activatedByControl_) { // Veil covers entire map (except control) + var left = parseInt(this.buttonDiv_.style.left, 10) + this.visualPositionOffset_.width; + var top = parseInt(this.buttonDiv_.style.top, 10) + this.visualPositionOffset_.height; + var width = this.visualSize_.width; + var height = this.visualSize_.height; + // Left veil rectangle: + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.width = left + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + // Right veil rectangle: + this.veilDiv_[1].style.top = "0px"; + this.veilDiv_[1].style.left = (left + width) + "px"; + this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + "px"; + this.veilDiv_[1].style.height = this.mapHeight_ + "px"; + // Top veil rectangle: + this.veilDiv_[2].style.top = "0px"; + this.veilDiv_[2].style.left = left + "px"; + this.veilDiv_[2].style.width = width + "px"; + this.veilDiv_[2].style.height = top + "px"; + // Bottom veil rectangle: + this.veilDiv_[3].style.top = (top + height) + "px"; + this.veilDiv_[3].style.left = left + "px"; + this.veilDiv_[3].style.width = width + "px"; + this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + "px"; + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "block"; + } + } else { + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.width = this.mapWidth_ + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + for (i = 1; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.width = "0px"; + this.veilDiv_[i].style.height = "0px"; + } + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "block"; + } + } + } else { + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "none"; + } + } + }; + /** + * Handle key down. Show the veil if the hot key has been pressed. + * @param {Event} e The keyboard event. + */ + DragZoom.prototype.onKeyDown_ = function (e) { + if (this.map_ && !this.hotKeyDown_ && this.isHotKeyDown_(e)) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.hotKeyDown_ = true; + this.activatedByControl_ = false; + this.setVeilVisibility_(); + /** + * This event is fired when the hot key is pressed. + * @name DragZoom#activate + * @event + */ + google.maps.event.trigger(this, "activate"); + } + }; + /** + * Get the google.maps.Point of the mouse position. + * @param {Event} e The mouse event. + * @return {Point} The mouse position. + */ + DragZoom.prototype.getMousePoint_ = function (e) { + var mousePosn = getMousePosition(e); + var p = new google.maps.Point(); + p.x = mousePosn.left - this.mapPosn_.left - this.borderWidths_.left; + p.y = mousePosn.top - this.mapPosn_.top - this.borderWidths_.top; + p.x = Math.min(p.x, this.mapWidth_); + p.y = Math.min(p.y, this.mapHeight_); + p.x = Math.max(p.x, 0); + p.y = Math.max(p.y, 0); + return p; + }; + /** + * Handle mouse down. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseDown_ = function (e) { + if (this.map_ && this.hotKeyDown_) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.dragging_ = true; + this.startPt_ = this.endPt_ = this.getMousePoint_(e); + this.boxDiv_.style.width = this.boxDiv_.style.height = "0px"; + var prj = this.prjov_.getProjection(); + var latlng = prj.fromContainerPixelToLatLng(this.startPt_); + /** + * This event is fired when the drag operation begins. + * The parameter passed is the geographic position of the starting point. + * @name DragZoom#dragstart + * @param {LatLng} latlng The geographic position of the starting point. + * @event + */ + google.maps.event.trigger(this, "dragstart", latlng); + } + }; + /** + * Handle mouse down at the document level. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseDownDocument_ = function (e) { + this.mouseDown_ = true; + }; + /** + * Handle mouse move. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseMove_ = function (e) { + this.mousePosn_ = getMousePosition(e); + if (this.dragging_) { + this.endPt_ = this.getMousePoint_(e); + var left = Math.min(this.startPt_.x, this.endPt_.x); + var top = Math.min(this.startPt_.y, this.endPt_.y); + var width = Math.abs(this.startPt_.x - this.endPt_.x); + var height = Math.abs(this.startPt_.y - this.endPt_.y); + // For benefit of MSIE 7/8 ensure following values are not negative: + var boxWidth = Math.max(0, width - (this.boxBorderWidths_.left + this.boxBorderWidths_.right)); + var boxHeight = Math.max(0, height - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom)); + // Left veil rectangle: + this.veilDiv_[0].style.top = "0px"; + this.veilDiv_[0].style.left = "0px"; + this.veilDiv_[0].style.width = left + "px"; + this.veilDiv_[0].style.height = this.mapHeight_ + "px"; + // Right veil rectangle: + this.veilDiv_[1].style.top = "0px"; + this.veilDiv_[1].style.left = (left + width) + "px"; + this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + "px"; + this.veilDiv_[1].style.height = this.mapHeight_ + "px"; + // Top veil rectangle: + this.veilDiv_[2].style.top = "0px"; + this.veilDiv_[2].style.left = left + "px"; + this.veilDiv_[2].style.width = width + "px"; + this.veilDiv_[2].style.height = top + "px"; + // Bottom veil rectangle: + this.veilDiv_[3].style.top = (top + height) + "px"; + this.veilDiv_[3].style.left = left + "px"; + this.veilDiv_[3].style.width = width + "px"; + this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + "px"; + // Selection rectangle: + this.boxDiv_.style.top = top + "px"; + this.boxDiv_.style.left = left + "px"; + this.boxDiv_.style.width = boxWidth + "px"; + this.boxDiv_.style.height = boxHeight + "px"; + this.boxDiv_.style.display = "block"; + /** + * This event is fired repeatedly while the user drags a box across the area of interest. + * The southwest and northeast point are passed as parameters of type google.maps.Point + * (for performance reasons), relative to the map container. Also passed is the projection object + * so that the event listener, if necessary, can convert the pixel positions to geographic + * coordinates using google.maps.MapCanvasProjection.fromContainerPixelToLatLng. + * @name DragZoom#drag + * @param {Point} southwestPixel The southwest point of the selection area. + * @param {Point} northeastPixel The northeast point of the selection area. + * @param {MapCanvasProjection} prj The projection object. + * @event + */ + google.maps.event.trigger(this, "drag", new google.maps.Point(left, top + height), new google.maps.Point(left + width, top), this.prjov_.getProjection()); + } else if (!this.mouseDown_) { + this.mapPosn_ = getElementPosition(this.map_.getDiv()); + this.setVeilVisibility_(); + } + }; + /** + * Handle mouse up. + * @param {Event} e The mouse event. + */ + DragZoom.prototype.onMouseUp_ = function (e) { + var z; + var me = this; + this.mouseDown_ = false; + if (this.dragging_) { + if ((this.getMousePoint_(e).x === this.startPt_.x) && (this.getMousePoint_(e).y === this.startPt_.y)) { + this.onKeyUp_(e); // Cancel event + return; + } + var left = Math.min(this.startPt_.x, this.endPt_.x); + var top = Math.min(this.startPt_.y, this.endPt_.y); + var width = Math.abs(this.startPt_.x - this.endPt_.x); + var height = Math.abs(this.startPt_.y - this.endPt_.y); + // Google Maps API bug: setCenter() doesn't work as expected if the map has a + // border on the left or top. The code here includes a workaround for this problem. + var kGoogleCenteringBug = true; + if (kGoogleCenteringBug) { + left += this.borderWidths_.left; + top += this.borderWidths_.top; + } + + var prj = this.prjov_.getProjection(); + var sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height)); + var ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top)); + var bnds = new google.maps.LatLngBounds(sw, ne); + + if (this.noZoom_) { + this.boxDiv_.style.display = "none"; + } else { + // Sometimes fitBounds causes a zoom OUT, so restore original zoom level if this happens. + z = this.map_.getZoom(); + this.map_.fitBounds(bnds); + if (this.map_.getZoom() < z) { + this.map_.setZoom(z); + } + + // Redraw box after zoom: + var swPt = prj.fromLatLngToContainerPixel(sw); + var nePt = prj.fromLatLngToContainerPixel(ne); + if (kGoogleCenteringBug) { + swPt.x -= this.borderWidths_.left; + swPt.y -= this.borderWidths_.top; + nePt.x -= this.borderWidths_.left; + nePt.y -= this.borderWidths_.top; + } + this.boxDiv_.style.left = swPt.x + "px"; + this.boxDiv_.style.top = nePt.y + "px"; + this.boxDiv_.style.width = (Math.abs(nePt.x - swPt.x) - (this.boxBorderWidths_.left + this.boxBorderWidths_.right)) + "px"; + this.boxDiv_.style.height = (Math.abs(nePt.y - swPt.y) - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom)) + "px"; + // Hide box asynchronously after 1 second: + setTimeout(function () { + me.boxDiv_.style.display = "none"; + }, 1000); + } + this.dragging_ = false; + this.onMouseMove_(e); // Updates the veil + /** + * This event is fired when the drag operation ends. + * The parameter passed is the geographic bounds of the selected area. + * Note that this event is not fired if the hot key is released before the drag operation ends. + * @name DragZoom#dragend + * @param {LatLngBounds} bnds The geographic bounds of the selected area. + * @event + */ + google.maps.event.trigger(this, "dragend", bnds); + // if the hot key isn't down, the drag zoom must have been activated by turning + // on the visual control. In this case, finish up by simulating a key up event. + if (!this.isHotKeyDown_(e)) { + this.onKeyUp_(e); + } + } + }; + /** + * Handle key up. + * @param {Event} e The keyboard event. + */ + DragZoom.prototype.onKeyUp_ = function (e) { + var i; + var left, top, width, height, prj, sw, ne; + var bnds = null; + if (this.map_ && this.hotKeyDown_) { + this.hotKeyDown_ = false; + if (this.dragging_) { + this.boxDiv_.style.display = "none"; + this.dragging_ = false; + // Calculate the bounds when drag zoom was cancelled + left = Math.min(this.startPt_.x, this.endPt_.x); + top = Math.min(this.startPt_.y, this.endPt_.y); + width = Math.abs(this.startPt_.x - this.endPt_.x); + height = Math.abs(this.startPt_.y - this.endPt_.y); + prj = this.prjov_.getProjection(); + sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height)); + ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top)); + bnds = new google.maps.LatLngBounds(sw, ne); + } + for (i = 0; i < this.veilDiv_.length; i++) { + this.veilDiv_[i].style.display = "none"; + } + if (this.visualEnabled_) { + this.buttonDiv_.firstChild.style.left = -(this.visualSize_.width * 2) + "px"; + this.buttonDiv_.title = this.visualTips_.off; + this.buttonDiv_.style.display = ""; + } + /** + * This event is fired when the hot key is released. + * The parameter passed is the geographic bounds of the selected area immediately + * before the hot key was released. + * @name DragZoom#deactivate + * @param {LatLngBounds} bnds The geographic bounds of the selected area immediately + * before the hot key was released. + * @event + */ + google.maps.event.trigger(this, "deactivate", bnds); + } + }; + /** + * @name google.maps.Map + * @class These are new methods added to the Google Maps JavaScript API V3's + * Map + * class. + */ + /** + * Enables drag zoom. The user can zoom to an area of interest by holding down the hot key + * (shift | ctrl | alt ) while dragging a box around the area or by turning + * on the visual control then dragging a box around the area. + * @param {KeyDragZoomOptions} opt_zoomOpts The optional parameters. + */ + google.maps.Map.prototype.enableKeyDragZoom = function (opt_zoomOpts) { + this.dragZoom_ = new DragZoom(this, opt_zoomOpts); + }; + /** + * Disables drag zoom. + */ + google.maps.Map.prototype.disableKeyDragZoom = function () { + var i; + var d = this.dragZoom_; + if (d) { + for (i = 0; i < d.listeners_.length; ++i) { + google.maps.event.removeListener(d.listeners_[i]); + } + this.getDiv().removeChild(d.boxDiv_); + for (i = 0; i < d.veilDiv_.length; i++) { + this.getDiv().removeChild(d.veilDiv_[i]); + } + if (d.visualEnabled_) { + // Remove the custom control: + this.controls[d.visualPosition_].removeAt(d.controlIndex_); + } + d.prjov_.setMap(null); + this.dragZoom_ = null; + } + }; + /** + * Returns true if the drag zoom feature has been enabled. + * @return {boolean} + */ + google.maps.Map.prototype.keyDragZoomEnabled = function () { + return this.dragZoom_ !== null; + }; + /** + * Returns the DragZoom object which is created when google.maps.Map.enableKeyDragZoom is called. + * With this object you can use google.maps.event.addListener to attach event listeners + * for the "activate", "deactivate", "dragstart", "drag", and "dragend" events. + * @return {DragZoom} + */ + google.maps.Map.prototype.getDragZoomObject = function () { + return this.dragZoom_; + }; +})(); + +/** + * google-maps-utility-library-v3-markerwithlabel + * + * @version: 1.1.10 + * @author: Gary Little (inspired by code from Marc Ridey of Google). + * @contributors: Nicholas McCready + * @date: Fri May 13 2016 16:29:58 GMT-0400 (EDT) + * @license: Apache License 2.0 + */ +/** + * MarkerWithLabel allows you to define markers with associated labels. As you would expect, + * if the marker is draggable, so too will be the label. In addition, a marker with a label + * responds to all mouse events in the same manner as a regular marker. It also fires mouse + * events and "property changed" events just as a regular marker would. Version 1.1 adds + * support for the raiseOnDrag feature introduced in API V3.3. + *

+ * If you drag a marker by its label, you can cancel the drag and return the marker to its + * original position by pressing the Esc key. This doesn't work if you drag the marker + * itself because this feature is not (yet) supported in the google.maps.Marker class. + */ + +/*jslint browser:true */ +/*global document,google */ + +/** + * @param {Function} childCtor Child class. + * @param {Function} parentCtor Parent class. + * @private + */ +function inherits(childCtor, parentCtor) { + /* @constructor */ + function tempCtor() {} + tempCtor.prototype = parentCtor.prototype; + childCtor.superClass_ = parentCtor.prototype; + childCtor.prototype = new tempCtor(); + /* @override */ + childCtor.prototype.constructor = childCtor; +} + +/** + * This constructor creates a label and associates it with a marker. + * It is for the private use of the MarkerWithLabel class. + * @constructor + * @param {Marker} marker The marker with which the label is to be associated. + * @param {string} crossURL The URL of the cross image =. + * @param {string} handCursor The URL of the hand cursor. + * @private + */ +function MarkerLabel_(marker, crossURL, handCursorURL) { + this.marker_ = marker; + this.handCursorURL_ = marker.handCursorURL; + + this.labelDiv_ = document.createElement("div"); + this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;"; + + // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil + // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that + // events can be captured even if the label is in the shadow of a google.maps.InfoWindow. + // Code is included here to ensure the veil is always exactly the same size as the label. + this.eventDiv_ = document.createElement("div"); + this.eventDiv_.style.cssText = this.labelDiv_.style.cssText; + + // This is needed for proper behavior on MSIE: + this.eventDiv_.setAttribute("onselectstart", "return false;"); + this.eventDiv_.setAttribute("ondragstart", "return false;"); + + // Get the DIV for the "X" to be displayed when the marker is raised. + this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL); +} + +inherits(MarkerLabel_, google.maps.OverlayView); + +/** + * Returns the DIV for the cross used when dragging a marker when the + * raiseOnDrag parameter set to true. One cross is shared with all markers. + * @param {string} crossURL The URL of the cross image =. + * @private + */ +MarkerLabel_.getSharedCross = function (crossURL) { + var div; + if (typeof MarkerLabel_.getSharedCross.crossDiv === "undefined") { + div = document.createElement("img"); + div.style.cssText = "position: absolute; z-index: 1000002; display: none;"; + // Hopefully Google never changes the standard "X" attributes: + div.style.marginLeft = "-8px"; + div.style.marginTop = "-9px"; + div.src = crossURL; + MarkerLabel_.getSharedCross.crossDiv = div; + } + return MarkerLabel_.getSharedCross.crossDiv; +}; + +/** + * Adds the DIV representing the label to the DOM. This method is called + * automatically when the marker's setMap method is called. + * @private + */ +MarkerLabel_.prototype.onAdd = function () { + var me = this; + var cMouseIsDown = false; + var cDraggingLabel = false; + var cSavedZIndex; + var cLatOffset, cLngOffset; + var cIgnoreClick; + var cRaiseEnabled; + var cStartPosition; + var cStartCenter; + // Constants: + var cRaiseOffset = 20; + var cDraggingCursor = "url(" + this.handCursorURL_ + ")"; + + // Stops all processing of an event. + // + var cAbortEvent = function (e) { + if (e.preventDefault) { + e.preventDefault(); + } + e.cancelBubble = true; + if (e.stopPropagation) { + e.stopPropagation(); + } + }; + + var cStopBounce = function () { + me.marker_.setAnimation(null); + }; + + this.getPanes().overlayImage.appendChild(this.labelDiv_); + this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_); + // One cross is shared with all markers, so only add it once: + if (typeof MarkerLabel_.getSharedCross.processed === "undefined") { + this.getPanes().overlayImage.appendChild(this.crossDiv_); + MarkerLabel_.getSharedCross.processed = true; + } + + this.listeners_ = [ + google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + this.style.cursor = "pointer"; + google.maps.event.trigger(me.marker_, "mouseover", e); + } + }), + google.maps.event.addDomListener(this.eventDiv_, "mouseout", function (e) { + if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) { + this.style.cursor = me.marker_.getCursor(); + google.maps.event.trigger(me.marker_, "mouseout", e); + } + }), + google.maps.event.addDomListener(this.eventDiv_, "mousedown", function (e) { + cDraggingLabel = false; + if (me.marker_.getDraggable()) { + cMouseIsDown = true; + this.style.cursor = cDraggingCursor; + } + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + google.maps.event.trigger(me.marker_, "mousedown", e); + cAbortEvent(e); // Prevent map pan when starting a drag on a label + } + }), + google.maps.event.addDomListener(document, "mouseup", function (mEvent) { + var position; + if (cMouseIsDown) { + cMouseIsDown = false; + me.eventDiv_.style.cursor = "pointer"; + google.maps.event.trigger(me.marker_, "mouseup", mEvent); + } + if (cDraggingLabel) { + if (cRaiseEnabled) { // Lower the marker & label + position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition()); + position.y += cRaiseOffset; + me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); + // This is not the same bouncing style as when the marker portion is dragged, + // but it will have to do: + try { // Will fail if running Google Maps API earlier than V3.3 + me.marker_.setAnimation(google.maps.Animation.BOUNCE); + setTimeout(cStopBounce, 1406); + } catch (e) {} + } + me.crossDiv_.style.display = "none"; + me.marker_.setZIndex(cSavedZIndex); + cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag + cDraggingLabel = false; + mEvent.latLng = me.marker_.getPosition(); + google.maps.event.trigger(me.marker_, "dragend", mEvent); + } + }), + google.maps.event.addListener(me.marker_.getMap(), "mousemove", function (mEvent) { + var position; + if (cMouseIsDown) { + if (cDraggingLabel) { + // Change the reported location from the mouse position to the marker position: + mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset); + position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng); + if (cRaiseEnabled) { + me.crossDiv_.style.left = position.x + "px"; + me.crossDiv_.style.top = position.y + "px"; + me.crossDiv_.style.display = ""; + position.y -= cRaiseOffset; + } + me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); + if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly + me.eventDiv_.style.top = (position.y + cRaiseOffset) + "px"; + } + google.maps.event.trigger(me.marker_, "drag", mEvent); + } else { + // Calculate offsets from the click point to the marker position: + cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat(); + cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng(); + cSavedZIndex = me.marker_.getZIndex(); + cStartPosition = me.marker_.getPosition(); + cStartCenter = me.marker_.getMap().getCenter(); + cRaiseEnabled = me.marker_.get("raiseOnDrag"); + cDraggingLabel = true; + me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag + mEvent.latLng = me.marker_.getPosition(); + google.maps.event.trigger(me.marker_, "dragstart", mEvent); + } + } + }), + google.maps.event.addDomListener(document, "keydown", function (e) { + if (cDraggingLabel) { + if (e.keyCode === 27) { // Esc key + cRaiseEnabled = false; + me.marker_.setPosition(cStartPosition); + me.marker_.getMap().setCenter(cStartCenter); + google.maps.event.trigger(document, "mouseup", e); + } + } + }), + google.maps.event.addDomListener(this.eventDiv_, "click", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + if (cIgnoreClick) { // Ignore the click reported when a label drag ends + cIgnoreClick = false; + } else { + google.maps.event.trigger(me.marker_, "click", e); + cAbortEvent(e); // Prevent click from being passed on to map + } + } + }), + google.maps.event.addDomListener(this.eventDiv_, "dblclick", function (e) { + if (me.marker_.getDraggable() || me.marker_.getClickable()) { + google.maps.event.trigger(me.marker_, "dblclick", e); + cAbortEvent(e); // Prevent map zoom when double-clicking on a label + } + }), + google.maps.event.addListener(this.marker_, "dragstart", function (mEvent) { + if (!cDraggingLabel) { + cRaiseEnabled = this.get("raiseOnDrag"); + } + }), + google.maps.event.addListener(this.marker_, "drag", function (mEvent) { + if (!cDraggingLabel) { + if (cRaiseEnabled) { + me.setPosition(cRaiseOffset); + // During a drag, the marker's z-index is temporarily set to 1000000 to + // ensure it appears above all other markers. Also set the label's z-index + // to 1000000 (plus or minus 1 depending on whether the label is supposed + // to be above or below the marker). + me.labelDiv_.style.zIndex = 1000000 + (this.get("labelInBackground") ? -1 : +1); + } + } + }), + google.maps.event.addListener(this.marker_, "dragend", function (mEvent) { + if (!cDraggingLabel) { + if (cRaiseEnabled) { + me.setPosition(0); // Also restores z-index of label + } + } + }), + google.maps.event.addListener(this.marker_, "position_changed", function () { + me.setPosition(); + }), + google.maps.event.addListener(this.marker_, "zindex_changed", function () { + me.setZIndex(); + }), + google.maps.event.addListener(this.marker_, "visible_changed", function () { + me.setVisible(); + }), + google.maps.event.addListener(this.marker_, "labelvisible_changed", function () { + me.setVisible(); + }), + google.maps.event.addListener(this.marker_, "title_changed", function () { + me.setTitle(); + }), + google.maps.event.addListener(this.marker_, "labelcontent_changed", function () { + me.setContent(); + }), + google.maps.event.addListener(this.marker_, "labelanchor_changed", function () { + me.setAnchor(); + }), + google.maps.event.addListener(this.marker_, "labelclass_changed", function () { + me.setStyles(); + }), + google.maps.event.addListener(this.marker_, "labelstyle_changed", function () { + me.setStyles(); + }) + ]; +}; + +/** + * Removes the DIV for the label from the DOM. It also removes all event handlers. + * This method is called automatically when the marker's setMap(null) + * method is called. + * @private + */ +MarkerLabel_.prototype.onRemove = function () { + var i; + this.labelDiv_.parentNode.removeChild(this.labelDiv_); + this.eventDiv_.parentNode.removeChild(this.eventDiv_); + + // Remove event listeners: + for (i = 0; i < this.listeners_.length; i++) { + google.maps.event.removeListener(this.listeners_[i]); + } +}; + +/** + * Draws the label on the map. + * @private + */ +MarkerLabel_.prototype.draw = function () { + this.setContent(); + this.setTitle(); + this.setStyles(); +}; + +/** + * Sets the content of the label. + * The content can be plain text or an HTML DOM node. + * @private + */ +MarkerLabel_.prototype.setContent = function () { + var content = this.marker_.get("labelContent"); + if (typeof content.nodeType === "undefined") { + this.labelDiv_.innerHTML = content; + this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; + } else { + this.labelDiv_.innerHTML = ""; // Remove current content + this.labelDiv_.appendChild(content); + content = content.cloneNode(true); + this.eventDiv_.innerHTML = ""; // Remove current content + this.eventDiv_.appendChild(content); + } +}; + +/** + * Sets the content of the tool tip for the label. It is + * always set to be the same as for the marker itself. + * @private + */ +MarkerLabel_.prototype.setTitle = function () { + this.eventDiv_.title = this.marker_.getTitle() || ""; +}; + +/** + * Sets the style of the label by setting the style sheet and applying + * other specific styles requested. + * @private + */ +MarkerLabel_.prototype.setStyles = function () { + var i, labelStyle; + + // Apply style values from the style sheet defined in the labelClass parameter: + this.labelDiv_.className = this.marker_.get("labelClass"); + this.eventDiv_.className = this.labelDiv_.className; + + // Clear existing inline style values: + this.labelDiv_.style.cssText = ""; + this.eventDiv_.style.cssText = ""; + // Apply style values defined in the labelStyle parameter: + labelStyle = this.marker_.get("labelStyle"); + for (i in labelStyle) { + if (labelStyle.hasOwnProperty(i)) { + this.labelDiv_.style[i] = labelStyle[i]; + this.eventDiv_.style[i] = labelStyle[i]; + } + } + this.setMandatoryStyles(); +}; + +/** + * Sets the mandatory styles to the DIV representing the label as well as to the + * associated event DIV. This includes setting the DIV position, z-index, and visibility. + * @private + */ +MarkerLabel_.prototype.setMandatoryStyles = function () { + this.labelDiv_.style.position = "absolute"; + this.labelDiv_.style.overflow = "hidden"; + // Make sure the opacity setting causes the desired effect on MSIE: + if (typeof this.labelDiv_.style.opacity !== "undefined" && this.labelDiv_.style.opacity !== "") { + this.labelDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")\""; + this.labelDiv_.style.filter = "alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")"; + } + + this.eventDiv_.style.position = this.labelDiv_.style.position; + this.eventDiv_.style.overflow = this.labelDiv_.style.overflow; + this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE + this.eventDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\""; + this.eventDiv_.style.filter = "alpha(opacity=1)"; // For MSIE + + this.setAnchor(); + this.setPosition(); // This also updates z-index, if necessary. + this.setVisible(); +}; + +/** + * Sets the anchor point of the label. + * @private + */ +MarkerLabel_.prototype.setAnchor = function () { + var anchor = this.marker_.get("labelAnchor"); + this.labelDiv_.style.marginLeft = -anchor.x + "px"; + this.labelDiv_.style.marginTop = -anchor.y + "px"; + this.eventDiv_.style.marginLeft = -anchor.x + "px"; + this.eventDiv_.style.marginTop = -anchor.y + "px"; +}; + +/** + * Sets the position of the label. The z-index is also updated, if necessary. + * @private + */ +MarkerLabel_.prototype.setPosition = function (yOffset) { + var position = this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition()); + if (typeof yOffset === "undefined") { + yOffset = 0; + } + this.labelDiv_.style.left = Math.round(position.x) + "px"; + this.labelDiv_.style.top = Math.round(position.y - yOffset) + "px"; + this.eventDiv_.style.left = this.labelDiv_.style.left; + this.eventDiv_.style.top = this.labelDiv_.style.top; + + this.setZIndex(); +}; + +/** + * Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index + * of the label is set to the vertical coordinate of the label. This is in keeping with the default + * stacking order for Google Maps: markers to the south are in front of markers to the north. + * @private + */ +MarkerLabel_.prototype.setZIndex = function () { + var zAdjust = (this.marker_.get("labelInBackground") ? -1 : +1); + if (typeof this.marker_.getZIndex() === "undefined") { + this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust; + this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; + } else { + this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust; + this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; + } +}; + +/** + * Sets the visibility of the label. The label is visible only if the marker itself is + * visible (i.e., its visible property is true) and the labelVisible property is true. + * @private + */ +MarkerLabel_.prototype.setVisible = function () { + if (this.marker_.get("labelVisible")) { + this.labelDiv_.style.display = this.marker_.getVisible() ? "block" : "none"; + } else { + this.labelDiv_.style.display = "none"; + } + this.eventDiv_.style.display = this.labelDiv_.style.display; +}; + +/** + * @name MarkerWithLabelOptions + * @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor. + * The properties available are the same as for google.maps.Marker with the addition + * of the properties listed below. To change any of these additional properties after the labeled + * marker has been created, call google.maps.Marker.set(propertyName, propertyValue). + *

+ * When any of these properties changes, a property changed event is fired. The names of these + * events are derived from the name of the property and are of the form propertyname_changed. + * For example, if the content of the label changes, a labelcontent_changed event + * is fired. + *

+ * @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node). + * @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so + * that its top left corner is positioned at the anchor point of the associated marker. Use this + * property to change the anchor point of the label. For example, to center a 50px-wide label + * beneath a marker, specify a labelAnchor of google.maps.Point(25, 0). + * (Note: x-values increase to the right and y-values increase to the top.) + * @property {string} [labelClass] The name of the CSS class defining the styles for the label. + * Note that style values for position, overflow, top, + * left, zIndex, display, marginLeft, and + * marginTop are ignored; these styles are for internal use only. + * @property {Object} [labelStyle] An object literal whose properties define specific CSS + * style values to be applied to the label. Style values defined here override those that may + * be defined in the labelClass style sheet. If this property is changed after the + * label has been created, all previously set styles (except those defined in the style sheet) + * are removed from the label before the new style values are applied. + * Note that style values for position, overflow, top, + * left, zIndex, display, marginLeft, and + * marginTop are ignored; these styles are for internal use only. + * @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its + * associated marker should appear in the background (i.e., in a plane below the marker). + * The default is false, which causes the label to appear in the foreground. + * @property {boolean} [labelVisible] A flag indicating whether the label is to be visible. + * The default is true. Note that even if labelVisible is + * true, the label will not be visible unless the associated marker is also + * visible (i.e., unless the marker's visible property is true). + * @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be + * raised when the marker is dragged. The default is true. If a draggable marker is + * being created and a version of Google Maps API earlier than V3.3 is being used, this property + * must be set to false. + * @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the + * marker. Important: The optimized rendering technique is not supported by MarkerWithLabel, + * so the value of this parameter is always forced to false. + * @property {string} [crossImage="http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"] + * The URL of the cross image to be displayed while dragging a marker. + * @property {string} [handCursor="http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"] + * The URL of the cursor to be displayed while dragging a marker. + */ +/** + * Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}. + * @constructor + * @param {MarkerWithLabelOptions} [opt_options] The optional parameters. + */ +function MarkerWithLabel(opt_options) { + opt_options = opt_options || {}; + opt_options.labelContent = opt_options.labelContent || ""; + opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0); + opt_options.labelClass = opt_options.labelClass || "markerLabels"; + opt_options.labelStyle = opt_options.labelStyle || {}; + opt_options.labelInBackground = opt_options.labelInBackground || false; + if (typeof opt_options.labelVisible === "undefined") { + opt_options.labelVisible = true; + } + if (typeof opt_options.raiseOnDrag === "undefined") { + opt_options.raiseOnDrag = true; + } + if (typeof opt_options.clickable === "undefined") { + opt_options.clickable = true; + } + if (typeof opt_options.draggable === "undefined") { + opt_options.draggable = false; + } + if (typeof opt_options.optimized === "undefined") { + opt_options.optimized = false; + } + opt_options.crossImage = opt_options.crossImage || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"; + opt_options.handCursor = opt_options.handCursor || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"; + opt_options.optimized = false; // Optimized rendering is not supported + + this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker + + // Call the parent constructor. It calls Marker.setValues to initialize, so all + // the new parameters are conveniently saved and can be accessed with get/set. + // Marker.set triggers a property changed event (called "propertyname_changed") + // that the marker label listens for in order to react to state changes. + google.maps.Marker.apply(this, arguments); +} + +inherits(MarkerWithLabel, google.maps.Marker); + +/** + * Overrides the standard Marker setMap function. + * @param {Map} theMap The map to which the marker is to be added. + * @private + */ +MarkerWithLabel.prototype.setMap = function (theMap) { + + // Call the inherited function... + google.maps.Marker.prototype.setMap.apply(this, arguments); + + // ... then deal with the label: + this.label.setMap(theMap); +}; + +// ==ClosureCompiler== +// @compilation_level ADVANCED_OPTIMIZATIONS +// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js +// @output_wrapper (function() {%output%})(); +// ==/ClosureCompiler== + +/** + * @license + * Copyright 2013 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A RichMarker that allows any HTML/DOM to be added to a map and be draggable. + * + * @param {Object.=} opt_options Optional properties to set. + * @extends {google.maps.OverlayView} + * @constructor + */ +function RichMarker(opt_options) { + var options = opt_options || {}; + + /** + * @type {boolean} + * @private + */ + this.ready_ = false; + + /** + * @type {boolean} + * @private + */ + this.dragging_ = false; + + if (opt_options['visible'] == undefined) { + opt_options['visible'] = true; + } + + if (opt_options['shadow'] == undefined) { + opt_options['shadow'] = '7px -3px 5px rgba(88,88,88,0.7)'; + } + + if (opt_options['anchor'] == undefined) { + opt_options['anchor'] = RichMarkerPosition['BOTTOM']; + } + + this.setValues(options); +} +RichMarker.prototype = new google.maps.OverlayView(); +window['RichMarker'] = RichMarker; + + +/** + * Returns the current visibility state of the marker. + * + * @return {boolean} The visiblity of the marker. + */ +RichMarker.prototype.getVisible = function() { + return /** @type {boolean} */ (this.get('visible')); +}; +RichMarker.prototype['getVisible'] = RichMarker.prototype.getVisible; + + +/** + * Sets the visiblility state of the marker. + * + * @param {boolean} visible The visiblilty of the marker. + */ +RichMarker.prototype.setVisible = function(visible) { + this.set('visible', visible); +}; +RichMarker.prototype['setVisible'] = RichMarker.prototype.setVisible; + + +/** + * The visible changed event. + */ +RichMarker.prototype.visible_changed = function() { + if (this.ready_) { + this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none'; + this.draw(); + } +}; +RichMarker.prototype['visible_changed'] = RichMarker.prototype.visible_changed; + + +/** + * Sets the marker to be flat. + * + * @param {boolean} flat If the marker is to be flat or not. + */ +RichMarker.prototype.setFlat = function(flat) { + this.set('flat', !!flat); +}; +RichMarker.prototype['setFlat'] = RichMarker.prototype.setFlat; + + +/** + * If the makrer is flat or not. + * + * @return {boolean} True the marker is flat. + */ +RichMarker.prototype.getFlat = function() { + return /** @type {boolean} */ (this.get('flat')); +}; +RichMarker.prototype['getFlat'] = RichMarker.prototype.getFlat; + + +/** + * Get the width of the marker. + * + * @return {Number} The width of the marker. + */ +RichMarker.prototype.getWidth = function() { + return /** @type {Number} */ (this.get('width')); +}; +RichMarker.prototype['getWidth'] = RichMarker.prototype.getWidth; + + +/** + * Get the height of the marker. + * + * @return {Number} The height of the marker. + */ +RichMarker.prototype.getHeight = function() { + return /** @type {Number} */ (this.get('height')); +}; +RichMarker.prototype['getHeight'] = RichMarker.prototype.getHeight; + + +/** + * Sets the marker's box shadow. + * + * @param {string} shadow The box shadow to set. + */ +RichMarker.prototype.setShadow = function(shadow) { + this.set('shadow', shadow); + this.flat_changed(); +}; +RichMarker.prototype['setShadow'] = RichMarker.prototype.setShadow; + + +/** + * Gets the marker's box shadow. + * + * @return {string} The box shadow. + */ +RichMarker.prototype.getShadow = function() { + return /** @type {string} */ (this.get('shadow')); +}; +RichMarker.prototype['getShadow'] = RichMarker.prototype.getShadow; + + +/** + * Flat changed event. + */ +RichMarker.prototype.flat_changed = function() { + if (!this.ready_) { + return; + } + + this.markerWrapper_.style['boxShadow'] = + this.markerWrapper_.style['webkitBoxShadow'] = + this.markerWrapper_.style['MozBoxShadow'] = + this.getFlat() ? '' : this.getShadow(); +}; +RichMarker.prototype['flat_changed'] = RichMarker.prototype.flat_changed; + + +/** + * Sets the zIndex of the marker. + * + * @param {Number} index The index to set. + */ +RichMarker.prototype.setZIndex = function(index) { + this.set('zIndex', index); +}; +RichMarker.prototype['setZIndex'] = RichMarker.prototype.setZIndex; + + +/** + * Gets the zIndex of the marker. + * + * @return {Number} The zIndex of the marker. + */ +RichMarker.prototype.getZIndex = function() { + return /** @type {Number} */ (this.get('zIndex')); +}; +RichMarker.prototype['getZIndex'] = RichMarker.prototype.getZIndex; + + +/** + * zIndex changed event. + */ +RichMarker.prototype.zIndex_changed = function() { + if (this.getZIndex() && this.ready_) { + this.markerWrapper_.style.zIndex = this.getZIndex(); + } +}; +RichMarker.prototype['zIndex_changed'] = RichMarker.prototype.zIndex_changed; + +/** + * Whether the marker is draggable or not. + * + * @return {boolean} True if the marker is draggable. + */ +RichMarker.prototype.getDraggable = function() { + return /** @type {boolean} */ (this.get('draggable')); +}; +RichMarker.prototype['getDraggable'] = RichMarker.prototype.getDraggable; + + +/** + * Sets the marker to be draggable or not. + * + * @param {boolean} draggable If the marker is draggable or not. + */ +RichMarker.prototype.setDraggable = function(draggable) { + this.set('draggable', !!draggable); +}; +RichMarker.prototype['setDraggable'] = RichMarker.prototype.setDraggable; + + +/** + * Draggable property changed callback. + */ +RichMarker.prototype.draggable_changed = function() { + if (this.ready_) { + if (this.getDraggable()) { + this.addDragging_(this.markerWrapper_); + } else { + this.removeDragListeners_(); + } + } +}; +RichMarker.prototype['draggable_changed'] = + RichMarker.prototype.draggable_changed; + + +/** + * Gets the postiton of the marker. + * + * @return {google.maps.LatLng} The position of the marker. + */ +RichMarker.prototype.getPosition = function() { + return /** @type {google.maps.LatLng} */ (this.get('position')); +}; +RichMarker.prototype['getPosition'] = RichMarker.prototype.getPosition; + + +/** + * Sets the position of the marker. + * + * @param {google.maps.LatLng} position The position to set. + */ +RichMarker.prototype.setPosition = function(position) { + this.set('position', position); +}; +RichMarker.prototype['setPosition'] = RichMarker.prototype.setPosition; + + +/** + * Position changed event. + */ +RichMarker.prototype.position_changed = function() { + this.draw(); +}; +RichMarker.prototype['position_changed'] = + RichMarker.prototype.position_changed; + + +/** + * Gets the anchor. + * + * @return {google.maps.Size} The position of the anchor. + */ +RichMarker.prototype.getAnchor = function() { + return /** @type {google.maps.Size} */ (this.get('anchor')); +}; +RichMarker.prototype['getAnchor'] = RichMarker.prototype.getAnchor; + + +/** + * Sets the anchor. + * + * @param {RichMarkerPosition|google.maps.Size} anchor The anchor to set. + */ +RichMarker.prototype.setAnchor = function(anchor) { + this.set('anchor', anchor); +}; +RichMarker.prototype['setAnchor'] = RichMarker.prototype.setAnchor; + + +/** + * Anchor changed event. + */ +RichMarker.prototype.anchor_changed = function() { + this.draw(); +}; +RichMarker.prototype['anchor_changed'] = RichMarker.prototype.anchor_changed; + + +/** + * Converts a HTML string to a document fragment. + * + * @param {string} htmlString The HTML string to convert. + * @return {Node} A HTML document fragment. + * @private + */ +RichMarker.prototype.htmlToDocumentFragment_ = function(htmlString) { + var tempDiv = document.createElement('DIV'); + tempDiv.innerHTML = htmlString; + if (tempDiv.childNodes.length == 1) { + return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild)); + } else { + var fragment = document.createDocumentFragment(); + while (tempDiv.firstChild) { + fragment.appendChild(tempDiv.firstChild); + } + return fragment; + } +}; + + +/** + * Removes all children from the node. + * + * @param {Node} node The node to remove all children from. + * @private + */ +RichMarker.prototype.removeChildren_ = function(node) { + if (!node) { + return; + } + + var child; + while (child = node.firstChild) { + node.removeChild(child); + } +}; + + +/** + * Sets the content of the marker. + * + * @param {string|Node} content The content to set. + */ +RichMarker.prototype.setContent = function(content) { + this.set('content', content); +}; +RichMarker.prototype['setContent'] = RichMarker.prototype.setContent; + + +/** + * Get the content of the marker. + * + * @return {string|Node} The marker content. + */ +RichMarker.prototype.getContent = function() { + return /** @type {Node|string} */ (this.get('content')); +}; +RichMarker.prototype['getContent'] = RichMarker.prototype.getContent; + + +/** + * Sets the marker content and adds loading events to images + */ +RichMarker.prototype.content_changed = function() { + if (!this.markerContent_) { + // Marker content area doesnt exist. + return; + } + + this.removeChildren_(this.markerContent_); + var content = this.getContent(); + if (content) { + if (typeof content == 'string') { + content = content.replace(/^\s*([\S\s]*)\b\s*$/, '$1'); + content = this.htmlToDocumentFragment_(content); + } + this.markerContent_.appendChild(content); + + var that = this; + var images = this.markerContent_.getElementsByTagName('IMG'); + for (var i = 0, image; image = images[i]; i++) { + // By default, a browser lets a image be dragged outside of the browser, + // so by calling preventDefault we stop this behaviour and allow the image + // to be dragged around the map and now out of the browser and onto the + // desktop. + google.maps.event.addDomListener(image, 'mousedown', function(e) { + if (that.getDraggable()) { + if (e.preventDefault) { + e.preventDefault(); + } + e.returnValue = false; + } + }); + + // Because we don't know the size of an image till it loads, add a + // listener to the image load so the marker can resize and reposition + // itself to be the correct height. + google.maps.event.addDomListener(image, 'load', function() { + that.draw(); + }); + } + + google.maps.event.trigger(this, 'domready'); + } + + if (this.ready_) { + this.draw(); + } +}; +RichMarker.prototype['content_changed'] = RichMarker.prototype.content_changed; + +/** + * Sets the cursor. + * + * @param {string} whichCursor What cursor to show. + * @private + */ +RichMarker.prototype.setCursor_ = function(whichCursor) { + if (!this.ready_) { + return; + } + + var cursor = ''; + if (navigator.userAgent.indexOf('Gecko/') !== -1) { + // Moz has some nice cursors :) + if (whichCursor == 'dragging') { + cursor = '-moz-grabbing'; + } + + if (whichCursor == 'dragready') { + cursor = '-moz-grab'; + } + + if (whichCursor == 'draggable') { + cursor = 'pointer'; + } + } else { + if (whichCursor == 'dragging' || whichCursor == 'dragready') { + cursor = 'move'; + } + + if (whichCursor == 'draggable') { + cursor = 'pointer'; + } + } + + if (this.markerWrapper_.style.cursor != cursor) { + this.markerWrapper_.style.cursor = cursor; + } +}; + +/** + * Start dragging. + * + * @param {Event} e The event. + */ +RichMarker.prototype.startDrag = function(e) { + if (!this.getDraggable()) { + return; + } + + if (!this.dragging_) { + this.dragging_ = true; + var map = this.getMap(); + this.mapDraggable_ = map.get('draggable'); + map.set('draggable', false); + + // Store the current mouse position + this.mouseX_ = e.clientX; + this.mouseY_ = e.clientY; + + this.setCursor_('dragready'); + + // Stop the text from being selectable while being dragged + this.markerWrapper_.style['MozUserSelect'] = 'none'; + this.markerWrapper_.style['KhtmlUserSelect'] = 'none'; + this.markerWrapper_.style['WebkitUserSelect'] = 'none'; + + this.markerWrapper_['unselectable'] = 'on'; + this.markerWrapper_['onselectstart'] = function() { + return false; + }; + + this.addDraggingListeners_(); + + google.maps.event.trigger(this, 'dragstart'); + } +}; + + +/** + * Stop dragging. + */ +RichMarker.prototype.stopDrag = function() { + if (!this.getDraggable()) { + return; + } + + if (this.dragging_) { + this.dragging_ = false; + this.getMap().set('draggable', this.mapDraggable_); + this.mouseX_ = this.mouseY_ = this.mapDraggable_ = null; + + // Allow the text to be selectable again + this.markerWrapper_.style['MozUserSelect'] = ''; + this.markerWrapper_.style['KhtmlUserSelect'] = ''; + this.markerWrapper_.style['WebkitUserSelect'] = ''; + this.markerWrapper_['unselectable'] = 'off'; + this.markerWrapper_['onselectstart'] = function() {}; + + this.removeDraggingListeners_(); + + this.setCursor_('draggable'); + google.maps.event.trigger(this, 'dragend'); + + this.draw(); + } +}; + + +/** + * Handles the drag event. + * + * @param {Event} e The event. + */ +RichMarker.prototype.drag = function(e) { + if (!this.getDraggable() || !this.dragging_) { + // This object isn't draggable or we have stopped dragging + this.stopDrag(); + return; + } + + var dx = this.mouseX_ - e.clientX; + var dy = this.mouseY_ - e.clientY; + + this.mouseX_ = e.clientX; + this.mouseY_ = e.clientY; + + var left = parseInt(this.markerWrapper_.style['left'], 10) - dx; + var top = parseInt(this.markerWrapper_.style['top'], 10) - dy; + + this.markerWrapper_.style['left'] = left + 'px'; + this.markerWrapper_.style['top'] = top + 'px'; + + var offset = this.getOffset_(); + + // Set the position property and adjust for the anchor offset + var point = new google.maps.Point(left - offset.width, top - offset.height); + var projection = this.getProjection(); + this.setPosition(projection.fromDivPixelToLatLng(point)); + + this.setCursor_('dragging'); + google.maps.event.trigger(this, 'drag'); +}; + + +/** + * Removes the drag listeners associated with the marker. + * + * @private + */ +RichMarker.prototype.removeDragListeners_ = function() { + if (this.draggableListener_) { + google.maps.event.removeListener(this.draggableListener_); + delete this.draggableListener_; + } + this.setCursor_(''); +}; + + +/** + * Add dragability events to the marker. + * + * @param {Node} node The node to apply dragging to. + * @private + */ +RichMarker.prototype.addDragging_ = function(node) { + if (!node) { + return; + } + + var that = this; + this.draggableListener_ = + google.maps.event.addDomListener(node, 'mousedown', function(e) { + that.startDrag(e); + }); + + this.setCursor_('draggable'); +}; + + +/** + * Add dragging listeners. + * + * @private + */ +RichMarker.prototype.addDraggingListeners_ = function() { + var that = this; + if (this.markerWrapper_.setCapture) { + this.markerWrapper_.setCapture(true); + this.draggingListeners_ = [ + google.maps.event.addDomListener(this.markerWrapper_, 'mousemove', function(e) { + that.drag(e); + }, true), + google.maps.event.addDomListener(this.markerWrapper_, 'mouseup', function() { + that.stopDrag(); + that.markerWrapper_.releaseCapture(); + }, true) + ]; + } else { + this.draggingListeners_ = [ + google.maps.event.addDomListener(window, 'mousemove', function(e) { + that.drag(e); + }, true), + google.maps.event.addDomListener(window, 'mouseup', function() { + that.stopDrag(); + }, true) + ]; + } +}; + + +/** + * Remove dragging listeners. + * + * @private + */ +RichMarker.prototype.removeDraggingListeners_ = function() { + if (this.draggingListeners_) { + for (var i = 0, listener; listener = this.draggingListeners_[i]; i++) { + google.maps.event.removeListener(listener); + } + this.draggingListeners_.length = 0; + } +}; + + +/** + * Get the anchor offset. + * + * @return {google.maps.Size} The size offset. + * @private + */ +RichMarker.prototype.getOffset_ = function() { + var anchor = this.getAnchor(); + if (typeof anchor == 'object') { + return /** @type {google.maps.Size} */ (anchor); + } + + var offset = new google.maps.Size(0, 0); + if (!this.markerContent_) { + return offset; + } + + var width = this.markerContent_.offsetWidth; + var height = this.markerContent_.offsetHeight; + + switch (anchor) { + case RichMarkerPosition['TOP_LEFT']: + break; + case RichMarkerPosition['TOP']: + offset.width = -width / 2; + break; + case RichMarkerPosition['TOP_RIGHT']: + offset.width = -width; + break; + case RichMarkerPosition['LEFT']: + offset.height = -height / 2; + break; + case RichMarkerPosition['MIDDLE']: + offset.width = -width / 2; + offset.height = -height / 2; + break; + case RichMarkerPosition['RIGHT']: + offset.width = -width; + offset.height = -height / 2; + break; + case RichMarkerPosition['BOTTOM_LEFT']: + offset.height = -height; + break; + case RichMarkerPosition['BOTTOM']: + offset.width = -width / 2; + offset.height = -height; + break; + case RichMarkerPosition['BOTTOM_RIGHT']: + offset.width = -width; + offset.height = -height; + break; + } + + return offset; +}; + + +/** + * Adding the marker to a map. + * Implementing the interface. + */ +RichMarker.prototype.onAdd = function() { + if (!this.markerWrapper_) { + this.markerWrapper_ = document.createElement('DIV'); + this.markerWrapper_.style['position'] = 'absolute'; + } + + if (this.getZIndex()) { + this.markerWrapper_.style['zIndex'] = this.getZIndex(); + } + + this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none'; + + if (!this.markerContent_) { + this.markerContent_ = document.createElement('DIV'); + this.markerWrapper_.appendChild(this.markerContent_); + + var that = this; + google.maps.event.addDomListener(this.markerContent_, 'click', function(e) { + google.maps.event.trigger(that, 'click'); + }); + google.maps.event.addDomListener(this.markerContent_, 'mouseover', function(e) { + google.maps.event.trigger(that, 'mouseover'); + }); + google.maps.event.addDomListener(this.markerContent_, 'mouseout', function(e) { + google.maps.event.trigger(that, 'mouseout'); + }); + } + + this.ready_ = true; + this.content_changed(); + this.flat_changed(); + this.draggable_changed(); + + var panes = this.getPanes(); + if (panes) { + panes.overlayMouseTarget.appendChild(this.markerWrapper_); + } + + google.maps.event.trigger(this, 'ready'); +}; +RichMarker.prototype['onAdd'] = RichMarker.prototype.onAdd; + + +/** + * Impelementing the interface. + */ +RichMarker.prototype.draw = function() { + if (!this.ready_ || this.dragging_) { + return; + } + + var projection = this.getProjection(); + + if (!projection) { + // The map projection is not ready yet so do nothing + return; + } + + var latLng = /** @type {google.maps.LatLng} */ (this.get('position')); + var pos = projection.fromLatLngToDivPixel(latLng); + + var offset = this.getOffset_(); + this.markerWrapper_.style['top'] = (pos.y + offset.height) + 'px'; + this.markerWrapper_.style['left'] = (pos.x + offset.width) + 'px'; + + var height = this.markerContent_.offsetHeight; + var width = this.markerContent_.offsetWidth; + + if (width != this.get('width')) { + this.set('width', width); + } + + if (height != this.get('height')) { + this.set('height', height); + } +}; +RichMarker.prototype['draw'] = RichMarker.prototype.draw; + + +/** + * Removing a marker from the map. + * Implementing the interface. + */ +RichMarker.prototype.onRemove = function() { + if (this.markerWrapper_ && this.markerWrapper_.parentNode) { + this.markerWrapper_.parentNode.removeChild(this.markerWrapper_); + } + this.removeDragListeners_(); +}; +RichMarker.prototype['onRemove'] = RichMarker.prototype.onRemove; + + +/** + * RichMarker Anchor positions + * @enum {number} + */ +var RichMarkerPosition = { + 'TOP_LEFT': 1, + 'TOP': 2, + 'TOP_RIGHT': 3, + 'LEFT': 4, + 'MIDDLE': 5, + 'RIGHT': 6, + 'BOTTOM_LEFT': 7, + 'BOTTOM': 8, + 'BOTTOM_RIGHT': 9 +}; +window['RichMarkerPosition'] = RichMarkerPosition; + + + //TODO: export / passthese on in the service instead of window + window.InfoBox = InfoBox; + window.Cluster = Cluster; + window.ClusterIcon = ClusterIcon; + window.MarkerClusterer = MarkerClusterer; + window.MarkerLabel_ = MarkerLabel_; + window.MarkerWithLabel = MarkerWithLabel; + window.RichMarker = RichMarker; + }(); + //END REPLACE + }) + }; +}); +;/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* istanbul ignore next */ + angular.module('uiGmapgoogle-maps.wrapped') + .service('uiGmapDataStructures', function() { + return { + Graph: __webpack_require__(1).Graph, + Queue: __webpack_require__(1).Queue + }; + }); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + (function() { + module.exports = { + Graph: __webpack_require__(2), + Heap: __webpack_require__(3), + LinkedList: __webpack_require__(4), + Map: __webpack_require__(5), + Queue: __webpack_require__(6), + RedBlackTree: __webpack_require__(7), + Trie: __webpack_require__(8) + }; + + }).call(this); + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /* + Graph implemented as a modified incidence list. O(1) for every typical + operation except `removeNode()` at O(E) where E is the number of edges. + + ## Overview example: + + ```js + var graph = new Graph; + graph.addNode('A'); // => a node object. For more info, log the output or check + // the documentation for addNode + graph.addNode('B'); + graph.addNode('C'); + graph.addEdge('A', 'C'); // => an edge object + graph.addEdge('A', 'B'); + graph.getEdge('B', 'A'); // => undefined. Directed edge! + graph.getEdge('A', 'B'); // => the edge object previously added + graph.getEdge('A', 'B').weight = 2 // weight is the only built-in handy property + // of an edge object. Feel free to attach + // other properties + graph.getInEdgesOf('B'); // => array of edge objects, in this case only one; + // connecting A to B + graph.getOutEdgesOf('A'); // => array of edge objects, one to B and one to C + graph.getAllEdgesOf('A'); // => all the in and out edges. Edge directed toward + // the node itself are only counted once + forEachNode(function(nodeObject) { + console.log(node); + }); + forEachEdge(function(edgeObject) { + console.log(edgeObject); + }); + graph.removeNode('C'); // => 'C'. The edge between A and C also removed + graph.removeEdge('A', 'B'); // => the edge object removed + ``` + + ## Properties: + + - nodeSize: total number of nodes. + - edgeSize: total number of edges. + */ + + + (function() { + var Graph, + __hasProp = {}.hasOwnProperty; + + Graph = (function() { + function Graph() { + this._nodes = {}; + this.nodeSize = 0; + this.edgeSize = 0; + } + + Graph.prototype.addNode = function(id) { + /* + The `id` is a unique identifier for the node, and should **not** change + after it's added. It will be used for adding, retrieving and deleting + related edges too. + + **Note** that, internally, the ids are kept in an object. JavaScript's + object hashes the id `'2'` and `2` to the same key, so please stick to a + simple id data type such as number or string. + + _Returns:_ the node object. Feel free to attach additional custom properties + on it for graph algorithms' needs. **Undefined if node id already exists**, + as to avoid accidental overrides. + */ + + if (!this._nodes[id]) { + this.nodeSize++; + return this._nodes[id] = { + _outEdges: {}, + _inEdges: {} + }; + } + }; + + Graph.prototype.getNode = function(id) { + /* + _Returns:_ the node object. Feel free to attach additional custom properties + on it for graph algorithms' needs. + */ + + return this._nodes[id]; + }; + + Graph.prototype.removeNode = function(id) { + /* + _Returns:_ the node object removed, or undefined if it didn't exist in the + first place. + */ + + var inEdgeId, nodeToRemove, outEdgeId, _ref, _ref1; + nodeToRemove = this._nodes[id]; + if (!nodeToRemove) { + return; + } else { + _ref = nodeToRemove._outEdges; + for (outEdgeId in _ref) { + if (!__hasProp.call(_ref, outEdgeId)) continue; + this.removeEdge(id, outEdgeId); + } + _ref1 = nodeToRemove._inEdges; + for (inEdgeId in _ref1) { + if (!__hasProp.call(_ref1, inEdgeId)) continue; + this.removeEdge(inEdgeId, id); + } + this.nodeSize--; + delete this._nodes[id]; + } + return nodeToRemove; + }; + + Graph.prototype.addEdge = function(fromId, toId, weight) { + var edgeToAdd, fromNode, toNode; + if (weight == null) { + weight = 1; + } + /* + `fromId` and `toId` are the node id specified when it was created using + `addNode()`. `weight` is optional and defaults to 1. Ignoring it effectively + makes this an unweighted graph. Under the hood, `weight` is just a normal + property of the edge object. + + _Returns:_ the edge object created. Feel free to attach additional custom + properties on it for graph algorithms' needs. **Or undefined** if the nodes + of id `fromId` or `toId` aren't found, or if an edge already exists between + the two nodes. + */ + + if (this.getEdge(fromId, toId)) { + return; + } + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + if (!fromNode || !toNode) { + return; + } + edgeToAdd = { + weight: weight + }; + fromNode._outEdges[toId] = edgeToAdd; + toNode._inEdges[fromId] = edgeToAdd; + this.edgeSize++; + return edgeToAdd; + }; + + Graph.prototype.getEdge = function(fromId, toId) { + /* + _Returns:_ the edge object, or undefined if the nodes of id `fromId` or + `toId` aren't found. + */ + + var fromNode, toNode; + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + if (!fromNode || !toNode) { + + } else { + return fromNode._outEdges[toId]; + } + }; + + Graph.prototype.removeEdge = function(fromId, toId) { + /* + _Returns:_ the edge object removed, or undefined of edge wasn't found. + */ + + var edgeToDelete, fromNode, toNode; + fromNode = this._nodes[fromId]; + toNode = this._nodes[toId]; + edgeToDelete = this.getEdge(fromId, toId); + if (!edgeToDelete) { + return; + } + delete fromNode._outEdges[toId]; + delete toNode._inEdges[fromId]; + this.edgeSize--; + return edgeToDelete; + }; + + Graph.prototype.getInEdgesOf = function(nodeId) { + /* + _Returns:_ an array of edge objects that are directed toward the node, or + empty array if no such edge or node exists. + */ + + var fromId, inEdges, toNode, _ref; + toNode = this._nodes[nodeId]; + inEdges = []; + _ref = toNode != null ? toNode._inEdges : void 0; + for (fromId in _ref) { + if (!__hasProp.call(_ref, fromId)) continue; + inEdges.push(this.getEdge(fromId, nodeId)); + } + return inEdges; + }; + + Graph.prototype.getOutEdgesOf = function(nodeId) { + /* + _Returns:_ an array of edge objects that go out of the node, or empty array + if no such edge or node exists. + */ + + var fromNode, outEdges, toId, _ref; + fromNode = this._nodes[nodeId]; + outEdges = []; + _ref = fromNode != null ? fromNode._outEdges : void 0; + for (toId in _ref) { + if (!__hasProp.call(_ref, toId)) continue; + outEdges.push(this.getEdge(nodeId, toId)); + } + return outEdges; + }; + + Graph.prototype.getAllEdgesOf = function(nodeId) { + /* + **Note:** not the same as concatenating `getInEdgesOf()` and + `getOutEdgesOf()`. Some nodes might have an edge pointing toward itself. + This method solves that duplication. + + _Returns:_ an array of edge objects linked to the node, no matter if they're + outgoing or coming. Duplicate edge created by self-pointing nodes are + removed. Only one copy stays. Empty array if node has no edge. + */ + + var i, inEdges, outEdges, selfEdge, _i, _ref, _ref1; + inEdges = this.getInEdgesOf(nodeId); + outEdges = this.getOutEdgesOf(nodeId); + if (inEdges.length === 0) { + return outEdges; + } + selfEdge = this.getEdge(nodeId, nodeId); + for (i = _i = 0, _ref = inEdges.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) { + if (inEdges[i] === selfEdge) { + _ref1 = [inEdges[inEdges.length - 1], inEdges[i]], inEdges[i] = _ref1[0], inEdges[inEdges.length - 1] = _ref1[1]; + inEdges.pop(); + break; + } + } + return inEdges.concat(outEdges); + }; + + Graph.prototype.forEachNode = function(operation) { + /* + Traverse through the graph in an arbitrary manner, visiting each node once. + Pass a function of the form `fn(nodeObject, nodeId)`. + + _Returns:_ undefined. + */ + + var nodeId, nodeObject, _ref; + _ref = this._nodes; + for (nodeId in _ref) { + if (!__hasProp.call(_ref, nodeId)) continue; + nodeObject = _ref[nodeId]; + operation(nodeObject, nodeId); + } + }; + + Graph.prototype.forEachEdge = function(operation) { + /* + Traverse through the graph in an arbitrary manner, visiting each edge once. + Pass a function of the form `fn(edgeObject)`. + + _Returns:_ undefined. + */ + + var edgeObject, nodeId, nodeObject, toId, _ref, _ref1; + _ref = this._nodes; + for (nodeId in _ref) { + if (!__hasProp.call(_ref, nodeId)) continue; + nodeObject = _ref[nodeId]; + _ref1 = nodeObject._outEdges; + for (toId in _ref1) { + if (!__hasProp.call(_ref1, toId)) continue; + edgeObject = _ref1[toId]; + operation(edgeObject); + } + } + }; + + return Graph; + + })(); + + module.exports = Graph; + + }).call(this); + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* + Minimum heap, i.e. smallest node at root. + + **Note:** does not accept null or undefined. This is by design. Those values + cause comparison problems and might report false negative during extraction. + + ## Overview example: + + ```js + var heap = new Heap([5, 6, 3, 4]); + heap.add(10); // => 10 + heap.removeMin(); // => 3 + heap.peekMin(); // => 4 + ``` + + ## Properties: + + - size: total number of items. + */ + + + (function() { + var Heap, _leftChild, _parent, _rightChild; + + Heap = (function() { + function Heap(dataToHeapify) { + var i, item, _i, _j, _len, _ref; + if (dataToHeapify == null) { + dataToHeapify = []; + } + /* + Pass an optional array to be heapified. Takes only O(n) time. + */ + + this._data = [void 0]; + for (_i = 0, _len = dataToHeapify.length; _i < _len; _i++) { + item = dataToHeapify[_i]; + if (item != null) { + this._data.push(item); + } + } + if (this._data.length > 1) { + for (i = _j = 2, _ref = this._data.length; 2 <= _ref ? _j < _ref : _j > _ref; i = 2 <= _ref ? ++_j : --_j) { + this._upHeap(i); + } + } + this.size = this._data.length - 1; + } + + Heap.prototype.add = function(value) { + /* + **Remember:** rejects null and undefined for mentioned reasons. + + _Returns:_ the value added. + */ + + if (value == null) { + return; + } + this._data.push(value); + this._upHeap(this._data.length - 1); + this.size++; + return value; + }; + + Heap.prototype.removeMin = function() { + /* + _Returns:_ the smallest item (the root). + */ + + var min; + if (this._data.length === 1) { + return; + } + this.size--; + if (this._data.length === 2) { + return this._data.pop(); + } + min = this._data[1]; + this._data[1] = this._data.pop(); + this._downHeap(); + return min; + }; + + Heap.prototype.peekMin = function() { + /* + Check the smallest item without removing it. + + _Returns:_ the smallest item (the root). + */ + + return this._data[1]; + }; + + Heap.prototype._upHeap = function(index) { + var valueHolder, _ref; + valueHolder = this._data[index]; + while (this._data[index] < this._data[_parent(index)] && index > 1) { + _ref = [this._data[_parent(index)], this._data[index]], this._data[index] = _ref[0], this._data[_parent(index)] = _ref[1]; + index = _parent(index); + } + }; + + Heap.prototype._downHeap = function() { + var currentIndex, smallerChildIndex, _ref; + currentIndex = 1; + while (_leftChild(currentIndex < this._data.length)) { + smallerChildIndex = _leftChild(currentIndex); + if (smallerChildIndex < this._data.length - 1) { + if (this._data[_rightChild(currentIndex)] < this._data[smallerChildIndex]) { + smallerChildIndex = _rightChild(currentIndex); + } + } + if (this._data[smallerChildIndex] < this._data[currentIndex]) { + _ref = [this._data[currentIndex], this._data[smallerChildIndex]], this._data[smallerChildIndex] = _ref[0], this._data[currentIndex] = _ref[1]; + currentIndex = smallerChildIndex; + } else { + break; + } + } + }; + + return Heap; + + })(); + + _parent = function(index) { + return index >> 1; + }; + + _leftChild = function(index) { + return index << 1; + }; + + _rightChild = function(index) { + return (index << 1) + 1; + }; + + module.exports = Heap; + + }).call(this); + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /* + Doubly Linked. + + ## Overview example: + + ```js + var list = new LinkedList([5, 4, 9]); + list.add(12); // => 12 + list.head.next.value; // => 4 + list.tail.value; // => 12 + list.at(-1); // => 12 + list.removeAt(2); // => 9 + list.remove(4); // => 4 + list.indexOf(5); // => 0 + list.add(5, 1); // => 5. Second 5 at position 1. + list.indexOf(5, 1); // => 1 + ``` + + ## Properties: + + - head: first item. + - tail: last item. + - size: total number of items. + - item.value: value passed to the item when calling `add()`. + - item.prev: previous item. + - item.next: next item. + */ + + + (function() { + var LinkedList; + + LinkedList = (function() { + function LinkedList(valuesToAdd) { + var value, _i, _len; + if (valuesToAdd == null) { + valuesToAdd = []; + } + /* + Can pass an array of elements to link together during `new LinkedList()` + initiation. + */ + + this.head = { + prev: void 0, + value: void 0, + next: void 0 + }; + this.tail = { + prev: void 0, + value: void 0, + next: void 0 + }; + this.size = 0; + for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) { + value = valuesToAdd[_i]; + this.add(value); + } + } + + LinkedList.prototype.at = function(position) { + /* + Get the item at `position` (optional). Accepts negative index: + + ```js + myList.at(-1); // Returns the last element. + ``` + However, passing a negative index that surpasses the boundary will return + undefined: + + ```js + myList = new LinkedList([2, 6, 8, 3]) + myList.at(-5); // Undefined. + myList.at(-4); // 2. + ``` + _Returns:_ item gotten, or undefined if not found. + */ + + var currentNode, i, _i, _j, _ref; + if (!((-this.size <= position && position < this.size))) { + return; + } + position = this._adjust(position); + if (position * 2 < this.size) { + currentNode = this.head; + for (i = _i = 1; _i <= position; i = _i += 1) { + currentNode = currentNode.next; + } + } else { + currentNode = this.tail; + for (i = _j = 1, _ref = this.size - position - 1; _j <= _ref; i = _j += 1) { + currentNode = currentNode.prev; + } + } + return currentNode; + }; + + LinkedList.prototype.add = function(value, position) { + var currentNode, nodeToAdd, _ref, _ref1, _ref2; + if (position == null) { + position = this.size; + } + /* + Add a new item at `position` (optional). Defaults to adding at the end. + `position`, just like in `at()`, can be negative (within the negative + boundary). Position specifies the place the value's going to be, and the old + node will be pushed higher. `add(-2)` on list of size 7 is the same as + `add(5)`. + + _Returns:_ item added. + */ + + if (!((-this.size <= position && position <= this.size))) { + return; + } + nodeToAdd = { + value: value + }; + position = this._adjust(position); + if (this.size === 0) { + this.head = nodeToAdd; + } else { + if (position === 0) { + _ref = [nodeToAdd, this.head, nodeToAdd], this.head.prev = _ref[0], nodeToAdd.next = _ref[1], this.head = _ref[2]; + } else { + currentNode = this.at(position - 1); + _ref1 = [currentNode.next, nodeToAdd, nodeToAdd, currentNode], nodeToAdd.next = _ref1[0], (_ref2 = currentNode.next) != null ? _ref2.prev = _ref1[1] : void 0, currentNode.next = _ref1[2], nodeToAdd.prev = _ref1[3]; + } + } + if (position === this.size) { + this.tail = nodeToAdd; + } + this.size++; + return value; + }; + + LinkedList.prototype.removeAt = function(position) { + var currentNode, valueToReturn, _ref; + if (position == null) { + position = this.size - 1; + } + /* + Remove an item at index `position` (optional). Defaults to the last item. + Index can be negative (within the boundary). + + _Returns:_ item removed. + */ + + if (!((-this.size <= position && position < this.size))) { + return; + } + if (this.size === 0) { + return; + } + position = this._adjust(position); + if (this.size === 1) { + valueToReturn = this.head.value; + this.head.value = this.tail.value = void 0; + } else { + if (position === 0) { + valueToReturn = this.head.value; + this.head = this.head.next; + this.head.prev = void 0; + } else { + currentNode = this.at(position); + valueToReturn = currentNode.value; + currentNode.prev.next = currentNode.next; + if ((_ref = currentNode.next) != null) { + _ref.prev = currentNode.prev; + } + if (position === this.size - 1) { + this.tail = currentNode.prev; + } + } + } + this.size--; + return valueToReturn; + }; + + LinkedList.prototype.remove = function(value) { + /* + Remove the item using its value instead of position. **Will remove the fist + occurrence of `value`.** + + _Returns:_ the value, or undefined if value's not found. + */ + + var currentNode; + if (value == null) { + return; + } + currentNode = this.head; + while (currentNode && currentNode.value !== value) { + currentNode = currentNode.next; + } + if (!currentNode) { + return; + } + if (this.size === 1) { + this.head.value = this.tail.value = void 0; + } else if (currentNode === this.head) { + this.head = this.head.next; + this.head.prev = void 0; + } else if (currentNode === this.tail) { + this.tail = this.tail.prev; + this.tail.next = void 0; + } else { + currentNode.prev.next = currentNode.next; + currentNode.next.prev = currentNode.prev; + } + this.size--; + return value; + }; + + LinkedList.prototype.indexOf = function(value, startingPosition) { + var currentNode, position; + if (startingPosition == null) { + startingPosition = 0; + } + /* + Find the index of an item, similarly to `array.indexOf()`. Defaults to start + searching from the beginning, by can start at another position by passing + `startingPosition`. This parameter can also be negative; but unlike the + other methods of this class, `startingPosition` (optional) can be as small + as desired; a value of -999 for a list of size 5 will start searching + normally, at the beginning. + + **Note:** searches forwardly, **not** backwardly, i.e: + + ```js + var myList = new LinkedList([2, 3, 1, 4, 3, 5]) + myList.indexOf(3, -3); // Returns 4, not 1 + ``` + _Returns:_ index of item found, or -1 if not found. + */ + + if (((this.head.value == null) && !this.head.next) || startingPosition >= this.size) { + return -1; + } + startingPosition = Math.max(0, this._adjust(startingPosition)); + currentNode = this.at(startingPosition); + position = startingPosition; + while (currentNode) { + if (currentNode.value === value) { + break; + } + currentNode = currentNode.next; + position++; + } + if (position === this.size) { + return -1; + } else { + return position; + } + }; + + LinkedList.prototype._adjust = function(position) { + if (position < 0) { + return this.size + position; + } else { + return position; + } + }; + + return LinkedList; + + })(); + + module.exports = LinkedList; + + }).call(this); + + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /* + Kind of a stopgap measure for the upcoming [JavaScript + Map](http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets) + + **Note:** due to JavaScript's limitations, hashing something other than Boolean, + Number, String, Undefined, Null, RegExp, Function requires a hack that inserts a + hidden unique property into the object. This means `set`, `get`, `has` and + `delete` must employ the same object, and not a mere identical copy as in the + case of, say, a string. + + ## Overview example: + + ```js + var map = new Map({'alice': 'wonderland', 20: 'ok'}); + map.set('20', 5); // => 5 + map.get('20'); // => 5 + map.has('alice'); // => true + map.delete(20) // => true + var arr = [1, 2]; + map.add(arr, 'goody'); // => 'goody' + map.has(arr); // => true + map.has([1, 2]); // => false. Needs to compare by reference + map.forEach(function(key, value) { + console.log(key, value); + }); + ``` + + ## Properties: + + - size: The total number of `(key, value)` pairs. + */ + + + (function() { + var Map, SPECIAL_TYPE_KEY_PREFIX, _extractDataType, _isSpecialType, + __hasProp = {}.hasOwnProperty; + + SPECIAL_TYPE_KEY_PREFIX = '_mapId_'; + + Map = (function() { + Map._mapIdTracker = 0; + + Map._newMapId = function() { + return this._mapIdTracker++; + }; + + function Map(objectToMap) { + /* + Pass an optional object whose (key, value) pair will be hashed. **Careful** + not to pass something like {5: 'hi', '5': 'hello'}, since JavaScript's + native object behavior will crush the first 5 property before it gets to + constructor. + */ + + var key, value; + this._content = {}; + this._itemId = 0; + this._id = Map._newMapId(); + this.size = 0; + for (key in objectToMap) { + if (!__hasProp.call(objectToMap, key)) continue; + value = objectToMap[key]; + this.set(key, value); + } + } + + Map.prototype.hash = function(key, makeHash) { + var propertyForMap, type; + if (makeHash == null) { + makeHash = false; + } + /* + The hash function for hashing keys is public. Feel free to replace it with + your own. The `makeHash` parameter is optional and accepts a boolean + (defaults to `false`) indicating whether or not to produce a new hash (for + the first use, naturally). + + _Returns:_ the hash. + */ + + type = _extractDataType(key); + if (_isSpecialType(key)) { + propertyForMap = SPECIAL_TYPE_KEY_PREFIX + this._id; + if (makeHash && !key[propertyForMap]) { + key[propertyForMap] = this._itemId++; + } + return propertyForMap + '_' + key[propertyForMap]; + } else { + return type + '_' + key; + } + }; + + Map.prototype.set = function(key, value) { + /* + _Returns:_ value. + */ + + if (!this.has(key)) { + this.size++; + } + this._content[this.hash(key, true)] = [value, key]; + return value; + }; + + Map.prototype.get = function(key) { + /* + _Returns:_ value corresponding to the key, or undefined if not found. + */ + + var _ref; + return (_ref = this._content[this.hash(key)]) != null ? _ref[0] : void 0; + }; + + Map.prototype.has = function(key) { + /* + Check whether a value exists for the key. + + _Returns:_ true or false. + */ + + return this.hash(key) in this._content; + }; + + Map.prototype["delete"] = function(key) { + /* + Remove the (key, value) pair. + + _Returns:_ **true or false**. Unlike most of this library, this method + doesn't return the deleted value. This is so that it conforms to the future + JavaScript `map.delete()`'s behavior. + */ + + var hashedKey; + hashedKey = this.hash(key); + if (hashedKey in this._content) { + delete this._content[hashedKey]; + if (_isSpecialType(key)) { + delete key[SPECIAL_TYPE_KEY_PREFIX + this._id]; + } + this.size--; + return true; + } + return false; + }; + + Map.prototype.forEach = function(operation) { + /* + Traverse through the map. Pass a function of the form `fn(key, value)`. + + _Returns:_ undefined. + */ + + var key, value, _ref; + _ref = this._content; + for (key in _ref) { + if (!__hasProp.call(_ref, key)) continue; + value = _ref[key]; + operation(value[1], value[0]); + } + }; + + return Map; + + })(); + + _isSpecialType = function(key) { + var simpleHashableTypes, simpleType, type, _i, _len; + simpleHashableTypes = ['Boolean', 'Number', 'String', 'Undefined', 'Null', 'RegExp', 'Function']; + type = _extractDataType(key); + for (_i = 0, _len = simpleHashableTypes.length; _i < _len; _i++) { + simpleType = simpleHashableTypes[_i]; + if (type === simpleType) { + return false; + } + } + return true; + }; + + _extractDataType = function(type) { + return Object.prototype.toString.apply(type).match(/\[object (.+)\]/)[1]; + }; + + module.exports = Map; + + }).call(this); + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + /* + Amortized O(1) dequeue! + + ## Overview example: + + ```js + var queue = new Queue([1, 6, 4]); + queue.enqueue(10); // => 10 + queue.dequeue(); // => 1 + queue.dequeue(); // => 6 + queue.dequeue(); // => 4 + queue.peek(); // => 10 + queue.dequeue(); // => 10 + queue.peek(); // => undefined + ``` + + ## Properties: + + - size: The total number of items. + */ + + + (function() { + var Queue; + + Queue = (function() { + function Queue(initialArray) { + if (initialArray == null) { + initialArray = []; + } + /* + Pass an optional array to be transformed into a queue. The item at index 0 + is the first to be dequeued. + */ + + this._content = initialArray; + this._dequeueIndex = 0; + this.size = this._content.length; + } + + Queue.prototype.enqueue = function(item) { + /* + _Returns:_ the item. + */ + + this.size++; + this._content.push(item); + return item; + }; + + Queue.prototype.dequeue = function() { + /* + _Returns:_ the dequeued item. + */ + + var itemToDequeue; + if (this.size === 0) { + return; + } + this.size--; + itemToDequeue = this._content[this._dequeueIndex]; + this._dequeueIndex++; + if (this._dequeueIndex * 2 > this._content.length) { + this._content = this._content.slice(this._dequeueIndex); + this._dequeueIndex = 0; + } + return itemToDequeue; + }; + + Queue.prototype.peek = function() { + /* + Check the next item to be dequeued, without removing it. + + _Returns:_ the item. + */ + + return this._content[this._dequeueIndex]; + }; + + return Queue; + + })(); + + module.exports = Queue; + + }).call(this); + + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /* + Credit to Wikipedia's article on [Red-black + tree](http://en.wikipedia.org/wiki/Red–black_tree) + + **Note:** doesn't handle duplicate entries, undefined and null. This is by + design. + + ## Overview example: + + ```js + var rbt = new RedBlackTree([7, 5, 1, 8]); + rbt.add(2); // => 2 + rbt.add(10); // => 10 + rbt.has(5); // => true + rbt.peekMin(); // => 1 + rbt.peekMax(); // => 10 + rbt.removeMin(); // => 1 + rbt.removeMax(); // => 10 + rbt.remove(8); // => 8 + ``` + + ## Properties: + + - size: The total number of items. + */ + + + (function() { + var BLACK, NODE_FOUND, NODE_TOO_BIG, NODE_TOO_SMALL, RED, RedBlackTree, STOP_SEARCHING, _findNode, _grandParentOf, _isLeft, _leftOrRight, _peekMaxNode, _peekMinNode, _siblingOf, _uncleOf; + + NODE_FOUND = 0; + + NODE_TOO_BIG = 1; + + NODE_TOO_SMALL = 2; + + STOP_SEARCHING = 3; + + RED = 1; + + BLACK = 2; + + RedBlackTree = (function() { + function RedBlackTree(valuesToAdd) { + var value, _i, _len; + if (valuesToAdd == null) { + valuesToAdd = []; + } + /* + Pass an optional array to be turned into binary tree. **Note:** does not + accept duplicate, undefined and null. + */ + + this._root; + this.size = 0; + for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) { + value = valuesToAdd[_i]; + if (value != null) { + this.add(value); + } + } + } + + RedBlackTree.prototype.add = function(value) { + /* + Again, make sure to not pass a value already in the tree, or undefined, or + null. + + _Returns:_ value added. + */ + + var currentNode, foundNode, nodeToInsert, _ref; + if (value == null) { + return; + } + this.size++; + nodeToInsert = { + value: value, + _color: RED + }; + if (!this._root) { + this._root = nodeToInsert; + } else { + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else { + if (value < node.value) { + if (node._left) { + return NODE_TOO_BIG; + } else { + nodeToInsert._parent = node; + node._left = nodeToInsert; + return STOP_SEARCHING; + } + } else { + if (node._right) { + return NODE_TOO_SMALL; + } else { + nodeToInsert._parent = node; + node._right = nodeToInsert; + return STOP_SEARCHING; + } + } + } + }); + if (foundNode != null) { + return; + } + } + currentNode = nodeToInsert; + while (true) { + if (currentNode === this._root) { + currentNode._color = BLACK; + break; + } + if (currentNode._parent._color === BLACK) { + break; + } + if (((_ref = _uncleOf(currentNode)) != null ? _ref._color : void 0) === RED) { + currentNode._parent._color = BLACK; + _uncleOf(currentNode)._color = BLACK; + _grandParentOf(currentNode)._color = RED; + currentNode = _grandParentOf(currentNode); + continue; + } + if (!_isLeft(currentNode) && _isLeft(currentNode._parent)) { + this._rotateLeft(currentNode._parent); + currentNode = currentNode._left; + } else if (_isLeft(currentNode) && !_isLeft(currentNode._parent)) { + this._rotateRight(currentNode._parent); + currentNode = currentNode._right; + } + currentNode._parent._color = BLACK; + _grandParentOf(currentNode)._color = RED; + if (_isLeft(currentNode)) { + this._rotateRight(_grandParentOf(currentNode)); + } else { + this._rotateLeft(_grandParentOf(currentNode)); + } + break; + } + return value; + }; + + RedBlackTree.prototype.has = function(value) { + /* + _Returns:_ true or false. + */ + + var foundNode; + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else if (value < node.value) { + return NODE_TOO_BIG; + } else { + return NODE_TOO_SMALL; + } + }); + if (foundNode) { + return true; + } else { + return false; + } + }; + + RedBlackTree.prototype.peekMin = function() { + /* + Check the minimum value without removing it. + + _Returns:_ the minimum value. + */ + + var _ref; + return (_ref = _peekMinNode(this._root)) != null ? _ref.value : void 0; + }; + + RedBlackTree.prototype.peekMax = function() { + /* + Check the maximum value without removing it. + + _Returns:_ the maximum value. + */ + + var _ref; + return (_ref = _peekMaxNode(this._root)) != null ? _ref.value : void 0; + }; + + RedBlackTree.prototype.remove = function(value) { + /* + _Returns:_ the value removed, or undefined if the value's not found. + */ + + var foundNode; + foundNode = _findNode(this._root, function(node) { + if (value === node.value) { + return NODE_FOUND; + } else if (value < node.value) { + return NODE_TOO_BIG; + } else { + return NODE_TOO_SMALL; + } + }); + if (!foundNode) { + return; + } + this._removeNode(this._root, foundNode); + this.size--; + return value; + }; + + RedBlackTree.prototype.removeMin = function() { + /* + _Returns:_ smallest item removed, or undefined if tree's empty. + */ + + var nodeToRemove, valueToReturn; + nodeToRemove = _peekMinNode(this._root); + if (!nodeToRemove) { + return; + } + valueToReturn = nodeToRemove.value; + this._removeNode(this._root, nodeToRemove); + return valueToReturn; + }; + + RedBlackTree.prototype.removeMax = function() { + /* + _Returns:_ biggest item removed, or undefined if tree's empty. + */ + + var nodeToRemove, valueToReturn; + nodeToRemove = _peekMaxNode(this._root); + if (!nodeToRemove) { + return; + } + valueToReturn = nodeToRemove.value; + this._removeNode(this._root, nodeToRemove); + return valueToReturn; + }; + + RedBlackTree.prototype._removeNode = function(root, node) { + var sibling, successor, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + if (node._left && node._right) { + successor = _peekMinNode(node._right); + node.value = successor.value; + node = successor; + } + successor = node._left || node._right; + if (!successor) { + successor = { + color: BLACK, + _right: void 0, + _left: void 0, + isLeaf: true + }; + } + successor._parent = node._parent; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = successor; + } + if (node._color === BLACK) { + if (successor._color === RED) { + successor._color = BLACK; + if (!successor._parent) { + this._root = successor; + } + } else { + while (true) { + if (!successor._parent) { + if (!successor.isLeaf) { + this._root = successor; + } else { + this._root = void 0; + } + break; + } + sibling = _siblingOf(successor); + if ((sibling != null ? sibling._color : void 0) === RED) { + successor._parent._color = RED; + sibling._color = BLACK; + if (_isLeft(successor)) { + this._rotateLeft(successor._parent); + } else { + this._rotateRight(successor._parent); + } + } + sibling = _siblingOf(successor); + if (successor._parent._color === BLACK && (!sibling || (sibling._color === BLACK && (!sibling._left || sibling._left._color === BLACK) && (!sibling._right || sibling._right._color === BLACK)))) { + if (sibling != null) { + sibling._color = RED; + } + if (successor.isLeaf) { + successor._parent[_leftOrRight(successor)] = void 0; + } + successor = successor._parent; + continue; + } + if (successor._parent._color === RED && (!sibling || (sibling._color === BLACK && (!sibling._left || ((_ref1 = sibling._left) != null ? _ref1._color : void 0) === BLACK) && (!sibling._right || ((_ref2 = sibling._right) != null ? _ref2._color : void 0) === BLACK)))) { + if (sibling != null) { + sibling._color = RED; + } + successor._parent._color = BLACK; + break; + } + if ((sibling != null ? sibling._color : void 0) === BLACK) { + if (_isLeft(successor) && (!sibling._right || sibling._right._color === BLACK) && ((_ref3 = sibling._left) != null ? _ref3._color : void 0) === RED) { + sibling._color = RED; + if ((_ref4 = sibling._left) != null) { + _ref4._color = BLACK; + } + this._rotateRight(sibling); + } else if (!_isLeft(successor) && (!sibling._left || sibling._left._color === BLACK) && ((_ref5 = sibling._right) != null ? _ref5._color : void 0) === RED) { + sibling._color = RED; + if ((_ref6 = sibling._right) != null) { + _ref6._color = BLACK; + } + this._rotateLeft(sibling); + } + break; + } + sibling = _siblingOf(successor); + sibling._color = successor._parent._color; + if (_isLeft(successor)) { + sibling._right._color = BLACK; + this._rotateRight(successor._parent); + } else { + sibling._left._color = BLACK; + this._rotateLeft(successor._parent); + } + } + } + } + if (successor.isLeaf) { + return (_ref7 = successor._parent) != null ? _ref7[_leftOrRight(successor)] = void 0 : void 0; + } + }; + + RedBlackTree.prototype._rotateLeft = function(node) { + var _ref, _ref1; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = node._right; + } + node._right._parent = node._parent; + node._parent = node._right; + node._right = node._right._left; + node._parent._left = node; + if ((_ref1 = node._right) != null) { + _ref1._parent = node; + } + if (node._parent._parent == null) { + return this._root = node._parent; + } + }; + + RedBlackTree.prototype._rotateRight = function(node) { + var _ref, _ref1; + if ((_ref = node._parent) != null) { + _ref[_leftOrRight(node)] = node._left; + } + node._left._parent = node._parent; + node._parent = node._left; + node._left = node._left._right; + node._parent._right = node; + if ((_ref1 = node._left) != null) { + _ref1._parent = node; + } + if (node._parent._parent == null) { + return this._root = node._parent; + } + }; + + return RedBlackTree; + + })(); + + _isLeft = function(node) { + return node === node._parent._left; + }; + + _leftOrRight = function(node) { + if (_isLeft(node)) { + return '_left'; + } else { + return '_right'; + } + }; + + _findNode = function(startingNode, comparator) { + var comparisonResult, currentNode, foundNode; + currentNode = startingNode; + foundNode = void 0; + while (currentNode) { + comparisonResult = comparator(currentNode); + if (comparisonResult === NODE_FOUND) { + foundNode = currentNode; + break; + } + if (comparisonResult === NODE_TOO_BIG) { + currentNode = currentNode._left; + } else if (comparisonResult === NODE_TOO_SMALL) { + currentNode = currentNode._right; + } else if (comparisonResult === STOP_SEARCHING) { + break; + } + } + return foundNode; + }; + + _peekMinNode = function(startingNode) { + return _findNode(startingNode, function(node) { + if (node._left) { + return NODE_TOO_BIG; + } else { + return NODE_FOUND; + } + }); + }; + + _peekMaxNode = function(startingNode) { + return _findNode(startingNode, function(node) { + if (node._right) { + return NODE_TOO_SMALL; + } else { + return NODE_FOUND; + } + }); + }; + + _grandParentOf = function(node) { + var _ref; + return (_ref = node._parent) != null ? _ref._parent : void 0; + }; + + _uncleOf = function(node) { + if (!_grandParentOf(node)) { + return; + } + if (_isLeft(node._parent)) { + return _grandParentOf(node)._right; + } else { + return _grandParentOf(node)._left; + } + }; + + _siblingOf = function(node) { + if (_isLeft(node)) { + return node._parent._right; + } else { + return node._parent._left; + } + }; + + module.exports = RedBlackTree; + + }).call(this); + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + /* + Good for fast insertion/removal/lookup of strings. + + ## Overview example: + + ```js + var trie = new Trie(['bear', 'beer']); + trie.add('hello'); // => 'hello' + trie.add('helloha!'); // => 'helloha!' + trie.has('bears'); // => false + trie.longestPrefixOf('beatrice'); // => 'bea' + trie.wordsWithPrefix('hel'); // => ['hello', 'helloha!'] + trie.remove('beers'); // => undefined. 'beer' still exists + trie.remove('Beer') // => undefined. Case-sensitive + trie.remove('beer') // => 'beer'. Removed + ``` + + ## Properties: + + - size: The total number of words. + */ + + + (function() { + var Queue, Trie, WORD_END, _hasAtLeastNChildren, + __hasProp = {}.hasOwnProperty; + + Queue = __webpack_require__(6); + + WORD_END = 'end'; + + Trie = (function() { + function Trie(words) { + var word, _i, _len; + if (words == null) { + words = []; + } + /* + Pass an optional array of strings to be inserted initially. + */ + + this._root = {}; + this.size = 0; + for (_i = 0, _len = words.length; _i < _len; _i++) { + word = words[_i]; + this.add(word); + } + } + + Trie.prototype.add = function(word) { + /* + Add a whole string to the trie. + + _Returns:_ the word added. Will return undefined (without adding the value) + if the word passed is null or undefined. + */ + + var currentNode, letter, _i, _len; + if (word == null) { + return; + } + this.size++; + currentNode = this._root; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + currentNode[letter] = {}; + } + currentNode = currentNode[letter]; + } + currentNode[WORD_END] = true; + return word; + }; + + Trie.prototype.has = function(word) { + /* + __Returns:_ true or false. + */ + + var currentNode, letter, _i, _len; + if (word == null) { + return false; + } + currentNode = this._root; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + return false; + } + currentNode = currentNode[letter]; + } + if (currentNode[WORD_END]) { + return true; + } else { + return false; + } + }; + + Trie.prototype.longestPrefixOf = function(word) { + /* + Find all words containing the prefix. The word itself counts as a prefix. + + ```js + var trie = new Trie; + trie.add('hello'); + trie.longestPrefixOf('he'); // 'he' + trie.longestPrefixOf('hello'); // 'hello' + trie.longestPrefixOf('helloha!'); // 'hello' + ``` + + _Returns:_ the prefix string, or empty string if no prefix found. + */ + + var currentNode, letter, prefix, _i, _len; + if (word == null) { + return ''; + } + currentNode = this._root; + prefix = ''; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + break; + } + prefix += letter; + currentNode = currentNode[letter]; + } + return prefix; + }; + + Trie.prototype.wordsWithPrefix = function(prefix) { + /* + Find all words containing the prefix. The word itself counts as a prefix. + **Watch out for edge cases.** + + ```js + var trie = new Trie; + trie.wordsWithPrefix(''); // []. Check later case below. + trie.add(''); + trie.wordsWithPrefix(''); // [''] + trie.add('he'); + trie.add('hello'); + trie.add('hell'); + trie.add('bear'); + trie.add('z'); + trie.add('zebra'); + trie.wordsWithPrefix('hel'); // ['hell', 'hello'] + ``` + + _Returns:_ an array of strings, or empty array if no word found. + */ + + var accumulatedLetters, currentNode, letter, node, queue, subNode, words, _i, _len, _ref; + if (prefix == null) { + return []; + } + (prefix != null) || (prefix = ''); + words = []; + currentNode = this._root; + for (_i = 0, _len = prefix.length; _i < _len; _i++) { + letter = prefix[_i]; + currentNode = currentNode[letter]; + if (currentNode == null) { + return []; + } + } + queue = new Queue(); + queue.enqueue([currentNode, '']); + while (queue.size !== 0) { + _ref = queue.dequeue(), node = _ref[0], accumulatedLetters = _ref[1]; + if (node[WORD_END]) { + words.push(prefix + accumulatedLetters); + } + for (letter in node) { + if (!__hasProp.call(node, letter)) continue; + subNode = node[letter]; + queue.enqueue([subNode, accumulatedLetters + letter]); + } + } + return words; + }; + + Trie.prototype.remove = function(word) { + /* + _Returns:_ the string removed, or undefined if the word in its whole doesn't + exist. **Note:** this means removing `beers` when only `beer` exists will + return undefined and conserve `beer`. + */ + + var currentNode, i, letter, prefix, _i, _j, _len, _ref; + if (word == null) { + return; + } + currentNode = this._root; + prefix = []; + for (_i = 0, _len = word.length; _i < _len; _i++) { + letter = word[_i]; + if (currentNode[letter] == null) { + return; + } + currentNode = currentNode[letter]; + prefix.push([letter, currentNode]); + } + if (!currentNode[WORD_END]) { + return; + } + this.size--; + delete currentNode[WORD_END]; + if (_hasAtLeastNChildren(currentNode, 1)) { + return word; + } + for (i = _j = _ref = prefix.length - 1; _ref <= 1 ? _j <= 1 : _j >= 1; i = _ref <= 1 ? ++_j : --_j) { + if (!_hasAtLeastNChildren(prefix[i][1], 1)) { + delete prefix[i - 1][1][prefix[i][0]]; + } else { + break; + } + } + if (!_hasAtLeastNChildren(this._root[prefix[0][0]], 1)) { + delete this._root[prefix[0][0]]; + } + return word; + }; + + return Trie; + + })(); + + _hasAtLeastNChildren = function(node, n) { + var child, childCount; + if (n === 0) { + return true; + } + childCount = 0; + for (child in node) { + if (!__hasProp.call(node, child)) continue; + childCount++; + if (childCount >= n) { + return true; + } + } + return false; + }; + + module.exports = Trie; + + }).call(this); + + +/***/ } +/******/ ]);;angular.module('uiGmapgoogle-maps.wrapped') +.service('uiGmapMarkerSpiderfier', [ 'uiGmapGoogleMapApi', function(GoogleMapApi) { + var self = this; + /* istanbul ignore next */ + +function(){ + +/** @preserve OverlappingMarkerSpiderfier +https://github.com/jawj/OverlappingMarkerSpiderfier +Copyright (c) 2011 - 2013 George MacKerron +Released under the MIT licence: http://opensource.org/licenses/mit-license +Note: The Google Maps API v3 must be included *before* this code + */ +var hasProp = {}.hasOwnProperty, + slice = [].slice; + +this['OverlappingMarkerSpiderfier'] = (function() { + var ge, gm, j, lcH, lcU, len, mt, p, ref, twoPi, x; + + p = _Class.prototype; + + ref = [_Class, p]; + for (j = 0, len = ref.length; j < len; j++) { + x = ref[j]; + x['VERSION'] = '0.3.3'; + } + + gm = void 0; + + ge = void 0; + + mt = void 0; + + twoPi = Math.PI * 2; + + p['keepSpiderfied'] = false; + + p['markersWontHide'] = false; + + p['markersWontMove'] = false; + + p['nearbyDistance'] = 20; + + p['circleSpiralSwitchover'] = 9; + + p['circleFootSeparation'] = 23; + + p['circleStartAngle'] = twoPi / 12; + + p['spiralFootSeparation'] = 26; + + p['spiralLengthStart'] = 11; + + p['spiralLengthFactor'] = 4; + + p['spiderfiedZIndex'] = 1000; + + p['usualLegZIndex'] = 10; + + p['highlightedLegZIndex'] = 20; + + p['event'] = 'click'; + + p['minZoomLevel'] = false; + + p['legWeight'] = 1.5; + + p['legColors'] = { + 'usual': {}, + 'highlighted': {} + }; + + lcU = p['legColors']['usual']; + + lcH = p['legColors']['highlighted']; + + _Class['initializeGoogleMaps'] = function(google) { + gm = google.maps; + ge = gm.event; + mt = gm.MapTypeId; + lcU[mt.HYBRID] = lcU[mt.SATELLITE] = '#fff'; + lcH[mt.HYBRID] = lcH[mt.SATELLITE] = '#f00'; + lcU[mt.TERRAIN] = lcU[mt.ROADMAP] = '#444'; + lcH[mt.TERRAIN] = lcH[mt.ROADMAP] = '#f00'; + this.ProjHelper = function(map) { + return this.setMap(map); + }; + this.ProjHelper.prototype = new gm.OverlayView(); + return this.ProjHelper.prototype['draw'] = function() {}; + }; + + function _Class(map1, opts) { + var e, k, l, len1, ref1, v; + this.map = map1; + if (opts == null) { + opts = {}; + } + for (k in opts) { + if (!hasProp.call(opts, k)) continue; + v = opts[k]; + this[k] = v; + } + this.projHelper = new this.constructor.ProjHelper(this.map); + this.initMarkerArrays(); + this.listeners = {}; + ref1 = ['click', 'zoom_changed', 'maptypeid_changed']; + for (l = 0, len1 = ref1.length; l < len1; l++) { + e = ref1[l]; + ge.addListener(this.map, e, (function(_this) { + return function() { + return _this['unspiderfy'](); + }; + })(this)); + } + } + + p.initMarkerArrays = function() { + this.markers = []; + return this.markerListenerRefs = []; + }; + + p['addMarker'] = function(marker) { + var listenerRefs; + if (marker['_oms'] != null) { + return this; + } + marker['_oms'] = true; + listenerRefs = [ + ge.addListener(marker, this['event'], (function(_this) { + return function(event) { + return _this.spiderListener(marker, event); + }; + })(this)) + ]; + if (!this['markersWontHide']) { + listenerRefs.push(ge.addListener(marker, 'visible_changed', (function(_this) { + return function() { + return _this.markerChangeListener(marker, false); + }; + })(this))); + } + if (!this['markersWontMove']) { + listenerRefs.push(ge.addListener(marker, 'position_changed', (function(_this) { + return function() { + return _this.markerChangeListener(marker, true); + }; + })(this))); + } + this.markerListenerRefs.push(listenerRefs); + this.markers.push(marker); + return this; + }; + + p.markerChangeListener = function(marker, positionChanged) { + if ((marker['_omsData'] != null) && (positionChanged || !marker.getVisible()) && !((this.spiderfying != null) || (this.unspiderfying != null))) { + return this['unspiderfy'](positionChanged ? marker : null); + } + }; + + p['getMarkers'] = function() { + return this.markers.slice(0); + }; + + p['removeMarker'] = function(marker) { + var i, l, len1, listenerRef, listenerRefs; + if (marker['_omsData'] != null) { + this['unspiderfy'](); + } + i = this.arrIndexOf(this.markers, marker); + if (i < 0) { + return this; + } + listenerRefs = this.markerListenerRefs.splice(i, 1)[0]; + for (l = 0, len1 = listenerRefs.length; l < len1; l++) { + listenerRef = listenerRefs[l]; + ge.removeListener(listenerRef); + } + delete marker['_oms']; + this.markers.splice(i, 1); + return this; + }; + + p['clearMarkers'] = function() { + var i, l, len1, len2, listenerRef, listenerRefs, marker, n, ref1; + this['unspiderfy'](); + ref1 = this.markers; + for (i = l = 0, len1 = ref1.length; l < len1; i = ++l) { + marker = ref1[i]; + listenerRefs = this.markerListenerRefs[i]; + for (n = 0, len2 = listenerRefs.length; n < len2; n++) { + listenerRef = listenerRefs[n]; + ge.removeListener(listenerRef); + } + delete marker['_oms']; + } + this.initMarkerArrays(); + return this; + }; + + p['addListener'] = function(event, func) { + var base; + ((base = this.listeners)[event] != null ? base[event] : base[event] = []).push(func); + return this; + }; + + p['removeListener'] = function(event, func) { + var i; + i = this.arrIndexOf(this.listeners[event], func); + if (!(i < 0)) { + this.listeners[event].splice(i, 1); + } + return this; + }; + + p['clearListeners'] = function(event) { + this.listeners[event] = []; + return this; + }; + + p.trigger = function() { + var args, event, func, l, len1, ref1, ref2, results; + event = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : []; + ref2 = (ref1 = this.listeners[event]) != null ? ref1 : []; + results = []; + for (l = 0, len1 = ref2.length; l < len1; l++) { + func = ref2[l]; + results.push(func.apply(null, args)); + } + return results; + }; + + p.generatePtsCircle = function(count, centerPt) { + var angle, angleStep, circumference, i, l, legLength, ref1, results; + circumference = this['circleFootSeparation'] * (2 + count); + legLength = circumference / twoPi; + angleStep = twoPi / count; + results = []; + for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) { + angle = this['circleStartAngle'] + i * angleStep; + results.push(new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))); + } + return results; + }; + + p.generatePtsSpiral = function(count, centerPt) { + var angle, i, l, legLength, pt, ref1, results; + legLength = this['spiralLengthStart']; + angle = 0; + results = []; + for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) { + angle += this['spiralFootSeparation'] / legLength + i * 0.0005; + pt = new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle)); + legLength += twoPi * this['spiralLengthFactor'] / angle; + results.push(pt); + } + return results; + }; + + p.spiderListener = function(marker, event) { + var $this, clear, l, len1, m, mPt, markerPt, markerSpiderfied, nDist, nearbyMarkerData, nonNearbyMarkers, pxSq, ref1; + markerSpiderfied = marker['_omsData'] != null; + if (!(markerSpiderfied && this['keepSpiderfied'])) { + if (this['event'] === 'mouseover') { + $this = this; + clear = function() { + return $this['unspiderfy'](); + }; + window.clearTimeout(p.timeout); + p.timeout = setTimeout(clear, 3000); + } else { + this['unspiderfy'](); + } + } + if (markerSpiderfied || this.map.getStreetView().getVisible() || this.map.getMapTypeId() === 'GoogleEarthAPI') { + return this.trigger('click', marker, event); + } else { + nearbyMarkerData = []; + nonNearbyMarkers = []; + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + markerPt = this.llToPt(marker.position); + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + if (!((m.map != null) && m.getVisible())) { + continue; + } + mPt = this.llToPt(m.position); + if (this.ptDistanceSq(mPt, markerPt) < pxSq) { + nearbyMarkerData.push({ + marker: m, + markerPt: mPt + }); + } else { + nonNearbyMarkers.push(m); + } + } + if (nearbyMarkerData.length === 1) { + return this.trigger('click', marker, event); + } else { + return this.spiderfy(nearbyMarkerData, nonNearbyMarkers); + } + } + }; + + p['markersNearMarker'] = function(marker, firstOnly) { + var l, len1, m, mPt, markerPt, markers, nDist, pxSq, ref1, ref2, ref3; + if (firstOnly == null) { + firstOnly = false; + } + if (this.projHelper.getProjection() == null) { + throw "Must wait for 'idle' event on map before calling markersNearMarker"; + } + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + markerPt = this.llToPt(marker.position); + markers = []; + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + if (m === marker || (m.map == null) || !m.getVisible()) { + continue; + } + mPt = this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position); + if (this.ptDistanceSq(mPt, markerPt) < pxSq) { + markers.push(m); + if (firstOnly) { + break; + } + } + } + return markers; + }; + + p['markersNearAnyOtherMarker'] = function() { + var i, i1, i2, l, len1, len2, len3, m, m1, m1Data, m2, m2Data, mData, n, nDist, pxSq, q, ref1, ref2, ref3, results; + if (this.projHelper.getProjection() == null) { + throw "Must wait for 'idle' event on map before calling markersNearAnyOtherMarker"; + } + nDist = this['nearbyDistance']; + pxSq = nDist * nDist; + mData = (function() { + var l, len1, ref1, ref2, ref3, results; + ref1 = this.markers; + results = []; + for (l = 0, len1 = ref1.length; l < len1; l++) { + m = ref1[l]; + results.push({ + pt: this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position), + willSpiderfy: false + }); + } + return results; + }).call(this); + ref1 = this.markers; + for (i1 = l = 0, len1 = ref1.length; l < len1; i1 = ++l) { + m1 = ref1[i1]; + if (!((m1.map != null) && m1.getVisible())) { + continue; + } + m1Data = mData[i1]; + if (m1Data.willSpiderfy) { + continue; + } + ref2 = this.markers; + for (i2 = n = 0, len2 = ref2.length; n < len2; i2 = ++n) { + m2 = ref2[i2]; + if (i2 === i1) { + continue; + } + if (!((m2.map != null) && m2.getVisible())) { + continue; + } + m2Data = mData[i2]; + if (i2 < i1 && !m2Data.willSpiderfy) { + continue; + } + if (this.ptDistanceSq(m1Data.pt, m2Data.pt) < pxSq) { + m1Data.willSpiderfy = m2Data.willSpiderfy = true; + break; + } + } + } + ref3 = this.markers; + results = []; + for (i = q = 0, len3 = ref3.length; q < len3; i = ++q) { + m = ref3[i]; + if (mData[i].willSpiderfy) { + results.push(m); + } + } + return results; + }; + + p.makeHighlightListenerFuncs = function(marker) { + return { + highlight: (function(_this) { + return function() { + return marker['_omsData'].leg.setOptions({ + strokeColor: _this['legColors']['highlighted'][_this.map.mapTypeId], + zIndex: _this['highlightedLegZIndex'] + }); + }; + })(this), + unhighlight: (function(_this) { + return function() { + return marker['_omsData'].leg.setOptions({ + strokeColor: _this['legColors']['usual'][_this.map.mapTypeId], + zIndex: _this['usualLegZIndex'] + }); + }; + })(this) + }; + }; + + p.spiderfy = function(markerData, nonNearbyMarkers) { + var bodyPt, footLl, footPt, footPts, highlightListenerFuncs, leg, marker, md, nearestMarkerDatum, numFeet, spiderfiedMarkers; + if (this['minZoomLevel'] && this.map.getZoom() < this['minZoomLevel']) { + return false; + } + this.spiderfying = true; + numFeet = markerData.length; + bodyPt = this.ptAverage((function() { + var l, len1, results; + results = []; + for (l = 0, len1 = markerData.length; l < len1; l++) { + md = markerData[l]; + results.push(md.markerPt); + } + return results; + })()); + footPts = numFeet >= this['circleSpiralSwitchover'] ? this.generatePtsSpiral(numFeet, bodyPt).reverse() : this.generatePtsCircle(numFeet, bodyPt); + spiderfiedMarkers = (function() { + var l, len1, results; + results = []; + for (l = 0, len1 = footPts.length; l < len1; l++) { + footPt = footPts[l]; + footLl = this.ptToLl(footPt); + nearestMarkerDatum = this.minExtract(markerData, (function(_this) { + return function(md) { + return _this.ptDistanceSq(md.markerPt, footPt); + }; + })(this)); + marker = nearestMarkerDatum.marker; + leg = new gm.Polyline({ + map: this.map, + path: [marker.position, footLl], + strokeColor: this['legColors']['usual'][this.map.mapTypeId], + strokeWeight: this['legWeight'], + zIndex: this['usualLegZIndex'] + }); + marker['_omsData'] = { + usualPosition: marker.position, + leg: leg + }; + if (this['legColors']['highlighted'][this.map.mapTypeId] !== this['legColors']['usual'][this.map.mapTypeId]) { + highlightListenerFuncs = this.makeHighlightListenerFuncs(marker); + marker['_omsData'].hightlightListeners = { + highlight: ge.addListener(marker, 'mouseover', highlightListenerFuncs.highlight), + unhighlight: ge.addListener(marker, 'mouseout', highlightListenerFuncs.unhighlight) + }; + } + marker.setPosition(footLl); + marker.setZIndex(Math.round(this['spiderfiedZIndex'] + footPt.y)); + results.push(marker); + } + return results; + }).call(this); + delete this.spiderfying; + this.spiderfied = true; + return this.trigger('spiderfy', spiderfiedMarkers, nonNearbyMarkers); + }; + + p['unspiderfy'] = function(markerNotToMove) { + var l, len1, listeners, marker, nonNearbyMarkers, ref1, unspiderfiedMarkers; + if (markerNotToMove == null) { + markerNotToMove = null; + } + if (this.spiderfied == null) { + return this; + } + this.unspiderfying = true; + unspiderfiedMarkers = []; + nonNearbyMarkers = []; + ref1 = this.markers; + for (l = 0, len1 = ref1.length; l < len1; l++) { + marker = ref1[l]; + if (marker['_omsData'] != null) { + marker['_omsData'].leg.setMap(null); + if (marker !== markerNotToMove) { + marker.setPosition(marker['_omsData'].usualPosition); + } + marker.setZIndex(null); + listeners = marker['_omsData'].hightlightListeners; + if (listeners != null) { + ge.removeListener(listeners.highlight); + ge.removeListener(listeners.unhighlight); + } + delete marker['_omsData']; + unspiderfiedMarkers.push(marker); + } else { + nonNearbyMarkers.push(marker); + } + } + delete this.unspiderfying; + delete this.spiderfied; + this.trigger('unspiderfy', unspiderfiedMarkers, nonNearbyMarkers); + return this; + }; + + p.ptDistanceSq = function(pt1, pt2) { + var dx, dy; + dx = pt1.x - pt2.x; + dy = pt1.y - pt2.y; + return dx * dx + dy * dy; + }; + + p.ptAverage = function(pts) { + var l, len1, numPts, pt, sumX, sumY; + sumX = sumY = 0; + for (l = 0, len1 = pts.length; l < len1; l++) { + pt = pts[l]; + sumX += pt.x; + sumY += pt.y; + } + numPts = pts.length; + return new gm.Point(sumX / numPts, sumY / numPts); + }; + + p.llToPt = function(ll) { + return this.projHelper.getProjection().fromLatLngToDivPixel(ll); + }; + + p.ptToLl = function(pt) { + return this.projHelper.getProjection().fromDivPixelToLatLng(pt); + }; + + p.minExtract = function(set, func) { + var bestIndex, bestVal, index, item, l, len1, val; + for (index = l = 0, len1 = set.length; l < len1; index = ++l) { + item = set[index]; + val = func(item); + if ((typeof bestIndex === "undefined" || bestIndex === null) || val < bestVal) { + bestVal = val; + bestIndex = index; + } + } + return set.splice(bestIndex, 1)[0]; + }; + + p.arrIndexOf = function(arr, obj) { + var i, l, len1, o; + if (arr.indexOf != null) { + return arr.indexOf(obj); + } + for (i = l = 0, len1 = arr.length; l < len1; i = ++l) { + o = arr[i]; + if (o === obj) { + return i; + } + } + return -1; + }; + + return _Class; + +})(); + + }.apply(self); + + GoogleMapApi.then(function(){ + self.OverlappingMarkerSpiderfier.initializeGoogleMaps(window.google); + }); + return this.OverlappingMarkerSpiderfier; +}]); +;/** + * Performance overrides on MarkerClusterer custom to Angular Google Maps + * + * Created by Petr Bruna ccg1415 and Nick McCready on 7/13/14. + */ +angular.module('uiGmapgoogle-maps.extensions') +.service('uiGmapExtendMarkerClusterer',['uiGmapLodash', 'uiGmapPropMap', function (uiGmapLodash, PropMap) { + return { + init: _.once(function () { + (function () { + var __hasProp = {}.hasOwnProperty, + __extends = function (child, parent) { + for (var key in parent) { + if (__hasProp.call(parent, key)) child[key] = parent[key]; + } + function ctor() { + this.constructor = child; + } + + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + child.__super__ = parent.prototype; + return child; + }; + + window.NgMapCluster = (function (_super) { + __extends(NgMapCluster, _super); + + function NgMapCluster(opts) { + NgMapCluster.__super__.constructor.call(this, opts); + this.markers_ = new PropMap(); + } + + /** + * Adds a marker to the cluster. + * + * @param {google.maps.Marker} marker The marker to be added. + * @return {boolean} True if the marker was added. + * @ignore + */ + NgMapCluster.prototype.addMarker = function (marker) { + var i; + var mCount; + var mz; + + if (this.isMarkerAlreadyAdded_(marker)) { + var oldMarker = this.markers_.get(marker.key); + if (oldMarker.getPosition().lat() == marker.getPosition().lat() && oldMarker.getPosition().lon() == marker.getPosition().lon()) //if nothing has changed + return false; + } + + if (!this.center_) { + this.center_ = marker.getPosition(); + this.calculateBounds_(); + } else { + if (this.averageCenter_) { + var l = this.markers_.length + 1; + var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; + var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; + this.center_ = new google.maps.LatLng(lat, lng); + this.calculateBounds_(); + } + } + marker.isAdded = true; + this.markers_.push(marker); + + mCount = this.markers_.length; + mz = this.markerClusterer_.getMaxZoom(); + if (mz !== null && this.map_.getZoom() > mz) { + // Zoomed in past max zoom, so show the marker. + if (marker.getMap() !== this.map_) { + marker.setMap(this.map_); + } + } else if (mCount < this.minClusterSize_) { + // Min cluster size not reached so show the marker. + if (marker.getMap() !== this.map_) { + marker.setMap(this.map_); + } + } else if (mCount === this.minClusterSize_) { + // Hide the markers that were showing. + this.markers_.each(function (m) { + m.setMap(null); + }); + } else { + marker.setMap(null); + } + + //this.updateIcon_(); + return true; + }; + + /** + * Determines if a marker has already been added to the cluster. + * + * @param {google.maps.Marker} marker The marker to check. + * @return {boolean} True if the marker has already been added. + */ + NgMapCluster.prototype.isMarkerAlreadyAdded_ = function (marker) { + return uiGmapLodash.isNullOrUndefined(this.markers_.get(marker.key)); + }; + + + /** + * Returns the bounds of the cluster. + * + * @return {google.maps.LatLngBounds} the cluster bounds. + * @ignore + */ + NgMapCluster.prototype.getBounds = function () { + var i; + var bounds = new google.maps.LatLngBounds(this.center_, this.center_); + this.getMarkers().each(function(m){ + bounds.extend(m.getPosition()); + }); + return bounds; + }; + + + /** + * Removes the cluster from the map. + * + * @ignore + */ + NgMapCluster.prototype.remove = function () { + this.clusterIcon_.setMap(null); + this.markers_ = new PropMap(); + delete this.markers_; + }; + + + return NgMapCluster; + + })(Cluster); + + + window.NgMapMarkerClusterer = (function (_super) { + __extends(NgMapMarkerClusterer, _super); + + function NgMapMarkerClusterer(map, opt_markers, opt_options) { + NgMapMarkerClusterer.__super__.constructor.call(this, map, opt_markers, opt_options); + this.markers_ = new PropMap(); + } + + /** + * Removes all clusters and markers from the map and also removes all markers + * managed by the clusterer. + */ + NgMapMarkerClusterer.prototype.clearMarkers = function () { + this.resetViewport_(true); + this.markers_ = new PropMap(); + }; + /** + * Removes a marker and returns true if removed, false if not. + * + * @param {google.maps.Marker} marker The marker to remove + * @return {boolean} Whether the marker was removed or not + */ + NgMapMarkerClusterer.prototype.removeMarker_ = function (marker) { + if (!this.markers_.get(marker.key)) { + return false; + } + marker.setMap(null); + this.markers_.remove(marker.key); // Remove the marker from the list of managed markers + return true; + }; + + /** + * Creates the clusters. This is done in batches to avoid timeout errors + * in some browsers when there is a huge number of markers. + * + * @param {number} iFirst The index of the first marker in the batch of + * markers to be added to clusters. + */ + NgMapMarkerClusterer.prototype.createClusters_ = function (iFirst) { + var i, marker; + var mapBounds; + var cMarkerClusterer = this; + if (!this.ready_) { + return; + } + + // Cancel previous batch processing if we're working on the first batch: + if (iFirst === 0) { + /** + * This event is fired when the MarkerClusterer begins + * clustering markers. + * @name MarkerClusterer#clusteringbegin + * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. + * @event + */ + google.maps.event.trigger(this, 'clusteringbegin', this); + + if (typeof this.timerRefStatic !== 'undefined') { + clearTimeout(this.timerRefStatic); + delete this.timerRefStatic; + } + } + + // Get our current map view bounds. + // Create a new bounds object so we don't affect the map. + // + // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: + if (this.getMap().getZoom() > 3) { + mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), + this.getMap().getBounds().getNorthEast()); + } else { + mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); + } + var bounds = this.getExtendedBounds(mapBounds); + + var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); + + var _ms = this.markers_.values(); + for (i = iFirst; i < iLast; i++) { + marker = _ms[i]; + if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { + if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { + this.addToClosestCluster_(marker); + } + } + } + + if (iLast < this.markers_.length) { + this.timerRefStatic = setTimeout(function () { + cMarkerClusterer.createClusters_(iLast); + }, 0); + } else { + // custom addition by ui-gmap + // update icon for all clusters + for (i = 0; i < this.clusters_.length; i++) { + this.clusters_[i].updateIcon_(); + } + + delete this.timerRefStatic; + + /** + * This event is fired when the MarkerClusterer stops + * clustering markers. + * @name MarkerClusterer#clusteringend + * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. + * @event + */ + google.maps.event.trigger(this, 'clusteringend', this); + } + }; + + /** + * Adds a marker to a cluster, or creates a new cluster. + * + * @param {google.maps.Marker} marker The marker to add. + */ + NgMapMarkerClusterer.prototype.addToClosestCluster_ = function (marker) { + var i, d, cluster, center; + var distance = 40000; // Some large number + var clusterToAddTo = null; + for (i = 0; i < this.clusters_.length; i++) { + cluster = this.clusters_[i]; + center = cluster.getCenter(); + if (center) { + d = this.distanceBetweenPoints_(center, marker.getPosition()); + if (d < distance) { + distance = d; + clusterToAddTo = cluster; + } + } + } + + if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { + clusterToAddTo.addMarker(marker); + } else { + cluster = new NgMapCluster(this); + cluster.addMarker(marker); + this.clusters_.push(cluster); + } + }; + + /** + * Redraws all the clusters. + */ + NgMapMarkerClusterer.prototype.redraw_ = function () { + this.createClusters_(0); + }; + + + /** + * Removes all clusters from the map. The markers are also removed from the map + * if opt_hide is set to true. + * + * @param {boolean} [opt_hide] Set to true to also remove the markers + * from the map. + */ + NgMapMarkerClusterer.prototype.resetViewport_ = function (opt_hide) { + var i, marker; + // Remove all the clusters + for (i = 0; i < this.clusters_.length; i++) { + this.clusters_[i].remove(); + } + this.clusters_ = []; + + // Reset the markers to not be added and to be removed from the map. + this.markers_.each(function (marker) { + marker.isAdded = false; + if (opt_hide) { + marker.setMap(null); + } + }); + }; + + /** + * Extends an object's prototype by another's. + * + * @param {Object} obj1 The object to be extended. + * @param {Object} obj2 The object to extend with. + * @return {Object} The new extended object. + * @ignore + */ + NgMapMarkerClusterer.prototype.extend = function (obj1, obj2) { + return (function (object) { + var property; + for (property in object.prototype) { + if (property !== 'constructor') + this.prototype[property] = object.prototype[property]; + } + return this; + }).apply(obj1, [obj2]); + }; + //////////////////////////////////////////////////////////////////////////////// + /* + Other overrides relevant to MarkerClusterPlus + */ + //////////////////////////////////////////////////////////////////////////////// + /** + * Positions and shows the icon. + */ + ClusterIcon.prototype.show = function () { + if (this.div_) { + var img = ""; + // NOTE: values must be specified in px units + var bp = this.backgroundPosition_.split(" "); + var spriteH = parseInt(bp[0].trim(), 10); + var spriteV = parseInt(bp[1].trim(), 10); + var pos = this.getPosFromLatLng_(this.center_); + this.div_.style.cssText = this.createCss(pos); + img = ""; + this.div_.innerHTML = img + "

" + this.sums_.text + "
"; + if (typeof this.sums_.title === "undefined" || this.sums_.title === "") { + this.div_.title = this.cluster_.getMarkerClusterer().getTitle(); + } else { + this.div_.title = this.sums_.title; + } + this.div_.style.display = ""; + } + this.visible_ = true; + }; + //END OTHER OVERRIDES + //////////////////////////////////////////////////////////////////////////////// + + return NgMapMarkerClusterer; + + })(MarkerClusterer); + }).call(this); + }) + }; +}]); +}( window,angular)); +//# sourceMappingURL=angular-google-maps_dev_mapped.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js.map b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js.map new file mode 100644 index 0000000..075dc55 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../tmp/src/coffee/module.js","../tmp/src/coffee/providers/map-loader.js","../tmp/src/coffee/extensions/google.js","../tmp/src/coffee/extensions/lodash.js","../tmp/src/coffee/extensions/string.js","../tmp/src/coffee/directives/api/utils/_async.js","../tmp/src/coffee/directives/api/utils/base-object.js","../tmp/src/coffee/directives/api/utils/child-events.js","../tmp/src/coffee/directives/api/utils/ctrl-handle.js","../tmp/src/coffee/directives/api/utils/events-helper.js","../tmp/src/coffee/directives/api/utils/fit-helper.js","../tmp/src/coffee/directives/api/utils/gmap-util.js","../tmp/src/coffee/directives/api/utils/is-ready.js","../tmp/src/coffee/directives/api/utils/linked.js","../tmp/src/coffee/directives/api/utils/logger.js","../tmp/src/coffee/directives/api/utils/model-key.js","../tmp/src/coffee/directives/api/utils/models-watcher.js","../tmp/src/coffee/directives/api/utils/promise.js","../tmp/src/coffee/directives/api/utils/prop-map.js","../tmp/src/coffee/directives/api/utils/property-action.js","../tmp/src/coffee/directives/api/managers/clusterer-marker-manager.js","../tmp/src/coffee/directives/api/managers/google-map-object-manager.js","../tmp/src/coffee/directives/api/managers/marker-manager.js","../tmp/src/coffee/directives/api/managers/spiderfier-marker-manager.js","../tmp/src/coffee/utils/add-events.js","../tmp/src/coffee/utils/array-sync.js","../tmp/src/coffee/utils/chrome-fixes.js","../tmp/src/coffee/utils/object-iterators.js","../tmp/src/coffee/directives/api/options/builders/common-options-builder.js","../tmp/src/coffee/directives/api/options/builders/options-builders.js","../tmp/src/coffee/directives/api/options/marker-options.js","../tmp/src/coffee/directives/api/models/child/base-poly-child-model.js","../tmp/src/coffee/directives/api/models/child/free-draw-polygons-child.js","../tmp/src/coffee/directives/api/models/child/marker-child-model.js","../tmp/src/coffee/directives/api/models/child/polygon-child-model.js","../tmp/src/coffee/directives/api/models/child/polyline-child-model.js","../tmp/src/coffee/directives/api/models/child/window-child-model.js","../tmp/src/coffee/directives/api/models/parent/base-polys-parent-model.js","../tmp/src/coffee/directives/api/models/parent/circle-parent-model.js","../tmp/src/coffee/directives/api/models/parent/drawing-manager-parent-model.js","../tmp/src/coffee/directives/api/models/parent/i-marker-parent-model.js","../tmp/src/coffee/directives/api/models/parent/i-window-parent-model.js","../tmp/src/coffee/directives/api/models/parent/layer-parent-model.js","../tmp/src/coffee/directives/api/models/parent/map-type-parent-model.js","../tmp/src/coffee/directives/api/models/parent/markers-parent-model.js","../tmp/src/coffee/directives/api/models/parent/poly-parent-models.js","../tmp/src/coffee/directives/api/models/parent/rectangle-parent-model.js","../tmp/src/coffee/directives/api/models/parent/search-box-parent-model.js","../tmp/src/coffee/directives/api/models/parent/windows-parent-model.js","../tmp/src/coffee/directives/api/circle.js","../tmp/src/coffee/directives/api/control.js","../tmp/src/coffee/directives/api/drag-zoom.js","../tmp/src/coffee/directives/api/drawing-manager.js","../tmp/src/coffee/directives/api/free-draw-polygons.js","../tmp/src/coffee/directives/api/i-circle.js","../tmp/src/coffee/directives/api/i-control.js","../tmp/src/coffee/directives/api/i-drawing-manager.js","../tmp/src/coffee/directives/api/i-marker.js","../tmp/src/coffee/directives/api/i-polygon.js","../tmp/src/coffee/directives/api/i-polyline.js","../tmp/src/coffee/directives/api/i-rectangle.js","../tmp/src/coffee/directives/api/i-window.js","../tmp/src/coffee/directives/api/map.js","../tmp/src/coffee/directives/api/marker.js","../tmp/src/coffee/directives/api/markers.js","../tmp/src/coffee/directives/api/plural.js","../tmp/src/coffee/directives/api/polygon.js","../tmp/src/coffee/directives/api/polygons.js","../tmp/src/coffee/directives/api/polyline.js","../tmp/src/coffee/directives/api/polylines.js","../tmp/src/coffee/directives/api/rectangle.js","../tmp/src/coffee/directives/api/window.js","../tmp/src/coffee/directives/api/windows.js","../tmp/src/coffee/directives/map.js","../tmp/src/coffee/directives/marker.js","../tmp/src/coffee/directives/markers.js","../tmp/src/coffee/directives/polygon.js","../tmp/src/coffee/directives/circle.js","../tmp/src/coffee/directives/polyline.js","../tmp/src/coffee/directives/polylines.js","../tmp/src/coffee/directives/rectangle.js","../tmp/src/coffee/directives/window.js","../tmp/src/coffee/directives/windows.js","../tmp/src/coffee/directives/layer.js","../tmp/src/coffee/directives/control.js","../tmp/src/coffee/directives/drag-zoom.js","../tmp/src/coffee/directives/drawing-manager.js","../tmp/src/coffee/directives/free-draw-polygons.js","../tmp/src/coffee/directives/map-type.js","../tmp/src/coffee/directives/polygons.js","../tmp/src/coffee/directives/search-box.js","../tmp/src/coffee/directives/show.js","../tmp/src/coffee/directives/street-view-panorama.js","../tmp/wrapped_uuid.js","../tmp/wrapped_gmaps_sdk_util_v3.js","../tmp/webpack.dataStructures.js","../tmp/wrapped_marker_spiderfier.js","../src/js/extensions/markerclusterer.js"],"names":[],"mappings":";;;;;;eAAA;AACA,EAAE;AACF,CAAC;AACD,GAAG,CAAC,GAAG,CAAC,OAAO;AACf;AACA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG;AACzD;AACA,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;AAC5E,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,IAAI;AAC7E,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM;AAC5E,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,C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AAG,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACvF,gBAAgB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,GAAG,QAAQ,GAAG;AAChF,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC;AACtB,gBAAgB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AACnD,cAAc,CAAC;AACf,cAAc,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;AAC3C,YAAY,CAAC;AACb,YAAY,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,UAAU,EAAE;AACZ,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,SAAS;AAC/B,UAAU,gFAAgF;AAC1F;AACA,UAAU,MAAM,CAAC,oBAAoB,CAAC;AACtC;AACA,QAAQ,GAAG,eAAe,EAAE;AAC5B,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE;AACpB,IAAI,EAAE;AACN,EAAE,EAAE;AACJ,IAAI","file":"angular-google-maps_dev_mapped.js","sourcesContent":["\n/*\n!\nThe MIT License\n\nCopyright (c) 2010-2013 Google, Inc. http://angularjs.org\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the 'Software'), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\nangular-google-maps\nhttps://github.com/angular-ui/angular-google-maps\n\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps.providers', ['nemLogging']);\n\n angular.module('uiGmapgoogle-maps.wrapped', []);\n\n angular.module('uiGmapgoogle-maps.extensions', ['uiGmapgoogle-maps.wrapped', 'uiGmapgoogle-maps.providers']);\n\n angular.module('uiGmapgoogle-maps.directives.api.utils', ['uiGmapgoogle-maps.extensions']);\n\n angular.module('uiGmapgoogle-maps.directives.api.managers', []);\n\n angular.module('uiGmapgoogle-maps.directives.api.options', ['uiGmapgoogle-maps.directives.api.utils']);\n\n angular.module('uiGmapgoogle-maps.directives.api.options.builders', []);\n\n angular.module('uiGmapgoogle-maps.directives.api.models.child', ['uiGmapgoogle-maps.directives.api.utils', 'uiGmapgoogle-maps.directives.api.options', 'uiGmapgoogle-maps.directives.api.options.builders']);\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent', ['uiGmapgoogle-maps.directives.api.managers', 'uiGmapgoogle-maps.directives.api.models.child', 'uiGmapgoogle-maps.providers']);\n\n angular.module('uiGmapgoogle-maps.directives.api', ['uiGmapgoogle-maps.directives.api.models.parent']);\n\n angular.module('uiGmapgoogle-maps', ['uiGmapgoogle-maps.directives.api', 'uiGmapgoogle-maps.providers']);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.providers').factory('uiGmapMapScriptLoader', [\n '$q', 'uiGmapuuid', function($q, uuid) {\n var getScriptUrl, includeScript, isGoogleMapsLoaded, scriptId, usedConfiguration;\n scriptId = void 0;\n usedConfiguration = void 0;\n getScriptUrl = function(options) {\n if (options.china) {\n return 'http://maps.google.cn/maps/api/js?';\n } else {\n if (options.transport === 'auto') {\n return '//maps.googleapis.com/maps/api/js?';\n } else {\n return options.transport + '://maps.googleapis.com/maps/api/js?';\n }\n }\n };\n includeScript = function(options) {\n var omitOptions, query, script, scriptElem;\n omitOptions = ['transport', 'isGoogleMapsForWork', 'china', 'preventLoad'];\n if (options.isGoogleMapsForWork) {\n omitOptions.push('key');\n }\n query = _.map(_.omit(options, omitOptions), function(v, k) {\n return k + '=' + v;\n });\n if (scriptId) {\n scriptElem = document.getElementById(scriptId);\n scriptElem.parentNode.removeChild(scriptElem);\n }\n query = query.join('&');\n script = document.createElement('script');\n script.id = scriptId = \"ui_gmap_map_load_\" + (uuid.generate());\n script.type = 'text/javascript';\n script.src = getScriptUrl(options) + query;\n return document.body.appendChild(script);\n };\n isGoogleMapsLoaded = function() {\n return angular.isDefined(window.google) && angular.isDefined(window.google.maps);\n };\n return {\n load: function(options) {\n var deferred, randomizedFunctionName;\n deferred = $q.defer();\n if (isGoogleMapsLoaded()) {\n deferred.resolve(window.google.maps);\n return deferred.promise;\n }\n randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000);\n window[randomizedFunctionName] = function() {\n window[randomizedFunctionName] = null;\n deferred.resolve(window.google.maps);\n };\n if (window.navigator.connection && window.Connection && window.navigator.connection.type === window.Connection.NONE && !options.preventLoad) {\n document.addEventListener('online', function() {\n if (!isGoogleMapsLoaded()) {\n return includeScript(options);\n }\n });\n } else if (!options.preventLoad) {\n includeScript(options);\n }\n usedConfiguration = options;\n usedConfiguration.randomizedFunctionName = randomizedFunctionName;\n return deferred.promise;\n },\n manualLoad: function() {\n var config;\n config = usedConfiguration;\n if (!isGoogleMapsLoaded()) {\n return includeScript(config);\n } else {\n if (window[config.randomizedFunctionName]) {\n return window[config.randomizedFunctionName]();\n }\n }\n }\n };\n }\n ]).provider('uiGmapGoogleMapApi', function() {\n this.options = {\n transport: 'https',\n isGoogleMapsForWork: false,\n china: false,\n v: '3',\n libraries: '',\n language: 'en',\n preventLoad: false\n };\n this.configure = function(options) {\n angular.extend(this.options, options);\n };\n this.$get = [\n 'uiGmapMapScriptLoader', (function(_this) {\n return function(loader) {\n return loader.load(_this.options);\n };\n })(this)\n ];\n return this;\n }).service('uiGmapGoogleMapApiManualLoader', [\n 'uiGmapMapScriptLoader', function(loader) {\n return {\n load: function() {\n loader.manualLoad();\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.extensions').service('uiGmapExtendGWin', function() {\n return {\n init: _.once(function() {\n var uiGmapInfoBox;\n if (!(google || (typeof google !== \"undefined\" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) {\n return;\n }\n google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open;\n google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close;\n google.maps.InfoWindow.prototype._isOpen = false;\n google.maps.InfoWindow.prototype.open = function(map, anchor, recurse) {\n if (recurse != null) {\n return;\n }\n this._isOpen = true;\n this._open(map, anchor, true);\n };\n google.maps.InfoWindow.prototype.close = function(recurse) {\n if (recurse != null) {\n return;\n }\n this._isOpen = false;\n this._close(true);\n };\n google.maps.InfoWindow.prototype.isOpen = function(val) {\n if (val == null) {\n val = void 0;\n }\n if (val == null) {\n return this._isOpen;\n } else {\n return this._isOpen = val;\n }\n };\n\n /*\n Do the same for InfoBox\n TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier\n */\n if (window.InfoBox) {\n window.InfoBox.prototype._open = window.InfoBox.prototype.open;\n window.InfoBox.prototype._close = window.InfoBox.prototype.close;\n window.InfoBox.prototype._isOpen = false;\n window.InfoBox.prototype.open = function(map, anchor) {\n this._isOpen = true;\n this._open(map, anchor);\n };\n window.InfoBox.prototype.close = function() {\n this._isOpen = false;\n this._close();\n };\n window.InfoBox.prototype.isOpen = function(val) {\n if (val == null) {\n val = void 0;\n }\n if (val == null) {\n return this._isOpen;\n } else {\n return this._isOpen = val;\n }\n };\n uiGmapInfoBox = (function(superClass) {\n extend(uiGmapInfoBox, superClass);\n\n function uiGmapInfoBox(opts) {\n this.getOrigCloseBoxImg_ = bind(this.getOrigCloseBoxImg_, this);\n this.getCloseBoxDiv_ = bind(this.getCloseBoxDiv_, this);\n var box;\n box = new window.InfoBox(opts);\n _.extend(this, box);\n if (opts.closeBoxDiv != null) {\n this.closeBoxDiv_ = opts.closeBoxDiv;\n }\n }\n\n uiGmapInfoBox.prototype.getCloseBoxDiv_ = function() {\n return this.closeBoxDiv_;\n };\n\n uiGmapInfoBox.prototype.getCloseBoxImg_ = function() {\n var div, img;\n div = this.getCloseBoxDiv_();\n img = this.getOrigCloseBoxImg_();\n return div || img;\n };\n\n uiGmapInfoBox.prototype.getOrigCloseBoxImg_ = function() {\n var img;\n img = \"\";\n if (this.closeBoxURL_ !== \"\") {\n img = \"\";\n }\n return img;\n };\n\n return uiGmapInfoBox;\n\n })(window.InfoBox);\n window.uiGmapInfoBox = uiGmapInfoBox;\n }\n if (window.MarkerLabel_) {\n return window.MarkerLabel_.prototype.setContent = function() {\n var content;\n content = this.marker_.get('labelContent');\n if (!content || _.isEqual(this.oldContent, content)) {\n return;\n }\n if (typeof (content != null ? content.nodeType : void 0) === 'undefined') {\n this.labelDiv_.innerHTML = content;\n this.eventDiv_.innerHTML = this.labelDiv_.innerHTML;\n this.oldContent = content;\n } else {\n this.labelDiv_.innerHTML = '';\n this.labelDiv_.appendChild(content);\n content = content.cloneNode(true);\n this.labelDiv_.innerHTML = '';\n this.eventDiv_.appendChild(content);\n this.oldContent = content;\n }\n };\n }\n })\n };\n });\n\n}).call(this);\n","\n/*global _:true, angular:true */\n\n(function() {\n angular.module('uiGmapgoogle-maps.extensions').service('uiGmapLodash', function() {\n var baseGet, baseToString, fixLodash, get, reEscapeChar, rePropName, toObject, toPath;\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g;\n reEscapeChar = /\\\\(\\\\)?/g;\n\n /*\n For Lodash 4 compatibility (some aliases are removed)\n */\n fixLodash = function(arg) {\n var isProto, missingName, swapName;\n missingName = arg.missingName, swapName = arg.swapName, isProto = arg.isProto;\n if (_[missingName] == null) {\n _[missingName] = _[swapName];\n if (isProto) {\n return _.prototype[missingName] = _[swapName];\n }\n }\n };\n [\n {\n missingName: 'contains',\n swapName: 'includes',\n isProto: true\n }, {\n missingName: 'includes',\n swapName: 'contains',\n isProto: true\n }, {\n missingName: 'object',\n swapName: 'zipObject'\n }, {\n missingName: 'zipObject',\n swapName: 'object'\n }, {\n missingName: 'all',\n swapName: 'every'\n }, {\n missingName: 'every',\n swapName: 'all'\n }, {\n missingName: 'any',\n swapName: 'some'\n }, {\n missingName: 'some',\n swapName: 'any'\n }, {\n missingName: 'first',\n swapName: 'head'\n }, {\n missingName: 'head',\n swapName: 'first'\n }\n ].forEach(function(toMonkeyPatch) {\n return fixLodash(toMonkeyPatch);\n });\n if (_.get == null) {\n\n /**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\n toObject = function(value) {\n if (_.isObject(value)) {\n return value;\n } else {\n return Object(value);\n }\n };\n\n /**\n * Converts `value` to a string if it's not one. An empty string is returned\n * for `null` or `undefined` values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n baseToString = function(value) {\n if (value === null) {\n return '';\n } else {\n return value + '';\n }\n };\n\n /**\n * Converts `value` to property path array if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array} Returns the property path array.\n */\n toPath = function(value) {\n var result;\n if (_.isArray(value)) {\n return value;\n }\n result = [];\n baseToString(value).replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);\n });\n return result;\n };\n\n /**\n * The base implementation of `get` without support for string paths\n * and default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path of the property to get.\n * @param {string} [pathKey] The key representation of path.\n * @returns {*} Returns the resolved value.\n */\n baseGet = function(object, path, pathKey) {\n var index, length;\n if (object === null) {\n return;\n }\n if (pathKey !== void 0 && pathKey in toObject(object)) {\n path = [pathKey];\n }\n index = 0;\n length = path.length;\n while (!_.isUndefined(object) && index < length) {\n object = object[path[index++]];\n }\n if (index && index === length) {\n return object;\n } else {\n return void 0;\n }\n };\n\n /**\n * Gets the property value at `path` of `object`. If the resolved value is\n * `undefined` the `defaultValue` is used in its place.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n get = function(object, path, defaultValue) {\n var result;\n result = object === null ? void 0 : baseGet(object, toPath(path), path + '');\n if (result === void 0) {\n return defaultValue;\n } else {\n return result;\n }\n };\n _.get = get;\n }\n\n /*\n Author Nick McCready\n Intersection of Objects if the arrays have something in common each intersecting object will be returned\n in an new array.\n */\n this.intersectionObjects = function(array1, array2, comparison) {\n var res;\n if (comparison == null) {\n comparison = void 0;\n }\n res = _.map(array1, function(obj1) {\n return _.find(array2, function(obj2) {\n if (comparison != null) {\n return comparison(obj1, obj2);\n } else {\n return _.isEqual(obj1, obj2);\n }\n });\n });\n return _.filter(res, function(o) {\n return o != null;\n });\n };\n this.containsObject = _.includeObject = function(obj, target, comparison) {\n if (comparison == null) {\n comparison = void 0;\n }\n if (obj === null) {\n return false;\n }\n return _.some(obj, function(value) {\n if (comparison != null) {\n return comparison(value, target);\n } else {\n return _.isEqual(value, target);\n }\n });\n };\n this.differenceObjects = function(array1, array2, comparison) {\n if (comparison == null) {\n comparison = void 0;\n }\n return _.filter(array1, (function(_this) {\n return function(value) {\n return !_this.containsObject(array2, value, comparison);\n };\n })(this));\n };\n this.withoutObjects = this.differenceObjects;\n this.indexOfObject = function(array, item, comparison, isSorted) {\n var i, length;\n if (array == null) {\n return -1;\n }\n i = 0;\n length = array.length;\n if (isSorted) {\n if (typeof isSorted === \"number\") {\n i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);\n } else {\n i = _.sortedIndex(array, item);\n return (array[i] === item ? i : -1);\n }\n }\n while (i < length) {\n if (comparison != null) {\n if (comparison(array[i], item)) {\n return i;\n }\n } else {\n if (_.isEqual(array[i], item)) {\n return i;\n }\n }\n i++;\n }\n return -1;\n };\n this.isNullOrUndefined = function(thing) {\n return _.isNull(thing || _.isUndefined(thing));\n };\n return this;\n });\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.extensions').factory('uiGmapString', function() {\n return function(str) {\n this.contains = function(value, fromIndex) {\n return str.indexOf(value, fromIndex) !== -1;\n };\n return this;\n };\n });\n\n}).call(this);\n","\n/*global _:true,angular:true, */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmap_sync', [\n function() {\n return {\n fakePromise: function() {\n var _cb;\n _cb = void 0;\n return {\n then: function(cb) {\n return _cb = cb;\n },\n resolve: function() {\n return _cb.apply(void 0, arguments);\n }\n };\n }\n };\n }\n ]).service('uiGmap_async', [\n '$timeout', 'uiGmapPromise', 'uiGmapLogger', '$q', 'uiGmapDataStructures', 'uiGmapGmapUtil', function($timeout, uiGmapPromise, $log, $q, uiGmapDataStructures, uiGmapGmapUtil) {\n var ExposedPromise, PromiseQueueManager, SniffedPromise, _getIterateeValue, _ignoreFields, defaultChunkSize, doChunk, doSkippPromise, each, errorObject, getArrayAndKeys, isInProgress, kickPromise, logTryCatch, managePromiseQueue, map, maybeCancelPromises, promiseStatus, promiseTypes, tryCatch;\n promiseTypes = uiGmapPromise.promiseTypes;\n isInProgress = uiGmapPromise.isInProgress;\n promiseStatus = uiGmapPromise.promiseStatus;\n ExposedPromise = uiGmapPromise.ExposedPromise;\n SniffedPromise = uiGmapPromise.SniffedPromise;\n kickPromise = function(sniffedPromise, cancelCb) {\n var promise;\n promise = sniffedPromise.promise();\n promise.promiseType = sniffedPromise.promiseType;\n if (promise.$$state) {\n $log.debug(\"promiseType: \" + promise.promiseType + \", state: \" + (promiseStatus(promise.$$state.status)));\n }\n promise.cancelCb = cancelCb;\n return promise;\n };\n doSkippPromise = function(sniffedPromise, lastPromise) {\n if (sniffedPromise.promiseType === promiseTypes.create && lastPromise.promiseType !== promiseTypes[\"delete\"] && lastPromise.promiseType !== promiseTypes.init) {\n $log.debug(\"lastPromise.promiseType \" + lastPromise.promiseType + \", newPromiseType: \" + sniffedPromise.promiseType + \", SKIPPED MUST COME AFTER DELETE ONLY\");\n return true;\n }\n return false;\n };\n maybeCancelPromises = function(queue, sniffedPromise, lastPromise) {\n var first;\n if (sniffedPromise.promiseType === promiseTypes[\"delete\"] && lastPromise.promiseType !== promiseTypes[\"delete\"]) {\n if ((lastPromise.cancelCb != null) && _.isFunction(lastPromise.cancelCb) && isInProgress(lastPromise)) {\n $log.debug(\"promiseType: \" + sniffedPromise.promiseType + \", CANCELING LAST PROMISE type: \" + lastPromise.promiseType);\n lastPromise.cancelCb('cancel safe');\n first = queue.peek();\n if ((first != null) && isInProgress(first)) {\n if (first.hasOwnProperty(\"cancelCb\") && _.isFunction(first.cancelCb)) {\n $log.debug(\"promiseType: \" + first.promiseType + \", CANCELING FIRST PROMISE type: \" + first.promiseType);\n return first.cancelCb('cancel safe');\n } else {\n return $log.warn('first promise was not cancelable');\n }\n }\n }\n }\n };\n\n /*\n From a High Level:\n This is a SniffedPromiseQueueManager (looking to rename) where the queue is existingPiecesObj.existingPieces.\n This is a function and should not be considered a class.\n So it is run to manage the state (cancel, skip, link) as needed.\n Purpose:\n The whole point is to check if there is existing async work going on. If so we wait on it.\n \n arguments:\n - existingPiecesObj = Queue\n - sniffedPromise = object wrapper holding a function to a pending (function) promise (promise: fnPromise)\n with its intended type.\n - cancelCb = callback which accepts a string, this string is intended to be returned at the end of _async.each iterator\n \n Where the cancelCb passed msg is 'cancel safe' _async.each will drop out and fall through. Thus canceling the promise\n gracefully without messing up state.\n \n Synopsis:\n \n - Promises have been broken down to 4 states create, update,delete (3 main) and init. (Helps boil down problems in ordering)\n where (init) is special to indicate that it is one of the first or to allow a create promise to work beyond being after a delete\n \n - Every Promise that comes in is enqueued and linked to the last promise in the queue.\n \n - A promise can be skipped or canceled to save cycles.\n \n Saved Cycles:\n - Skipped - This will only happen if async work comes in out of order. Where a pending create promise (un-executed) comes in\n after a delete promise.\n - Canceled - Where an incoming promise (un-executed promise) is of type delete and the any lastPromise is not a delete type.\n \n \n NOTE:\n - You should not muck with existingPieces as its state is dependent on this functional loop.\n - PromiseQueueManager should not be thought of as a class that has a life expectancy (it has none). It's sole\n purpose is to link, skip, and kill promises. It also manages the promise queue existingPieces.\n */\n PromiseQueueManager = function(existingPiecesObj, sniffedPromise, cancelCb) {\n var lastPromise, newPromise;\n if (!existingPiecesObj.existingPieces) {\n existingPiecesObj.existingPieces = new uiGmapDataStructures.Queue();\n return existingPiecesObj.existingPieces.enqueue(kickPromise(sniffedPromise, cancelCb));\n } else {\n lastPromise = _.last(existingPiecesObj.existingPieces._content);\n if (doSkippPromise(sniffedPromise, lastPromise)) {\n return;\n }\n maybeCancelPromises(existingPiecesObj.existingPieces, sniffedPromise, lastPromise);\n newPromise = ExposedPromise(lastPromise[\"finally\"](function() {\n return kickPromise(sniffedPromise, cancelCb);\n }));\n newPromise.cancelCb = cancelCb;\n newPromise.promiseType = sniffedPromise.promiseType;\n existingPiecesObj.existingPieces.enqueue(newPromise);\n return lastPromise[\"finally\"](function() {\n return existingPiecesObj.existingPieces.dequeue();\n });\n }\n };\n managePromiseQueue = function(objectToLock, promiseType, msg, cancelCb, fnPromise) {\n var cancelLogger;\n if (msg == null) {\n msg = '';\n }\n cancelLogger = function(msg) {\n $log.debug(msg + \": \" + msg);\n if ((cancelCb != null) && _.isFunction(cancelCb)) {\n return cancelCb(msg);\n }\n };\n return PromiseQueueManager(objectToLock, SniffedPromise(fnPromise, promiseType), cancelLogger);\n };\n defaultChunkSize = 80;\n errorObject = {\n value: null\n };\n tryCatch = function(fn, ctx, args) {\n var e, error1;\n try {\n return fn.apply(ctx, args);\n } catch (error1) {\n e = error1;\n errorObject.value = e;\n return errorObject;\n }\n };\n logTryCatch = function(fn, ctx, deferred, args) {\n var msg, result;\n result = tryCatch(fn, ctx, args);\n if (result === errorObject) {\n msg = \"error within chunking iterator: \" + errorObject.value;\n $log.error(msg);\n deferred.reject(msg);\n }\n if (result === 'cancel safe') {\n return false;\n }\n return true;\n };\n _getIterateeValue = function(collection, array, index) {\n var _isArray, valOrKey;\n _isArray = collection === array;\n valOrKey = array[index];\n if (_isArray) {\n return valOrKey;\n }\n return collection[valOrKey];\n };\n _ignoreFields = ['length', 'forEach', 'map'];\n getArrayAndKeys = function(collection, keys, bailOutCb, cb) {\n var array, propName, val;\n if (angular.isArray(collection)) {\n array = collection;\n } else {\n if (keys) {\n array = keys;\n } else {\n array = [];\n for (propName in collection) {\n val = collection[propName];\n if (collection.hasOwnProperty(propName) && !_.includes(_ignoreFields, propName)) {\n array.push(propName);\n }\n }\n }\n }\n if (cb == null) {\n cb = bailOutCb;\n }\n if (angular.isArray(array) && !(array != null ? array.length : void 0)) {\n if (cb !== bailOutCb) {\n return bailOutCb();\n }\n }\n return cb(array, keys);\n };\n\n /*\n Author: Nicholas McCready & jfriend00\n _async handles things asynchronous-like :), to allow the UI to be free'd to do other things\n Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui\n \n The design of any functionality of _async is to be like lodash/underscore and replicate it but call things\n asynchronously underneath. Each should be sufficient for most things to be derived from.\n \n Optional Asynchronous Chunking via promises.\n */\n doChunk = function(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, _keys) {\n return getArrayAndKeys(collection, _keys, function(array, keys) {\n var cnt, i, keepGoing, val;\n if (chunkSizeOrDontChunk && chunkSizeOrDontChunk < array.length) {\n cnt = chunkSizeOrDontChunk;\n } else {\n cnt = array.length;\n }\n i = index;\n keepGoing = true;\n while (keepGoing && cnt-- && i < (array ? array.length : i + 1)) {\n val = _getIterateeValue(collection, array, i);\n keepGoing = angular.isFunction(val) ? true : logTryCatch(chunkCb, void 0, overallD, [val, i]);\n ++i;\n }\n if (array) {\n if (keepGoing && i < array.length) {\n index = i;\n if (chunkSizeOrDontChunk) {\n if ((pauseCb != null) && _.isFunction(pauseCb)) {\n logTryCatch(pauseCb, void 0, overallD, []);\n }\n return $timeout(function() {\n return doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, keys);\n }, pauseMilli, false);\n }\n } else {\n return overallD.resolve();\n }\n }\n });\n };\n each = function(collection, chunk, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) {\n var error, overallD, ret;\n if (chunkSizeOrDontChunk == null) {\n chunkSizeOrDontChunk = defaultChunkSize;\n }\n if (index == null) {\n index = 0;\n }\n if (pauseMilli == null) {\n pauseMilli = 1;\n }\n ret = void 0;\n overallD = uiGmapPromise.defer();\n ret = overallD.promise;\n if (!pauseMilli) {\n error = 'pause (delay) must be set from _async!';\n $log.error(error);\n overallD.reject(error);\n return ret;\n }\n return getArrayAndKeys(collection, _keys, function() {\n overallD.resolve();\n return ret;\n }, function(array, keys) {\n doChunk(collection, chunkSizeOrDontChunk, pauseMilli, chunk, pauseCb, overallD, index, keys);\n return ret;\n });\n };\n map = function(collection, iterator, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) {\n var results;\n results = [];\n return getArrayAndKeys(collection, _keys, function() {\n return uiGmapPromise.resolve(results);\n }, function(array, keys) {\n return each(collection, function(o) {\n return results.push(iterator(o));\n }, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, keys).then(function() {\n return results;\n });\n });\n };\n return {\n each: each,\n map: map,\n managePromiseQueue: managePromiseQueue,\n promiseLock: managePromiseQueue,\n defaultChunkSize: defaultChunkSize,\n getArrayAndKeys: getArrayAndKeys,\n chunkSizeFrom: function(fromSize, ret) {\n if (ret == null) {\n ret = void 0;\n }\n if (_.isNumber(fromSize)) {\n ret = fromSize;\n }\n if (uiGmapGmapUtil.isFalse(fromSize) || fromSize === false) {\n ret = false;\n }\n return ret;\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\n angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapBaseObject', function() {\n var BaseObject, baseObjectKeywords;\n baseObjectKeywords = ['extended', 'included'];\n BaseObject = (function() {\n function BaseObject() {}\n\n BaseObject.extend = function(obj) {\n var key, ref, value;\n for (key in obj) {\n value = obj[key];\n if (indexOf.call(baseObjectKeywords, key) < 0) {\n this[key] = value;\n }\n }\n if ((ref = obj.extended) != null) {\n ref.apply(this);\n }\n return this;\n };\n\n BaseObject.include = function(obj) {\n var key, ref, value;\n for (key in obj) {\n value = obj[key];\n if (indexOf.call(baseObjectKeywords, key) < 0) {\n this.prototype[key] = value;\n }\n }\n if ((ref = obj.included) != null) {\n ref.apply(this);\n }\n return this;\n };\n\n return BaseObject;\n\n })();\n return BaseObject;\n });\n\n}).call(this);\n","\n/*\n Useful function callbacks that should be defined at later time.\n Mainly to be used for specs to verify creation / linking.\n\n This is to lead a common design in notifying child stuff.\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapChildEvents', function() {\n return {\n onChildCreation: function(child) {}\n };\n });\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapCtrlHandle', [\n '$q', function($q) {\n var CtrlHandle;\n return CtrlHandle = {\n handle: function($scope, $element) {\n $scope.$on('$destroy', function() {\n return CtrlHandle.handle($scope);\n });\n $scope.deferred = $q.defer();\n return {\n getScope: function() {\n return $scope;\n }\n };\n },\n mapPromise: function(scope, ctrl) {\n var mapScope;\n mapScope = ctrl.getScope();\n mapScope.deferred.promise.then(function(map) {\n return scope.map = map;\n });\n return mapScope.deferred.promise;\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").service(\"uiGmapEventsHelper\", [\n \"uiGmapLogger\", function($log) {\n var _getEventsObj, _hasEvents;\n _hasEvents = function(obj) {\n return angular.isDefined(obj.events) && (obj.events != null) && angular.isObject(obj.events);\n };\n _getEventsObj = function(scope, model) {\n if (_hasEvents(scope)) {\n return scope;\n }\n if (_hasEvents(model)) {\n return model;\n }\n };\n return {\n setEvents: function(gObject, scope, model, ignores) {\n var eventObj;\n eventObj = _getEventsObj(scope, model);\n if (eventObj != null) {\n return _.compact(_.map(eventObj.events, function(eventHandler, eventName) {\n var doIgnore;\n if (ignores) {\n doIgnore = _(ignores).includes(eventName);\n }\n if (eventObj.events.hasOwnProperty(eventName) && angular.isFunction(eventObj.events[eventName]) && !doIgnore) {\n return google.maps.event.addListener(gObject, eventName, function() {\n if (!scope.$evalAsync) {\n scope.$evalAsync = function() {};\n }\n return scope.$evalAsync(eventHandler.apply(scope, [gObject, eventName, model, arguments]));\n });\n }\n }));\n }\n },\n removeEvents: function(listeners) {\n var key, l;\n if (!listeners) {\n return;\n }\n for (key in listeners) {\n l = listeners[key];\n if (l && listeners.hasOwnProperty(key)) {\n google.maps.event.removeListener(l);\n }\n }\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapFitHelper', [\n 'uiGmapLogger', '$timeout', function($log, $timeout) {\n return {\n fit: function(markersOrPoints, gMap) {\n var bounds, everSet, key, markerOrPoint, point;\n if (gMap && (markersOrPoints != null ? markersOrPoints.length : void 0)) {\n bounds = new google.maps.LatLngBounds();\n everSet = false;\n for (key in markersOrPoints) {\n markerOrPoint = markersOrPoints[key];\n if (markerOrPoint) {\n if (!everSet) {\n everSet = true;\n }\n point = _.isFunction(markerOrPoint.getPosition) ? markerOrPoint.getPosition() : markerOrPoint;\n }\n bounds.extend(point);\n }\n if (everSet) {\n return $timeout(function() {\n return gMap.fitBounds(bounds);\n });\n }\n }\n }\n };\n }\n ]);\n\n}).call(this);\n","\n/*global _:true, angular:true, google:true */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [\n 'uiGmapLogger', '$compile', function(Logger, $compile) {\n var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords;\n _isTruthy = function(value, bool, optionsArray) {\n return value === bool || optionsArray.indexOf(value) !== -1;\n };\n _isFalse = function(value) {\n return _isTruthy(value, false, ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO']);\n };\n getLatitude = function(value) {\n if (Array.isArray(value) && value.length === 2) {\n return value[1];\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return value.coordinates[1];\n } else {\n return value.latitude;\n }\n };\n getLongitude = function(value) {\n if (Array.isArray(value) && value.length === 2) {\n return value[0];\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return value.coordinates[0];\n } else {\n return value.longitude;\n }\n };\n getCoords = function(value) {\n if (!value) {\n return;\n }\n if (value instanceof google.maps.LatLng) {\n return value;\n } else if (Array.isArray(value) && value.length === 2) {\n return new google.maps.LatLng(value[1], value[0]);\n } else if (angular.isDefined(value.type) && value.type === 'Point') {\n return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]);\n } else {\n return new google.maps.LatLng(value.latitude, value.longitude);\n }\n };\n validateCoords = function(coords) {\n if (angular.isUndefined(coords)) {\n return false;\n }\n if (_.isArray(coords)) {\n if (coords.length === 2) {\n return true;\n }\n } else if ((coords != null) && (coords != null ? coords.type : void 0)) {\n if (coords.type === 'Point' && _.isArray(coords.coordinates) && coords.coordinates.length === 2) {\n return true;\n }\n }\n if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) {\n return true;\n }\n return false;\n };\n return {\n setCoordsFromEvent: function(prevValue, newLatLon) {\n if (!prevValue) {\n return;\n }\n if (Array.isArray(prevValue) && prevValue.length === 2) {\n prevValue[1] = newLatLon.lat();\n prevValue[0] = newLatLon.lng();\n } else if (angular.isDefined(prevValue.type) && prevValue.type === 'Point') {\n prevValue.coordinates[1] = newLatLon.lat();\n prevValue.coordinates[0] = newLatLon.lng();\n } else {\n prevValue.latitude = newLatLon.lat();\n prevValue.longitude = newLatLon.lng();\n }\n return prevValue;\n },\n getLabelPositionPoint: function(anchor) {\n var xPos, yPos;\n if (anchor === void 0) {\n return void 0;\n }\n anchor = /^([-\\d\\.]+)\\s([-\\d\\.]+)$/.exec(anchor);\n xPos = parseFloat(anchor[1]);\n yPos = parseFloat(anchor[2]);\n if ((xPos != null) && (yPos != null)) {\n return new google.maps.Point(xPos, yPos);\n }\n },\n createWindowOptions: function(gMarker, scope, content, defaults) {\n var options;\n if ((content != null) && (defaults != null) && ($compile != null)) {\n options = angular.extend({}, defaults, {\n content: this.buildContent(scope, defaults, content),\n position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords)\n });\n if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) {\n if (options.boxClass == null) {\n\n } else {\n options.pixelOffset = {\n height: 0,\n width: -2\n };\n }\n }\n return options;\n } else {\n if (!defaults) {\n Logger.error('infoWindow defaults not defined');\n if (!content) {\n return Logger.error('infoWindow content not defined');\n }\n } else {\n return defaults;\n }\n }\n },\n buildContent: function(scope, defaults, content) {\n var parsed, ret;\n if (defaults.content != null) {\n ret = defaults.content;\n } else {\n if ($compile != null) {\n content = content.replace(/^\\s+|\\s+$/g, '');\n parsed = content === '' ? '' : $compile(content)(scope);\n if (parsed.length > 0) {\n ret = parsed[0];\n }\n } else {\n ret = content;\n }\n }\n return ret;\n },\n defaultDelay: 50,\n isTrue: function(value) {\n return _isTruthy(value, true, ['true', 'TRUE', 1, 'y', 'Y', 'yes', 'YES']);\n },\n isFalse: _isFalse,\n isFalsy: function(value) {\n return _isTruthy(value, false, [void 0, null]) || _isFalse(value);\n },\n getCoords: getCoords,\n validateCoords: validateCoords,\n equalCoords: function(coord1, coord2) {\n return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2);\n },\n validatePath: function(path) {\n var array, i, polygon, trackMaxVertices;\n i = 0;\n if (angular.isUndefined(path.type)) {\n if (!Array.isArray(path) || path.length < 2) {\n return false;\n }\n while (i < path.length) {\n if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === 'function' && typeof path[i].lng === 'function'))) {\n return false;\n }\n i++;\n }\n return true;\n } else {\n if (angular.isUndefined(path.coordinates)) {\n return false;\n }\n if (path.type === 'Polygon') {\n if (path.coordinates[0].length < 4) {\n return false;\n }\n array = path.coordinates[0];\n } else if (path.type === 'MultiPolygon') {\n trackMaxVertices = {\n max: 0,\n index: 0\n };\n _.forEach(path.coordinates, function(polygon, index) {\n if (polygon[0].length > this.max) {\n this.max = polygon[0].length;\n return this.index = index;\n }\n }, trackMaxVertices);\n polygon = path.coordinates[trackMaxVertices.index];\n array = polygon[0];\n if (array.length < 4) {\n return false;\n }\n } else if (path.type === 'LineString') {\n if (path.coordinates.length < 2) {\n return false;\n }\n array = path.coordinates;\n } else {\n return false;\n }\n while (i < array.length) {\n if (array[i].length !== 2) {\n return false;\n }\n i++;\n }\n return true;\n }\n },\n convertPathPoints: function(path) {\n var array, i, latlng, result, trackMaxVertices;\n i = 0;\n result = new google.maps.MVCArray();\n if (angular.isUndefined(path.type)) {\n while (i < path.length) {\n latlng;\n if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) {\n latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude);\n } else if (typeof path[i].lat === 'function' && typeof path[i].lng === 'function') {\n latlng = path[i];\n }\n result.push(latlng);\n i++;\n }\n } else {\n array;\n if (path.type === 'Polygon') {\n array = path.coordinates[0];\n } else if (path.type === 'MultiPolygon') {\n trackMaxVertices = {\n max: 0,\n index: 0\n };\n _.forEach(path.coordinates, function(polygon, index) {\n if (polygon[0].length > this.max) {\n this.max = polygon[0].length;\n return this.index = index;\n }\n }, trackMaxVertices);\n array = path.coordinates[trackMaxVertices.index][0];\n } else if (path.type === 'LineString') {\n array = path.coordinates;\n }\n while (i < array.length) {\n result.push(new google.maps.LatLng(array[i][1], array[i][0]));\n i++;\n }\n }\n return result;\n },\n getPath: function(object, key) {\n var obj;\n if ((key == null) || !_.isString(key)) {\n return key;\n }\n obj = object;\n _.each(key.split('.'), function(value) {\n if (obj) {\n return obj = obj[value];\n }\n });\n return obj;\n },\n validateBoundPoints: function(bounds) {\n if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) {\n return false;\n }\n return true;\n },\n convertBoundPoints: function(bounds) {\n var result;\n result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude));\n return result;\n },\n fitMapBounds: function(map, bounds) {\n return map.fitBounds(bounds);\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapIsReady', [\n '$q', '$timeout', function($q, $timeout) {\n var _checkIfReady, _ctr, _promises, _proms;\n _ctr = 0;\n _proms = [];\n _promises = function() {\n return $q.all(_proms);\n };\n _checkIfReady = function(deferred, expectedInstances, retriesLeft) {\n return $timeout(function() {\n if (retriesLeft <= 0) {\n deferred.reject('Your maps are not found we have checked the maximum amount of times. :)');\n return;\n }\n if (_ctr !== expectedInstances) {\n _checkIfReady(deferred, expectedInstances, retriesLeft - 1);\n } else {\n deferred.resolve(_promises());\n }\n }, 100);\n };\n return {\n spawn: function() {\n var d;\n d = $q.defer();\n _proms.push(d.promise);\n _ctr += 1;\n return {\n instance: _ctr,\n deferred: d\n };\n },\n promises: _promises,\n instances: function() {\n return _ctr;\n },\n promise: function(expectedInstances, numRetries) {\n var d;\n if (expectedInstances == null) {\n expectedInstances = 1;\n }\n if (numRetries == null) {\n numRetries = 50;\n }\n d = $q.defer();\n _checkIfReady(d, expectedInstances, numRetries);\n return d.promise;\n },\n reset: function() {\n _ctr = 0;\n _proms.length = 0;\n },\n decrement: function() {\n if (_ctr > 0) {\n _ctr -= 1;\n }\n if (_proms.length) {\n _proms.length -= 1;\n }\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").factory(\"uiGmapLinked\", [\n \"uiGmapBaseObject\", function(BaseObject) {\n var Linked;\n Linked = (function(superClass) {\n extend(Linked, superClass);\n\n function Linked(scope, element, attrs, ctrls) {\n this.scope = scope;\n this.element = element;\n this.attrs = attrs;\n this.ctrls = ctrls;\n }\n\n return Linked;\n\n })(BaseObject);\n return Linked;\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [\n 'nemSimpleLogger', function(nemSimpleLogger) {\n return nemSimpleLogger.spawn();\n }\n ]);\n\n}).call(this);\n","\n/*global _:true, angular:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelKey', [\n 'uiGmapBaseObject', 'uiGmapGmapUtil', function(BaseObject, GmapUtil) {\n return (function(superClass) {\n extend(_Class, superClass);\n\n function _Class(scope1, _interface) {\n this.scope = scope1;\n this[\"interface\"] = _interface != null ? _interface : {\n scopeKeys: []\n };\n this.modelsLength = bind(this.modelsLength, this);\n this.updateChild = bind(this.updateChild, this);\n this.destroy = bind(this.destroy, this);\n this.setChildScope = bind(this.setChildScope, this);\n this.getChanges = bind(this.getChanges, this);\n this.getProp = bind(this.getProp, this);\n this.setIdKey = bind(this.setIdKey, this);\n this.modelKeyComparison = bind(this.modelKeyComparison, this);\n _Class.__super__.constructor.call(this);\n this.defaultIdKey = 'id';\n this.idKey = void 0;\n }\n\n _Class.prototype.evalModelHandle = function(model, modelKey) {\n if ((model == null) || (modelKey == null)) {\n return;\n }\n if (modelKey === 'self') {\n return model;\n } else {\n if (_.isFunction(modelKey)) {\n modelKey = modelKey();\n }\n return GmapUtil.getPath(model, modelKey);\n }\n };\n\n _Class.prototype.modelKeyComparison = function(model1, model2) {\n var coord1, coord2, hasCoords, isEqual, scope, without;\n hasCoords = this[\"interface\"].scopeKeys.indexOf('coords') >= 0;\n if (hasCoords && (this.scope.coords != null) || !hasCoords) {\n scope = this.scope;\n }\n if (scope == null) {\n throw 'No scope set!';\n }\n if (hasCoords) {\n coord1 = this.scopeOrModelVal('coords', scope, model1);\n coord2 = this.scopeOrModelVal('coords', scope, model2);\n isEqual = GmapUtil.equalCoords(coord1, coord2);\n if (!isEqual) {\n return isEqual;\n }\n }\n without = _.without(this[\"interface\"].scopeKeys, 'coords');\n isEqual = _.every(without, (function(_this) {\n return function(k) {\n return _this.scopeOrModelVal(scope[k], scope, model1) === _this.scopeOrModelVal(scope[k], scope, model2);\n };\n })(this));\n return isEqual;\n };\n\n _Class.prototype.setIdKey = function(scope) {\n return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey;\n };\n\n _Class.prototype.setVal = function(model, key, newValue) {\n this.modelOrKey(model, key = newValue);\n return model;\n };\n\n _Class.prototype.modelOrKey = function(model, key) {\n if (key == null) {\n return;\n }\n if (key !== 'self') {\n return GmapUtil.getPath(model, key);\n }\n return model;\n };\n\n _Class.prototype.getProp = function(propName, scope, model) {\n return this.scopeOrModelVal(propName, scope, model);\n };\n\n\n /*\n For the cases were watching a large object we only want to know the list of props\n that actually changed.\n Also we want to limit the amount of props we analyze to whitelisted props that are\n actually tracked by scope. (should make things faster with whitelisted)\n */\n\n _Class.prototype.getChanges = function(now, prev, whitelistedProps) {\n var c, changes, prop;\n if (whitelistedProps) {\n prev = _.pick(prev, whitelistedProps);\n now = _.pick(now, whitelistedProps);\n }\n changes = {};\n prop = {};\n c = {};\n for (prop in now) {\n if (!prev || prev[prop] !== now[prop]) {\n if (_.isArray(now[prop])) {\n changes[prop] = now[prop];\n } else if (_.isObject(now[prop])) {\n c = this.getChanges(now[prop], (prev ? prev[prop] : null));\n if (!_.isEmpty(c)) {\n changes[prop] = c;\n }\n } else {\n changes[prop] = now[prop];\n }\n }\n }\n return changes;\n };\n\n _Class.prototype.scopeOrModelVal = function(key, scope, model, doWrap) {\n var maybeWrap, modelKey, modelProp, scopeProp;\n if (doWrap == null) {\n doWrap = false;\n }\n maybeWrap = function(isScope, ret, doWrap) {\n if (doWrap == null) {\n doWrap = false;\n }\n if (doWrap) {\n return {\n isScope: isScope,\n value: ret\n };\n }\n return ret;\n };\n scopeProp = _.get(scope, key);\n if (_.isFunction(scopeProp)) {\n return maybeWrap(true, scopeProp(model), doWrap);\n }\n if (_.isObject(scopeProp)) {\n return maybeWrap(true, scopeProp, doWrap);\n }\n if (!_.isString(scopeProp)) {\n return maybeWrap(true, scopeProp, doWrap);\n }\n modelKey = scopeProp;\n if (!modelKey) {\n modelProp = _.get(model, key);\n } else {\n modelProp = modelKey === 'self' ? model : _.get(model, modelKey);\n }\n if (_.isFunction(modelProp)) {\n return maybeWrap(false, modelProp(), doWrap);\n }\n return maybeWrap(false, modelProp, doWrap);\n };\n\n _Class.prototype.setChildScope = function(keys, childScope, model) {\n var isScopeObj, key, name, newValue;\n for (key in keys) {\n name = keys[key];\n isScopeObj = this.scopeOrModelVal(name, childScope, model, true);\n if ((isScopeObj != null ? isScopeObj.value : void 0) != null) {\n newValue = isScopeObj.value;\n if (newValue !== childScope[name]) {\n childScope[name] = newValue;\n }\n }\n }\n return childScope.model = model;\n };\n\n _Class.prototype.onDestroy = function(scope) {};\n\n _Class.prototype.destroy = function(manualOverride) {\n var ref;\n if (manualOverride == null) {\n manualOverride = false;\n }\n if ((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0) && (this.needToManualDestroy || manualOverride)) {\n return this.scope.$destroy();\n } else {\n return this.clean();\n }\n };\n\n _Class.prototype.updateChild = function(child, model) {\n if (model[this.idKey] == null) {\n this.$log.error(\"Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.\");\n return;\n }\n return child.updateModel(model);\n };\n\n _Class.prototype.modelsLength = function(arrayOrObjModels) {\n var len, toCheck;\n if (arrayOrObjModels == null) {\n arrayOrObjModels = void 0;\n }\n len = 0;\n toCheck = arrayOrObjModels ? arrayOrObjModels : this.scope.models;\n if (toCheck == null) {\n return len;\n }\n if (angular.isArray(toCheck) || (toCheck.length != null)) {\n len = toCheck.length;\n } else {\n len = Object.keys(toCheck).length;\n }\n return len;\n };\n\n return _Class;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').factory('uiGmapModelsWatcher', [\n 'uiGmapLogger', 'uiGmap_async', '$q', 'uiGmapPromise', function(Logger, _async, $q, uiGmapPromise) {\n return {\n didQueueInitPromise: function(existingPiecesObj, scope) {\n if (scope.models.length === 0) {\n _async.promiseLock(existingPiecesObj, uiGmapPromise.promiseTypes.init, null, null, (function() {\n return uiGmapPromise.resolve();\n }));\n return true;\n }\n return false;\n },\n figureOutState: function(idKey, scope, childObjects, comparison, callBack) {\n var adds, children, mappedScopeModelIds, removals, updates;\n adds = [];\n mappedScopeModelIds = {};\n removals = [];\n updates = [];\n scope.models.forEach(function(m) {\n var child;\n if (m[idKey] != null) {\n mappedScopeModelIds[m[idKey]] = {};\n if (childObjects.get(m[idKey]) == null) {\n return adds.push(m);\n } else {\n child = childObjects.get(m[idKey]);\n if (!comparison(m, child.clonedModel, scope)) {\n return updates.push({\n model: m,\n child: child\n });\n }\n }\n } else {\n return Logger.error(' id missing for model #{m.toString()},\\ncan not use do comparison/insertion');\n }\n });\n children = childObjects.values();\n children.forEach(function(c) {\n var id;\n if (c == null) {\n Logger.error('child undefined in ModelsWatcher.');\n return;\n }\n if (c.model == null) {\n Logger.error('child.model undefined in ModelsWatcher.');\n return;\n }\n id = c.model[idKey];\n if (mappedScopeModelIds[id] == null) {\n return removals.push(c);\n }\n });\n return {\n adds: adds,\n removals: removals,\n updates: updates\n };\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapPromise', [\n '$q', '$timeout', 'uiGmapLogger', function($q, $timeout, $log) {\n var ExposedPromise, SniffedPromise, defer, isInProgress, isResolved, promise, promiseStatus, promiseStatuses, promiseTypes, resolve, strPromiseStatuses;\n promiseTypes = {\n create: 'create',\n update: 'update',\n \"delete\": 'delete',\n init: 'init'\n };\n promiseStatuses = {\n IN_PROGRESS: 0,\n RESOLVED: 1,\n REJECTED: 2\n };\n strPromiseStatuses = (function() {\n var obj;\n obj = {};\n obj[\"\" + promiseStatuses.IN_PROGRESS] = 'in-progress';\n obj[\"\" + promiseStatuses.RESOLVED] = 'resolved';\n obj[\"\" + promiseStatuses.REJECTED] = 'rejected';\n return obj;\n })();\n isInProgress = function(promise) {\n if (promise.$$state) {\n return promise.$$state.status === promiseStatuses.IN_PROGRESS;\n }\n if (!promise.hasOwnProperty(\"$$v\")) {\n return true;\n }\n };\n isResolved = function(promise) {\n if (promise.$$state) {\n return promise.$$state.status === promiseStatuses.RESOLVED;\n }\n if (promise.hasOwnProperty(\"$$v\")) {\n return true;\n }\n };\n promiseStatus = function(status) {\n return strPromiseStatuses[status] || 'done w error';\n };\n ExposedPromise = function(promise) {\n var cancelDeferred, combined, wrapped;\n cancelDeferred = $q.defer();\n combined = $q.all([promise, cancelDeferred.promise]);\n wrapped = $q.defer();\n promise.then(cancelDeferred.resolve, (function() {}), function(notify) {\n cancelDeferred.notify(notify);\n return wrapped.notify(notify);\n });\n combined.then(function(successes) {\n return wrapped.resolve(successes[0] || successes[1]);\n }, function(error) {\n return wrapped.reject(error);\n });\n wrapped.promise.cancel = function(reason) {\n if (reason == null) {\n reason = 'canceled';\n }\n return cancelDeferred.reject(reason);\n };\n wrapped.promise.notify = function(msg) {\n if (msg == null) {\n msg = 'cancel safe';\n }\n wrapped.notify(msg);\n if (promise.hasOwnProperty('notify')) {\n return promise.notify(msg);\n }\n };\n if (promise.promiseType != null) {\n wrapped.promise.promiseType = promise.promiseType;\n }\n return wrapped.promise;\n };\n SniffedPromise = function(fnPromise, promiseType) {\n return {\n promise: fnPromise,\n promiseType: promiseType\n };\n };\n defer = function() {\n return $q.defer();\n };\n resolve = function() {\n var d;\n d = $q.defer();\n d.resolve.apply(void 0, arguments);\n return d.promise;\n };\n promise = function(fnToWrap) {\n var d;\n if (!_.isFunction(fnToWrap)) {\n $log.error(\"uiGmapPromise.promise() only accepts functions\");\n return;\n }\n d = $q.defer();\n $timeout(function() {\n var result;\n result = fnToWrap();\n return d.resolve(result);\n });\n return d.promise;\n };\n return {\n defer: defer,\n promise: promise,\n resolve: resolve,\n promiseTypes: promiseTypes,\n isInProgress: isInProgress,\n isResolved: isResolved,\n promiseStatus: promiseStatus,\n ExposedPromise: ExposedPromise,\n SniffedPromise: SniffedPromise\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").factory(\"uiGmapPropMap\", function() {\n\n /*\n Simple Object Map with a length property to make it easy to track length/size\n */\n var PropMap;\n return PropMap = (function() {\n function PropMap() {\n this.removeAll = bind(this.removeAll, this);\n this.slice = bind(this.slice, this);\n this.push = bind(this.push, this);\n this.keys = bind(this.keys, this);\n this.values = bind(this.values, this);\n this.remove = bind(this.remove, this);\n this.put = bind(this.put, this);\n this.stateChanged = bind(this.stateChanged, this);\n this.get = bind(this.get, this);\n this.length = 0;\n this.dict = {};\n this.didValsStateChange = false;\n this.didKeysStateChange = false;\n this.allVals = [];\n this.allKeys = [];\n }\n\n PropMap.prototype.get = function(key) {\n return this.dict[key];\n };\n\n PropMap.prototype.stateChanged = function() {\n this.didValsStateChange = true;\n return this.didKeysStateChange = true;\n };\n\n PropMap.prototype.put = function(key, value) {\n if (this.get(key) == null) {\n this.length++;\n }\n this.stateChanged();\n return this.dict[key] = value;\n };\n\n PropMap.prototype.remove = function(key, isSafe) {\n var value;\n if (isSafe == null) {\n isSafe = false;\n }\n if (isSafe && !this.get(key)) {\n return void 0;\n }\n value = this.dict[key];\n delete this.dict[key];\n this.length--;\n this.stateChanged();\n return value;\n };\n\n PropMap.prototype.valuesOrKeys = function(str) {\n var keys, vals;\n if (str == null) {\n str = 'Keys';\n }\n if (!this[\"did\" + str + \"StateChange\"]) {\n return this['all' + str];\n }\n vals = [];\n keys = [];\n _.each(this.dict, function(v, k) {\n vals.push(v);\n return keys.push(k);\n });\n this.didKeysStateChange = false;\n this.didValsStateChange = false;\n this.allVals = vals;\n this.allKeys = keys;\n return this['all' + str];\n };\n\n PropMap.prototype.values = function() {\n return this.valuesOrKeys('Vals');\n };\n\n PropMap.prototype.keys = function() {\n return this.valuesOrKeys();\n };\n\n PropMap.prototype.push = function(obj, key) {\n if (key == null) {\n key = \"key\";\n }\n return this.put(obj[key], obj);\n };\n\n PropMap.prototype.slice = function() {\n return this.keys().map((function(_this) {\n return function(k) {\n return _this.remove(k);\n };\n })(this));\n };\n\n PropMap.prototype.removeAll = function() {\n return this.slice();\n };\n\n PropMap.prototype.each = function(cb) {\n return _.each(this.dict, function(v, k) {\n return cb(v);\n });\n };\n\n PropMap.prototype.map = function(cb) {\n return _.map(this.dict, function(v, k) {\n return cb(v);\n });\n };\n\n return PropMap;\n\n })();\n });\n\n}).call(this);\n","\n/*globals angular,_ */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").factory(\"uiGmapPropertyAction\", [\n \"uiGmapLogger\", function(Logger) {\n var PropertyAction;\n PropertyAction = function(setterFn) {\n this.setIfChange = function(callingKey) {\n return function(newVal, oldVal) {\n if (!_.isEqual(oldVal, newVal)) {\n return setterFn(callingKey, newVal);\n }\n };\n };\n this.sic = this.setIfChange;\n return this;\n };\n return PropertyAction;\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapClustererMarkerManager', [\n 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapEventsHelper', function($log, FitHelper, PropMap, EventsHelper) {\n var ClustererMarkerManager;\n ClustererMarkerManager = (function() {\n ClustererMarkerManager.type = 'ClustererMarkerManager';\n\n function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) {\n if (opt_markers == null) {\n opt_markers = {};\n }\n this.opt_options = opt_options != null ? opt_options : {};\n this.opt_events = opt_events;\n this.checkSync = bind(this.checkSync, this);\n this.getGMarkers = bind(this.getGMarkers, this);\n this.fit = bind(this.fit, this);\n this.destroy = bind(this.destroy, this);\n this.attachEvents = bind(this.attachEvents, this);\n this.clear = bind(this.clear, this);\n this.draw = bind(this.draw, this);\n this.removeMany = bind(this.removeMany, this);\n this.remove = bind(this.remove, this);\n this.addMany = bind(this.addMany, this);\n this.update = bind(this.update, this);\n this.add = bind(this.add, this);\n this.type = ClustererMarkerManager.type;\n this.clusterer = new NgMapMarkerClusterer(gMap, opt_markers, this.opt_options);\n this.propMapGMarkers = new PropMap();\n this.attachEvents(this.opt_events, 'opt_events');\n this.clusterer.setIgnoreHidden(true);\n this.noDrawOnSingleAddRemoves = true;\n $log.info(this);\n }\n\n ClustererMarkerManager.prototype.checkKey = function(gMarker) {\n var msg;\n if (gMarker.key == null) {\n msg = 'gMarker.key undefined and it is REQUIRED!!';\n return $log.error(msg);\n }\n };\n\n ClustererMarkerManager.prototype.add = function(gMarker) {\n this.checkKey(gMarker);\n this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves);\n this.propMapGMarkers.put(gMarker.key, gMarker);\n return this.checkSync();\n };\n\n ClustererMarkerManager.prototype.update = function(gMarker) {\n this.remove(gMarker);\n return this.add(gMarker);\n };\n\n ClustererMarkerManager.prototype.addMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(gMarker) {\n return _this.add(gMarker);\n };\n })(this));\n };\n\n ClustererMarkerManager.prototype.remove = function(gMarker) {\n var exists;\n this.checkKey(gMarker);\n exists = this.propMapGMarkers.get(gMarker.key);\n if (exists) {\n this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves);\n this.propMapGMarkers.remove(gMarker.key);\n }\n return this.checkSync();\n };\n\n ClustererMarkerManager.prototype.removeMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(gMarker) {\n return _this.remove(gMarker);\n };\n })(this));\n };\n\n ClustererMarkerManager.prototype.draw = function() {\n return this.clusterer.repaint();\n };\n\n ClustererMarkerManager.prototype.clear = function() {\n this.removeMany(this.getGMarkers());\n return this.clusterer.repaint();\n };\n\n ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) {\n var eventHandler, eventName, results;\n this.listeners = [];\n if (angular.isDefined(options) && (options != null) && angular.isObject(options)) {\n results = [];\n for (eventName in options) {\n eventHandler = options[eventName];\n if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) {\n $log.info(optionsName + \": Attaching event: \" + eventName + \" to clusterer\");\n results.push(this.listeners.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName])));\n } else {\n results.push(void 0);\n }\n }\n return results;\n }\n };\n\n ClustererMarkerManager.prototype.clearEvents = function() {\n EventsHelper.removeEvents(this.listeners);\n return this.listeners = [];\n };\n\n ClustererMarkerManager.prototype.destroy = function() {\n this.clearEvents();\n return this.clear();\n };\n\n ClustererMarkerManager.prototype.fit = function() {\n return FitHelper.fit(this.getGMarkers(), this.clusterer.getMap());\n };\n\n ClustererMarkerManager.prototype.getGMarkers = function() {\n return this.clusterer.getMarkers().values();\n };\n\n ClustererMarkerManager.prototype.checkSync = function() {};\n\n return ClustererMarkerManager;\n\n })();\n return ClustererMarkerManager;\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.managers').service('uiGmapGoogleMapObjectManager', [\n function() {\n var _availableInstances, _usedInstances;\n _availableInstances = [];\n _usedInstances = [];\n return {\n createMapInstance: function(parentElement, options) {\n var instance;\n instance = null;\n if (_availableInstances.length === 0) {\n instance = new google.maps.Map(parentElement, options);\n _usedInstances.push(instance);\n } else {\n instance = _availableInstances.pop();\n angular.element(parentElement).append(instance.getDiv());\n instance.setOptions(options);\n _usedInstances.push(instance);\n }\n return instance;\n },\n recycleMapInstance: function(instance) {\n var index;\n index = _usedInstances.indexOf(instance);\n if (index < 0) {\n throw new Error('Expected map instance to be a previously used instance');\n }\n _usedInstances.splice(index, 1);\n return _availableInstances.push(instance);\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module(\"uiGmapgoogle-maps.directives.api.managers\").factory(\"uiGmapMarkerManager\", [\n \"uiGmapLogger\", \"uiGmapFitHelper\", \"uiGmapPropMap\", function(Logger, FitHelper, PropMap) {\n var MarkerManager;\n MarkerManager = (function() {\n MarkerManager.type = 'MarkerManager';\n\n function MarkerManager(gMap, opt_markers, opt_options) {\n this.getGMarkers = bind(this.getGMarkers, this);\n this.fit = bind(this.fit, this);\n this.handleOptDraw = bind(this.handleOptDraw, this);\n this.clear = bind(this.clear, this);\n this.destroy = bind(this.destroy, this);\n this.draw = bind(this.draw, this);\n this.removeMany = bind(this.removeMany, this);\n this.remove = bind(this.remove, this);\n this.addMany = bind(this.addMany, this);\n this.update = bind(this.update, this);\n this.add = bind(this.add, this);\n this.type = MarkerManager.type;\n this.gMap = gMap;\n this.gMarkers = new PropMap();\n this.$log = Logger;\n this.$log.info(this);\n }\n\n MarkerManager.prototype.add = function(gMarker, optDraw) {\n var exists, msg;\n if (optDraw == null) {\n optDraw = true;\n }\n if (gMarker.key == null) {\n msg = \"gMarker.key undefined and it is REQUIRED!!\";\n Logger.error(msg);\n throw msg;\n }\n exists = this.gMarkers.get(gMarker.key);\n if (!exists) {\n this.handleOptDraw(gMarker, optDraw, true);\n return this.gMarkers.put(gMarker.key, gMarker);\n }\n };\n\n MarkerManager.prototype.update = function(gMarker, optDraw) {\n if (optDraw == null) {\n optDraw = true;\n }\n this.remove(gMarker, optDraw);\n return this.add(gMarker, optDraw);\n };\n\n MarkerManager.prototype.addMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(gMarker) {\n return _this.add(gMarker);\n };\n })(this));\n };\n\n MarkerManager.prototype.remove = function(gMarker, optDraw) {\n if (optDraw == null) {\n optDraw = true;\n }\n this.handleOptDraw(gMarker, optDraw, false);\n if (this.gMarkers.get(gMarker.key)) {\n return this.gMarkers.remove(gMarker.key);\n }\n };\n\n MarkerManager.prototype.removeMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(marker) {\n return _this.remove(marker);\n };\n })(this));\n };\n\n MarkerManager.prototype.draw = function() {\n var deletes;\n deletes = [];\n this.gMarkers.each((function(_this) {\n return function(gMarker) {\n if (!gMarker.isDrawn) {\n if (gMarker.doAdd) {\n gMarker.setMap(_this.gMap);\n return gMarker.isDrawn = true;\n } else {\n return deletes.push(gMarker);\n }\n }\n };\n })(this));\n return deletes.forEach((function(_this) {\n return function(gMarker) {\n gMarker.isDrawn = false;\n return _this.remove(gMarker, true);\n };\n })(this));\n };\n\n MarkerManager.prototype.destroy = function() {\n return this.clear();\n };\n\n MarkerManager.prototype.clear = function() {\n this.gMarkers.each(function(gMarker) {\n return gMarker.setMap(null);\n });\n delete this.gMarkers;\n return this.gMarkers = new PropMap();\n };\n\n MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) {\n if (optDraw === true) {\n if (doAdd) {\n gMarker.setMap(this.gMap);\n } else {\n gMarker.setMap(null);\n }\n return gMarker.isDrawn = true;\n } else {\n gMarker.isDrawn = false;\n return gMarker.doAdd = doAdd;\n }\n };\n\n MarkerManager.prototype.fit = function() {\n return FitHelper.fit(this.getGMarkers(), this.gMap);\n };\n\n MarkerManager.prototype.getGMarkers = function() {\n return this.gMarkers.values();\n };\n\n return MarkerManager;\n\n })();\n return MarkerManager;\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module('uiGmapgoogle-maps.directives.api.managers').factory('uiGmapSpiderfierMarkerManager', [\n 'uiGmapLogger', 'uiGmapFitHelper', 'uiGmapPropMap', 'uiGmapMarkerSpiderfier', function($log, FitHelper, PropMap, MarkerSpiderfier) {\n var SpiderfierMarkerManager;\n return SpiderfierMarkerManager = (function() {\n SpiderfierMarkerManager.type = 'SpiderfierMarkerManager';\n\n function SpiderfierMarkerManager(gMap, opt_markers, opt_options, opt_events, scope) {\n if (opt_markers == null) {\n opt_markers = {};\n }\n this.opt_options = opt_options != null ? opt_options : {};\n this.opt_events = opt_events;\n this.scope = scope;\n this.checkSync = bind(this.checkSync, this);\n this.isSpiderfied = bind(this.isSpiderfied, this);\n this.getGMarkers = bind(this.getGMarkers, this);\n this.fit = bind(this.fit, this);\n this.destroy = bind(this.destroy, this);\n this.attachEvents = bind(this.attachEvents, this);\n this.clear = bind(this.clear, this);\n this.draw = bind(this.draw, this);\n this.removeMany = bind(this.removeMany, this);\n this.remove = bind(this.remove, this);\n this.addMany = bind(this.addMany, this);\n this.update = bind(this.update, this);\n this.add = bind(this.add, this);\n this.type = SpiderfierMarkerManager.type;\n this.markerSpiderfier = new MarkerSpiderfier(gMap, this.opt_options);\n this.propMapGMarkers = new PropMap();\n this.attachEvents(this.opt_events, 'opt_events');\n this.noDrawOnSingleAddRemoves = true;\n $log.info(this);\n }\n\n SpiderfierMarkerManager.prototype.checkKey = function(gMarker) {\n var msg;\n if (gMarker.key == null) {\n msg = 'gMarker.key undefined and it is REQUIRED!!';\n return $log.error(msg);\n }\n };\n\n SpiderfierMarkerManager.prototype.add = function(gMarker) {\n gMarker.setMap(this.markerSpiderfier.map);\n this.checkKey(gMarker);\n this.markerSpiderfier.addMarker(gMarker, this.noDrawOnSingleAddRemoves);\n this.propMapGMarkers.put(gMarker.key, gMarker);\n return this.checkSync();\n };\n\n SpiderfierMarkerManager.prototype.update = function(gMarker) {\n this.remove(gMarker);\n return this.add(gMarker);\n };\n\n SpiderfierMarkerManager.prototype.addMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(gMarker) {\n return _this.add(gMarker);\n };\n })(this));\n };\n\n SpiderfierMarkerManager.prototype.remove = function(gMarker) {\n var exists;\n this.checkKey(gMarker);\n exists = this.propMapGMarkers.get(gMarker.key);\n if (exists) {\n gMarker.setMap(null);\n this.markerSpiderfier.removeMarker(gMarker, this.noDrawOnSingleAddRemoves);\n this.propMapGMarkers.remove(gMarker.key);\n }\n return this.checkSync();\n };\n\n SpiderfierMarkerManager.prototype.removeMany = function(gMarkers) {\n return gMarkers.forEach((function(_this) {\n return function(gMarker) {\n return _this.remove(gMarker);\n };\n })(this));\n };\n\n SpiderfierMarkerManager.prototype.draw = function() {};\n\n SpiderfierMarkerManager.prototype.clear = function() {\n return this.removeMany(this.getGMarkers());\n };\n\n SpiderfierMarkerManager.prototype.attachEvents = function(options, optionsName) {\n if (angular.isDefined(options) && (options != null) && angular.isObject(options)) {\n return _.each(options, (function(_this) {\n return function(eventHandler, eventName) {\n if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) {\n $log.info(optionsName + \": Attaching event: \" + eventName + \" to markerSpiderfier\");\n return _this.markerSpiderfier.addListener(eventName, function() {\n if (eventName === 'spiderfy' || eventName === 'unspiderfy') {\n return _this.scope.$evalAsync(options[eventName].apply(options, arguments));\n } else {\n return _this.scope.$evalAsync(options[eventName].apply(options, [arguments[0], eventName, arguments[0].model, arguments]));\n }\n });\n }\n };\n })(this));\n }\n };\n\n SpiderfierMarkerManager.prototype.clearEvents = function(options, optionsName) {\n var eventHandler, eventName;\n if (angular.isDefined(options) && (options != null) && angular.isObject(options)) {\n for (eventName in options) {\n eventHandler = options[eventName];\n if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) {\n $log.info(optionsName + \": Clearing event: \" + eventName + \" to markerSpiderfier\");\n this.markerSpiderfier.clearListeners(eventName);\n }\n }\n }\n };\n\n SpiderfierMarkerManager.prototype.destroy = function() {\n this.clearEvents(this.opt_events, 'opt_events');\n return this.clear();\n };\n\n SpiderfierMarkerManager.prototype.fit = function() {\n return FitHelper.fit(this.getGMarkers(), this.markerSpiderfier.map);\n };\n\n SpiderfierMarkerManager.prototype.getGMarkers = function() {\n return this.markerSpiderfier.getMarkers();\n };\n\n SpiderfierMarkerManager.prototype.isSpiderfied = function() {\n return _.find(this.getGMarkers(), function(gMarker) {\n return (gMarker != null ? gMarker._omsData : void 0) != null;\n });\n };\n\n SpiderfierMarkerManager.prototype.checkSync = function() {};\n\n return SpiderfierMarkerManager;\n\n })();\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps').factory('uiGmapadd-events', [\n '$timeout', function($timeout) {\n var addEvent, addEvents;\n addEvent = function(target, eventName, handler) {\n return google.maps.event.addListener(target, eventName, function() {\n handler.apply(this, arguments);\n return $timeout((function() {}), true);\n });\n };\n addEvents = function(target, eventName, handler) {\n var remove;\n if (handler) {\n return addEvent(target, eventName, handler);\n }\n remove = [];\n angular.forEach(eventName, function(_handler, key) {\n return remove.push(addEvent(target, key, _handler));\n });\n return function() {\n angular.forEach(remove, function(listener) {\n return google.maps.event.removeListener(listener);\n });\n return remove = null;\n };\n };\n return addEvents;\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps').factory('uiGmaparray-sync', [\n 'uiGmapadd-events', function(mapEvents) {\n return function(mapArray, scope, pathEval, pathChangedFn) {\n var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener;\n isSetFromScope = false;\n scopePath = scope.$eval(pathEval);\n if (!scope[\"static\"]) {\n legacyHandlers = {\n set_at: function(index) {\n var value;\n if (isSetFromScope) {\n return;\n }\n value = mapArray.getAt(index);\n if (!value) {\n return;\n }\n if (!value.lng || !value.lat) {\n return scopePath[index] = value;\n } else {\n scopePath[index].latitude = value.lat();\n return scopePath[index].longitude = value.lng();\n }\n },\n insert_at: function(index) {\n var value;\n if (isSetFromScope) {\n return;\n }\n value = mapArray.getAt(index);\n if (!value) {\n return;\n }\n if (!value.lng || !value.lat) {\n return scopePath.splice(index, 0, value);\n } else {\n return scopePath.splice(index, 0, {\n latitude: value.lat(),\n longitude: value.lng()\n });\n }\n },\n remove_at: function(index) {\n if (isSetFromScope) {\n return;\n }\n return scopePath.splice(index, 1);\n }\n };\n geojsonArray;\n if (scopePath.type === 'Polygon') {\n geojsonArray = scopePath.coordinates[0];\n } else if (scopePath.type === 'LineString') {\n geojsonArray = scopePath.coordinates;\n }\n geojsonHandlers = {\n set_at: function(index) {\n var value;\n if (isSetFromScope) {\n return;\n }\n value = mapArray.getAt(index);\n if (!(value && value.lng && value.lat)) {\n return;\n }\n geojsonArray[index][1] = value.lat();\n return geojsonArray[index][0] = value.lng();\n },\n insert_at: function(index) {\n var value;\n if (isSetFromScope) {\n return;\n }\n value = mapArray.getAt(index);\n if (!value) {\n return;\n }\n if (!value.lng || !value.lat) {\n return;\n }\n return geojsonArray.splice(index, 0, [value.lng(), value.lat()]);\n },\n remove_at: function(index) {\n if (isSetFromScope) {\n return;\n }\n return geojsonArray.splice(index, 1);\n }\n };\n mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers);\n }\n legacyWatcher = function(newPath) {\n var changed, i, l, newLength, newValue, oldArray, oldLength, oldValue;\n isSetFromScope = true;\n oldArray = mapArray;\n changed = false;\n if (newPath) {\n i = 0;\n oldLength = oldArray.getLength();\n newLength = newPath.length;\n l = Math.min(oldLength, newLength);\n newValue = void 0;\n while (i < l) {\n oldValue = oldArray.getAt(i);\n newValue = newPath[i];\n if (typeof newValue.equals === 'function') {\n if (!newValue.equals(oldValue)) {\n oldArray.setAt(i, newValue);\n changed = true;\n }\n } else {\n if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) {\n oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude));\n changed = true;\n }\n }\n i++;\n }\n while (i < newLength) {\n newValue = newPath[i];\n if (typeof newValue.lat === 'function' && typeof newValue.lng === 'function') {\n oldArray.push(newValue);\n } else {\n oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude));\n }\n changed = true;\n i++;\n }\n while (i < oldLength) {\n oldArray.pop();\n changed = true;\n i++;\n }\n }\n isSetFromScope = false;\n if (changed) {\n return pathChangedFn(oldArray);\n }\n };\n geojsonWatcher = function(newPath) {\n var array, changed, i, l, newLength, newValue, oldArray, oldLength, oldValue;\n isSetFromScope = true;\n oldArray = mapArray;\n changed = false;\n if (newPath) {\n array;\n if (scopePath.type === 'Polygon') {\n array = newPath.coordinates[0];\n } else if (scopePath.type === 'LineString') {\n array = newPath.coordinates;\n }\n i = 0;\n oldLength = oldArray.getLength();\n newLength = array.length;\n l = Math.min(oldLength, newLength);\n newValue = void 0;\n while (i < l) {\n oldValue = oldArray.getAt(i);\n newValue = array[i];\n if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) {\n oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0]));\n changed = true;\n }\n i++;\n }\n while (i < newLength) {\n newValue = array[i];\n oldArray.push(new google.maps.LatLng(newValue[1], newValue[0]));\n changed = true;\n i++;\n }\n while (i < oldLength) {\n oldArray.pop();\n changed = true;\n i++;\n }\n }\n isSetFromScope = false;\n if (changed) {\n return pathChangedFn(oldArray);\n }\n };\n watchListener;\n if (!scope[\"static\"]) {\n if (angular.isUndefined(scopePath.type)) {\n watchListener = scope.$watchCollection(pathEval, legacyWatcher);\n } else {\n watchListener = scope.$watch(pathEval, geojsonWatcher, true);\n }\n }\n return function() {\n if (mapArrayListener) {\n mapArrayListener();\n mapArrayListener = null;\n }\n if (watchListener) {\n watchListener();\n return watchListener = null;\n }\n };\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api.utils\").factory(\"uiGmapChromeFixes\", [\n '$timeout', function($timeout) {\n return {\n maybeRepaint: function(el) {\n if (el) {\n el.style.opacity = 0.9;\n return $timeout(function() {\n return el.style.opacity = 1;\n });\n }\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps').service('uiGmapObjectIterators', function() {\n var _ignores, _iterators, _slapForEach, _slapMap;\n _ignores = ['length', 'forEach', 'map'];\n _iterators = [];\n _slapForEach = function(object) {\n object.forEach = function(cb) {\n return _.each(_.omit(object, _ignores), function(val) {\n if (!_.isFunction(val)) {\n return cb(val);\n }\n });\n };\n return object;\n };\n _iterators.push(_slapForEach);\n _slapMap = function(object) {\n object.map = function(cb) {\n return _.map(_.omit(object, _ignores), function(val) {\n if (!_.isFunction(val)) {\n return cb(val);\n }\n });\n };\n return object;\n };\n _iterators.push(_slapMap);\n return {\n slapMap: _slapMap,\n slapForEach: _slapForEach,\n slapAll: function(object) {\n _iterators.forEach(function(it) {\n return it(object);\n });\n return object;\n }\n };\n });\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.options.builders').service('uiGmapCommonOptionsBuilder', [\n 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapModelKey', function(BaseObject, $log, ModelKey) {\n var CommonOptionsBuilder;\n return CommonOptionsBuilder = (function(superClass) {\n extend(CommonOptionsBuilder, superClass);\n\n function CommonOptionsBuilder() {\n this.watchProps = bind(this.watchProps, this);\n this.buildOpts = bind(this.buildOpts, this);\n return CommonOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n CommonOptionsBuilder.prototype.props = [\n 'clickable', 'draggable', 'editable', 'visible', {\n prop: 'stroke',\n isColl: true\n }\n ];\n\n CommonOptionsBuilder.prototype.getCorrectModel = function(scope) {\n if (angular.isDefined(scope != null ? scope.model : void 0)) {\n return scope.model;\n } else {\n return scope;\n }\n };\n\n CommonOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) {\n var model, opts, stroke;\n if (customOpts == null) {\n customOpts = {};\n }\n if (forEachOpts == null) {\n forEachOpts = {};\n }\n if (!this.scope) {\n $log.error('this.scope not defined in CommonOptionsBuilder can not buildOpts');\n return;\n }\n if (!this.gMap) {\n $log.error('this.map not defined in CommonOptionsBuilder can not buildOpts');\n return;\n }\n model = this.getCorrectModel(this.scope);\n stroke = this.scopeOrModelVal('stroke', this.scope, model);\n opts = angular.extend(customOpts, this.DEFAULTS, {\n map: this.gMap,\n strokeColor: stroke != null ? stroke.color : void 0,\n strokeOpacity: stroke != null ? stroke.opacity : void 0,\n strokeWeight: stroke != null ? stroke.weight : void 0\n });\n angular.forEach(angular.extend(forEachOpts, {\n clickable: true,\n draggable: false,\n editable: false,\n \"static\": false,\n fit: false,\n visible: true,\n zIndex: 0,\n icons: []\n }), (function(_this) {\n return function(defaultValue, key) {\n var val;\n val = cachedEval ? cachedEval[key] : _this.scopeOrModelVal(key, _this.scope, model);\n if (angular.isUndefined(val)) {\n return opts[key] = defaultValue;\n } else {\n return opts[key] = model[key];\n }\n };\n })(this));\n if (opts[\"static\"]) {\n opts.editable = false;\n }\n return opts;\n };\n\n CommonOptionsBuilder.prototype.watchProps = function(props) {\n if (props == null) {\n props = this.props;\n }\n return props.forEach((function(_this) {\n return function(prop) {\n if ((_this.attrs[prop] != null) || (_this.attrs[prop != null ? prop.prop : void 0] != null)) {\n if (prop != null ? prop.isColl : void 0) {\n return _this.scope.$watchCollection(prop.prop, _this.setMyOptions);\n } else {\n return _this.scope.$watch(prop, _this.setMyOptions);\n }\n }\n };\n })(this));\n };\n\n return CommonOptionsBuilder;\n\n })(ModelKey);\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.options.builders').factory('uiGmapPolylineOptionsBuilder', [\n 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) {\n var PolylineOptionsBuilder;\n return PolylineOptionsBuilder = (function(superClass) {\n extend(PolylineOptionsBuilder, superClass);\n\n function PolylineOptionsBuilder() {\n return PolylineOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n PolylineOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) {\n return PolylineOptionsBuilder.__super__.buildOpts.call(this, {\n path: pathPoints\n }, cachedEval, {\n geodesic: false\n });\n };\n\n return PolylineOptionsBuilder;\n\n })(CommonOptionsBuilder);\n }\n ]).factory('uiGmapShapeOptionsBuilder', [\n 'uiGmapCommonOptionsBuilder', function(CommonOptionsBuilder) {\n var ShapeOptionsBuilder;\n return ShapeOptionsBuilder = (function(superClass) {\n extend(ShapeOptionsBuilder, superClass);\n\n function ShapeOptionsBuilder() {\n return ShapeOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n ShapeOptionsBuilder.prototype.buildOpts = function(customOpts, cachedEval, forEachOpts) {\n var fill, model;\n model = this.getCorrectModel(this.scope);\n fill = cachedEval ? cachedEval['fill'] : this.scopeOrModelVal('fill', this.scope, model);\n customOpts = angular.extend(customOpts, {\n fillColor: fill != null ? fill.color : void 0,\n fillOpacity: fill != null ? fill.opacity : void 0\n });\n return ShapeOptionsBuilder.__super__.buildOpts.call(this, customOpts, cachedEval, forEachOpts);\n };\n\n return ShapeOptionsBuilder;\n\n })(CommonOptionsBuilder);\n }\n ]).factory('uiGmapPolygonOptionsBuilder', [\n 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) {\n var PolygonOptionsBuilder;\n return PolygonOptionsBuilder = (function(superClass) {\n extend(PolygonOptionsBuilder, superClass);\n\n function PolygonOptionsBuilder() {\n return PolygonOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n PolygonOptionsBuilder.prototype.buildOpts = function(pathPoints, cachedEval) {\n return PolygonOptionsBuilder.__super__.buildOpts.call(this, {\n path: pathPoints\n }, cachedEval, {\n geodesic: false\n });\n };\n\n return PolygonOptionsBuilder;\n\n })(ShapeOptionsBuilder);\n }\n ]).factory('uiGmapRectangleOptionsBuilder', [\n 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) {\n var RectangleOptionsBuilder;\n return RectangleOptionsBuilder = (function(superClass) {\n extend(RectangleOptionsBuilder, superClass);\n\n function RectangleOptionsBuilder() {\n return RectangleOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n RectangleOptionsBuilder.prototype.buildOpts = function(bounds, cachedEval) {\n return RectangleOptionsBuilder.__super__.buildOpts.call(this, {\n bounds: bounds\n }, cachedEval);\n };\n\n return RectangleOptionsBuilder;\n\n })(ShapeOptionsBuilder);\n }\n ]).factory('uiGmapCircleOptionsBuilder', [\n 'uiGmapShapeOptionsBuilder', function(ShapeOptionsBuilder) {\n var CircleOptionsBuilder;\n return CircleOptionsBuilder = (function(superClass) {\n extend(CircleOptionsBuilder, superClass);\n\n function CircleOptionsBuilder() {\n return CircleOptionsBuilder.__super__.constructor.apply(this, arguments);\n }\n\n CircleOptionsBuilder.prototype.buildOpts = function(center, radius, cachedEval) {\n return CircleOptionsBuilder.__super__.buildOpts.call(this, {\n center: center,\n radius: radius\n }, cachedEval);\n };\n\n return CircleOptionsBuilder;\n\n })(ShapeOptionsBuilder);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api.options').service('uiGmapMarkerOptions', [\n 'uiGmapLogger', 'uiGmapGmapUtil', function($log, GmapUtil) {\n return _.extend(GmapUtil, {\n createOptions: function(coords, icon, defaults, map) {\n var opts;\n if (defaults == null) {\n defaults = {};\n }\n opts = angular.extend({}, defaults, {\n position: defaults.position != null ? defaults.position : GmapUtil.getCoords(coords),\n visible: defaults.visible != null ? defaults.visible : GmapUtil.validateCoords(coords)\n });\n if ((defaults.icon != null) || (icon != null)) {\n opts = angular.extend(opts, {\n icon: defaults.icon != null ? defaults.icon : icon\n });\n }\n if (map != null) {\n opts.map = map;\n }\n return opts;\n },\n isLabel: function(options) {\n if (options == null) {\n return false;\n }\n return (options.labelContent != null) || (options.labelAnchor != null) || (options.labelClass != null) || (options.labelStyle != null) || (options.labelVisible != null);\n }\n });\n }\n ]);\n\n}).call(this);\n","\n/*global _,angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapBasePolyChildModel', [\n 'uiGmapLogger', '$timeout', 'uiGmaparray-sync', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function($log, $timeout, arraySync, GmapUtil, EventsHelper) {\n return function(Builder, gFactory) {\n var BasePolyChildModel;\n return BasePolyChildModel = (function(superClass) {\n extend(BasePolyChildModel, superClass);\n\n BasePolyChildModel.include(GmapUtil);\n\n function BasePolyChildModel(arg) {\n var create, gObjectChangeCb, ref;\n this.scope = arg.scope, this.attrs = arg.attrs, this.gMap = arg.gMap, this.defaults = arg.defaults, this.model = arg.model, gObjectChangeCb = arg.gObjectChangeCb, this.isScopeModel = (ref = arg.isScopeModel) != null ? ref : false;\n this.clean = bind(this.clean, this);\n if (this.isScopeModel) {\n this.clonedModel = _.clone(this.model, true);\n }\n this.isDragging = false;\n this.internalEvents = {\n dragend: (function(_this) {\n return function() {\n return _.defer(function() {\n return _this.isDragging = false;\n });\n };\n })(this),\n dragstart: (function(_this) {\n return function() {\n return _this.isDragging = true;\n };\n })(this)\n };\n create = (function(_this) {\n return function() {\n var maybeCachedEval;\n if (_this.isDragging) {\n return;\n }\n _this.pathPoints = _this.convertPathPoints(_this.scope.path);\n if (_this.gObject != null) {\n _this.clean();\n }\n if (_this.scope.model != null) {\n maybeCachedEval = _this.scope;\n }\n if (_this.pathPoints.length > 0) {\n _this.gObject = gFactory(_this.buildOpts(_this.pathPoints, maybeCachedEval));\n }\n if (_this.gObject) {\n arraySync(_this.gObject.getPath(), _this.scope, 'path', function(pathPoints) {\n _this.pathPoints = pathPoints;\n if (gObjectChangeCb != null) {\n return gObjectChangeCb();\n }\n });\n if (angular.isDefined(_this.scope.events) && angular.isObject(_this.scope.events)) {\n _this.listeners = _this.model ? EventsHelper.setEvents(_this.gObject, _this.scope, _this.model) : EventsHelper.setEvents(_this.gObject, _this.scope, _this.scope);\n }\n return _this.internalListeners = _this.model ? EventsHelper.setEvents(_this.gObject, {\n events: _this.internalEvents\n }, _this.model) : EventsHelper.setEvents(_this.gObject, {\n events: _this.internalEvents\n }, _this.scope);\n }\n };\n })(this);\n create();\n this.scope.$watch('path', (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue) || !_this.gObject) {\n return create();\n }\n };\n })(this), true);\n if (!this.scope[\"static\"] && angular.isDefined(this.scope.editable)) {\n this.scope.$watch('editable', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n newValue = !_this.isFalse(newValue);\n return (ref1 = _this.gObject) != null ? ref1.setEditable(newValue) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.draggable)) {\n this.scope.$watch('draggable', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n newValue = !_this.isFalse(newValue);\n return (ref1 = _this.gObject) != null ? ref1.setDraggable(newValue) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.visible)) {\n this.scope.$watch('visible', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n newValue = !_this.isFalse(newValue);\n }\n return (ref1 = _this.gObject) != null ? ref1.setVisible(newValue) : void 0;\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.geodesic)) {\n this.scope.$watch('geodesic', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n newValue = !_this.isFalse(newValue);\n return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.weight)) {\n this.scope.$watch('stroke.weight', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.color)) {\n this.scope.$watch('stroke.color', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.stroke) && angular.isDefined(this.scope.stroke.opacity)) {\n this.scope.$watch('stroke.opacity', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0;\n }\n };\n })(this), true);\n }\n if (angular.isDefined(this.scope.icons)) {\n this.scope.$watch('icons', (function(_this) {\n return function(newValue, oldValue) {\n var ref1;\n if (newValue !== oldValue) {\n return (ref1 = _this.gObject) != null ? ref1.setOptions(_this.buildOpts(_this.gObject.getPath())) : void 0;\n }\n };\n })(this), true);\n }\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n _this.clean();\n return _this.scope = null;\n };\n })(this));\n if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.color)) {\n this.scope.$watch('fill.color', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath()));\n }\n };\n })(this));\n }\n if (angular.isDefined(this.scope.fill) && angular.isDefined(this.scope.fill.opacity)) {\n this.scope.$watch('fill.opacity', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath()));\n }\n };\n })(this));\n }\n if (angular.isDefined(this.scope.zIndex)) {\n this.scope.$watch('zIndex', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.gObject.setOptions(_this.buildOpts(_this.gObject.getPath()));\n }\n };\n })(this));\n }\n }\n\n BasePolyChildModel.prototype.clean = function() {\n var ref;\n EventsHelper.removeEvents(this.listeners);\n EventsHelper.removeEvents(this.internalListeners);\n if ((ref = this.gObject) != null) {\n ref.setMap(null);\n }\n return this.gObject = null;\n };\n\n return BasePolyChildModel;\n\n })(Builder);\n };\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicholas McCready - https://twitter.com/nmccready\nOriginal idea from: http://stackoverflow.com/questions/22758950/google-map-drawing-freehand , &\n http://jsfiddle.net/YsQdh/88/\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapDrawFreeHandChildModel', [\n 'uiGmapLogger', '$q', function($log, $q) {\n var drawFreeHand, freeHandMgr;\n drawFreeHand = function(map, polys, done) {\n var move, poly;\n poly = new google.maps.Polyline({\n map: map,\n clickable: false\n });\n move = google.maps.event.addListener(map, 'mousemove', function(e) {\n return poly.getPath().push(e.latLng);\n });\n google.maps.event.addListenerOnce(map, 'mouseup', function(e) {\n var path;\n google.maps.event.removeListener(move);\n path = poly.getPath();\n poly.setMap(null);\n polys.push(new google.maps.Polygon({\n map: map,\n path: path\n }));\n poly = null;\n google.maps.event.clearListeners(map.getDiv(), 'mousedown');\n return done();\n });\n return void 0;\n };\n freeHandMgr = function(map1, scope) {\n var disableMap, enableMap;\n this.map = map1;\n disableMap = (function(_this) {\n return function() {\n var mapOptions;\n mapOptions = {\n draggable: false,\n disableDefaultUI: true,\n scrollwheel: false,\n disableDoubleClickZoom: false\n };\n $log.info('disabling map move');\n return _this.map.setOptions(mapOptions);\n };\n })(this);\n enableMap = (function(_this) {\n return function() {\n var mapOptions, ref;\n mapOptions = {\n draggable: true,\n disableDefaultUI: false,\n scrollwheel: true,\n disableDoubleClickZoom: true\n };\n if ((ref = _this.deferred) != null) {\n ref.resolve();\n }\n return _.defer(function() {\n return _this.map.setOptions(_.extend(mapOptions, scope.options));\n });\n };\n })(this);\n this.engage = (function(_this) {\n return function(polys1) {\n _this.polys = polys1;\n _this.deferred = $q.defer();\n disableMap();\n $log.info('DrawFreeHandChildModel is engaged (drawing).');\n google.maps.event.addDomListener(_this.map.getDiv(), 'mousedown', function(e) {\n return drawFreeHand(_this.map, _this.polys, enableMap);\n });\n return _this.deferred.promise;\n };\n })(this);\n return this;\n };\n return freeHandMgr;\n }\n ]);\n\n}).call(this);\n","\n/*global _:true,angular:true,google:true, RichMarker:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapMarkerChildModel', [\n 'uiGmapModelKey', 'uiGmapGmapUtil', 'uiGmapLogger', 'uiGmapEventsHelper', 'uiGmapPropertyAction', 'uiGmapMarkerOptions', 'uiGmapIMarker', 'uiGmapMarkerManager', 'uiGmapPromise', function(ModelKey, GmapUtil, $log, EventsHelper, PropertyAction, MarkerOptions, IMarker, MarkerManager, uiGmapPromise) {\n var MarkerChildModel;\n MarkerChildModel = (function(superClass) {\n var destroy;\n\n extend(MarkerChildModel, superClass);\n\n MarkerChildModel.include(GmapUtil);\n\n MarkerChildModel.include(EventsHelper);\n\n MarkerChildModel.include(MarkerOptions);\n\n destroy = function(child) {\n if ((child != null ? child.gObject : void 0) != null) {\n child.removeEvents(child.externalListeners);\n child.removeEvents(child.internalListeners);\n if (child != null ? child.gObject : void 0) {\n if (child.removeFromManager) {\n child.gManager.remove(child.gObject);\n }\n child.gObject.setMap(null);\n return child.gObject = null;\n }\n }\n };\n\n function MarkerChildModel(opts) {\n this.internalEvents = bind(this.internalEvents, this);\n this.setLabelOptions = bind(this.setLabelOptions, this);\n this.setOptions = bind(this.setOptions, this);\n this.setIcon = bind(this.setIcon, this);\n this.setCoords = bind(this.setCoords, this);\n this.isNotValid = bind(this.isNotValid, this);\n this.maybeSetScopeValue = bind(this.maybeSetScopeValue, this);\n this.createMarker = bind(this.createMarker, this);\n this.setMyScope = bind(this.setMyScope, this);\n this.updateModel = bind(this.updateModel, this);\n this.handleModelChanges = bind(this.handleModelChanges, this);\n this.destroy = bind(this.destroy, this);\n var action, ref, ref1, ref2, ref3, ref4, scope;\n scope = opts.scope, this.model = opts.model, this.keys = opts.keys, this.gMap = opts.gMap, this.defaults = (ref = opts.defaults) != null ? ref : {}, this.doClick = opts.doClick, this.gManager = opts.gManager, this.doDrawSelf = (ref1 = opts.doDrawSelf) != null ? ref1 : true, this.trackModel = (ref2 = opts.trackModel) != null ? ref2 : true, this.needRedraw = (ref3 = opts.needRedraw) != null ? ref3 : false, this.isScopeModel = (ref4 = opts.isScopeModel) != null ? ref4 : false;\n if (this.isScopeModel) {\n this.clonedModel = _.clone(this.model, true);\n }\n this.deferred = uiGmapPromise.defer();\n _.each(this.keys, (function(_this) {\n return function(v, k) {\n var keyValue;\n keyValue = _this.keys[k];\n if ((keyValue != null) && !_.isFunction(keyValue) && _.isString(keyValue)) {\n return _this[k + 'Key'] = keyValue;\n }\n };\n })(this));\n this.idKey = this.idKeyKey || 'id';\n if (this.model[this.idKey] != null) {\n this.id = this.model[this.idKey];\n }\n MarkerChildModel.__super__.constructor.call(this, scope);\n this.scope.getGMarker = (function(_this) {\n return function() {\n return _this.gObject;\n };\n })(this);\n this.firstTime = true;\n if (this.trackModel) {\n this.scope.model = this.model;\n this.scope.$watch('model', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.handleModelChanges(newValue, oldValue);\n }\n };\n })(this), true);\n } else {\n action = new PropertyAction((function(_this) {\n return function(calledKey) {\n if (_.isFunction(calledKey)) {\n calledKey = 'all';\n }\n if (!_this.firstTime) {\n return _this.setMyScope(calledKey, scope);\n }\n };\n })(this), false);\n _.each(this.keys, function(v, k) {\n return scope.$watch(k, action.sic(k), true);\n });\n }\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n return destroy(_this);\n };\n })(this));\n this.createMarker(this.model);\n $log.info(this);\n }\n\n MarkerChildModel.prototype.destroy = function(removeFromManager) {\n if (removeFromManager == null) {\n removeFromManager = true;\n }\n this.removeFromManager = removeFromManager;\n return this.scope.$destroy();\n };\n\n MarkerChildModel.prototype.handleModelChanges = function(newValue, oldValue) {\n var changes, ctr, len;\n changes = this.getChanges(newValue, oldValue, IMarker.keys);\n if (!this.firstTime) {\n ctr = 0;\n len = _.keys(changes).length;\n return _.each(changes, (function(_this) {\n return function(v, k) {\n var doDraw;\n ctr += 1;\n doDraw = len === ctr;\n _this.setMyScope(k, newValue, oldValue, false, true, doDraw);\n return _this.needRedraw = true;\n };\n })(this));\n }\n };\n\n MarkerChildModel.prototype.updateModel = function(model) {\n if (this.isScopeModel) {\n this.clonedModel = _.clone(model, true);\n }\n return this.setMyScope('all', model, this.model);\n };\n\n MarkerChildModel.prototype.renderGMarker = function(doDraw, validCb) {\n var coords, isSpiderfied, ref;\n if (doDraw == null) {\n doDraw = true;\n }\n coords = this.getProp('coords', this.scope, this.model);\n if (((ref = this.gManager) != null ? ref.isSpiderfied : void 0) != null) {\n isSpiderfied = this.gManager.isSpiderfied();\n }\n if (coords != null) {\n if (!this.validateCoords(coords)) {\n $log.debug('MarkerChild does not have coords yet. They may be defined later.');\n return;\n }\n if (validCb != null) {\n validCb();\n }\n if (doDraw && this.gObject) {\n this.gManager.add(this.gObject);\n }\n if (isSpiderfied) {\n return this.gManager.markerSpiderfier.spiderListener(this.gObject, window.event);\n }\n } else {\n if (doDraw && this.gObject) {\n return this.gManager.remove(this.gObject);\n }\n }\n };\n\n MarkerChildModel.prototype.setMyScope = function(thingThatChanged, model, oldModel, isInit, doDraw) {\n var justCreated;\n if (oldModel == null) {\n oldModel = void 0;\n }\n if (isInit == null) {\n isInit = false;\n }\n if (doDraw == null) {\n doDraw = true;\n }\n if (model == null) {\n model = this.model;\n } else {\n this.model = model;\n }\n if (!this.gObject) {\n this.setOptions(this.scope, doDraw);\n justCreated = true;\n }\n switch (thingThatChanged) {\n case 'all':\n return _.each(this.keys, (function(_this) {\n return function(v, k) {\n return _this.setMyScope(k, model, oldModel, isInit, doDraw);\n };\n })(this));\n case 'icon':\n return this.maybeSetScopeValue({\n gSetter: this.setIcon,\n doDraw: doDraw\n });\n case 'coords':\n return this.maybeSetScopeValue({\n gSetter: this.setCoords,\n doDraw: doDraw\n });\n case 'options':\n if (!justCreated) {\n return this.createMarker(model, oldModel, isInit, doDraw);\n }\n }\n };\n\n MarkerChildModel.prototype.createMarker = function(model, oldModel, isInit, doDraw) {\n if (oldModel == null) {\n oldModel = void 0;\n }\n if (isInit == null) {\n isInit = false;\n }\n if (doDraw == null) {\n doDraw = true;\n }\n this.maybeSetScopeValue({\n gSetter: this.setOptions,\n doDraw: doDraw\n });\n return this.firstTime = false;\n };\n\n MarkerChildModel.prototype.maybeSetScopeValue = function(arg) {\n var doDraw, gSetter, ref;\n gSetter = arg.gSetter, doDraw = (ref = arg.doDraw) != null ? ref : true;\n if (gSetter != null) {\n gSetter(this.scope, doDraw);\n }\n if (this.doDrawSelf && doDraw) {\n return this.gManager.draw();\n }\n };\n\n MarkerChildModel.prototype.isNotValid = function(scope, doCheckGmarker) {\n var hasIdenticalScopes, hasNoGmarker;\n if (doCheckGmarker == null) {\n doCheckGmarker = true;\n }\n hasNoGmarker = !doCheckGmarker ? false : this.gObject === void 0;\n hasIdenticalScopes = !this.trackModel ? scope.$id !== this.scope.$id : false;\n return hasIdenticalScopes || hasNoGmarker;\n };\n\n MarkerChildModel.prototype.setCoords = function(scope, doDraw) {\n if (doDraw == null) {\n doDraw = true;\n }\n if (this.isNotValid(scope) || (this.gObject == null)) {\n return;\n }\n return this.renderGMarker(doDraw, (function(_this) {\n return function() {\n var newGValue, newModelVal, oldGValue;\n newModelVal = _this.getProp('coords', scope, _this.model);\n newGValue = _this.getCoords(newModelVal);\n oldGValue = _this.gObject.getPosition();\n if ((oldGValue != null) && (newGValue != null)) {\n if (newGValue.lng() === oldGValue.lng() && newGValue.lat() === oldGValue.lat()) {\n return;\n }\n }\n _this.gObject.setPosition(newGValue);\n return _this.gObject.setVisible(_this.validateCoords(newModelVal));\n };\n })(this));\n };\n\n MarkerChildModel.prototype.setIcon = function(scope, doDraw) {\n if (doDraw == null) {\n doDraw = true;\n }\n if (this.isNotValid(scope) || (this.gObject == null)) {\n return;\n }\n return this.renderGMarker(doDraw, (function(_this) {\n return function() {\n var coords, newValue, oldValue;\n oldValue = _this.gObject.getIcon();\n newValue = _this.getProp('icon', scope, _this.model);\n if (oldValue === newValue) {\n return;\n }\n _this.gObject.setIcon(newValue);\n coords = _this.getProp('coords', scope, _this.model);\n _this.gObject.setPosition(_this.getCoords(coords));\n return _this.gObject.setVisible(_this.validateCoords(coords));\n };\n })(this));\n };\n\n MarkerChildModel.prototype.setOptions = function(scope, doDraw) {\n var ref;\n if (doDraw == null) {\n doDraw = true;\n }\n if (this.isNotValid(scope, false)) {\n return;\n }\n this.renderGMarker(doDraw, (function(_this) {\n return function() {\n var _options, coords, icon;\n coords = _this.getProp('coords', scope, _this.model);\n icon = _this.getProp('icon', scope, _this.model);\n _options = _this.getProp('options', scope, _this.model);\n _this.opts = _this.createOptions(coords, icon, _options);\n if (_this.isLabel(_this.gObject) !== _this.isLabel(_this.opts) && (_this.gObject != null)) {\n _this.gManager.remove(_this.gObject);\n _this.gObject = void 0;\n }\n if (_this.gObject != null) {\n _this.gObject.setOptions(_this.setLabelOptions(_this.opts));\n }\n if (!_this.gObject) {\n if (_this.isLabel(_this.opts)) {\n _this.gObject = new MarkerWithLabel(_this.setLabelOptions(_this.opts));\n } else if (_this.opts.content) {\n _this.gObject = new RichMarker(_this.opts);\n _this.gObject.getIcon = _this.gObject.getContent;\n _this.gObject.setIcon = _this.gObject.setContent;\n } else {\n _this.gObject = new google.maps.Marker(_this.opts);\n }\n _.extend(_this.gObject, {\n model: _this.model\n });\n }\n if (_this.externalListeners) {\n _this.removeEvents(_this.externalListeners);\n }\n if (_this.internalListeners) {\n _this.removeEvents(_this.internalListeners);\n }\n _this.externalListeners = _this.setEvents(_this.gObject, _this.scope, _this.model, ['dragend']);\n _this.internalListeners = _this.setEvents(_this.gObject, {\n events: _this.internalEvents(),\n $evalAsync: function() {}\n }, _this.model);\n if (_this.id != null) {\n return _this.gObject.key = _this.id;\n }\n };\n })(this));\n if (this.gObject && (this.gObject.getMap() || this.gManager.type !== MarkerManager.type)) {\n this.deferred.resolve(this.gObject);\n } else {\n if (!this.gObject) {\n return this.deferred.reject('gObject is null');\n }\n if (!(((ref = this.gObject) != null ? ref.getMap() : void 0) && this.gManager.type === MarkerManager.type)) {\n $log.debug('gObject has no map yet');\n this.deferred.resolve(this.gObject);\n }\n }\n if (this.model[this.fitKey]) {\n return this.gManager.fit();\n }\n };\n\n MarkerChildModel.prototype.setLabelOptions = function(opts) {\n if (opts.labelAnchor) {\n opts.labelAnchor = this.getLabelPositionPoint(opts.labelAnchor);\n }\n return opts;\n };\n\n MarkerChildModel.prototype.internalEvents = function() {\n return {\n dragend: (function(_this) {\n return function(marker, eventName, model, mousearg) {\n var events, modelToSet, newCoords;\n modelToSet = _this.trackModel ? _this.scope.model : _this.model;\n newCoords = _this.setCoordsFromEvent(_this.modelOrKey(modelToSet, _this.coordsKey), _this.gObject.getPosition());\n modelToSet = _this.setVal(model, _this.coordsKey, newCoords);\n events = _this.scope.events;\n if ((events != null ? events.dragend : void 0) != null) {\n events.dragend(marker, eventName, modelToSet, mousearg);\n }\n return _this.scope.$apply();\n };\n })(this),\n click: (function(_this) {\n return function(marker, eventName, model, mousearg) {\n var click;\n click = _this.getProp('click', _this.scope, _this.model);\n if (_this.doClick && angular.isFunction(click)) {\n return _this.scope.$evalAsync(click(marker, eventName, _this.model, mousearg));\n }\n };\n })(this)\n };\n };\n\n return MarkerChildModel;\n\n })(ModelKey);\n return MarkerChildModel;\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygonChildModel', [\n 'uiGmapBasePolyChildModel', 'uiGmapPolygonOptionsBuilder', function(BaseGen, Builder) {\n var PolygonChildModel, base, gFactory;\n gFactory = function(opts) {\n return new google.maps.Polygon(opts);\n };\n base = new BaseGen(Builder, gFactory);\n return PolygonChildModel = (function(superClass) {\n extend(PolygonChildModel, superClass);\n\n function PolygonChildModel() {\n return PolygonChildModel.__super__.constructor.apply(this, arguments);\n }\n\n return PolygonChildModel;\n\n })(base);\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylineChildModel', [\n 'uiGmapBasePolyChildModel', 'uiGmapPolylineOptionsBuilder', function(BaseGen, Builder) {\n var PolylineChildModel, base, gFactory;\n gFactory = function(opts) {\n return new google.maps.Polyline(opts);\n };\n base = BaseGen(Builder, gFactory);\n return PolylineChildModel = (function(superClass) {\n extend(PolylineChildModel, superClass);\n\n function PolylineChildModel() {\n return PolylineChildModel.__super__.constructor.apply(this, arguments);\n }\n\n return PolylineChildModel;\n\n })(base);\n }\n ]);\n\n}).call(this);\n","\n/*global _:true,angular:true,google:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.child').factory('uiGmapWindowChildModel', [\n 'uiGmapBaseObject', 'uiGmapGmapUtil', 'uiGmapLogger', '$compile', '$http', '$templateCache', 'uiGmapChromeFixes', 'uiGmapEventsHelper', function(BaseObject, GmapUtil, $log, $compile, $http, $templateCache, ChromeFixes, EventsHelper) {\n var WindowChildModel;\n WindowChildModel = (function(superClass) {\n extend(WindowChildModel, superClass);\n\n WindowChildModel.include(GmapUtil);\n\n WindowChildModel.include(EventsHelper);\n\n function WindowChildModel(opts) {\n this.updateModel = bind(this.updateModel, this);\n this.destroy = bind(this.destroy, this);\n this.remove = bind(this.remove, this);\n this.getLatestPosition = bind(this.getLatestPosition, this);\n this.hideWindow = bind(this.hideWindow, this);\n this.showWindow = bind(this.showWindow, this);\n this.handleClick = bind(this.handleClick, this);\n this.watchOptions = bind(this.watchOptions, this);\n this.watchCoords = bind(this.watchCoords, this);\n this.createGWin = bind(this.createGWin, this);\n this.watchElement = bind(this.watchElement, this);\n this.watchAndDoShow = bind(this.watchAndDoShow, this);\n this.doShow = bind(this.doShow, this);\n var maybeMarker, ref, ref1, ref2, ref3;\n this.model = (ref = opts.model) != null ? ref : {}, this.scope = opts.scope, this.opts = opts.opts, this.isIconVisibleOnClick = opts.isIconVisibleOnClick, this.gMap = opts.gMap, this.markerScope = opts.markerScope, this.element = opts.element, this.needToManualDestroy = (ref1 = opts.needToManualDestroy) != null ? ref1 : false, this.markerIsVisibleAfterWindowClose = (ref2 = opts.markerIsVisibleAfterWindowClose) != null ? ref2 : true, this.isScopeModel = (ref3 = opts.isScopeModel) != null ? ref3 : false;\n if (this.isScopeModel) {\n this.clonedModel = _.clone(this.model, true);\n }\n this.getGmarker = function() {\n var ref4, ref5;\n if (((ref4 = this.markerScope) != null ? ref4['getGMarker'] : void 0) != null) {\n return (ref5 = this.markerScope) != null ? ref5.getGMarker() : void 0;\n }\n };\n this.listeners = [];\n this.createGWin();\n maybeMarker = this.getGmarker();\n if (maybeMarker != null) {\n maybeMarker.setClickable(true);\n }\n this.watchElement();\n this.watchOptions();\n this.watchCoords();\n this.watchAndDoShow();\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n return _this.destroy();\n };\n })(this));\n $log.info(this);\n }\n\n WindowChildModel.prototype.doShow = function(wasOpen) {\n if (this.scope.show === true || wasOpen) {\n return this.showWindow();\n } else {\n return this.hideWindow();\n }\n };\n\n WindowChildModel.prototype.watchAndDoShow = function() {\n if (this.model.show != null) {\n this.scope.show = this.model.show;\n }\n this.scope.$watch('show', this.doShow, true);\n return this.doShow();\n };\n\n WindowChildModel.prototype.watchElement = function() {\n return this.scope.$watch((function(_this) {\n return function() {\n var ref, wasOpen;\n if (!(_this.element || _this.html)) {\n return;\n }\n if (_this.html !== _this.element.html() && _this.gObject) {\n if ((ref = _this.opts) != null) {\n ref.content = void 0;\n }\n wasOpen = _this.gObject.isOpen();\n _this.remove();\n return _this.createGWin(wasOpen);\n }\n };\n })(this));\n };\n\n WindowChildModel.prototype.createGWin = function(isOpen) {\n var _opts, defaults, maybeMarker, ref, ref1;\n if (isOpen == null) {\n isOpen = false;\n }\n maybeMarker = this.getGmarker();\n defaults = {};\n if (this.opts != null) {\n if (this.scope.coords) {\n this.opts.position = this.getCoords(this.scope.coords);\n }\n defaults = this.opts;\n }\n if (this.element) {\n this.html = _.isObject(this.element) ? this.element.html() : this.element;\n }\n _opts = this.scope.options ? this.scope.options : defaults;\n this.opts = this.createWindowOptions(maybeMarker, this.markerScope || this.scope, this.html, _opts);\n if (this.opts != null) {\n if (!this.gObject) {\n if (this.opts.boxClass && (window.InfoBox && typeof window.InfoBox === 'function')) {\n this.gObject = new window.InfoBox(this.opts);\n } else {\n this.gObject = new google.maps.InfoWindow(this.opts);\n }\n this.listeners.push(google.maps.event.addListener(this.gObject, 'domready', function() {\n return ChromeFixes.maybeRepaint(this.content);\n }));\n this.listeners.push(google.maps.event.addListener(this.gObject, 'closeclick', (function(_this) {\n return function() {\n if (maybeMarker) {\n maybeMarker.setAnimation(_this.oldMarkerAnimation);\n if (_this.markerIsVisibleAfterWindowClose) {\n _.delay(function() {\n maybeMarker.setVisible(false);\n return maybeMarker.setVisible(_this.markerIsVisibleAfterWindowClose);\n }, 250);\n }\n }\n _this.gObject.close();\n _this.model.show = false;\n if (_this.scope.closeClick != null) {\n return _this.scope.$evalAsync(_this.scope.closeClick());\n } else {\n return _this.scope.$evalAsync();\n }\n };\n })(this)));\n }\n this.gObject.setContent(this.opts.content);\n this.handleClick(((ref = this.scope) != null ? (ref1 = ref.options) != null ? ref1.forceClick : void 0 : void 0) || isOpen);\n return this.doShow(this.gObject.isOpen());\n }\n };\n\n WindowChildModel.prototype.watchCoords = function() {\n var scope;\n scope = this.markerScope != null ? this.markerScope : this.scope;\n return scope.$watch('coords', (function(_this) {\n return function(newValue, oldValue) {\n var pos;\n if (newValue !== oldValue) {\n if (newValue == null) {\n _this.hideWindow();\n } else if (!_this.validateCoords(newValue)) {\n $log.error(\"WindowChildMarker cannot render marker as scope.coords as no position on marker: \" + (JSON.stringify(_this.model)));\n return;\n }\n pos = _this.getCoords(newValue);\n _this.doShow();\n _this.gObject.setPosition(pos);\n if (_this.opts) {\n return _this.opts.position = pos;\n }\n }\n };\n })(this), true);\n };\n\n WindowChildModel.prototype.watchOptions = function() {\n return this.scope.$watch('options', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n _this.opts = newValue;\n if (_this.gObject != null) {\n _this.gObject.setOptions(_this.opts);\n if ((_this.opts.visible != null) && _this.opts.visible) {\n return _this.showWindow();\n } else if (_this.opts.visible != null) {\n return _this.hideWindow();\n }\n }\n }\n };\n })(this), true);\n };\n\n WindowChildModel.prototype.handleClick = function(forceClick) {\n var click, maybeMarker;\n if (this.gObject == null) {\n return;\n }\n maybeMarker = this.getGmarker();\n click = (function(_this) {\n return function() {\n if (_this.gObject == null) {\n _this.createGWin();\n }\n _this.showWindow();\n if (maybeMarker != null) {\n _this.initialMarkerVisibility = maybeMarker.getVisible();\n _this.oldMarkerAnimation = maybeMarker.getAnimation();\n return maybeMarker.setVisible(_this.isIconVisibleOnClick);\n }\n };\n })(this);\n if (forceClick) {\n click();\n }\n if (maybeMarker) {\n return this.listeners = this.listeners.concat(this.setEvents(maybeMarker, {\n events: {\n click: click\n }\n }, this.model));\n }\n };\n\n WindowChildModel.prototype.showWindow = function() {\n var compiled, show, templateScope;\n if (this.gObject == null) {\n return;\n }\n templateScope = null;\n show = (function(_this) {\n return function() {\n var isOpen, maybeMarker, pos;\n if (!_this.gObject.isOpen()) {\n maybeMarker = _this.getGmarker();\n if ((_this.gObject != null) && (_this.gObject.getPosition != null)) {\n pos = _this.gObject.getPosition();\n }\n if (maybeMarker) {\n pos = maybeMarker.getPosition();\n }\n if (!pos) {\n return;\n }\n _this.gObject.open(_this.gMap, maybeMarker);\n isOpen = _this.gObject.isOpen();\n if (_this.model.show !== isOpen) {\n return _this.model.show = isOpen;\n }\n }\n };\n })(this);\n if (this.scope.templateUrl) {\n $http.get(this.scope.templateUrl, {\n cache: $templateCache\n }).then((function(_this) {\n return function(content) {\n var compiled;\n templateScope = _this.scope.$new();\n if (angular.isDefined(_this.scope.templateParameter)) {\n templateScope.parameter = _this.scope.templateParameter;\n }\n compiled = $compile(content.data)(templateScope);\n _this.gObject.setContent(compiled[0]);\n return show();\n };\n })(this));\n } else if (this.scope.template) {\n templateScope = this.scope.$new();\n if (angular.isDefined(this.scope.templateParameter)) {\n templateScope.parameter = this.scope.templateParameter;\n }\n compiled = $compile(this.scope.template)(templateScope);\n this.gObject.setContent(compiled[0]);\n show();\n } else {\n show();\n }\n return this.scope.$on('destroy', function() {\n return templateScope.$destroy();\n });\n };\n\n WindowChildModel.prototype.hideWindow = function() {\n if ((this.gObject != null) && this.gObject.isOpen()) {\n return this.gObject.close();\n }\n };\n\n WindowChildModel.prototype.getLatestPosition = function(overridePos) {\n var maybeMarker;\n maybeMarker = this.getGmarker();\n if ((this.gObject != null) && (maybeMarker != null) && !overridePos) {\n return this.gObject.setPosition(maybeMarker.getPosition());\n } else {\n if (overridePos) {\n return this.gObject.setPosition(overridePos);\n }\n }\n };\n\n WindowChildModel.prototype.remove = function() {\n this.hideWindow();\n this.removeEvents(this.listeners);\n this.listeners.length = 0;\n delete this.gObject;\n return delete this.opts;\n };\n\n WindowChildModel.prototype.destroy = function(manualOverride) {\n var ref;\n if (manualOverride == null) {\n manualOverride = false;\n }\n this.remove();\n if (((this.scope != null) && !((ref = this.scope) != null ? ref.$$destroyed : void 0)) && (this.needToManualDestroy || manualOverride)) {\n return this.scope.$destroy();\n }\n };\n\n WindowChildModel.prototype.updateModel = function(model) {\n if (this.isScopeModel) {\n this.clonedModel = _.clone(model, true);\n }\n return _.extend(this.model, this.clonedModel || model);\n };\n\n return WindowChildModel;\n\n })(BaseObject);\n return WindowChildModel;\n }\n ]);\n\n}).call(this);\n","\n/*global _, angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapBasePolysParentModel', [\n '$timeout', 'uiGmapLogger', 'uiGmapModelKey', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmap_async', 'uiGmapPromise', 'uiGmapFitHelper', function($timeout, $log, ModelKey, ModelsWatcher, PropMap, _async, uiGmapPromise, FitHelper) {\n return function(IPoly, PolyChildModel, gObjectName) {\n var BasePolysParentModel;\n return BasePolysParentModel = (function(superClass) {\n extend(BasePolysParentModel, superClass);\n\n BasePolysParentModel.include(ModelsWatcher);\n\n function BasePolysParentModel(scope, element, attrs, gMap1, defaults) {\n this.element = element;\n this.attrs = attrs;\n this.gMap = gMap1;\n this.defaults = defaults;\n this.maybeFit = bind(this.maybeFit, this);\n this.createChild = bind(this.createChild, this);\n this.pieceMeal = bind(this.pieceMeal, this);\n this.createAllNew = bind(this.createAllNew, this);\n this.watchIdKey = bind(this.watchIdKey, this);\n this.createChildScopes = bind(this.createChildScopes, this);\n this.watchDestroy = bind(this.watchDestroy, this);\n this.onDestroy = bind(this.onDestroy, this);\n this.rebuildAll = bind(this.rebuildAll, this);\n this.doINeedToWipe = bind(this.doINeedToWipe, this);\n this.watchModels = bind(this.watchModels, this);\n BasePolysParentModel.__super__.constructor.call(this, scope);\n this[\"interface\"] = IPoly;\n this.$log = $log;\n this.plurals = new PropMap();\n _.each(IPoly.scopeKeys, (function(_this) {\n return function(name) {\n return _this[name + 'Key'] = void 0;\n };\n })(this));\n this.models = void 0;\n this.firstTime = true;\n this.$log.info(this);\n this.createChildScopes();\n }\n\n BasePolysParentModel.prototype.watchModels = function(scope) {\n\n /*\n This was watchCollection but not all model changes were being caught.\n TODO: Make the directive flexible in overriding whether we watch models (and depth) via watch or watchColleciton.\n */\n return scope.$watch('models', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n if (_this.doINeedToWipe(newValue) || scope.doRebuildAll) {\n return _this.rebuildAll(scope, true, true);\n } else {\n return _this.createChildScopes(false);\n }\n }\n };\n })(this), true);\n };\n\n BasePolysParentModel.prototype.doINeedToWipe = function(newValue) {\n var newValueIsEmpty;\n newValueIsEmpty = newValue != null ? newValue.length === 0 : true;\n return this.plurals.length > 0 && newValueIsEmpty;\n };\n\n BasePolysParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) {\n return this.onDestroy(doDelete).then((function(_this) {\n return function() {\n if (doCreate) {\n return _this.createChildScopes();\n }\n };\n })(this));\n };\n\n BasePolysParentModel.prototype.onDestroy = function() {\n BasePolysParentModel.__super__.onDestroy.call(this, this.scope);\n return _async.promiseLock(this, uiGmapPromise.promiseTypes[\"delete\"], void 0, void 0, (function(_this) {\n return function() {\n return _async.each(_this.plurals.values(), function(child) {\n return child.destroy(true);\n }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() {\n var ref;\n return (ref = _this.plurals) != null ? ref.removeAll() : void 0;\n });\n };\n })(this));\n };\n\n BasePolysParentModel.prototype.watchDestroy = function(scope) {\n return scope.$on('$destroy', (function(_this) {\n return function() {\n return _this.rebuildAll(scope, false, true);\n };\n })(this));\n };\n\n BasePolysParentModel.prototype.createChildScopes = function(isCreatingFromScratch) {\n if (isCreatingFromScratch == null) {\n isCreatingFromScratch = true;\n }\n if (angular.isUndefined(this.scope.models)) {\n this.$log.error(\"No models to create \" + gObjectName + \"s from! I Need direct models!\");\n return;\n }\n if ((this.gMap == null) || (this.scope.models == null)) {\n return;\n }\n this.watchIdKey(this.scope);\n if (isCreatingFromScratch) {\n return this.createAllNew(this.scope, false);\n } else {\n return this.pieceMeal(this.scope, false);\n }\n };\n\n BasePolysParentModel.prototype.watchIdKey = function(scope) {\n this.setIdKey(scope);\n return scope.$watch('idKey', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue && (newValue == null)) {\n _this.idKey = newValue;\n return _this.rebuildAll(scope, true, true);\n }\n };\n })(this));\n };\n\n BasePolysParentModel.prototype.createAllNew = function(scope, isArray) {\n var maybeCanceled;\n if (isArray == null) {\n isArray = false;\n }\n this.models = scope.models;\n if (this.firstTime) {\n this.watchModels(scope);\n this.watchDestroy(scope);\n }\n if (this.didQueueInitPromise(this, scope)) {\n return;\n }\n maybeCanceled = null;\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return _async.map(scope.models, function(model) {\n var child;\n child = _this.createChild(model, _this.gMap);\n if (maybeCanceled) {\n $log.debug('createNew should fall through safely');\n child.isEnabled = false;\n }\n maybeCanceled;\n return child.pathPoints.getArray();\n }, _async.chunkSizeFrom(scope.chunk)).then(function(pathPoints) {\n _this.maybeFit(pathPoints);\n return _this.firstTime = false;\n });\n };\n })(this));\n };\n\n BasePolysParentModel.prototype.pieceMeal = function(scope, isArray) {\n var maybeCanceled, payload;\n if (isArray == null) {\n isArray = true;\n }\n if (scope.$$destroyed) {\n return;\n }\n maybeCanceled = null;\n payload = null;\n this.models = scope.models;\n if ((scope != null) && this.modelsLength() && this.plurals.length) {\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return uiGmapPromise.promise(function() {\n return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison);\n }).then(function(state) {\n payload = state;\n if (payload.updates.length) {\n _async.each(payload.updates, function(obj) {\n _.extend(obj.child.scope, obj.model);\n return obj.child.model = obj.model;\n });\n }\n return _async.each(payload.removals, function(child) {\n if (child != null) {\n child.destroy();\n _this.plurals.remove(child.model[_this.idKey]);\n return maybeCanceled;\n }\n }, _async.chunkSizeFrom(scope.chunk));\n }).then(function() {\n return _async.each(payload.adds, function(modelToAdd) {\n if (maybeCanceled) {\n $log.debug('pieceMeal should fall through safely');\n }\n _this.createChild(modelToAdd, _this.gMap);\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk)).then(function() {\n return _this.maybeFit();\n });\n });\n };\n })(this));\n } else {\n this.inProgress = false;\n return this.rebuildAll(this.scope, true, true);\n }\n };\n\n BasePolysParentModel.prototype.createChild = function(model, gMap) {\n var child, childScope;\n childScope = this.scope.$new(false);\n this.setChildScope(IPoly.scopeKeys, childScope, model);\n childScope.$watch('model', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.setChildScope(childScope, newValue);\n }\n };\n })(this), true);\n childScope[\"static\"] = this.scope[\"static\"];\n child = new PolyChildModel({\n isScopeModel: true,\n scope: childScope,\n attrs: this.attrs,\n gMap: gMap,\n defaults: this.defaults,\n model: model,\n gObjectChangeCb: (function(_this) {\n return function() {\n return _this.maybeFit();\n };\n })(this)\n });\n if (model[this.idKey] == null) {\n this.$log.error(gObjectName + \" model has no id to assign a child to.\\nThis is required for performance. Please assign id,\\nor redirect id to a different key.\");\n return;\n }\n this.plurals.put(model[this.idKey], child);\n return child;\n };\n\n BasePolysParentModel.prototype.maybeFit = function(pathPoints) {\n if (pathPoints == null) {\n pathPoints = this.plurals.map(function(p) {\n return p.pathPoints;\n });\n }\n if (this.scope.fit) {\n pathPoints = _.flatten(pathPoints);\n return FitHelper.fit(pathPoints, this.gMap);\n }\n };\n\n return BasePolysParentModel;\n\n })(ModelKey);\n };\n }\n ]);\n\n}).call(this);\n","\n/*globals angular, _, google */\n\n(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapCircleParentModel', [\n 'uiGmapLogger', '$timeout', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapCircleOptionsBuilder', function($log, $timeout, GmapUtil, EventsHelper, Builder) {\n var CircleParentModel, _settingFromDirective;\n _settingFromDirective = function(scope, fn) {\n scope.settingFromDirective = true;\n fn();\n return $timeout(function() {\n return scope.settingFromDirective = false;\n });\n };\n return CircleParentModel = (function(superClass) {\n extend(CircleParentModel, superClass);\n\n CircleParentModel.include(GmapUtil);\n\n CircleParentModel.include(EventsHelper);\n\n function CircleParentModel(scope, element, attrs, gMap, DEFAULTS) {\n var clean, gObject, lastRadius;\n this.attrs = attrs;\n this.gMap = gMap;\n this.DEFAULTS = DEFAULTS;\n this.scope = scope;\n lastRadius = null;\n clean = (function(_this) {\n return function() {\n lastRadius = null;\n if (_this.listeners != null) {\n _this.removeEvents(_this.listeners);\n return _this.listeners = void 0;\n }\n };\n })(this);\n gObject = new google.maps.Circle(this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius));\n this.setMyOptions = (function(_this) {\n return function(newVals, oldVals) {\n if (scope.settingFromDirective) {\n return;\n }\n if (!(_.isEqual(newVals, oldVals) && newVals === oldVals && ((newVals != null) && (oldVals != null) ? newVals.coordinates === oldVals.coordinates : true))) {\n return gObject.setOptions(_this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius));\n }\n };\n })(this);\n this.props = this.props.concat([\n {\n prop: 'center',\n isColl: true\n }, {\n prop: 'fill',\n isColl: true\n }, 'radius', 'zIndex'\n ]);\n this.watchProps();\n if (this.scope.control != null) {\n this.scope.control.getCircle = function() {\n return gObject;\n };\n }\n clean();\n this.listeners = this.setEvents(gObject, scope, scope, ['radius_changed']) || [];\n this.listeners.push(google.maps.event.addListener(gObject, 'radius_changed', function() {\n\n /*\n possible google bug, and or because a circle has two radii\n radius_changed appears to fire twice (original and new) which is not too helpful\n therefore we will check for radius changes manually and bail out if nothing has changed\n */\n var newRadius, work;\n newRadius = gObject.getRadius();\n if (newRadius === lastRadius) {\n return;\n }\n lastRadius = newRadius;\n work = function() {\n return _settingFromDirective(scope, function() {\n var ref, ref1;\n if (newRadius !== scope.radius) {\n scope.radius = newRadius;\n }\n if (((ref = scope.events) != null ? ref.radius_changed : void 0) && _.isFunction((ref1 = scope.events) != null ? ref1.radius_changed : void 0)) {\n return scope.events.radius_changed(gObject, 'radius_changed', scope, arguments);\n }\n });\n };\n if (!angular.mock) {\n return scope.$evalAsync(function() {\n return work();\n });\n } else {\n return work();\n }\n }));\n this.listeners.push(google.maps.event.addListener(gObject, 'center_changed', function() {\n return scope.$evalAsync(function() {\n return _settingFromDirective(scope, function() {\n if (angular.isDefined(scope.center.type)) {\n scope.center.coordinates[1] = gObject.getCenter().lat();\n return scope.center.coordinates[0] = gObject.getCenter().lng();\n } else {\n scope.center.latitude = gObject.getCenter().lat();\n return scope.center.longitude = gObject.getCenter().lng();\n }\n });\n });\n }));\n scope.$on('$destroy', function() {\n clean();\n return gObject.setMap(null);\n });\n $log.info(this);\n }\n\n return CircleParentModel;\n\n })(Builder);\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapDrawingManagerParentModel', [\n 'uiGmapLogger', '$timeout', 'uiGmapBaseObject', 'uiGmapEventsHelper', function($log, $timeout, BaseObject, EventsHelper) {\n var DrawingManagerParentModel;\n return DrawingManagerParentModel = (function(superClass) {\n extend(DrawingManagerParentModel, superClass);\n\n DrawingManagerParentModel.include(EventsHelper);\n\n function DrawingManagerParentModel(scope, element, attrs, map) {\n var gObject, listeners;\n this.scope = scope;\n this.attrs = attrs;\n this.map = map;\n gObject = new google.maps.drawing.DrawingManager(this.scope.options);\n gObject.setMap(this.map);\n listeners = void 0;\n if (this.scope.control != null) {\n this.scope.control.getDrawingManager = function() {\n return gObject;\n };\n }\n if (!this.scope[\"static\"] && this.scope.options) {\n this.scope.$watch('options', function(newValue) {\n return gObject != null ? gObject.setOptions(newValue) : void 0;\n }, true);\n }\n if (this.scope.events != null) {\n listeners = this.setEvents(gObject, this.scope, this.scope);\n this.scope.$watch('events', (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue)) {\n if (listeners != null) {\n _this.removeEvents(listeners);\n }\n return listeners = _this.setEvents(gObject, _this.scope, _this.scope);\n }\n };\n })(this));\n }\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n if (listeners != null) {\n _this.removeEvents(listeners);\n }\n gObject.setMap(null);\n return gObject = null;\n };\n })(this));\n }\n\n return DrawingManagerParentModel;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","\n/*\n\t- interface for all markers to derrive from\n \t- to enforce a minimum set of requirements\n \t\t- attributes\n \t\t\t- coords\n \t\t\t- icon\n\t\t- implementation needed on watches\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api.models.parent\").factory(\"uiGmapIMarkerParentModel\", [\n \"uiGmapModelKey\", \"uiGmapLogger\", function(ModelKey, Logger) {\n var IMarkerParentModel;\n IMarkerParentModel = (function(superClass) {\n extend(IMarkerParentModel, superClass);\n\n IMarkerParentModel.prototype.DEFAULTS = {};\n\n function IMarkerParentModel(scope1, element, attrs, map) {\n this.scope = scope1;\n this.element = element;\n this.attrs = attrs;\n this.map = map;\n this.onWatch = bind(this.onWatch, this);\n this.watch = bind(this.watch, this);\n this.validateScope = bind(this.validateScope, this);\n IMarkerParentModel.__super__.constructor.call(this, this.scope);\n this.$log = Logger;\n if (!this.validateScope(this.scope)) {\n throw new String(\"Unable to construct IMarkerParentModel due to invalid scope\");\n }\n this.doClick = angular.isDefined(this.attrs.click);\n if (this.scope.options != null) {\n this.DEFAULTS = this.scope.options;\n }\n this.watch('coords', this.scope);\n this.watch('icon', this.scope);\n this.watch('options', this.scope);\n this.scope.$on(\"$destroy\", (function(_this) {\n return function() {\n return _this.onDestroy(_this.scope);\n };\n })(this));\n }\n\n IMarkerParentModel.prototype.validateScope = function(scope) {\n var ret;\n if (scope == null) {\n this.$log.error(this.constructor.name + \": invalid scope used\");\n return false;\n }\n ret = scope.coords != null;\n if (!ret) {\n this.$log.error(this.constructor.name + \": no valid coords attribute found\");\n return false;\n }\n return ret;\n };\n\n IMarkerParentModel.prototype.watch = function(propNameToWatch, scope, equalityCheck) {\n if (equalityCheck == null) {\n equalityCheck = true;\n }\n return scope.$watch(propNameToWatch, (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue)) {\n return _this.onWatch(propNameToWatch, scope, newValue, oldValue);\n }\n };\n })(this), equalityCheck);\n };\n\n IMarkerParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) {};\n\n return IMarkerParentModel;\n\n })(ModelKey);\n return IMarkerParentModel;\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api.models.parent\").factory(\"uiGmapIWindowParentModel\", [\n \"uiGmapModelKey\", \"uiGmapGmapUtil\", \"uiGmapLogger\", function(ModelKey, GmapUtil, Logger) {\n var IWindowParentModel;\n return IWindowParentModel = (function(superClass) {\n extend(IWindowParentModel, superClass);\n\n IWindowParentModel.include(GmapUtil);\n\n function IWindowParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache) {\n IWindowParentModel.__super__.constructor.call(this, scope);\n this.$log = Logger;\n this.$timeout = $timeout;\n this.$compile = $compile;\n this.$http = $http;\n this.$templateCache = $templateCache;\n this.DEFAULTS = {};\n if (scope.options != null) {\n this.DEFAULTS = scope.options;\n }\n }\n\n IWindowParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) {\n if (modelsPropToIterate === 'models') {\n return scope[modelsPropToIterate][index];\n }\n return scope[modelsPropToIterate].get(index);\n };\n\n return IWindowParentModel;\n\n })(ModelKey);\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapLayerParentModel', [\n 'uiGmapBaseObject', 'uiGmapLogger', '$timeout', function(BaseObject, Logger, $timeout) {\n var LayerParentModel;\n LayerParentModel = (function(superClass) {\n extend(LayerParentModel, superClass);\n\n function LayerParentModel(scope, element, attrs, gMap, onLayerCreated, $log) {\n this.scope = scope;\n this.element = element;\n this.attrs = attrs;\n this.gMap = gMap;\n this.onLayerCreated = onLayerCreated != null ? onLayerCreated : void 0;\n this.$log = $log != null ? $log : Logger;\n this.createGoogleLayer = bind(this.createGoogleLayer, this);\n if (this.attrs.type == null) {\n this.$log.info('type attribute for the layer directive is mandatory. Layer creation aborted!!');\n return;\n }\n this.createGoogleLayer();\n this.doShow = true;\n if (angular.isDefined(this.attrs.show)) {\n this.doShow = this.scope.show;\n }\n if (this.doShow && (this.gMap != null)) {\n this.gObject.setMap(this.gMap);\n }\n this.scope.$watch('show', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n _this.doShow = newValue;\n if (newValue) {\n return _this.gObject.setMap(_this.gMap);\n } else {\n return _this.gObject.setMap(null);\n }\n }\n };\n })(this), true);\n this.scope.$watch('options', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue && _this.doShow) {\n return _this.gObject.setOptions(newValue);\n }\n };\n })(this), true);\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n return _this.gObject.setMap(null);\n };\n })(this));\n }\n\n LayerParentModel.prototype.createGoogleLayer = function() {\n var base;\n if (this.attrs.options == null) {\n this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type]() : new google.maps[this.attrs.namespace][this.attrs.type]();\n } else {\n this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options);\n }\n if ((this.gObject != null) && this.doShow) {\n this.gObject.setMap(this.gMap);\n }\n if ((this.gObject != null) && (this.onLayerCreated != null)) {\n return typeof (base = this.onLayerCreated(this.scope, this.gObject)) === \"function\" ? base(this.gObject) : void 0;\n }\n };\n\n return LayerParentModel;\n\n })(BaseObject);\n return LayerParentModel;\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapMapTypeParentModel', [\n 'uiGmapBaseObject', 'uiGmapLogger', function(BaseObject, Logger) {\n var MapTypeParentModel;\n MapTypeParentModel = (function(superClass) {\n extend(MapTypeParentModel, superClass);\n\n function MapTypeParentModel(scope, element, attrs, gMap, $log) {\n this.scope = scope;\n this.element = element;\n this.attrs = attrs;\n this.gMap = gMap;\n this.$log = $log != null ? $log : Logger;\n this.hideOverlay = bind(this.hideOverlay, this);\n this.showOverlay = bind(this.showOverlay, this);\n this.refreshMapType = bind(this.refreshMapType, this);\n this.createMapType = bind(this.createMapType, this);\n if (this.attrs.options == null) {\n this.$log.info('options attribute for the map-type directive is mandatory. Map type creation aborted!!');\n return;\n }\n this.id = this.gMap.overlayMapTypesCount = this.gMap.overlayMapTypesCount + 1 || 0;\n this.doShow = true;\n this.createMapType();\n if (angular.isDefined(this.attrs.show)) {\n this.doShow = this.scope.show;\n }\n if (this.doShow && (this.gMap != null)) {\n this.showOverlay();\n }\n this.scope.$watch('show', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n _this.doShow = newValue;\n if (newValue) {\n return _this.showOverlay();\n } else {\n return _this.hideOverlay();\n }\n }\n };\n })(this), true);\n this.scope.$watchCollection('options', (function(_this) {\n return function(newValue, oldValue) {\n var different, mapTypeProps;\n if (!_.isEqual(newValue, oldValue)) {\n mapTypeProps = ['tileSize', 'maxZoom', 'minZoom', 'name', 'alt'];\n different = _.some(mapTypeProps, function(prop) {\n return !oldValue || !newValue || !_.isEqual(newValue[prop], oldValue[prop]);\n });\n if (different) {\n return _this.refreshMapType();\n }\n }\n };\n })(this));\n if (angular.isDefined(this.attrs.refresh)) {\n this.scope.$watch('refresh', (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue)) {\n return _this.refreshMapType();\n }\n };\n })(this), true);\n }\n this.scope.$on('$destroy', (function(_this) {\n return function() {\n _this.hideOverlay();\n return _this.mapType = null;\n };\n })(this));\n }\n\n MapTypeParentModel.prototype.createMapType = function() {\n if (this.scope.options.getTile != null) {\n this.mapType = this.scope.options;\n } else if (this.scope.options.getTileUrl != null) {\n this.mapType = new google.maps.ImageMapType(this.scope.options);\n } else {\n this.$log.info('options should provide either getTile or getTileUrl methods. Map type creation aborted!!');\n return;\n }\n if (this.attrs.id && this.scope.id) {\n this.gMap.mapTypes.set(this.scope.id, this.mapType);\n if (!angular.isDefined(this.attrs.show)) {\n this.doShow = false;\n }\n }\n return this.mapType.layerId = this.id;\n };\n\n MapTypeParentModel.prototype.refreshMapType = function() {\n this.hideOverlay();\n this.mapType = null;\n this.createMapType();\n if (this.doShow && (this.gMap != null)) {\n return this.showOverlay();\n }\n };\n\n MapTypeParentModel.prototype.showOverlay = function() {\n return this.gMap.overlayMapTypes.push(this.mapType);\n };\n\n MapTypeParentModel.prototype.hideOverlay = function() {\n var found;\n found = false;\n return this.gMap.overlayMapTypes.forEach((function(_this) {\n return function(mapType, index) {\n if (!found && mapType.layerId === _this.id) {\n found = true;\n _this.gMap.overlayMapTypes.removeAt(index);\n }\n };\n })(this));\n };\n\n return MapTypeParentModel;\n\n })(BaseObject);\n return MapTypeParentModel;\n }\n ]);\n\n}).call(this);\n","\n/*global _:true,angular:true, */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api.models.parent\").factory(\"uiGmapMarkersParentModel\", [\n \"uiGmapIMarkerParentModel\", \"uiGmapModelsWatcher\", \"uiGmapPropMap\", \"uiGmapMarkerChildModel\", \"uiGmap_async\", \"uiGmapClustererMarkerManager\", \"uiGmapMarkerManager\", \"$timeout\", \"uiGmapIMarker\", \"uiGmapPromise\", \"uiGmapGmapUtil\", \"uiGmapLogger\", \"uiGmapSpiderfierMarkerManager\", function(IMarkerParentModel, ModelsWatcher, PropMap, MarkerChildModel, _async, ClustererMarkerManager, MarkerManager, $timeout, IMarker, uiGmapPromise, GmapUtil, $log, SpiderfierMarkerManager) {\n var MarkersParentModel, _setPlurals;\n _setPlurals = function(val, objToSet) {\n objToSet.plurals = new PropMap();\n objToSet.scope.plurals = objToSet.plurals;\n return objToSet;\n };\n MarkersParentModel = (function(superClass) {\n extend(MarkersParentModel, superClass);\n\n MarkersParentModel.include(GmapUtil);\n\n MarkersParentModel.include(ModelsWatcher);\n\n function MarkersParentModel(scope, element, attrs, map) {\n this.maybeExecMappedEvent = bind(this.maybeExecMappedEvent, this);\n this.onDestroy = bind(this.onDestroy, this);\n this.newChildMarker = bind(this.newChildMarker, this);\n this.pieceMeal = bind(this.pieceMeal, this);\n this.rebuildAll = bind(this.rebuildAll, this);\n this.createAllNew = bind(this.createAllNew, this);\n this.bindToTypeEvents = bind(this.bindToTypeEvents, this);\n this.createChildScopes = bind(this.createChildScopes, this);\n this.validateScope = bind(this.validateScope, this);\n this.onWatch = bind(this.onWatch, this);\n MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map);\n this[\"interface\"] = IMarker;\n _setPlurals(new PropMap(), this);\n this.scope.pluralsUpdate = {\n updateCtr: 0\n };\n this.$log.info(this);\n this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false;\n this.setIdKey(this.scope);\n this.scope.$watch('doRebuildAll', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.doRebuildAll = newValue;\n }\n };\n })(this));\n if (!this.modelsLength()) {\n this.modelsRendered = false;\n }\n this.scope.$watch('models', (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue) || !_this.modelsRendered) {\n if (newValue.length === 0 && oldValue.length === 0) {\n return;\n }\n _this.modelsRendered = true;\n return _this.onWatch('models', _this.scope, newValue, oldValue);\n }\n };\n })(this), !this.isTrue(attrs.modelsbyref));\n this.watch('doCluster', this.scope);\n this.watch('type', this.scope);\n this.watch('clusterOptions', this.scope);\n this.watch('clusterEvents', this.scope);\n this.watch('typeOptions', this.scope);\n this.watch('typeEvents', this.scope);\n this.watch('fit', this.scope);\n this.watch('idKey', this.scope);\n this.gManager = void 0;\n this.createAllNew(this.scope);\n }\n\n MarkersParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) {\n if (propNameToWatch === \"idKey\" && newValue !== oldValue) {\n this.idKey = newValue;\n }\n if (this.doRebuildAll || (propNameToWatch === 'doCluster' || propNameToWatch === 'type')) {\n return this.rebuildAll(scope);\n } else {\n return this.pieceMeal(scope);\n }\n };\n\n MarkersParentModel.prototype.validateScope = function(scope) {\n var modelsNotDefined;\n modelsNotDefined = angular.isUndefined(scope.models) || scope.models === void 0;\n if (modelsNotDefined) {\n this.$log.error(this.constructor.name + \": no valid models attribute found\");\n }\n return MarkersParentModel.__super__.validateScope.call(this, scope) || modelsNotDefined;\n };\n\n\n /*\n Not used internally by this parent\n created for consistency for external control in the API\n */\n\n MarkersParentModel.prototype.createChildScopes = function(isCreatingFromScratch) {\n if ((this.gMap == null) || (this.scope.models == null)) {\n return;\n }\n if (isCreatingFromScratch) {\n return this.createAllNew(this.scope, false);\n } else {\n return this.pieceMeal(this.scope, false);\n }\n };\n\n MarkersParentModel.prototype.bindToTypeEvents = function(typeEvents, events) {\n var internalHandles, self;\n if (events == null) {\n events = ['click', 'mouseout', 'mouseover'];\n }\n\n /*\n You should only be binding to events that produce groups/clusters of somthing.\n Otherwise use the orginal event handle.\n For Example: Click on a cluster pushes a cluster/group obj through which has getMarkers\n However Spiderfy's click is for a single marker so this is not ideal for that.\n */\n self = this;\n if (!this.origTypeEvents) {\n this.origTypeEvents = {};\n _.each(events, (function(_this) {\n return function(eventName) {\n return _this.origTypeEvents[eventName] = typeEvents != null ? typeEvents[eventName] : void 0;\n };\n })(this));\n } else {\n angular.extend(typeEvents, this.origTypeEvents);\n }\n internalHandles = {};\n _.each(events, function(eventName) {\n return internalHandles[eventName] = function(group) {\n return self.maybeExecMappedEvent(group, eventName);\n };\n });\n return angular.extend(typeEvents, internalHandles);\n };\n\n MarkersParentModel.prototype.createAllNew = function(scope) {\n var isSpiderfied, maybeCanceled, typeEvents, typeOptions;\n if (this.gManager != null) {\n if (this.gManager instanceof SpiderfierMarkerManager) {\n isSpiderfied = this.gManager.isSpiderfied();\n }\n this.gManager.clear();\n delete this.gManager;\n }\n typeEvents = scope.typeEvents || scope.clusterEvents;\n typeOptions = scope.typeOptions || scope.clusterOptions;\n if (scope.doCluster || scope.type === 'cluster') {\n if (typeEvents != null) {\n this.bindToTypeEvents(typeEvents);\n }\n this.gManager = new ClustererMarkerManager(this.map, void 0, typeOptions, typeEvents);\n } else if (scope.type === 'spider') {\n if (typeEvents != null) {\n this.bindToTypeEvents(typeEvents, ['spiderfy', 'unspiderfy']);\n }\n this.gManager = new SpiderfierMarkerManager(this.map, void 0, typeOptions, typeEvents, this.scope);\n if (isSpiderfied) {\n this.gManager.spiderfy();\n }\n } else {\n this.gManager = new MarkerManager(this.map);\n }\n if (this.didQueueInitPromise(this, scope)) {\n return;\n }\n maybeCanceled = null;\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return _async.each(scope.models, function(model) {\n _this.newChildMarker(model, scope);\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk)).then(function() {\n _this.modelsRendered = true;\n if (scope.fit) {\n _this.gManager.fit();\n }\n _this.gManager.draw();\n return _this.scope.pluralsUpdate.updateCtr += 1;\n }, _async.chunkSizeFrom(scope.chunk));\n };\n })(this));\n };\n\n MarkersParentModel.prototype.rebuildAll = function(scope) {\n var ref;\n if (!scope.doRebuild && scope.doRebuild !== void 0) {\n return;\n }\n if ((ref = this.scope.plurals) != null ? ref.length : void 0) {\n return this.onDestroy(scope).then((function(_this) {\n return function() {\n return _this.createAllNew(scope);\n };\n })(this));\n } else {\n return this.createAllNew(scope);\n }\n };\n\n MarkersParentModel.prototype.pieceMeal = function(scope) {\n var maybeCanceled, payload;\n if (scope.$$destroyed) {\n return;\n }\n maybeCanceled = null;\n payload = null;\n if (this.modelsLength() && this.scope.plurals.length) {\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return uiGmapPromise.promise((function() {\n return _this.figureOutState(_this.idKey, scope, _this.scope.plurals, _this.modelKeyComparison);\n })).then(function(state) {\n payload = state;\n return _async.each(payload.removals, function(child) {\n if (child != null) {\n if (child.destroy != null) {\n child.destroy();\n }\n _this.scope.plurals.remove(child.id);\n return maybeCanceled;\n }\n }, _async.chunkSizeFrom(scope.chunk));\n }).then(function() {\n return _async.each(payload.adds, function(modelToAdd) {\n _this.newChildMarker(modelToAdd, scope);\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk));\n }).then(function() {\n return _async.each(payload.updates, function(update) {\n _this.updateChild(update.child, update.model);\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk));\n }).then(function() {\n if (payload.adds.length > 0 || payload.removals.length > 0 || payload.updates.length > 0) {\n scope.plurals = _this.scope.plurals;\n if (scope.fit) {\n _this.gManager.fit();\n }\n _this.gManager.draw();\n }\n return _this.scope.pluralsUpdate.updateCtr += 1;\n });\n };\n })(this));\n } else {\n this.inProgress = false;\n return this.rebuildAll(scope);\n }\n };\n\n MarkersParentModel.prototype.newChildMarker = function(model, scope) {\n var child, childScope, keys;\n if (!model) {\n throw 'model undefined';\n }\n if (model[this.idKey] == null) {\n this.$log.error(\"Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.\");\n return;\n }\n this.$log.info('child', child, 'markers', this.scope.markerModels);\n childScope = scope.$new(false);\n childScope.events = scope.events;\n keys = {};\n IMarker.scopeKeys.forEach(function(k) {\n return keys[k] = scope[k];\n });\n child = new MarkerChildModel({\n scope: childScope,\n model: model,\n keys: keys,\n gMap: this.map,\n defaults: this.DEFAULTS,\n doClick: this.doClick,\n gManager: this.gManager,\n doDrawSelf: false,\n isScopeModel: true\n });\n this.scope.plurals.put(model[this.idKey], child);\n return child;\n };\n\n MarkersParentModel.prototype.onDestroy = function(scope) {\n MarkersParentModel.__super__.onDestroy.call(this, scope);\n return _async.promiseLock(this, uiGmapPromise.promiseTypes[\"delete\"], void 0, void 0, (function(_this) {\n return function() {\n return _async.each(_this.scope.plurals.values(), function(model) {\n if (model != null) {\n return model.destroy(false);\n }\n }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() {\n if (_this.gManager != null) {\n _this.gManager.destroy();\n }\n _this.plurals.removeAll();\n if (_this.plurals !== _this.scope.plurals) {\n console.error('plurals out of sync for MarkersParentModel');\n }\n return _this.scope.pluralsUpdate.updateCtr += 1;\n });\n };\n })(this));\n };\n\n MarkersParentModel.prototype.maybeExecMappedEvent = function(group, fnName) {\n var pair, typeEvents;\n if (this.scope.$$destroyed) {\n return;\n }\n typeEvents = this.scope.typeEvents || this.scope.clusterEvents;\n if (_.isFunction(typeEvents != null ? typeEvents[fnName] : void 0)) {\n pair = this.mapTypeToPlurals(group);\n if (this.origTypeEvents[fnName]) {\n return this.origTypeEvents[fnName](pair.group, pair.mapped);\n }\n }\n };\n\n MarkersParentModel.prototype.mapTypeToPlurals = function(group) {\n var arrayToMap, mapped, ref;\n if (_.isArray(group)) {\n arrayToMap = group;\n } else if (_.isFunction(group.getMarkers)) {\n arrayToMap = group.getMarkers();\n }\n if (arrayToMap == null) {\n $log.error(\"Unable to map event as we cannot find the array group to map\");\n return;\n }\n if ((ref = this.scope.plurals.values()) != null ? ref.length : void 0) {\n mapped = arrayToMap.map((function(_this) {\n return function(g) {\n return _this.scope.plurals.get(g.key).model;\n };\n })(this));\n } else {\n mapped = [];\n }\n return {\n cluster: group,\n mapped: mapped,\n group: group\n };\n };\n\n MarkersParentModel.prototype.getItem = function(scope, modelsPropToIterate, index) {\n if (modelsPropToIterate === 'models') {\n return scope[modelsPropToIterate][index];\n }\n return scope[modelsPropToIterate].get(index);\n };\n\n return MarkersParentModel;\n\n })(IMarkerParentModel);\n return MarkersParentModel;\n }\n ]);\n\n}).call(this);\n","(function() {\n ['Polygon', 'Polyline'].forEach(function(name) {\n return angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory(\"uiGmap\" + name + \"sParentModel\", [\n 'uiGmapBasePolysParentModel', \"uiGmap\" + name + \"ChildModel\", \"uiGmapI\" + name, function(BasePolysParentModel, ChildModel, IPoly) {\n return BasePolysParentModel(IPoly, ChildModel, name);\n }\n ]);\n });\n\n}).call(this);\n","\n/*globals angular, _, google */\n\n(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapRectangleParentModel', [\n 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', 'uiGmapRectangleOptionsBuilder', function($log, GmapUtil, EventsHelper, Builder) {\n var RectangleParentModel;\n return RectangleParentModel = (function(superClass) {\n extend(RectangleParentModel, superClass);\n\n RectangleParentModel.include(GmapUtil);\n\n RectangleParentModel.include(EventsHelper);\n\n function RectangleParentModel(scope, element, attrs, gMap, DEFAULTS) {\n var bounds, clear, createBounds, dragging, fit, gObject, init, listeners, myListeners, settingBoundsFromScope, updateBounds;\n this.scope = scope;\n this.attrs = attrs;\n this.gMap = gMap;\n this.DEFAULTS = DEFAULTS;\n bounds = void 0;\n dragging = false;\n myListeners = [];\n listeners = void 0;\n fit = (function(_this) {\n return function() {\n if (_this.isTrue(_this.attrs.fit)) {\n return _this.fitMapBounds(_this.gMap, bounds);\n }\n };\n })(this);\n createBounds = (function(_this) {\n return function() {\n var ref, ref1, ref2;\n if ((_this.scope.bounds != null) && (((ref = _this.scope.bounds) != null ? ref.sw : void 0) != null) && (((ref1 = _this.scope.bounds) != null ? ref1.ne : void 0) != null) && _this.validateBoundPoints(_this.scope.bounds)) {\n bounds = _this.convertBoundPoints(_this.scope.bounds);\n return $log.info(\"new new bounds created: \" + (JSON.stringify(bounds)));\n } else if ((_this.scope.bounds.getNorthEast != null) && (_this.scope.bounds.getSouthWest != null)) {\n return bounds = _this.scope.bounds;\n } else {\n if (_this.scope.bounds != null) {\n return $log.error(\"Invalid bounds for newValue: \" + (JSON.stringify((ref2 = _this.scope) != null ? ref2.bounds : void 0)));\n }\n }\n };\n })(this);\n createBounds();\n gObject = new google.maps.Rectangle(this.buildOpts(bounds));\n $log.info(\"gObject (rectangle) created: \" + gObject);\n settingBoundsFromScope = false;\n updateBounds = (function(_this) {\n return function() {\n var b, ne, sw;\n b = gObject.getBounds();\n ne = b.getNorthEast();\n sw = b.getSouthWest();\n if (settingBoundsFromScope) {\n return;\n }\n return _this.scope.$evalAsync(function(s) {\n if ((s.bounds != null) && (s.bounds.sw != null) && (s.bounds.ne != null)) {\n s.bounds.ne = {\n latitude: ne.lat(),\n longitude: ne.lng()\n };\n s.bounds.sw = {\n latitude: sw.lat(),\n longitude: sw.lng()\n };\n }\n if ((s.bounds.getNorthEast != null) && (s.bounds.getSouthWest != null)) {\n return s.bounds = b;\n }\n });\n };\n })(this);\n init = (function(_this) {\n return function() {\n fit();\n _this.removeEvents(myListeners);\n myListeners.push(google.maps.event.addListener(gObject, 'dragstart', function() {\n return dragging = true;\n }));\n myListeners.push(google.maps.event.addListener(gObject, 'dragend', function() {\n dragging = false;\n return updateBounds();\n }));\n return myListeners.push(google.maps.event.addListener(gObject, 'bounds_changed', function() {\n if (dragging) {\n return;\n }\n return updateBounds();\n }));\n };\n })(this);\n clear = (function(_this) {\n return function() {\n _this.removeEvents(myListeners);\n if (listeners != null) {\n _this.removeEvents(listeners);\n }\n return gObject.setMap(null);\n };\n })(this);\n if (bounds != null) {\n init();\n }\n this.scope.$watch('bounds', (function(newValue, oldValue) {\n var isNew;\n if (_.isEqual(newValue, oldValue) && (bounds != null) || dragging) {\n return;\n }\n settingBoundsFromScope = true;\n if (newValue == null) {\n clear();\n return;\n }\n if (bounds == null) {\n isNew = true;\n } else {\n fit();\n }\n createBounds();\n gObject.setBounds(bounds);\n settingBoundsFromScope = false;\n if (isNew && (bounds != null)) {\n return init();\n }\n }), true);\n this.setMyOptions = (function(_this) {\n return function(newVals, oldVals) {\n if (!_.isEqual(newVals, oldVals)) {\n if ((bounds != null) && (newVals != null)) {\n return gObject.setOptions(_this.buildOpts(bounds));\n }\n }\n };\n })(this);\n this.props.push('bounds');\n this.watchProps(this.props);\n if (this.attrs.events != null) {\n listeners = this.setEvents(gObject, this.scope, this.scope);\n this.scope.$watch('events', (function(_this) {\n return function(newValue, oldValue) {\n if (!_.isEqual(newValue, oldValue)) {\n if (listeners != null) {\n _this.removeEvents(listeners);\n }\n return listeners = _this.setEvents(gObject, _this.scope, _this.scope);\n }\n };\n })(this));\n }\n this.scope.$on('$destroy', function() {\n return clear();\n });\n $log.info(this);\n }\n\n return RectangleParentModel;\n\n })(Builder);\n }\n ]);\n\n}).call(this);\n","\n/*global angular:true, google:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapSearchBoxParentModel', [\n 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapEventsHelper', function(BaseObject, Logger, EventsHelper) {\n var SearchBoxParentModel;\n SearchBoxParentModel = (function(superClass) {\n extend(SearchBoxParentModel, superClass);\n\n SearchBoxParentModel.include(EventsHelper);\n\n function SearchBoxParentModel(scope, element, attrs, gMap, ctrlPosition, template, $log) {\n var controlDiv;\n this.scope = scope;\n this.element = element;\n this.attrs = attrs;\n this.gMap = gMap;\n this.ctrlPosition = ctrlPosition;\n this.template = template;\n this.$log = $log != null ? $log : Logger;\n this.setVisibility = bind(this.setVisibility, this);\n this.getBounds = bind(this.getBounds, this);\n this.setBounds = bind(this.setBounds, this);\n this.createSearchBox = bind(this.createSearchBox, this);\n this.addToParentDiv = bind(this.addToParentDiv, this);\n this.addAsMapControl = bind(this.addAsMapControl, this);\n this.init = bind(this.init, this);\n if (this.attrs.template == null) {\n this.$log.error('template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!');\n return;\n }\n if (angular.isUndefined(this.scope.options)) {\n this.scope.options = {};\n this.scope.options.visible = true;\n }\n if (angular.isUndefined(this.scope.options.visible)) {\n this.scope.options.visible = true;\n }\n if (angular.isUndefined(this.scope.options.autocomplete)) {\n this.scope.options.autocomplete = false;\n }\n this.visible = this.scope.options.visible;\n this.autocomplete = this.scope.options.autocomplete;\n controlDiv = angular.element('
');\n controlDiv.append(this.template);\n this.input = controlDiv.find('input')[0];\n this.init();\n }\n\n SearchBoxParentModel.prototype.init = function() {\n this.createSearchBox();\n this.scope.$watch('options', (function(_this) {\n return function(newValue, oldValue) {\n if (angular.isObject(newValue)) {\n if (newValue.bounds != null) {\n _this.setBounds(newValue.bounds);\n }\n if (newValue.visible != null) {\n if (_this.visible !== newValue.visible) {\n return _this.setVisibility(newValue.visible);\n }\n }\n }\n };\n })(this), true);\n if (this.attrs.parentdiv != null) {\n this.addToParentDiv();\n } else {\n this.addAsMapControl();\n }\n if (!this.visible) {\n this.setVisibility(this.visible);\n }\n if (this.autocomplete) {\n this.listener = google.maps.event.addListener(this.gObject, 'place_changed', (function(_this) {\n return function() {\n return _this.places = _this.gObject.getPlace();\n };\n })(this));\n } else {\n this.listener = google.maps.event.addListener(this.gObject, 'places_changed', (function(_this) {\n return function() {\n return _this.places = _this.gObject.getPlaces();\n };\n })(this));\n }\n this.listeners = this.setEvents(this.gObject, this.scope, this.scope);\n this.$log.info(this);\n this.scope.$on('$stateChangeSuccess', (function(_this) {\n return function() {\n if (_this.attrs.parentdiv != null) {\n return _this.addToParentDiv();\n }\n };\n })(this));\n return this.scope.$on('$destroy', (function(_this) {\n return function() {\n return _this.gObject = null;\n };\n })(this));\n };\n\n SearchBoxParentModel.prototype.addAsMapControl = function() {\n return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input);\n };\n\n SearchBoxParentModel.prototype.addToParentDiv = function() {\n var ref;\n this.parentDiv = angular.element(document.getElementById(this.scope.parentdiv));\n if ((ref = this.parentDiv) != null ? ref.length : void 0) {\n return this.parentDiv.append(this.input);\n }\n };\n\n SearchBoxParentModel.prototype.createSearchBox = function() {\n if (this.autocomplete) {\n return this.gObject = new google.maps.places.Autocomplete(this.input, this.scope.options);\n } else {\n return this.gObject = new google.maps.places.SearchBox(this.input, this.scope.options);\n }\n };\n\n SearchBoxParentModel.prototype.setBounds = function(bounds) {\n if (angular.isUndefined(bounds.isEmpty)) {\n this.$log.error('Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.');\n } else {\n if (bounds.isEmpty() === false) {\n if (this.gObject != null) {\n return this.gObject.setBounds(bounds);\n }\n }\n }\n };\n\n SearchBoxParentModel.prototype.getBounds = function() {\n return this.gObject.getBounds();\n };\n\n SearchBoxParentModel.prototype.setVisibility = function(val) {\n if (this.attrs.parentdiv != null) {\n if (val === false) {\n this.parentDiv.addClass(\"ng-hide\");\n } else {\n this.parentDiv.removeClass(\"ng-hide\");\n }\n } else {\n if (val === false) {\n this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear();\n } else {\n this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input);\n }\n }\n return this.visible = val;\n };\n\n return SearchBoxParentModel;\n\n })(BaseObject);\n return SearchBoxParentModel;\n }\n ]);\n\n}).call(this);\n","\n/*global _,angular */\n\n\n/*\n\tWindowsChildModel generator where there are many ChildModels to a parent.\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api.models.parent').factory('uiGmapWindowsParentModel', [\n 'uiGmapIWindowParentModel', 'uiGmapModelsWatcher', 'uiGmapPropMap', 'uiGmapWindowChildModel', 'uiGmapLinked', 'uiGmap_async', 'uiGmapLogger', '$timeout', '$compile', '$http', '$templateCache', '$interpolate', 'uiGmapPromise', 'uiGmapIWindow', 'uiGmapGmapUtil', function(IWindowParentModel, ModelsWatcher, PropMap, WindowChildModel, Linked, _async, $log, $timeout, $compile, $http, $templateCache, $interpolate, uiGmapPromise, IWindow, GmapUtil) {\n var WindowsParentModel;\n WindowsParentModel = (function(superClass) {\n extend(WindowsParentModel, superClass);\n\n WindowsParentModel.include(ModelsWatcher);\n\n function WindowsParentModel(scope, element, attrs, ctrls, gMap1, markersScope) {\n this.gMap = gMap1;\n this.markersScope = markersScope;\n this.modelKeyComparison = bind(this.modelKeyComparison, this);\n this.interpolateContent = bind(this.interpolateContent, this);\n this.setChildScope = bind(this.setChildScope, this);\n this.createWindow = bind(this.createWindow, this);\n this.setContentKeys = bind(this.setContentKeys, this);\n this.pieceMeal = bind(this.pieceMeal, this);\n this.createAllNew = bind(this.createAllNew, this);\n this.watchIdKey = bind(this.watchIdKey, this);\n this.createChildScopes = bind(this.createChildScopes, this);\n this.watchOurScope = bind(this.watchOurScope, this);\n this.watchDestroy = bind(this.watchDestroy, this);\n this.onDestroy = bind(this.onDestroy, this);\n this.rebuildAll = bind(this.rebuildAll, this);\n this.doINeedToWipe = bind(this.doINeedToWipe, this);\n this.watchModels = bind(this.watchModels, this);\n this.go = bind(this.go, this);\n WindowsParentModel.__super__.constructor.call(this, scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache);\n this[\"interface\"] = IWindow;\n this.plurals = new PropMap();\n _.each(IWindow.scopeKeys, (function(_this) {\n return function(name) {\n return _this[name + 'Key'] = void 0;\n };\n })(this));\n this.linked = new Linked(scope, element, attrs, ctrls);\n this.contentKeys = void 0;\n this.isIconVisibleOnClick = void 0;\n this.firstTime = true;\n this.firstWatchModels = true;\n this.$log.info(self);\n this.parentScope = void 0;\n this.go(scope);\n }\n\n WindowsParentModel.prototype.go = function(scope) {\n this.watchOurScope(scope);\n this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false;\n scope.$watch('doRebuildAll', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.doRebuildAll = newValue;\n }\n };\n })(this));\n return this.createChildScopes();\n };\n\n WindowsParentModel.prototype.watchModels = function(scope) {\n var itemToWatch;\n itemToWatch = this.markersScope != null ? 'pluralsUpdate' : 'models';\n return scope.$watch(itemToWatch, (function(_this) {\n return function(newValue, oldValue) {\n var doScratch;\n if (!_.isEqual(newValue, oldValue) || _this.firstWatchModels) {\n _this.firstWatchModels = false;\n if (_this.doRebuildAll || _this.doINeedToWipe(scope.models)) {\n return _this.rebuildAll(scope, true, true);\n } else {\n doScratch = _this.plurals.length === 0;\n if (_this.existingPieces != null) {\n return _.last(_this.existingPieces._content).then(function() {\n return _this.createChildScopes(doScratch);\n });\n } else {\n return _this.createChildScopes(doScratch);\n }\n }\n }\n };\n })(this), true);\n };\n\n WindowsParentModel.prototype.doINeedToWipe = function(newValue) {\n var newValueIsEmpty;\n newValueIsEmpty = newValue != null ? newValue.length === 0 : true;\n return this.plurals.length > 0 && newValueIsEmpty;\n };\n\n WindowsParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) {\n return this.onDestroy(doDelete).then((function(_this) {\n return function() {\n if (doCreate) {\n return _this.createChildScopes();\n }\n };\n })(this));\n };\n\n WindowsParentModel.prototype.onDestroy = function(scope) {\n WindowsParentModel.__super__.onDestroy.call(this, this.scope);\n return _async.promiseLock(this, uiGmapPromise.promiseTypes[\"delete\"], void 0, void 0, (function(_this) {\n return function() {\n return _async.each(_this.plurals.values(), function(child) {\n return child.destroy(true);\n }, _async.chunkSizeFrom(_this.scope.cleanchunk, false)).then(function() {\n var ref;\n return (ref = _this.plurals) != null ? ref.removeAll() : void 0;\n });\n };\n })(this));\n };\n\n WindowsParentModel.prototype.watchDestroy = function(scope) {\n return scope.$on('$destroy', (function(_this) {\n return function() {\n _this.firstWatchModels = true;\n _this.firstTime = true;\n return _this.rebuildAll(scope, false, true);\n };\n })(this));\n };\n\n WindowsParentModel.prototype.watchOurScope = function(scope) {\n return _.each(IWindow.scopeKeys, (function(_this) {\n return function(name) {\n var nameKey;\n nameKey = name + 'Key';\n return _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name];\n };\n })(this));\n };\n\n WindowsParentModel.prototype.createChildScopes = function(isCreatingFromScratch) {\n var modelsNotDefined, ref, ref1;\n if (isCreatingFromScratch == null) {\n isCreatingFromScratch = true;\n }\n\n /*\n being that we cannot tell the difference in Key String vs. a normal value string (TemplateUrl)\n we will assume that all scope values are string expressions either pointing to a key (propName) or using\n 'self' to point the model as container/object of interest.\n \n This may force redundant information into the model, but this appears to be the most flexible approach.\n */\n this.isIconVisibleOnClick = true;\n if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) {\n this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick;\n }\n modelsNotDefined = angular.isUndefined(this.linked.scope.models);\n if (modelsNotDefined && (this.markersScope === void 0 || (((ref = this.markersScope) != null ? ref.plurals : void 0) === void 0 || ((ref1 = this.markersScope) != null ? ref1.models : void 0) === void 0))) {\n this.$log.error('No models to create windows from! Need direct models or models derived from markers!');\n return;\n }\n if (this.gMap != null) {\n if (this.linked.scope.models != null) {\n this.watchIdKey(this.linked.scope);\n if (isCreatingFromScratch) {\n return this.createAllNew(this.linked.scope, false);\n } else {\n return this.pieceMeal(this.linked.scope, false);\n }\n } else {\n this.parentScope = this.markersScope;\n this.watchIdKey(this.parentScope);\n if (isCreatingFromScratch) {\n return this.createAllNew(this.markersScope, true, 'plurals', false);\n } else {\n return this.pieceMeal(this.markersScope, true, 'plurals', false);\n }\n }\n }\n };\n\n WindowsParentModel.prototype.watchIdKey = function(scope) {\n this.setIdKey(scope);\n return scope.$watch('idKey', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue && (newValue == null)) {\n _this.idKey = newValue;\n return _this.rebuildAll(scope, true, true);\n }\n };\n })(this));\n };\n\n WindowsParentModel.prototype.createAllNew = function(scope, hasGMarker, modelsPropToIterate, isArray) {\n var maybeCanceled;\n if (modelsPropToIterate == null) {\n modelsPropToIterate = 'models';\n }\n if (isArray == null) {\n isArray = false;\n }\n if (this.firstTime) {\n this.watchModels(scope);\n this.watchDestroy(scope);\n }\n this.setContentKeys(scope.models);\n if (this.didQueueInitPromise(this, scope)) {\n return;\n }\n maybeCanceled = null;\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.create, 'createAllNew', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return _async.each(scope.models, function(model) {\n var gMarker, ref;\n gMarker = hasGMarker ? (ref = _this.getItem(scope, modelsPropToIterate, model[_this.idKey])) != null ? ref.gObject : void 0 : void 0;\n if (!maybeCanceled) {\n if (!gMarker && _this.markersScope) {\n $log.error('Unable to get gMarker from markersScope!');\n }\n _this.createWindow(model, gMarker, _this.gMap);\n }\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk)).then(function() {\n return _this.firstTime = false;\n });\n };\n })(this));\n };\n\n WindowsParentModel.prototype.pieceMeal = function(scope, hasGMarker, modelsPropToIterate, isArray) {\n var maybeCanceled, payload;\n if (modelsPropToIterate == null) {\n modelsPropToIterate = 'models';\n }\n if (isArray == null) {\n isArray = true;\n }\n if (scope.$$destroyed) {\n return;\n }\n maybeCanceled = null;\n payload = null;\n if ((scope != null) && this.modelsLength() && this.plurals.length) {\n return _async.promiseLock(this, uiGmapPromise.promiseTypes.update, 'pieceMeal', (function(canceledMsg) {\n return maybeCanceled = canceledMsg;\n }), (function(_this) {\n return function() {\n return uiGmapPromise.promise((function() {\n return _this.figureOutState(_this.idKey, scope, _this.plurals, _this.modelKeyComparison);\n })).then(function(state) {\n payload = state;\n return _async.each(payload.removals, function(child) {\n if (child != null) {\n _this.plurals.remove(child.id);\n if (child.destroy != null) {\n child.destroy(true);\n }\n return maybeCanceled;\n }\n }, _async.chunkSizeFrom(scope.chunk));\n }).then(function() {\n return _async.each(payload.adds, function(modelToAdd) {\n var gMarker, ref;\n gMarker = (ref = _this.getItem(scope, modelsPropToIterate, modelToAdd[_this.idKey])) != null ? ref.gObject : void 0;\n if (!gMarker) {\n throw 'Gmarker undefined';\n }\n _this.createWindow(modelToAdd, gMarker, _this.gMap);\n return maybeCanceled;\n });\n }).then(function() {\n return _async.each(payload.updates, function(update) {\n _this.updateChild(update.child, update.model);\n return maybeCanceled;\n }, _async.chunkSizeFrom(scope.chunk));\n });\n };\n })(this));\n } else {\n $log.debug('pieceMeal: rebuildAll');\n return this.rebuildAll(this.scope, true, true);\n }\n };\n\n WindowsParentModel.prototype.setContentKeys = function(models) {\n if (this.modelsLength(models)) {\n return this.contentKeys = Object.keys(models[0]);\n }\n };\n\n WindowsParentModel.prototype.createWindow = function(model, gMarker, gMap) {\n var child, childScope, fakeElement, opts, ref, ref1;\n childScope = this.linked.scope.$new(false);\n this.setChildScope(childScope, model);\n childScope.$watch('model', (function(_this) {\n return function(newValue, oldValue) {\n if (newValue !== oldValue) {\n return _this.setChildScope(childScope, newValue);\n }\n };\n })(this), true);\n fakeElement = {\n html: (function(_this) {\n return function() {\n return _this.interpolateContent(_this.linked.element.html(), model);\n };\n })(this)\n };\n this.DEFAULTS = this.scopeOrModelVal(this.optionsKey, this.scope, model) || {};\n opts = this.createWindowOptions(gMarker, childScope, fakeElement.html(), this.DEFAULTS);\n child = new WindowChildModel({\n model: model,\n scope: childScope,\n opts: opts,\n isIconVisibleOnClick: this.isIconVisibleOnClick,\n gMap: gMap,\n markerScope: (ref = this.markersScope) != null ? (ref1 = ref.plurals.get(model[this.idKey])) != null ? ref1.scope : void 0 : void 0,\n element: fakeElement,\n needToManualDestroy: false,\n markerIsVisibleAfterWindowClose: true,\n isScopeModel: true\n });\n if (model[this.idKey] == null) {\n this.$log.error('Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.');\n return;\n }\n this.plurals.put(model[this.idKey], child);\n return child;\n };\n\n WindowsParentModel.prototype.setChildScope = function(childScope, model) {\n _.each(IWindow.scopeKeys, (function(_this) {\n return function(name) {\n var nameKey, newValue;\n nameKey = name + 'Key';\n newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]];\n if (newValue !== childScope[name]) {\n return childScope[name] = newValue;\n }\n };\n })(this));\n return childScope.model = model;\n };\n\n WindowsParentModel.prototype.interpolateContent = function(content, model) {\n var exp, i, interpModel, key, len, ref;\n if (this.contentKeys === void 0 || this.contentKeys.length === 0) {\n return;\n }\n exp = $interpolate(content);\n interpModel = {};\n ref = this.contentKeys;\n for (i = 0, len = ref.length; i < len; i++) {\n key = ref[i];\n interpModel[key] = model[key];\n }\n return exp(interpModel);\n };\n\n WindowsParentModel.prototype.modelKeyComparison = function(model1, model2) {\n var isEqual, scope;\n scope = this.scope.coords != null ? this.scope : this.parentScope;\n if (scope == null) {\n throw 'No scope or parentScope set!';\n }\n isEqual = GmapUtil.equalCoords(this.evalModelHandle(model1, scope.coords), this.evalModelHandle(model2, scope.coords));\n if (!isEqual) {\n return isEqual;\n }\n isEqual = _.every(_.without(this[\"interface\"].scopeKeys, 'coords'), (function(_this) {\n return function(k) {\n return _this.evalModelHandle(model1, scope[k]) === _this.evalModelHandle(model2, scope[k]);\n };\n })(this));\n return isEqual;\n };\n\n return WindowsParentModel;\n\n })(IWindowParentModel);\n return WindowsParentModel;\n }\n ]);\n\n}).call(this);\n","\n/*global angular, _ */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapCircle\", [\n \"uiGmapICircle\", \"uiGmapCircleParentModel\", function(ICircle, CircleParentModel) {\n return _.extend(ICircle, {\n link: function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then(function(gMap) {\n return new CircleParentModel(scope, element, attrs, gMap);\n });\n }\n });\n }\n ]);\n\n}).call(this);\n","(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapControl\", [\n \"uiGmapIControl\", \"$http\", \"$templateCache\", \"$compile\", \"$controller\", 'uiGmapGoogleMapApi', function(IControl, $http, $templateCache, $compile, $controller, GoogleMapApi) {\n var Control;\n return Control = (function(superClass) {\n extend(Control, superClass);\n\n function Control() {\n this.link = bind(this.link, this);\n Control.__super__.constructor.call(this);\n }\n\n Control.prototype.transclude = true;\n\n Control.prototype.link = function(scope, element, attrs, ctrl, transclude) {\n return GoogleMapApi.then((function(_this) {\n return function(maps) {\n var hasTranscludedContent, index, position, transcludedContent;\n transcludedContent = transclude();\n hasTranscludedContent = transclude().length > 0;\n if (!hasTranscludedContent && angular.isUndefined(scope.template)) {\n _this.$log.error('mapControl: could not find a valid template property or elements for transclusion');\n return;\n }\n index = angular.isDefined(scope.index && !isNaN(parseInt(scope.index))) ? parseInt(scope.index) : void 0;\n position = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_CENTER';\n if (!maps.ControlPosition[position]) {\n _this.$log.error('mapControl: invalid position property');\n return;\n }\n return IControl.mapPromise(scope, ctrl).then(function(map) {\n var control, controlDiv, pushControl;\n control = void 0;\n controlDiv = angular.element('
');\n pushControl = function(map, control, index) {\n if (index) {\n control[0].index = index;\n }\n return map.controls[google.maps.ControlPosition[position]].push(control[0]);\n };\n if (hasTranscludedContent) {\n return transclude(function(transcludeEl) {\n controlDiv.append(transcludeEl);\n return pushControl(map, controlDiv, index);\n });\n } else {\n return $http.get(scope.template, {\n cache: $templateCache\n }).success(function(template) {\n var templateCtrl, templateScope;\n templateScope = scope.$new();\n controlDiv.append(template);\n if (angular.isDefined(scope.controller)) {\n templateCtrl = $controller(scope.controller, {\n $scope: templateScope\n });\n controlDiv.children().data('$ngControllerController', templateCtrl);\n }\n return control = $compile(controlDiv.children())(templateScope);\n }).error(function(error) {\n return _this.$log.error('mapControl: template could not be found');\n }).then(function() {\n return pushControl(map, control, index);\n });\n }\n });\n };\n })(this));\n };\n\n return Control;\n\n })(IControl);\n }\n ]);\n\n}).call(this);\n","\n/*globals angular, _ */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapDragZoom', [\n 'uiGmapCtrlHandle', 'uiGmapPropertyAction', function(CtrlHandle, PropertyAction) {\n return {\n restrict: 'EMA',\n transclude: true,\n template: '
',\n require: '^' + 'uiGmapGoogleMap',\n scope: {\n keyboardkey: '=',\n options: '=',\n spec: '='\n },\n controller: [\n '$scope', '$element', function($scope, $element) {\n $scope.ctrlType = 'uiGmapDragZoom';\n return _.extend(this, CtrlHandle.handle($scope, $element));\n }\n ],\n link: function(scope, element, attrs, ctrl) {\n return CtrlHandle.mapPromise(scope, ctrl).then(function(map) {\n var enableKeyDragZoom, setKeyAction, setOptionsAction;\n enableKeyDragZoom = function(opts) {\n return map.enableKeyDragZoom(opts);\n };\n setKeyAction = new PropertyAction(function(key, newVal) {\n if (newVal) {\n return enableKeyDragZoom({\n key: newVal\n });\n } else {\n return enableKeyDragZoom();\n }\n });\n setOptionsAction = new PropertyAction(function(key, newVal) {\n if (newVal) {\n return enableKeyDragZoom(newVal);\n }\n });\n scope.$watch('keyboardkey', setKeyAction.sic('keyboardkey'));\n setKeyAction.sic(scope.keyboardkey);\n scope.$watch('options', setOptionsAction.sic('options'));\n return setOptionsAction.sic(scope.options);\n });\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapDrawingManager\", [\n \"uiGmapIDrawingManager\", \"uiGmapDrawingManagerParentModel\", function(IDrawingManager, DrawingManagerParentModel) {\n return _.extend(IDrawingManager, {\n link: function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then(function(map) {\n return new DrawingManagerParentModel(scope, element, attrs, map);\n });\n }\n });\n }\n ]);\n\n}).call(this);\n","\n/*\n - Link up Polygons to be sent back to a controller\n - inject the draw function into a controllers scope so that controller can call the directive to draw on demand\n - draw function creates the DrawFreeHandChildModel which manages itself\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapApiFreeDrawPolygons', [\n 'uiGmapLogger', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapDrawFreeHandChildModel', 'uiGmapLodash', function($log, BaseObject, CtrlHandle, DrawFreeHandChildModel, uiGmapLodash) {\n var FreeDrawPolygons;\n return FreeDrawPolygons = (function(superClass) {\n extend(FreeDrawPolygons, superClass);\n\n function FreeDrawPolygons() {\n this.link = bind(this.link, this);\n return FreeDrawPolygons.__super__.constructor.apply(this, arguments);\n }\n\n FreeDrawPolygons.include(CtrlHandle);\n\n FreeDrawPolygons.prototype.restrict = 'EMA';\n\n FreeDrawPolygons.prototype.replace = true;\n\n FreeDrawPolygons.prototype.require = '^' + 'uiGmapGoogleMap';\n\n FreeDrawPolygons.prototype.scope = {\n polygons: '=',\n draw: '='\n };\n\n FreeDrawPolygons.prototype.link = function(scope, element, attrs, ctrl) {\n return this.mapPromise(scope, ctrl).then((function(_this) {\n return function(map) {\n var freeHand, listener;\n if (!scope.polygons) {\n return $log.error('No polygons to bind to!');\n }\n if (!_.isArray(scope.polygons)) {\n return $log.error('Free Draw Polygons must be of type Array!');\n }\n freeHand = new DrawFreeHandChildModel(map, ctrl.getScope());\n listener = void 0;\n return scope.draw = function() {\n if (typeof listener === \"function\") {\n listener();\n }\n return freeHand.engage(scope.polygons).then(function() {\n var firstTime;\n firstTime = true;\n return listener = scope.$watchCollection('polygons', function(newValue, oldValue) {\n var removals;\n if (firstTime || newValue === oldValue) {\n firstTime = false;\n return;\n }\n removals = uiGmapLodash.differenceObjects(oldValue, newValue);\n return removals.forEach(function(p) {\n return p.setMap(null);\n });\n });\n });\n };\n };\n })(this));\n };\n\n return FreeDrawPolygons;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module(\"uiGmapgoogle-maps.directives.api\").service(\"uiGmapICircle\", [\n function() {\n var DEFAULTS;\n DEFAULTS = {};\n return {\n restrict: \"EA\",\n replace: true,\n require: '^' + 'uiGmapGoogleMap',\n scope: {\n center: \"=center\",\n radius: \"=radius\",\n stroke: \"=stroke\",\n fill: \"=fill\",\n clickable: \"=\",\n draggable: \"=\",\n editable: \"=\",\n geodesic: \"=\",\n icons: \"=icons\",\n visible: \"=\",\n events: \"=\",\n control: \"=\",\n zIndex: \"=zindex\"\n }\n };\n }\n ]);\n\n}).call(this);\n","\n/*\n - interface for all controls to derive from\n - to enforce a minimum set of requirements\n\t- attributes\n\t\t- template\n\t\t- position\n\t\t- controller\n\t\t- index\n */\n\n(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapIControl\", [\n \"uiGmapBaseObject\", \"uiGmapLogger\", \"uiGmapCtrlHandle\", function(BaseObject, Logger, CtrlHandle) {\n var IControl;\n return IControl = (function(superClass) {\n extend(IControl, superClass);\n\n IControl.extend(CtrlHandle);\n\n function IControl() {\n this.restrict = 'EA';\n this.replace = true;\n this.require = '^' + 'uiGmapGoogleMap';\n this.scope = {\n template: '@template',\n position: '@position',\n controller: '@controller',\n index: '@index'\n };\n this.$log = Logger;\n }\n\n IControl.prototype.link = function(scope, element, attrs, ctrl) {\n throw new Exception(\"Not implemented!!\");\n };\n\n return IControl;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIDrawingManager', [\n function() {\n return {\n restrict: 'EA',\n replace: true,\n require: '^' + 'uiGmapGoogleMap',\n scope: {\n \"static\": '@',\n control: '=',\n options: '=',\n events: '='\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIMarker', [\n 'uiGmapBaseObject', 'uiGmapCtrlHandle', function(BaseObject, CtrlHandle) {\n var IMarker;\n return IMarker = (function(superClass) {\n extend(IMarker, superClass);\n\n IMarker.scope = {\n coords: '=coords',\n icon: '=icon',\n click: '&click',\n options: '=options',\n events: '=events',\n fit: '=fit',\n idKey: '=idkey',\n control: '=control'\n };\n\n IMarker.scopeKeys = _.keys(IMarker.scope);\n\n IMarker.keys = IMarker.scopeKeys;\n\n IMarker.extend(CtrlHandle);\n\n function IMarker() {\n this.restrict = 'EMA';\n this.require = '^' + 'uiGmapGoogleMap';\n this.priority = -1;\n this.transclude = true;\n this.replace = true;\n this.scope = _.extend(this.scope || {}, IMarker.scope);\n }\n\n return IMarker;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolygon', [\n 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) {\n var IPolygon;\n return IPolygon = (function(superClass) {\n extend(IPolygon, superClass);\n\n IPolygon.scope = {\n path: '=path',\n stroke: '=stroke',\n clickable: '=',\n draggable: '=',\n editable: '=',\n geodesic: '=',\n fill: '=',\n icons: '=icons',\n visible: '=',\n \"static\": '=',\n events: '=',\n zIndex: '=zindex',\n fit: '=',\n control: '=control'\n };\n\n IPolygon.scopeKeys = _.keys(IPolygon.scope);\n\n IPolygon.include(GmapUtil);\n\n IPolygon.extend(CtrlHandle);\n\n function IPolygon() {}\n\n IPolygon.prototype.restrict = 'EMA';\n\n IPolygon.prototype.replace = true;\n\n IPolygon.prototype.require = '^' + 'uiGmapGoogleMap';\n\n IPolygon.prototype.scope = IPolygon.scope;\n\n IPolygon.prototype.DEFAULTS = {};\n\n IPolygon.prototype.$log = Logger;\n\n return IPolygon;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIPolyline', [\n 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapLogger', 'uiGmapCtrlHandle', function(GmapUtil, BaseObject, Logger, CtrlHandle) {\n var IPolyline;\n return IPolyline = (function(superClass) {\n extend(IPolyline, superClass);\n\n IPolyline.scope = {\n path: '=',\n stroke: '=',\n clickable: '=',\n draggable: '=',\n editable: '=',\n geodesic: '=',\n icons: '=',\n visible: '=',\n \"static\": '=',\n fit: '=',\n events: '=',\n zIndex: '=zindex'\n };\n\n IPolyline.scopeKeys = _.keys(IPolyline.scope);\n\n IPolyline.include(GmapUtil);\n\n IPolyline.extend(CtrlHandle);\n\n function IPolyline() {}\n\n IPolyline.prototype.restrict = 'EMA';\n\n IPolyline.prototype.replace = true;\n\n IPolyline.prototype.require = '^' + 'uiGmapGoogleMap';\n\n IPolyline.prototype.scope = IPolyline.scope;\n\n IPolyline.prototype.DEFAULTS = {};\n\n IPolyline.prototype.$log = Logger;\n\n return IPolyline;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapIRectangle', [\n function() {\n 'use strict';\n var DEFAULTS;\n DEFAULTS = {};\n return {\n restrict: 'EMA',\n require: '^' + 'uiGmapGoogleMap',\n replace: true,\n scope: {\n bounds: '=',\n stroke: '=',\n clickable: '=',\n draggable: '=',\n editable: '=',\n fill: '=',\n visible: '=',\n events: '='\n }\n };\n }\n ]);\n\n}).call(this);\n","(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapIWindow', [\n 'uiGmapBaseObject', 'uiGmapChildEvents', 'uiGmapCtrlHandle', function(BaseObject, ChildEvents, CtrlHandle) {\n var IWindow;\n return IWindow = (function(superClass) {\n extend(IWindow, superClass);\n\n IWindow.scope = {\n coords: '=coords',\n template: '=template',\n templateUrl: '=templateurl',\n templateParameter: '=templateparameter',\n isIconVisibleOnClick: '=isiconvisibleonclick',\n closeClick: '&closeclick',\n options: '=options',\n control: '=control',\n show: '=show'\n };\n\n IWindow.scopeKeys = _.keys(IWindow.scope);\n\n IWindow.include(ChildEvents);\n\n IWindow.extend(CtrlHandle);\n\n function IWindow() {\n this.restrict = 'EMA';\n this.template = void 0;\n this.transclude = true;\n this.priority = -100;\n this.require = '^' + 'uiGmapGoogleMap';\n this.replace = true;\n this.scope = _.extend(this.scope || {}, IWindow.scope);\n }\n\n return IWindow;\n\n })(BaseObject);\n }\n ]);\n\n}).call(this);\n","\n/*globals angular,_,google */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', ['$timeout', '$q', '$log', 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapIsReady', 'uiGmapuuid', 'uiGmapExtendGWin', 'uiGmapExtendMarkerClusterer', 'uiGmapGoogleMapsUtilV3', 'uiGmapGoogleMapApi', 'uiGmapEventsHelper', 'uiGmapGoogleMapObjectManager', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) {\n var DEFAULTS, Map, initializeItems;\n DEFAULTS = void 0;\n initializeItems = [uiGmapGoogleMapsUtilV3, uiGmapExtendGWin, uiGmapExtendMarkerClusterer];\n return Map = (function(superClass) {\n extend(Map, superClass);\n\n Map.include(uiGmapGmapUtil);\n\n function Map() {\n this.link = bind(this.link, this);\n var ctrlFn;\n ctrlFn = function($scope) {\n var ctrlObj, retCtrl;\n retCtrl = void 0;\n $scope.$on('$destroy', function() {\n return uiGmapIsReady.decrement();\n });\n ctrlObj = uiGmapCtrlHandle.handle($scope);\n $scope.ctrlType = 'Map';\n $scope.deferred.promise.then(function() {\n return initializeItems.forEach(function(i) {\n return i.init();\n });\n });\n ctrlObj.getMap = function() {\n return $scope.map;\n };\n retCtrl = _.extend(this, ctrlObj);\n return retCtrl;\n };\n this.controller = ['$scope', ctrlFn];\n }\n\n Map.prototype.restrict = 'EMA';\n\n Map.prototype.transclude = true;\n\n Map.prototype.replace = false;\n\n Map.prototype.template = \"
\\n
\";\n\n Map.prototype.scope = {\n center: '=',\n zoom: '=',\n dragging: '=',\n control: '=',\n options: '=',\n events: '=',\n eventOpts: '=',\n styles: '=',\n bounds: '=',\n update: '='\n };\n\n Map.prototype.link = function(scope, element, attrs) {\n var listeners;\n listeners = [];\n scope.$on('$destroy', function() {\n uiGmapEventsHelper.removeEvents(listeners);\n if (attrs.recycleMapInstance === 'true' && scope.map) {\n uiGmapGoogleMapObjectManager.recycleMapInstance(scope.map);\n return scope.map = null;\n }\n });\n scope.idleAndZoomChanged = false;\n return uiGmapGoogleMapApi.then((function(_this) {\n return function(maps) {\n var _gMap, customListeners, disabledEvents, dragging, el, eventName, getEventHandler, mapOptions, maybeHookToEvent, opts, ref, resolveSpawned, settingFromDirective, spawned, type, updateCenter, zoomPromise;\n DEFAULTS = {\n mapTypeId: maps.MapTypeId.ROADMAP\n };\n spawned = uiGmapIsReady.spawn();\n resolveSpawned = function() {\n return spawned.deferred.resolve({\n instance: spawned.instance,\n map: _gMap\n });\n };\n if (!angular.isDefined(scope.center) && !angular.isDefined(scope.bounds)) {\n $log.error('angular-google-maps: a center or bounds property is required');\n return;\n }\n if (!angular.isDefined(scope.center)) {\n scope.center = new google.maps.LatLngBounds(_this.getCoords(scope.bounds.southwest), _this.getCoords(scope.bounds.northeast)).getCenter();\n }\n if (!angular.isDefined(scope.zoom)) {\n scope.zoom = 10;\n }\n el = angular.element(element);\n el.addClass('angular-google-map');\n opts = {\n options: {}\n };\n if (attrs.options) {\n opts.options = scope.options;\n }\n if (attrs.styles) {\n opts.styles = scope.styles;\n }\n if (attrs.type) {\n type = attrs.type.toUpperCase();\n if (google.maps.MapTypeId.hasOwnProperty(type)) {\n opts.mapTypeId = google.maps.MapTypeId[attrs.type.toUpperCase()];\n } else {\n $log.error(\"angular-google-maps: invalid map type '\" + attrs.type + \"'\");\n }\n }\n mapOptions = angular.extend({}, DEFAULTS, opts, {\n center: _this.getCoords(scope.center),\n zoom: scope.zoom,\n bounds: scope.bounds\n });\n if (attrs.recycleMapInstance === 'true') {\n _gMap = uiGmapGoogleMapObjectManager.createMapInstance(el.find('div')[1], mapOptions);\n } else {\n _gMap = new google.maps.Map(el.find('div')[1], mapOptions);\n }\n _gMap['uiGmap_id'] = uiGmapuuid.generate();\n dragging = false;\n listeners.push(google.maps.event.addListenerOnce(_gMap, 'idle', function() {\n scope.deferred.resolve(_gMap);\n return resolveSpawned();\n }));\n disabledEvents = attrs.events && (((ref = scope.events) != null ? ref.blacklist : void 0) != null) ? scope.events.blacklist : [];\n if (_.isString(disabledEvents)) {\n disabledEvents = [disabledEvents];\n }\n maybeHookToEvent = function(eventName, fn, prefn) {\n if (!_.includes(disabledEvents, eventName)) {\n if (prefn) {\n prefn();\n }\n return listeners.push(google.maps.event.addListener(_gMap, eventName, function() {\n var ref1;\n if (!((ref1 = scope.update) != null ? ref1.lazy : void 0)) {\n return fn();\n }\n }));\n }\n };\n if (!_.includes(disabledEvents, 'all')) {\n maybeHookToEvent('dragstart', function() {\n dragging = true;\n return scope.$evalAsync(function(s) {\n if (s.dragging != null) {\n return s.dragging = dragging;\n }\n });\n });\n maybeHookToEvent('dragend', function() {\n dragging = false;\n return scope.$evalAsync(function(s) {\n if (s.dragging != null) {\n return s.dragging = dragging;\n }\n });\n });\n updateCenter = function(c, s) {\n if (c == null) {\n c = _gMap.center;\n }\n if (s == null) {\n s = scope;\n }\n if (_.includes(disabledEvents, 'center')) {\n if (s.center.latitude !== c.lat()) {\n s.center.latitude = c.lat();\n }\n if (s.center.longitude !== c.lng()) {\n return s.center.longitude = c.lng();\n }\n }\n };\n settingFromDirective = false;\n maybeHookToEvent('idle', function() {\n var b, ne, sw;\n b = _gMap.getBounds();\n ne = b.getNorthEast();\n sw = b.getSouthWest();\n settingFromDirective = true;\n return scope.$evalAsync(function(s) {\n updateCenter();\n if (!_.isUndefined(s.bounds) && !_.includes(disabledEvents, 'bounds')) {\n s.bounds.northeast = {\n latitude: ne.lat(),\n longitude: ne.lng()\n };\n s.bounds.southwest = {\n latitude: sw.lat(),\n longitude: sw.lng()\n };\n }\n if (!_.includes(disabledEvents, 'zoom')) {\n s.zoom = _gMap.zoom;\n scope.idleAndZoomChanged = !scope.idleAndZoomChanged;\n }\n return settingFromDirective = false;\n });\n });\n }\n if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) {\n getEventHandler = function(eventName) {\n return function() {\n return scope.events[eventName].apply(scope, [_gMap, eventName, arguments]);\n };\n };\n customListeners = [];\n for (eventName in scope.events) {\n if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) {\n customListeners.push(google.maps.event.addListener(_gMap, eventName, getEventHandler(eventName)));\n }\n }\n listeners.concat(customListeners);\n }\n _gMap.getOptions = function() {\n return mapOptions;\n };\n scope.map = _gMap;\n if ((attrs.control != null) && (scope.control != null)) {\n scope.control.refresh = function(maybeCoords) {\n var coords, ref1, ref2;\n if (_gMap == null) {\n return;\n }\n if (((typeof google !== \"undefined\" && google !== null ? (ref1 = google.maps) != null ? (ref2 = ref1.event) != null ? ref2.trigger : void 0 : void 0 : void 0) != null) && (_gMap != null)) {\n google.maps.event.trigger(_gMap, 'resize');\n }\n if (((maybeCoords != null ? maybeCoords.latitude : void 0) != null) && ((maybeCoords != null ? maybeCoords.longitude : void 0) != null)) {\n coords = _this.getCoords(maybeCoords);\n if (_this.isTrue(attrs.pan)) {\n return _gMap.panTo(coords);\n } else {\n return _gMap.setCenter(coords);\n }\n }\n };\n scope.control.getGMap = function() {\n return _gMap;\n };\n scope.control.getMapOptions = function() {\n return mapOptions;\n };\n scope.control.getCustomEventListeners = function() {\n return customListeners;\n };\n scope.control.removeEvents = function(yourListeners) {\n return uiGmapEventsHelper.removeEvents(yourListeners);\n };\n }\n scope.$watch('center', function(newValue, oldValue) {\n var coords;\n if (newValue === oldValue || settingFromDirective) {\n return;\n }\n coords = _this.getCoords(scope.center);\n if (coords.lat() === _gMap.center.lat() && coords.lng() === _gMap.center.lng()) {\n return;\n }\n if (!dragging) {\n if (!_this.validateCoords(newValue)) {\n $log.error(\"Invalid center for newValue: \" + (JSON.stringify(newValue)));\n }\n if (_this.isTrue(attrs.pan) && scope.zoom === _gMap.zoom) {\n return _gMap.panTo(coords);\n } else {\n return _gMap.setCenter(coords);\n }\n }\n }, true);\n zoomPromise = null;\n scope.$watch('zoom', function(newValue, oldValue) {\n var ref1, ref2;\n if (newValue == null) {\n return;\n }\n if (_.isEqual(newValue, oldValue) || (_gMap != null ? _gMap.getZoom() : void 0) === (scope != null ? scope.zoom : void 0) || settingFromDirective) {\n return;\n }\n if (zoomPromise != null) {\n $timeout.cancel(zoomPromise);\n }\n return zoomPromise = $timeout(function() {\n return _gMap.setZoom(newValue);\n }, ((ref1 = scope.eventOpts) != null ? (ref2 = ref1.debounce) != null ? ref2.zoomMs : void 0 : void 0) + 20, false);\n });\n scope.$watch('bounds', function(newValue, oldValue) {\n var bounds, ne, ref1, ref2, ref3, ref4, sw;\n if (newValue === oldValue) {\n return;\n }\n if (((newValue != null ? (ref1 = newValue.northeast) != null ? ref1.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref2 = newValue.northeast) != null ? ref2.longitude : void 0 : void 0) == null) || ((newValue != null ? (ref3 = newValue.southwest) != null ? ref3.latitude : void 0 : void 0) == null) || ((newValue != null ? (ref4 = newValue.southwest) != null ? ref4.longitude : void 0 : void 0) == null)) {\n $log.error(\"Invalid map bounds for new value: \" + (JSON.stringify(newValue)));\n return;\n }\n ne = new google.maps.LatLng(newValue.northeast.latitude, newValue.northeast.longitude);\n sw = new google.maps.LatLng(newValue.southwest.latitude, newValue.southwest.longitude);\n bounds = new google.maps.LatLngBounds(sw, ne);\n return _gMap.fitBounds(bounds);\n });\n return ['options', 'styles'].forEach(function(toWatch) {\n return scope.$watch(toWatch, function(newValue, oldValue) {\n if (_.isEqual(newValue, oldValue)) {\n return;\n }\n if (toWatch === 'options') {\n opts.options = newValue;\n } else {\n opts.options[toWatch] = newValue;\n }\n if (_gMap != null) {\n return _gMap.setOptions(opts);\n }\n }, true);\n });\n };\n })(this));\n };\n\n return Map;\n\n })(uiGmapBaseObject);\n }]);\n\n}).call(this);\n","\n/*global _:true,angular:true */\n\n(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapMarker\", [\n \"uiGmapIMarker\", \"uiGmapMarkerChildModel\", \"uiGmapMarkerManager\", \"uiGmapLogger\", function(IMarker, MarkerChildModel, MarkerManager, $log) {\n var Marker;\n return Marker = (function(superClass) {\n extend(Marker, superClass);\n\n function Marker() {\n Marker.__super__.constructor.call(this);\n this.template = '';\n $log.info(this);\n }\n\n Marker.prototype.controller = [\n '$scope', '$element', function($scope, $element) {\n $scope.ctrlType = 'Marker';\n return _.extend(this, IMarker.handle($scope, $element));\n }\n ];\n\n Marker.prototype.link = function(scope, element, attrs, ctrl) {\n var mapPromise;\n mapPromise = IMarker.mapPromise(scope, ctrl);\n mapPromise.then(function(gMap) {\n var gManager, keys, m;\n gManager = new MarkerManager(gMap);\n keys = _.object(IMarker.keys, IMarker.keys);\n m = new MarkerChildModel({\n scope: scope,\n model: scope,\n keys: keys,\n gMap: gMap,\n doClick: true,\n gManager: gManager,\n doDrawSelf: false,\n trackModel: false\n });\n m.deferred.promise.then(function(gMarker) {\n return scope.deferred.resolve(gMarker);\n });\n if (scope.control != null) {\n return scope.control.getGMarkers = gManager.getGMarkers;\n }\n });\n return scope.$on('$destroy', function() {\n var gManager;\n if (typeof gManager !== \"undefined\" && gManager !== null) {\n gManager.clear();\n }\n return gManager = null;\n });\n };\n\n return Marker;\n\n })(IMarker);\n }\n ]);\n\n}).call(this);\n","\n/*global _:true,angular:true */\n\n(function() {\n var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module(\"uiGmapgoogle-maps.directives.api\").factory(\"uiGmapMarkers\", [\n \"uiGmapIMarker\", \"uiGmapPlural\", \"uiGmapMarkersParentModel\", \"uiGmap_sync\", \"uiGmapLogger\", function(IMarker, Plural, MarkersParentModel, _sync, $log) {\n var Markers;\n return Markers = (function(superClass) {\n extend(Markers, superClass);\n\n function Markers() {\n Markers.__super__.constructor.call(this);\n this.template = '';\n Plural.extend(this, {\n doCluster: '=?docluster',\n clusterOptions: '=clusteroptions',\n clusterEvents: '=clusterevents',\n modelsByRef: '=modelsbyref',\n type: '=?type',\n typeOptions: '=?typeoptions',\n typeEvents: '=?typeevents'\n });\n $log.info(this);\n }\n\n Markers.prototype.controller = [\n '$scope', '$element', function($scope, $element) {\n $scope.ctrlType = 'Markers';\n return _.extend(this, IMarker.handle($scope, $element));\n }\n ];\n\n Markers.prototype.link = function(scope, element, attrs, ctrl) {\n var parentModel, ready;\n parentModel = void 0;\n ready = function() {\n return scope.deferred.resolve();\n };\n return IMarker.mapPromise(scope, ctrl).then(function(map) {\n var mapScope;\n mapScope = ctrl.getScope();\n mapScope.$watch('idleAndZoomChanged', function() {\n return _.defer(parentModel.gManager.draw);\n });\n parentModel = new MarkersParentModel(scope, element, attrs, map);\n Plural.link(scope, parentModel);\n if (scope.control != null) {\n scope.control.getGMarkers = function() {\n var ref;\n return (ref = parentModel.gManager) != null ? ref.getGMarkers() : void 0;\n };\n scope.control.getChildMarkers = function() {\n return parentModel.plurals;\n };\n }\n return _.last(parentModel.existingPieces._content).then(function() {\n return ready();\n });\n });\n };\n\n return Markers;\n\n })(IMarker);\n }\n ]);\n\n}).call(this);\n","\n/*global angular */\n\n(function() {\n angular.module('uiGmapgoogle-maps.directives.api').service('uiGmapPlural', [\n function() {\n var _initControl;\n _initControl = function(scope, parent) {\n if (scope.control == null) {\n return;\n }\n scope.control.updateModels = function(models) {\n scope.models = models;\n return parent.createChildScopes(false);\n };\n scope.control.newModels = function(models) {\n scope.models = models;\n return parent.rebuildAll(scope, true, true);\n };\n scope.control.clean = function() {\n return parent.rebuildAll(scope, false, true);\n };\n scope.control.getPlurals = function() {\n return parent.plurals;\n };\n scope.control.getManager = function() {\n return parent.gManager;\n };\n scope.control.hasManager = function() {\n return (parent.gManager != null) === true;\n };\n return scope.control.managerDraw = function() {\n var ref;\n if (scope.control.hasManager()) {\n return (ref = scope.control.getManager()) != null ? ref.draw() : void 0;\n }\n };\n };\n return {\n extend: function(obj, obj2) {\n return _.extend(obj.scope || {}, obj2 || {}, {\n idKey: '=idkey',\n doRebuildAll: '=dorebuildall',\n models: '=models',\n chunk: '=chunk',\n cleanchunk: '=cleanchunk',\n control: '=control'\n });\n },\n link: function(scope, parent) {\n return _initControl(scope, parent);\n }\n };\n }\n ]);\n\n}).call(this);\n","\n/*global angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygon', [\n 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonChildModel', function(IPolygon, $timeout, PolygonChild) {\n var Polygon;\n return Polygon = (function(superClass) {\n extend(Polygon, superClass);\n\n function Polygon() {\n this.link = bind(this.link, this);\n return Polygon.__super__.constructor.apply(this, arguments);\n }\n\n Polygon.prototype.link = function(scope, element, attrs, mapCtrl) {\n var children, promise;\n children = [];\n promise = IPolygon.mapPromise(scope, mapCtrl);\n if (scope.control != null) {\n scope.control.getInstance = this;\n scope.control.polygons = children;\n scope.control.promise = promise;\n }\n return promise.then((function(_this) {\n return function(gMap) {\n return children.push(new PolygonChild({\n scope: scope,\n attrs: attrs,\n gMap: gMap,\n defaults: _this.DEFAULTS\n }));\n };\n })(this));\n };\n\n return Polygon;\n\n })(IPolygon);\n }\n ]);\n\n}).call(this);\n","\n/*global angular:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolygons', [\n 'uiGmapIPolygon', '$timeout', 'uiGmapPolygonsParentModel', 'uiGmapPlural', function(Interface, $timeout, ParentModel, Plural) {\n var Polygons;\n return Polygons = (function(superClass) {\n extend(Polygons, superClass);\n\n function Polygons() {\n this.link = bind(this.link, this);\n Polygons.__super__.constructor.call(this);\n Plural.extend(this);\n this.$log.info(this);\n }\n\n Polygons.prototype.link = function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then((function(_this) {\n return function(map) {\n if (angular.isUndefined(scope.path) || scope.path === null) {\n _this.$log.warn('polygons: no valid path attribute found');\n }\n if (!scope.models) {\n _this.$log.warn('polygons: no models found to create from');\n }\n return Plural.link(scope, new ParentModel(scope, element, attrs, map, _this.DEFAULTS));\n };\n })(this));\n };\n\n return Polygons;\n\n })(Interface);\n }\n ]);\n\n}).call(this);\n","\n/*global angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolyline', [\n 'uiGmapIPolyline', '$timeout', 'uiGmapPolylineChildModel', function(IPolyline, $timeout, PolylineChildModel) {\n var Polyline;\n return Polyline = (function(superClass) {\n extend(Polyline, superClass);\n\n function Polyline() {\n this.link = bind(this.link, this);\n return Polyline.__super__.constructor.apply(this, arguments);\n }\n\n Polyline.prototype.link = function(scope, element, attrs, mapCtrl) {\n return IPolyline.mapPromise(scope, mapCtrl).then((function(_this) {\n return function(gMap) {\n if (angular.isUndefined(scope.path) || scope.path === null || !_this.validatePath(scope.path)) {\n _this.$log.warn('polyline: no valid path attribute found');\n }\n return new PolylineChildModel({\n scope: scope,\n attrs: attrs,\n gMap: gMap,\n defaults: _this.DEFAULTS\n });\n };\n })(this));\n };\n\n return Polyline;\n\n })(IPolyline);\n }\n ]);\n\n}).call(this);\n","\n/*global angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapPolylines', [\n 'uiGmapIPolyline', '$timeout', 'uiGmapPolylinesParentModel', 'uiGmapPlural', function(IPolyline, $timeout, PolylinesParentModel, Plural) {\n var Polylines;\n return Polylines = (function(superClass) {\n extend(Polylines, superClass);\n\n function Polylines() {\n this.link = bind(this.link, this);\n Polylines.__super__.constructor.call(this);\n Plural.extend(this);\n this.$log.info(this);\n }\n\n Polylines.prototype.link = function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then((function(_this) {\n return function(gMap) {\n if (angular.isUndefined(scope.path) || scope.path === null) {\n _this.$log.warn('polylines: no valid path attribute found');\n }\n if (!scope.models) {\n _this.$log.warn('polylines: no models found to create from');\n }\n return Plural.link(scope, new PolylinesParentModel(scope, element, attrs, gMap, _this.DEFAULTS));\n };\n })(this));\n };\n\n return Polylines;\n\n })(IPolyline);\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapRectangle', [\n 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapIRectangle', 'uiGmapRectangleParentModel', function($log, GmapUtil, IRectangle, RectangleParentModel) {\n return _.extend(IRectangle, {\n link: function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then(function(gMap) {\n return new RectangleParentModel(scope, element, attrs, gMap);\n });\n }\n });\n }\n ]);\n\n}).call(this);\n","\n/*global angular:true */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindow', [\n 'uiGmapIWindow', 'uiGmapGmapUtil', 'uiGmapWindowChildModel', 'uiGmapLodash', 'uiGmapLogger', function(IWindow, GmapUtil, WindowChildModel, uiGmapLodash, $log) {\n var Window;\n return Window = (function(superClass) {\n extend(Window, superClass);\n\n Window.include(GmapUtil);\n\n function Window() {\n this.link = bind(this.link, this);\n Window.__super__.constructor.call(this);\n this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarker'];\n this.template = '';\n $log.debug(this);\n this.childWindows = [];\n }\n\n Window.prototype.link = function(scope, element, attrs, ctrls) {\n var markerCtrl, markerScope;\n markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0;\n markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0;\n this.mapPromise = IWindow.mapPromise(scope, ctrls[0]);\n return this.mapPromise.then((function(_this) {\n return function(gMap) {\n var isIconVisibleOnClick;\n isIconVisibleOnClick = true;\n if (angular.isDefined(attrs.isiconvisibleonclick)) {\n isIconVisibleOnClick = scope.isIconVisibleOnClick;\n }\n if (!markerCtrl) {\n _this.init(scope, element, isIconVisibleOnClick, gMap);\n return;\n }\n return markerScope.deferred.promise.then(function(gMarker) {\n return _this.init(scope, element, isIconVisibleOnClick, gMap, markerScope);\n });\n };\n })(this));\n };\n\n Window.prototype.init = function(scope, element, isIconVisibleOnClick, gMap, markerScope) {\n var childWindow, defaults, gMarker, hasScopeCoords, opts;\n defaults = scope.options != null ? scope.options : {};\n hasScopeCoords = (scope != null) && this.validateCoords(scope.coords);\n if ((markerScope != null ? markerScope['getGMarker'] : void 0) != null) {\n gMarker = markerScope.getGMarker();\n }\n opts = hasScopeCoords ? this.createWindowOptions(gMarker, scope, element.html(), defaults) : defaults;\n if (gMap != null) {\n childWindow = new WindowChildModel({\n scope: scope,\n opts: opts,\n isIconVisibleOnClick: isIconVisibleOnClick,\n gMap: gMap,\n markerScope: markerScope,\n element: element\n });\n this.childWindows.push(childWindow);\n scope.$on('$destroy', (function(_this) {\n return function() {\n _this.childWindows = uiGmapLodash.withoutObjects(_this.childWindows, [childWindow], function(child1, child2) {\n return child1.scope.$id === child2.scope.$id;\n });\n return _this.childWindows.length = 0;\n };\n })(this));\n }\n if (scope.control != null) {\n scope.control.getGWindows = (function(_this) {\n return function() {\n return _this.childWindows.map(function(child) {\n return child.gObject;\n });\n };\n })(this);\n scope.control.getChildWindows = (function(_this) {\n return function() {\n return _this.childWindows;\n };\n })(this);\n scope.control.getPlurals = scope.control.getChildWindows;\n scope.control.showWindow = (function(_this) {\n return function() {\n return _this.childWindows.map(function(child) {\n return child.showWindow();\n });\n };\n })(this);\n scope.control.hideWindow = (function(_this) {\n return function() {\n return _this.childWindows.map(function(child) {\n return child.hideWindow();\n });\n };\n })(this);\n }\n if ((this.onChildCreation != null) && (childWindow != null)) {\n return this.onChildCreation(childWindow);\n }\n };\n\n return Window;\n\n })(IWindow);\n }\n ]);\n\n}).call(this);\n","\n/*global angular */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapWindows', [\n 'uiGmapIWindow', 'uiGmapPlural', 'uiGmapWindowsParentModel', 'uiGmapPromise', 'uiGmapLogger', function(IWindow, Plural, WindowsParentModel, uiGmapPromise, $log) {\n\n /*\n Windows directive where many windows map to the models property\n */\n var Windows;\n return Windows = (function(superClass) {\n extend(Windows, superClass);\n\n function Windows() {\n this.link = bind(this.link, this);\n Windows.__super__.constructor.call(this);\n this.require = ['^' + 'uiGmapGoogleMap', '^?' + 'uiGmapMarkers'];\n this.template = '';\n Plural.extend(this);\n $log.debug(this);\n }\n\n Windows.prototype.link = function(scope, element, attrs, ctrls) {\n var mapScope, markerCtrl, markerScope;\n mapScope = ctrls[0].getScope();\n markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0;\n markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0;\n return mapScope.deferred.promise.then((function(_this) {\n return function(map) {\n var promise, ref;\n promise = (markerScope != null ? (ref = markerScope.deferred) != null ? ref.promise : void 0 : void 0) || uiGmapPromise.resolve();\n return promise.then(function() {\n var pieces, ref1;\n pieces = (ref1 = _this.parentModel) != null ? ref1.existingPieces : void 0;\n if (pieces) {\n return pieces.then(function() {\n return _this.init(scope, element, attrs, ctrls, map, markerScope);\n });\n } else {\n return _this.init(scope, element, attrs, ctrls, map, markerScope);\n }\n });\n };\n })(this));\n };\n\n Windows.prototype.init = function(scope, element, attrs, ctrls, map, additionalScope) {\n var parentModel;\n parentModel = new WindowsParentModel(scope, element, attrs, ctrls, map, additionalScope);\n Plural.link(scope, parentModel);\n if (scope.control != null) {\n scope.control.getGWindows = function() {\n return parentModel.plurals.map(function(child) {\n return child.gObject;\n });\n };\n return scope.control.getChildWindows = function() {\n return parentModel.plurals;\n };\n }\n };\n\n return Windows;\n\n })(IWindow);\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\nNick Baugh - https://github.com/niftylettuce\n */\n\n\n/*globals angular */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapGoogleMap\", ['uiGmapMap', function(uiGmapMap) {\n return new uiGmapMap();\n }]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nMap marker directive\n\nThis directive is used to create a marker on an existing map.\nThis directive creates a new scope.\n\n{attribute coords required} object containing latitude and longitude properties\n{attribute icon optional} string url to image used for marker icon\n{attribute animate optional} if set to false, the marker won't be animated (on by default)\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapMarker', [\n '$timeout', 'uiGmapMarker', function($timeout, Marker) {\n return new Marker($timeout);\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nMap marker directive\n\nThis directive is used to create a marker on an existing map.\nThis directive creates a new scope.\n\n{attribute coords required} object containing latitude and longitude properties\n{attribute icon optional} string url to image used for marker icon\n{attribute animate optional} if set to false, the marker won't be animated (on by default)\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapMarkers', [\n '$timeout', 'uiGmapMarkers', function($timeout, Markers) {\n return new Markers($timeout);\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\nRick Huizinga - https://plus.google.com/+RickHuizinga\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapPolygon', [\n 'uiGmapPolygon', function(Polygon) {\n return new Polygon();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nJulian Popescu - https://github.com/jpopesculian\nRick Huizinga - https://plus.google.com/+RickHuizinga\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive(\"uiGmapCircle\", [\n \"uiGmapCircle\", function(Circle) {\n return Circle;\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapPolyline\", [\n \"uiGmapPolyline\", function(Polyline) {\n return new Polyline();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapPolylines', [\n 'uiGmapPolylines', function(Polylines) {\n return new Polylines();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\nChentsu Lin - https://github.com/ChenTsuLin\n */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapRectangle\", [\n \"uiGmapLogger\", \"uiGmapRectangle\", function($log, Rectangle) {\n return Rectangle;\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nMap info window directive\n\nThis directive is used to create an info window on an existing map.\nThis directive creates a new scope.\n\n{attribute coords required} object containing latitude and longitude properties\n{attribute show optional} map will show when this expression returns true\n */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapWindow\", [\n \"$timeout\", \"$compile\", \"$http\", \"$templateCache\", \"uiGmapWindow\", function($timeout, $compile, $http, $templateCache, Window) {\n return new Window($timeout, $compile, $http, $templateCache);\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nMap info window directive\n\nThis directive is used to create an info window on an existing map.\nThis directive creates a new scope.\n\n{attribute coords required} object containing latitude and longitude properties\n{attribute show optional} map will show when this expression returns true\n */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapWindows\", [\n \"$timeout\", \"$compile\", \"$http\", \"$templateCache\", \"$interpolate\", \"uiGmapWindows\", function($timeout, $compile, $http, $templateCache, $interpolate, Windows) {\n return new Windows($timeout, $compile, $http, $templateCache, $interpolate);\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors:\n- Nicolas Laplante https://plus.google.com/108189012221374960701\n- Nicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nMap Layer directive\n\nThis directive is used to create any type of Layer from the google maps sdk.\nThis directive creates a new scope.\n\n{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module('uiGmapgoogle-maps').directive('uiGmapLayer', [\n '$timeout', 'uiGmapLogger', 'uiGmapLayerParentModel', function($timeout, Logger, LayerParentModel) {\n var Layer;\n Layer = (function() {\n function Layer() {\n this.link = bind(this.link, this);\n this.$log = Logger;\n this.restrict = 'EMA';\n this.require = '^' + 'uiGmapGoogleMap';\n this.priority = -1;\n this.transclude = true;\n this.template = '';\n this.replace = true;\n this.scope = {\n show: '=show',\n type: '=type',\n namespace: '=namespace',\n options: '=options',\n onCreated: '&oncreated'\n };\n }\n\n Layer.prototype.link = function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then((function(_this) {\n return function(map) {\n if (scope.onCreated != null) {\n return new LayerParentModel(scope, element, attrs, map, scope.onCreated);\n } else {\n return new LayerParentModel(scope, element, attrs, map);\n }\n };\n })(this));\n };\n\n return Layer;\n\n })();\n return new Layer();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nAdam Kreitals, kreitals@hotmail.com\n */\n\n\n/*\nmapControl directive\n\nThis directive is used to create a custom control element on an existing map.\nThis directive creates a new scope.\n\n{attribute template required} \tstring url of the template to be used for the control\n{attribute position optional} \tstring position of the control of the form top-left or TOP_LEFT defaults to TOP_CENTER\n{attribute controller optional}\tstring controller to be applied to the template\n{attribute index optional}\t\tnumber index for controlling the order of similarly positioned mapControl elements\n */\n\n(function() {\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapMapControl\", [\n \"uiGmapControl\", function(Control) {\n return new Control();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicholas McCready - https://twitter.com/nmccready\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapDragZoom', [\n 'uiGmapDragZoom', function(DragZoom) {\n return DragZoom;\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps').directive(\"uiGmapDrawingManager\", [\n \"uiGmapDrawingManager\", function(DrawingManager) {\n return DrawingManager;\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicholas McCready - https://twitter.com/nmccready\n * Brunt of the work is in DrawFreeHandChildModel\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapFreeDrawPolygons', [\n 'uiGmapApiFreeDrawPolygons', function(FreeDrawPolygons) {\n return new FreeDrawPolygons();\n }\n ]);\n\n}).call(this);\n","\n/*\nMap Layer directive\n\nThis directive is used to create any type of Layer from the google maps sdk.\nThis directive creates a new scope.\n\n{attribute show optional} true (default) shows the trafficlayer otherwise it is hidden\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module(\"uiGmapgoogle-maps\").directive(\"uiGmapMapType\", [\n \"$timeout\", \"uiGmapLogger\", \"uiGmapMapTypeParentModel\", function($timeout, Logger, MapTypeParentModel) {\n var MapType;\n MapType = (function() {\n function MapType() {\n this.link = bind(this.link, this);\n this.$log = Logger;\n this.restrict = \"EMA\";\n this.require = '^' + 'uiGmapGoogleMap';\n this.priority = -1;\n this.transclude = true;\n this.template = '';\n this.replace = true;\n this.scope = {\n show: \"=show\",\n options: '=options',\n refresh: '=refresh',\n id: '@'\n };\n }\n\n MapType.prototype.link = function(scope, element, attrs, mapCtrl) {\n return mapCtrl.getScope().deferred.promise.then((function(_this) {\n return function(map) {\n return new MapTypeParentModel(scope, element, attrs, map);\n };\n })(this));\n };\n\n return MapType;\n\n })();\n return new MapType();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors\nNicolas Laplante - https://plus.google.com/108189012221374960701\nNicholas McCready - https://twitter.com/nmccready\nRick Huizinga - https://plus.google.com/+RickHuizinga\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapPolygons', [\n 'uiGmapPolygons', function(Polygons) {\n return new Polygons();\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors:\n- Nicolas Laplante https://plus.google.com/108189012221374960701\n- Nicholas McCready - https://twitter.com/nmccready\n- Carrie Kengle - http://about.me/carrie\n */\n\n\n/*\nPlaces Search Box directive\n\nThis directive is used to create a Places Search Box.\nThis directive creates a new scope.\n\n{attribute input required} HTMLInputElement\n{attribute options optional} The options that can be set on a SearchBox object (google.maps.places.SearchBoxOptions object specification)\n */\n\n(function() {\n var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n angular.module('uiGmapgoogle-maps').directive('uiGmapSearchBox', [\n 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapSearchBoxParentModel', '$http', '$templateCache', '$compile', function(GoogleMapApi, Logger, SearchBoxParentModel, $http, $templateCache, $compile) {\n var SearchBox;\n SearchBox = (function() {\n SearchBox.prototype.require = 'ngModel';\n\n function SearchBox() {\n this.link = bind(this.link, this);\n this.$log = Logger;\n this.restrict = 'EMA';\n this.require = '^' + 'uiGmapGoogleMap';\n this.priority = -1;\n this.transclude = true;\n this.template = '';\n this.replace = true;\n this.scope = {\n template: '=template',\n events: '=events',\n position: '=?position',\n options: '=?options',\n parentdiv: '=?parentdiv',\n ngModel: \"=?\"\n };\n }\n\n SearchBox.prototype.link = function(scope, element, attrs, mapCtrl) {\n return GoogleMapApi.then((function(_this) {\n return function(maps) {\n if (scope.template == null) {\n $templateCache.put('uigmap-searchbox-default.tpl.html', '');\n scope.template = 'uigmap-searchbox-default.tpl.html';\n }\n return $http.get(scope.template, {\n cache: $templateCache\n }).success(function(template) {\n if (angular.isUndefined(scope.events)) {\n _this.$log.error('searchBox: the events property is required');\n return;\n }\n return mapCtrl.getScope().deferred.promise.then(function(map) {\n var ctrlPosition;\n ctrlPosition = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_LEFT';\n if (!maps.ControlPosition[ctrlPosition]) {\n _this.$log.error('searchBox: invalid position property');\n return;\n }\n return new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, $compile(template)(scope));\n });\n });\n };\n })(this));\n };\n\n return SearchBox;\n\n })();\n return new SearchBox();\n }\n ]);\n\n}).call(this);\n","(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapShow', [\n '$animate', 'uiGmapLogger', function($animate, $log) {\n return {\n scope: {\n 'uiGmapShow': '=',\n 'uiGmapAfterShow': '&',\n 'uiGmapAfterHide': '&'\n },\n link: function(scope, element) {\n var angular_post_1_3_handle, angular_pre_1_3_handle, handle;\n angular_post_1_3_handle = function(animateAction, cb) {\n return $animate[animateAction](element, 'ng-hide').then(function() {\n return cb();\n });\n };\n angular_pre_1_3_handle = function(animateAction, cb) {\n return $animate[animateAction](element, 'ng-hide', cb);\n };\n handle = function(animateAction, cb) {\n if (angular.version.major > 1) {\n return $log.error(\"uiGmapShow is not supported for Angular Major greater than 1.\\nYour Major is \" + angular.version.major + \"\\\"\");\n }\n if (angular.version.major === 1 && angular.version.minor < 3) {\n return angular_pre_1_3_handle(animateAction, cb);\n }\n return angular_post_1_3_handle(animateAction, cb);\n };\n return scope.$watch('uiGmapShow', function(show) {\n if (show) {\n handle('removeClass', scope.uiGmapAfterShow);\n }\n if (!show) {\n return handle('addClass', scope.uiGmapAfterHide);\n }\n });\n }\n };\n }\n ]);\n\n}).call(this);\n","\n/*\n@authors:\n- Nicholas McCready - https://twitter.com/nmccready\n */\n\n\n/*\nStreetViewPanorama Directive to care of basic initialization of StreetViewPanorama\n */\n\n(function() {\n angular.module('uiGmapgoogle-maps').directive('uiGmapStreetViewPanorama', [\n 'uiGmapGoogleMapApi', 'uiGmapLogger', 'uiGmapGmapUtil', 'uiGmapEventsHelper', function(GoogleMapApi, $log, GmapUtil, EventsHelper) {\n var name;\n name = 'uiGmapStreetViewPanorama';\n return {\n restrict: 'EMA',\n template: '
',\n replace: true,\n scope: {\n focalcoord: '=',\n radius: '=?',\n events: '=?',\n options: '=?',\n control: '=?',\n povoptions: '=?',\n imagestatus: '='\n },\n link: function(scope, element, attrs) {\n return GoogleMapApi.then((function(_this) {\n return function(maps) {\n var clean, create, didCreateOptionsFromDirective, firstTime, handleSettings, listeners, opts, pano, povOpts, sv;\n pano = void 0;\n sv = void 0;\n didCreateOptionsFromDirective = false;\n listeners = void 0;\n opts = null;\n povOpts = null;\n clean = function() {\n EventsHelper.removeEvents(listeners);\n if (pano != null) {\n pano.unbind('position');\n pano.setVisible(false);\n }\n if (sv != null) {\n if ((sv != null ? sv.setVisible : void 0) != null) {\n sv.setVisible(false);\n }\n return sv = void 0;\n }\n };\n handleSettings = function(perspectivePoint, focalPoint) {\n var heading;\n heading = google.maps.geometry.spherical.computeHeading(perspectivePoint, focalPoint);\n didCreateOptionsFromDirective = true;\n scope.radius = scope.radius || 50;\n povOpts = angular.extend({\n heading: heading,\n zoom: 1,\n pitch: 0\n }, scope.povoptions || {});\n opts = opts = angular.extend({\n navigationControl: false,\n addressControl: false,\n linksControl: false,\n position: perspectivePoint,\n pov: povOpts,\n visible: true\n }, scope.options || {});\n return didCreateOptionsFromDirective = false;\n };\n create = function() {\n var focalPoint;\n if (!scope.focalcoord) {\n $log.error(name + \": focalCoord needs to be defined\");\n return;\n }\n if (!scope.radius) {\n $log.error(name + \": needs a radius to set the camera view from its focal target.\");\n return;\n }\n clean();\n if (sv == null) {\n sv = new google.maps.StreetViewService();\n }\n if (scope.events) {\n listeners = EventsHelper.setEvents(sv, scope, scope);\n }\n focalPoint = GmapUtil.getCoords(scope.focalcoord);\n return sv.getPanoramaByLocation(focalPoint, scope.radius, function(streetViewPanoramaData, status) {\n var ele, perspectivePoint, ref;\n if (scope.imagestatus != null) {\n scope.imagestatus = status;\n }\n if (((ref = scope.events) != null ? ref.image_status_changed : void 0) != null) {\n scope.events.image_status_changed(sv, 'image_status_changed', scope, status);\n }\n if (status === \"OK\") {\n perspectivePoint = streetViewPanoramaData.location.latLng;\n handleSettings(perspectivePoint, focalPoint);\n ele = element[0];\n return pano = new google.maps.StreetViewPanorama(ele, opts);\n }\n });\n };\n if (scope.control != null) {\n scope.control.getOptions = function() {\n return opts;\n };\n scope.control.getPovOptions = function() {\n return povOpts;\n };\n scope.control.getGObject = function() {\n return sv;\n };\n scope.control.getGPano = function() {\n return pano;\n };\n }\n scope.$watch('options', function(newValue, oldValue) {\n if (newValue === oldValue || newValue === opts || didCreateOptionsFromDirective) {\n return;\n }\n return create();\n });\n firstTime = true;\n scope.$watch('focalcoord', function(newValue, oldValue) {\n if (newValue === oldValue && !firstTime) {\n return;\n }\n if (newValue == null) {\n return;\n }\n firstTime = false;\n return create();\n });\n return scope.$on('$destroy', function() {\n return clean();\n });\n };\n })(this));\n }\n };\n }\n ]);\n\n}).call(this);\n","angular.module('uiGmapgoogle-maps.wrapped')\n.service('uiGmapuuid', function() {\n //BEGIN REPLACE\n /* istanbul ignore next */\n /*\n Version: core-1.0\n The MIT License: Copyright (c) 2012 LiosK.\n*/\nfunction UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+\"-\"+b(a(16),4)+\"-\"+b(16384|a(12),4)+\"-\"+b(32768|a(14),4)+\"-\"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<>>=1,e+=e)d&1&&(c=e+c);return c};\n\n //END REPLACE\nreturn UUID;\n});\n","// wrap the utility libraries needed in ./lib\n// http://google-maps-utility-library-v3.googlecode.com/svn/\nangular.module('uiGmapgoogle-maps.wrapped')\n.service('uiGmapGoogleMapsUtilV3', function () {\n return {\n init: _.once(function () {\n //BEGIN REPLACE\n /* istanbul ignore next */\n +function(){\n function ClusterIcon(cluster,styles){cluster.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.cluster_=cluster,this.className_=cluster.getMarkerClusterer().getClusterClass(),this.styles_=styles,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(cluster.getMap())}function Cluster(mc){this.markerClusterer_=mc,this.map_=mc.getMap(),this.gridSize_=mc.getGridSize(),this.minClusterSize_=mc.getMinimumClusterSize(),this.averageCenter_=mc.getAverageCenter(),this.hideLabel_=mc.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,mc.getStyles())}function MarkerClusterer(map,opt_markers,opt_options){this.extend(MarkerClusterer,google.maps.OverlayView),opt_markers=opt_markers||[],opt_options=opt_options||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=opt_options.gridSize||60,this.minClusterSize_=opt_options.minimumClusterSize||2,this.maxZoom_=opt_options.maxZoom||null,this.styles_=opt_options.styles||[],this.title_=opt_options.title||\"\",this.zoomOnClick_=!0,void 0!==opt_options.zoomOnClick&&(this.zoomOnClick_=opt_options.zoomOnClick),this.averageCenter_=!1,void 0!==opt_options.averageCenter&&(this.averageCenter_=opt_options.averageCenter),this.ignoreHidden_=!1,void 0!==opt_options.ignoreHidden&&(this.ignoreHidden_=opt_options.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==opt_options.enableRetinaIcons&&(this.enableRetinaIcons_=opt_options.enableRetinaIcons),this.hideLabel_=!1,void 0!==opt_options.hideLabel&&(this.hideLabel_=opt_options.hideLabel),this.imagePath_=opt_options.imagePath||MarkerClusterer.IMAGE_PATH,this.imageExtension_=opt_options.imageExtension||MarkerClusterer.IMAGE_EXTENSION,this.imageSizes_=opt_options.imageSizes||MarkerClusterer.IMAGE_SIZES,this.calculator_=opt_options.calculator||MarkerClusterer.CALCULATOR,this.batchSize_=opt_options.batchSize||MarkerClusterer.BATCH_SIZE,this.batchSizeIE_=opt_options.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE,this.clusterClass_=opt_options.clusterClass||\"cluster\",-1!==navigator.userAgent.toLowerCase().indexOf(\"msie\")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(opt_markers,!0),this.setMap(map)}ClusterIcon.prototype.onAdd=function(){var cMouseDownInCluster,cDraggingMapByCluster,cClusterIcon=this;this.div_=document.createElement(\"div\"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),\"bounds_changed\",function(){cDraggingMapByCluster=cMouseDownInCluster}),google.maps.event.addDomListener(this.div_,\"mousedown\",function(){cMouseDownInCluster=!0,cDraggingMapByCluster=!1}),google.maps.event.addDomListener(this.div_,\"click\",function(e){if(cMouseDownInCluster=!1,!cDraggingMapByCluster){var theBounds,mz,mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,\"click\",cClusterIcon.cluster_),google.maps.event.trigger(mc,\"clusterclick\",cClusterIcon.cluster_),mc.getZoomOnClick()&&(mz=mc.getMaxZoom(),theBounds=cClusterIcon.cluster_.getBounds(),mc.getMap().fitBounds(theBounds),setTimeout(function(){mc.getMap().fitBounds(theBounds),null!==mz&&mc.getMap().getZoom()>mz&&mc.getMap().setZoom(mz+1)},100)),e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}}),google.maps.event.addDomListener(this.div_,\"mouseover\",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,\"mouseover\",cClusterIcon.cluster_)}),google.maps.event.addDomListener(this.div_,\"mouseout\",function(){var mc=cClusterIcon.cluster_.getMarkerClusterer();google.maps.event.trigger(mc,\"mouseout\",cClusterIcon.cluster_)})},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.draw=function(){if(this.visible_){var pos=this.getPosFromLatLng_(this.center_);this.div_.style.top=pos.y+\"px\",this.div_.style.left=pos.x+\"px\"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display=\"none\"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var img=\"\",bp=this.backgroundPosition_.split(\" \"),spriteH=parseInt(bp[0].trim(),10),spriteV=parseInt(bp[1].trim(),10),pos=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(pos),img=\"\",this.div_.innerHTML=img+\"
\"+(this.cluster_.hideLabel_?\" \":this.sums_.text)+\"
\",this.div_.title=\"undefined\"==typeof this.sums_.title||\"\"===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=\"\"}this.visible_=!0},ClusterIcon.prototype.useStyle=function(sums){this.sums_=sums;var index=Math.max(0,sums.index-1);index=Math.min(this.styles_.length-1,index);var style=this.styles_[index];this.url_=style.url,this.height_=style.height,this.width_=style.width,this.anchorText_=style.anchorText||[0,0],this.anchorIcon_=style.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=style.textColor||\"black\",this.textSize_=style.textSize||11,this.textDecoration_=style.textDecoration||\"none\",this.fontWeight_=style.fontWeight||\"bold\",this.fontStyle_=style.fontStyle||\"normal\",this.fontFamily_=style.fontFamily||\"Arial,sans-serif\",this.backgroundPosition_=style.backgroundPosition||\"0 0\"},ClusterIcon.prototype.setCenter=function(center){this.center_=center},ClusterIcon.prototype.createCss=function(pos){var style=[];return style.push(\"cursor: pointer;\"),style.push(\"position: absolute; top: \"+pos.y+\"px; left: \"+pos.x+\"px;\"),style.push(\"width: \"+this.width_+\"px; height: \"+this.height_+\"px;\"),style.join(\"\")},ClusterIcon.prototype.getPosFromLatLng_=function(latlng){var pos=this.getProjection().fromLatLngToDivPixel(latlng);return pos.x-=this.anchorIcon_[1],pos.y-=this.anchorIcon_[0],pos.x=parseInt(pos.x,10),pos.y=parseInt(pos.y,10),pos},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){var i,bounds=new google.maps.LatLngBounds(this.center_,this.center_),markers=this.getMarkers();for(i=0;imz)marker.getMap()!==this.map_&&marker.setMap(this.map_);else if(mCounti;i++)this.markers_[i].setMap(null);else marker.setMap(null);return!0},Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds_.contains(marker.getPosition())},Cluster.prototype.calculateBounds_=function(){var bounds=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(bounds)},Cluster.prototype.updateIcon_=function(){var mCount=this.markers_.length,mz=this.markerClusterer_.getMaxZoom();if(null!==mz&&this.map_.getZoom()>mz)return void this.clusterIcon_.hide();if(mCounti;i++)if(marker===this.markers_[i])return!0;return!1},MarkerClusterer.prototype.onAdd=function(){var cMarkerClusterer=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),\"zoom_changed\",function(){cMarkerClusterer.resetViewport_(!1),(this.getZoom()===(this.get(\"minZoom\")||0)||this.getZoom()===this.get(\"maxZoom\"))&&google.maps.event.trigger(this,\"idle\")}),google.maps.event.addListener(this.getMap(),\"idle\",function(){cMarkerClusterer.redraw_()})]},MarkerClusterer.prototype.onRemove=function(){var i;for(i=0;i0))for(i=0;id&&(distance=d,clusterToAddTo=cluster));clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker)?clusterToAddTo.addMarker(marker):(cluster=new Cluster(this),cluster.addMarker(marker),this.clusters_.push(cluster))},MarkerClusterer.prototype.createClusters_=function(iFirst){var i,marker,mapBounds,cMarkerClusterer=this;if(this.ready_){0===iFirst&&(google.maps.event.trigger(this,\"clusteringbegin\",this),\"undefined\"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),mapBounds=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var bounds=this.getExtendedBounds(mapBounds),iLast=Math.min(iFirst+this.batchSize_,this.markers_.length);for(i=iFirst;iLast>i;i++)marker=this.markers_[i],!marker.isAdded&&this.isMarkerInBounds_(marker,bounds)&&(!this.ignoreHidden_||this.ignoreHidden_&&marker.getVisible())&&this.addToClosestCluster_(marker);if(iLastOverlayView class.\n *

\n * An InfoBox behaves like a google.maps.InfoWindow, but it supports several\n * additional properties for advanced styling. An InfoBox can also be used as a map label.\n *

\n * An InfoBox also fires the same events as a google.maps.InfoWindow.\n */\n\n/*jslint browser:true */\n/*global google */\n\n/**\n * @name InfoBoxOptions\n * @class This class represents the optional parameter passed to the {@link InfoBox} constructor.\n * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node).\n * @property {boolean} [disableAutoPan=false] Disable auto-pan on open.\n * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum.\n * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox\n * (or the bottom left corner if the alignBottom property is true)\n * to the map pixel corresponding to position.\n * @property {LatLng} position The geographic location at which to display the InfoBox.\n * @property {number} zIndex The CSS z-index style value for the InfoBox.\n * Note: This value overrides a zIndex setting specified in the boxStyle property.\n * @property {string} [boxClass=\"infoBox\"] The name of the CSS class defining the styles for the InfoBox container.\n * @property {Object} [boxStyle] An object literal whose properties define specific CSS\n * style values to be applied to the InfoBox. Style values defined here override those that may\n * be defined in the boxClass style sheet. If this property is changed after the\n * InfoBox has been created, all previously set styles (except those defined in the style sheet)\n * are removed from the InfoBox before the new style values are applied.\n * @property {string} closeBoxMargin The CSS margin style value for the close box.\n * The default is \"2px\" (a 2-pixel margin on all sides).\n * @property {string} closeBoxURL The URL of the image representing the close box.\n * Note: The default is the URL for Google's standard close box.\n * Set this property to \"\" if no close box is required.\n * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the\n * map edge after an auto-pan.\n * @property {boolean} [isHidden=false] Hide the InfoBox on open.\n * [Deprecated in favor of the visible property.]\n * @property {boolean} [visible=true] Show the InfoBox on open.\n * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the position\n * location (default is false which means that the top left corner of the InfoBox is aligned).\n * @property {string} pane The pane where the InfoBox is to appear (default is \"floatPane\").\n * Set the pane to \"mapPane\" if the InfoBox is being used as a map label.\n * Valid pane names are the property names for the google.maps.MapPanes object.\n * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout,\n * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox\n * (default is false to mimic the behavior of a google.maps.InfoWindow). Set\n * this property to true if the InfoBox is being used as a map label.\n */\n\n/**\n * Creates an InfoBox with the options specified in {@link InfoBoxOptions}.\n * Call InfoBox.open to add the box to the map.\n * @constructor\n * @param {InfoBoxOptions} [opt_opts]\n */\nfunction InfoBox(opt_opts) {\n\n opt_opts = opt_opts || {};\n\n google.maps.OverlayView.apply(this, arguments);\n\n // Standard options (in common with google.maps.InfoWindow):\n //\n this.content_ = opt_opts.content || \"\";\n this.disableAutoPan_ = opt_opts.disableAutoPan || false;\n this.maxWidth_ = opt_opts.maxWidth || 0;\n this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0);\n this.position_ = opt_opts.position || new google.maps.LatLng(0, 0);\n this.zIndex_ = opt_opts.zIndex || null;\n\n // Additional options (unique to InfoBox):\n //\n this.boxClass_ = opt_opts.boxClass || \"infoBox\";\n this.boxStyle_ = opt_opts.boxStyle || {};\n this.closeBoxMargin_ = opt_opts.closeBoxMargin || \"2px\";\n this.closeBoxURL_ = opt_opts.closeBoxURL || \"http://www.google.com/intl/en_us/mapfiles/close.gif\";\n if (opt_opts.closeBoxURL === \"\") {\n this.closeBoxURL_ = \"\";\n }\n this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1);\n\n if (typeof opt_opts.visible === \"undefined\") {\n if (typeof opt_opts.isHidden === \"undefined\") {\n opt_opts.visible = true;\n } else {\n opt_opts.visible = !opt_opts.isHidden;\n }\n }\n this.isHidden_ = !opt_opts.visible;\n\n this.alignBottom_ = opt_opts.alignBottom || false;\n this.pane_ = opt_opts.pane || \"floatPane\";\n this.enableEventPropagation_ = opt_opts.enableEventPropagation || false;\n\n this.div_ = null;\n this.closeListener_ = null;\n this.moveListener_ = null;\n this.contextListener_ = null;\n this.eventListeners_ = null;\n this.fixedWidthSet_ = null;\n}\n\n/* InfoBox extends OverlayView in the Google Maps API v3.\n */\nInfoBox.prototype = new google.maps.OverlayView();\n\n/**\n * Creates the DIV representing the InfoBox.\n * @private\n */\nInfoBox.prototype.createInfoBoxDiv_ = function () {\n\n var i;\n var events;\n var bw;\n var me = this;\n\n // This handler prevents an event in the InfoBox from being passed on to the map.\n //\n var cancelHandler = function (e) {\n e.cancelBubble = true;\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n };\n\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n //\n var ignoreHandler = function (e) {\n\n e.returnValue = false;\n\n if (e.preventDefault) {\n\n e.preventDefault();\n }\n\n if (!me.enableEventPropagation_) {\n\n cancelHandler(e);\n }\n };\n\n if (!this.div_) {\n\n this.div_ = document.createElement(\"div\");\n\n this.setBoxStyle_();\n\n if (typeof this.content_.nodeType === \"undefined\") {\n this.div_.innerHTML = this.getCloseBoxImg_() + this.content_;\n } else {\n this.div_.innerHTML = this.getCloseBoxImg_();\n this.div_.appendChild(this.content_);\n }\n\n // Add the InfoBox DIV to the DOM\n this.getPanes()[this.pane_].appendChild(this.div_);\n\n this.addClickHandler_();\n\n if (this.div_.style.width) {\n\n this.fixedWidthSet_ = true;\n\n } else {\n\n if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) {\n\n this.div_.style.width = this.maxWidth_;\n this.div_.style.overflow = \"auto\";\n this.fixedWidthSet_ = true;\n\n } else { // The following code is needed to overcome problems with MSIE\n\n bw = this.getBoxWidths_();\n\n this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + \"px\";\n this.fixedWidthSet_ = false;\n }\n }\n\n this.panBox_(this.disableAutoPan_);\n\n if (!this.enableEventPropagation_) {\n\n this.eventListeners_ = [];\n\n // Cancel event propagation.\n //\n // Note: mousemove not included (to resolve Issue 152)\n events = [\"mousedown\", \"mouseover\", \"mouseout\", \"mouseup\",\n \"click\", \"dblclick\", \"touchstart\", \"touchend\", \"touchmove\"];\n\n for (i = 0; i < events.length; i++) {\n\n this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler));\n }\n\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners_.push(google.maps.event.addDomListener(this.div_, \"mouseover\", function (e) {\n this.style.cursor = \"default\";\n }));\n }\n\n this.contextListener_ = google.maps.event.addDomListener(this.div_, \"contextmenu\", ignoreHandler);\n\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, \"domready\");\n }\n};\n\n/**\n * Returns the HTML tag for the close box.\n * @private\n */\nInfoBox.prototype.getCloseBoxImg_ = function () {\n\n var img = \"\";\n\n if (this.closeBoxURL_ !== \"\") {\n\n img = \"\";\n }\n\n return img;\n};\n\n/**\n * Adds the click handler to the InfoBox close box.\n * @private\n */\nInfoBox.prototype.addClickHandler_ = function () {\n\n var closeBox;\n\n if (this.closeBoxURL_ !== \"\") {\n\n closeBox = this.div_.firstChild;\n this.closeListener_ = google.maps.event.addDomListener(closeBox, \"click\", this.getCloseClickHandler_());\n\n } else {\n\n this.closeListener_ = null;\n }\n};\n\n/**\n * Returns the function to call when the user clicks the close box of an InfoBox.\n * @private\n */\nInfoBox.prototype.getCloseClickHandler_ = function () {\n\n var me = this;\n\n return function (e) {\n\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n e.cancelBubble = true;\n\n if (e.stopPropagation) {\n\n e.stopPropagation();\n }\n\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n google.maps.event.trigger(me, \"closeclick\");\n\n me.close();\n };\n};\n\n/**\n * Pans the map so that the InfoBox appears entirely within the map's visible area.\n * @private\n */\nInfoBox.prototype.panBox_ = function (disablePan) {\n\n var map;\n var bounds;\n var xOffset = 0, yOffset = 0;\n\n if (!disablePan) {\n\n map = this.getMap();\n\n if (map instanceof google.maps.Map) { // Only pan if attached to map, not panorama\n\n if (!map.getBounds().contains(this.position_)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position_);\n }\n\n bounds = map.getBounds();\n\n var mapDiv = map.getDiv();\n var mapWidth = mapDiv.offsetWidth;\n var mapHeight = mapDiv.offsetHeight;\n var iwOffsetX = this.pixelOffset_.width;\n var iwOffsetY = this.pixelOffset_.height;\n var iwWidth = this.div_.offsetWidth;\n var iwHeight = this.div_.offsetHeight;\n var padX = this.infoBoxClearance_.width;\n var padY = this.infoBoxClearance_.height;\n var pixPosition = this.getProjection().fromLatLngToContainerPixel(this.position_);\n\n if (pixPosition.x < (-iwOffsetX + padX)) {\n xOffset = pixPosition.x + iwOffsetX - padX;\n } else if ((pixPosition.x + iwWidth + iwOffsetX + padX) > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth;\n }\n if (this.alignBottom_) {\n if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight;\n } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight;\n }\n } else {\n if (pixPosition.y < (-iwOffsetY + padY)) {\n yOffset = pixPosition.y + iwOffsetY - padY;\n } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight;\n }\n }\n\n if (!(xOffset === 0 && yOffset === 0)) {\n\n // Move the map to the shifted center.\n //\n var c = map.getCenter();\n map.panBy(xOffset, yOffset);\n }\n }\n }\n};\n\n/**\n * Sets the style of the InfoBox by setting the style sheet and applying\n * other specific styles requested.\n * @private\n */\nInfoBox.prototype.setBoxStyle_ = function () {\n\n var i, boxStyle;\n\n if (this.div_) {\n\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div_.className = this.boxClass_;\n\n // Clear existing inline style values:\n this.div_.style.cssText = \"\";\n\n // Apply style values defined in the boxStyle parameter:\n boxStyle = this.boxStyle_;\n for (i in boxStyle) {\n\n if (boxStyle.hasOwnProperty(i)) {\n\n this.div_.style[i] = boxStyle[i];\n }\n }\n\n // Fix for iOS disappearing InfoBox problem.\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n this.div_.style.WebkitTransform = \"translateZ(0)\";\n\n // Fix up opacity style for benefit of MSIE:\n //\n if (typeof this.div_.style.opacity !== \"undefined\" && this.div_.style.opacity !== \"\") {\n // See http://www.quirksmode.org/css/opacity.html\n this.div_.style.MsFilter = \"\\\"progid:DXImageTransform.Microsoft.Alpha(Opacity=\" + (this.div_.style.opacity * 100) + \")\\\"\";\n this.div_.style.filter = \"alpha(opacity=\" + (this.div_.style.opacity * 100) + \")\";\n }\n\n // Apply required styles:\n //\n this.div_.style.position = \"absolute\";\n this.div_.style.visibility = 'hidden';\n if (this.zIndex_ !== null) {\n\n this.div_.style.zIndex = this.zIndex_;\n }\n }\n};\n\n/**\n * Get the widths of the borders of the InfoBox.\n * @private\n * @return {Object} widths object (top, bottom left, right)\n */\nInfoBox.prototype.getBoxWidths_ = function () {\n\n var computedStyle;\n var bw = {top: 0, bottom: 0, left: 0, right: 0};\n var box = this.div_;\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n\n computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, \"\");\n\n if (computedStyle) {\n\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0;\n }\n\n } else if (document.documentElement.currentStyle) { // MSIE\n\n if (box.currentStyle) {\n\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0;\n bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0;\n bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0;\n bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0;\n }\n }\n\n return bw;\n};\n\n/**\n * Invoked when close is called. Do not call it directly.\n */\nInfoBox.prototype.onRemove = function () {\n\n if (this.div_) {\n\n this.div_.parentNode.removeChild(this.div_);\n this.div_ = null;\n }\n};\n\n/**\n * Draws the InfoBox based on the current map projection and zoom level.\n */\nInfoBox.prototype.draw = function () {\n\n this.createInfoBoxDiv_();\n\n var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_);\n\n this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + \"px\";\n\n if (this.alignBottom_) {\n this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + \"px\";\n } else {\n this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + \"px\";\n }\n\n if (this.isHidden_) {\n\n this.div_.style.visibility = \"hidden\";\n\n } else {\n\n this.div_.style.visibility = \"visible\";\n }\n};\n\n/**\n * Sets the options for the InfoBox. Note that changes to the maxWidth,\n * closeBoxMargin, closeBoxURL, and enableEventPropagation\n * properties have no affect until the current InfoBox is closed and a new one\n * is opened.\n * @param {InfoBoxOptions} opt_opts\n */\nInfoBox.prototype.setOptions = function (opt_opts) {\n if (typeof opt_opts.boxClass !== \"undefined\") { // Must be first\n\n this.boxClass_ = opt_opts.boxClass;\n this.setBoxStyle_();\n }\n if (typeof opt_opts.boxStyle !== \"undefined\") { // Must be second\n\n this.boxStyle_ = opt_opts.boxStyle;\n this.setBoxStyle_();\n }\n if (typeof opt_opts.content !== \"undefined\") {\n\n this.setContent(opt_opts.content);\n }\n if (typeof opt_opts.disableAutoPan !== \"undefined\") {\n\n this.disableAutoPan_ = opt_opts.disableAutoPan;\n }\n if (typeof opt_opts.maxWidth !== \"undefined\") {\n\n this.maxWidth_ = opt_opts.maxWidth;\n }\n if (typeof opt_opts.pixelOffset !== \"undefined\") {\n\n this.pixelOffset_ = opt_opts.pixelOffset;\n }\n if (typeof opt_opts.alignBottom !== \"undefined\") {\n\n this.alignBottom_ = opt_opts.alignBottom;\n }\n if (typeof opt_opts.position !== \"undefined\") {\n\n this.setPosition(opt_opts.position);\n }\n if (typeof opt_opts.zIndex !== \"undefined\") {\n\n this.setZIndex(opt_opts.zIndex);\n }\n if (typeof opt_opts.closeBoxMargin !== \"undefined\") {\n\n this.closeBoxMargin_ = opt_opts.closeBoxMargin;\n }\n if (typeof opt_opts.closeBoxURL !== \"undefined\") {\n\n this.closeBoxURL_ = opt_opts.closeBoxURL;\n }\n if (typeof opt_opts.infoBoxClearance !== \"undefined\") {\n\n this.infoBoxClearance_ = opt_opts.infoBoxClearance;\n }\n if (typeof opt_opts.isHidden !== \"undefined\") {\n\n this.isHidden_ = opt_opts.isHidden;\n }\n if (typeof opt_opts.visible !== \"undefined\") {\n\n this.isHidden_ = !opt_opts.visible;\n }\n if (typeof opt_opts.enableEventPropagation !== \"undefined\") {\n\n this.enableEventPropagation_ = opt_opts.enableEventPropagation;\n }\n\n if (this.div_) {\n\n this.draw();\n }\n};\n\n/**\n * Sets the content of the InfoBox.\n * The content can be plain text or an HTML DOM node.\n * @param {string|Node} content\n */\nInfoBox.prototype.setContent = function (content) {\n this.content_ = content;\n\n if (this.div_) {\n\n if (this.closeListener_) {\n\n google.maps.event.removeListener(this.closeListener_);\n this.closeListener_ = null;\n }\n\n // Odd code required to make things work with MSIE.\n //\n if (!this.fixedWidthSet_) {\n\n this.div_.style.width = \"\";\n }\n\n if (typeof content.nodeType === \"undefined\") {\n this.div_.innerHTML = this.getCloseBoxImg_() + content;\n } else {\n this.div_.innerHTML = this.getCloseBoxImg_();\n this.div_.appendChild(content);\n }\n\n // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n //\n if (!this.fixedWidthSet_) {\n this.div_.style.width = this.div_.offsetWidth + \"px\";\n if (typeof content.nodeType === \"undefined\") {\n this.div_.innerHTML = this.getCloseBoxImg_() + content;\n } else {\n this.div_.innerHTML = this.getCloseBoxImg_();\n this.div_.appendChild(content);\n }\n }\n\n this.addClickHandler_();\n }\n\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n google.maps.event.trigger(this, \"content_changed\");\n};\n\n/**\n * Sets the geographic location of the InfoBox.\n * @param {LatLng} latlng\n */\nInfoBox.prototype.setPosition = function (latlng) {\n\n this.position_ = latlng;\n\n if (this.div_) {\n\n this.draw();\n }\n\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n google.maps.event.trigger(this, \"position_changed\");\n};\n\n/**\n * Sets the zIndex style for the InfoBox.\n * @param {number} index\n */\nInfoBox.prototype.setZIndex = function (index) {\n\n this.zIndex_ = index;\n\n if (this.div_) {\n\n this.div_.style.zIndex = index;\n }\n\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n google.maps.event.trigger(this, \"zindex_changed\");\n};\n\n/**\n * Sets the visibility of the InfoBox.\n * @param {boolean} isVisible\n */\nInfoBox.prototype.setVisible = function (isVisible) {\n\n this.isHidden_ = !isVisible;\n if (this.div_) {\n this.div_.style.visibility = (this.isHidden_ ? \"hidden\" : \"visible\");\n }\n};\n\n/**\n * Returns the content of the InfoBox.\n * @returns {string}\n */\nInfoBox.prototype.getContent = function () {\n\n return this.content_;\n};\n\n/**\n * Returns the geographic location of the InfoBox.\n * @returns {LatLng}\n */\nInfoBox.prototype.getPosition = function () {\n\n return this.position_;\n};\n\n/**\n * Returns the zIndex for the InfoBox.\n * @returns {number}\n */\nInfoBox.prototype.getZIndex = function () {\n\n return this.zIndex_;\n};\n\n/**\n * Returns a flag indicating whether the InfoBox is visible.\n * @returns {boolean}\n */\nInfoBox.prototype.getVisible = function () {\n\n var isVisible;\n\n if ((typeof this.getMap() === \"undefined\") || (this.getMap() === null)) {\n isVisible = false;\n } else {\n isVisible = !this.isHidden_;\n }\n return isVisible;\n};\n\n/**\n * Shows the InfoBox. [Deprecated; use setVisible instead.]\n */\nInfoBox.prototype.show = function () {\n\n this.isHidden_ = false;\n if (this.div_) {\n this.div_.style.visibility = \"visible\";\n }\n};\n\n/**\n * Hides the InfoBox. [Deprecated; use setVisible instead.]\n */\nInfoBox.prototype.hide = function () {\n\n this.isHidden_ = true;\n if (this.div_) {\n this.div_.style.visibility = \"hidden\";\n }\n};\n\n/**\n * Adds the InfoBox to the specified map or Street View panorama. If anchor\n * (usually a google.maps.Marker) is specified, the position\n * of the InfoBox is set to the position of the anchor. If the\n * anchor is dragged to a new location, the InfoBox moves as well.\n * @param {Map|StreetViewPanorama} map\n * @param {MVCObject} [anchor]\n */\nInfoBox.prototype.open = function (map, anchor) {\n\n var me = this;\n\n if (anchor) {\n\n this.position_ = anchor.getPosition();\n this.moveListener_ = google.maps.event.addListener(anchor, \"position_changed\", function () {\n me.setPosition(this.getPosition());\n });\n }\n\n this.setMap(map);\n\n if (this.div_) {\n\n this.panBox_();\n }\n};\n\n/**\n * Removes the InfoBox from the map.\n */\nInfoBox.prototype.close = function () {\n\n var i;\n\n if (this.closeListener_) {\n\n google.maps.event.removeListener(this.closeListener_);\n this.closeListener_ = null;\n }\n\n if (this.eventListeners_) {\n\n for (i = 0; i < this.eventListeners_.length; i++) {\n\n google.maps.event.removeListener(this.eventListeners_[i]);\n }\n this.eventListeners_ = null;\n }\n\n if (this.moveListener_) {\n\n google.maps.event.removeListener(this.moveListener_);\n this.moveListener_ = null;\n }\n\n if (this.contextListener_) {\n\n google.maps.event.removeListener(this.contextListener_);\n this.contextListener_ = null;\n }\n\n this.setMap(null);\n};\n\n/**\n * google-maps-utility-library-v3-keydragzoom\n *\n * @version: 2.0.9\n * @author: Nianwei Liu [nianwei at gmail dot com] & Gary Little [gary at luxcentral dot com]\n * @contributors: undefined\n * @date: Fri May 13 2016 13:45:18 GMT-0400 (EDT)\n * @license: Apache License 2.0\n */\n/**\n * @fileoverview This library adds a drag zoom capability to a V3 Google map.\n * When drag zoom is enabled, holding down a designated hot key (shift | ctrl | alt)\n * while dragging a box around an area of interest will zoom the map in to that area when\n * the mouse button is released. Optionally, a visual control can also be supplied for turning\n * a drag zoom operation on and off.\n * Only one line of code is needed: google.maps.Map.enableKeyDragZoom();\n *

\n * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2,\n * it causes a context menu to appear when running on the Macintosh.\n *

\n * Note that if the map's container has a border around it, the border widths must be specified\n * in pixel units (or as thin, medium, or thick). This is required because of an MSIE limitation.\n *

NL: 2009-05-28: initial port to core API V3.\n *
NL: 2009-11-02: added a temp fix for -moz-transform for FF3.5.x using code from Paul Kulchenko (http://notebook.kulchenko.com/maps/gridmove).\n *
NL: 2010-02-02: added a fix for IE flickering on divs onmousemove, caused by scroll value when get mouse position.\n *
GL: 2010-06-15: added a visual control option.\n */\n(function () {\n /*jslint browser:true */\n /*global window,google */\n /* Utility functions use \"var funName=function()\" syntax to allow use of the */\n /* Dean Edwards Packer compression tool (with Shrink variables, without Base62 encode). */\n\n /**\n * Converts \"thin\", \"medium\", and \"thick\" to pixel widths\n * in an MSIE environment. Not called for other browsers\n * because getComputedStyle() returns pixel widths automatically.\n * @param {string} widthValue The value of the border width parameter.\n */\n var toPixels = function (widthValue) {\n var px;\n switch (widthValue) {\n case \"thin\":\n px = \"2px\";\n break;\n case \"medium\":\n px = \"4px\";\n break;\n case \"thick\":\n px = \"6px\";\n break;\n default:\n px = widthValue;\n }\n return px;\n };\n /**\n * Get the widths of the borders of an HTML element.\n *\n * @param {Node} h The HTML element.\n * @return {Object} The width object {top, bottom left, right}.\n */\n var getBorderWidths = function (h) {\n var computedStyle;\n var bw = {};\n if (document.defaultView && document.defaultView.getComputedStyle) {\n computedStyle = h.ownerDocument.defaultView.getComputedStyle(h, \"\");\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0;\n return bw;\n }\n } else if (document.documentElement.currentStyle) { // MSIE\n if (h.currentStyle) {\n // The current styles may not be in pixel units so try to convert (bad!)\n bw.top = parseInt(toPixels(h.currentStyle.borderTopWidth), 10) || 0;\n bw.bottom = parseInt(toPixels(h.currentStyle.borderBottomWidth), 10) || 0;\n bw.left = parseInt(toPixels(h.currentStyle.borderLeftWidth), 10) || 0;\n bw.right = parseInt(toPixels(h.currentStyle.borderRightWidth), 10) || 0;\n return bw;\n }\n }\n // Shouldn't get this far for any modern browser\n bw.top = parseInt(h.style[\"border-top-width\"], 10) || 0;\n bw.bottom = parseInt(h.style[\"border-bottom-width\"], 10) || 0;\n bw.left = parseInt(h.style[\"border-left-width\"], 10) || 0;\n bw.right = parseInt(h.style[\"border-right-width\"], 10) || 0;\n return bw;\n };\n\n // Page scroll values for use by getMousePosition. To prevent flickering on MSIE\n // they are calculated only when the document actually scrolls, not every time the\n // mouse moves (as they would be if they were calculated inside getMousePosition).\n var scroll = {\n x: 0,\n y: 0\n };\n var getScrollValue = function (e) {\n scroll.x = (typeof document.documentElement.scrollLeft !== \"undefined\" ? document.documentElement.scrollLeft : document.body.scrollLeft);\n scroll.y = (typeof document.documentElement.scrollTop !== \"undefined\" ? document.documentElement.scrollTop : document.body.scrollTop);\n };\n getScrollValue();\n\n /**\n * Get the position of the mouse relative to the document.\n * @param {Event} e The mouse event.\n * @return {Object} The position object {left, top}.\n */\n var getMousePosition = function (e) {\n var posX = 0, posY = 0;\n e = e || window.event;\n if (typeof e.pageX !== \"undefined\") {\n posX = e.pageX;\n posY = e.pageY;\n } else if (typeof e.clientX !== \"undefined\") { // MSIE\n posX = e.clientX + scroll.x;\n posY = e.clientY + scroll.y;\n }\n return {\n left: posX,\n top: posY\n };\n };\n /**\n * Get the position of an HTML element relative to the document.\n * @param {Node} h The HTML element.\n * @return {Object} The position object {left, top}.\n */\n var getElementPosition = function (h) {\n var posX = h.offsetLeft;\n var posY = h.offsetTop;\n var parent = h.offsetParent;\n // Add offsets for all ancestors in the hierarchy\n while (parent !== null) {\n // Adjust for scrolling elements which may affect the map position.\n //\n // See http://www.howtocreate.co.uk/tutorials/javascript/browserspecific\n //\n // \"...make sure that every element [on a Web page] with an overflow\n // of anything other than visible also has a position style set to\n // something other than the default static...\"\n if (parent !== document.body && parent !== document.documentElement) {\n posX -= parent.scrollLeft;\n posY -= parent.scrollTop;\n }\n // See http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/4cb86c0c1037a5e5\n // Example: http://notebook.kulchenko.com/maps/gridmove\n var m = parent;\n // This is the \"normal\" way to get offset information:\n var moffx = m.offsetLeft;\n var moffy = m.offsetTop;\n // This covers those cases where a transform is used:\n if (!moffx && !moffy && window.getComputedStyle) {\n var matrix = document.defaultView.getComputedStyle(m, null).MozTransform ||\n document.defaultView.getComputedStyle(m, null).WebkitTransform;\n if (matrix) {\n if (typeof matrix === \"string\") {\n var parms = matrix.split(\",\");\n moffx += parseInt(parms[4], 10) || 0;\n moffy += parseInt(parms[5], 10) || 0;\n }\n }\n }\n posX += moffx;\n posY += moffy;\n parent = parent.offsetParent;\n }\n return {\n left: posX,\n top: posY\n };\n };\n /**\n * Set the properties of an object to those from another object.\n * @param {Object} obj The target object.\n * @param {Object} vals The source object.\n */\n var setVals = function (obj, vals) {\n if (obj && vals) {\n for (var x in vals) {\n if (vals.hasOwnProperty(x)) {\n obj[x] = vals[x];\n }\n }\n }\n return obj;\n };\n /**\n * Set the opacity. If op is not passed in, this function just performs an MSIE fix.\n * @param {Node} h The HTML element.\n * @param {number} op The opacity value (0-1).\n */\n var setOpacity = function (h, op) {\n if (typeof op !== \"undefined\") {\n h.style.opacity = op;\n }\n if (typeof h.style.opacity !== \"undefined\" && h.style.opacity !== \"\") {\n h.style.filter = \"alpha(opacity=\" + (h.style.opacity * 100) + \")\";\n }\n };\n /**\n * @name KeyDragZoomOptions\n * @class This class represents the optional parameter passed into google.maps.Map.enableKeyDragZoom.\n * @property {string} [key=\"shift\"] The hot key to hold down to activate a drag zoom, shift | ctrl | alt.\n * NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2,\n * it causes a context menu to appear when running on the Macintosh. Also note that the\n * alt hot key refers to the Option key on a Macintosh.\n * @property {Object} [boxStyle={border: \"4px solid #736AFF\"}]\n * An object literal defining the CSS styles of the zoom box.\n * Border widths must be specified in pixel units (or as thin, medium, or thick).\n * @property {Object} [veilStyle={backgroundColor: \"gray\", opacity: 0.25, cursor: \"crosshair\"}]\n * An object literal defining the CSS styles of the veil pane which covers the map when a drag\n * zoom is activated. The previous name for this property was paneStyle but the use\n * of this name is now deprecated.\n * @property {boolean} [noZoom=false] A flag indicating whether to disable zooming after an area is\n * selected. Set this to true to allow KeyDragZoom to be used as a simple area\n * selection tool.\n * @property {boolean} [visualEnabled=false] A flag indicating whether a visual control is to be used.\n * @property {string} [visualClass=\"\"] The name of the CSS class defining the styles for the visual\n * control. To prevent the visual control from being printed, set this property to the name of\n * a class, defined inside a @media print rule, which sets the CSS\n * display style to none.\n * @property {ControlPosition} [visualPosition=google.maps.ControlPosition.LEFT_TOP]\n * The position of the visual control.\n * @property {Size} [visualPositionOffset=google.maps.Size(35, 0)] The width and height values\n * provided by this property are the offsets (in pixels) from the location at which the control\n * would normally be drawn to the desired drawing location.\n * @property {number} [visualPositionIndex=null] The index of the visual control.\n * The index is for controlling the placement of the control relative to other controls at the\n * position given by visualPosition; controls with a lower index are placed first.\n * Use a negative value to place the control before any default controls. No index is\n * generally required.\n * @property {String} [visualSprite=\"http://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png\"]\n * The URL of the sprite image used for showing the visual control in the on, off, and hot\n * (i.e., when the mouse is over the control) states. The three images within the sprite must\n * be the same size and arranged in on-hot-off order in a single row with no spaces between images.\n * @property {Size} [visualSize=google.maps.Size(20, 20)] The width and height values provided by\n * this property are the size (in pixels) of each of the images within visualSprite.\n * @property {Object} [visualTips={off: \"Turn on drag zoom mode\", on: \"Turn off drag zoom mode\"}]\n * An object literal defining the help tips that appear when\n * the mouse moves over the visual control. The off property is the tip to be shown\n * when the control is off and the on property is the tip to be shown when the\n * control is on.\n */\n /**\n * @name DragZoom\n * @class This class represents a drag zoom object for a map. The object is activated by holding down the hot key\n * or by turning on the visual control.\n * This object is created when google.maps.Map.enableKeyDragZoom is called; it cannot be created directly.\n * Use google.maps.Map.getDragZoomObject to gain access to this object in order to attach event listeners.\n * @param {Map} map The map to which the DragZoom object is to be attached.\n * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters.\n */\n function DragZoom(map, opt_zoomOpts) {\n var me = this;\n var ov = new google.maps.OverlayView();\n ov.onAdd = function () {\n me.init_(map, opt_zoomOpts);\n };\n ov.draw = function () {\n };\n ov.onRemove = function () {\n };\n ov.setMap(map);\n this.prjov_ = ov;\n }\n /**\n * Initialize the tool.\n * @param {Map} map The map to which the DragZoom object is to be attached.\n * @param {KeyDragZoomOptions} [opt_zoomOpts] The optional parameters.\n */\n DragZoom.prototype.init_ = function (map, opt_zoomOpts) {\n var i;\n var me = this;\n this.map_ = map;\n opt_zoomOpts = opt_zoomOpts || {};\n this.key_ = opt_zoomOpts.key || \"shift\";\n this.key_ = this.key_.toLowerCase();\n this.borderWidths_ = getBorderWidths(this.map_.getDiv());\n this.veilDiv_ = [];\n for (i = 0; i < 4; i++) {\n this.veilDiv_[i] = document.createElement(\"div\");\n // Prevents selection of other elements on the webpage\n // when a drag zoom operation is in progress:\n this.veilDiv_[i].onselectstart = function () {\n return false;\n };\n // Apply default style values for the veil:\n setVals(this.veilDiv_[i].style, {\n backgroundColor: \"gray\",\n opacity: 0.25,\n cursor: \"crosshair\"\n });\n // Apply style values specified in veilStyle parameter:\n setVals(this.veilDiv_[i].style, opt_zoomOpts.paneStyle); // Old option name was \"paneStyle\"\n setVals(this.veilDiv_[i].style, opt_zoomOpts.veilStyle); // New name is \"veilStyle\"\n // Apply mandatory style values:\n setVals(this.veilDiv_[i].style, {\n position: \"absolute\",\n overflow: \"hidden\",\n display: \"none\"\n });\n // Workaround for Firefox Shift-Click problem:\n if (this.key_ === \"shift\") {\n this.veilDiv_[i].style.MozUserSelect = \"none\";\n }\n setOpacity(this.veilDiv_[i]);\n // An IE fix: If the background is transparent it cannot capture mousedown\n // events, so if it is, change the background to white with 0 opacity.\n if (this.veilDiv_[i].style.backgroundColor === \"transparent\") {\n this.veilDiv_[i].style.backgroundColor = \"white\";\n setOpacity(this.veilDiv_[i], 0);\n }\n this.map_.getDiv().appendChild(this.veilDiv_[i]);\n }\n\n this.noZoom_ = opt_zoomOpts.noZoom || false;\n this.visualEnabled_ = opt_zoomOpts.visualEnabled || false;\n this.visualClass_ = opt_zoomOpts.visualClass || \"\";\n this.visualPosition_ = opt_zoomOpts.visualPosition || google.maps.ControlPosition.LEFT_TOP;\n this.visualPositionOffset_ = opt_zoomOpts.visualPositionOffset || new google.maps.Size(35, 0);\n this.visualPositionIndex_ = opt_zoomOpts.visualPositionIndex || null;\n this.visualSprite_ = opt_zoomOpts.visualSprite || \"http\" + (document.location.protocol === \"https:\" ? \"s\" : \"\") + \"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png\";\n this.visualSize_ = opt_zoomOpts.visualSize || new google.maps.Size(20, 20);\n this.visualTips_ = opt_zoomOpts.visualTips || {};\n this.visualTips_.off = this.visualTips_.off || \"Turn on drag zoom mode\";\n this.visualTips_.on = this.visualTips_.on || \"Turn off drag zoom mode\";\n\n this.boxDiv_ = document.createElement(\"div\");\n // Apply default style values for the zoom box:\n setVals(this.boxDiv_.style, {\n border: \"4px solid #736AFF\"\n });\n // Apply style values specified in boxStyle parameter:\n setVals(this.boxDiv_.style, opt_zoomOpts.boxStyle);\n // Apply mandatory style values:\n setVals(this.boxDiv_.style, {\n position: \"absolute\",\n display: \"none\"\n });\n setOpacity(this.boxDiv_);\n this.map_.getDiv().appendChild(this.boxDiv_);\n this.boxBorderWidths_ = getBorderWidths(this.boxDiv_);\n\n this.listeners_ = [\n google.maps.event.addDomListener(document, \"keydown\", function (e) {\n me.onKeyDown_(e);\n }),\n google.maps.event.addDomListener(document, \"keyup\", function (e) {\n me.onKeyUp_(e);\n }),\n google.maps.event.addDomListener(this.veilDiv_[0], \"mousedown\", function (e) {\n me.onMouseDown_(e);\n }),\n google.maps.event.addDomListener(this.veilDiv_[1], \"mousedown\", function (e) {\n me.onMouseDown_(e);\n }),\n google.maps.event.addDomListener(this.veilDiv_[2], \"mousedown\", function (e) {\n me.onMouseDown_(e);\n }),\n google.maps.event.addDomListener(this.veilDiv_[3], \"mousedown\", function (e) {\n me.onMouseDown_(e);\n }),\n google.maps.event.addDomListener(document, \"mousedown\", function (e) {\n me.onMouseDownDocument_(e);\n }),\n google.maps.event.addDomListener(document, \"mousemove\", function (e) {\n me.onMouseMove_(e);\n }),\n google.maps.event.addDomListener(document, \"mouseup\", function (e) {\n me.onMouseUp_(e);\n }),\n google.maps.event.addDomListener(window, \"scroll\", getScrollValue)\n ];\n\n this.hotKeyDown_ = false;\n this.mouseDown_ = false;\n this.dragging_ = false;\n this.startPt_ = null;\n this.endPt_ = null;\n this.mapWidth_ = null;\n this.mapHeight_ = null;\n this.mousePosn_ = null;\n this.mapPosn_ = null;\n\n if (this.visualEnabled_) {\n this.buttonDiv_ = this.initControl_(this.visualPositionOffset_);\n if (this.visualPositionIndex_ !== null) {\n this.buttonDiv_.index = this.visualPositionIndex_;\n }\n this.map_.controls[this.visualPosition_].push(this.buttonDiv_);\n this.controlIndex_ = this.map_.controls[this.visualPosition_].length - 1;\n }\n };\n /**\n * Initializes the visual control and returns its DOM element.\n * @param {Size} offset The offset of the control from its normal position.\n * @return {Node} The DOM element containing the visual control.\n */\n DragZoom.prototype.initControl_ = function (offset) {\n var control;\n var image;\n var me = this;\n\n control = document.createElement(\"div\");\n control.className = this.visualClass_;\n control.style.position = \"relative\";\n control.style.overflow = \"hidden\";\n control.style.height = this.visualSize_.height + \"px\";\n control.style.width = this.visualSize_.width + \"px\";\n control.title = this.visualTips_.off;\n image = document.createElement(\"img\");\n image.src = this.visualSprite_;\n image.style.position = \"absolute\";\n image.style.left = -(this.visualSize_.width * 2) + \"px\";\n image.style.top = 0 + \"px\";\n control.appendChild(image);\n control.onclick = function (e) {\n me.hotKeyDown_ = !me.hotKeyDown_;\n if (me.hotKeyDown_) {\n me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + \"px\";\n me.buttonDiv_.title = me.visualTips_.on;\n me.activatedByControl_ = true;\n google.maps.event.trigger(me, \"activate\");\n } else {\n me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + \"px\";\n me.buttonDiv_.title = me.visualTips_.off;\n google.maps.event.trigger(me, \"deactivate\");\n }\n me.onMouseMove_(e); // Updates the veil\n };\n control.onmouseover = function () {\n me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 1) + \"px\";\n };\n control.onmouseout = function () {\n if (me.hotKeyDown_) {\n me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 0) + \"px\";\n me.buttonDiv_.title = me.visualTips_.on;\n } else {\n me.buttonDiv_.firstChild.style.left = -(me.visualSize_.width * 2) + \"px\";\n me.buttonDiv_.title = me.visualTips_.off;\n }\n };\n control.ondragstart = function () {\n return false;\n };\n setVals(control.style, {\n cursor: \"pointer\",\n marginTop: offset.height + \"px\",\n marginLeft: offset.width + \"px\"\n });\n return control;\n };\n /**\n * Returns true if the hot key is being pressed when an event occurs.\n * @param {Event} e The keyboard event.\n * @return {boolean} Flag indicating whether the hot key is down.\n */\n DragZoom.prototype.isHotKeyDown_ = function (e) {\n var isHot;\n e = e || window.event;\n isHot = (e.shiftKey && this.key_ === \"shift\") || (e.altKey && this.key_ === \"alt\") || (e.ctrlKey && this.key_ === \"ctrl\");\n if (!isHot) {\n // Need to look at keyCode for Opera because it\n // doesn't set the shiftKey, altKey, ctrlKey properties\n // unless a non-modifier event is being reported.\n //\n // See http://cross-browser.com/x/examples/shift_mode.php\n // Also see http://unixpapa.com/js/key.html\n switch (e.keyCode) {\n case 16:\n if (this.key_ === \"shift\") {\n isHot = true;\n }\n break;\n case 17:\n if (this.key_ === \"ctrl\") {\n isHot = true;\n }\n break;\n case 18:\n if (this.key_ === \"alt\") {\n isHot = true;\n }\n break;\n }\n }\n return isHot;\n };\n /**\n * Returns true if the mouse is on top of the map div.\n * The position is captured in onMouseMove_.\n * @return {boolean}\n */\n DragZoom.prototype.isMouseOnMap_ = function () {\n var mousePosn = this.mousePosn_;\n if (mousePosn) {\n var mapPosn = this.mapPosn_;\n var mapDiv = this.map_.getDiv();\n return mousePosn.left > mapPosn.left && mousePosn.left < (mapPosn.left + mapDiv.offsetWidth) &&\n mousePosn.top > mapPosn.top && mousePosn.top < (mapPosn.top + mapDiv.offsetHeight);\n } else {\n // if user never moved mouse\n return false;\n }\n };\n /**\n * Show the veil if the hot key is down and the mouse is over the map,\n * otherwise hide the veil.\n */\n DragZoom.prototype.setVeilVisibility_ = function () {\n var i;\n if (this.map_ && this.hotKeyDown_ && this.isMouseOnMap_()) {\n var mapDiv = this.map_.getDiv();\n this.mapWidth_ = mapDiv.offsetWidth - (this.borderWidths_.left + this.borderWidths_.right);\n this.mapHeight_ = mapDiv.offsetHeight - (this.borderWidths_.top + this.borderWidths_.bottom);\n if (this.activatedByControl_) { // Veil covers entire map (except control)\n var left = parseInt(this.buttonDiv_.style.left, 10) + this.visualPositionOffset_.width;\n var top = parseInt(this.buttonDiv_.style.top, 10) + this.visualPositionOffset_.height;\n var width = this.visualSize_.width;\n var height = this.visualSize_.height;\n // Left veil rectangle:\n this.veilDiv_[0].style.top = \"0px\";\n this.veilDiv_[0].style.left = \"0px\";\n this.veilDiv_[0].style.width = left + \"px\";\n this.veilDiv_[0].style.height = this.mapHeight_ + \"px\";\n // Right veil rectangle:\n this.veilDiv_[1].style.top = \"0px\";\n this.veilDiv_[1].style.left = (left + width) + \"px\";\n this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + \"px\";\n this.veilDiv_[1].style.height = this.mapHeight_ + \"px\";\n // Top veil rectangle:\n this.veilDiv_[2].style.top = \"0px\";\n this.veilDiv_[2].style.left = left + \"px\";\n this.veilDiv_[2].style.width = width + \"px\";\n this.veilDiv_[2].style.height = top + \"px\";\n // Bottom veil rectangle:\n this.veilDiv_[3].style.top = (top + height) + \"px\";\n this.veilDiv_[3].style.left = left + \"px\";\n this.veilDiv_[3].style.width = width + \"px\";\n this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + \"px\";\n for (i = 0; i < this.veilDiv_.length; i++) {\n this.veilDiv_[i].style.display = \"block\";\n }\n } else {\n this.veilDiv_[0].style.left = \"0px\";\n this.veilDiv_[0].style.top = \"0px\";\n this.veilDiv_[0].style.width = this.mapWidth_ + \"px\";\n this.veilDiv_[0].style.height = this.mapHeight_ + \"px\";\n for (i = 1; i < this.veilDiv_.length; i++) {\n this.veilDiv_[i].style.width = \"0px\";\n this.veilDiv_[i].style.height = \"0px\";\n }\n for (i = 0; i < this.veilDiv_.length; i++) {\n this.veilDiv_[i].style.display = \"block\";\n }\n }\n } else {\n for (i = 0; i < this.veilDiv_.length; i++) {\n this.veilDiv_[i].style.display = \"none\";\n }\n }\n };\n /**\n * Handle key down. Show the veil if the hot key has been pressed.\n * @param {Event} e The keyboard event.\n */\n DragZoom.prototype.onKeyDown_ = function (e) {\n if (this.map_ && !this.hotKeyDown_ && this.isHotKeyDown_(e)) {\n this.mapPosn_ = getElementPosition(this.map_.getDiv());\n this.hotKeyDown_ = true;\n this.activatedByControl_ = false;\n this.setVeilVisibility_();\n /**\n * This event is fired when the hot key is pressed.\n * @name DragZoom#activate\n * @event\n */\n google.maps.event.trigger(this, \"activate\");\n }\n };\n /**\n * Get the google.maps.Point of the mouse position.\n * @param {Event} e The mouse event.\n * @return {Point} The mouse position.\n */\n DragZoom.prototype.getMousePoint_ = function (e) {\n var mousePosn = getMousePosition(e);\n var p = new google.maps.Point();\n p.x = mousePosn.left - this.mapPosn_.left - this.borderWidths_.left;\n p.y = mousePosn.top - this.mapPosn_.top - this.borderWidths_.top;\n p.x = Math.min(p.x, this.mapWidth_);\n p.y = Math.min(p.y, this.mapHeight_);\n p.x = Math.max(p.x, 0);\n p.y = Math.max(p.y, 0);\n return p;\n };\n /**\n * Handle mouse down.\n * @param {Event} e The mouse event.\n */\n DragZoom.prototype.onMouseDown_ = function (e) {\n if (this.map_ && this.hotKeyDown_) {\n this.mapPosn_ = getElementPosition(this.map_.getDiv());\n this.dragging_ = true;\n this.startPt_ = this.endPt_ = this.getMousePoint_(e);\n this.boxDiv_.style.width = this.boxDiv_.style.height = \"0px\";\n var prj = this.prjov_.getProjection();\n var latlng = prj.fromContainerPixelToLatLng(this.startPt_);\n /**\n * This event is fired when the drag operation begins.\n * The parameter passed is the geographic position of the starting point.\n * @name DragZoom#dragstart\n * @param {LatLng} latlng The geographic position of the starting point.\n * @event\n */\n google.maps.event.trigger(this, \"dragstart\", latlng);\n }\n };\n /**\n * Handle mouse down at the document level.\n * @param {Event} e The mouse event.\n */\n DragZoom.prototype.onMouseDownDocument_ = function (e) {\n this.mouseDown_ = true;\n };\n /**\n * Handle mouse move.\n * @param {Event} e The mouse event.\n */\n DragZoom.prototype.onMouseMove_ = function (e) {\n this.mousePosn_ = getMousePosition(e);\n if (this.dragging_) {\n this.endPt_ = this.getMousePoint_(e);\n var left = Math.min(this.startPt_.x, this.endPt_.x);\n var top = Math.min(this.startPt_.y, this.endPt_.y);\n var width = Math.abs(this.startPt_.x - this.endPt_.x);\n var height = Math.abs(this.startPt_.y - this.endPt_.y);\n // For benefit of MSIE 7/8 ensure following values are not negative:\n var boxWidth = Math.max(0, width - (this.boxBorderWidths_.left + this.boxBorderWidths_.right));\n var boxHeight = Math.max(0, height - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom));\n // Left veil rectangle:\n this.veilDiv_[0].style.top = \"0px\";\n this.veilDiv_[0].style.left = \"0px\";\n this.veilDiv_[0].style.width = left + \"px\";\n this.veilDiv_[0].style.height = this.mapHeight_ + \"px\";\n // Right veil rectangle:\n this.veilDiv_[1].style.top = \"0px\";\n this.veilDiv_[1].style.left = (left + width) + \"px\";\n this.veilDiv_[1].style.width = (this.mapWidth_ - (left + width)) + \"px\";\n this.veilDiv_[1].style.height = this.mapHeight_ + \"px\";\n // Top veil rectangle:\n this.veilDiv_[2].style.top = \"0px\";\n this.veilDiv_[2].style.left = left + \"px\";\n this.veilDiv_[2].style.width = width + \"px\";\n this.veilDiv_[2].style.height = top + \"px\";\n // Bottom veil rectangle:\n this.veilDiv_[3].style.top = (top + height) + \"px\";\n this.veilDiv_[3].style.left = left + \"px\";\n this.veilDiv_[3].style.width = width + \"px\";\n this.veilDiv_[3].style.height = (this.mapHeight_ - (top + height)) + \"px\";\n // Selection rectangle:\n this.boxDiv_.style.top = top + \"px\";\n this.boxDiv_.style.left = left + \"px\";\n this.boxDiv_.style.width = boxWidth + \"px\";\n this.boxDiv_.style.height = boxHeight + \"px\";\n this.boxDiv_.style.display = \"block\";\n /**\n * This event is fired repeatedly while the user drags a box across the area of interest.\n * The southwest and northeast point are passed as parameters of type google.maps.Point\n * (for performance reasons), relative to the map container. Also passed is the projection object\n * so that the event listener, if necessary, can convert the pixel positions to geographic\n * coordinates using google.maps.MapCanvasProjection.fromContainerPixelToLatLng.\n * @name DragZoom#drag\n * @param {Point} southwestPixel The southwest point of the selection area.\n * @param {Point} northeastPixel The northeast point of the selection area.\n * @param {MapCanvasProjection} prj The projection object.\n * @event\n */\n google.maps.event.trigger(this, \"drag\", new google.maps.Point(left, top + height), new google.maps.Point(left + width, top), this.prjov_.getProjection());\n } else if (!this.mouseDown_) {\n this.mapPosn_ = getElementPosition(this.map_.getDiv());\n this.setVeilVisibility_();\n }\n };\n /**\n * Handle mouse up.\n * @param {Event} e The mouse event.\n */\n DragZoom.prototype.onMouseUp_ = function (e) {\n var z;\n var me = this;\n this.mouseDown_ = false;\n if (this.dragging_) {\n if ((this.getMousePoint_(e).x === this.startPt_.x) && (this.getMousePoint_(e).y === this.startPt_.y)) {\n this.onKeyUp_(e); // Cancel event\n return;\n }\n var left = Math.min(this.startPt_.x, this.endPt_.x);\n var top = Math.min(this.startPt_.y, this.endPt_.y);\n var width = Math.abs(this.startPt_.x - this.endPt_.x);\n var height = Math.abs(this.startPt_.y - this.endPt_.y);\n // Google Maps API bug: setCenter() doesn't work as expected if the map has a\n // border on the left or top. The code here includes a workaround for this problem.\n var kGoogleCenteringBug = true;\n if (kGoogleCenteringBug) {\n left += this.borderWidths_.left;\n top += this.borderWidths_.top;\n }\n\n var prj = this.prjov_.getProjection();\n var sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height));\n var ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top));\n var bnds = new google.maps.LatLngBounds(sw, ne);\n\n if (this.noZoom_) {\n this.boxDiv_.style.display = \"none\";\n } else {\n // Sometimes fitBounds causes a zoom OUT, so restore original zoom level if this happens.\n z = this.map_.getZoom();\n this.map_.fitBounds(bnds);\n if (this.map_.getZoom() < z) {\n this.map_.setZoom(z);\n }\n\n // Redraw box after zoom:\n var swPt = prj.fromLatLngToContainerPixel(sw);\n var nePt = prj.fromLatLngToContainerPixel(ne);\n if (kGoogleCenteringBug) {\n swPt.x -= this.borderWidths_.left;\n swPt.y -= this.borderWidths_.top;\n nePt.x -= this.borderWidths_.left;\n nePt.y -= this.borderWidths_.top;\n }\n this.boxDiv_.style.left = swPt.x + \"px\";\n this.boxDiv_.style.top = nePt.y + \"px\";\n this.boxDiv_.style.width = (Math.abs(nePt.x - swPt.x) - (this.boxBorderWidths_.left + this.boxBorderWidths_.right)) + \"px\";\n this.boxDiv_.style.height = (Math.abs(nePt.y - swPt.y) - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom)) + \"px\";\n // Hide box asynchronously after 1 second:\n setTimeout(function () {\n me.boxDiv_.style.display = \"none\";\n }, 1000);\n }\n this.dragging_ = false;\n this.onMouseMove_(e); // Updates the veil\n /**\n * This event is fired when the drag operation ends.\n * The parameter passed is the geographic bounds of the selected area.\n * Note that this event is not fired if the hot key is released before the drag operation ends.\n * @name DragZoom#dragend\n * @param {LatLngBounds} bnds The geographic bounds of the selected area.\n * @event\n */\n google.maps.event.trigger(this, \"dragend\", bnds);\n // if the hot key isn't down, the drag zoom must have been activated by turning\n // on the visual control. In this case, finish up by simulating a key up event.\n if (!this.isHotKeyDown_(e)) {\n this.onKeyUp_(e);\n }\n }\n };\n /**\n * Handle key up.\n * @param {Event} e The keyboard event.\n */\n DragZoom.prototype.onKeyUp_ = function (e) {\n var i;\n var left, top, width, height, prj, sw, ne;\n var bnds = null;\n if (this.map_ && this.hotKeyDown_) {\n this.hotKeyDown_ = false;\n if (this.dragging_) {\n this.boxDiv_.style.display = \"none\";\n this.dragging_ = false;\n // Calculate the bounds when drag zoom was cancelled\n left = Math.min(this.startPt_.x, this.endPt_.x);\n top = Math.min(this.startPt_.y, this.endPt_.y);\n width = Math.abs(this.startPt_.x - this.endPt_.x);\n height = Math.abs(this.startPt_.y - this.endPt_.y);\n prj = this.prjov_.getProjection();\n sw = prj.fromContainerPixelToLatLng(new google.maps.Point(left, top + height));\n ne = prj.fromContainerPixelToLatLng(new google.maps.Point(left + width, top));\n bnds = new google.maps.LatLngBounds(sw, ne);\n }\n for (i = 0; i < this.veilDiv_.length; i++) {\n this.veilDiv_[i].style.display = \"none\";\n }\n if (this.visualEnabled_) {\n this.buttonDiv_.firstChild.style.left = -(this.visualSize_.width * 2) + \"px\";\n this.buttonDiv_.title = this.visualTips_.off;\n this.buttonDiv_.style.display = \"\";\n }\n /**\n * This event is fired when the hot key is released.\n * The parameter passed is the geographic bounds of the selected area immediately\n * before the hot key was released.\n * @name DragZoom#deactivate\n * @param {LatLngBounds} bnds The geographic bounds of the selected area immediately\n * before the hot key was released.\n * @event\n */\n google.maps.event.trigger(this, \"deactivate\", bnds);\n }\n };\n /**\n * @name google.maps.Map\n * @class These are new methods added to the Google Maps JavaScript API V3's\n * Map\n * class.\n */\n /**\n * Enables drag zoom. The user can zoom to an area of interest by holding down the hot key\n * (shift | ctrl | alt ) while dragging a box around the area or by turning\n * on the visual control then dragging a box around the area.\n * @param {KeyDragZoomOptions} opt_zoomOpts The optional parameters.\n */\n google.maps.Map.prototype.enableKeyDragZoom = function (opt_zoomOpts) {\n this.dragZoom_ = new DragZoom(this, opt_zoomOpts);\n };\n /**\n * Disables drag zoom.\n */\n google.maps.Map.prototype.disableKeyDragZoom = function () {\n var i;\n var d = this.dragZoom_;\n if (d) {\n for (i = 0; i < d.listeners_.length; ++i) {\n google.maps.event.removeListener(d.listeners_[i]);\n }\n this.getDiv().removeChild(d.boxDiv_);\n for (i = 0; i < d.veilDiv_.length; i++) {\n this.getDiv().removeChild(d.veilDiv_[i]);\n }\n if (d.visualEnabled_) {\n // Remove the custom control:\n this.controls[d.visualPosition_].removeAt(d.controlIndex_);\n }\n d.prjov_.setMap(null);\n this.dragZoom_ = null;\n }\n };\n /**\n * Returns true if the drag zoom feature has been enabled.\n * @return {boolean}\n */\n google.maps.Map.prototype.keyDragZoomEnabled = function () {\n return this.dragZoom_ !== null;\n };\n /**\n * Returns the DragZoom object which is created when google.maps.Map.enableKeyDragZoom is called.\n * With this object you can use google.maps.event.addListener to attach event listeners\n * for the \"activate\", \"deactivate\", \"dragstart\", \"drag\", and \"dragend\" events.\n * @return {DragZoom}\n */\n google.maps.Map.prototype.getDragZoomObject = function () {\n return this.dragZoom_;\n };\n})();\n\n/**\n * google-maps-utility-library-v3-markerwithlabel\n *\n * @version: 1.1.10\n * @author: Gary Little (inspired by code from Marc Ridey of Google).\n * @contributors: Nicholas McCready\n * @date: Fri May 13 2016 16:29:58 GMT-0400 (EDT)\n * @license: Apache License 2.0\n */\n/**\n * MarkerWithLabel allows you to define markers with associated labels. As you would expect,\n * if the marker is draggable, so too will be the label. In addition, a marker with a label\n * responds to all mouse events in the same manner as a regular marker. It also fires mouse\n * events and \"property changed\" events just as a regular marker would. Version 1.1 adds\n * support for the raiseOnDrag feature introduced in API V3.3.\n *

\n * If you drag a marker by its label, you can cancel the drag and return the marker to its\n * original position by pressing the Esc key. This doesn't work if you drag the marker\n * itself because this feature is not (yet) supported in the google.maps.Marker class.\n */\n\n/*jslint browser:true */\n/*global document,google */\n\n/**\n * @param {Function} childCtor Child class.\n * @param {Function} parentCtor Parent class.\n * @private\n */\nfunction inherits(childCtor, parentCtor) {\n /* @constructor */\n function tempCtor() {}\n tempCtor.prototype = parentCtor.prototype;\n childCtor.superClass_ = parentCtor.prototype;\n childCtor.prototype = new tempCtor();\n /* @override */\n childCtor.prototype.constructor = childCtor;\n}\n\n/**\n * This constructor creates a label and associates it with a marker.\n * It is for the private use of the MarkerWithLabel class.\n * @constructor\n * @param {Marker} marker The marker with which the label is to be associated.\n * @param {string} crossURL The URL of the cross image =.\n * @param {string} handCursor The URL of the hand cursor.\n * @private\n */\nfunction MarkerLabel_(marker, crossURL, handCursorURL) {\n this.marker_ = marker;\n this.handCursorURL_ = marker.handCursorURL;\n\n this.labelDiv_ = document.createElement(\"div\");\n this.labelDiv_.style.cssText = \"position: absolute; overflow: hidden;\";\n\n // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil\n // in the \"overlayMouseTarget\" pane, a veil that covers just the label. This is done so that\n // events can be captured even if the label is in the shadow of a google.maps.InfoWindow.\n // Code is included here to ensure the veil is always exactly the same size as the label.\n this.eventDiv_ = document.createElement(\"div\");\n this.eventDiv_.style.cssText = this.labelDiv_.style.cssText;\n\n // This is needed for proper behavior on MSIE:\n this.eventDiv_.setAttribute(\"onselectstart\", \"return false;\");\n this.eventDiv_.setAttribute(\"ondragstart\", \"return false;\");\n\n // Get the DIV for the \"X\" to be displayed when the marker is raised.\n this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL);\n}\n\ninherits(MarkerLabel_, google.maps.OverlayView);\n\n/**\n * Returns the DIV for the cross used when dragging a marker when the\n * raiseOnDrag parameter set to true. One cross is shared with all markers.\n * @param {string} crossURL The URL of the cross image =.\n * @private\n */\nMarkerLabel_.getSharedCross = function (crossURL) {\n var div;\n if (typeof MarkerLabel_.getSharedCross.crossDiv === \"undefined\") {\n div = document.createElement(\"img\");\n div.style.cssText = \"position: absolute; z-index: 1000002; display: none;\";\n // Hopefully Google never changes the standard \"X\" attributes:\n div.style.marginLeft = \"-8px\";\n div.style.marginTop = \"-9px\";\n div.src = crossURL;\n MarkerLabel_.getSharedCross.crossDiv = div;\n }\n return MarkerLabel_.getSharedCross.crossDiv;\n};\n\n/**\n * Adds the DIV representing the label to the DOM. This method is called\n * automatically when the marker's setMap method is called.\n * @private\n */\nMarkerLabel_.prototype.onAdd = function () {\n var me = this;\n var cMouseIsDown = false;\n var cDraggingLabel = false;\n var cSavedZIndex;\n var cLatOffset, cLngOffset;\n var cIgnoreClick;\n var cRaiseEnabled;\n var cStartPosition;\n var cStartCenter;\n // Constants:\n var cRaiseOffset = 20;\n var cDraggingCursor = \"url(\" + this.handCursorURL_ + \")\";\n\n // Stops all processing of an event.\n //\n var cAbortEvent = function (e) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.cancelBubble = true;\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n };\n\n var cStopBounce = function () {\n me.marker_.setAnimation(null);\n };\n\n this.getPanes().overlayImage.appendChild(this.labelDiv_);\n this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_);\n // One cross is shared with all markers, so only add it once:\n if (typeof MarkerLabel_.getSharedCross.processed === \"undefined\") {\n this.getPanes().overlayImage.appendChild(this.crossDiv_);\n MarkerLabel_.getSharedCross.processed = true;\n }\n\n this.listeners_ = [\n google.maps.event.addDomListener(this.eventDiv_, \"mouseover\", function (e) {\n if (me.marker_.getDraggable() || me.marker_.getClickable()) {\n this.style.cursor = \"pointer\";\n google.maps.event.trigger(me.marker_, \"mouseover\", e);\n }\n }),\n google.maps.event.addDomListener(this.eventDiv_, \"mouseout\", function (e) {\n if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) {\n this.style.cursor = me.marker_.getCursor();\n google.maps.event.trigger(me.marker_, \"mouseout\", e);\n }\n }),\n google.maps.event.addDomListener(this.eventDiv_, \"mousedown\", function (e) {\n cDraggingLabel = false;\n if (me.marker_.getDraggable()) {\n cMouseIsDown = true;\n this.style.cursor = cDraggingCursor;\n }\n if (me.marker_.getDraggable() || me.marker_.getClickable()) {\n google.maps.event.trigger(me.marker_, \"mousedown\", e);\n cAbortEvent(e); // Prevent map pan when starting a drag on a label\n }\n }),\n google.maps.event.addDomListener(document, \"mouseup\", function (mEvent) {\n var position;\n if (cMouseIsDown) {\n cMouseIsDown = false;\n me.eventDiv_.style.cursor = \"pointer\";\n google.maps.event.trigger(me.marker_, \"mouseup\", mEvent);\n }\n if (cDraggingLabel) {\n if (cRaiseEnabled) { // Lower the marker & label\n position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition());\n position.y += cRaiseOffset;\n me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position));\n // This is not the same bouncing style as when the marker portion is dragged,\n // but it will have to do:\n try { // Will fail if running Google Maps API earlier than V3.3\n me.marker_.setAnimation(google.maps.Animation.BOUNCE);\n setTimeout(cStopBounce, 1406);\n } catch (e) {}\n }\n me.crossDiv_.style.display = \"none\";\n me.marker_.setZIndex(cSavedZIndex);\n cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag\n cDraggingLabel = false;\n mEvent.latLng = me.marker_.getPosition();\n google.maps.event.trigger(me.marker_, \"dragend\", mEvent);\n }\n }),\n google.maps.event.addListener(me.marker_.getMap(), \"mousemove\", function (mEvent) {\n var position;\n if (cMouseIsDown) {\n if (cDraggingLabel) {\n // Change the reported location from the mouse position to the marker position:\n mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset);\n position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng);\n if (cRaiseEnabled) {\n me.crossDiv_.style.left = position.x + \"px\";\n me.crossDiv_.style.top = position.y + \"px\";\n me.crossDiv_.style.display = \"\";\n position.y -= cRaiseOffset;\n }\n me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position));\n if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly\n me.eventDiv_.style.top = (position.y + cRaiseOffset) + \"px\";\n }\n google.maps.event.trigger(me.marker_, \"drag\", mEvent);\n } else {\n // Calculate offsets from the click point to the marker position:\n cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat();\n cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng();\n cSavedZIndex = me.marker_.getZIndex();\n cStartPosition = me.marker_.getPosition();\n cStartCenter = me.marker_.getMap().getCenter();\n cRaiseEnabled = me.marker_.get(\"raiseOnDrag\");\n cDraggingLabel = true;\n me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag\n mEvent.latLng = me.marker_.getPosition();\n google.maps.event.trigger(me.marker_, \"dragstart\", mEvent);\n }\n }\n }),\n google.maps.event.addDomListener(document, \"keydown\", function (e) {\n if (cDraggingLabel) {\n if (e.keyCode === 27) { // Esc key\n cRaiseEnabled = false;\n me.marker_.setPosition(cStartPosition);\n me.marker_.getMap().setCenter(cStartCenter);\n google.maps.event.trigger(document, \"mouseup\", e);\n }\n }\n }),\n google.maps.event.addDomListener(this.eventDiv_, \"click\", function (e) {\n if (me.marker_.getDraggable() || me.marker_.getClickable()) {\n if (cIgnoreClick) { // Ignore the click reported when a label drag ends\n cIgnoreClick = false;\n } else {\n google.maps.event.trigger(me.marker_, \"click\", e);\n cAbortEvent(e); // Prevent click from being passed on to map\n }\n }\n }),\n google.maps.event.addDomListener(this.eventDiv_, \"dblclick\", function (e) {\n if (me.marker_.getDraggable() || me.marker_.getClickable()) {\n google.maps.event.trigger(me.marker_, \"dblclick\", e);\n cAbortEvent(e); // Prevent map zoom when double-clicking on a label\n }\n }),\n google.maps.event.addListener(this.marker_, \"dragstart\", function (mEvent) {\n if (!cDraggingLabel) {\n cRaiseEnabled = this.get(\"raiseOnDrag\");\n }\n }),\n google.maps.event.addListener(this.marker_, \"drag\", function (mEvent) {\n if (!cDraggingLabel) {\n if (cRaiseEnabled) {\n me.setPosition(cRaiseOffset);\n // During a drag, the marker's z-index is temporarily set to 1000000 to\n // ensure it appears above all other markers. Also set the label's z-index\n // to 1000000 (plus or minus 1 depending on whether the label is supposed\n // to be above or below the marker).\n me.labelDiv_.style.zIndex = 1000000 + (this.get(\"labelInBackground\") ? -1 : +1);\n }\n }\n }),\n google.maps.event.addListener(this.marker_, \"dragend\", function (mEvent) {\n if (!cDraggingLabel) {\n if (cRaiseEnabled) {\n me.setPosition(0); // Also restores z-index of label\n }\n }\n }),\n google.maps.event.addListener(this.marker_, \"position_changed\", function () {\n me.setPosition();\n }),\n google.maps.event.addListener(this.marker_, \"zindex_changed\", function () {\n me.setZIndex();\n }),\n google.maps.event.addListener(this.marker_, \"visible_changed\", function () {\n me.setVisible();\n }),\n google.maps.event.addListener(this.marker_, \"labelvisible_changed\", function () {\n me.setVisible();\n }),\n google.maps.event.addListener(this.marker_, \"title_changed\", function () {\n me.setTitle();\n }),\n google.maps.event.addListener(this.marker_, \"labelcontent_changed\", function () {\n me.setContent();\n }),\n google.maps.event.addListener(this.marker_, \"labelanchor_changed\", function () {\n me.setAnchor();\n }),\n google.maps.event.addListener(this.marker_, \"labelclass_changed\", function () {\n me.setStyles();\n }),\n google.maps.event.addListener(this.marker_, \"labelstyle_changed\", function () {\n me.setStyles();\n })\n ];\n};\n\n/**\n * Removes the DIV for the label from the DOM. It also removes all event handlers.\n * This method is called automatically when the marker's setMap(null)\n * method is called.\n * @private\n */\nMarkerLabel_.prototype.onRemove = function () {\n var i;\n this.labelDiv_.parentNode.removeChild(this.labelDiv_);\n this.eventDiv_.parentNode.removeChild(this.eventDiv_);\n\n // Remove event listeners:\n for (i = 0; i < this.listeners_.length; i++) {\n google.maps.event.removeListener(this.listeners_[i]);\n }\n};\n\n/**\n * Draws the label on the map.\n * @private\n */\nMarkerLabel_.prototype.draw = function () {\n this.setContent();\n this.setTitle();\n this.setStyles();\n};\n\n/**\n * Sets the content of the label.\n * The content can be plain text or an HTML DOM node.\n * @private\n */\nMarkerLabel_.prototype.setContent = function () {\n var content = this.marker_.get(\"labelContent\");\n if (typeof content.nodeType === \"undefined\") {\n this.labelDiv_.innerHTML = content;\n this.eventDiv_.innerHTML = this.labelDiv_.innerHTML;\n } else {\n this.labelDiv_.innerHTML = \"\"; // Remove current content\n this.labelDiv_.appendChild(content);\n content = content.cloneNode(true);\n this.eventDiv_.innerHTML = \"\"; // Remove current content\n this.eventDiv_.appendChild(content);\n }\n};\n\n/**\n * Sets the content of the tool tip for the label. It is\n * always set to be the same as for the marker itself.\n * @private\n */\nMarkerLabel_.prototype.setTitle = function () {\n this.eventDiv_.title = this.marker_.getTitle() || \"\";\n};\n\n/**\n * Sets the style of the label by setting the style sheet and applying\n * other specific styles requested.\n * @private\n */\nMarkerLabel_.prototype.setStyles = function () {\n var i, labelStyle;\n\n // Apply style values from the style sheet defined in the labelClass parameter:\n this.labelDiv_.className = this.marker_.get(\"labelClass\");\n this.eventDiv_.className = this.labelDiv_.className;\n\n // Clear existing inline style values:\n this.labelDiv_.style.cssText = \"\";\n this.eventDiv_.style.cssText = \"\";\n // Apply style values defined in the labelStyle parameter:\n labelStyle = this.marker_.get(\"labelStyle\");\n for (i in labelStyle) {\n if (labelStyle.hasOwnProperty(i)) {\n this.labelDiv_.style[i] = labelStyle[i];\n this.eventDiv_.style[i] = labelStyle[i];\n }\n }\n this.setMandatoryStyles();\n};\n\n/**\n * Sets the mandatory styles to the DIV representing the label as well as to the\n * associated event DIV. This includes setting the DIV position, z-index, and visibility.\n * @private\n */\nMarkerLabel_.prototype.setMandatoryStyles = function () {\n this.labelDiv_.style.position = \"absolute\";\n this.labelDiv_.style.overflow = \"hidden\";\n // Make sure the opacity setting causes the desired effect on MSIE:\n if (typeof this.labelDiv_.style.opacity !== \"undefined\" && this.labelDiv_.style.opacity !== \"\") {\n this.labelDiv_.style.MsFilter = \"\\\"progid:DXImageTransform.Microsoft.Alpha(opacity=\" + (this.labelDiv_.style.opacity * 100) + \")\\\"\";\n this.labelDiv_.style.filter = \"alpha(opacity=\" + (this.labelDiv_.style.opacity * 100) + \")\";\n }\n\n this.eventDiv_.style.position = this.labelDiv_.style.position;\n this.eventDiv_.style.overflow = this.labelDiv_.style.overflow;\n this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE\n this.eventDiv_.style.MsFilter = \"\\\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\\\"\";\n this.eventDiv_.style.filter = \"alpha(opacity=1)\"; // For MSIE\n\n this.setAnchor();\n this.setPosition(); // This also updates z-index, if necessary.\n this.setVisible();\n};\n\n/**\n * Sets the anchor point of the label.\n * @private\n */\nMarkerLabel_.prototype.setAnchor = function () {\n var anchor = this.marker_.get(\"labelAnchor\");\n this.labelDiv_.style.marginLeft = -anchor.x + \"px\";\n this.labelDiv_.style.marginTop = -anchor.y + \"px\";\n this.eventDiv_.style.marginLeft = -anchor.x + \"px\";\n this.eventDiv_.style.marginTop = -anchor.y + \"px\";\n};\n\n/**\n * Sets the position of the label. The z-index is also updated, if necessary.\n * @private\n */\nMarkerLabel_.prototype.setPosition = function (yOffset) {\n var position = this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());\n if (typeof yOffset === \"undefined\") {\n yOffset = 0;\n }\n this.labelDiv_.style.left = Math.round(position.x) + \"px\";\n this.labelDiv_.style.top = Math.round(position.y - yOffset) + \"px\";\n this.eventDiv_.style.left = this.labelDiv_.style.left;\n this.eventDiv_.style.top = this.labelDiv_.style.top;\n\n this.setZIndex();\n};\n\n/**\n * Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index\n * of the label is set to the vertical coordinate of the label. This is in keeping with the default\n * stacking order for Google Maps: markers to the south are in front of markers to the north.\n * @private\n */\nMarkerLabel_.prototype.setZIndex = function () {\n var zAdjust = (this.marker_.get(\"labelInBackground\") ? -1 : +1);\n if (typeof this.marker_.getZIndex() === \"undefined\") {\n this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust;\n this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex;\n } else {\n this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust;\n this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex;\n }\n};\n\n/**\n * Sets the visibility of the label. The label is visible only if the marker itself is\n * visible (i.e., its visible property is true) and the labelVisible property is true.\n * @private\n */\nMarkerLabel_.prototype.setVisible = function () {\n if (this.marker_.get(\"labelVisible\")) {\n this.labelDiv_.style.display = this.marker_.getVisible() ? \"block\" : \"none\";\n } else {\n this.labelDiv_.style.display = \"none\";\n }\n this.eventDiv_.style.display = this.labelDiv_.style.display;\n};\n\n/**\n * @name MarkerWithLabelOptions\n * @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor.\n * The properties available are the same as for google.maps.Marker with the addition\n * of the properties listed below. To change any of these additional properties after the labeled\n * marker has been created, call google.maps.Marker.set(propertyName, propertyValue).\n *

\n * When any of these properties changes, a property changed event is fired. The names of these\n * events are derived from the name of the property and are of the form propertyname_changed.\n * For example, if the content of the label changes, a labelcontent_changed event\n * is fired.\n *

\n * @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node).\n * @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so\n * that its top left corner is positioned at the anchor point of the associated marker. Use this\n * property to change the anchor point of the label. For example, to center a 50px-wide label\n * beneath a marker, specify a labelAnchor of google.maps.Point(25, 0).\n * (Note: x-values increase to the right and y-values increase to the top.)\n * @property {string} [labelClass] The name of the CSS class defining the styles for the label.\n * Note that style values for position, overflow, top,\n * left, zIndex, display, marginLeft, and\n * marginTop are ignored; these styles are for internal use only.\n * @property {Object} [labelStyle] An object literal whose properties define specific CSS\n * style values to be applied to the label. Style values defined here override those that may\n * be defined in the labelClass style sheet. If this property is changed after the\n * label has been created, all previously set styles (except those defined in the style sheet)\n * are removed from the label before the new style values are applied.\n * Note that style values for position, overflow, top,\n * left, zIndex, display, marginLeft, and\n * marginTop are ignored; these styles are for internal use only.\n * @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its\n * associated marker should appear in the background (i.e., in a plane below the marker).\n * The default is false, which causes the label to appear in the foreground.\n * @property {boolean} [labelVisible] A flag indicating whether the label is to be visible.\n * The default is true. Note that even if labelVisible is\n * true, the label will not be visible unless the associated marker is also\n * visible (i.e., unless the marker's visible property is true).\n * @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be\n * raised when the marker is dragged. The default is true. If a draggable marker is\n * being created and a version of Google Maps API earlier than V3.3 is being used, this property\n * must be set to false.\n * @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the\n * marker. Important: The optimized rendering technique is not supported by MarkerWithLabel,\n * so the value of this parameter is always forced to false.\n * @property {string} [crossImage=\"http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png\"]\n * The URL of the cross image to be displayed while dragging a marker.\n * @property {string} [handCursor=\"http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur\"]\n * The URL of the cursor to be displayed while dragging a marker.\n */\n/**\n * Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}.\n * @constructor\n * @param {MarkerWithLabelOptions} [opt_options] The optional parameters.\n */\nfunction MarkerWithLabel(opt_options) {\n opt_options = opt_options || {};\n opt_options.labelContent = opt_options.labelContent || \"\";\n opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0);\n opt_options.labelClass = opt_options.labelClass || \"markerLabels\";\n opt_options.labelStyle = opt_options.labelStyle || {};\n opt_options.labelInBackground = opt_options.labelInBackground || false;\n if (typeof opt_options.labelVisible === \"undefined\") {\n opt_options.labelVisible = true;\n }\n if (typeof opt_options.raiseOnDrag === \"undefined\") {\n opt_options.raiseOnDrag = true;\n }\n if (typeof opt_options.clickable === \"undefined\") {\n opt_options.clickable = true;\n }\n if (typeof opt_options.draggable === \"undefined\") {\n opt_options.draggable = false;\n }\n if (typeof opt_options.optimized === \"undefined\") {\n opt_options.optimized = false;\n }\n opt_options.crossImage = opt_options.crossImage || \"http\" + (document.location.protocol === \"https:\" ? \"s\" : \"\") + \"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png\";\n opt_options.handCursor = opt_options.handCursor || \"http\" + (document.location.protocol === \"https:\" ? \"s\" : \"\") + \"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur\";\n opt_options.optimized = false; // Optimized rendering is not supported\n\n this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker\n\n // Call the parent constructor. It calls Marker.setValues to initialize, so all\n // the new parameters are conveniently saved and can be accessed with get/set.\n // Marker.set triggers a property changed event (called \"propertyname_changed\")\n // that the marker label listens for in order to react to state changes.\n google.maps.Marker.apply(this, arguments);\n}\n\ninherits(MarkerWithLabel, google.maps.Marker);\n\n/**\n * Overrides the standard Marker setMap function.\n * @param {Map} theMap The map to which the marker is to be added.\n * @private\n */\nMarkerWithLabel.prototype.setMap = function (theMap) {\n\n // Call the inherited function...\n google.maps.Marker.prototype.setMap.apply(this, arguments);\n\n // ... then deal with the label:\n this.label.setMap(theMap);\n};\n\n// ==ClosureCompiler==\n// @compilation_level ADVANCED_OPTIMIZATIONS\n// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js\n// @output_wrapper (function() {%output%})();\n// ==/ClosureCompiler==\n\n/**\n * @license\n * Copyright 2013 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A RichMarker that allows any HTML/DOM to be added to a map and be draggable.\n *\n * @param {Object.=} opt_options Optional properties to set.\n * @extends {google.maps.OverlayView}\n * @constructor\n */\nfunction RichMarker(opt_options) {\n var options = opt_options || {};\n\n /**\n * @type {boolean}\n * @private\n */\n this.ready_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n if (opt_options['visible'] == undefined) {\n opt_options['visible'] = true;\n }\n\n if (opt_options['shadow'] == undefined) {\n opt_options['shadow'] = '7px -3px 5px rgba(88,88,88,0.7)';\n }\n\n if (opt_options['anchor'] == undefined) {\n opt_options['anchor'] = RichMarkerPosition['BOTTOM'];\n }\n\n this.setValues(options);\n}\nRichMarker.prototype = new google.maps.OverlayView();\nwindow['RichMarker'] = RichMarker;\n\n\n/**\n * Returns the current visibility state of the marker.\n *\n * @return {boolean} The visiblity of the marker.\n */\nRichMarker.prototype.getVisible = function() {\n return /** @type {boolean} */ (this.get('visible'));\n};\nRichMarker.prototype['getVisible'] = RichMarker.prototype.getVisible;\n\n\n/**\n * Sets the visiblility state of the marker.\n *\n * @param {boolean} visible The visiblilty of the marker.\n */\nRichMarker.prototype.setVisible = function(visible) {\n this.set('visible', visible);\n};\nRichMarker.prototype['setVisible'] = RichMarker.prototype.setVisible;\n\n\n/**\n * The visible changed event.\n */\nRichMarker.prototype.visible_changed = function() {\n if (this.ready_) {\n this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none';\n this.draw();\n }\n};\nRichMarker.prototype['visible_changed'] = RichMarker.prototype.visible_changed;\n\n\n/**\n * Sets the marker to be flat.\n *\n * @param {boolean} flat If the marker is to be flat or not.\n */\nRichMarker.prototype.setFlat = function(flat) {\n this.set('flat', !!flat);\n};\nRichMarker.prototype['setFlat'] = RichMarker.prototype.setFlat;\n\n\n/**\n * If the makrer is flat or not.\n *\n * @return {boolean} True the marker is flat.\n */\nRichMarker.prototype.getFlat = function() {\n return /** @type {boolean} */ (this.get('flat'));\n};\nRichMarker.prototype['getFlat'] = RichMarker.prototype.getFlat;\n\n\n/**\n * Get the width of the marker.\n *\n * @return {Number} The width of the marker.\n */\nRichMarker.prototype.getWidth = function() {\n return /** @type {Number} */ (this.get('width'));\n};\nRichMarker.prototype['getWidth'] = RichMarker.prototype.getWidth;\n\n\n/**\n * Get the height of the marker.\n *\n * @return {Number} The height of the marker.\n */\nRichMarker.prototype.getHeight = function() {\n return /** @type {Number} */ (this.get('height'));\n};\nRichMarker.prototype['getHeight'] = RichMarker.prototype.getHeight;\n\n\n/**\n * Sets the marker's box shadow.\n *\n * @param {string} shadow The box shadow to set.\n */\nRichMarker.prototype.setShadow = function(shadow) {\n this.set('shadow', shadow);\n this.flat_changed();\n};\nRichMarker.prototype['setShadow'] = RichMarker.prototype.setShadow;\n\n\n/**\n * Gets the marker's box shadow.\n *\n * @return {string} The box shadow.\n */\nRichMarker.prototype.getShadow = function() {\n return /** @type {string} */ (this.get('shadow'));\n};\nRichMarker.prototype['getShadow'] = RichMarker.prototype.getShadow;\n\n\n/**\n * Flat changed event.\n */\nRichMarker.prototype.flat_changed = function() {\n if (!this.ready_) {\n return;\n }\n\n this.markerWrapper_.style['boxShadow'] =\n this.markerWrapper_.style['webkitBoxShadow'] =\n this.markerWrapper_.style['MozBoxShadow'] =\n this.getFlat() ? '' : this.getShadow();\n};\nRichMarker.prototype['flat_changed'] = RichMarker.prototype.flat_changed;\n\n\n/**\n * Sets the zIndex of the marker.\n *\n * @param {Number} index The index to set.\n */\nRichMarker.prototype.setZIndex = function(index) {\n this.set('zIndex', index);\n};\nRichMarker.prototype['setZIndex'] = RichMarker.prototype.setZIndex;\n\n\n/**\n * Gets the zIndex of the marker.\n *\n * @return {Number} The zIndex of the marker.\n */\nRichMarker.prototype.getZIndex = function() {\n return /** @type {Number} */ (this.get('zIndex'));\n};\nRichMarker.prototype['getZIndex'] = RichMarker.prototype.getZIndex;\n\n\n/**\n * zIndex changed event.\n */\nRichMarker.prototype.zIndex_changed = function() {\n if (this.getZIndex() && this.ready_) {\n this.markerWrapper_.style.zIndex = this.getZIndex();\n }\n};\nRichMarker.prototype['zIndex_changed'] = RichMarker.prototype.zIndex_changed;\n\n/**\n * Whether the marker is draggable or not.\n *\n * @return {boolean} True if the marker is draggable.\n */\nRichMarker.prototype.getDraggable = function() {\n return /** @type {boolean} */ (this.get('draggable'));\n};\nRichMarker.prototype['getDraggable'] = RichMarker.prototype.getDraggable;\n\n\n/**\n * Sets the marker to be draggable or not.\n *\n * @param {boolean} draggable If the marker is draggable or not.\n */\nRichMarker.prototype.setDraggable = function(draggable) {\n this.set('draggable', !!draggable);\n};\nRichMarker.prototype['setDraggable'] = RichMarker.prototype.setDraggable;\n\n\n/**\n * Draggable property changed callback.\n */\nRichMarker.prototype.draggable_changed = function() {\n if (this.ready_) {\n if (this.getDraggable()) {\n this.addDragging_(this.markerWrapper_);\n } else {\n this.removeDragListeners_();\n }\n }\n};\nRichMarker.prototype['draggable_changed'] =\n RichMarker.prototype.draggable_changed;\n\n\n/**\n * Gets the postiton of the marker.\n *\n * @return {google.maps.LatLng} The position of the marker.\n */\nRichMarker.prototype.getPosition = function() {\n return /** @type {google.maps.LatLng} */ (this.get('position'));\n};\nRichMarker.prototype['getPosition'] = RichMarker.prototype.getPosition;\n\n\n/**\n * Sets the position of the marker.\n *\n * @param {google.maps.LatLng} position The position to set.\n */\nRichMarker.prototype.setPosition = function(position) {\n this.set('position', position);\n};\nRichMarker.prototype['setPosition'] = RichMarker.prototype.setPosition;\n\n\n/**\n * Position changed event.\n */\nRichMarker.prototype.position_changed = function() {\n this.draw();\n};\nRichMarker.prototype['position_changed'] =\n RichMarker.prototype.position_changed;\n\n\n/**\n * Gets the anchor.\n *\n * @return {google.maps.Size} The position of the anchor.\n */\nRichMarker.prototype.getAnchor = function() {\n return /** @type {google.maps.Size} */ (this.get('anchor'));\n};\nRichMarker.prototype['getAnchor'] = RichMarker.prototype.getAnchor;\n\n\n/**\n * Sets the anchor.\n *\n * @param {RichMarkerPosition|google.maps.Size} anchor The anchor to set.\n */\nRichMarker.prototype.setAnchor = function(anchor) {\n this.set('anchor', anchor);\n};\nRichMarker.prototype['setAnchor'] = RichMarker.prototype.setAnchor;\n\n\n/**\n * Anchor changed event.\n */\nRichMarker.prototype.anchor_changed = function() {\n this.draw();\n};\nRichMarker.prototype['anchor_changed'] = RichMarker.prototype.anchor_changed;\n\n\n/**\n * Converts a HTML string to a document fragment.\n *\n * @param {string} htmlString The HTML string to convert.\n * @return {Node} A HTML document fragment.\n * @private\n */\nRichMarker.prototype.htmlToDocumentFragment_ = function(htmlString) {\n var tempDiv = document.createElement('DIV');\n tempDiv.innerHTML = htmlString;\n if (tempDiv.childNodes.length == 1) {\n return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild));\n } else {\n var fragment = document.createDocumentFragment();\n while (tempDiv.firstChild) {\n fragment.appendChild(tempDiv.firstChild);\n }\n return fragment;\n }\n};\n\n\n/**\n * Removes all children from the node.\n *\n * @param {Node} node The node to remove all children from.\n * @private\n */\nRichMarker.prototype.removeChildren_ = function(node) {\n if (!node) {\n return;\n }\n\n var child;\n while (child = node.firstChild) {\n node.removeChild(child);\n }\n};\n\n\n/**\n * Sets the content of the marker.\n *\n * @param {string|Node} content The content to set.\n */\nRichMarker.prototype.setContent = function(content) {\n this.set('content', content);\n};\nRichMarker.prototype['setContent'] = RichMarker.prototype.setContent;\n\n\n/**\n * Get the content of the marker.\n *\n * @return {string|Node} The marker content.\n */\nRichMarker.prototype.getContent = function() {\n return /** @type {Node|string} */ (this.get('content'));\n};\nRichMarker.prototype['getContent'] = RichMarker.prototype.getContent;\n\n\n/**\n * Sets the marker content and adds loading events to images\n */\nRichMarker.prototype.content_changed = function() {\n if (!this.markerContent_) {\n // Marker content area doesnt exist.\n return;\n }\n\n this.removeChildren_(this.markerContent_);\n var content = this.getContent();\n if (content) {\n if (typeof content == 'string') {\n content = content.replace(/^\\s*([\\S\\s]*)\\b\\s*$/, '$1');\n content = this.htmlToDocumentFragment_(content);\n }\n this.markerContent_.appendChild(content);\n\n var that = this;\n var images = this.markerContent_.getElementsByTagName('IMG');\n for (var i = 0, image; image = images[i]; i++) {\n // By default, a browser lets a image be dragged outside of the browser,\n // so by calling preventDefault we stop this behaviour and allow the image\n // to be dragged around the map and now out of the browser and onto the\n // desktop.\n google.maps.event.addDomListener(image, 'mousedown', function(e) {\n if (that.getDraggable()) {\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n }\n });\n\n // Because we don't know the size of an image till it loads, add a\n // listener to the image load so the marker can resize and reposition\n // itself to be the correct height.\n google.maps.event.addDomListener(image, 'load', function() {\n that.draw();\n });\n }\n\n google.maps.event.trigger(this, 'domready');\n }\n\n if (this.ready_) {\n this.draw();\n }\n};\nRichMarker.prototype['content_changed'] = RichMarker.prototype.content_changed;\n\n/**\n * Sets the cursor.\n *\n * @param {string} whichCursor What cursor to show.\n * @private\n */\nRichMarker.prototype.setCursor_ = function(whichCursor) {\n if (!this.ready_) {\n return;\n }\n\n var cursor = '';\n if (navigator.userAgent.indexOf('Gecko/') !== -1) {\n // Moz has some nice cursors :)\n if (whichCursor == 'dragging') {\n cursor = '-moz-grabbing';\n }\n\n if (whichCursor == 'dragready') {\n cursor = '-moz-grab';\n }\n\n if (whichCursor == 'draggable') {\n cursor = 'pointer';\n }\n } else {\n if (whichCursor == 'dragging' || whichCursor == 'dragready') {\n cursor = 'move';\n }\n\n if (whichCursor == 'draggable') {\n cursor = 'pointer';\n }\n }\n\n if (this.markerWrapper_.style.cursor != cursor) {\n this.markerWrapper_.style.cursor = cursor;\n }\n};\n\n/**\n * Start dragging.\n *\n * @param {Event} e The event.\n */\nRichMarker.prototype.startDrag = function(e) {\n if (!this.getDraggable()) {\n return;\n }\n\n if (!this.dragging_) {\n this.dragging_ = true;\n var map = this.getMap();\n this.mapDraggable_ = map.get('draggable');\n map.set('draggable', false);\n\n // Store the current mouse position\n this.mouseX_ = e.clientX;\n this.mouseY_ = e.clientY;\n\n this.setCursor_('dragready');\n\n // Stop the text from being selectable while being dragged\n this.markerWrapper_.style['MozUserSelect'] = 'none';\n this.markerWrapper_.style['KhtmlUserSelect'] = 'none';\n this.markerWrapper_.style['WebkitUserSelect'] = 'none';\n\n this.markerWrapper_['unselectable'] = 'on';\n this.markerWrapper_['onselectstart'] = function() {\n return false;\n };\n\n this.addDraggingListeners_();\n\n google.maps.event.trigger(this, 'dragstart');\n }\n};\n\n\n/**\n * Stop dragging.\n */\nRichMarker.prototype.stopDrag = function() {\n if (!this.getDraggable()) {\n return;\n }\n\n if (this.dragging_) {\n this.dragging_ = false;\n this.getMap().set('draggable', this.mapDraggable_);\n this.mouseX_ = this.mouseY_ = this.mapDraggable_ = null;\n\n // Allow the text to be selectable again\n this.markerWrapper_.style['MozUserSelect'] = '';\n this.markerWrapper_.style['KhtmlUserSelect'] = '';\n this.markerWrapper_.style['WebkitUserSelect'] = '';\n this.markerWrapper_['unselectable'] = 'off';\n this.markerWrapper_['onselectstart'] = function() {};\n\n this.removeDraggingListeners_();\n\n this.setCursor_('draggable');\n google.maps.event.trigger(this, 'dragend');\n\n this.draw();\n }\n};\n\n\n/**\n * Handles the drag event.\n *\n * @param {Event} e The event.\n */\nRichMarker.prototype.drag = function(e) {\n if (!this.getDraggable() || !this.dragging_) {\n // This object isn't draggable or we have stopped dragging\n this.stopDrag();\n return;\n }\n\n var dx = this.mouseX_ - e.clientX;\n var dy = this.mouseY_ - e.clientY;\n\n this.mouseX_ = e.clientX;\n this.mouseY_ = e.clientY;\n\n var left = parseInt(this.markerWrapper_.style['left'], 10) - dx;\n var top = parseInt(this.markerWrapper_.style['top'], 10) - dy;\n\n this.markerWrapper_.style['left'] = left + 'px';\n this.markerWrapper_.style['top'] = top + 'px';\n\n var offset = this.getOffset_();\n\n // Set the position property and adjust for the anchor offset\n var point = new google.maps.Point(left - offset.width, top - offset.height);\n var projection = this.getProjection();\n this.setPosition(projection.fromDivPixelToLatLng(point));\n\n this.setCursor_('dragging');\n google.maps.event.trigger(this, 'drag');\n};\n\n\n/**\n * Removes the drag listeners associated with the marker.\n *\n * @private\n */\nRichMarker.prototype.removeDragListeners_ = function() {\n if (this.draggableListener_) {\n google.maps.event.removeListener(this.draggableListener_);\n delete this.draggableListener_;\n }\n this.setCursor_('');\n};\n\n\n/**\n * Add dragability events to the marker.\n *\n * @param {Node} node The node to apply dragging to.\n * @private\n */\nRichMarker.prototype.addDragging_ = function(node) {\n if (!node) {\n return;\n }\n\n var that = this;\n this.draggableListener_ =\n google.maps.event.addDomListener(node, 'mousedown', function(e) {\n that.startDrag(e);\n });\n\n this.setCursor_('draggable');\n};\n\n\n/**\n * Add dragging listeners.\n *\n * @private\n */\nRichMarker.prototype.addDraggingListeners_ = function() {\n var that = this;\n if (this.markerWrapper_.setCapture) {\n this.markerWrapper_.setCapture(true);\n this.draggingListeners_ = [\n google.maps.event.addDomListener(this.markerWrapper_, 'mousemove', function(e) {\n that.drag(e);\n }, true),\n google.maps.event.addDomListener(this.markerWrapper_, 'mouseup', function() {\n that.stopDrag();\n that.markerWrapper_.releaseCapture();\n }, true)\n ];\n } else {\n this.draggingListeners_ = [\n google.maps.event.addDomListener(window, 'mousemove', function(e) {\n that.drag(e);\n }, true),\n google.maps.event.addDomListener(window, 'mouseup', function() {\n that.stopDrag();\n }, true)\n ];\n }\n};\n\n\n/**\n * Remove dragging listeners.\n *\n * @private\n */\nRichMarker.prototype.removeDraggingListeners_ = function() {\n if (this.draggingListeners_) {\n for (var i = 0, listener; listener = this.draggingListeners_[i]; i++) {\n google.maps.event.removeListener(listener);\n }\n this.draggingListeners_.length = 0;\n }\n};\n\n\n/**\n * Get the anchor offset.\n *\n * @return {google.maps.Size} The size offset.\n * @private\n */\nRichMarker.prototype.getOffset_ = function() {\n var anchor = this.getAnchor();\n if (typeof anchor == 'object') {\n return /** @type {google.maps.Size} */ (anchor);\n }\n\n var offset = new google.maps.Size(0, 0);\n if (!this.markerContent_) {\n return offset;\n }\n\n var width = this.markerContent_.offsetWidth;\n var height = this.markerContent_.offsetHeight;\n\n switch (anchor) {\n case RichMarkerPosition['TOP_LEFT']:\n break;\n case RichMarkerPosition['TOP']:\n offset.width = -width / 2;\n break;\n case RichMarkerPosition['TOP_RIGHT']:\n offset.width = -width;\n break;\n case RichMarkerPosition['LEFT']:\n offset.height = -height / 2;\n break;\n case RichMarkerPosition['MIDDLE']:\n offset.width = -width / 2;\n offset.height = -height / 2;\n break;\n case RichMarkerPosition['RIGHT']:\n offset.width = -width;\n offset.height = -height / 2;\n break;\n case RichMarkerPosition['BOTTOM_LEFT']:\n offset.height = -height;\n break;\n case RichMarkerPosition['BOTTOM']:\n offset.width = -width / 2;\n offset.height = -height;\n break;\n case RichMarkerPosition['BOTTOM_RIGHT']:\n offset.width = -width;\n offset.height = -height;\n break;\n }\n\n return offset;\n};\n\n\n/**\n * Adding the marker to a map.\n * Implementing the interface.\n */\nRichMarker.prototype.onAdd = function() {\n if (!this.markerWrapper_) {\n this.markerWrapper_ = document.createElement('DIV');\n this.markerWrapper_.style['position'] = 'absolute';\n }\n\n if (this.getZIndex()) {\n this.markerWrapper_.style['zIndex'] = this.getZIndex();\n }\n\n this.markerWrapper_.style['display'] = this.getVisible() ? '' : 'none';\n\n if (!this.markerContent_) {\n this.markerContent_ = document.createElement('DIV');\n this.markerWrapper_.appendChild(this.markerContent_);\n\n var that = this;\n google.maps.event.addDomListener(this.markerContent_, 'click', function(e) {\n google.maps.event.trigger(that, 'click');\n });\n google.maps.event.addDomListener(this.markerContent_, 'mouseover', function(e) {\n google.maps.event.trigger(that, 'mouseover');\n });\n google.maps.event.addDomListener(this.markerContent_, 'mouseout', function(e) {\n google.maps.event.trigger(that, 'mouseout');\n });\n }\n\n this.ready_ = true;\n this.content_changed();\n this.flat_changed();\n this.draggable_changed();\n\n var panes = this.getPanes();\n if (panes) {\n panes.overlayMouseTarget.appendChild(this.markerWrapper_);\n }\n\n google.maps.event.trigger(this, 'ready');\n};\nRichMarker.prototype['onAdd'] = RichMarker.prototype.onAdd;\n\n\n/**\n * Impelementing the interface.\n */\nRichMarker.prototype.draw = function() {\n if (!this.ready_ || this.dragging_) {\n return;\n }\n\n var projection = this.getProjection();\n\n if (!projection) {\n // The map projection is not ready yet so do nothing\n return;\n }\n\n var latLng = /** @type {google.maps.LatLng} */ (this.get('position'));\n var pos = projection.fromLatLngToDivPixel(latLng);\n\n var offset = this.getOffset_();\n this.markerWrapper_.style['top'] = (pos.y + offset.height) + 'px';\n this.markerWrapper_.style['left'] = (pos.x + offset.width) + 'px';\n\n var height = this.markerContent_.offsetHeight;\n var width = this.markerContent_.offsetWidth;\n\n if (width != this.get('width')) {\n this.set('width', width);\n }\n\n if (height != this.get('height')) {\n this.set('height', height);\n }\n};\nRichMarker.prototype['draw'] = RichMarker.prototype.draw;\n\n\n/**\n * Removing a marker from the map.\n * Implementing the interface.\n */\nRichMarker.prototype.onRemove = function() {\n if (this.markerWrapper_ && this.markerWrapper_.parentNode) {\n this.markerWrapper_.parentNode.removeChild(this.markerWrapper_);\n }\n this.removeDragListeners_();\n};\nRichMarker.prototype['onRemove'] = RichMarker.prototype.onRemove;\n\n\n/**\n * RichMarker Anchor positions\n * @enum {number}\n */\nvar RichMarkerPosition = {\n 'TOP_LEFT': 1,\n 'TOP': 2,\n 'TOP_RIGHT': 3,\n 'LEFT': 4,\n 'MIDDLE': 5,\n 'RIGHT': 6,\n 'BOTTOM_LEFT': 7,\n 'BOTTOM': 8,\n 'BOTTOM_RIGHT': 9\n};\nwindow['RichMarkerPosition'] = RichMarkerPosition;\n\n\n //TODO: export / passthese on in the service instead of window\n window.InfoBox = InfoBox;\n window.Cluster = Cluster;\n window.ClusterIcon = ClusterIcon;\n window.MarkerClusterer = MarkerClusterer;\n window.MarkerLabel_ = MarkerLabel_;\n window.MarkerWithLabel = MarkerWithLabel;\n window.RichMarker = RichMarker;\n }();\n //END REPLACE\n })\n };\n});\n","/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* istanbul ignore next */\n\tangular.module('uiGmapgoogle-maps.wrapped')\n\t.service('uiGmapDataStructures', function() {\n\treturn {\n\t Graph: __webpack_require__(1).Graph,\n\t Queue: __webpack_require__(1).Queue\n\t};\n\t});\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t(function() {\n\t module.exports = {\n\t Graph: __webpack_require__(2),\n\t Heap: __webpack_require__(3),\n\t LinkedList: __webpack_require__(4),\n\t Map: __webpack_require__(5),\n\t Queue: __webpack_require__(6),\n\t RedBlackTree: __webpack_require__(7),\n\t Trie: __webpack_require__(8)\n\t };\n\n\t}).call(this);\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\t/*\n\tGraph implemented as a modified incidence list. O(1) for every typical\n\toperation except `removeNode()` at O(E) where E is the number of edges.\n\n\t## Overview example:\n\n\t```js\n\tvar graph = new Graph;\n\tgraph.addNode('A'); // => a node object. For more info, log the output or check\n\t // the documentation for addNode\n\tgraph.addNode('B');\n\tgraph.addNode('C');\n\tgraph.addEdge('A', 'C'); // => an edge object\n\tgraph.addEdge('A', 'B');\n\tgraph.getEdge('B', 'A'); // => undefined. Directed edge!\n\tgraph.getEdge('A', 'B'); // => the edge object previously added\n\tgraph.getEdge('A', 'B').weight = 2 // weight is the only built-in handy property\n\t // of an edge object. Feel free to attach\n\t // other properties\n\tgraph.getInEdgesOf('B'); // => array of edge objects, in this case only one;\n\t // connecting A to B\n\tgraph.getOutEdgesOf('A'); // => array of edge objects, one to B and one to C\n\tgraph.getAllEdgesOf('A'); // => all the in and out edges. Edge directed toward\n\t // the node itself are only counted once\n\tforEachNode(function(nodeObject) {\n\t console.log(node);\n\t});\n\tforEachEdge(function(edgeObject) {\n\t console.log(edgeObject);\n\t});\n\tgraph.removeNode('C'); // => 'C'. The edge between A and C also removed\n\tgraph.removeEdge('A', 'B'); // => the edge object removed\n\t```\n\n\t## Properties:\n\n\t- nodeSize: total number of nodes.\n\t- edgeSize: total number of edges.\n\t*/\n\n\n\t(function() {\n\t var Graph,\n\t __hasProp = {}.hasOwnProperty;\n\n\t Graph = (function() {\n\t function Graph() {\n\t this._nodes = {};\n\t this.nodeSize = 0;\n\t this.edgeSize = 0;\n\t }\n\n\t Graph.prototype.addNode = function(id) {\n\t /*\n\t The `id` is a unique identifier for the node, and should **not** change\n\t after it's added. It will be used for adding, retrieving and deleting\n\t related edges too.\n\t \n\t **Note** that, internally, the ids are kept in an object. JavaScript's\n\t object hashes the id `'2'` and `2` to the same key, so please stick to a\n\t simple id data type such as number or string.\n\t \n\t _Returns:_ the node object. Feel free to attach additional custom properties\n\t on it for graph algorithms' needs. **Undefined if node id already exists**,\n\t as to avoid accidental overrides.\n\t */\n\n\t if (!this._nodes[id]) {\n\t this.nodeSize++;\n\t return this._nodes[id] = {\n\t _outEdges: {},\n\t _inEdges: {}\n\t };\n\t }\n\t };\n\n\t Graph.prototype.getNode = function(id) {\n\t /*\n\t _Returns:_ the node object. Feel free to attach additional custom properties\n\t on it for graph algorithms' needs.\n\t */\n\n\t return this._nodes[id];\n\t };\n\n\t Graph.prototype.removeNode = function(id) {\n\t /*\n\t _Returns:_ the node object removed, or undefined if it didn't exist in the\n\t first place.\n\t */\n\n\t var inEdgeId, nodeToRemove, outEdgeId, _ref, _ref1;\n\t nodeToRemove = this._nodes[id];\n\t if (!nodeToRemove) {\n\t return;\n\t } else {\n\t _ref = nodeToRemove._outEdges;\n\t for (outEdgeId in _ref) {\n\t if (!__hasProp.call(_ref, outEdgeId)) continue;\n\t this.removeEdge(id, outEdgeId);\n\t }\n\t _ref1 = nodeToRemove._inEdges;\n\t for (inEdgeId in _ref1) {\n\t if (!__hasProp.call(_ref1, inEdgeId)) continue;\n\t this.removeEdge(inEdgeId, id);\n\t }\n\t this.nodeSize--;\n\t delete this._nodes[id];\n\t }\n\t return nodeToRemove;\n\t };\n\n\t Graph.prototype.addEdge = function(fromId, toId, weight) {\n\t var edgeToAdd, fromNode, toNode;\n\t if (weight == null) {\n\t weight = 1;\n\t }\n\t /*\n\t `fromId` and `toId` are the node id specified when it was created using\n\t `addNode()`. `weight` is optional and defaults to 1. Ignoring it effectively\n\t makes this an unweighted graph. Under the hood, `weight` is just a normal\n\t property of the edge object.\n\t \n\t _Returns:_ the edge object created. Feel free to attach additional custom\n\t properties on it for graph algorithms' needs. **Or undefined** if the nodes\n\t of id `fromId` or `toId` aren't found, or if an edge already exists between\n\t the two nodes.\n\t */\n\n\t if (this.getEdge(fromId, toId)) {\n\t return;\n\t }\n\t fromNode = this._nodes[fromId];\n\t toNode = this._nodes[toId];\n\t if (!fromNode || !toNode) {\n\t return;\n\t }\n\t edgeToAdd = {\n\t weight: weight\n\t };\n\t fromNode._outEdges[toId] = edgeToAdd;\n\t toNode._inEdges[fromId] = edgeToAdd;\n\t this.edgeSize++;\n\t return edgeToAdd;\n\t };\n\n\t Graph.prototype.getEdge = function(fromId, toId) {\n\t /*\n\t _Returns:_ the edge object, or undefined if the nodes of id `fromId` or\n\t `toId` aren't found.\n\t */\n\n\t var fromNode, toNode;\n\t fromNode = this._nodes[fromId];\n\t toNode = this._nodes[toId];\n\t if (!fromNode || !toNode) {\n\n\t } else {\n\t return fromNode._outEdges[toId];\n\t }\n\t };\n\n\t Graph.prototype.removeEdge = function(fromId, toId) {\n\t /*\n\t _Returns:_ the edge object removed, or undefined of edge wasn't found.\n\t */\n\n\t var edgeToDelete, fromNode, toNode;\n\t fromNode = this._nodes[fromId];\n\t toNode = this._nodes[toId];\n\t edgeToDelete = this.getEdge(fromId, toId);\n\t if (!edgeToDelete) {\n\t return;\n\t }\n\t delete fromNode._outEdges[toId];\n\t delete toNode._inEdges[fromId];\n\t this.edgeSize--;\n\t return edgeToDelete;\n\t };\n\n\t Graph.prototype.getInEdgesOf = function(nodeId) {\n\t /*\n\t _Returns:_ an array of edge objects that are directed toward the node, or\n\t empty array if no such edge or node exists.\n\t */\n\n\t var fromId, inEdges, toNode, _ref;\n\t toNode = this._nodes[nodeId];\n\t inEdges = [];\n\t _ref = toNode != null ? toNode._inEdges : void 0;\n\t for (fromId in _ref) {\n\t if (!__hasProp.call(_ref, fromId)) continue;\n\t inEdges.push(this.getEdge(fromId, nodeId));\n\t }\n\t return inEdges;\n\t };\n\n\t Graph.prototype.getOutEdgesOf = function(nodeId) {\n\t /*\n\t _Returns:_ an array of edge objects that go out of the node, or empty array\n\t if no such edge or node exists.\n\t */\n\n\t var fromNode, outEdges, toId, _ref;\n\t fromNode = this._nodes[nodeId];\n\t outEdges = [];\n\t _ref = fromNode != null ? fromNode._outEdges : void 0;\n\t for (toId in _ref) {\n\t if (!__hasProp.call(_ref, toId)) continue;\n\t outEdges.push(this.getEdge(nodeId, toId));\n\t }\n\t return outEdges;\n\t };\n\n\t Graph.prototype.getAllEdgesOf = function(nodeId) {\n\t /*\n\t **Note:** not the same as concatenating `getInEdgesOf()` and\n\t `getOutEdgesOf()`. Some nodes might have an edge pointing toward itself.\n\t This method solves that duplication.\n\t \n\t _Returns:_ an array of edge objects linked to the node, no matter if they're\n\t outgoing or coming. Duplicate edge created by self-pointing nodes are\n\t removed. Only one copy stays. Empty array if node has no edge.\n\t */\n\n\t var i, inEdges, outEdges, selfEdge, _i, _ref, _ref1;\n\t inEdges = this.getInEdgesOf(nodeId);\n\t outEdges = this.getOutEdgesOf(nodeId);\n\t if (inEdges.length === 0) {\n\t return outEdges;\n\t }\n\t selfEdge = this.getEdge(nodeId, nodeId);\n\t for (i = _i = 0, _ref = inEdges.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n\t if (inEdges[i] === selfEdge) {\n\t _ref1 = [inEdges[inEdges.length - 1], inEdges[i]], inEdges[i] = _ref1[0], inEdges[inEdges.length - 1] = _ref1[1];\n\t inEdges.pop();\n\t break;\n\t }\n\t }\n\t return inEdges.concat(outEdges);\n\t };\n\n\t Graph.prototype.forEachNode = function(operation) {\n\t /*\n\t Traverse through the graph in an arbitrary manner, visiting each node once.\n\t Pass a function of the form `fn(nodeObject, nodeId)`.\n\t \n\t _Returns:_ undefined.\n\t */\n\n\t var nodeId, nodeObject, _ref;\n\t _ref = this._nodes;\n\t for (nodeId in _ref) {\n\t if (!__hasProp.call(_ref, nodeId)) continue;\n\t nodeObject = _ref[nodeId];\n\t operation(nodeObject, nodeId);\n\t }\n\t };\n\n\t Graph.prototype.forEachEdge = function(operation) {\n\t /*\n\t Traverse through the graph in an arbitrary manner, visiting each edge once.\n\t Pass a function of the form `fn(edgeObject)`.\n\t \n\t _Returns:_ undefined.\n\t */\n\n\t var edgeObject, nodeId, nodeObject, toId, _ref, _ref1;\n\t _ref = this._nodes;\n\t for (nodeId in _ref) {\n\t if (!__hasProp.call(_ref, nodeId)) continue;\n\t nodeObject = _ref[nodeId];\n\t _ref1 = nodeObject._outEdges;\n\t for (toId in _ref1) {\n\t if (!__hasProp.call(_ref1, toId)) continue;\n\t edgeObject = _ref1[toId];\n\t operation(edgeObject);\n\t }\n\t }\n\t };\n\n\t return Graph;\n\n\t })();\n\n\t module.exports = Graph;\n\n\t}).call(this);\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/*\n\tMinimum heap, i.e. smallest node at root.\n\n\t**Note:** does not accept null or undefined. This is by design. Those values\n\tcause comparison problems and might report false negative during extraction.\n\n\t## Overview example:\n\n\t```js\n\tvar heap = new Heap([5, 6, 3, 4]);\n\theap.add(10); // => 10\n\theap.removeMin(); // => 3\n\theap.peekMin(); // => 4\n\t```\n\n\t## Properties:\n\n\t- size: total number of items.\n\t*/\n\n\n\t(function() {\n\t var Heap, _leftChild, _parent, _rightChild;\n\n\t Heap = (function() {\n\t function Heap(dataToHeapify) {\n\t var i, item, _i, _j, _len, _ref;\n\t if (dataToHeapify == null) {\n\t dataToHeapify = [];\n\t }\n\t /*\n\t Pass an optional array to be heapified. Takes only O(n) time.\n\t */\n\n\t this._data = [void 0];\n\t for (_i = 0, _len = dataToHeapify.length; _i < _len; _i++) {\n\t item = dataToHeapify[_i];\n\t if (item != null) {\n\t this._data.push(item);\n\t }\n\t }\n\t if (this._data.length > 1) {\n\t for (i = _j = 2, _ref = this._data.length; 2 <= _ref ? _j < _ref : _j > _ref; i = 2 <= _ref ? ++_j : --_j) {\n\t this._upHeap(i);\n\t }\n\t }\n\t this.size = this._data.length - 1;\n\t }\n\n\t Heap.prototype.add = function(value) {\n\t /*\n\t **Remember:** rejects null and undefined for mentioned reasons.\n\t \n\t _Returns:_ the value added.\n\t */\n\n\t if (value == null) {\n\t return;\n\t }\n\t this._data.push(value);\n\t this._upHeap(this._data.length - 1);\n\t this.size++;\n\t return value;\n\t };\n\n\t Heap.prototype.removeMin = function() {\n\t /*\n\t _Returns:_ the smallest item (the root).\n\t */\n\n\t var min;\n\t if (this._data.length === 1) {\n\t return;\n\t }\n\t this.size--;\n\t if (this._data.length === 2) {\n\t return this._data.pop();\n\t }\n\t min = this._data[1];\n\t this._data[1] = this._data.pop();\n\t this._downHeap();\n\t return min;\n\t };\n\n\t Heap.prototype.peekMin = function() {\n\t /*\n\t Check the smallest item without removing it.\n\t \n\t _Returns:_ the smallest item (the root).\n\t */\n\n\t return this._data[1];\n\t };\n\n\t Heap.prototype._upHeap = function(index) {\n\t var valueHolder, _ref;\n\t valueHolder = this._data[index];\n\t while (this._data[index] < this._data[_parent(index)] && index > 1) {\n\t _ref = [this._data[_parent(index)], this._data[index]], this._data[index] = _ref[0], this._data[_parent(index)] = _ref[1];\n\t index = _parent(index);\n\t }\n\t };\n\n\t Heap.prototype._downHeap = function() {\n\t var currentIndex, smallerChildIndex, _ref;\n\t currentIndex = 1;\n\t while (_leftChild(currentIndex < this._data.length)) {\n\t smallerChildIndex = _leftChild(currentIndex);\n\t if (smallerChildIndex < this._data.length - 1) {\n\t if (this._data[_rightChild(currentIndex)] < this._data[smallerChildIndex]) {\n\t smallerChildIndex = _rightChild(currentIndex);\n\t }\n\t }\n\t if (this._data[smallerChildIndex] < this._data[currentIndex]) {\n\t _ref = [this._data[currentIndex], this._data[smallerChildIndex]], this._data[smallerChildIndex] = _ref[0], this._data[currentIndex] = _ref[1];\n\t currentIndex = smallerChildIndex;\n\t } else {\n\t break;\n\t }\n\t }\n\t };\n\n\t return Heap;\n\n\t })();\n\n\t _parent = function(index) {\n\t return index >> 1;\n\t };\n\n\t _leftChild = function(index) {\n\t return index << 1;\n\t };\n\n\t _rightChild = function(index) {\n\t return (index << 1) + 1;\n\t };\n\n\t module.exports = Heap;\n\n\t}).call(this);\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/*\n\tDoubly Linked.\n\n\t## Overview example:\n\n\t```js\n\tvar list = new LinkedList([5, 4, 9]);\n\tlist.add(12); // => 12\n\tlist.head.next.value; // => 4\n\tlist.tail.value; // => 12\n\tlist.at(-1); // => 12\n\tlist.removeAt(2); // => 9\n\tlist.remove(4); // => 4\n\tlist.indexOf(5); // => 0\n\tlist.add(5, 1); // => 5. Second 5 at position 1.\n\tlist.indexOf(5, 1); // => 1\n\t```\n\n\t## Properties:\n\n\t- head: first item.\n\t- tail: last item.\n\t- size: total number of items.\n\t- item.value: value passed to the item when calling `add()`.\n\t- item.prev: previous item.\n\t- item.next: next item.\n\t*/\n\n\n\t(function() {\n\t var LinkedList;\n\n\t LinkedList = (function() {\n\t function LinkedList(valuesToAdd) {\n\t var value, _i, _len;\n\t if (valuesToAdd == null) {\n\t valuesToAdd = [];\n\t }\n\t /*\n\t Can pass an array of elements to link together during `new LinkedList()`\n\t initiation.\n\t */\n\n\t this.head = {\n\t prev: void 0,\n\t value: void 0,\n\t next: void 0\n\t };\n\t this.tail = {\n\t prev: void 0,\n\t value: void 0,\n\t next: void 0\n\t };\n\t this.size = 0;\n\t for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) {\n\t value = valuesToAdd[_i];\n\t this.add(value);\n\t }\n\t }\n\n\t LinkedList.prototype.at = function(position) {\n\t /*\n\t Get the item at `position` (optional). Accepts negative index:\n\t \n\t ```js\n\t myList.at(-1); // Returns the last element.\n\t ```\n\t However, passing a negative index that surpasses the boundary will return\n\t undefined:\n\t \n\t ```js\n\t myList = new LinkedList([2, 6, 8, 3])\n\t myList.at(-5); // Undefined.\n\t myList.at(-4); // 2.\n\t ```\n\t _Returns:_ item gotten, or undefined if not found.\n\t */\n\n\t var currentNode, i, _i, _j, _ref;\n\t if (!((-this.size <= position && position < this.size))) {\n\t return;\n\t }\n\t position = this._adjust(position);\n\t if (position * 2 < this.size) {\n\t currentNode = this.head;\n\t for (i = _i = 1; _i <= position; i = _i += 1) {\n\t currentNode = currentNode.next;\n\t }\n\t } else {\n\t currentNode = this.tail;\n\t for (i = _j = 1, _ref = this.size - position - 1; _j <= _ref; i = _j += 1) {\n\t currentNode = currentNode.prev;\n\t }\n\t }\n\t return currentNode;\n\t };\n\n\t LinkedList.prototype.add = function(value, position) {\n\t var currentNode, nodeToAdd, _ref, _ref1, _ref2;\n\t if (position == null) {\n\t position = this.size;\n\t }\n\t /*\n\t Add a new item at `position` (optional). Defaults to adding at the end.\n\t `position`, just like in `at()`, can be negative (within the negative\n\t boundary). Position specifies the place the value's going to be, and the old\n\t node will be pushed higher. `add(-2)` on list of size 7 is the same as\n\t `add(5)`.\n\t \n\t _Returns:_ item added.\n\t */\n\n\t if (!((-this.size <= position && position <= this.size))) {\n\t return;\n\t }\n\t nodeToAdd = {\n\t value: value\n\t };\n\t position = this._adjust(position);\n\t if (this.size === 0) {\n\t this.head = nodeToAdd;\n\t } else {\n\t if (position === 0) {\n\t _ref = [nodeToAdd, this.head, nodeToAdd], this.head.prev = _ref[0], nodeToAdd.next = _ref[1], this.head = _ref[2];\n\t } else {\n\t currentNode = this.at(position - 1);\n\t _ref1 = [currentNode.next, nodeToAdd, nodeToAdd, currentNode], nodeToAdd.next = _ref1[0], (_ref2 = currentNode.next) != null ? _ref2.prev = _ref1[1] : void 0, currentNode.next = _ref1[2], nodeToAdd.prev = _ref1[3];\n\t }\n\t }\n\t if (position === this.size) {\n\t this.tail = nodeToAdd;\n\t }\n\t this.size++;\n\t return value;\n\t };\n\n\t LinkedList.prototype.removeAt = function(position) {\n\t var currentNode, valueToReturn, _ref;\n\t if (position == null) {\n\t position = this.size - 1;\n\t }\n\t /*\n\t Remove an item at index `position` (optional). Defaults to the last item.\n\t Index can be negative (within the boundary).\n\t \n\t _Returns:_ item removed.\n\t */\n\n\t if (!((-this.size <= position && position < this.size))) {\n\t return;\n\t }\n\t if (this.size === 0) {\n\t return;\n\t }\n\t position = this._adjust(position);\n\t if (this.size === 1) {\n\t valueToReturn = this.head.value;\n\t this.head.value = this.tail.value = void 0;\n\t } else {\n\t if (position === 0) {\n\t valueToReturn = this.head.value;\n\t this.head = this.head.next;\n\t this.head.prev = void 0;\n\t } else {\n\t currentNode = this.at(position);\n\t valueToReturn = currentNode.value;\n\t currentNode.prev.next = currentNode.next;\n\t if ((_ref = currentNode.next) != null) {\n\t _ref.prev = currentNode.prev;\n\t }\n\t if (position === this.size - 1) {\n\t this.tail = currentNode.prev;\n\t }\n\t }\n\t }\n\t this.size--;\n\t return valueToReturn;\n\t };\n\n\t LinkedList.prototype.remove = function(value) {\n\t /*\n\t Remove the item using its value instead of position. **Will remove the fist\n\t occurrence of `value`.**\n\t \n\t _Returns:_ the value, or undefined if value's not found.\n\t */\n\n\t var currentNode;\n\t if (value == null) {\n\t return;\n\t }\n\t currentNode = this.head;\n\t while (currentNode && currentNode.value !== value) {\n\t currentNode = currentNode.next;\n\t }\n\t if (!currentNode) {\n\t return;\n\t }\n\t if (this.size === 1) {\n\t this.head.value = this.tail.value = void 0;\n\t } else if (currentNode === this.head) {\n\t this.head = this.head.next;\n\t this.head.prev = void 0;\n\t } else if (currentNode === this.tail) {\n\t this.tail = this.tail.prev;\n\t this.tail.next = void 0;\n\t } else {\n\t currentNode.prev.next = currentNode.next;\n\t currentNode.next.prev = currentNode.prev;\n\t }\n\t this.size--;\n\t return value;\n\t };\n\n\t LinkedList.prototype.indexOf = function(value, startingPosition) {\n\t var currentNode, position;\n\t if (startingPosition == null) {\n\t startingPosition = 0;\n\t }\n\t /*\n\t Find the index of an item, similarly to `array.indexOf()`. Defaults to start\n\t searching from the beginning, by can start at another position by passing\n\t `startingPosition`. This parameter can also be negative; but unlike the\n\t other methods of this class, `startingPosition` (optional) can be as small\n\t as desired; a value of -999 for a list of size 5 will start searching\n\t normally, at the beginning.\n\t \n\t **Note:** searches forwardly, **not** backwardly, i.e:\n\t \n\t ```js\n\t var myList = new LinkedList([2, 3, 1, 4, 3, 5])\n\t myList.indexOf(3, -3); // Returns 4, not 1\n\t ```\n\t _Returns:_ index of item found, or -1 if not found.\n\t */\n\n\t if (((this.head.value == null) && !this.head.next) || startingPosition >= this.size) {\n\t return -1;\n\t }\n\t startingPosition = Math.max(0, this._adjust(startingPosition));\n\t currentNode = this.at(startingPosition);\n\t position = startingPosition;\n\t while (currentNode) {\n\t if (currentNode.value === value) {\n\t break;\n\t }\n\t currentNode = currentNode.next;\n\t position++;\n\t }\n\t if (position === this.size) {\n\t return -1;\n\t } else {\n\t return position;\n\t }\n\t };\n\n\t LinkedList.prototype._adjust = function(position) {\n\t if (position < 0) {\n\t return this.size + position;\n\t } else {\n\t return position;\n\t }\n\t };\n\n\t return LinkedList;\n\n\t })();\n\n\t module.exports = LinkedList;\n\n\t}).call(this);\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t/*\n\tKind of a stopgap measure for the upcoming [JavaScript\n\tMap](http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets)\n\n\t**Note:** due to JavaScript's limitations, hashing something other than Boolean,\n\tNumber, String, Undefined, Null, RegExp, Function requires a hack that inserts a\n\thidden unique property into the object. This means `set`, `get`, `has` and\n\t`delete` must employ the same object, and not a mere identical copy as in the\n\tcase of, say, a string.\n\n\t## Overview example:\n\n\t```js\n\tvar map = new Map({'alice': 'wonderland', 20: 'ok'});\n\tmap.set('20', 5); // => 5\n\tmap.get('20'); // => 5\n\tmap.has('alice'); // => true\n\tmap.delete(20) // => true\n\tvar arr = [1, 2];\n\tmap.add(arr, 'goody'); // => 'goody'\n\tmap.has(arr); // => true\n\tmap.has([1, 2]); // => false. Needs to compare by reference\n\tmap.forEach(function(key, value) {\n\t console.log(key, value);\n\t});\n\t```\n\n\t## Properties:\n\n\t- size: The total number of `(key, value)` pairs.\n\t*/\n\n\n\t(function() {\n\t var Map, SPECIAL_TYPE_KEY_PREFIX, _extractDataType, _isSpecialType,\n\t __hasProp = {}.hasOwnProperty;\n\n\t SPECIAL_TYPE_KEY_PREFIX = '_mapId_';\n\n\t Map = (function() {\n\t Map._mapIdTracker = 0;\n\n\t Map._newMapId = function() {\n\t return this._mapIdTracker++;\n\t };\n\n\t function Map(objectToMap) {\n\t /*\n\t Pass an optional object whose (key, value) pair will be hashed. **Careful**\n\t not to pass something like {5: 'hi', '5': 'hello'}, since JavaScript's\n\t native object behavior will crush the first 5 property before it gets to\n\t constructor.\n\t */\n\n\t var key, value;\n\t this._content = {};\n\t this._itemId = 0;\n\t this._id = Map._newMapId();\n\t this.size = 0;\n\t for (key in objectToMap) {\n\t if (!__hasProp.call(objectToMap, key)) continue;\n\t value = objectToMap[key];\n\t this.set(key, value);\n\t }\n\t }\n\n\t Map.prototype.hash = function(key, makeHash) {\n\t var propertyForMap, type;\n\t if (makeHash == null) {\n\t makeHash = false;\n\t }\n\t /*\n\t The hash function for hashing keys is public. Feel free to replace it with\n\t your own. The `makeHash` parameter is optional and accepts a boolean\n\t (defaults to `false`) indicating whether or not to produce a new hash (for\n\t the first use, naturally).\n\t \n\t _Returns:_ the hash.\n\t */\n\n\t type = _extractDataType(key);\n\t if (_isSpecialType(key)) {\n\t propertyForMap = SPECIAL_TYPE_KEY_PREFIX + this._id;\n\t if (makeHash && !key[propertyForMap]) {\n\t key[propertyForMap] = this._itemId++;\n\t }\n\t return propertyForMap + '_' + key[propertyForMap];\n\t } else {\n\t return type + '_' + key;\n\t }\n\t };\n\n\t Map.prototype.set = function(key, value) {\n\t /*\n\t _Returns:_ value.\n\t */\n\n\t if (!this.has(key)) {\n\t this.size++;\n\t }\n\t this._content[this.hash(key, true)] = [value, key];\n\t return value;\n\t };\n\n\t Map.prototype.get = function(key) {\n\t /*\n\t _Returns:_ value corresponding to the key, or undefined if not found.\n\t */\n\n\t var _ref;\n\t return (_ref = this._content[this.hash(key)]) != null ? _ref[0] : void 0;\n\t };\n\n\t Map.prototype.has = function(key) {\n\t /*\n\t Check whether a value exists for the key.\n\t \n\t _Returns:_ true or false.\n\t */\n\n\t return this.hash(key) in this._content;\n\t };\n\n\t Map.prototype[\"delete\"] = function(key) {\n\t /*\n\t Remove the (key, value) pair.\n\t \n\t _Returns:_ **true or false**. Unlike most of this library, this method\n\t doesn't return the deleted value. This is so that it conforms to the future\n\t JavaScript `map.delete()`'s behavior.\n\t */\n\n\t var hashedKey;\n\t hashedKey = this.hash(key);\n\t if (hashedKey in this._content) {\n\t delete this._content[hashedKey];\n\t if (_isSpecialType(key)) {\n\t delete key[SPECIAL_TYPE_KEY_PREFIX + this._id];\n\t }\n\t this.size--;\n\t return true;\n\t }\n\t return false;\n\t };\n\n\t Map.prototype.forEach = function(operation) {\n\t /*\n\t Traverse through the map. Pass a function of the form `fn(key, value)`.\n\t \n\t _Returns:_ undefined.\n\t */\n\n\t var key, value, _ref;\n\t _ref = this._content;\n\t for (key in _ref) {\n\t if (!__hasProp.call(_ref, key)) continue;\n\t value = _ref[key];\n\t operation(value[1], value[0]);\n\t }\n\t };\n\n\t return Map;\n\n\t })();\n\n\t _isSpecialType = function(key) {\n\t var simpleHashableTypes, simpleType, type, _i, _len;\n\t simpleHashableTypes = ['Boolean', 'Number', 'String', 'Undefined', 'Null', 'RegExp', 'Function'];\n\t type = _extractDataType(key);\n\t for (_i = 0, _len = simpleHashableTypes.length; _i < _len; _i++) {\n\t simpleType = simpleHashableTypes[_i];\n\t if (type === simpleType) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t };\n\n\t _extractDataType = function(type) {\n\t return Object.prototype.toString.apply(type).match(/\\[object (.+)\\]/)[1];\n\t };\n\n\t module.exports = Map;\n\n\t}).call(this);\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t/*\n\tAmortized O(1) dequeue!\n\n\t## Overview example:\n\n\t```js\n\tvar queue = new Queue([1, 6, 4]);\n\tqueue.enqueue(10); // => 10\n\tqueue.dequeue(); // => 1\n\tqueue.dequeue(); // => 6\n\tqueue.dequeue(); // => 4\n\tqueue.peek(); // => 10\n\tqueue.dequeue(); // => 10\n\tqueue.peek(); // => undefined\n\t```\n\n\t## Properties:\n\n\t- size: The total number of items.\n\t*/\n\n\n\t(function() {\n\t var Queue;\n\n\t Queue = (function() {\n\t function Queue(initialArray) {\n\t if (initialArray == null) {\n\t initialArray = [];\n\t }\n\t /*\n\t Pass an optional array to be transformed into a queue. The item at index 0\n\t is the first to be dequeued.\n\t */\n\n\t this._content = initialArray;\n\t this._dequeueIndex = 0;\n\t this.size = this._content.length;\n\t }\n\n\t Queue.prototype.enqueue = function(item) {\n\t /*\n\t _Returns:_ the item.\n\t */\n\n\t this.size++;\n\t this._content.push(item);\n\t return item;\n\t };\n\n\t Queue.prototype.dequeue = function() {\n\t /*\n\t _Returns:_ the dequeued item.\n\t */\n\n\t var itemToDequeue;\n\t if (this.size === 0) {\n\t return;\n\t }\n\t this.size--;\n\t itemToDequeue = this._content[this._dequeueIndex];\n\t this._dequeueIndex++;\n\t if (this._dequeueIndex * 2 > this._content.length) {\n\t this._content = this._content.slice(this._dequeueIndex);\n\t this._dequeueIndex = 0;\n\t }\n\t return itemToDequeue;\n\t };\n\n\t Queue.prototype.peek = function() {\n\t /*\n\t Check the next item to be dequeued, without removing it.\n\t \n\t _Returns:_ the item.\n\t */\n\n\t return this._content[this._dequeueIndex];\n\t };\n\n\t return Queue;\n\n\t })();\n\n\t module.exports = Queue;\n\n\t}).call(this);\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t/*\n\tCredit to Wikipedia's article on [Red-black\n\ttree](http://en.wikipedia.org/wiki/Red–black_tree)\n\n\t**Note:** doesn't handle duplicate entries, undefined and null. This is by\n\tdesign.\n\n\t## Overview example:\n\n\t```js\n\tvar rbt = new RedBlackTree([7, 5, 1, 8]);\n\trbt.add(2); // => 2\n\trbt.add(10); // => 10\n\trbt.has(5); // => true\n\trbt.peekMin(); // => 1\n\trbt.peekMax(); // => 10\n\trbt.removeMin(); // => 1\n\trbt.removeMax(); // => 10\n\trbt.remove(8); // => 8\n\t```\n\n\t## Properties:\n\n\t- size: The total number of items.\n\t*/\n\n\n\t(function() {\n\t var BLACK, NODE_FOUND, NODE_TOO_BIG, NODE_TOO_SMALL, RED, RedBlackTree, STOP_SEARCHING, _findNode, _grandParentOf, _isLeft, _leftOrRight, _peekMaxNode, _peekMinNode, _siblingOf, _uncleOf;\n\n\t NODE_FOUND = 0;\n\n\t NODE_TOO_BIG = 1;\n\n\t NODE_TOO_SMALL = 2;\n\n\t STOP_SEARCHING = 3;\n\n\t RED = 1;\n\n\t BLACK = 2;\n\n\t RedBlackTree = (function() {\n\t function RedBlackTree(valuesToAdd) {\n\t var value, _i, _len;\n\t if (valuesToAdd == null) {\n\t valuesToAdd = [];\n\t }\n\t /*\n\t Pass an optional array to be turned into binary tree. **Note:** does not\n\t accept duplicate, undefined and null.\n\t */\n\n\t this._root;\n\t this.size = 0;\n\t for (_i = 0, _len = valuesToAdd.length; _i < _len; _i++) {\n\t value = valuesToAdd[_i];\n\t if (value != null) {\n\t this.add(value);\n\t }\n\t }\n\t }\n\n\t RedBlackTree.prototype.add = function(value) {\n\t /*\n\t Again, make sure to not pass a value already in the tree, or undefined, or\n\t null.\n\t \n\t _Returns:_ value added.\n\t */\n\n\t var currentNode, foundNode, nodeToInsert, _ref;\n\t if (value == null) {\n\t return;\n\t }\n\t this.size++;\n\t nodeToInsert = {\n\t value: value,\n\t _color: RED\n\t };\n\t if (!this._root) {\n\t this._root = nodeToInsert;\n\t } else {\n\t foundNode = _findNode(this._root, function(node) {\n\t if (value === node.value) {\n\t return NODE_FOUND;\n\t } else {\n\t if (value < node.value) {\n\t if (node._left) {\n\t return NODE_TOO_BIG;\n\t } else {\n\t nodeToInsert._parent = node;\n\t node._left = nodeToInsert;\n\t return STOP_SEARCHING;\n\t }\n\t } else {\n\t if (node._right) {\n\t return NODE_TOO_SMALL;\n\t } else {\n\t nodeToInsert._parent = node;\n\t node._right = nodeToInsert;\n\t return STOP_SEARCHING;\n\t }\n\t }\n\t }\n\t });\n\t if (foundNode != null) {\n\t return;\n\t }\n\t }\n\t currentNode = nodeToInsert;\n\t while (true) {\n\t if (currentNode === this._root) {\n\t currentNode._color = BLACK;\n\t break;\n\t }\n\t if (currentNode._parent._color === BLACK) {\n\t break;\n\t }\n\t if (((_ref = _uncleOf(currentNode)) != null ? _ref._color : void 0) === RED) {\n\t currentNode._parent._color = BLACK;\n\t _uncleOf(currentNode)._color = BLACK;\n\t _grandParentOf(currentNode)._color = RED;\n\t currentNode = _grandParentOf(currentNode);\n\t continue;\n\t }\n\t if (!_isLeft(currentNode) && _isLeft(currentNode._parent)) {\n\t this._rotateLeft(currentNode._parent);\n\t currentNode = currentNode._left;\n\t } else if (_isLeft(currentNode) && !_isLeft(currentNode._parent)) {\n\t this._rotateRight(currentNode._parent);\n\t currentNode = currentNode._right;\n\t }\n\t currentNode._parent._color = BLACK;\n\t _grandParentOf(currentNode)._color = RED;\n\t if (_isLeft(currentNode)) {\n\t this._rotateRight(_grandParentOf(currentNode));\n\t } else {\n\t this._rotateLeft(_grandParentOf(currentNode));\n\t }\n\t break;\n\t }\n\t return value;\n\t };\n\n\t RedBlackTree.prototype.has = function(value) {\n\t /*\n\t _Returns:_ true or false.\n\t */\n\n\t var foundNode;\n\t foundNode = _findNode(this._root, function(node) {\n\t if (value === node.value) {\n\t return NODE_FOUND;\n\t } else if (value < node.value) {\n\t return NODE_TOO_BIG;\n\t } else {\n\t return NODE_TOO_SMALL;\n\t }\n\t });\n\t if (foundNode) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t };\n\n\t RedBlackTree.prototype.peekMin = function() {\n\t /*\n\t Check the minimum value without removing it.\n\t \n\t _Returns:_ the minimum value.\n\t */\n\n\t var _ref;\n\t return (_ref = _peekMinNode(this._root)) != null ? _ref.value : void 0;\n\t };\n\n\t RedBlackTree.prototype.peekMax = function() {\n\t /*\n\t Check the maximum value without removing it.\n\t \n\t _Returns:_ the maximum value.\n\t */\n\n\t var _ref;\n\t return (_ref = _peekMaxNode(this._root)) != null ? _ref.value : void 0;\n\t };\n\n\t RedBlackTree.prototype.remove = function(value) {\n\t /*\n\t _Returns:_ the value removed, or undefined if the value's not found.\n\t */\n\n\t var foundNode;\n\t foundNode = _findNode(this._root, function(node) {\n\t if (value === node.value) {\n\t return NODE_FOUND;\n\t } else if (value < node.value) {\n\t return NODE_TOO_BIG;\n\t } else {\n\t return NODE_TOO_SMALL;\n\t }\n\t });\n\t if (!foundNode) {\n\t return;\n\t }\n\t this._removeNode(this._root, foundNode);\n\t this.size--;\n\t return value;\n\t };\n\n\t RedBlackTree.prototype.removeMin = function() {\n\t /*\n\t _Returns:_ smallest item removed, or undefined if tree's empty.\n\t */\n\n\t var nodeToRemove, valueToReturn;\n\t nodeToRemove = _peekMinNode(this._root);\n\t if (!nodeToRemove) {\n\t return;\n\t }\n\t valueToReturn = nodeToRemove.value;\n\t this._removeNode(this._root, nodeToRemove);\n\t return valueToReturn;\n\t };\n\n\t RedBlackTree.prototype.removeMax = function() {\n\t /*\n\t _Returns:_ biggest item removed, or undefined if tree's empty.\n\t */\n\n\t var nodeToRemove, valueToReturn;\n\t nodeToRemove = _peekMaxNode(this._root);\n\t if (!nodeToRemove) {\n\t return;\n\t }\n\t valueToReturn = nodeToRemove.value;\n\t this._removeNode(this._root, nodeToRemove);\n\t return valueToReturn;\n\t };\n\n\t RedBlackTree.prototype._removeNode = function(root, node) {\n\t var sibling, successor, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;\n\t if (node._left && node._right) {\n\t successor = _peekMinNode(node._right);\n\t node.value = successor.value;\n\t node = successor;\n\t }\n\t successor = node._left || node._right;\n\t if (!successor) {\n\t successor = {\n\t color: BLACK,\n\t _right: void 0,\n\t _left: void 0,\n\t isLeaf: true\n\t };\n\t }\n\t successor._parent = node._parent;\n\t if ((_ref = node._parent) != null) {\n\t _ref[_leftOrRight(node)] = successor;\n\t }\n\t if (node._color === BLACK) {\n\t if (successor._color === RED) {\n\t successor._color = BLACK;\n\t if (!successor._parent) {\n\t this._root = successor;\n\t }\n\t } else {\n\t while (true) {\n\t if (!successor._parent) {\n\t if (!successor.isLeaf) {\n\t this._root = successor;\n\t } else {\n\t this._root = void 0;\n\t }\n\t break;\n\t }\n\t sibling = _siblingOf(successor);\n\t if ((sibling != null ? sibling._color : void 0) === RED) {\n\t successor._parent._color = RED;\n\t sibling._color = BLACK;\n\t if (_isLeft(successor)) {\n\t this._rotateLeft(successor._parent);\n\t } else {\n\t this._rotateRight(successor._parent);\n\t }\n\t }\n\t sibling = _siblingOf(successor);\n\t if (successor._parent._color === BLACK && (!sibling || (sibling._color === BLACK && (!sibling._left || sibling._left._color === BLACK) && (!sibling._right || sibling._right._color === BLACK)))) {\n\t if (sibling != null) {\n\t sibling._color = RED;\n\t }\n\t if (successor.isLeaf) {\n\t successor._parent[_leftOrRight(successor)] = void 0;\n\t }\n\t successor = successor._parent;\n\t continue;\n\t }\n\t if (successor._parent._color === RED && (!sibling || (sibling._color === BLACK && (!sibling._left || ((_ref1 = sibling._left) != null ? _ref1._color : void 0) === BLACK) && (!sibling._right || ((_ref2 = sibling._right) != null ? _ref2._color : void 0) === BLACK)))) {\n\t if (sibling != null) {\n\t sibling._color = RED;\n\t }\n\t successor._parent._color = BLACK;\n\t break;\n\t }\n\t if ((sibling != null ? sibling._color : void 0) === BLACK) {\n\t if (_isLeft(successor) && (!sibling._right || sibling._right._color === BLACK) && ((_ref3 = sibling._left) != null ? _ref3._color : void 0) === RED) {\n\t sibling._color = RED;\n\t if ((_ref4 = sibling._left) != null) {\n\t _ref4._color = BLACK;\n\t }\n\t this._rotateRight(sibling);\n\t } else if (!_isLeft(successor) && (!sibling._left || sibling._left._color === BLACK) && ((_ref5 = sibling._right) != null ? _ref5._color : void 0) === RED) {\n\t sibling._color = RED;\n\t if ((_ref6 = sibling._right) != null) {\n\t _ref6._color = BLACK;\n\t }\n\t this._rotateLeft(sibling);\n\t }\n\t break;\n\t }\n\t sibling = _siblingOf(successor);\n\t sibling._color = successor._parent._color;\n\t if (_isLeft(successor)) {\n\t sibling._right._color = BLACK;\n\t this._rotateRight(successor._parent);\n\t } else {\n\t sibling._left._color = BLACK;\n\t this._rotateLeft(successor._parent);\n\t }\n\t }\n\t }\n\t }\n\t if (successor.isLeaf) {\n\t return (_ref7 = successor._parent) != null ? _ref7[_leftOrRight(successor)] = void 0 : void 0;\n\t }\n\t };\n\n\t RedBlackTree.prototype._rotateLeft = function(node) {\n\t var _ref, _ref1;\n\t if ((_ref = node._parent) != null) {\n\t _ref[_leftOrRight(node)] = node._right;\n\t }\n\t node._right._parent = node._parent;\n\t node._parent = node._right;\n\t node._right = node._right._left;\n\t node._parent._left = node;\n\t if ((_ref1 = node._right) != null) {\n\t _ref1._parent = node;\n\t }\n\t if (node._parent._parent == null) {\n\t return this._root = node._parent;\n\t }\n\t };\n\n\t RedBlackTree.prototype._rotateRight = function(node) {\n\t var _ref, _ref1;\n\t if ((_ref = node._parent) != null) {\n\t _ref[_leftOrRight(node)] = node._left;\n\t }\n\t node._left._parent = node._parent;\n\t node._parent = node._left;\n\t node._left = node._left._right;\n\t node._parent._right = node;\n\t if ((_ref1 = node._left) != null) {\n\t _ref1._parent = node;\n\t }\n\t if (node._parent._parent == null) {\n\t return this._root = node._parent;\n\t }\n\t };\n\n\t return RedBlackTree;\n\n\t })();\n\n\t _isLeft = function(node) {\n\t return node === node._parent._left;\n\t };\n\n\t _leftOrRight = function(node) {\n\t if (_isLeft(node)) {\n\t return '_left';\n\t } else {\n\t return '_right';\n\t }\n\t };\n\n\t _findNode = function(startingNode, comparator) {\n\t var comparisonResult, currentNode, foundNode;\n\t currentNode = startingNode;\n\t foundNode = void 0;\n\t while (currentNode) {\n\t comparisonResult = comparator(currentNode);\n\t if (comparisonResult === NODE_FOUND) {\n\t foundNode = currentNode;\n\t break;\n\t }\n\t if (comparisonResult === NODE_TOO_BIG) {\n\t currentNode = currentNode._left;\n\t } else if (comparisonResult === NODE_TOO_SMALL) {\n\t currentNode = currentNode._right;\n\t } else if (comparisonResult === STOP_SEARCHING) {\n\t break;\n\t }\n\t }\n\t return foundNode;\n\t };\n\n\t _peekMinNode = function(startingNode) {\n\t return _findNode(startingNode, function(node) {\n\t if (node._left) {\n\t return NODE_TOO_BIG;\n\t } else {\n\t return NODE_FOUND;\n\t }\n\t });\n\t };\n\n\t _peekMaxNode = function(startingNode) {\n\t return _findNode(startingNode, function(node) {\n\t if (node._right) {\n\t return NODE_TOO_SMALL;\n\t } else {\n\t return NODE_FOUND;\n\t }\n\t });\n\t };\n\n\t _grandParentOf = function(node) {\n\t var _ref;\n\t return (_ref = node._parent) != null ? _ref._parent : void 0;\n\t };\n\n\t _uncleOf = function(node) {\n\t if (!_grandParentOf(node)) {\n\t return;\n\t }\n\t if (_isLeft(node._parent)) {\n\t return _grandParentOf(node)._right;\n\t } else {\n\t return _grandParentOf(node)._left;\n\t }\n\t };\n\n\t _siblingOf = function(node) {\n\t if (_isLeft(node)) {\n\t return node._parent._right;\n\t } else {\n\t return node._parent._left;\n\t }\n\t };\n\n\t module.exports = RedBlackTree;\n\n\t}).call(this);\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/*\n\tGood for fast insertion/removal/lookup of strings.\n\n\t## Overview example:\n\n\t```js\n\tvar trie = new Trie(['bear', 'beer']);\n\ttrie.add('hello'); // => 'hello'\n\ttrie.add('helloha!'); // => 'helloha!'\n\ttrie.has('bears'); // => false\n\ttrie.longestPrefixOf('beatrice'); // => 'bea'\n\ttrie.wordsWithPrefix('hel'); // => ['hello', 'helloha!']\n\ttrie.remove('beers'); // => undefined. 'beer' still exists\n\ttrie.remove('Beer') // => undefined. Case-sensitive\n\ttrie.remove('beer') // => 'beer'. Removed\n\t```\n\n\t## Properties:\n\n\t- size: The total number of words.\n\t*/\n\n\n\t(function() {\n\t var Queue, Trie, WORD_END, _hasAtLeastNChildren,\n\t __hasProp = {}.hasOwnProperty;\n\n\t Queue = __webpack_require__(6);\n\n\t WORD_END = 'end';\n\n\t Trie = (function() {\n\t function Trie(words) {\n\t var word, _i, _len;\n\t if (words == null) {\n\t words = [];\n\t }\n\t /*\n\t Pass an optional array of strings to be inserted initially.\n\t */\n\n\t this._root = {};\n\t this.size = 0;\n\t for (_i = 0, _len = words.length; _i < _len; _i++) {\n\t word = words[_i];\n\t this.add(word);\n\t }\n\t }\n\n\t Trie.prototype.add = function(word) {\n\t /*\n\t Add a whole string to the trie.\n\t \n\t _Returns:_ the word added. Will return undefined (without adding the value)\n\t if the word passed is null or undefined.\n\t */\n\n\t var currentNode, letter, _i, _len;\n\t if (word == null) {\n\t return;\n\t }\n\t this.size++;\n\t currentNode = this._root;\n\t for (_i = 0, _len = word.length; _i < _len; _i++) {\n\t letter = word[_i];\n\t if (currentNode[letter] == null) {\n\t currentNode[letter] = {};\n\t }\n\t currentNode = currentNode[letter];\n\t }\n\t currentNode[WORD_END] = true;\n\t return word;\n\t };\n\n\t Trie.prototype.has = function(word) {\n\t /*\n\t __Returns:_ true or false.\n\t */\n\n\t var currentNode, letter, _i, _len;\n\t if (word == null) {\n\t return false;\n\t }\n\t currentNode = this._root;\n\t for (_i = 0, _len = word.length; _i < _len; _i++) {\n\t letter = word[_i];\n\t if (currentNode[letter] == null) {\n\t return false;\n\t }\n\t currentNode = currentNode[letter];\n\t }\n\t if (currentNode[WORD_END]) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t };\n\n\t Trie.prototype.longestPrefixOf = function(word) {\n\t /*\n\t Find all words containing the prefix. The word itself counts as a prefix.\n\t \n\t ```js\n\t var trie = new Trie;\n\t trie.add('hello');\n\t trie.longestPrefixOf('he'); // 'he'\n\t trie.longestPrefixOf('hello'); // 'hello'\n\t trie.longestPrefixOf('helloha!'); // 'hello'\n\t ```\n\t \n\t _Returns:_ the prefix string, or empty string if no prefix found.\n\t */\n\n\t var currentNode, letter, prefix, _i, _len;\n\t if (word == null) {\n\t return '';\n\t }\n\t currentNode = this._root;\n\t prefix = '';\n\t for (_i = 0, _len = word.length; _i < _len; _i++) {\n\t letter = word[_i];\n\t if (currentNode[letter] == null) {\n\t break;\n\t }\n\t prefix += letter;\n\t currentNode = currentNode[letter];\n\t }\n\t return prefix;\n\t };\n\n\t Trie.prototype.wordsWithPrefix = function(prefix) {\n\t /*\n\t Find all words containing the prefix. The word itself counts as a prefix.\n\t **Watch out for edge cases.**\n\t \n\t ```js\n\t var trie = new Trie;\n\t trie.wordsWithPrefix(''); // []. Check later case below.\n\t trie.add('');\n\t trie.wordsWithPrefix(''); // ['']\n\t trie.add('he');\n\t trie.add('hello');\n\t trie.add('hell');\n\t trie.add('bear');\n\t trie.add('z');\n\t trie.add('zebra');\n\t trie.wordsWithPrefix('hel'); // ['hell', 'hello']\n\t ```\n\t \n\t _Returns:_ an array of strings, or empty array if no word found.\n\t */\n\n\t var accumulatedLetters, currentNode, letter, node, queue, subNode, words, _i, _len, _ref;\n\t if (prefix == null) {\n\t return [];\n\t }\n\t (prefix != null) || (prefix = '');\n\t words = [];\n\t currentNode = this._root;\n\t for (_i = 0, _len = prefix.length; _i < _len; _i++) {\n\t letter = prefix[_i];\n\t currentNode = currentNode[letter];\n\t if (currentNode == null) {\n\t return [];\n\t }\n\t }\n\t queue = new Queue();\n\t queue.enqueue([currentNode, '']);\n\t while (queue.size !== 0) {\n\t _ref = queue.dequeue(), node = _ref[0], accumulatedLetters = _ref[1];\n\t if (node[WORD_END]) {\n\t words.push(prefix + accumulatedLetters);\n\t }\n\t for (letter in node) {\n\t if (!__hasProp.call(node, letter)) continue;\n\t subNode = node[letter];\n\t queue.enqueue([subNode, accumulatedLetters + letter]);\n\t }\n\t }\n\t return words;\n\t };\n\n\t Trie.prototype.remove = function(word) {\n\t /*\n\t _Returns:_ the string removed, or undefined if the word in its whole doesn't\n\t exist. **Note:** this means removing `beers` when only `beer` exists will\n\t return undefined and conserve `beer`.\n\t */\n\n\t var currentNode, i, letter, prefix, _i, _j, _len, _ref;\n\t if (word == null) {\n\t return;\n\t }\n\t currentNode = this._root;\n\t prefix = [];\n\t for (_i = 0, _len = word.length; _i < _len; _i++) {\n\t letter = word[_i];\n\t if (currentNode[letter] == null) {\n\t return;\n\t }\n\t currentNode = currentNode[letter];\n\t prefix.push([letter, currentNode]);\n\t }\n\t if (!currentNode[WORD_END]) {\n\t return;\n\t }\n\t this.size--;\n\t delete currentNode[WORD_END];\n\t if (_hasAtLeastNChildren(currentNode, 1)) {\n\t return word;\n\t }\n\t for (i = _j = _ref = prefix.length - 1; _ref <= 1 ? _j <= 1 : _j >= 1; i = _ref <= 1 ? ++_j : --_j) {\n\t if (!_hasAtLeastNChildren(prefix[i][1], 1)) {\n\t delete prefix[i - 1][1][prefix[i][0]];\n\t } else {\n\t break;\n\t }\n\t }\n\t if (!_hasAtLeastNChildren(this._root[prefix[0][0]], 1)) {\n\t delete this._root[prefix[0][0]];\n\t }\n\t return word;\n\t };\n\n\t return Trie;\n\n\t })();\n\n\t _hasAtLeastNChildren = function(node, n) {\n\t var child, childCount;\n\t if (n === 0) {\n\t return true;\n\t }\n\t childCount = 0;\n\t for (child in node) {\n\t if (!__hasProp.call(node, child)) continue;\n\t childCount++;\n\t if (childCount >= n) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t };\n\n\t module.exports = Trie;\n\n\t}).call(this);\n\n\n/***/ }\n/******/ ]);","angular.module('uiGmapgoogle-maps.wrapped')\n.service('uiGmapMarkerSpiderfier', [ 'uiGmapGoogleMapApi', function(GoogleMapApi) {\n var self = this;\n /* istanbul ignore next */\n +function(){\n \n/** @preserve OverlappingMarkerSpiderfier\nhttps://github.com/jawj/OverlappingMarkerSpiderfier\nCopyright (c) 2011 - 2013 George MacKerron\nReleased under the MIT licence: http://opensource.org/licenses/mit-license\nNote: The Google Maps API v3 must be included *before* this code\n */\nvar hasProp = {}.hasOwnProperty,\n slice = [].slice;\n\nthis['OverlappingMarkerSpiderfier'] = (function() {\n var ge, gm, j, lcH, lcU, len, mt, p, ref, twoPi, x;\n\n p = _Class.prototype;\n\n ref = [_Class, p];\n for (j = 0, len = ref.length; j < len; j++) {\n x = ref[j];\n x['VERSION'] = '0.3.3';\n }\n\n gm = void 0;\n\n ge = void 0;\n\n mt = void 0;\n\n twoPi = Math.PI * 2;\n\n p['keepSpiderfied'] = false;\n\n p['markersWontHide'] = false;\n\n p['markersWontMove'] = false;\n\n p['nearbyDistance'] = 20;\n\n p['circleSpiralSwitchover'] = 9;\n\n p['circleFootSeparation'] = 23;\n\n p['circleStartAngle'] = twoPi / 12;\n\n p['spiralFootSeparation'] = 26;\n\n p['spiralLengthStart'] = 11;\n\n p['spiralLengthFactor'] = 4;\n\n p['spiderfiedZIndex'] = 1000;\n\n p['usualLegZIndex'] = 10;\n\n p['highlightedLegZIndex'] = 20;\n\n p['event'] = 'click';\n\n p['minZoomLevel'] = false;\n\n p['legWeight'] = 1.5;\n\n p['legColors'] = {\n 'usual': {},\n 'highlighted': {}\n };\n\n lcU = p['legColors']['usual'];\n\n lcH = p['legColors']['highlighted'];\n\n _Class['initializeGoogleMaps'] = function(google) {\n gm = google.maps;\n ge = gm.event;\n mt = gm.MapTypeId;\n lcU[mt.HYBRID] = lcU[mt.SATELLITE] = '#fff';\n lcH[mt.HYBRID] = lcH[mt.SATELLITE] = '#f00';\n lcU[mt.TERRAIN] = lcU[mt.ROADMAP] = '#444';\n lcH[mt.TERRAIN] = lcH[mt.ROADMAP] = '#f00';\n this.ProjHelper = function(map) {\n return this.setMap(map);\n };\n this.ProjHelper.prototype = new gm.OverlayView();\n return this.ProjHelper.prototype['draw'] = function() {};\n };\n\n function _Class(map1, opts) {\n var e, k, l, len1, ref1, v;\n this.map = map1;\n if (opts == null) {\n opts = {};\n }\n for (k in opts) {\n if (!hasProp.call(opts, k)) continue;\n v = opts[k];\n this[k] = v;\n }\n this.projHelper = new this.constructor.ProjHelper(this.map);\n this.initMarkerArrays();\n this.listeners = {};\n ref1 = ['click', 'zoom_changed', 'maptypeid_changed'];\n for (l = 0, len1 = ref1.length; l < len1; l++) {\n e = ref1[l];\n ge.addListener(this.map, e, (function(_this) {\n return function() {\n return _this['unspiderfy']();\n };\n })(this));\n }\n }\n\n p.initMarkerArrays = function() {\n this.markers = [];\n return this.markerListenerRefs = [];\n };\n\n p['addMarker'] = function(marker) {\n var listenerRefs;\n if (marker['_oms'] != null) {\n return this;\n }\n marker['_oms'] = true;\n listenerRefs = [\n ge.addListener(marker, this['event'], (function(_this) {\n return function(event) {\n return _this.spiderListener(marker, event);\n };\n })(this))\n ];\n if (!this['markersWontHide']) {\n listenerRefs.push(ge.addListener(marker, 'visible_changed', (function(_this) {\n return function() {\n return _this.markerChangeListener(marker, false);\n };\n })(this)));\n }\n if (!this['markersWontMove']) {\n listenerRefs.push(ge.addListener(marker, 'position_changed', (function(_this) {\n return function() {\n return _this.markerChangeListener(marker, true);\n };\n })(this)));\n }\n this.markerListenerRefs.push(listenerRefs);\n this.markers.push(marker);\n return this;\n };\n\n p.markerChangeListener = function(marker, positionChanged) {\n if ((marker['_omsData'] != null) && (positionChanged || !marker.getVisible()) && !((this.spiderfying != null) || (this.unspiderfying != null))) {\n return this['unspiderfy'](positionChanged ? marker : null);\n }\n };\n\n p['getMarkers'] = function() {\n return this.markers.slice(0);\n };\n\n p['removeMarker'] = function(marker) {\n var i, l, len1, listenerRef, listenerRefs;\n if (marker['_omsData'] != null) {\n this['unspiderfy']();\n }\n i = this.arrIndexOf(this.markers, marker);\n if (i < 0) {\n return this;\n }\n listenerRefs = this.markerListenerRefs.splice(i, 1)[0];\n for (l = 0, len1 = listenerRefs.length; l < len1; l++) {\n listenerRef = listenerRefs[l];\n ge.removeListener(listenerRef);\n }\n delete marker['_oms'];\n this.markers.splice(i, 1);\n return this;\n };\n\n p['clearMarkers'] = function() {\n var i, l, len1, len2, listenerRef, listenerRefs, marker, n, ref1;\n this['unspiderfy']();\n ref1 = this.markers;\n for (i = l = 0, len1 = ref1.length; l < len1; i = ++l) {\n marker = ref1[i];\n listenerRefs = this.markerListenerRefs[i];\n for (n = 0, len2 = listenerRefs.length; n < len2; n++) {\n listenerRef = listenerRefs[n];\n ge.removeListener(listenerRef);\n }\n delete marker['_oms'];\n }\n this.initMarkerArrays();\n return this;\n };\n\n p['addListener'] = function(event, func) {\n var base;\n ((base = this.listeners)[event] != null ? base[event] : base[event] = []).push(func);\n return this;\n };\n\n p['removeListener'] = function(event, func) {\n var i;\n i = this.arrIndexOf(this.listeners[event], func);\n if (!(i < 0)) {\n this.listeners[event].splice(i, 1);\n }\n return this;\n };\n\n p['clearListeners'] = function(event) {\n this.listeners[event] = [];\n return this;\n };\n\n p.trigger = function() {\n var args, event, func, l, len1, ref1, ref2, results;\n event = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n ref2 = (ref1 = this.listeners[event]) != null ? ref1 : [];\n results = [];\n for (l = 0, len1 = ref2.length; l < len1; l++) {\n func = ref2[l];\n results.push(func.apply(null, args));\n }\n return results;\n };\n\n p.generatePtsCircle = function(count, centerPt) {\n var angle, angleStep, circumference, i, l, legLength, ref1, results;\n circumference = this['circleFootSeparation'] * (2 + count);\n legLength = circumference / twoPi;\n angleStep = twoPi / count;\n results = [];\n for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) {\n angle = this['circleStartAngle'] + i * angleStep;\n results.push(new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle)));\n }\n return results;\n };\n\n p.generatePtsSpiral = function(count, centerPt) {\n var angle, i, l, legLength, pt, ref1, results;\n legLength = this['spiralLengthStart'];\n angle = 0;\n results = [];\n for (i = l = 0, ref1 = count; 0 <= ref1 ? l < ref1 : l > ref1; i = 0 <= ref1 ? ++l : --l) {\n angle += this['spiralFootSeparation'] / legLength + i * 0.0005;\n pt = new gm.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle));\n legLength += twoPi * this['spiralLengthFactor'] / angle;\n results.push(pt);\n }\n return results;\n };\n\n p.spiderListener = function(marker, event) {\n var $this, clear, l, len1, m, mPt, markerPt, markerSpiderfied, nDist, nearbyMarkerData, nonNearbyMarkers, pxSq, ref1;\n markerSpiderfied = marker['_omsData'] != null;\n if (!(markerSpiderfied && this['keepSpiderfied'])) {\n if (this['event'] === 'mouseover') {\n $this = this;\n clear = function() {\n return $this['unspiderfy']();\n };\n window.clearTimeout(p.timeout);\n p.timeout = setTimeout(clear, 3000);\n } else {\n this['unspiderfy']();\n }\n }\n if (markerSpiderfied || this.map.getStreetView().getVisible() || this.map.getMapTypeId() === 'GoogleEarthAPI') {\n return this.trigger('click', marker, event);\n } else {\n nearbyMarkerData = [];\n nonNearbyMarkers = [];\n nDist = this['nearbyDistance'];\n pxSq = nDist * nDist;\n markerPt = this.llToPt(marker.position);\n ref1 = this.markers;\n for (l = 0, len1 = ref1.length; l < len1; l++) {\n m = ref1[l];\n if (!((m.map != null) && m.getVisible())) {\n continue;\n }\n mPt = this.llToPt(m.position);\n if (this.ptDistanceSq(mPt, markerPt) < pxSq) {\n nearbyMarkerData.push({\n marker: m,\n markerPt: mPt\n });\n } else {\n nonNearbyMarkers.push(m);\n }\n }\n if (nearbyMarkerData.length === 1) {\n return this.trigger('click', marker, event);\n } else {\n return this.spiderfy(nearbyMarkerData, nonNearbyMarkers);\n }\n }\n };\n\n p['markersNearMarker'] = function(marker, firstOnly) {\n var l, len1, m, mPt, markerPt, markers, nDist, pxSq, ref1, ref2, ref3;\n if (firstOnly == null) {\n firstOnly = false;\n }\n if (this.projHelper.getProjection() == null) {\n throw \"Must wait for 'idle' event on map before calling markersNearMarker\";\n }\n nDist = this['nearbyDistance'];\n pxSq = nDist * nDist;\n markerPt = this.llToPt(marker.position);\n markers = [];\n ref1 = this.markers;\n for (l = 0, len1 = ref1.length; l < len1; l++) {\n m = ref1[l];\n if (m === marker || (m.map == null) || !m.getVisible()) {\n continue;\n }\n mPt = this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position);\n if (this.ptDistanceSq(mPt, markerPt) < pxSq) {\n markers.push(m);\n if (firstOnly) {\n break;\n }\n }\n }\n return markers;\n };\n\n p['markersNearAnyOtherMarker'] = function() {\n var i, i1, i2, l, len1, len2, len3, m, m1, m1Data, m2, m2Data, mData, n, nDist, pxSq, q, ref1, ref2, ref3, results;\n if (this.projHelper.getProjection() == null) {\n throw \"Must wait for 'idle' event on map before calling markersNearAnyOtherMarker\";\n }\n nDist = this['nearbyDistance'];\n pxSq = nDist * nDist;\n mData = (function() {\n var l, len1, ref1, ref2, ref3, results;\n ref1 = this.markers;\n results = [];\n for (l = 0, len1 = ref1.length; l < len1; l++) {\n m = ref1[l];\n results.push({\n pt: this.llToPt((ref2 = (ref3 = m['_omsData']) != null ? ref3.usualPosition : void 0) != null ? ref2 : m.position),\n willSpiderfy: false\n });\n }\n return results;\n }).call(this);\n ref1 = this.markers;\n for (i1 = l = 0, len1 = ref1.length; l < len1; i1 = ++l) {\n m1 = ref1[i1];\n if (!((m1.map != null) && m1.getVisible())) {\n continue;\n }\n m1Data = mData[i1];\n if (m1Data.willSpiderfy) {\n continue;\n }\n ref2 = this.markers;\n for (i2 = n = 0, len2 = ref2.length; n < len2; i2 = ++n) {\n m2 = ref2[i2];\n if (i2 === i1) {\n continue;\n }\n if (!((m2.map != null) && m2.getVisible())) {\n continue;\n }\n m2Data = mData[i2];\n if (i2 < i1 && !m2Data.willSpiderfy) {\n continue;\n }\n if (this.ptDistanceSq(m1Data.pt, m2Data.pt) < pxSq) {\n m1Data.willSpiderfy = m2Data.willSpiderfy = true;\n break;\n }\n }\n }\n ref3 = this.markers;\n results = [];\n for (i = q = 0, len3 = ref3.length; q < len3; i = ++q) {\n m = ref3[i];\n if (mData[i].willSpiderfy) {\n results.push(m);\n }\n }\n return results;\n };\n\n p.makeHighlightListenerFuncs = function(marker) {\n return {\n highlight: (function(_this) {\n return function() {\n return marker['_omsData'].leg.setOptions({\n strokeColor: _this['legColors']['highlighted'][_this.map.mapTypeId],\n zIndex: _this['highlightedLegZIndex']\n });\n };\n })(this),\n unhighlight: (function(_this) {\n return function() {\n return marker['_omsData'].leg.setOptions({\n strokeColor: _this['legColors']['usual'][_this.map.mapTypeId],\n zIndex: _this['usualLegZIndex']\n });\n };\n })(this)\n };\n };\n\n p.spiderfy = function(markerData, nonNearbyMarkers) {\n var bodyPt, footLl, footPt, footPts, highlightListenerFuncs, leg, marker, md, nearestMarkerDatum, numFeet, spiderfiedMarkers;\n if (this['minZoomLevel'] && this.map.getZoom() < this['minZoomLevel']) {\n return false;\n }\n this.spiderfying = true;\n numFeet = markerData.length;\n bodyPt = this.ptAverage((function() {\n var l, len1, results;\n results = [];\n for (l = 0, len1 = markerData.length; l < len1; l++) {\n md = markerData[l];\n results.push(md.markerPt);\n }\n return results;\n })());\n footPts = numFeet >= this['circleSpiralSwitchover'] ? this.generatePtsSpiral(numFeet, bodyPt).reverse() : this.generatePtsCircle(numFeet, bodyPt);\n spiderfiedMarkers = (function() {\n var l, len1, results;\n results = [];\n for (l = 0, len1 = footPts.length; l < len1; l++) {\n footPt = footPts[l];\n footLl = this.ptToLl(footPt);\n nearestMarkerDatum = this.minExtract(markerData, (function(_this) {\n return function(md) {\n return _this.ptDistanceSq(md.markerPt, footPt);\n };\n })(this));\n marker = nearestMarkerDatum.marker;\n leg = new gm.Polyline({\n map: this.map,\n path: [marker.position, footLl],\n strokeColor: this['legColors']['usual'][this.map.mapTypeId],\n strokeWeight: this['legWeight'],\n zIndex: this['usualLegZIndex']\n });\n marker['_omsData'] = {\n usualPosition: marker.position,\n leg: leg\n };\n if (this['legColors']['highlighted'][this.map.mapTypeId] !== this['legColors']['usual'][this.map.mapTypeId]) {\n highlightListenerFuncs = this.makeHighlightListenerFuncs(marker);\n marker['_omsData'].hightlightListeners = {\n highlight: ge.addListener(marker, 'mouseover', highlightListenerFuncs.highlight),\n unhighlight: ge.addListener(marker, 'mouseout', highlightListenerFuncs.unhighlight)\n };\n }\n marker.setPosition(footLl);\n marker.setZIndex(Math.round(this['spiderfiedZIndex'] + footPt.y));\n results.push(marker);\n }\n return results;\n }).call(this);\n delete this.spiderfying;\n this.spiderfied = true;\n return this.trigger('spiderfy', spiderfiedMarkers, nonNearbyMarkers);\n };\n\n p['unspiderfy'] = function(markerNotToMove) {\n var l, len1, listeners, marker, nonNearbyMarkers, ref1, unspiderfiedMarkers;\n if (markerNotToMove == null) {\n markerNotToMove = null;\n }\n if (this.spiderfied == null) {\n return this;\n }\n this.unspiderfying = true;\n unspiderfiedMarkers = [];\n nonNearbyMarkers = [];\n ref1 = this.markers;\n for (l = 0, len1 = ref1.length; l < len1; l++) {\n marker = ref1[l];\n if (marker['_omsData'] != null) {\n marker['_omsData'].leg.setMap(null);\n if (marker !== markerNotToMove) {\n marker.setPosition(marker['_omsData'].usualPosition);\n }\n marker.setZIndex(null);\n listeners = marker['_omsData'].hightlightListeners;\n if (listeners != null) {\n ge.removeListener(listeners.highlight);\n ge.removeListener(listeners.unhighlight);\n }\n delete marker['_omsData'];\n unspiderfiedMarkers.push(marker);\n } else {\n nonNearbyMarkers.push(marker);\n }\n }\n delete this.unspiderfying;\n delete this.spiderfied;\n this.trigger('unspiderfy', unspiderfiedMarkers, nonNearbyMarkers);\n return this;\n };\n\n p.ptDistanceSq = function(pt1, pt2) {\n var dx, dy;\n dx = pt1.x - pt2.x;\n dy = pt1.y - pt2.y;\n return dx * dx + dy * dy;\n };\n\n p.ptAverage = function(pts) {\n var l, len1, numPts, pt, sumX, sumY;\n sumX = sumY = 0;\n for (l = 0, len1 = pts.length; l < len1; l++) {\n pt = pts[l];\n sumX += pt.x;\n sumY += pt.y;\n }\n numPts = pts.length;\n return new gm.Point(sumX / numPts, sumY / numPts);\n };\n\n p.llToPt = function(ll) {\n return this.projHelper.getProjection().fromLatLngToDivPixel(ll);\n };\n\n p.ptToLl = function(pt) {\n return this.projHelper.getProjection().fromDivPixelToLatLng(pt);\n };\n\n p.minExtract = function(set, func) {\n var bestIndex, bestVal, index, item, l, len1, val;\n for (index = l = 0, len1 = set.length; l < len1; index = ++l) {\n item = set[index];\n val = func(item);\n if ((typeof bestIndex === \"undefined\" || bestIndex === null) || val < bestVal) {\n bestVal = val;\n bestIndex = index;\n }\n }\n return set.splice(bestIndex, 1)[0];\n };\n\n p.arrIndexOf = function(arr, obj) {\n var i, l, len1, o;\n if (arr.indexOf != null) {\n return arr.indexOf(obj);\n }\n for (i = l = 0, len1 = arr.length; l < len1; i = ++l) {\n o = arr[i];\n if (o === obj) {\n return i;\n }\n }\n return -1;\n };\n\n return _Class;\n\n})();\n\n }.apply(self);\n\n GoogleMapApi.then(function(){\n self.OverlappingMarkerSpiderfier.initializeGoogleMaps(window.google);\n });\n return this.OverlappingMarkerSpiderfier;\n}]);\n","/**\n * Performance overrides on MarkerClusterer custom to Angular Google Maps\n *\n * Created by Petr Bruna ccg1415 and Nick McCready on 7/13/14.\n */\nangular.module('uiGmapgoogle-maps.extensions')\n.service('uiGmapExtendMarkerClusterer',['uiGmapLodash', 'uiGmapPropMap', function (uiGmapLodash, PropMap) {\n return {\n init: _.once(function () {\n (function () {\n var __hasProp = {}.hasOwnProperty,\n __extends = function (child, parent) {\n for (var key in parent) {\n if (__hasProp.call(parent, key)) child[key] = parent[key];\n }\n function ctor() {\n this.constructor = child;\n }\n\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n child.__super__ = parent.prototype;\n return child;\n };\n\n window.NgMapCluster = (function (_super) {\n __extends(NgMapCluster, _super);\n\n function NgMapCluster(opts) {\n NgMapCluster.__super__.constructor.call(this, opts);\n this.markers_ = new PropMap();\n }\n\n /**\n * Adds a marker to the cluster.\n *\n * @param {google.maps.Marker} marker The marker to be added.\n * @return {boolean} True if the marker was added.\n * @ignore\n */\n NgMapCluster.prototype.addMarker = function (marker) {\n var i;\n var mCount;\n var mz;\n\n if (this.isMarkerAlreadyAdded_(marker)) {\n var oldMarker = this.markers_.get(marker.key);\n if (oldMarker.getPosition().lat() == marker.getPosition().lat() && oldMarker.getPosition().lon() == marker.getPosition().lon()) //if nothing has changed\n return false;\n }\n\n if (!this.center_) {\n this.center_ = marker.getPosition();\n this.calculateBounds_();\n } else {\n if (this.averageCenter_) {\n var l = this.markers_.length + 1;\n var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\n var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\n this.center_ = new google.maps.LatLng(lat, lng);\n this.calculateBounds_();\n }\n }\n marker.isAdded = true;\n this.markers_.push(marker);\n\n mCount = this.markers_.length;\n mz = this.markerClusterer_.getMaxZoom();\n if (mz !== null && this.map_.getZoom() > mz) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map_) {\n marker.setMap(this.map_);\n }\n } else if (mCount < this.minClusterSize_) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map_) {\n marker.setMap(this.map_);\n }\n } else if (mCount === this.minClusterSize_) {\n // Hide the markers that were showing.\n this.markers_.each(function (m) {\n m.setMap(null);\n });\n } else {\n marker.setMap(null);\n }\n\n //this.updateIcon_();\n return true;\n };\n\n /**\n * Determines if a marker has already been added to the cluster.\n *\n * @param {google.maps.Marker} marker The marker to check.\n * @return {boolean} True if the marker has already been added.\n */\n NgMapCluster.prototype.isMarkerAlreadyAdded_ = function (marker) {\n return uiGmapLodash.isNullOrUndefined(this.markers_.get(marker.key));\n };\n\n\n /**\n * Returns the bounds of the cluster.\n *\n * @return {google.maps.LatLngBounds} the cluster bounds.\n * @ignore\n */\n NgMapCluster.prototype.getBounds = function () {\n var i;\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n this.getMarkers().each(function(m){\n bounds.extend(m.getPosition());\n });\n return bounds;\n };\n\n\n /**\n * Removes the cluster from the map.\n *\n * @ignore\n */\n NgMapCluster.prototype.remove = function () {\n this.clusterIcon_.setMap(null);\n this.markers_ = new PropMap();\n delete this.markers_;\n };\n\n\n return NgMapCluster;\n\n })(Cluster);\n\n\n window.NgMapMarkerClusterer = (function (_super) {\n __extends(NgMapMarkerClusterer, _super);\n\n function NgMapMarkerClusterer(map, opt_markers, opt_options) {\n NgMapMarkerClusterer.__super__.constructor.call(this, map, opt_markers, opt_options);\n this.markers_ = new PropMap();\n }\n\n /**\n * Removes all clusters and markers from the map and also removes all markers\n * managed by the clusterer.\n */\n NgMapMarkerClusterer.prototype.clearMarkers = function () {\n this.resetViewport_(true);\n this.markers_ = new PropMap();\n };\n /**\n * Removes a marker and returns true if removed, false if not.\n *\n * @param {google.maps.Marker} marker The marker to remove\n * @return {boolean} Whether the marker was removed or not\n */\n NgMapMarkerClusterer.prototype.removeMarker_ = function (marker) {\n if (!this.markers_.get(marker.key)) {\n return false;\n }\n marker.setMap(null);\n this.markers_.remove(marker.key); // Remove the marker from the list of managed markers\n return true;\n };\n\n /**\n * Creates the clusters. This is done in batches to avoid timeout errors\n * in some browsers when there is a huge number of markers.\n *\n * @param {number} iFirst The index of the first marker in the batch of\n * markers to be added to clusters.\n */\n NgMapMarkerClusterer.prototype.createClusters_ = function (iFirst) {\n var i, marker;\n var mapBounds;\n var cMarkerClusterer = this;\n if (!this.ready_) {\n return;\n }\n\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the MarkerClusterer begins\n * clustering markers.\n * @name MarkerClusterer#clusteringbegin\n * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n\n if (typeof this.timerRefStatic !== 'undefined') {\n clearTimeout(this.timerRefStatic);\n delete this.timerRefStatic;\n }\n }\n\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n if (this.getMap().getZoom() > 3) {\n mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),\n this.getMap().getBounds().getNorthEast());\n } else {\n mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n }\n var bounds = this.getExtendedBounds(mapBounds);\n\n var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);\n\n var _ms = this.markers_.values();\n for (i = iFirst; i < iLast; i++) {\n marker = _ms[i];\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\n if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) {\n this.addToClosestCluster_(marker);\n }\n }\n }\n\n if (iLast < this.markers_.length) {\n this.timerRefStatic = setTimeout(function () {\n cMarkerClusterer.createClusters_(iLast);\n }, 0);\n } else {\n // custom addition by ui-gmap\n // update icon for all clusters\n for (i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].updateIcon_();\n }\n\n delete this.timerRefStatic;\n\n /**\n * This event is fired when the MarkerClusterer stops\n * clustering markers.\n * @name MarkerClusterer#clusteringend\n * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this);\n }\n };\n\n /**\n * Adds a marker to a cluster, or creates a new cluster.\n *\n * @param {google.maps.Marker} marker The marker to add.\n */\n NgMapMarkerClusterer.prototype.addToClosestCluster_ = function (marker) {\n var i, d, cluster, center;\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n for (i = 0; i < this.clusters_.length; i++) {\n cluster = this.clusters_[i];\n center = cluster.getCenter();\n if (center) {\n d = this.distanceBetweenPoints_(center, marker.getPosition());\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n } else {\n cluster = new NgMapCluster(this);\n cluster.addMarker(marker);\n this.clusters_.push(cluster);\n }\n };\n\n /**\n * Redraws all the clusters.\n */\n NgMapMarkerClusterer.prototype.redraw_ = function () {\n this.createClusters_(0);\n };\n\n\n /**\n * Removes all clusters from the map. The markers are also removed from the map\n * if opt_hide is set to true.\n *\n * @param {boolean} [opt_hide] Set to true to also remove the markers\n * from the map.\n */\n NgMapMarkerClusterer.prototype.resetViewport_ = function (opt_hide) {\n var i, marker;\n // Remove all the clusters\n for (i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].remove();\n }\n this.clusters_ = [];\n\n // Reset the markers to not be added and to be removed from the map.\n this.markers_.each(function (marker) {\n marker.isAdded = false;\n if (opt_hide) {\n marker.setMap(null);\n }\n });\n };\n\n /**\n * Extends an object's prototype by another's.\n *\n * @param {Object} obj1 The object to be extended.\n * @param {Object} obj2 The object to extend with.\n * @return {Object} The new extended object.\n * @ignore\n */\n NgMapMarkerClusterer.prototype.extend = function (obj1, obj2) {\n return (function (object) {\n var property;\n for (property in object.prototype) {\n if (property !== 'constructor')\n this.prototype[property] = object.prototype[property];\n }\n return this;\n }).apply(obj1, [obj2]);\n };\n ////////////////////////////////////////////////////////////////////////////////\n /*\n Other overrides relevant to MarkerClusterPlus\n */\n ////////////////////////////////////////////////////////////////////////////////\n /**\n * Positions and shows the icon.\n */\n ClusterIcon.prototype.show = function () {\n if (this.div_) {\n var img = \"\";\n // NOTE: values must be specified in px units\n var bp = this.backgroundPosition_.split(\" \");\n var spriteH = parseInt(bp[0].trim(), 10);\n var spriteV = parseInt(bp[1].trim(), 10);\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.cssText = this.createCss(pos);\n img = \"\";\n this.div_.innerHTML = img + \"

\" + this.sums_.text + \"
\";\n if (typeof this.sums_.title === \"undefined\" || this.sums_.title === \"\") {\n this.div_.title = this.cluster_.getMarkerClusterer().getTitle();\n } else {\n this.div_.title = this.sums_.title;\n }\n this.div_.style.display = \"\";\n }\n this.visible_ = true;\n };\n //END OTHER OVERRIDES\n ////////////////////////////////////////////////////////////////////////////////\n\n return NgMapMarkerClusterer;\n\n })(MarkerClusterer);\n }).call(this);\n })\n };\n}]);\n"]} \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.min.js b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.min.js new file mode 100644 index 0000000..efc1b88 --- /dev/null +++ b/client/www/lib/angular-google-maps/dist/angular-google-maps_dev_mapped.min.js @@ -0,0 +1,13 @@ +/*! angular-google-maps 2.3.3 2016-05-13 + * AngularJS directives for Google Maps + * git: https://github.com/angular-ui/angular-google-maps.git + */ + +!function(a,b,c){"use strict";(function(){b.module("uiGmapgoogle-maps.providers",["nemLogging"]),b.module("uiGmapgoogle-maps.wrapped",[]),b.module("uiGmapgoogle-maps.extensions",["uiGmapgoogle-maps.wrapped","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api.utils",["uiGmapgoogle-maps.extensions"]),b.module("uiGmapgoogle-maps.directives.api.managers",[]),b.module("uiGmapgoogle-maps.directives.api.options",["uiGmapgoogle-maps.directives.api.utils"]),b.module("uiGmapgoogle-maps.directives.api.options.builders",[]),b.module("uiGmapgoogle-maps.directives.api.models.child",["uiGmapgoogle-maps.directives.api.utils","uiGmapgoogle-maps.directives.api.options","uiGmapgoogle-maps.directives.api.options.builders"]),b.module("uiGmapgoogle-maps.directives.api.models.parent",["uiGmapgoogle-maps.directives.api.managers","uiGmapgoogle-maps.directives.api.models.child","uiGmapgoogle-maps.providers"]),b.module("uiGmapgoogle-maps.directives.api",["uiGmapgoogle-maps.directives.api.models.parent"]),b.module("uiGmapgoogle-maps",["uiGmapgoogle-maps.directives.api","uiGmapgoogle-maps.providers"])}).call(this),function(){b.module("uiGmapgoogle-maps.providers").factory("uiGmapMapScriptLoader",["$q","uiGmapuuid",function(c,d){var e,f,g,h,i;return h=void 0,i=void 0,e=function(a){return a.china?"http://maps.google.cn/maps/api/js?":"auto"===a.transport?"//maps.googleapis.com/maps/api/js?":a.transport+"://maps.googleapis.com/maps/api/js?"},f=function(a){var b,c,f,g;return b=["transport","isGoogleMapsForWork","china","preventLoad"],a.isGoogleMapsForWork&&b.push("key"),c=_.map(_.omit(a,b),function(a,b){return b+"="+a}),h&&(g=document.getElementById(h),g.parentNode.removeChild(g)),c=c.join("&"),f=document.createElement("script"),f.id=h="ui_gmap_map_load_"+d.generate(),f.type="text/javascript",f.src=e(a)+c,document.body.appendChild(f)},g=function(){return b.isDefined(a.google)&&b.isDefined(a.google.maps)},{load:function(b){var d,e;return d=c.defer(),g()?(d.resolve(a.google.maps),d.promise):(e=b.callback="onGoogleMapsReady"+Math.round(1e3*Math.random()),a[e]=function(){a[e]=null,d.resolve(a.google.maps)},a.navigator.connection&&a.Connection&&a.navigator.connection.type===a.Connection.NONE&&!b.preventLoad?document.addEventListener("online",function(){return g()?void 0:f(b)}):b.preventLoad||f(b),i=b,i.randomizedFunctionName=e,d.promise)},manualLoad:function(){var b;return b=i,g()?a[b.randomizedFunctionName]?a[b.randomizedFunctionName]():void 0:f(b)}}}]).provider("uiGmapGoogleMapApi",function(){return this.options={transport:"https",isGoogleMapsForWork:!1,china:!1,v:"3",libraries:"",language:"en",preventLoad:!1},this.configure=function(a){b.extend(this.options,a)},this.$get=["uiGmapMapScriptLoader",function(a){return function(b){return b.load(a.options)}}(this)],this}).service("uiGmapGoogleMapApiManualLoader",["uiGmapMapScriptLoader",function(a){return{load:function(){a.manualLoad()}}}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendGWin",function(){return{init:_.once(function(){var b;if(google||("undefined"!=typeof google&&null!==google?google.maps:void 0)||null!=google.maps.InfoWindow)return google.maps.InfoWindow.prototype._open=google.maps.InfoWindow.prototype.open,google.maps.InfoWindow.prototype._close=google.maps.InfoWindow.prototype.close,google.maps.InfoWindow.prototype._isOpen=!1,google.maps.InfoWindow.prototype.open=function(a,b,c){null==c&&(this._isOpen=!0,this._open(a,b,!0))},google.maps.InfoWindow.prototype.close=function(a){null==a&&(this._isOpen=!1,this._close(!0))},google.maps.InfoWindow.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},a.InfoBox&&(a.InfoBox.prototype._open=a.InfoBox.prototype.open,a.InfoBox.prototype._close=a.InfoBox.prototype.close,a.InfoBox.prototype._isOpen=!1,a.InfoBox.prototype.open=function(a,b){this._isOpen=!0,this._open(a,b)},a.InfoBox.prototype.close=function(){this._isOpen=!1,this._close()},a.InfoBox.prototype.isOpen=function(a){return null==a&&(a=void 0),null==a?this._isOpen:this._isOpen=a},b=function(b){function e(b){this.getOrigCloseBoxImg_=c(this.getOrigCloseBoxImg_,this),this.getCloseBoxDiv_=c(this.getCloseBoxDiv_,this);var d;d=new a.InfoBox(b),_.extend(this,d),null!=b.closeBoxDiv&&(this.closeBoxDiv_=b.closeBoxDiv)}return d(e,b),e.prototype.getCloseBoxDiv_=function(){return this.closeBoxDiv_},e.prototype.getCloseBoxImg_=function(){var a,b;return a=this.getCloseBoxDiv_(),b=this.getOrigCloseBoxImg_(),a||b},e.prototype.getOrigCloseBoxImg_=function(){var a;return a="",""!==this.closeBoxURL_&&(a="d;)a=a[b[d++]];return d&&d===e?a:void 0}},d=function(b,c,d){var e;return e=null===b?void 0:a(b,h(c),c+""),void 0===e?d:e},_.get=d),this.intersectionObjects=function(a,b,c){var d;return null==c&&(c=void 0),d=_.map(a,function(a){return _.find(b,function(b){return null!=c?c(a,b):_.isEqual(a,b)})}),_.filter(d,function(a){return null!=a})},this.containsObject=_.includeObject=function(a,b,c){return null==c&&(c=void 0),null===a?!1:_.some(a,function(a){return null!=c?c(a,b):_.isEqual(a,b)})},this.differenceObjects=function(a,b,c){return null==c&&(c=void 0),_.filter(a,function(a){return function(d){return!a.containsObject(b,d,c)}}(this))},this.withoutObjects=this.differenceObjects,this.indexOfObject=function(a,b,c,d){var e,f;if(null==a)return-1;if(e=0,f=a.length,d){if("number"!=typeof d)return e=_.sortedIndex(a,b),a[e]===b?e:-1;e=0>d?Math.max(0,f+d):d}for(;f>e;){if(null!=c){if(c(a[e],b))return e}else if(_.isEqual(a[e],b))return e;e++}return-1},this.isNullOrUndefined=function(a){return _.isNull(a||_.isUndefined(a))},this})}.call(this),function(){b.module("uiGmapgoogle-maps.extensions").factory("uiGmapString",function(){return function(a){return this.contains=function(b,c){return-1!==a.indexOf(b,c)},this}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmap_sync",[function(){return{fakePromise:function(){var a;return a=void 0,{then:function(b){return a=b},resolve:function(){return a.apply(void 0,arguments)}}}}}]).service("uiGmap_async",["$timeout","uiGmapPromise","uiGmapLogger","$q","uiGmapDataStructures","uiGmapGmapUtil",function(a,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A;return z=c.promiseTypes,s=c.isInProgress,y=c.promiseStatus,h=c.ExposedPromise,j=c.SniffedPromise,t=function(a,b){var c;return c=a.promise(),c.promiseType=a.promiseType,c.$$state&&d.debug("promiseType: "+c.promiseType+", state: "+y(c.$$state.status)),c.cancelCb=b,c},o=function(a,b){return a.promiseType===z.create&&b.promiseType!==z["delete"]&&b.promiseType!==z.init?(d.debug("lastPromise.promiseType "+b.promiseType+", newPromiseType: "+a.promiseType+", SKIPPED MUST COME AFTER DELETE ONLY"),!0):!1},x=function(a,b,c){var e;return b.promiseType===z["delete"]&&c.promiseType!==z["delete"]&&null!=c.cancelCb&&_.isFunction(c.cancelCb)&&s(c)&&(d.debug("promiseType: "+b.promiseType+", CANCELING LAST PROMISE type: "+c.promiseType),c.cancelCb("cancel safe"),e=a.peek(),null!=e&&s(e))?e.hasOwnProperty("cancelCb")&&_.isFunction(e.cancelCb)?(d.debug("promiseType: "+e.promiseType+", CANCELING FIRST PROMISE type: "+e.promiseType),e.cancelCb("cancel safe")):d.warn("first promise was not cancelable"):void 0},i=function(a,b,c){var d,e;if(a.existingPieces){if(d=_.last(a.existingPieces._content),o(b,d))return;return x(a.existingPieces,b,d),e=h(d["finally"](function(){return t(b,c)})),e.cancelCb=c,e.promiseType=b.promiseType,a.existingPieces.enqueue(e),d["finally"](function(){return a.existingPieces.dequeue()})}return a.existingPieces=new f.Queue,a.existingPieces.enqueue(t(b,c))},v=function(a,b,c,e,f){var g;return null==c&&(c=""),g=function(a){return d.debug(a+": "+a),null!=e&&_.isFunction(e)?e(a):void 0},i(a,j(f,b),g)},m=80,q={value:null},A=function(a,b,c){var d,e;try{return a.apply(b,c)}catch(e){return d=e,q.value=d,q}},u=function(a,b,c,e){var f,g;return g=A(a,b,e),g===q&&(f="error within chunking iterator: "+q.value,d.error(f),c.reject(f)),"cancel safe"!==g},k=function(a,b,c){var d,e;return d=a===b,e=b[c],d?e:a[e]},l=["length","forEach","map"],r=function(a,c,d,e){var f,g,h;if(b.isArray(a))f=a;else if(c)f=c;else{f=[];for(g in a)h=a[g],a.hasOwnProperty(g)&&!_.includes(l,g)&&f.push(g)}return null==e&&(e=d),b.isArray(f)&&!(null!=f?f.length:void 0)&&e!==d?d():e(f,c)},n=function(c,d,e,f,g,h,i,j){return r(c,j,function(j,l){var m,o,p,q;for(m=d&&db;b++)if(b in this&&this[b]===a)return b;return-1};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapBaseObject",function(){var b,c;return c=["extended","included"],b=function(){function b(){}return b.extend=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this[d]=f);return null!=(e=b.extended)&&e.apply(this),this},b.include=function(b){var d,e,f;for(d in b)f=b[d],a.call(c,d)<0&&(this.prototype[d]=f);return null!=(e=b.included)&&e.apply(this),this},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChildEvents",function(){return{onChildCreation:function(a){}}})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapCtrlHandle",["$q",function(a){var b;return b={handle:function(c,d){return c.$on("$destroy",function(){return b.handle(c)}),c.deferred=a.defer(),{getScope:function(){return c}}},mapPromise:function(a,b){var c;return c=b.getScope(),c.deferred.promise.then(function(b){return a.map=b}),c.deferred.promise}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapEventsHelper",["uiGmapLogger",function(a){var c,d;return d=function(a){return b.isDefined(a.events)&&null!=a.events&&b.isObject(a.events)},c=function(a,b){return d(a)?a:d(b)?b:void 0},{setEvents:function(a,d,e,f){var g;return g=c(d,e),null!=g?_.compact(_.map(g.events,function(c,h){var i;return f&&(i=_(f).includes(h)),g.events.hasOwnProperty(h)&&b.isFunction(g.events[h])&&!i?google.maps.event.addListener(a,h,function(){return d.$evalAsync||(d.$evalAsync=function(){}),d.$evalAsync(c.apply(d,[a,h,e,arguments]))}):void 0})):void 0},removeEvents:function(a){var b,c;if(a)for(b in a)c=a[b],c&&a.hasOwnProperty(b)&&google.maps.event.removeListener(c)}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapFitHelper",["uiGmapLogger","$timeout",function(a,b){return{fit:function(a,c){var d,e,f,g,h;if(c&&(null!=a?a.length:void 0)){d=new google.maps.LatLngBounds,e=!1;for(f in a)g=a[f],g&&(e||(e=!0),h=_.isFunction(g.getPosition)?g.getPosition():g),d.extend(h);if(e)return b(function(){return c.fitBounds(d)})}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapGmapUtil",["uiGmapLogger","$compile",function(a,c){var d,e,f,g,h,i;return e=function(a,b,c){return a===b||-1!==c.indexOf(a)},d=function(a){return e(a,!1,["false","FALSE",0,"n","N","no","NO"])},g=function(a){return Array.isArray(a)&&2===a.length?a[1]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[1]:a.latitude},h=function(a){return Array.isArray(a)&&2===a.length?a[0]:b.isDefined(a.type)&&"Point"===a.type?a.coordinates[0]:a.longitude},f=function(a){return a?a instanceof google.maps.LatLng?a:Array.isArray(a)&&2===a.length?new google.maps.LatLng(a[1],a[0]):b.isDefined(a.type)&&"Point"===a.type?new google.maps.LatLng(a.coordinates[1],a.coordinates[0]):new google.maps.LatLng(a.latitude,a.longitude):void 0},i=function(a){if(b.isUndefined(a))return!1;if(_.isArray(a)){if(2===a.length)return!0}else if(null!=a&&(null!=a?a.type:void 0)&&"Point"===a.type&&_.isArray(a.coordinates)&&2===a.coordinates.length)return!0;return!(!a||!b.isDefined((null!=a?a.latitude:void 0)&&b.isDefined(null!=a?a.longitude:void 0)))},{setCoordsFromEvent:function(a,c){return a?(Array.isArray(a)&&2===a.length?(a[1]=c.lat(),a[0]=c.lng()):b.isDefined(a.type)&&"Point"===a.type?(a.coordinates[1]=c.lat(),a.coordinates[0]=c.lng()):(a.latitude=c.lat(),a.longitude=c.lng()),a):void 0},getLabelPositionPoint:function(a){var b,c;if(void 0!==a)return a=/^([-\d\.]+)\s([-\d\.]+)$/.exec(a),b=parseFloat(a[1]),c=parseFloat(a[2]),null!=b&&null!=c?new google.maps.Point(b,c):void 0},createWindowOptions:function(d,e,g,h){var i;return null!=g&&null!=h&&null!=c?(i=b.extend({},h,{content:this.buildContent(e,h,g),position:null!=h.position?h.position:b.isObject(d)?d.getPosition():f(e.coords)}),null!=d&&null==(null!=i?i.pixelOffset:void 0)&&(null==i.boxClass||(i.pixelOffset={height:0,width:-2})),i):h?h:(a.error("infoWindow defaults not defined"),g?void 0:a.error("infoWindow content not defined"))},buildContent:function(a,b,d){var e,f;return null!=b.content?f=b.content:null!=c?(d=d.replace(/^\s+|\s+$/g,""),e=""===d?"":c(d)(a),e.length>0&&(f=e[0])):f=d,f},defaultDelay:50,isTrue:function(a){return e(a,!0,["true","TRUE",1,"y","Y","yes","YES"])},isFalse:d,isFalsy:function(a){return e(a,!1,[void 0,null])||d(a)},getCoords:f,validateCoords:i,equalCoords:function(a,b){return g(a)===g(b)&&h(a)===h(b)},validatePath:function(a){var c,d,e,f;if(d=0,b.isUndefined(a.type)){if(!Array.isArray(a)||a.length<2)return!1;for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},f),e=a.coordinates[f.index],c=e[0],c.length<4)return!1}else{if("LineString"!==a.type)return!1;if(a.coordinates.length<2)return!1;c=a.coordinates}for(;dthis.max?(this.max=a[0].length,this.index=b):void 0},g),c=a.coordinates[g.index][0]):"LineString"===a.type&&(c=a.coordinates);d=g?void a.reject("Your maps are not found we have checked the maximum amount of times. :)"):void(d!==f?c(a,f,g-1):a.resolve(e()))},100)},{spawn:function(){var b;return b=a.defer(),f.push(b.promise),d+=1,{instance:d,deferred:b}},promises:e,instances:function(){return d},promise:function(b,d){var e;return null==b&&(b=1),null==d&&(d=50),e=a.defer(),c(e,b,d),e.promise},reset:function(){d=0,f.length=0},decrement:function(){d>0&&(d-=1),f.length&&(f.length-=1)}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapLinked",["uiGmapBaseObject",function(b){var c;return c=function(b){function c(a,b,c,d){this.scope=a,this.element=b,this.attrs=c,this.ctrls=d}return a(c,b),c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapLogger",["nemSimpleLogger",function(a){return a.spawn()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelKey",["uiGmapBaseObject","uiGmapGmapUtil",function(d,e){return function(d){function f(b,c){this.scope=b,this["interface"]=null!=c?c:{scopeKeys:[]},this.modelsLength=a(this.modelsLength,this),this.updateChild=a(this.updateChild,this),this.destroy=a(this.destroy,this),this.setChildScope=a(this.setChildScope,this),this.getChanges=a(this.getChanges,this),this.getProp=a(this.getProp,this),this.setIdKey=a(this.setIdKey,this),this.modelKeyComparison=a(this.modelKeyComparison,this),f.__super__.constructor.call(this),this.defaultIdKey="id",this.idKey=void 0}return c(f,d),f.prototype.evalModelHandle=function(a,b){return null!=a&&null!=b?"self"===b?a:(_.isFunction(b)&&(b=b()),e.getPath(a,b)):void 0},f.prototype.modelKeyComparison=function(a,b){var c,d,f,g,h,i;if(f=this["interface"].scopeKeys.indexOf("coords")>=0,(f&&null!=this.scope.coords||!f)&&(h=this.scope),null==h)throw"No scope set!";return f&&(c=this.scopeOrModelVal("coords",h,a),d=this.scopeOrModelVal("coords",h,b),g=e.equalCoords(c,d),!g)?g:(i=_.without(this["interface"].scopeKeys,"coords"),g=_.every(i,function(c){return function(d){return c.scopeOrModelVal(h[d],h,a)===c.scopeOrModelVal(h[d],h,b)}}(this)))},f.prototype.setIdKey=function(a){return this.idKey=null!=a.idKey?a.idKey:this.defaultIdKey},f.prototype.setVal=function(a,b,c){return this.modelOrKey(a,b=c),a},f.prototype.modelOrKey=function(a,b){return null!=b?"self"!==b?e.getPath(a,b):a:void 0},f.prototype.getProp=function(a,b,c){return this.scopeOrModelVal(a,b,c)},f.prototype.getChanges=function(a,b,c){var d,e,f;c&&(b=_.pick(b,c),a=_.pick(a,c)),e={},f={},d={};for(f in a)b&&b[f]===a[f]||(_.isArray(a[f])?e[f]=a[f]:_.isObject(a[f])?(d=this.getChanges(a[f],b?b[f]:null),_.isEmpty(d)||(e[f]=d)):e[f]=a[f]);return e},f.prototype.scopeOrModelVal=function(a,b,c,d){var e,f,g,h;return null==d&&(d=!1),e=function(a,b,c){return null==c&&(c=!1),c?{isScope:a,value:b}:b},h=_.get(b,a),_.isFunction(h)?e(!0,h(c),d):_.isObject(h)?e(!0,h,d):_.isString(h)?(f=h,g=f?"self"===f?c:_.get(c,f):_.get(c,a),_.isFunction(g)?e(!1,g(),d):e(!1,g,d)):e(!0,h,d)},f.prototype.setChildScope=function(a,b,c){var d,e,f,g;for(e in a)f=a[e],d=this.scopeOrModelVal(f,b,c,!0),null!=(null!=d?d.value:void 0)&&(g=d.value,g!==b[f]&&(b[f]=g));return b.model=c},f.prototype.onDestroy=function(a){},f.prototype.destroy=function(a){var b;return null==a&&(a=!1),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?this.clean():this.scope.$destroy()},f.prototype.updateChild=function(a,b){return null==b[this.idKey]?void this.$log.error("Model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):a.updateModel(b)},f.prototype.modelsLength=function(a){var c,d;return null==a&&(a=void 0),c=0,d=a?a:this.scope.models,null==d?c:c=b.isArray(d)||null!=d.length?d.length:Object.keys(d).length},f}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapModelsWatcher",["uiGmapLogger","uiGmap_async","$q","uiGmapPromise",function(a,b,c,d){return{didQueueInitPromise:function(a,c){return 0===c.models.length?(b.promiseLock(a,d.promiseTypes.init,null,null,function(){return d.resolve()}),!0):!1},figureOutState:function(b,c,d,e,f){var g,h,i,j,k;return g=[],i={},j=[],k=[],c.models.forEach(function(f){var h;return null==f[b]?a.error(" id missing for model #{m.toString()},\ncan not use do comparison/insertion"):(i[f[b]]={},null==d.get(f[b])?g.push(f):(h=d.get(f[b]),e(f,h.clonedModel,c)?void 0:k.push({model:f,child:h})))}),h=d.values(),h.forEach(function(c){var d;return null==c?void a.error("child undefined in ModelsWatcher."):null==c.model?void a.error("child.model undefined in ModelsWatcher."):(d=c.model[b],null==i[d]?j.push(c):void 0)}),{adds:g,removals:j,updates:k}}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").service("uiGmapPromise",["$q","$timeout","uiGmapLogger",function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;return l={create:"create",update:"update","delete":"delete",init:"init"},k={IN_PROGRESS:0,RESOLVED:1,REJECTED:2},n=function(){var a;return a={},a[""+k.IN_PROGRESS]="in-progress",a[""+k.RESOLVED]="resolved",a[""+k.REJECTED]="rejected",a}(),g=function(a){return a.$$state?a.$$state.status===k.IN_PROGRESS:a.hasOwnProperty("$$v")?void 0:!0},h=function(a){return a.$$state?a.$$state.status===k.RESOLVED:a.hasOwnProperty("$$v")?!0:void 0},j=function(a){return n[a]||"done w error"},d=function(b){var c,d,e;return c=a.defer(),d=a.all([b,c.promise]),e=a.defer(),b.then(c.resolve,function(){},function(a){return c.notify(a),e.notify(a)}),d.then(function(a){return e.resolve(a[0]||a[1])},function(a){return e.reject(a)}),e.promise.cancel=function(a){return null==a&&(a="canceled"),c.reject(a)},e.promise.notify=function(a){return null==a&&(a="cancel safe"),e.notify(a),b.hasOwnProperty("notify")?b.notify(a):void 0},null!=b.promiseType&&(e.promise.promiseType=b.promiseType),e.promise},e=function(a,b){return{promise:a,promiseType:b}},f=function(){return a.defer()},m=function(){var b;return b=a.defer(),b.resolve.apply(void 0,arguments),b.promise},i=function(d){var e;return _.isFunction(d)?(e=a.defer(),b(function(){var a;return a=d(),e.resolve(a)}),e.promise):void c.error("uiGmapPromise.promise() only accepts functions")},{defer:f,promise:i,resolve:m,promiseTypes:l,isInProgress:g,isResolved:h,promiseStatus:j,ExposedPromise:d,SniffedPromise:e}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropMap",function(){var b;return b=function(){function b(){this.removeAll=a(this.removeAll,this),this.slice=a(this.slice,this),this.push=a(this.push,this),this.keys=a(this.keys,this),this.values=a(this.values,this),this.remove=a(this.remove,this),this.put=a(this.put,this),this.stateChanged=a(this.stateChanged,this),this.get=a(this.get,this),this.length=0,this.dict={},this.didValsStateChange=!1,this.didKeysStateChange=!1,this.allVals=[],this.allKeys=[]}return b.prototype.get=function(a){return this.dict[a]},b.prototype.stateChanged=function(){return this.didValsStateChange=!0,this.didKeysStateChange=!0},b.prototype.put=function(a,b){return null==this.get(a)&&this.length++,this.stateChanged(),this.dict[a]=b},b.prototype.remove=function(a,b){var c;return null==b&&(b=!1),!b||this.get(a)?(c=this.dict[a],delete this.dict[a],this.length--,this.stateChanged(),c):void 0},b.prototype.valuesOrKeys=function(a){var b,c;return null==a&&(a="Keys"),this["did"+a+"StateChange"]?(c=[],b=[],_.each(this.dict,function(a,d){return c.push(a),b.push(d)}),this.didKeysStateChange=!1,this.didValsStateChange=!1,this.allVals=c,this.allKeys=b,this["all"+a]):this["all"+a]},b.prototype.values=function(){return this.valuesOrKeys("Vals")},b.prototype.keys=function(){return this.valuesOrKeys()},b.prototype.push=function(a,b){return null==b&&(b="key"),this.put(a[b],a)},b.prototype.slice=function(){return this.keys().map(function(a){return function(b){return a.remove(b)}}(this))},b.prototype.removeAll=function(){return this.slice()},b.prototype.each=function(a){return _.each(this.dict,function(b,c){return a(b)})},b.prototype.map=function(a){return _.map(this.dict,function(b,c){return a(b)})},b}()})}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapPropertyAction",["uiGmapLogger",function(a){var b;return b=function(a){return this.setIfChange=function(b){return function(c,d){return _.isEqual(d,c)?void 0:a(b,c)}},this.sic=this.setIfChange,this}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapClustererMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapEventsHelper",function(c,d,e,f){var g;return g=function(){function g(b,d,f,h){null==d&&(d={}),this.opt_options=null!=f?f:{},this.opt_events=h,this.checkSync=a(this.checkSync,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.clusterer=new NgMapMarkerClusterer(b,d,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.clusterer.setIgnoreHidden(!0),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="ClustererMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},g.prototype.add=function(a){return this.checkKey(a),this.clusterer.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(this.clusterer.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){return this.clusterer.repaint()},g.prototype.clear=function(){return this.removeMany(this.getGMarkers()),this.clusterer.repaint()},g.prototype.attachEvents=function(a,d){var e,f,g;if(this.listeners=[],b.isDefined(a)&&null!=a&&b.isObject(a)){g=[];for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])?(c.info(d+": Attaching event: "+f+" to clusterer"),g.push(this.listeners.push(google.maps.event.addListener(this.clusterer,f,a[f])))):g.push(void 0);return g}},g.prototype.clearEvents=function(){return f.removeEvents(this.listeners),this.listeners=[]},g.prototype.destroy=function(){return this.clearEvents(),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.clusterer.getMap())},g.prototype.getGMarkers=function(){return this.clusterer.getMarkers().values()},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.managers").service("uiGmapGoogleMapObjectManager",[function(){var a,c;return a=[],c=[],{createMapInstance:function(d,e){var f;return f=null,0===a.length?(f=new google.maps.Map(d,e),c.push(f)):(f=a.pop(),b.element(d).append(f.getDiv()),f.setOptions(e),c.push(f)),f},recycleMapInstance:function(b){var d;if(d=c.indexOf(b),0>d)throw new Error("Expected map instance to be a previously used instance");return c.splice(d,1),a.push(b)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap",function(b,c,d){var e;return e=function(){function e(c,f,g){this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.handleOptDraw=a(this.handleOptDraw,this),this.clear=a(this.clear,this),this.destroy=a(this.destroy,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=e.type,this.gMap=c,this.gMarkers=new d,this.$log=b,this.$log.info(this)}return e.type="MarkerManager",e.prototype.add=function(a,c){var d,e;if(null==c&&(c=!0),null==a.key)throw e="gMarker.key undefined and it is REQUIRED!!",b.error(e),e;return d=this.gMarkers.get(a.key),d?void 0:(this.handleOptDraw(a,c,!0),this.gMarkers.put(a.key,a))},e.prototype.update=function(a,b){return null==b&&(b=!0),this.remove(a,b),this.add(a,b)},e.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},e.prototype.remove=function(a,b){return null==b&&(b=!0),this.handleOptDraw(a,b,!1),this.gMarkers.get(a.key)?this.gMarkers.remove(a.key):void 0},e.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},e.prototype.draw=function(){var a;return a=[],this.gMarkers.each(function(b){return function(c){return c.isDrawn?void 0:c.doAdd?(c.setMap(b.gMap),c.isDrawn=!0):a.push(c)}}(this)),a.forEach(function(a){return function(b){return b.isDrawn=!1,a.remove(b,!0); +}}(this))},e.prototype.destroy=function(){return this.clear()},e.prototype.clear=function(){return this.gMarkers.each(function(a){return a.setMap(null)}),delete this.gMarkers,this.gMarkers=new d},e.prototype.handleOptDraw=function(a,b,c){return b===!0?(c?a.setMap(this.gMap):a.setMap(null),a.isDrawn=!0):(a.isDrawn=!1,a.doAdd=c)},e.prototype.fit=function(){return c.fit(this.getGMarkers(),this.gMap)},e.prototype.getGMarkers=function(){return this.gMarkers.values()},e}()}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps.directives.api.managers").factory("uiGmapSpiderfierMarkerManager",["uiGmapLogger","uiGmapFitHelper","uiGmapPropMap","uiGmapMarkerSpiderfier",function(c,d,e,f){var g;return g=function(){function g(b,d,h,i,j){null==d&&(d={}),this.opt_options=null!=h?h:{},this.opt_events=i,this.scope=j,this.checkSync=a(this.checkSync,this),this.isSpiderfied=a(this.isSpiderfied,this),this.getGMarkers=a(this.getGMarkers,this),this.fit=a(this.fit,this),this.destroy=a(this.destroy,this),this.attachEvents=a(this.attachEvents,this),this.clear=a(this.clear,this),this.draw=a(this.draw,this),this.removeMany=a(this.removeMany,this),this.remove=a(this.remove,this),this.addMany=a(this.addMany,this),this.update=a(this.update,this),this.add=a(this.add,this),this.type=g.type,this.markerSpiderfier=new f(b,this.opt_options),this.propMapGMarkers=new e,this.attachEvents(this.opt_events,"opt_events"),this.noDrawOnSingleAddRemoves=!0,c.info(this)}return g.type="SpiderfierMarkerManager",g.prototype.checkKey=function(a){var b;return null==a.key?(b="gMarker.key undefined and it is REQUIRED!!",c.error(b)):void 0},g.prototype.add=function(a){return a.setMap(this.markerSpiderfier.map),this.checkKey(a),this.markerSpiderfier.addMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.put(a.key,a),this.checkSync()},g.prototype.update=function(a){return this.remove(a),this.add(a)},g.prototype.addMany=function(a){return a.forEach(function(a){return function(b){return a.add(b)}}(this))},g.prototype.remove=function(a){var b;return this.checkKey(a),b=this.propMapGMarkers.get(a.key),b&&(a.setMap(null),this.markerSpiderfier.removeMarker(a,this.noDrawOnSingleAddRemoves),this.propMapGMarkers.remove(a.key)),this.checkSync()},g.prototype.removeMany=function(a){return a.forEach(function(a){return function(b){return a.remove(b)}}(this))},g.prototype.draw=function(){},g.prototype.clear=function(){return this.removeMany(this.getGMarkers())},g.prototype.attachEvents=function(a,d){return b.isDefined(a)&&null!=a&&b.isObject(a)?_.each(a,function(e){return function(f,g){return a.hasOwnProperty(g)&&b.isFunction(a[g])?(c.info(d+": Attaching event: "+g+" to markerSpiderfier"),e.markerSpiderfier.addListener(g,function(){return"spiderfy"===g||"unspiderfy"===g?e.scope.$evalAsync(a[g].apply(a,arguments)):e.scope.$evalAsync(a[g].apply(a,[arguments[0],g,arguments[0].model,arguments]))})):void 0}}(this)):void 0},g.prototype.clearEvents=function(a,d){var e,f;if(b.isDefined(a)&&null!=a&&b.isObject(a))for(f in a)e=a[f],a.hasOwnProperty(f)&&b.isFunction(a[f])&&(c.info(d+": Clearing event: "+f+" to markerSpiderfier"),this.markerSpiderfier.clearListeners(f))},g.prototype.destroy=function(){return this.clearEvents(this.opt_events,"opt_events"),this.clear()},g.prototype.fit=function(){return d.fit(this.getGMarkers(),this.markerSpiderfier.map)},g.prototype.getGMarkers=function(){return this.markerSpiderfier.getMarkers()},g.prototype.isSpiderfied=function(){return _.find(this.getGMarkers(),function(a){return null!=(null!=a?a._omsData:void 0)})},g.prototype.checkSync=function(){},g}()}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmapadd-events",["$timeout",function(a){var c,d;return c=function(b,c,d){return google.maps.event.addListener(b,c,function(){return d.apply(this,arguments),a(function(){},!0)})},d=function(a,d,e){var f;return e?c(a,d,e):(f=[],b.forEach(d,function(b,d){return f.push(c(a,d,b))}),function(){return b.forEach(f,function(a){return google.maps.event.removeListener(a)}),f=null})}}])}.call(this),function(){b.module("uiGmapgoogle-maps").factory("uiGmaparray-sync",["uiGmapadd-events",function(a){return function(c,d,e,f){var g,h,i,j,k,l,m,n,o;return j=!1,n=d.$eval(e),d["static"]||(k={set_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?(n[a].latitude=b.lat(),n[a].longitude=b.lng()):n[a]=b},insert_at:function(a){var b;if(!j&&(b=c.getAt(a)))return b.lng&&b.lat?n.splice(a,0,{latitude:b.lat(),longitude:b.lng()}):n.splice(a,0,b)},remove_at:function(a){return j?void 0:n.splice(a,1)}},"Polygon"===n.type?g=n.coordinates[0]:"LineString"===n.type&&(g=n.coordinates),h={set_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g[a][1]=b.lat(),g[a][0]=b.lng()},insert_at:function(a){var b;if(!j&&(b=c.getAt(a),b&&b.lng&&b.lat))return g.splice(a,0,[b.lng(),b.lat()])},remove_at:function(a){return j?void 0:g.splice(a,1)}},m=a(c,b.isUndefined(n.type)?k:h)),l=function(a){var b,d,e,g,h,i,k,l;if(j=!0,i=c,b=!1,a){for(d=0,k=i.getLength(),g=a.length,e=Math.min(k,g),h=void 0;e>d;)l=i.getAt(d),h=a[d],"function"==typeof h.equals?h.equals(l)||(i.setAt(d,h),b=!0):l.lat()===h.latitude&&l.lng()===h.longitude||(i.setAt(d,new google.maps.LatLng(h.latitude,h.longitude)),b=!0),d++;for(;g>d;)h=a[d],"function"==typeof h.lat&&"function"==typeof h.lng?i.push(h):i.push(new google.maps.LatLng(h.latitude,h.longitude)),b=!0,d++;for(;k>d;)i.pop(),b=!0,d++}return j=!1,b?f(i):void 0},i=function(a){var b,d,e,g,h,i,k,l,m;if(j=!0,k=c,d=!1,a){for("Polygon"===n.type?b=a.coordinates[0]:"LineString"===n.type&&(b=a.coordinates),e=0,l=k.getLength(),h=b.length,g=Math.min(l,h),i=void 0;g>e;)m=k.getAt(e),i=b[e],m.lat()===i[1]&&m.lng()===i[0]||(k.setAt(e,new google.maps.LatLng(i[1],i[0])),d=!0),e++;for(;h>e;)i=b[e],k.push(new google.maps.LatLng(i[1],i[0])),d=!0,e++;for(;l>e;)k.pop(),d=!0,e++}return j=!1,d?f(k):void 0},d["static"]||(o=b.isUndefined(n.type)?d.$watchCollection(e,l):d.$watch(e,i,!0)),function(){return m&&(m(),m=null),o?(o(),o=null):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.utils").factory("uiGmapChromeFixes",["$timeout",function(a){return{maybeRepaint:function(b){return b?(b.style.opacity=.9,a(function(){return b.style.opacity=1})):void 0}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").service("uiGmapObjectIterators",function(){var a,b,c,d;return a=["length","forEach","map"],b=[],c=function(b){return b.forEach=function(c){return _.each(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(c),d=function(b){return b.map=function(c){return _.map(_.omit(b,a),function(a){return _.isFunction(a)?void 0:c(a)})},b},b.push(d),{slapMap:d,slapForEach:c,slapAll:function(a){return b.forEach(function(b){return b(a)}),a}}})}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").service("uiGmapCommonOptionsBuilder",["uiGmapBaseObject","uiGmapLogger","uiGmapModelKey",function(d,e,f){var g;return g=function(d){function f(){return this.watchProps=a(this.watchProps,this),this.buildOpts=a(this.buildOpts,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.props=["clickable","draggable","editable","visible",{prop:"stroke",isColl:!0}],f.prototype.getCorrectModel=function(a){return b.isDefined(null!=a?a.model:void 0)?a.model:a},f.prototype.buildOpts=function(a,c,d){var f,g,h;return null==a&&(a={}),null==d&&(d={}),this.scope?this.gMap?(f=this.getCorrectModel(this.scope),h=this.scopeOrModelVal("stroke",this.scope,f),g=b.extend(a,this.DEFAULTS,{map:this.gMap,strokeColor:null!=h?h.color:void 0,strokeOpacity:null!=h?h.opacity:void 0,strokeWeight:null!=h?h.weight:void 0}),b.forEach(b.extend(d,{clickable:!0,draggable:!1,editable:!1,"static":!1,fit:!1,visible:!0,zIndex:0,icons:[]}),function(a){return function(d,e){var h;return h=c?c[e]:a.scopeOrModelVal(e,a.scope,f),b.isUndefined(h)?g[e]=d:g[e]=f[e]}}(this)),g["static"]&&(g.editable=!1),g):void e.error("this.map not defined in CommonOptionsBuilder can not buildOpts"):void e.error("this.scope not defined in CommonOptionsBuilder can not buildOpts")},f.prototype.watchProps=function(a){return null==a&&(a=this.props),a.forEach(function(a){return function(b){return null!=a.attrs[b]||null!=a.attrs[null!=b?b.prop:void 0]?(null!=b?b.isColl:void 0)?a.scope.$watchCollection(b.prop,a.setMyOptions):a.scope.$watch(b,a.setMyOptions):void 0}}(this))},f}(f)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.options.builders").factory("uiGmapPolylineOptionsBuilder",["uiGmapCommonOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapShapeOptionsBuilder",["uiGmapCommonOptionsBuilder",function(c){var d;return d=function(c){function d(){return d.__super__.constructor.apply(this,arguments)}return a(d,c),d.prototype.buildOpts=function(a,c,e){var f,g;return g=this.getCorrectModel(this.scope),f=c?c.fill:this.scopeOrModelVal("fill",this.scope,g),a=b.extend(a,{fillColor:null!=f?f.color:void 0,fillOpacity:null!=f?f.opacity:void 0}),d.__super__.buildOpts.call(this,a,c,e)},d}(c)}]).factory("uiGmapPolygonOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{path:a},b,{geodesic:!1})},c}(b)}]).factory("uiGmapRectangleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b){return c.__super__.buildOpts.call(this,{bounds:a},b)},c}(b)}]).factory("uiGmapCircleOptionsBuilder",["uiGmapShapeOptionsBuilder",function(b){var c;return c=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c.prototype.buildOpts=function(a,b,d){return c.__super__.buildOpts.call(this,{center:a,radius:b},d)},c}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.options").service("uiGmapMarkerOptions",["uiGmapLogger","uiGmapGmapUtil",function(a,c){return _.extend(c,{createOptions:function(a,d,e,f){var g;return null==e&&(e={}),g=b.extend({},e,{position:null!=e.position?e.position:c.getCoords(a),visible:null!=e.visible?e.visible:c.validateCoords(a)}),null==e.icon&&null==d||(g=b.extend(g,{icon:null!=e.icon?e.icon:d})),null!=f&&(g.map=f),g},isLabel:function(a){return null==a?!1:null!=a.labelContent||null!=a.labelAnchor||null!=a.labelClass||null!=a.labelStyle||null!=a.labelVisible}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapBasePolyChildModel",["uiGmapLogger","$timeout","uiGmaparray-sync","uiGmapGmapUtil","uiGmapEventsHelper",function(d,e,f,g,h){return function(d,e){var i;return i=function(d){function i(c){var d,g,i;this.scope=c.scope,this.attrs=c.attrs,this.gMap=c.gMap,this.defaults=c.defaults,this.model=c.model,g=c.gObjectChangeCb,this.isScopeModel=null!=(i=c.isScopeModel)?i:!1,this.clean=a(this.clean,this),this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.isDragging=!1,this.internalEvents={dragend:function(a){return function(){return _.defer(function(){return a.isDragging=!1})}}(this),dragstart:function(a){return function(){return a.isDragging=!0}}(this)},d=function(a){return function(){var c;if(!a.isDragging)return a.pathPoints=a.convertPathPoints(a.scope.path),null!=a.gObject&&a.clean(),null!=a.scope.model&&(c=a.scope),a.pathPoints.length>0&&(a.gObject=e(a.buildOpts(a.pathPoints,c))),a.gObject?(f(a.gObject.getPath(),a.scope,"path",function(b){return a.pathPoints=b,null!=g?g():void 0}),b.isDefined(a.scope.events)&&b.isObject(a.scope.events)&&(a.listeners=a.model?h.setEvents(a.gObject,a.scope,a.model):h.setEvents(a.gObject,a.scope,a.scope)),a.internalListeners=a.model?h.setEvents(a.gObject,{events:a.internalEvents},a.model):h.setEvents(a.gObject,{events:a.internalEvents},a.scope)):void 0}}(this),d(),this.scope.$watch("path",function(a){return function(b,c){return _.isEqual(b,c)&&a.gObject?void 0:d()}}(this),!0),!this.scope["static"]&&b.isDefined(this.scope.editable)&&this.scope.$watch("editable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setEditable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.draggable)&&this.scope.$watch("draggable",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setDraggable(b):void 0):void 0}}(this),!0),b.isDefined(this.scope.visible)&&this.scope.$watch("visible",function(a){return function(b,c){var d;return b!==c&&(b=!a.isFalse(b)),null!=(d=a.gObject)?d.setVisible(b):void 0}}(this),!0),b.isDefined(this.scope.geodesic)&&this.scope.$watch("geodesic",function(a){return function(b,c){var d;return b!==c?(b=!a.isFalse(b),null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.weight)&&this.scope.$watch("stroke.weight",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.color)&&this.scope.$watch("stroke.color",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.stroke)&&b.isDefined(this.scope.stroke.opacity)&&this.scope.$watch("stroke.opacity",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),b.isDefined(this.scope.icons)&&this.scope.$watch("icons",function(a){return function(b,c){var d;return b!==c&&null!=(d=a.gObject)?d.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this),!0),this.scope.$on("$destroy",function(a){return function(){return a.clean(),a.scope=null}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.color)&&this.scope.$watch("fill.color",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.fill)&&b.isDefined(this.scope.fill.opacity)&&this.scope.$watch("fill.opacity",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this)),b.isDefined(this.scope.zIndex)&&this.scope.$watch("zIndex",function(a){return function(b,c){return b!==c?a.gObject.setOptions(a.buildOpts(a.gObject.getPath())):void 0}}(this))}return c(i,d),i.include(g),i.prototype.clean=function(){var a;return h.removeEvents(this.listeners),h.removeEvents(this.internalListeners),null!=(a=this.gObject)&&a.setMap(null),this.gObject=null},i}(d)}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapDrawFreeHandChildModel",["uiGmapLogger","$q",function(a,b){var c,d;return c=function(a,b,c){var d,e;e=new google.maps.Polyline({map:a,clickable:!1}),d=google.maps.event.addListener(a,"mousemove",function(a){return e.getPath().push(a.latLng)}),google.maps.event.addListenerOnce(a,"mouseup",function(f){var g;return google.maps.event.removeListener(d),g=e.getPath(),e.setMap(null),b.push(new google.maps.Polygon({map:a,path:g})),e=null,google.maps.event.clearListeners(a.getDiv(),"mousedown"),c()})},d=function(d,e){var f,g;return this.map=d,f=function(b){return function(){var c;return c={draggable:!1,disableDefaultUI:!0,scrollwheel:!1,disableDoubleClickZoom:!1},a.info("disabling map move"),b.map.setOptions(c)}}(this),g=function(a){return function(){var b,c;return b={draggable:!0,disableDefaultUI:!1,scrollwheel:!0,disableDoubleClickZoom:!0},null!=(c=a.deferred)&&c.resolve(),_.defer(function(){return a.map.setOptions(_.extend(b,e.options))})}}(this),this.engage=function(d){return function(e){return d.polys=e,d.deferred=b.defer(),f(),a.info("DrawFreeHandChildModel is engaged (drawing)."),google.maps.event.addDomListener(d.map.getDiv(),"mousedown",function(a){return c(d.map,d.polys,g)}),d.deferred.promise}}(this),this}}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapMarkerChildModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger","uiGmapEventsHelper","uiGmapPropertyAction","uiGmapMarkerOptions","uiGmapIMarker","uiGmapMarkerManager","uiGmapPromise",function(e,f,g,h,i,j,k,l,m){var n;return n=function(e){function n(a){this.internalEvents=c(this.internalEvents,this),this.setLabelOptions=c(this.setLabelOptions,this),this.setOptions=c(this.setOptions,this),this.setIcon=c(this.setIcon,this),this.setCoords=c(this.setCoords,this),this.isNotValid=c(this.isNotValid,this),this.maybeSetScopeValue=c(this.maybeSetScopeValue,this),this.createMarker=c(this.createMarker,this),this.setMyScope=c(this.setMyScope,this),this.updateModel=c(this.updateModel,this),this.handleModelChanges=c(this.handleModelChanges,this),this.destroy=c(this.destroy,this);var b,d,e,f,h,j,k;k=a.scope,this.model=a.model,this.keys=a.keys,this.gMap=a.gMap,this.defaults=null!=(d=a.defaults)?d:{},this.doClick=a.doClick,this.gManager=a.gManager,this.doDrawSelf=null!=(e=a.doDrawSelf)?e:!0,this.trackModel=null!=(f=a.trackModel)?f:!0,this.needRedraw=null!=(h=a.needRedraw)?h:!1,this.isScopeModel=null!=(j=a.isScopeModel)?j:!1,this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.deferred=m.defer(),_.each(this.keys,function(a){return function(b,c){var d;return d=a.keys[c],null!=d&&!_.isFunction(d)&&_.isString(d)?a[c+"Key"]=d:void 0}}(this)),this.idKey=this.idKeyKey||"id",null!=this.model[this.idKey]&&(this.id=this.model[this.idKey]),n.__super__.constructor.call(this,k),this.scope.getGMarker=function(a){return function(){return a.gObject}}(this),this.firstTime=!0,this.trackModel?(this.scope.model=this.model,this.scope.$watch("model",function(a){return function(b,c){return b!==c?a.handleModelChanges(b,c):void 0}}(this),!0)):(b=new i(function(a){return function(b){return _.isFunction(b)&&(b="all"),a.firstTime?void 0:a.setMyScope(b,k)}}(this),!1),_.each(this.keys,function(a,c){return k.$watch(c,b.sic(c),!0)})),this.scope.$on("$destroy",function(a){return function(){return o(a)}}(this)),this.createMarker(this.model),g.info(this)}var o;return d(n,e),n.include(f),n.include(h),n.include(j),o=function(a){return null!=(null!=a?a.gObject:void 0)&&(a.removeEvents(a.externalListeners),a.removeEvents(a.internalListeners),null!=a?a.gObject:void 0)?(a.removeFromManager&&a.gManager.remove(a.gObject),a.gObject.setMap(null),a.gObject=null):void 0},n.prototype.destroy=function(a){return null==a&&(a=!0),this.removeFromManager=a,this.scope.$destroy()},n.prototype.handleModelChanges=function(a,b){var c,d,e;return c=this.getChanges(a,b,k.keys),this.firstTime?void 0:(d=0,e=_.keys(c).length,_.each(c,function(c){return function(f,g){var h;return d+=1,h=e===d,c.setMyScope(g,a,b,!1,!0,h),c.needRedraw=!0}}(this)))},n.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=_.clone(a,!0)),this.setMyScope("all",a,this.model)},n.prototype.renderGMarker=function(b,c){var d,e,f;if(null==b&&(b=!0),d=this.getProp("coords",this.scope,this.model),null!=(null!=(f=this.gManager)?f.isSpiderfied:void 0)&&(e=this.gManager.isSpiderfied()),null!=d){if(!this.validateCoords(d))return void g.debug("MarkerChild does not have coords yet. They may be defined later.");if(null!=c&&c(),b&&this.gObject&&this.gManager.add(this.gObject),e)return this.gManager.markerSpiderfier.spiderListener(this.gObject,a.event)}else if(b&&this.gObject)return this.gManager.remove(this.gObject)},n.prototype.setMyScope=function(a,b,c,d,e){var f;switch(null==c&&(c=void 0),null==d&&(d=!1),null==e&&(e=!0),null==b?b=this.model:this.model=b,this.gObject||(this.setOptions(this.scope,e),f=!0),a){case"all":return _.each(this.keys,function(a){return function(f,g){return a.setMyScope(g,b,c,d,e)}}(this));case"icon":return this.maybeSetScopeValue({gSetter:this.setIcon,doDraw:e});case"coords":return this.maybeSetScopeValue({gSetter:this.setCoords,doDraw:e});case"options":if(!f)return this.createMarker(b,c,d,e)}},n.prototype.createMarker=function(a,b,c,d){return null==b&&(b=void 0),null==c&&(c=!1),null==d&&(d=!0),this.maybeSetScopeValue({gSetter:this.setOptions,doDraw:d}),this.firstTime=!1},n.prototype.maybeSetScopeValue=function(a){var b,c,d;return c=a.gSetter,b=null!=(d=a.doDraw)?d:!0,null!=c&&c(this.scope,b),this.doDrawSelf&&b?this.gManager.draw():void 0},n.prototype.isNotValid=function(a,b){var c,d;return null==b&&(b=!0),d=b?void 0===this.gObject:!1,c=this.trackModel?!1:a.$id!==this.scope.$id,c||d},n.prototype.setCoords=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),c=b.getCoords(d),e=b.gObject.getPosition(),null==e||null==c||c.lng()!==e.lng()||c.lat()!==e.lat()?(b.gObject.setPosition(c),b.gObject.setVisible(b.validateCoords(d))):void 0}}(this))},n.prototype.setIcon=function(a,b){return null==b&&(b=!0),this.isNotValid(a)||null==this.gObject?void 0:this.renderGMarker(b,function(b){return function(){var c,d,e;return e=b.gObject.getIcon(),d=b.getProp("icon",a,b.model),e!==d?(b.gObject.setIcon(d),c=b.getProp("coords",a,b.model),b.gObject.setPosition(b.getCoords(c)),b.gObject.setVisible(b.validateCoords(c))):void 0}}(this))},n.prototype.setOptions=function(a,b){var c;if(null==b&&(b=!0),!this.isNotValid(a,!1)){if(this.renderGMarker(b,function(b){return function(){var c,d,e;return d=b.getProp("coords",a,b.model),e=b.getProp("icon",a,b.model),c=b.getProp("options",a,b.model),b.opts=b.createOptions(d,e,c),b.isLabel(b.gObject)!==b.isLabel(b.opts)&&null!=b.gObject&&(b.gManager.remove(b.gObject),b.gObject=void 0),null!=b.gObject&&b.gObject.setOptions(b.setLabelOptions(b.opts)),b.gObject||(b.isLabel(b.opts)?b.gObject=new MarkerWithLabel(b.setLabelOptions(b.opts)):b.opts.content?(b.gObject=new RichMarker(b.opts),b.gObject.getIcon=b.gObject.getContent,b.gObject.setIcon=b.gObject.setContent):b.gObject=new google.maps.Marker(b.opts),_.extend(b.gObject,{model:b.model})),b.externalListeners&&b.removeEvents(b.externalListeners),b.internalListeners&&b.removeEvents(b.internalListeners),b.externalListeners=b.setEvents(b.gObject,b.scope,b.model,["dragend"]),b.internalListeners=b.setEvents(b.gObject,{events:b.internalEvents(),$evalAsync:function(){}},b.model),null!=b.id?b.gObject.key=b.id:void 0}}(this)),this.gObject&&(this.gObject.getMap()||this.gManager.type!==l.type))this.deferred.resolve(this.gObject);else{if(!this.gObject)return this.deferred.reject("gObject is null");(null!=(c=this.gObject)?c.getMap():0)&&this.gManager.type===l.type||(g.debug("gObject has no map yet"),this.deferred.resolve(this.gObject))}return this.model[this.fitKey]?this.gManager.fit():void 0}},n.prototype.setLabelOptions=function(a){return a.labelAnchor&&(a.labelAnchor=this.getLabelPositionPoint(a.labelAnchor)),a},n.prototype.internalEvents=function(){return{dragend:function(a){return function(b,c,d,e){var f,g,h;return g=a.trackModel?a.scope.model:a.model,h=a.setCoordsFromEvent(a.modelOrKey(g,a.coordsKey),a.gObject.getPosition()),g=a.setVal(d,a.coordsKey,h),f=a.scope.events,null!=(null!=f?f.dragend:void 0)&&f.dragend(b,c,g,e),a.scope.$apply()}}(this),click:function(a){return function(c,d,e,f){var g;return g=a.getProp("click",a.scope,a.model),a.doClick&&b.isFunction(g)?a.scope.$evalAsync(g(c,d,a.model,f)):void 0}}(this)}},n}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygonChildModel",["uiGmapBasePolyChildModel","uiGmapPolygonOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polygon(a)},e=new b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylineChildModel",["uiGmapBasePolyChildModel","uiGmapPolylineOptionsBuilder",function(b,c){var d,e,f;return f=function(a){return new google.maps.Polyline(a)},e=b(c,f),d=function(b){function c(){return c.__super__.constructor.apply(this,arguments)}return a(c,b),c}(e)}])}.call(this),function(){var c=function(a,b){return function(){return a.apply(b,arguments)}},d=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},e={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.child").factory("uiGmapWindowChildModel",["uiGmapBaseObject","uiGmapGmapUtil","uiGmapLogger","$compile","$http","$templateCache","uiGmapChromeFixes","uiGmapEventsHelper",function(e,f,g,h,i,j,k,l){var m;return m=function(e){function m(a){this.updateModel=c(this.updateModel,this),this.destroy=c(this.destroy,this),this.remove=c(this.remove,this),this.getLatestPosition=c(this.getLatestPosition,this),this.hideWindow=c(this.hideWindow,this),this.showWindow=c(this.showWindow,this),this.handleClick=c(this.handleClick,this),this.watchOptions=c(this.watchOptions,this),this.watchCoords=c(this.watchCoords,this),this.createGWin=c(this.createGWin,this),this.watchElement=c(this.watchElement,this),this.watchAndDoShow=c(this.watchAndDoShow,this),this.doShow=c(this.doShow,this);var b,d,e,f,h;this.model=null!=(d=a.model)?d:{},this.scope=a.scope,this.opts=a.opts,this.isIconVisibleOnClick=a.isIconVisibleOnClick,this.gMap=a.gMap,this.markerScope=a.markerScope,this.element=a.element,this.needToManualDestroy=null!=(e=a.needToManualDestroy)?e:!1,this.markerIsVisibleAfterWindowClose=null!=(f=a.markerIsVisibleAfterWindowClose)?f:!0,this.isScopeModel=null!=(h=a.isScopeModel)?h:!1,this.isScopeModel&&(this.clonedModel=_.clone(this.model,!0)),this.getGmarker=function(){var a,b;return null!=(null!=(a=this.markerScope)?a.getGMarker:void 0)&&null!=(b=this.markerScope)?b.getGMarker():void 0},this.listeners=[],this.createGWin(),b=this.getGmarker(),null!=b&&b.setClickable(!0),this.watchElement(),this.watchOptions(),this.watchCoords(),this.watchAndDoShow(),this.scope.$on("$destroy",function(a){return function(){return a.destroy()}}(this)),g.info(this)}return d(m,e),m.include(f),m.include(l),m.prototype.doShow=function(a){return this.scope.show===!0||a?this.showWindow():this.hideWindow()},m.prototype.watchAndDoShow=function(){return null!=this.model.show&&(this.scope.show=this.model.show),this.scope.$watch("show",this.doShow,!0),this.doShow()},m.prototype.watchElement=function(){return this.scope.$watch(function(a){return function(){var b,c;if(a.element||a.html)return a.html!==a.element.html()&&a.gObject?(null!=(b=a.opts)&&(b.content=void 0),c=a.gObject.isOpen(),a.remove(),a.createGWin(c)):void 0}}(this))},m.prototype.createGWin=function(b){var c,d,e,f,g;return null==b&&(b=!1),e=this.getGmarker(),d={},null!=this.opts&&(this.scope.coords&&(this.opts.position=this.getCoords(this.scope.coords)),d=this.opts),this.element&&(this.html=_.isObject(this.element)?this.element.html():this.element),c=this.scope.options?this.scope.options:d,this.opts=this.createWindowOptions(e,this.markerScope||this.scope,this.html,c),null!=this.opts?(this.gObject||(this.opts.boxClass&&a.InfoBox&&"function"==typeof a.InfoBox?this.gObject=new a.InfoBox(this.opts):this.gObject=new google.maps.InfoWindow(this.opts),this.listeners.push(google.maps.event.addListener(this.gObject,"domready",function(){return k.maybeRepaint(this.content)})),this.listeners.push(google.maps.event.addListener(this.gObject,"closeclick",function(a){return function(){return e&&(e.setAnimation(a.oldMarkerAnimation),a.markerIsVisibleAfterWindowClose&&_.delay(function(){return e.setVisible(!1),e.setVisible(a.markerIsVisibleAfterWindowClose)},250)),a.gObject.close(),a.model.show=!1,null!=a.scope.closeClick?a.scope.$evalAsync(a.scope.closeClick()):a.scope.$evalAsync()}}(this)))),this.gObject.setContent(this.opts.content),this.handleClick((null!=(f=this.scope)&&null!=(g=f.options)?g.forceClick:void 0)||b),this.doShow(this.gObject.isOpen())):void 0},m.prototype.watchCoords=function(){var a;return a=null!=this.markerScope?this.markerScope:this.scope,a.$watch("coords",function(a){return function(b,c){var d;if(b!==c){if(null==b)a.hideWindow();else if(!a.validateCoords(b))return void g.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: "+JSON.stringify(a.model));if(d=a.getCoords(b),a.doShow(),a.gObject.setPosition(d),a.opts)return a.opts.position=d}}}(this),!0)},m.prototype.watchOptions=function(){return this.scope.$watch("options",function(a){return function(b,c){if(b!==c&&(a.opts=b,null!=a.gObject)){if(a.gObject.setOptions(a.opts),null!=a.opts.visible&&a.opts.visible)return a.showWindow();if(null!=a.opts.visible)return a.hideWindow()}}}(this),!0)},m.prototype.handleClick=function(a){var b,c;if(null!=this.gObject)return c=this.getGmarker(),b=function(a){return function(){return null==a.gObject&&a.createGWin(),a.showWindow(),null!=c?(a.initialMarkerVisibility=c.getVisible(),a.oldMarkerAnimation=c.getAnimation(),c.setVisible(a.isIconVisibleOnClick)):void 0}}(this),a&&b(),c?this.listeners=this.listeners.concat(this.setEvents(c,{events:{click:b}},this.model)):void 0},m.prototype.showWindow=function(){var a,c,d;if(null!=this.gObject)return d=null,c=function(a){return function(){var b,c,d;if(!a.gObject.isOpen()){if(c=a.getGmarker(),null!=a.gObject&&null!=a.gObject.getPosition&&(d=a.gObject.getPosition()),c&&(d=c.getPosition()),!d)return;if(a.gObject.open(a.gMap,c),b=a.gObject.isOpen(),a.model.show!==b)return a.model.show=b}}}(this),this.scope.templateUrl?i.get(this.scope.templateUrl,{cache:j}).then(function(a){return function(e){var f;return d=a.scope.$new(),b.isDefined(a.scope.templateParameter)&&(d.parameter=a.scope.templateParameter),f=h(e.data)(d),a.gObject.setContent(f[0]),c()}}(this)):this.scope.template?(d=this.scope.$new(),b.isDefined(this.scope.templateParameter)&&(d.parameter=this.scope.templateParameter),a=h(this.scope.template)(d),this.gObject.setContent(a[0]),c()):c(),this.scope.$on("destroy",function(){return d.$destroy()})},m.prototype.hideWindow=function(){return null!=this.gObject&&this.gObject.isOpen()?this.gObject.close():void 0},m.prototype.getLatestPosition=function(a){var b;return b=this.getGmarker(),null==this.gObject||null==b||a?a?this.gObject.setPosition(a):void 0:this.gObject.setPosition(b.getPosition())},m.prototype.remove=function(){return this.hideWindow(),this.removeEvents(this.listeners),this.listeners.length=0,delete this.gObject, +delete this.opts},m.prototype.destroy=function(a){var b;return null==a&&(a=!1),this.remove(),null==this.scope||(null!=(b=this.scope)?b.$$destroyed:void 0)||!this.needToManualDestroy&&!a?void 0:this.scope.$destroy()},m.prototype.updateModel=function(a){return this.isScopeModel&&(this.clonedModel=_.clone(a,!0)),_.extend(this.model,this.clonedModel||a)},m}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapBasePolysParentModel",["$timeout","uiGmapLogger","uiGmapModelKey","uiGmapModelsWatcher","uiGmapPropMap","uiGmap_async","uiGmapPromise","uiGmapFitHelper",function(d,e,f,g,h,i,j,k){return function(d,l,m){var n;return n=function(f){function n(b,c,f,g,i){this.element=c,this.attrs=f,this.gMap=g,this.defaults=i,this.maybeFit=a(this.maybeFit,this),this.createChild=a(this.createChild,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),n.__super__.constructor.call(this,b),this["interface"]=d,this.$log=e,this.plurals=new h,_.each(d.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.models=void 0,this.firstTime=!0,this.$log.info(this),this.createChildScopes()}return c(n,f),n.include(g),n.prototype.watchModels=function(a){return a.$watch("models",function(b){return function(c,d){return c!==d?b.doINeedToWipe(c)||a.doRebuildAll?b.rebuildAll(a,!0,!0):b.createChildScopes(!1):void 0}}(this),!0)},n.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},n.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},n.prototype.onDestroy=function(){return n.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,j.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},n.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.rebuildAll(a,!1,!0)}}(this))},n.prototype.createChildScopes=function(a){return null==a&&(a=!0),b.isUndefined(this.scope.models)?void this.$log.error("No models to create "+m+"s from! I Need direct models!"):null!=this.gMap&&null!=this.scope.models?(this.watchIdKey(this.scope),a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1)):void 0},n.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},n.prototype.createAllNew=function(a,b){var c;return null==b&&(b=!1),this.models=a.models,this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.didQueueInitPromise(this,a)?void 0:(c=null,i.promiseLock(this,j.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return i.map(a.models,function(a){var d;return d=b.createChild(a,b.gMap),c&&(e.debug("createNew should fall through safely"),d.isEnabled=!1),d.pathPoints.getArray()},i.chunkSizeFrom(a.chunk)).then(function(a){return b.maybeFit(a),b.firstTime=!1})}}(this)))},n.prototype.pieceMeal=function(a,b){var c,d;return null==b&&(b=!0),a.$$destroyed?void 0:(c=null,d=null,this.models=a.models,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,j.promiseTypes.update,"pieceMeal",function(a){return c=a},function(b){return function(){return j.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(e){return d=e,d.updates.length&&i.each(d.updates,function(a){return _.extend(a.child.scope,a.model),a.child.model=a.model}),i.each(d.removals,function(a){return null!=a?(a.destroy(),b.plurals.remove(a.model[b.idKey]),c):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(d.adds,function(a){return c&&e.debug("pieceMeal should fall through safely"),b.createChild(a,b.gMap),c},i.chunkSizeFrom(a.chunk)).then(function(){return b.maybeFit()})})}}(this)):(this.inProgress=!1,this.rebuildAll(this.scope,!0,!0)))},n.prototype.createChild=function(a,b){var c,e;return e=this.scope.$new(!1),this.setChildScope(d.scopeKeys,e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),e["static"]=this.scope["static"],c=new l({isScopeModel:!0,scope:e,attrs:this.attrs,gMap:b,defaults:this.defaults,model:a,gObjectChangeCb:function(a){return function(){return a.maybeFit()}}(this)}),null==a[this.idKey]?void this.$log.error(m+" model has no id to assign a child to.\nThis is required for performance. Please assign id,\nor redirect id to a different key."):(this.plurals.put(a[this.idKey],c),c)},n.prototype.maybeFit=function(a){return null==a&&(a=this.plurals.map(function(a){return a.pathPoints})),this.scope.fit?(a=_.flatten(a),k.fit(a,this.gMap)):void 0},n}(f)}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapCircleParentModel",["uiGmapLogger","$timeout","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapCircleOptionsBuilder",function(c,d,e,f,g){var h,i;return i=function(a,b){return a.settingFromDirective=!0,b(),d(function(){return a.settingFromDirective=!1})},h=function(d){function g(a,d,f,g,h){var j,k,l;this.attrs=f,this.gMap=g,this.DEFAULTS=h,this.scope=a,l=null,j=function(a){return function(){return l=null,null!=a.listeners?(a.removeEvents(a.listeners),a.listeners=void 0):void 0}}(this),k=new google.maps.Circle(this.buildOpts(e.getCoords(a.center),a.radius)),this.setMyOptions=function(b){return function(c,d){return a.settingFromDirective?void 0:!_.isEqual(c,d)||c!==d||(null!=c&&null!=d?c.coordinates!==d.coordinates:0)?k.setOptions(b.buildOpts(e.getCoords(a.center),a.radius)):void 0}}(this),this.props=this.props.concat([{prop:"center",isColl:!0},{prop:"fill",isColl:!0},"radius","zIndex"]),this.watchProps(),null!=this.scope.control&&(this.scope.control.getCircle=function(){return k}),j(),this.listeners=this.setEvents(k,a,a,["radius_changed"])||[],this.listeners.push(google.maps.event.addListener(k,"radius_changed",function(){var c,d;return c=k.getRadius(),c!==l?(l=c,d=function(){return i(a,function(){var b,d;return c!==a.radius&&(a.radius=c),(null!=(b=a.events)?b.radius_changed:void 0)&&_.isFunction(null!=(d=a.events)?d.radius_changed:void 0)?a.events.radius_changed(k,"radius_changed",a,arguments):void 0})},b.mock?d():a.$evalAsync(function(){return d()})):void 0})),this.listeners.push(google.maps.event.addListener(k,"center_changed",function(){return a.$evalAsync(function(){return i(a,function(){return b.isDefined(a.center.type)?(a.center.coordinates[1]=k.getCenter().lat(),a.center.coordinates[0]=k.getCenter().lng()):(a.center.latitude=k.getCenter().lat(),a.center.longitude=k.getCenter().lng())})})})),a.$on("$destroy",function(){return j(),k.setMap(null)}),c.info(this)}return a(g,d),g.include(e),g.include(f),g}(g)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapDrawingManagerParentModel",["uiGmapLogger","$timeout","uiGmapBaseObject","uiGmapEventsHelper",function(b,c,d,e){var f;return f=function(b){function c(a,b,c,d){var e,f;this.scope=a,this.attrs=c,this.map=d,e=new google.maps.drawing.DrawingManager(this.scope.options),e.setMap(this.map),f=void 0,null!=this.scope.control&&(this.scope.control.getDrawingManager=function(){return e}),!this.scope["static"]&&this.scope.options&&this.scope.$watch("options",function(a){return null!=e?e.setOptions(a):void 0},!0),null!=this.scope.events&&(f=this.setEvents(e,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=f&&a.removeEvents(f),f=a.setEvents(e,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(a){return function(){return null!=f&&a.removeEvents(f),e.setMap(null),e=null}}(this))}return a(c,b),c.include(e),c}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIMarkerParentModel",["uiGmapModelKey","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,g,h){if(this.scope=c,this.element=d,this.attrs=g,this.map=h,this.onWatch=a(this.onWatch,this),this.watch=a(this.watch,this),this.validateScope=a(this.validateScope,this),f.__super__.constructor.call(this,this.scope),this.$log=e,!this.validateScope(this.scope))throw new String("Unable to construct IMarkerParentModel due to invalid scope");this.doClick=b.isDefined(this.attrs.click),null!=this.scope.options&&(this.DEFAULTS=this.scope.options),this.watch("coords",this.scope),this.watch("icon",this.scope),this.watch("options",this.scope),this.scope.$on("$destroy",function(a){return function(){return a.onDestroy(a.scope)}}(this))}return c(f,d),f.prototype.DEFAULTS={},f.prototype.validateScope=function(a){var b;return null==a?(this.$log.error(this.constructor.name+": invalid scope used"),!1):(b=null!=a.coords,b?b:(this.$log.error(this.constructor.name+": no valid coords attribute found"),!1))},f.prototype.watch=function(a,b,c){return null==c&&(c=!0),b.$watch(a,function(c){return function(d,e){return _.isEqual(d,e)?void 0:c.onWatch(a,b,d,e)}}(this),c)},f.prototype.onWatch=function(a,b,c,d){},f}(d)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapIWindowParentModel",["uiGmapModelKey","uiGmapGmapUtil","uiGmapLogger",function(b,c,d){var e;return e=function(b){function e(a,b,c,f,g,h,i,j){e.__super__.constructor.call(this,a),this.$log=d,this.$timeout=g,this.$compile=h,this.$http=i,this.$templateCache=j,this.DEFAULTS={},null!=a.options&&(this.DEFAULTS=a.options)}return a(e,b),e.include(c),e.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapLayerParentModel",["uiGmapBaseObject","uiGmapLogger","$timeout",function(d,e,f){var g;return g=function(d){function f(c,d,f,g,h,i){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.onLayerCreated=null!=h?h:void 0,this.$log=null!=i?i:e,this.createGoogleLayer=a(this.createGoogleLayer,this),null==this.attrs.type?void this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"):(this.createGoogleLayer(),this.doShow=!0,b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.gObject.setMap(this.gMap),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.gObject.setMap(a.gMap):a.gObject.setMap(null)):void 0}}(this),!0),this.scope.$watch("options",function(a){return function(b,c){return b!==c&&a.doShow?a.gObject.setOptions(b):void 0}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.gObject.setMap(null)}}(this)))}return c(f,d),f.prototype.createGoogleLayer=function(){var a;return null==this.attrs.options?this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type]:new google.maps[this.attrs.namespace][this.attrs.type]:this.gObject=void 0===this.attrs.namespace?new google.maps[this.attrs.type](this.scope.options):new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options),null!=this.gObject&&this.doShow&&this.gObject.setMap(this.gMap),null!=this.gObject&&null!=this.onLayerCreated&&"function"==typeof(a=this.onLayerCreated(this.scope,this.gObject))?a(this.gObject):void 0},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMapTypeParentModel",["uiGmapBaseObject","uiGmapLogger",function(d,e){var f;return f=function(d){function f(c,d,f,g,h){return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.$log=null!=h?h:e,this.hideOverlay=a(this.hideOverlay,this),this.showOverlay=a(this.showOverlay,this),this.refreshMapType=a(this.refreshMapType,this),this.createMapType=a(this.createMapType,this),null==this.attrs.options?void this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"):(this.id=this.gMap.overlayMapTypesCount=this.gMap.overlayMapTypesCount+1||0,this.doShow=!0,this.createMapType(),b.isDefined(this.attrs.show)&&(this.doShow=this.scope.show),this.doShow&&null!=this.gMap&&this.showOverlay(),this.scope.$watch("show",function(a){return function(b,c){return b!==c?(a.doShow=b,b?a.showOverlay():a.hideOverlay()):void 0}}(this),!0),this.scope.$watchCollection("options",function(a){return function(b,c){var d,e;return!_.isEqual(b,c)&&(e=["tileSize","maxZoom","minZoom","name","alt"],d=_.some(e,function(a){return!c||!b||!_.isEqual(b[a],c[a])}))?a.refreshMapType():void 0}}(this)),b.isDefined(this.attrs.refresh)&&this.scope.$watch("refresh",function(a){return function(b,c){return _.isEqual(b,c)?void 0:a.refreshMapType()}}(this),!0),void this.scope.$on("$destroy",function(a){return function(){return a.hideOverlay(),a.mapType=null}}(this)))}return c(f,d),f.prototype.createMapType=function(){if(null!=this.scope.options.getTile)this.mapType=this.scope.options;else{if(null==this.scope.options.getTileUrl)return void this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!");this.mapType=new google.maps.ImageMapType(this.scope.options)}return this.attrs.id&&this.scope.id&&(this.gMap.mapTypes.set(this.scope.id,this.mapType),b.isDefined(this.attrs.show)||(this.doShow=!1)),this.mapType.layerId=this.id},f.prototype.refreshMapType=function(){return this.hideOverlay(),this.mapType=null,this.createMapType(),this.doShow&&null!=this.gMap?this.showOverlay():void 0},f.prototype.showOverlay=function(){return this.gMap.overlayMapTypes.push(this.mapType)},f.prototype.hideOverlay=function(){var a;return a=!1,this.gMap.overlayMapTypes.forEach(function(b){return function(c,d){a||c.layerId!==b.id||(a=!0,b.gMap.overlayMapTypes.removeAt(d))}}(this))},f}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapMarkersParentModel",["uiGmapIMarkerParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapMarkerChildModel","uiGmap_async","uiGmapClustererMarkerManager","uiGmapMarkerManager","$timeout","uiGmapIMarker","uiGmapPromise","uiGmapGmapUtil","uiGmapLogger","uiGmapSpiderfierMarkerManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p){var q,r;return r=function(a,b){return b.plurals=new f,b.scope.plurals=b.plurals,b},q=function(d){function k(b,c,d,e){this.maybeExecMappedEvent=a(this.maybeExecMappedEvent,this),this.onDestroy=a(this.onDestroy,this),this.newChildMarker=a(this.newChildMarker,this),this.pieceMeal=a(this.pieceMeal,this),this.rebuildAll=a(this.rebuildAll,this),this.createAllNew=a(this.createAllNew,this),this.bindToTypeEvents=a(this.bindToTypeEvents,this),this.createChildScopes=a(this.createChildScopes,this),this.validateScope=a(this.validateScope,this),this.onWatch=a(this.onWatch,this),k.__super__.constructor.call(this,b,c,d,e),this["interface"]=l,r(new f,this),this.scope.pluralsUpdate={updateCtr:0},this.$log.info(this),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,this.setIdKey(this.scope),this.scope.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.modelsLength()||(this.modelsRendered=!1),this.scope.$watch("models",function(a){return function(b,c){if(!_.isEqual(b,c)||!a.modelsRendered){if(0===b.length&&0===c.length)return;return a.modelsRendered=!0,a.onWatch("models",a.scope,b,c)}}}(this),!this.isTrue(d.modelsbyref)),this.watch("doCluster",this.scope),this.watch("type",this.scope),this.watch("clusterOptions",this.scope),this.watch("clusterEvents",this.scope),this.watch("typeOptions",this.scope),this.watch("typeEvents",this.scope),this.watch("fit",this.scope),this.watch("idKey",this.scope),this.gManager=void 0,this.createAllNew(this.scope)}return c(k,d),k.include(n),k.include(e),k.prototype.onWatch=function(a,b,c,d){return"idKey"===a&&c!==d&&(this.idKey=c),this.doRebuildAll||"doCluster"===a||"type"===a?this.rebuildAll(b):this.pieceMeal(b)},k.prototype.validateScope=function(a){var c;return c=b.isUndefined(a.models)||void 0===a.models,c&&this.$log.error(this.constructor.name+": no valid models attribute found"),k.__super__.validateScope.call(this,a)||c},k.prototype.createChildScopes=function(a){return null!=this.gMap&&null!=this.scope.models?a?this.createAllNew(this.scope,!1):this.pieceMeal(this.scope,!1):void 0},k.prototype.bindToTypeEvents=function(a,c){var d,e;return null==c&&(c=["click","mouseout","mouseover"]),e=this,this.origTypeEvents?b.extend(a,this.origTypeEvents):(this.origTypeEvents={},_.each(c,function(b){return function(c){return b.origTypeEvents[c]=null!=a?a[c]:void 0}}(this))),d={},_.each(c,function(a){return d[a]=function(b){return e.maybeExecMappedEvent(b,a)}}),b.extend(a,d)},k.prototype.createAllNew=function(a){var b,c,d,e;return null!=this.gManager&&(this.gManager instanceof p&&(b=this.gManager.isSpiderfied()),this.gManager.clear(),delete this.gManager),d=a.typeEvents||a.clusterEvents,e=a.typeOptions||a.clusterOptions,a.doCluster||"cluster"===a.type?(null!=d&&this.bindToTypeEvents(d),this.gManager=new i(this.map,void 0,e,d)):"spider"===a.type?(null!=d&&this.bindToTypeEvents(d,["spiderfy","unspiderfy"]),this.gManager=new p(this.map,void 0,e,d,this.scope),b&&this.gManager.spiderfy()):this.gManager=new j(this.map),this.didQueueInitPromise(this,a)?void 0:(c=null,h.promiseLock(this,m.promiseTypes.create,"createAllNew",function(a){return c=a},function(b){return function(){return h.each(a.models,function(d){return b.newChildMarker(d,a),c},h.chunkSizeFrom(a.chunk)).then(function(){return b.modelsRendered=!0,a.fit&&b.gManager.fit(),b.gManager.draw(),b.scope.pluralsUpdate.updateCtr+=1},h.chunkSizeFrom(a.chunk))}}(this)))},k.prototype.rebuildAll=function(a){var b;if(a.doRebuild||void 0===a.doRebuild)return(null!=(b=this.scope.plurals)?b.length:void 0)?this.onDestroy(a).then(function(b){return function(){return b.createAllNew(a)}}(this)):this.createAllNew(a)},k.prototype.pieceMeal=function(a){var b,c;if(!a.$$destroyed)return b=null,c=null,this.modelsLength()&&this.scope.plurals.length?h.promiseLock(this,m.promiseTypes.update,"pieceMeal",function(a){return b=a},function(d){return function(){return m.promise(function(){return d.figureOutState(d.idKey,a,d.scope.plurals,d.modelKeyComparison)}).then(function(e){return c=e,h.each(c.removals,function(a){return null!=a?(null!=a.destroy&&a.destroy(),d.scope.plurals.remove(a.id),b):void 0},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.adds,function(c){return d.newChildMarker(c,a),b},h.chunkSizeFrom(a.chunk))}).then(function(){return h.each(c.updates,function(a){return d.updateChild(a.child,a.model),b},h.chunkSizeFrom(a.chunk))}).then(function(){return(c.adds.length>0||c.removals.length>0||c.updates.length>0)&&(a.plurals=d.scope.plurals,a.fit&&d.gManager.fit(),d.gManager.draw()),d.scope.pluralsUpdate.updateCtr+=1})}}(this)):(this.inProgress=!1,this.rebuildAll(a))},k.prototype.newChildMarker=function(a,b){var c,d,e;if(!a)throw"model undefined";return null==a[this.idKey]?void this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.$log.info("child",c,"markers",this.scope.markerModels),d=b.$new(!1),d.events=b.events,e={},l.scopeKeys.forEach(function(a){return e[a]=b[a]}),c=new g({scope:d,model:a,keys:e,gMap:this.map,defaults:this.DEFAULTS,doClick:this.doClick,gManager:this.gManager,doDrawSelf:!1,isScopeModel:!0}),this.scope.plurals.put(a[this.idKey],c),c)},k.prototype.onDestroy=function(a){return k.__super__.onDestroy.call(this,a),h.promiseLock(this,m.promiseTypes["delete"],void 0,void 0,function(a){return function(){return h.each(a.scope.plurals.values(),function(a){return null!=a?a.destroy(!1):void 0},h.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){return null!=a.gManager&&a.gManager.destroy(),a.plurals.removeAll(),a.plurals!==a.scope.plurals&&console.error("plurals out of sync for MarkersParentModel"),a.scope.pluralsUpdate.updateCtr+=1})}}(this))},k.prototype.maybeExecMappedEvent=function(a,b){var c,d;if(!this.scope.$$destroyed)return d=this.scope.typeEvents||this.scope.clusterEvents,_.isFunction(null!=d?d[b]:void 0)&&(c=this.mapTypeToPlurals(a),this.origTypeEvents[b])?this.origTypeEvents[b](c.group,c.mapped):void 0},k.prototype.mapTypeToPlurals=function(a){var b,c,d;return _.isArray(a)?b=a:_.isFunction(a.getMarkers)&&(b=a.getMarkers()),null==b?void o.error("Unable to map event as we cannot find the array group to map"):(c=(null!=(d=this.scope.plurals.values())?d.length:void 0)?b.map(function(a){return function(b){return a.scope.plurals.get(b.key).model}}(this)):[],{cluster:a,mapped:c,group:a})},k.prototype.getItem=function(a,b,c){return"models"===b?a[b][c]:a[b].get(c)},k}(d)}])}.call(this),function(){["Polygon","Polyline"].forEach(function(a){return b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmap"+a+"sParentModel",["uiGmapBasePolysParentModel","uiGmap"+a+"ChildModel","uiGmapI"+a,function(b,c,d){return b(d,c,a)}])})}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapRectangleParentModel",["uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper","uiGmapRectangleOptionsBuilder",function(b,c,d,e){var f;return f=function(e){function f(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;this.scope=a,this.attrs=d,this.gMap=e,this.DEFAULTS=f,g=void 0,j=!1,o=[],n=void 0,k=function(a){return function(){return a.isTrue(a.attrs.fit)?a.fitMapBounds(a.gMap,g):void 0}}(this),i=function(a){return function(){var c,d,e;return null!=a.scope.bounds&&null!=(null!=(c=a.scope.bounds)?c.sw:void 0)&&null!=(null!=(d=a.scope.bounds)?d.ne:void 0)&&a.validateBoundPoints(a.scope.bounds)?(g=a.convertBoundPoints(a.scope.bounds),b.info("new new bounds created: "+JSON.stringify(g))):null!=a.scope.bounds.getNorthEast&&null!=a.scope.bounds.getSouthWest?g=a.scope.bounds:null!=a.scope.bounds?b.error("Invalid bounds for newValue: "+JSON.stringify(null!=(e=a.scope)?e.bounds:void 0)):void 0}}(this),i(),l=new google.maps.Rectangle(this.buildOpts(g)),b.info("gObject (rectangle) created: "+l),p=!1,q=function(a){return function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),p?void 0:a.scope.$evalAsync(function(a){return null!=a.bounds&&null!=a.bounds.sw&&null!=a.bounds.ne&&(a.bounds.ne={latitude:c.lat(),longitude:c.lng()},a.bounds.sw={latitude:d.lat(),longitude:d.lng()}),null!=a.bounds.getNorthEast&&null!=a.bounds.getSouthWest?a.bounds=b:void 0})}}(this),m=function(a){return function(){return k(),a.removeEvents(o),o.push(google.maps.event.addListener(l,"dragstart",function(){return j=!0})),o.push(google.maps.event.addListener(l,"dragend",function(){return j=!1,q()})),o.push(google.maps.event.addListener(l,"bounds_changed",function(){return j?void 0:q()}))}}(this),h=function(a){return function(){return a.removeEvents(o),null!=n&&a.removeEvents(n),l.setMap(null)}}(this),null!=g&&m(),this.scope.$watch("bounds",function(a,b){var c;if(!(_.isEqual(a,b)&&null!=g||j))return p=!0,null==a?void h():(null==g?c=!0:k(),i(),l.setBounds(g),p=!1,c&&null!=g?m():void 0)},!0),this.setMyOptions=function(a){return function(b,c){return _.isEqual(b,c)||null==g||null==b?void 0:l.setOptions(a.buildOpts(g))}}(this),this.props.push("bounds"),this.watchProps(this.props),null!=this.attrs.events&&(n=this.setEvents(l,this.scope,this.scope),this.scope.$watch("events",function(a){return function(b,c){return _.isEqual(b,c)?void 0:(null!=n&&a.removeEvents(n),n=a.setEvents(l,a.scope,a.scope))}}(this))),this.scope.$on("$destroy",function(){return h()}),b.info(this)}return a(f,e),f.include(c),f.include(d),f}(e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapSearchBoxParentModel",["uiGmapBaseObject","uiGmapLogger","uiGmapEventsHelper",function(d,e,f){var g;return g=function(d){function g(c,d,f,g,h,i,j){var k;return this.scope=c,this.element=d,this.attrs=f,this.gMap=g,this.ctrlPosition=h,this.template=i,this.$log=null!=j?j:e,this.setVisibility=a(this.setVisibility,this),this.getBounds=a(this.getBounds,this),this.setBounds=a(this.setBounds,this),this.createSearchBox=a(this.createSearchBox,this),this.addToParentDiv=a(this.addToParentDiv,this),this.addAsMapControl=a(this.addAsMapControl,this),this.init=a(this.init,this),null==this.attrs.template?void this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"):(b.isUndefined(this.scope.options)&&(this.scope.options={},this.scope.options.visible=!0),b.isUndefined(this.scope.options.visible)&&(this.scope.options.visible=!0),b.isUndefined(this.scope.options.autocomplete)&&(this.scope.options.autocomplete=!1),this.visible=this.scope.options.visible,this.autocomplete=this.scope.options.autocomplete,k=b.element("
"),k.append(this.template),this.input=k.find("input")[0],void this.init())}return c(g,d),g.include(f),g.prototype.init=function(){return this.createSearchBox(),this.scope.$watch("options",function(a){return function(c,d){return b.isObject(c)&&(null!=c.bounds&&a.setBounds(c.bounds),null!=c.visible&&a.visible!==c.visible)?a.setVisibility(c.visible):void 0}}(this),!0),null!=this.attrs.parentdiv?this.addToParentDiv():this.addAsMapControl(),this.visible||this.setVisibility(this.visible),this.autocomplete?this.listener=google.maps.event.addListener(this.gObject,"place_changed",function(a){return function(){return a.places=a.gObject.getPlace()}}(this)):this.listener=google.maps.event.addListener(this.gObject,"places_changed",function(a){return function(){return a.places=a.gObject.getPlaces()}}(this)),this.listeners=this.setEvents(this.gObject,this.scope,this.scope),this.$log.info(this),this.scope.$on("$stateChangeSuccess",function(a){return function(){return null!=a.attrs.parentdiv?a.addToParentDiv():void 0}}(this)),this.scope.$on("$destroy",function(a){return function(){return a.gObject=null}}(this))},g.prototype.addAsMapControl=function(){return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input)},g.prototype.addToParentDiv=function(){var a;return this.parentDiv=b.element(document.getElementById(this.scope.parentdiv)),(null!=(a=this.parentDiv)?a.length:void 0)?this.parentDiv.append(this.input):void 0},g.prototype.createSearchBox=function(){return this.autocomplete?this.gObject=new google.maps.places.Autocomplete(this.input,this.scope.options):this.gObject=new google.maps.places.SearchBox(this.input,this.scope.options)},g.prototype.setBounds=function(a){if(b.isUndefined(a.isEmpty))this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds.");else if(a.isEmpty()===!1&&null!=this.gObject)return this.gObject.setBounds(a)},g.prototype.getBounds=function(){return this.gObject.getBounds()},g.prototype.setVisibility=function(a){return null!=this.attrs.parentdiv?a===!1?this.parentDiv.addClass("ng-hide"):this.parentDiv.removeClass("ng-hide"):a===!1?this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].clear():this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input),this.visible=a},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api.models.parent").factory("uiGmapWindowsParentModel",["uiGmapIWindowParentModel","uiGmapModelsWatcher","uiGmapPropMap","uiGmapWindowChildModel","uiGmapLinked","uiGmap_async","uiGmapLogger","$timeout","$compile","$http","$templateCache","$interpolate","uiGmapPromise","uiGmapIWindow","uiGmapGmapUtil",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s;return s=function(d){function s(b,c,d,e,g,i){this.gMap=g,this.markersScope=i,this.modelKeyComparison=a(this.modelKeyComparison,this),this.interpolateContent=a(this.interpolateContent,this),this.setChildScope=a(this.setChildScope,this),this.createWindow=a(this.createWindow,this),this.setContentKeys=a(this.setContentKeys,this),this.pieceMeal=a(this.pieceMeal,this),this.createAllNew=a(this.createAllNew,this),this.watchIdKey=a(this.watchIdKey,this),this.createChildScopes=a(this.createChildScopes,this),this.watchOurScope=a(this.watchOurScope,this),this.watchDestroy=a(this.watchDestroy,this),this.onDestroy=a(this.onDestroy,this),this.rebuildAll=a(this.rebuildAll,this),this.doINeedToWipe=a(this.doINeedToWipe,this),this.watchModels=a(this.watchModels,this),this.go=a(this.go,this),s.__super__.constructor.call(this,b,c,d,e,k,l,m,n),this["interface"]=q,this.plurals=new f,_.each(q.scopeKeys,function(a){return function(b){return a[b+"Key"]=void 0}}(this)),this.linked=new h(b,c,d,e),this.contentKeys=void 0,this.isIconVisibleOnClick=void 0,this.firstTime=!0,this.firstWatchModels=!0,this.$log.info(self),this.parentScope=void 0,this.go(b)}return c(s,d),s.include(e),s.prototype.go=function(a){return this.watchOurScope(a),this.doRebuildAll=null!=this.scope.doRebuildAll?this.scope.doRebuildAll:!1,a.$watch("doRebuildAll",function(a){return function(b,c){return b!==c?a.doRebuildAll=b:void 0}}(this)),this.createChildScopes()},s.prototype.watchModels=function(a){var b;return b=null!=this.markersScope?"pluralsUpdate":"models", +a.$watch(b,function(b){return function(c,d){var e;return!_.isEqual(c,d)||b.firstWatchModels?(b.firstWatchModels=!1,b.doRebuildAll||b.doINeedToWipe(a.models)?b.rebuildAll(a,!0,!0):(e=0===b.plurals.length,null!=b.existingPieces?_.last(b.existingPieces._content).then(function(){return b.createChildScopes(e)}):b.createChildScopes(e))):void 0}}(this),!0)},s.prototype.doINeedToWipe=function(a){var b;return b=null!=a?0===a.length:!0,this.plurals.length>0&&b},s.prototype.rebuildAll=function(a,b,c){return this.onDestroy(c).then(function(a){return function(){return b?a.createChildScopes():void 0}}(this))},s.prototype.onDestroy=function(a){return s.__super__.onDestroy.call(this,this.scope),i.promiseLock(this,p.promiseTypes["delete"],void 0,void 0,function(a){return function(){return i.each(a.plurals.values(),function(a){return a.destroy(!0)},i.chunkSizeFrom(a.scope.cleanchunk,!1)).then(function(){var b;return null!=(b=a.plurals)?b.removeAll():void 0})}}(this))},s.prototype.watchDestroy=function(a){return a.$on("$destroy",function(b){return function(){return b.firstWatchModels=!0,b.firstTime=!0,b.rebuildAll(a,!1,!0)}}(this))},s.prototype.watchOurScope=function(a){return _.each(q.scopeKeys,function(b){return function(c){var d;return d=c+"Key",b[d]="function"==typeof a[c]?a[c]():a[c]}}(this))},s.prototype.createChildScopes=function(a){var c,d,e;return null==a&&(a=!0),this.isIconVisibleOnClick=!0,b.isDefined(this.linked.attrs.isiconvisibleonclick)&&(this.isIconVisibleOnClick=this.linked.scope.isIconVisibleOnClick),c=b.isUndefined(this.linked.scope.models),!c||void 0!==this.markersScope&&void 0!==(null!=(d=this.markersScope)?d.plurals:void 0)&&void 0!==(null!=(e=this.markersScope)?e.models:void 0)?null!=this.gMap?null!=this.linked.scope.models?(this.watchIdKey(this.linked.scope),a?this.createAllNew(this.linked.scope,!1):this.pieceMeal(this.linked.scope,!1)):(this.parentScope=this.markersScope,this.watchIdKey(this.parentScope),a?this.createAllNew(this.markersScope,!0,"plurals",!1):this.pieceMeal(this.markersScope,!0,"plurals",!1)):void 0:void this.$log.error("No models to create windows from! Need direct models or models derived from markers!")},s.prototype.watchIdKey=function(a){return this.setIdKey(a),a.$watch("idKey",function(b){return function(c,d){return c!==d&&null==c?(b.idKey=c,b.rebuildAll(a,!0,!0)):void 0}}(this))},s.prototype.createAllNew=function(a,b,c,d){var e;return null==c&&(c="models"),null==d&&(d=!1),this.firstTime&&(this.watchModels(a),this.watchDestroy(a)),this.setContentKeys(a.models),this.didQueueInitPromise(this,a)?void 0:(e=null,i.promiseLock(this,p.promiseTypes.create,"createAllNew",function(a){return e=a},function(d){return function(){return i.each(a.models,function(f){var g,h;return g=b&&null!=(h=d.getItem(a,c,f[d.idKey]))?h.gObject:void 0,e||(!g&&d.markersScope&&j.error("Unable to get gMarker from markersScope!"),d.createWindow(f,g,d.gMap)),e},i.chunkSizeFrom(a.chunk)).then(function(){return d.firstTime=!1})}}(this)))},s.prototype.pieceMeal=function(a,b,c,d){var e,f;return null==c&&(c="models"),null==d&&(d=!0),a.$$destroyed?void 0:(e=null,f=null,null!=a&&this.modelsLength()&&this.plurals.length?i.promiseLock(this,p.promiseTypes.update,"pieceMeal",function(a){return e=a},function(b){return function(){return p.promise(function(){return b.figureOutState(b.idKey,a,b.plurals,b.modelKeyComparison)}).then(function(c){return f=c,i.each(f.removals,function(a){return null!=a?(b.plurals.remove(a.id),null!=a.destroy&&a.destroy(!0),e):void 0},i.chunkSizeFrom(a.chunk))}).then(function(){return i.each(f.adds,function(d){var f,g;if(f=null!=(g=b.getItem(a,c,d[b.idKey]))?g.gObject:void 0,!f)throw"Gmarker undefined";return b.createWindow(d,f,b.gMap),e})}).then(function(){return i.each(f.updates,function(a){return b.updateChild(a.child,a.model),e},i.chunkSizeFrom(a.chunk))})}}(this)):(j.debug("pieceMeal: rebuildAll"),this.rebuildAll(this.scope,!0,!0)))},s.prototype.setContentKeys=function(a){return this.modelsLength(a)?this.contentKeys=Object.keys(a[0]):void 0},s.prototype.createWindow=function(a,b,c){var d,e,f,h,i,j;return e=this.linked.scope.$new(!1),this.setChildScope(e,a),e.$watch("model",function(a){return function(b,c){return b!==c?a.setChildScope(e,b):void 0}}(this),!0),f={html:function(b){return function(){return b.interpolateContent(b.linked.element.html(),a)}}(this)},this.DEFAULTS=this.scopeOrModelVal(this.optionsKey,this.scope,a)||{},h=this.createWindowOptions(b,e,f.html(),this.DEFAULTS),d=new g({model:a,scope:e,opts:h,isIconVisibleOnClick:this.isIconVisibleOnClick,gMap:c,markerScope:null!=(i=this.markersScope)&&null!=(j=i.plurals.get(a[this.idKey]))?j.scope:void 0,element:f,needToManualDestroy:!1,markerIsVisibleAfterWindowClose:!0,isScopeModel:!0}),null==a[this.idKey]?void this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."):(this.plurals.put(a[this.idKey],d),d)},s.prototype.setChildScope=function(a,b){return _.each(q.scopeKeys,function(c){return function(d){var e,f;return e=d+"Key",f="self"===c[e]?b:b[c[e]],f!==a[d]?a[d]=f:void 0}}(this)),a.model=b},s.prototype.interpolateContent=function(a,b){var c,d,e,f,g,h;if(void 0!==this.contentKeys&&0!==this.contentKeys.length){for(c=o(a),e={},h=this.contentKeys,d=0,g=h.length;g>d;d++)f=h[d],e[f]=b[f];return c(e)}},s.prototype.modelKeyComparison=function(a,b){var c,d;if(d=null!=this.scope.coords?this.scope:this.parentScope,null==d)throw"No scope or parentScope set!";return(c=r.equalCoords(this.evalModelHandle(a,d.coords),this.evalModelHandle(b,d.coords)))?c=_.every(_.without(this["interface"].scopeKeys,"coords"),function(c){return function(e){return c.evalModelHandle(a,d[e])===c.evalModelHandle(b,d[e])}}(this)):c},s}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapCircle",["uiGmapICircle","uiGmapCircleParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapControl",["uiGmapIControl","$http","$templateCache","$compile","$controller","uiGmapGoogleMapApi",function(d,e,f,g,h,i){var j;return j=function(j){function k(){this.link=a(this.link,this),k.__super__.constructor.call(this)}return c(k,j),k.prototype.transclude=!0,k.prototype.link=function(a,c,j,k,l){return i.then(function(c){return function(i){var j,m,n,o;return o=l(),j=l().length>0,!j&&b.isUndefined(a.template)?void c.$log.error("mapControl: could not find a valid template property or elements for transclusion"):(m=b.isDefined(a.index&&!isNaN(parseInt(a.index)))?parseInt(a.index):void 0,n=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_CENTER",i.ControlPosition[n]?d.mapPromise(a,k).then(function(d){var i,k,o;return i=void 0,k=b.element("
"),o=function(a,b,c){return c&&(b[0].index=c),a.controls[google.maps.ControlPosition[n]].push(b[0])},j?l(function(a){return k.append(a),o(d,k,m)}):e.get(a.template,{cache:f}).success(function(c){var d,e;return e=a.$new(),k.append(c),b.isDefined(a.controller)&&(d=h(a.controller,{$scope:e}),k.children().data("$ngControllerController",d)),i=g(k.children())(e)}).error(function(a){return c.$log.error("mapControl: template could not be found")}).then(function(){return o(d,i,m)})}):void c.$log.error("mapControl: invalid position property"))}}(this))},k}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapDragZoom",["uiGmapCtrlHandle","uiGmapPropertyAction",function(a,b){return{restrict:"EMA",transclude:!0,template:'',require:"^uiGmapGoogleMap",scope:{keyboardkey:"=",options:"=",spec:"="},controller:["$scope","$element",function(b,c){return b.ctrlType="uiGmapDragZoom",_.extend(this,a.handle(b,c))}],link:function(c,d,e,f){return a.mapPromise(c,f).then(function(a){var d,e,f;return d=function(b){return a.enableKeyDragZoom(b)},e=new b(function(a,b){return b?d({key:b}):d()}),f=new b(function(a,b){return b?d(b):void 0}),c.$watch("keyboardkey",e.sic("keyboardkey")),e.sic(c.keyboardkey),c.$watch("options",f.sic("options")),f.sic(c.options)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapDrawingManager",["uiGmapIDrawingManager","uiGmapDrawingManagerParentModel",function(a,b){return _.extend(a,{link:function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return new b(a,c,d,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapApiFreeDrawPolygons",["uiGmapLogger","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapDrawFreeHandChildModel","uiGmapLodash",function(b,d,e,f,g){var h;return h=function(d){function h(){return this.link=a(this.link,this),h.__super__.constructor.apply(this,arguments)}return c(h,d),h.include(e),h.prototype.restrict="EMA",h.prototype.replace=!0,h.prototype.require="^uiGmapGoogleMap",h.prototype.scope={polygons:"=",draw:"="},h.prototype.link=function(a,c,d,e){return this.mapPromise(a,e).then(function(c){return function(c){var d,h;return a.polygons?_.isArray(a.polygons)?(d=new f(c,e.getScope()),h=void 0,a.draw=function(){return"function"==typeof h&&h(),d.engage(a.polygons).then(function(){var b;return b=!0,h=a.$watchCollection("polygons",function(a,c){var d;return b||a===c?void(b=!1):(d=g.differenceObjects(c,a),d.forEach(function(a){return a.setMap(null)}))})})}):b.error("Free Draw Polygons must be of type Array!"):b.error("No polygons to bind to!")}}(this))},h}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapICircle",[function(){var a;return a={},{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{center:"=center",radius:"=radius",stroke:"=stroke",fill:"=fill",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=icons",visible:"=",events:"=",control:"=",zIndex:"=zindex"}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIControl",["uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EA",this.replace=!0,this.require="^uiGmapGoogleMap",this.scope={template:"@template",position:"@position",controller:"@controller",index:"@index"},this.$log=c}return a(e,b),e.extend(d),e.prototype.link=function(a,b,c,d){throw new Exception("Not implemented!!")},e}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIDrawingManager",[function(){return{restrict:"EA",replace:!0,require:"^uiGmapGoogleMap",scope:{"static":"@",control:"=",options:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIMarker",["uiGmapBaseObject","uiGmapCtrlHandle",function(b,c){var d;return d=function(b){function d(){this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.replace=!0,this.scope=_.extend(this.scope||{},d.scope)}return a(d,b),d.scope={coords:"=coords",icon:"=icon",click:"&click",options:"=options",events:"=events",fit:"=fit",idKey:"=idkey",control:"=control"},d.scopeKeys=_.keys(d.scope),d.keys=d.scopeKeys,d.extend(c),d}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolygon",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=path",stroke:"=stroke",clickable:"=",draggable:"=",editable:"=",geodesic:"=",fill:"=",icons:"=icons",visible:"=","static":"=",events:"=",zIndex:"=zindex",fit:"=",control:"=control"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIPolyline",["uiGmapGmapUtil","uiGmapBaseObject","uiGmapLogger","uiGmapCtrlHandle",function(b,c,d,e){var f;return f=function(c){function f(){}return a(f,c),f.scope={path:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",geodesic:"=",icons:"=",visible:"=","static":"=",fit:"=",events:"=",zIndex:"=zindex"},f.scopeKeys=_.keys(f.scope),f.include(b),f.extend(e),f.prototype.restrict="EMA",f.prototype.replace=!0,f.prototype.require="^uiGmapGoogleMap",f.prototype.scope=f.scope,f.prototype.DEFAULTS={},f.prototype.$log=d,f}(c)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapIRectangle",[function(){var a;return a={},{restrict:"EMA",require:"^uiGmapGoogleMap",replace:!0,scope:{bounds:"=",stroke:"=",clickable:"=",draggable:"=",editable:"=",fill:"=",visible:"=",events:"="}}}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapIWindow",["uiGmapBaseObject","uiGmapChildEvents","uiGmapCtrlHandle",function(b,c,d){var e;return e=function(b){function e(){this.restrict="EMA",this.template=void 0,this.transclude=!0,this.priority=-100,this.require="^uiGmapGoogleMap",this.replace=!0,this.scope=_.extend(this.scope||{},e.scope)}return a(e,b),e.scope={coords:"=coords",template:"=template",templateUrl:"=templateurl",templateParameter:"=templateparameter",isIconVisibleOnClick:"=isiconvisibleonclick",closeClick:"&closeclick",options:"=options",control:"=control",show:"=show"},e.scopeKeys=_.keys(e.scope),e.include(c),e.extend(d),e}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMap",["$timeout","$q","$log","uiGmapGmapUtil","uiGmapBaseObject","uiGmapCtrlHandle","uiGmapIsReady","uiGmapuuid","uiGmapExtendGWin","uiGmapExtendMarkerClusterer","uiGmapGoogleMapsUtilV3","uiGmapGoogleMapApi","uiGmapEventsHelper","uiGmapGoogleMapObjectManager",function(d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r,s,t;return r=void 0,t=[n,l,m],s=function(e){function h(){this.link=a(this.link,this);var b;b=function(a){var b,c;return c=void 0,a.$on("$destroy",function(){return j.decrement()}),b=i.handle(a),a.ctrlType="Map",a.deferred.promise.then(function(){return t.forEach(function(a){return a.init()})}),b.getMap=function(){return a.map},c=_.extend(this,b)},this.controller=["$scope",b]}return c(h,e),h.include(g),h.prototype.restrict="EMA",h.prototype.transclude=!0,h.prototype.replace=!1,h.prototype.template='
\n
',h.prototype.scope={center:"=",zoom:"=",dragging:"=",control:"=",options:"=",events:"=",eventOpts:"=",styles:"=",bounds:"=",update:"="},h.prototype.link=function(a,c,e){var g;return g=[],a.$on("$destroy",function(){return p.removeEvents(g),"true"===e.recycleMapInstance&&a.map?(q.recycleMapInstance(a.map),a.map=null):void 0}),a.idleAndZoomChanged=!1,o.then(function(h){return function(i){var l,m,n,o,s,t,u,v,w,x,y,z,A,B,C,D,E;if(r={mapTypeId:i.MapTypeId.ROADMAP},B=j.spawn(),z=function(){return B.deferred.resolve({instance:B.instance,map:l})},!b.isDefined(a.center)&&!b.isDefined(a.bounds))return void f.error("angular-google-maps: a center or bounds property is required");if(b.isDefined(a.center)||(a.center=new google.maps.LatLngBounds(h.getCoords(a.bounds.southwest),h.getCoords(a.bounds.northeast)).getCenter()),b.isDefined(a.zoom)||(a.zoom=10),s=b.element(c),s.addClass("angular-google-map"),x={options:{}},e.options&&(x.options=a.options),e.styles&&(x.styles=a.styles),e.type&&(C=e.type.toUpperCase(),google.maps.MapTypeId.hasOwnProperty(C)?x.mapTypeId=google.maps.MapTypeId[e.type.toUpperCase()]:f.error("angular-google-maps: invalid map type '"+e.type+"'")),v=b.extend({},r,x,{center:h.getCoords(a.center),zoom:a.zoom,bounds:a.bounds}),l="true"===e.recycleMapInstance?q.createMapInstance(s.find("div")[1],v):new google.maps.Map(s.find("div")[1],v),l.uiGmap_id=k.generate(),o=!1,g.push(google.maps.event.addListenerOnce(l,"idle",function(){return a.deferred.resolve(l),z()})),n=e.events&&null!=(null!=(y=a.events)?y.blacklist:void 0)?a.events.blacklist:[],_.isString(n)&&(n=[n]),w=function(b,c,d){return _.includes(n,b)?void 0:(d&&d(),g.push(google.maps.event.addListener(l,b,function(){var b;return(null!=(b=a.update)?b.lazy:void 0)?void 0:c()})))},_.includes(n,"all")||(w("dragstart",function(){return o=!0,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),w("dragend",function(){return o=!1,a.$evalAsync(function(a){return null!=a.dragging?a.dragging=o:void 0})}),D=function(b,c){return null==b&&(b=l.center),null==c&&(c=a),_.includes(n,"center")&&(c.center.latitude!==b.lat()&&(c.center.latitude=b.lat()),c.center.longitude!==b.lng())?c.center.longitude=b.lng():void 0},A=!1,w("idle",function(){var b,c,d;return b=l.getBounds(),c=b.getNorthEast(),d=b.getSouthWest(),A=!0,a.$evalAsync(function(b){return D(),_.isUndefined(b.bounds)||_.includes(n,"bounds")||(b.bounds.northeast={latitude:c.lat(),longitude:c.lng()},b.bounds.southwest={latitude:d.lat(),longitude:d.lng()}),_.includes(n,"zoom")||(b.zoom=l.zoom,a.idleAndZoomChanged=!a.idleAndZoomChanged),A=!1})})),b.isDefined(a.events)&&null!==a.events&&b.isObject(a.events)){u=function(b){return function(){return a.events[b].apply(a,[l,b,arguments])}},m=[];for(t in a.events)a.events.hasOwnProperty(t)&&b.isFunction(a.events[t])&&m.push(google.maps.event.addListener(l,t,u(t)));g.concat(m)}return l.getOptions=function(){return v},a.map=l,null!=e.control&&null!=a.control&&(a.control.refresh=function(a){var b,c,d;if(null!=l)return null!=("undefined"!=typeof google&&null!==google&&null!=(c=google.maps)&&null!=(d=c.event)?d.trigger:void 0)&&null!=l&&google.maps.event.trigger(l,"resize"),null!=(null!=a?a.latitude:void 0)&&null!=(null!=a?a.longitude:void 0)?(b=h.getCoords(a),h.isTrue(e.pan)?l.panTo(b):l.setCenter(b)):void 0},a.control.getGMap=function(){return l},a.control.getMapOptions=function(){return v},a.control.getCustomEventListeners=function(){return m},a.control.removeEvents=function(a){return p.removeEvents(a)}),a.$watch("center",function(b,c){var d;if(b!==c&&!A&&(d=h.getCoords(a.center),d.lat()!==l.center.lat()||d.lng()!==l.center.lng()))return o?void 0:(h.validateCoords(b)||f.error("Invalid center for newValue: "+JSON.stringify(b)),h.isTrue(e.pan)&&a.zoom===l.zoom?l.panTo(d):l.setCenter(d))},!0),E=null,a.$watch("zoom",function(b,c){var e,f;if(null!=b&&!_.isEqual(b,c)&&(null!=l?l.getZoom():void 0)!==(null!=a?a.zoom:void 0)&&!A)return null!=E&&d.cancel(E),E=d(function(){return l.setZoom(b)},(null!=(e=a.eventOpts)&&null!=(f=e.debounce)?f.zoomMs:void 0)+20,!1)}),a.$watch("bounds",function(a,b){var c,d,e,g,h,i,j;if(a!==b)return null==(null!=a&&null!=(e=a.northeast)?e.latitude:void 0)||null==(null!=a&&null!=(g=a.northeast)?g.longitude:void 0)||null==(null!=a&&null!=(h=a.southwest)?h.latitude:void 0)||null==(null!=a&&null!=(i=a.southwest)?i.longitude:void 0)?void f.error("Invalid map bounds for new value: "+JSON.stringify(a)):(d=new google.maps.LatLng(a.northeast.latitude,a.northeast.longitude),j=new google.maps.LatLng(a.southwest.latitude,a.southwest.longitude),c=new google.maps.LatLngBounds(j,d),l.fitBounds(c))}),["options","styles"].forEach(function(b){return a.$watch(b,function(a,c){return _.isEqual(a,c)?void 0:("options"===b?x.options=a:x.options[b]=a,null!=l?l.setOptions(x):void 0)},!0)})}}(this))},h}(h)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarker",["uiGmapIMarker","uiGmapMarkerChildModel","uiGmapMarkerManager","uiGmapLogger",function(b,c,d,e){var f;return f=function(f){function g(){g.__super__.constructor.call(this),this.template='',e.info(this)}return a(g,f),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Marker",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h;return h=b.mapPromise(a,g),h.then(function(e){var f,g,h;return f=new d(e),g=_.object(b.keys,b.keys),h=new c({scope:a,model:a,keys:g,gMap:e,doClick:!0,gManager:f,doDrawSelf:!1,trackModel:!1}),h.deferred.promise.then(function(b){return a.deferred.resolve(b)}),null!=a.control?a.control.getGMarkers=f.getGMarkers:void 0}),a.$on("$destroy",function(){var a;return"undefined"!=typeof a&&null!==a&&a.clear(),a=null})},g}(b)}])}.call(this),function(){var a=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapMarkers",["uiGmapIMarker","uiGmapPlural","uiGmapMarkersParentModel","uiGmap_sync","uiGmapLogger",function(b,c,d,e,f){var g;return g=function(e){function g(){g.__super__.constructor.call(this),this.template='',c.extend(this,{doCluster:"=?docluster",clusterOptions:"=clusteroptions",clusterEvents:"=clusterevents",modelsByRef:"=modelsbyref",type:"=?type",typeOptions:"=?typeoptions",typeEvents:"=?typeevents"}),f.info(this)}return a(g,e),g.prototype.controller=["$scope","$element",function(a,c){return a.ctrlType="Markers",_.extend(this,b.handle(a,c))}],g.prototype.link=function(a,e,f,g){var h,i;return h=void 0,i=function(){return a.deferred.resolve()},b.mapPromise(a,g).then(function(b){var j;return j=g.getScope(),j.$watch("idleAndZoomChanged",function(){return _.defer(h.gManager.draw)}),h=new d(a,e,f,b),c.link(a,h),null!=a.control&&(a.control.getGMarkers=function(){var a;return null!=(a=h.gManager)?a.getGMarkers():void 0},a.control.getChildMarkers=function(){return h.plurals}),_.last(h.existingPieces._content).then(function(){return i()})})},g}(b)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").service("uiGmapPlural",[function(){var a;return a=function(a,b){return null!=a.control?(a.control.updateModels=function(c){return a.models=c,b.createChildScopes(!1)},a.control.newModels=function(c){return a.models=c,b.rebuildAll(a,!0,!0)},a.control.clean=function(){return b.rebuildAll(a,!1,!0)},a.control.getPlurals=function(){return b.plurals},a.control.getManager=function(){return b.gManager},a.control.hasManager=function(){return null!=b.gManager==!0},a.control.managerDraw=function(){var b;return a.control.hasManager()&&null!=(b=a.control.getManager())?b.draw():void 0}):void 0},{extend:function(a,b){return _.extend(a.scope||{},b||{},{idKey:"=idkey",doRebuildAll:"=dorebuildall",models:"=models",chunk:"=chunk",cleanchunk:"=cleanchunk",control:"=control"})},link:function(b,c){return a(b,c)}}}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygon",["uiGmapIPolygon","$timeout","uiGmapPolygonChildModel",function(b,d,e){var f;return f=function(d){function f(){return this.link=a(this.link,this),f.__super__.constructor.apply(this,arguments)}return c(f,d),f.prototype.link=function(a,c,d,f){var g,h;return g=[],h=b.mapPromise(a,f),null!=a.control&&(a.control.getInstance=this,a.control.polygons=g,a.control.promise=h),h.then(function(b){return function(c){return g.push(new e({scope:a,attrs:d,gMap:c,defaults:b.DEFAULTS}))}}(this))},f}(b)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolygons",["uiGmapIPolygon","$timeout","uiGmapPolygonsParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polygons: no valid path attribute found"),a.models||e.$log.warn("polygons: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolyline",["uiGmapIPolyline","$timeout","uiGmapPolylineChildModel",function(d,e,f){var g;return g=function(e){function g(){return this.link=a(this.link,this),g.__super__.constructor.apply(this,arguments)}return c(g,e),g.prototype.link=function(a,c,e,g){return d.mapPromise(a,g).then(function(c){return function(d){return!b.isUndefined(a.path)&&null!==a.path&&c.validatePath(a.path)||c.$log.warn("polyline: no valid path attribute found"),new f({scope:a,attrs:e,gMap:d,defaults:c.DEFAULTS})}}(this))},g}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapPolylines",["uiGmapIPolyline","$timeout","uiGmapPolylinesParentModel","uiGmapPlural",function(d,e,f,g){var h;return h=function(d){function e(){this.link=a(this.link,this),e.__super__.constructor.call(this),g.extend(this),this.$log.info(this)}return c(e,d),e.prototype.link=function(a,c,d,e){return e.getScope().deferred.promise.then(function(e){return function(h){return(b.isUndefined(a.path)||null===a.path)&&e.$log.warn("polylines: no valid path attribute found"),a.models||e.$log.warn("polylines: no models found to create from"),g.link(a,new f(a,c,d,h,e.DEFAULTS))}}(this))},e}(d)}])}.call(this),function(){b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapRectangle",["uiGmapLogger","uiGmapGmapUtil","uiGmapIRectangle","uiGmapRectangleParentModel",function(a,b,c,d){return _.extend(c,{link:function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return new d(a,b,c,e)})}})}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindow",["uiGmapIWindow","uiGmapGmapUtil","uiGmapWindowChildModel","uiGmapLodash","uiGmapLogger",function(d,e,f,g,h){var i;return i=function(i){function j(){this.link=a(this.link,this),j.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarker"],this.template='',h.debug(this),this.childWindows=[]}return c(j,i),j.include(e),j.prototype.link=function(a,c,e,f){var g,h;return g=f.length>1&&null!=f[1]?f[1]:void 0,h=null!=g?g.getScope():void 0,this.mapPromise=d.mapPromise(a,f[0]),this.mapPromise.then(function(d){return function(f){var i;return i=!0,b.isDefined(e.isiconvisibleonclick)&&(i=a.isIconVisibleOnClick),g?h.deferred.promise.then(function(b){return d.init(a,c,i,f,h)}):void d.init(a,c,i,f)}}(this))},j.prototype.init=function(a,b,c,d,e){var h,i,j,k,l;return i=null!=a.options?a.options:{},k=null!=a&&this.validateCoords(a.coords),null!=(null!=e?e.getGMarker:void 0)&&(j=e.getGMarker()),l=k?this.createWindowOptions(j,a,b.html(),i):i,null!=d&&(h=new f({scope:a,opts:l,isIconVisibleOnClick:c,gMap:d,markerScope:e,element:b}),this.childWindows.push(h),a.$on("$destroy",function(a){return function(){return a.childWindows=g.withoutObjects(a.childWindows,[h],function(a,b){return a.scope.$id===b.scope.$id}),a.childWindows.length=0}}(this))),null!=a.control&&(a.control.getGWindows=function(a){return function(){return a.childWindows.map(function(a){return a.gObject})}}(this),a.control.getChildWindows=function(a){return function(){return a.childWindows}}(this),a.control.getPlurals=a.control.getChildWindows,a.control.showWindow=function(a){return function(){return a.childWindows.map(function(a){return a.showWindow()})}}(this),a.control.hideWindow=function(a){return function(){return a.childWindows.map(function(a){return a.hideWindow()})}}(this)),null!=this.onChildCreation&&null!=h?this.onChildCreation(h):void 0},j}(d)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},c=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d={}.hasOwnProperty;b.module("uiGmapgoogle-maps.directives.api").factory("uiGmapWindows",["uiGmapIWindow","uiGmapPlural","uiGmapWindowsParentModel","uiGmapPromise","uiGmapLogger",function(b,d,e,f,g){var h;return h=function(b){function h(){this.link=a(this.link,this),h.__super__.constructor.call(this),this.require=["^uiGmapGoogleMap","^?uiGmapMarkers"],this.template='',d.extend(this),g.debug(this)}return c(h,b),h.prototype.link=function(a,b,c,d){var e,g,h;return e=d[0].getScope(),g=d.length>1&&null!=d[1]?d[1]:void 0,h=null!=g?g.getScope():void 0,e.deferred.promise.then(function(e){return function(g){var i,j;return i=(null!=h&&null!=(j=h.deferred)?j.promise:void 0)||f.resolve(),i.then(function(){var f,i;return f=null!=(i=e.parentModel)?i.existingPieces:void 0,f?f.then(function(){return e.init(a,b,c,d,g,h)}):e.init(a,b,c,d,g,h)})}}(this))},h.prototype.init=function(a,b,c,f,g,h){var i;return i=new e(a,b,c,f,g,h),d.link(a,i),null!=a.control?(a.control.getGWindows=function(){return i.plurals.map(function(a){return a.gObject})},a.control.getChildWindows=function(){return i.plurals}):void 0},h}(b)}]); +}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap",["uiGmapMap",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarker",["$timeout","uiGmapMarker",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMarkers",["$timeout","uiGmapMarkers",function(a,b){return new b(a)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygon",["uiGmapPolygon",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapCircle",["uiGmapCircle",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolyline",["uiGmapPolyline",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolylines",["uiGmapPolylines",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapRectangle",["uiGmapLogger","uiGmapRectangle",function(a,b){return b}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindow",["$timeout","$compile","$http","$templateCache","uiGmapWindow",function(a,b,c,d,e){return new e(a,b,c,d)}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapWindows",["$timeout","$compile","$http","$templateCache","$interpolate","uiGmapWindows",function(a,b,c,d,e,f){return new f(a,b,c,d,e)}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapLayer",["$timeout","uiGmapLogger","uiGmapLayerParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={show:"=show",type:"=type",namespace:"=namespace",options:"=options",onCreated:"&oncreated"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return null!=a.onCreated?new d(a,b,c,e,a.onCreated):new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapMapControl",["uiGmapControl",function(a){return new a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDragZoom",["uiGmapDragZoom",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapDrawingManager",["uiGmapDrawingManager",function(a){return a}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapFreeDrawPolygons",["uiGmapApiFreeDrawPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapMapType",["$timeout","uiGmapLogger","uiGmapMapTypeParentModel",function(b,c,d){var e;return new(e=function(){function b(){this.link=a(this.link,this),this.$log=c,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template='',this.replace=!0,this.scope={show:"=show",options:"=options",refresh:"=refresh",id:"@"}}return b.prototype.link=function(a,b,c,e){return e.getScope().deferred.promise.then(function(e){return function(e){return new d(a,b,c,e)}}(this))},b}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapPolygons",["uiGmapPolygons",function(a){return new a}])}.call(this),function(){var a=function(a,b){return function(){return a.apply(b,arguments)}};b.module("uiGmapgoogle-maps").directive("uiGmapSearchBox",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapSearchBoxParentModel","$http","$templateCache","$compile",function(c,d,e,f,g,h){var i;return new(i=function(){function i(){this.link=a(this.link,this),this.$log=d,this.restrict="EMA",this.require="^uiGmapGoogleMap",this.priority=-1,this.transclude=!0,this.template="",this.replace=!0,this.scope={template:"=template",events:"=events",position:"=?position",options:"=?options",parentdiv:"=?parentdiv",ngModel:"=?"}}return i.prototype.require="ngModel",i.prototype.link=function(a,d,i,j){return c.then(function(c){return function(k){return null==a.template&&(g.put("uigmap-searchbox-default.tpl.html",''),a.template="uigmap-searchbox-default.tpl.html"),f.get(a.template,{cache:g}).success(function(f){return b.isUndefined(a.events)?void c.$log.error("searchBox: the events property is required"):j.getScope().deferred.promise.then(function(g){var j;return j=b.isDefined(a.position)?a.position.toUpperCase().replace(/-/g,"_"):"TOP_LEFT",k.ControlPosition[j]?new e(a,d,i,g,j,h(f)(a)):void c.$log.error("searchBox: invalid position property")})})}}(this))},i}())}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapShow",["$animate","uiGmapLogger",function(a,c){return{scope:{uiGmapShow:"=",uiGmapAfterShow:"&",uiGmapAfterHide:"&"},link:function(d,e){var f,g,h;return f=function(b,c){return a[b](e,"ng-hide").then(function(){return c()})},g=function(b,c){return a[b](e,"ng-hide",c)},h=function(a,d){return b.version.major>1?c.error("uiGmapShow is not supported for Angular Major greater than 1.\nYour Major is "+b.version.major+'"'):1===b.version.major&&b.version.minor<3?g(a,d):f(a,d)},d.$watch("uiGmapShow",function(a){return a&&h("removeClass",d.uiGmapAfterShow),a?void 0:h("addClass",d.uiGmapAfterHide)})}}}])}.call(this),function(){b.module("uiGmapgoogle-maps").directive("uiGmapStreetViewPanorama",["uiGmapGoogleMapApi","uiGmapLogger","uiGmapGmapUtil","uiGmapEventsHelper",function(a,c,d,e){var f;return f="uiGmapStreetViewPanorama",{restrict:"EMA",template:'
',replace:!0,scope:{focalcoord:"=",radius:"=?",events:"=?",options:"=?",control:"=?",povoptions:"=?",imagestatus:"="},link:function(g,h,i){return a.then(function(a){return function(a){var i,j,k,l,m,n,o,p,q,r;return p=void 0,r=void 0,k=!1,n=void 0,o=null,q=null,i=function(){return e.removeEvents(n),null!=p&&(p.unbind("position"),p.setVisible(!1)),null!=r?(null!=(null!=r?r.setVisible:void 0)&&r.setVisible(!1),r=void 0):void 0},m=function(a,c){var d;return d=google.maps.geometry.spherical.computeHeading(a,c),k=!0,g.radius=g.radius||50,q=b.extend({heading:d,zoom:1,pitch:0},g.povoptions||{}),o=o=b.extend({navigationControl:!1,addressControl:!1,linksControl:!1,position:a,pov:q,visible:!0},g.options||{}),k=!1},j=function(){var a;return g.focalcoord?g.radius?(i(),null==r&&(r=new google.maps.StreetViewService),g.events&&(n=e.setEvents(r,g,g)),a=d.getCoords(g.focalcoord),r.getPanoramaByLocation(a,g.radius,function(b,c){var d,e,f;return null!=g.imagestatus&&(g.imagestatus=c),null!=(null!=(f=g.events)?f.image_status_changed:void 0)&&g.events.image_status_changed(r,"image_status_changed",g,c),"OK"===c?(e=b.location.latLng,m(e,a),d=h[0],p=new google.maps.StreetViewPanorama(d,o)):void 0})):void c.error(f+": needs a radius to set the camera view from its focal target."):void c.error(f+": focalCoord needs to be defined")},null!=g.control&&(g.control.getOptions=function(){return o},g.control.getPovOptions=function(){return q},g.control.getGObject=function(){return r},g.control.getGPano=function(){return p}),g.$watch("options",function(a,b){return a===b||a===o||k?void 0:j()}),l=!0,g.$watch("focalcoord",function(a,b){return a===b&&!l||null==a?void 0:(l=!1,j())}),g.$on("$destroy",function(){return i()})}}(this))}}}])}.call(this),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapuuid",function(){function a(){}return a.generate=function(){var b=a._gri,c=a._ha;return c(b(32),8)+"-"+c(b(16),4)+"-"+c(16384|b(12),4)+"-"+c(32768|b(14),4)+"-"+c(b(48),12)},a._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<0;d>>>=1,e+=e)1&d&&(c=e+c);return c},a}),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapGoogleMapsUtilV3",function(){return{init:_.once(function(){+function(){function b(a,c){a.getMarkerClusterer().extend(b,google.maps.OverlayView),this.cluster_=a,this.className_=a.getMarkerClusterer().getClusterClass(),this.styles_=c,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(a.getMap())}function d(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinimumClusterSize(),this.averageCenter_=a.getAverageCenter(),this.hideLabel_=a.getHideLabel(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new b(this,a.getStyles())}function e(a,b,c){this.extend(e,google.maps.OverlayView),b=b||[],c=c||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=c.gridSize||60,this.minClusterSize_=c.minimumClusterSize||2,this.maxZoom_=c.maxZoom||null,this.styles_=c.styles||[],this.title_=c.title||"",this.zoomOnClick_=!0,void 0!==c.zoomOnClick&&(this.zoomOnClick_=c.zoomOnClick),this.averageCenter_=!1,void 0!==c.averageCenter&&(this.averageCenter_=c.averageCenter),this.ignoreHidden_=!1,void 0!==c.ignoreHidden&&(this.ignoreHidden_=c.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==c.enableRetinaIcons&&(this.enableRetinaIcons_=c.enableRetinaIcons),this.hideLabel_=!1,void 0!==c.hideLabel&&(this.hideLabel_=c.hideLabel),this.imagePath_=c.imagePath||e.IMAGE_PATH,this.imageExtension_=c.imageExtension||e.IMAGE_EXTENSION,this.imageSizes_=c.imageSizes||e.IMAGE_SIZES,this.calculator_=c.calculator||e.CALCULATOR,this.batchSize_=c.batchSize||e.BATCH_SIZE,this.batchSizeIE_=c.batchSizeIE||e.BATCH_SIZE_IE,this.clusterClass_=c.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function f(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===a.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),"undefined"==typeof a.visible&&("undefined"==typeof a.isHidden?a.visible=!0:a.visible=!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.alignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}function g(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a}function h(a,b,c){this.marker_=a,this.handCursorURL_=a.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=h.getSharedCross(b)}function i(a){a=a||{},a.labelContent=a.labelContent||"",a.labelAnchor=a.labelAnchor||new google.maps.Point(0,0),a.labelClass=a.labelClass||"markerLabels",a.labelStyle=a.labelStyle||{},a.labelInBackground=a.labelInBackground||!1,"undefined"==typeof a.labelVisible&&(a.labelVisible=!0),"undefined"==typeof a.raiseOnDrag&&(a.raiseOnDrag=!0),"undefined"==typeof a.clickable&&(a.clickable=!0),"undefined"==typeof a.draggable&&(a.draggable=!1),"undefined"==typeof a.optimized&&(a.optimized=!1),a.crossImage=a.crossImage||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",a.handCursor=a.handCursor||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",a.optimized=!1,this.label=new h(this,a.crossImage,a.handCursor),google.maps.Marker.apply(this,arguments)}function j(a){var b=a||{};this.ready_=!1,this.dragging_=!1,a.visible==c&&(a.visible=!0),a.shadow==c&&(a.shadow="7px -3px 5px rgba(88,88,88,0.7)"),a.anchor==c&&(a.anchor=k.BOTTOM),this.setValues(b)}b.prototype.onAdd=function(){var a,b,c=this;this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){b=a}),google.maps.event.addDomListener(this.div_,"mousedown",function(){a=!0,b=!1}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},b.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},b.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=a.x+"px"}},b.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},b.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].trim(),10),d=parseInt(b[1].trim(),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="",this.div_.innerHTML=a+"
"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"
",this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0},b.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},b.prototype.setCenter=function(a){this.center_=a},b.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+this.width_+"px; height: "+this.height_+"px;"),b.join("")},b.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},d.prototype.getSize=function(){return this.markers_.length},d.prototype.getMarkers=function(){return this.markers_},d.prototype.getCenter=function(){return this.center_},d.prototype.getMap=function(){return this.map_},d.prototype.getMarkerClusterer=function(){return this.markerClusterer_},d.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;ad)a.getMap()!==this.map_&&a.setMap(this.map_);else if(cb;b++)this.markers_[b].setMap(null);else a.setMap(null);return!0},d.prototype.isMarkerInClusterBounds=function(a){return this.bounds_.contains(a.getPosition())},d.prototype.calculateBounds_=function(){var a=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(a)},d.prototype.updateIcon_=function(){var a=this.markers_.length,b=this.markerClusterer_.getMaxZoom();if(null!==b&&this.map_.getZoom()>b)return void this.clusterIcon_.hide();if(ab;b++)if(a===this.markers_[b])return!0;return!1},e.prototype.onAdd=function(){var a=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){a.resetViewport_(!1),(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){a.redraw_()})]},e.prototype.onRemove=function(){var a;for(a=0;a0))for(a=0;ac&&(g=c,h=e));h&&h.isMarkerInClusterBounds(a)?h.addMarker(a):(e=new d(this),e.addMarker(a),this.clusters_.push(e))},e.prototype.createClusters_=function(a){var b,c,d,e=this;if(this.ready_){0===a&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),d=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;g>b;b++)c=this.markers_[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(gthis.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(c=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-c.left-c.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],b=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;ag&&(d=o.x+k+i+m-g),this.alignBottom_?o.y<-j+n+l?e=o.y+j-n-l:o.y+j+n>h&&(e=o.y+j+n-h):o.y<-j+n?e=o.y+j-n:o.y+l+j+n>h&&(e=o.y+l+j+n-h),0!==d||0!==e){b.getCenter();b.panBy(d,e)}}},f.prototype.setBoxStyle_=function(){var a,b;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",b=this.boxStyle_;for(a in b)b.hasOwnProperty(a)&&(this.div_.style[a]=b[a]);this.div_.style.WebkitTransform="translateZ(0)","undefined"!=typeof this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},f.prototype.getBoxWidths_=function(){var a,b={top:0,bottom:0,left:0,right:0},c=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=c.ownerDocument.defaultView.getComputedStyle(c,""),a&&(b.top=parseInt(a.borderTopWidth,10)||0,b.bottom=parseInt(a.borderBottomWidth,10)||0,b.left=parseInt(a.borderLeftWidth,10)||0,b.right=parseInt(a.borderRightWidth,10)||0)):document.documentElement.currentStyle&&c.currentStyle&&(b.top=parseInt(c.currentStyle.borderTopWidth,10)||0,b.bottom=parseInt(c.currentStyle.borderBottomWidth,10)||0,b.left=parseInt(c.currentStyle.borderLeftWidth,10)||0,b.right=parseInt(c.currentStyle.borderRightWidth,10)||0),b},f.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},f.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},f.prototype.setOptions=function(a){"undefined"!=typeof a.boxClass&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),"undefined"!=typeof a.boxStyle&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),"undefined"!=typeof a.content&&this.setContent(a.content),"undefined"!=typeof a.disableAutoPan&&(this.disableAutoPan_=a.disableAutoPan),"undefined"!=typeof a.maxWidth&&(this.maxWidth_=a.maxWidth),"undefined"!=typeof a.pixelOffset&&(this.pixelOffset_=a.pixelOffset),"undefined"!=typeof a.alignBottom&&(this.alignBottom_=a.alignBottom),"undefined"!=typeof a.position&&this.setPosition(a.position),"undefined"!=typeof a.zIndex&&this.setZIndex(a.zIndex),"undefined"!=typeof a.closeBoxMargin&&(this.closeBoxMargin_=a.closeBoxMargin),"undefined"!=typeof a.closeBoxURL&&(this.closeBoxURL_=a.closeBoxURL),"undefined"!=typeof a.infoBoxClearance&&(this.infoBoxClearance_=a.infoBoxClearance),"undefined"!=typeof a.isHidden&&(this.isHidden_=a.isHidden),"undefined"!=typeof a.visible&&(this.isHidden_=!a.visible),"undefined"!=typeof a.enableEventPropagation&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw(); +},f.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),"undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px","undefined"==typeof a.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},f.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},f.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),google.maps.event.trigger(this,"zindex_changed")},f.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},f.prototype.getContent=function(){return this.content_},f.prototype.getPosition=function(){return this.position_},f.prototype.getZIndex=function(){return this.zIndex_},f.prototype.getVisible=function(){var a;return a="undefined"==typeof this.getMap()||null===this.getMap()?!1:!this.isHidden_},f.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},f.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},f.prototype.open=function(a,b){var c=this;b&&(this.position_=b.getPosition(),this.moveListener_=google.maps.event.addListener(b,"position_changed",function(){c.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},f.prototype.close=function(){var a;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;ae;e++)this.veilDiv_[e]=document.createElement("div"),this.veilDiv_[e].onselectstart=function(){return!1},i(this.veilDiv_[e].style,{backgroundColor:"gray",opacity:.25,cursor:"crosshair"}),i(this.veilDiv_[e].style,c.paneStyle),i(this.veilDiv_[e].style,c.veilStyle),i(this.veilDiv_[e].style,{position:"absolute",overflow:"hidden",display:"none"}),"shift"===this.key_&&(this.veilDiv_[e].style.MozUserSelect="none"),j(this.veilDiv_[e]),"transparent"===this.veilDiv_[e].style.backgroundColor&&(this.veilDiv_[e].style.backgroundColor="white",j(this.veilDiv_[e],0)),this.map_.getDiv().appendChild(this.veilDiv_[e]);this.noZoom_=c.noZoom||!1,this.visualEnabled_=c.visualEnabled||!1,this.visualClass_=c.visualClass||"",this.visualPosition_=c.visualPosition||google.maps.ControlPosition.LEFT_TOP,this.visualPositionOffset_=c.visualPositionOffset||new google.maps.Size(35,0),this.visualPositionIndex_=c.visualPositionIndex||null,this.visualSprite_=c.visualSprite||"http"+("https:"===document.location.protocol?"s":"")+"://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png",this.visualSize_=c.visualSize||new google.maps.Size(20,20),this.visualTips_=c.visualTips||{},this.visualTips_.off=this.visualTips_.off||"Turn on drag zoom mode",this.visualTips_.on=this.visualTips_.on||"Turn off drag zoom mode",this.boxDiv_=document.createElement("div"),i(this.boxDiv_.style,{border:"4px solid #736AFF"}),i(this.boxDiv_.style,c.boxStyle),i(this.boxDiv_.style,{position:"absolute",display:"none"}),j(this.boxDiv_),this.map_.getDiv().appendChild(this.boxDiv_),this.boxBorderWidths_=d(this.boxDiv_),this.listeners_=[google.maps.event.addDomListener(document,"keydown",function(a){g.onKeyDown_(a)}),google.maps.event.addDomListener(document,"keyup",function(a){g.onKeyUp_(a)}),google.maps.event.addDomListener(this.veilDiv_[0],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[1],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[2],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(this.veilDiv_[3],"mousedown",function(a){g.onMouseDown_(a)}),google.maps.event.addDomListener(document,"mousedown",function(a){g.onMouseDownDocument_(a)}),google.maps.event.addDomListener(document,"mousemove",function(a){g.onMouseMove_(a)}),google.maps.event.addDomListener(document,"mouseup",function(a){g.onMouseUp_(a)}),google.maps.event.addDomListener(a,"scroll",f)],this.hotKeyDown_=!1,this.mouseDown_=!1,this.dragging_=!1,this.startPt_=null,this.endPt_=null,this.mapWidth_=null,this.mapHeight_=null,this.mousePosn_=null,this.mapPosn_=null,this.visualEnabled_&&(this.buttonDiv_=this.initControl_(this.visualPositionOffset_),null!==this.visualPositionIndex_&&(this.buttonDiv_.index=this.visualPositionIndex_),this.map_.controls[this.visualPosition_].push(this.buttonDiv_),this.controlIndex_=this.map_.controls[this.visualPosition_].length-1)},b.prototype.initControl_=function(a){var b,c,d=this;return b=document.createElement("div"),b.className=this.visualClass_,b.style.position="relative",b.style.overflow="hidden",b.style.height=this.visualSize_.height+"px",b.style.width=this.visualSize_.width+"px",b.title=this.visualTips_.off,c=document.createElement("img"),c.src=this.visualSprite_,c.style.position="absolute",c.style.left=-(2*this.visualSize_.width)+"px",c.style.top="0px",b.appendChild(c),b.onclick=function(a){d.hotKeyDown_=!d.hotKeyDown_,d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on,d.activatedByControl_=!0,google.maps.event.trigger(d,"activate")):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off,google.maps.event.trigger(d,"deactivate")),d.onMouseMove_(a)},b.onmouseover=function(){d.buttonDiv_.firstChild.style.left=-(1*d.visualSize_.width)+"px"},b.onmouseout=function(){d.hotKeyDown_?(d.buttonDiv_.firstChild.style.left=-(0*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.on):(d.buttonDiv_.firstChild.style.left=-(2*d.visualSize_.width)+"px",d.buttonDiv_.title=d.visualTips_.off)},b.ondragstart=function(){return!1},i(b.style,{cursor:"pointer",marginTop:a.height+"px",marginLeft:a.width+"px"}),b},b.prototype.isHotKeyDown_=function(b){var c;if(b=b||a.event,c=b.shiftKey&&"shift"===this.key_||b.altKey&&"alt"===this.key_||b.ctrlKey&&"ctrl"===this.key_,!c)switch(b.keyCode){case 16:"shift"===this.key_&&(c=!0);break;case 17:"ctrl"===this.key_&&(c=!0);break;case 18:"alt"===this.key_&&(c=!0)}return c},b.prototype.isMouseOnMap_=function(){var a=this.mousePosn_;if(a){var b=this.mapPosn_,c=this.map_.getDiv();return a.left>b.left&&a.leftb.top&&a.top=0?g>f:f>g;b=g>=0?++f:--f)if(c[b]===e){h=[c[c.length-1],c[b]],c[b]=h[0],c[c.length-1]=h[1],c.pop();break}return c.concat(d)},a.prototype.forEachNode=function(a){var b,d,e;e=this._nodes;for(b in e)c.call(e,b)&&(d=e[b],a(d,b))},a.prototype.forEachEdge=function(a){var b,d,e,f,g,h;g=this._nodes;for(d in g)if(c.call(g,d)){e=g[d],h=e._outEdges;for(f in h)c.call(h,f)&&(b=h[f],a(b))}},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e;b=function(){function a(a){var b,c,d,e,f,g;for(null==a&&(a=[]),this._data=[void 0],d=0,f=a.length;f>d;d++)c=a[d],null!=c&&this._data.push(c);if(this._data.length>1)for(b=e=2,g=this._data.length;g>=2?g>e:e>g;b=g>=2?++e:--e)this._upHeap(b);this.size=this._data.length-1}return a.prototype.add=function(a){return null!=a?(this._data.push(a),this._upHeap(this._data.length-1),this.size++,a):void 0},a.prototype.removeMin=function(){var a;if(1!==this._data.length)return this.size--,2===this._data.length?this._data.pop():(a=this._data[1],this._data[1]=this._data.pop(),this._downHeap(),a)},a.prototype.peekMin=function(){return this._data[1]},a.prototype._upHeap=function(a){var b,c;for(b=this._data[a];this._data[a]1;)c=[this._data[d(a)],this._data[a]],this._data[a]=c[0],this._data[d(a)]=c[1],a=d(a)},a.prototype._downHeap=function(){var a,b,d;for(a=1;c(a>1},c=function(a){return a<<1},e=function(a){return(a<<1)+1},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this.head={prev:void 0,value:void 0,next:void 0},this.tail={prev:void 0,value:void 0,next:void 0},this.size=0,c=0,d=a.length;d>c;c++)b=a[c],this.add(b)}return a.prototype.at=function(a){var b,c,d,e,f;if(-this.size<=a&&a=d;c=d+=1)b=b.next;else for(b=this.tail,c=e=1,f=this.size-a-1;f>=e;c=e+=1)b=b.prev;return b}},a.prototype.add=function(a,b){var c,d,e,f,g;return null==b&&(b=this.size),-this.size<=b&&b<=this.size?(d={value:a},b=this._adjust(b),0===this.size?this.head=d:0===b?(e=[d,this.head,d],this.head.prev=e[0],d.next=e[1],this.head=e[2]):(c=this.at(b-1),f=[c.next,d,d,c],d.next=f[0],null!=(g=c.next)?g.prev=f[1]:void 0,c.next=f[2],d.prev=f[3]),b===this.size&&(this.tail=d),this.size++,a):void 0},a.prototype.removeAt=function(a){var b,c,d;return null==a&&(a=this.size-1),-this.size<=a&&a=this.size)return-1;for(b=Math.max(0,this._adjust(b)),c=this.at(b),d=b;c&&c.value!==a;)c=c.next,d++;return d===this.size?-1:d},a.prototype._adjust=function(a){return 0>a?this.size+a:a},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f={}.hasOwnProperty;c="_mapId_",b=function(){function a(b){var c,d;this._content={},this._itemId=0,this._id=a._newMapId(),this.size=0;for(c in b)f.call(b,c)&&(d=b[c],this.set(c,d))}return a._mapIdTracker=0,a._newMapId=function(){return this._mapIdTracker++},a.prototype.hash=function(a,b){var f,g;return null==b&&(b=!1),g=d(a),e(a)?(f=c+this._id,b&&!a[f]&&(a[f]=this._itemId++),f+"_"+a[f]):g+"_"+a},a.prototype.set=function(a,b){return this.has(a)||this.size++,this._content[this.hash(a,!0)]=[b,a],b},a.prototype.get=function(a){var b;return null!=(b=this._content[this.hash(a)])?b[0]:void 0},a.prototype.has=function(a){return this.hash(a)in this._content},a.prototype["delete"]=function(a){var b;return b=this.hash(a),b in this._content?(delete this._content[b],e(a)&&delete a[c+this._id],this.size--,!0):!1},a.prototype.forEach=function(a){var b,c,d;d=this._content;for(b in d)f.call(d,b)&&(c=d[b],a(c[1],c[0]))},a}(),e=function(a){var b,c,e,f,g;for(b=["Boolean","Number","String","Undefined","Null","RegExp","Function"],e=d(a),f=0,g=b.length;g>f;f++)if(c=b[f],e===c)return!1;return!0},d=function(a){return Object.prototype.toString.apply(a).match(/\[object (.+)\]/)[1]},a.exports=b}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){null==a&&(a=[]),this._content=a,this._dequeueIndex=0,this.size=this._content.length}return a.prototype.enqueue=function(a){return this.size++,this._content.push(a),a},a.prototype.dequeue=function(){var a;if(0!==this.size)return this.size--,a=this._content[this._dequeueIndex],this._dequeueIndex++,2*this._dequeueIndex>this._content.length&&(this._content=this._content.slice(this._dequeueIndex),this._dequeueIndex=0),a},a.prototype.peek=function(){return this._content[this._dequeueIndex]},a}(),a.exports=b}).call(this)},function(a,b){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=0,d=1,e=2,h=3,f=1,b=2,g=function(){function a(a){var b,c,d;for(null==a&&(a=[]),this._root,this.size=0,c=0,d=a.length;d>c;c++)b=a[c],null!=b&&this.add(b)}return a.prototype.add=function(a){var g,l,m,n;if(null!=a){if(this.size++,m={value:a,_color:f},this._root){if(l=i(this._root,function(b){return a===b.value?c:ac;c++)b=a[c],this.add(b)}return a.prototype.add=function(a){var b,c,d,f;if(null!=a){for(this.size++,b=this._root,d=0,f=a.length;f>d;d++)c=a[d],null==b[c]&&(b[c]={}),b=b[c];return b[e]=!0,a}},a.prototype.has=function(a){var b,c,d,f;if(null==a)return!1;for(b=this._root,d=0,f=a.length;f>d;d++){if(c=a[d],null==b[c])return!1;b=b[c]}return!!b[e]},a.prototype.longestPrefixOf=function(a){var b,c,d,e,f;if(null==a)return"";for(b=this._root,d="",e=0,f=a.length;f>e&&(c=a[e],null!=b[c]);e++)d+=c,b=b[c];return d},a.prototype.wordsWithPrefix=function(a){var c,d,f,h,i,j,k,l,m,n;if(null==a)return[];for(null!=a||(a=""),k=[],d=this._root,l=0,m=a.length;m>l;l++)if(f=a[l],d=d[f],null==d)return[];for(i=new b,i.enqueue([d,""]);0!==i.size;){n=i.dequeue(),h=n[0],c=n[1],h[e]&&k.push(a+c);for(f in h)g.call(h,f)&&(j=h[f],i.enqueue([j,c+f]))}return k},a.prototype.remove=function(a){var b,c,d,g,h,i,j,k;if(null!=a){for(b=this._root,g=[],h=0,j=a.length;j>h;h++){if(d=a[h],null==b[d])return;b=b[d],g.push([d,b])}if(b[e]){if(this.size--,delete b[e],f(b,1))return a;for(c=i=k=g.length-1;(1>=k?1>=i:i>=1)&&!f(g[c][1],1);c=1>=k?++i:--i)delete g[c-1][1][g[c][0]];return f(this._root[g[0][0]],1)||delete this._root[g[0][0]],a}}},a}(),f=function(a,b){var c,d;if(0===b)return!0;d=0;for(c in a)if(g.call(a,c)&&(d++,d>=b))return!0;return!1},a.exports=d}).call(this)}]),b.module("uiGmapgoogle-maps.wrapped").service("uiGmapMarkerSpiderfier",["uiGmapGoogleMapApi",function(b){var c=this;return+function(){var b={}.hasOwnProperty,c=[].slice;this.OverlappingMarkerSpiderfier=function(){function d(a,c){var d,f,g,h,i,j;this.map=a,null==c&&(c={});for(f in c)b.call(c,f)&&(j=c[f],this[f]=j);for(this.projHelper=new this.constructor.ProjHelper(this.map),this.initMarkerArrays(),this.listeners={},i=["click","zoom_changed","maptypeid_changed"],g=0,h=i.length;h>g;g++)d=i[g],e.addListener(this.map,d,function(a){return function(){return a.unspiderfy()}}(this))}var e,f,g,h,i,j,k,l,m,n,o;for(l=d.prototype,m=[d,l],g=0,j=m.length;j>g;g++)o=m[g],o.VERSION="0.3.3";return f=void 0,e=void 0,k=void 0,n=2*Math.PI,l.keepSpiderfied=!1,l.markersWontHide=!1,l.markersWontMove=!1,l.nearbyDistance=20,l.circleSpiralSwitchover=9,l.circleFootSeparation=23,l.circleStartAngle=n/12,l.spiralFootSeparation=26,l.spiralLengthStart=11,l.spiralLengthFactor=4,l.spiderfiedZIndex=1e3,l.usualLegZIndex=10,l.highlightedLegZIndex=20,l.event="click",l.minZoomLevel=!1,l.legWeight=1.5,l.legColors={usual:{},highlighted:{}},i=l.legColors.usual,h=l.legColors.highlighted,d.initializeGoogleMaps=function(a){return f=a.maps,e=f.event,k=f.MapTypeId,i[k.HYBRID]=i[k.SATELLITE]="#fff",h[k.HYBRID]=h[k.SATELLITE]="#f00",i[k.TERRAIN]=i[k.ROADMAP]="#444",h[k.TERRAIN]=h[k.ROADMAP]="#f00",this.ProjHelper=function(a){return this.setMap(a)},this.ProjHelper.prototype=new f.OverlayView,this.ProjHelper.prototype.draw=function(){}},l.initMarkerArrays=function(){return this.markers=[],this.markerListenerRefs=[]},l.addMarker=function(a){var b;return null!=a._oms?this:(a._oms=!0,b=[e.addListener(a,this.event,function(b){return function(c){return b.spiderListener(a,c)}}(this))],this.markersWontHide||b.push(e.addListener(a,"visible_changed",function(b){return function(){return b.markerChangeListener(a,!1)}}(this))),this.markersWontMove||b.push(e.addListener(a,"position_changed",function(b){return function(){return b.markerChangeListener(a,!0)}}(this))),this.markerListenerRefs.push(b),this.markers.push(a),this)},l.markerChangeListener=function(a,b){return null==a._omsData||!b&&a.getVisible()||null!=this.spiderfying||null!=this.unspiderfying?void 0:this.unspiderfy(b?a:null)},l.getMarkers=function(){return this.markers.slice(0)},l.removeMarker=function(a){var b,c,d,f,g;if(null!=a._omsData&&this.unspiderfy(),b=this.arrIndexOf(this.markers,a),0>b)return this;for(g=this.markerListenerRefs.splice(b,1)[0],c=0,d=g.length;d>c;c++)f=g[c],e.removeListener(f);return delete a._oms,this.markers.splice(b,1),this},l.clearMarkers=function(){var a,b,c,d,f,g,h,i,j;for(this.unspiderfy(),j=this.markers,a=b=0,c=j.length;c>b;a=++b){for(h=j[a],g=this.markerListenerRefs[a],i=0,d=g.length;d>i;i++)f=g[i],e.removeListener(f);delete h._oms}return this.initMarkerArrays(),this},l.addListener=function(a,b){var c;return(null!=(c=this.listeners)[a]?c[a]:c[a]=[]).push(b),this},l.removeListener=function(a,b){var c;return c=this.arrIndexOf(this.listeners[a],b),0>c||this.listeners[a].splice(c,1),this},l.clearListeners=function(a){return this.listeners[a]=[],this},l.trigger=function(){var a,b,d,e,f,g,h,i;for(b=arguments[0],a=2<=arguments.length?c.call(arguments,1):[],h=null!=(g=this.listeners[b])?g:[],i=[],e=0,f=h.length;f>e;e++)d=h[e],i.push(d.apply(null,a));return i},l.generatePtsCircle=function(a,b){var c,d,e,g,h,i,j,k;for(e=this.circleFootSeparation*(2+a),i=e/n,d=n/a,k=[],g=h=0,j=a;j>=0?j>h:h>j;g=j>=0?++h:--h)c=this.circleStartAngle+g*d,k.push(new f.Point(b.x+i*Math.cos(c),b.y+i*Math.sin(c)));return k},l.generatePtsSpiral=function(a,b){var c,d,e,g,h,i,j;for(g=this.spiralLengthStart,c=0,j=[],d=e=0,i=a;i>=0?i>e:e>i;d=i>=0?++e:--e)c+=this.spiralFootSeparation/g+5e-4*d,h=new f.Point(b.x+g*Math.cos(c),b.y+g*Math.sin(c)),g+=n*this.spiralLengthFactor/c,j.push(h);return j},l.spiderListener=function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,q;if(k=null!=b._omsData,k&&this.keepSpiderfied||("mouseover"===this.event?(d=this,e=function(){return d.unspiderfy()},a.clearTimeout(l.timeout),l.timeout=setTimeout(e,3e3)):this.unspiderfy()),k||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",b,c);for(n=[],o=[],m=this.nearbyDistance,p=m*m,j=this.llToPt(b.position),q=this.markers,f=0,g=q.length;g>f;f++)h=q[f],null!=h.map&&h.getVisible()&&(i=this.llToPt(h.position),this.ptDistanceSq(i,j)c&&(e=k[c],!(e!==a&&null!=e.map&&e.getVisible()&&(f=this.llToPt(null!=(l=null!=(m=e._omsData)?m.usualPosition:void 0)?l:e.position),this.ptDistanceSq(f,g)a;a++)h=c[a],f.push({pt:this.llToPt(null!=(d=null!=(e=h._omsData)?e.usualPosition:void 0)?d:h.position),willSpiderfy:!1});return f}.call(this),r=this.markers,b=d=0,e=r.length;e>d;b=++d)if(i=r[b],null!=i.map&&i.getVisible()&&(j=m[b],!j.willSpiderfy))for(s=this.markers,c=n=0,f=s.length;f>n;c=++n)if(k=s[c],c!==b&&null!=k.map&&k.getVisible()&&(l=m[c],(!(b>c)||l.willSpiderfy)&&this.ptDistanceSq(j.pt,l.pt)q;a=++q)h=t[a],m[a].willSpiderfy&&u.push(h);return u},l.makeHighlightListenerFuncs=function(a){return{highlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.highlighted[b.map.mapTypeId],zIndex:b.highlightedLegZIndex})}}(this),unhighlight:function(b){return function(){return a._omsData.leg.setOptions({strokeColor:b.legColors.usual[b.map.mapTypeId],zIndex:b.usualLegZIndex})}}(this)}},l.spiderfy=function(a,b){var c,d,g,h,i,j,k,l,m,n,o;return this.minZoomLevel&&this.map.getZoom()b;b++)l=a[b],d.push(l.markerPt);return d}()),h=n>=this.circleSpiralSwitchover?this.generatePtsSpiral(n,c).reverse():this.generatePtsCircle(n,c),o=function(){var b,c,l;for(l=[],b=0,c=h.length;c>b;b++)g=h[b],d=this.ptToLl(g),m=this.minExtract(a,function(a){return function(b){return a.ptDistanceSq(b.markerPt,g)}}(this)),k=m.marker,j=new f.Polyline({map:this.map,path:[k.position,d],strokeColor:this.legColors.usual[this.map.mapTypeId],strokeWeight:this.legWeight,zIndex:this.usualLegZIndex}),k._omsData={usualPosition:k.position,leg:j},this.legColors.highlighted[this.map.mapTypeId]!==this.legColors.usual[this.map.mapTypeId]&&(i=this.makeHighlightListenerFuncs(k),k._omsData.hightlightListeners={highlight:e.addListener(k,"mouseover",i.highlight),unhighlight:e.addListener(k,"mouseout",i.unhighlight)}),k.setPosition(d),k.setZIndex(Math.round(this.spiderfiedZIndex+g.y)),l.push(k);return l}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",o,b))},l.unspiderfy=function(a){var b,c,d,f,g,h,i;if(null==a&&(a=null),null==this.spiderfied)return this;for(this.unspiderfying=!0,i=[],g=[],h=this.markers,b=0,c=h.length;c>b;b++)f=h[b],null!=f._omsData?(f._omsData.leg.setMap(null),f!==a&&f.setPosition(f._omsData.usualPosition),f.setZIndex(null),d=f._omsData.hightlightListeners,null!=d&&(e.removeListener(d.highlight),e.removeListener(d.unhighlight)),delete f._omsData,i.push(f)):g.push(f);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",i,g),this},l.ptDistanceSq=function(a,b){var c,d;return c=a.x-b.x,d=a.y-b.y,c*c+d*d},l.ptAverage=function(a){var b,c,d,e,g,h;for(g=h=0,b=0,c=a.length;c>b;b++)e=a[b],g+=e.x,h+=e.y;return d=a.length,new f.Point(g/d,h/d)},l.llToPt=function(a){return this.projHelper.getProjection().fromLatLngToDivPixel(a)},l.ptToLl=function(a){return this.projHelper.getProjection().fromDivPixelToLatLng(a)},l.minExtract=function(a,b){var c,d,e,f,g,h,i;for(e=g=0,h=a.length;h>g;e=++g)f=a[e],i=b(f),("undefined"==typeof c||null===c||d>i)&&(d=i,c=e);return a.splice(c,1)[0]},l.arrIndexOf=function(a,b){var c,d,e,f;if(null!=a.indexOf)return a.indexOf(b);for(c=d=0,e=a.length;e>d;c=++d)if(f=a[c],f===b)return c;return-1},d}()}.apply(c),b.then(function(){c.OverlappingMarkerSpiderfier.initializeGoogleMaps(a.google)}),this.OverlappingMarkerSpiderfier}]),b.module("uiGmapgoogle-maps.extensions").service("uiGmapExtendMarkerClusterer",["uiGmapLodash","uiGmapPropMap",function(b,c){return{init:_.once(function(){(function(){var d={}.hasOwnProperty,e=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};a.NgMapCluster=function(a){function d(a){d.__super__.constructor.call(this,a),this.markers_=new c}return e(d,a),d.prototype.addMarker=function(a){var b,c;if(this.isMarkerAlreadyAdded_(a)){var d=this.markers_.get(a.key);if(d.getPosition().lat()==a.getPosition().lat()&&d.getPosition().lon()==a.getPosition().lon())return!1}if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,f=(this.center_.lat()*(e-1)+a.getPosition().lat())/e,g=(this.center_.lng()*(e-1)+a.getPosition().lng())/e;this.center_=new google.maps.LatLng(f,g),this.calculateBounds_()}}else this.center_=a.getPosition(),this.calculateBounds_();return a.isAdded=!0,this.markers_.push(a),b=this.markers_.length,c=this.markerClusterer_.getMaxZoom(),null!==c&&this.map_.getZoom()>c?a.getMap()!==this.map_&&a.setMap(this.map_):b3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length),h=this.markers_.values();for(b=a;g>b;b++)c=h[b],!c.isAdded&&this.isMarkerInBounds_(c,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&c.getVisible())&&this.addToClosestCluster_(c);if(gc&&(f=c,g=d));g&&g.isMarkerInClusterBounds(a)?g.addMarker(a):(d=new NgMapCluster(this),d.addMarker(a),this.clusters_.push(d))},b.prototype.redraw_=function(){this.createClusters_(0)},b.prototype.resetViewport_=function(a){var b;for(b=0;b",this.div_.innerHTML=a+"
"+this.sums_.text+"
","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},b}(MarkerClusterer)}).call(this)})}}])}(window,angular); +//# sourceMappingURL=angular-google-maps-street-view_dev_mapped.min.js.map \ No newline at end of file diff --git a/client/www/lib/angular-google-maps/karma.conf.coffee b/client/www/lib/angular-google-maps/karma.conf.coffee new file mode 100644 index 0000000..2344a1f --- /dev/null +++ b/client/www/lib/angular-google-maps/karma.conf.coffee @@ -0,0 +1,94 @@ + +module.exports = (config) -> + config.set + # base path that will be used to resolve all patterns (eg. files, exclude) + basePath: './' + + # frameworks to use + # available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['jasmine'] + + # preprocess matching files before serving them to the browser + # available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + # 'spec/**/*.coffee': ['coffee'] + 'spec/**/**/*.coffee': ['coffee'] + 'dist/angular-google-maps.js': ['coverage'] + } + + coverageReporter: + reporters:[ + { type : 'html', dir : 'dist/coverage/', subdir: 'dist' } + { type : 'cobertura', dir : 'dist/coverage/', subdir: 'dist' } + ] + + # list of files / patterns to load in the browser + files: [ + # 'https://maps.googleapis.com/maps/api/js?sensor=false' + 'node_modules/phantomjs-polyfill/bind-polyfill.js' + 'bower_components/lodash/lodash.js' + 'bower_components/angular/angular.js' + 'bower_components/angular-mocks/angular-mocks.js' + 'bower_components/angular-simple-logger/dist/angular-simple-logger.min.js' + 'dist/angular-google-maps.js' + 'spec/coffee/bootstrap/bootstrap.coffee' + 'spec/coffee/bootstrap/google-api-mock.coffee' + # 'node_modules/markerclustererplus/dist/markerclusterer.min.js' + # 'node_modules/google-maps-utility-library-v3-infobox/dist/infobox.js' + # 'node_modules/google-maps-utility-library-v3-keydragzoom/dist/keydragzoom.js' + # 'node_modules/google-maps-utility-library-v3-markerwithlabel/dist/markerwithlabel.js' + # 'bower_components/js-rich-marker/src/richmarker.js' + 'spec/coffee/bootstrap/initiator.coffee' + #do not include those specs for jasmine html runner by karma kama_jasmine_runner.html + {pattern:'*coffee', included: false} + 'spec/coffee/**/*.spec.coffee' + ] + + # list of files to exclude + exclude: [ + ] + + # test results reporter to use + # possible values: 'dots', 'progress' + # available reporters: https://npmjs.org/browse/keyword/karma-reporter + # NOTE , TODO 'html' reporter use if you want to hit the karma jasmine runner (frequently causes karma to blow up at the end of run), + # test results reporter to use + # possible values: 'dots', 'progress', 'mocha' + reporters: ['mocha', 'coverage'] + + # web server port + port: 9876 + + # enable / disable colors in the output (reporters and logs) + colors: true + + # level of logging + # possible values: + # - config.LOG_DISABLE + # - config.LOG_ERROR + # - config.LOG_WARN + # - config.LOG_INFO + # - config.LOG_DEBUG + logLevel: config.LOG_INFO + + # enable / disable watching file and executing tests whenever any file changes + autoWatch: false + + # start these browsers + # available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: process.env.KARMA_BROWSERS?.split(',') ? ['PhantomJS']# options Chrome, PhantomJS + #browserNoActivityTimeout: 200000000000000000000000000000000 + # If browser does not capture in given timeout [ms], kill it + captureTimeout: 60000 + # Continuous Integration mode + # if true, Karma captures browsers, runs the tests and exits + singleRun: false + + plugins: [ + 'karma-mocha-reporter' + 'karma-jasmine' + 'karma-coverage' + 'karma-chrome-launcher' + 'karma-phantomjs-launcher' + 'karma-coffee-preprocessor' + ] diff --git a/client/www/lib/angular-google-maps/spec/coffee/bootstrap/bootstrap.coffee b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/bootstrap.coffee new file mode 100644 index 0000000..d7a9fb7 --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/bootstrap.coffee @@ -0,0 +1,51 @@ +###globals angular,_,inject### +#global jasmine protects +beforeEach -> + @googleTemp = window.google + + angular.module('uiGmapgoogle-maps') + .config ($provide) -> + $provide.value('$log', console) + $provide.decorator '$timeout', ($delegate, $browser) -> + $delegate.hasPendingTasks = -> + $browser.deferredFns.length > 0 + + $delegate + + #create + angular.module('uiGmapgoogle-maps.specs', ['uiGmapgoogle-maps']) + #require for testing + module "uiGmapgoogle-maps.specs" + + @injectAll = => + @injects.forEach (toInject) -> + inject toInject + + @injects = [] + + @injects.push (_$rootScope_, $timeout, $q, $browser, $compile, uiGmapPropMap) => + window.PropMap = uiGmapPropMap + @q = $q + @browser = $browser + @rootScope = _$rootScope_ + @scope = angular.extend @rootScope.$new(), @scope or {} + @scope.map = angular.extend @scope.map or {}, + zoom: 12 + center: + longitude: 47 + latitude: -27 + + @timeout = $timeout + @compile = $compile + + @digest = (fn, doCompile = true) => + @compile(@html)(@scope) if @html and @scope and doCompile + + fn() if fn? and _.isFunction fn + while @timeout.hasPendingTasks() + @timeout.flush() + @rootScope.$digest() + +afterEach -> + if @googleTemp? + window.google = @googleTemp diff --git a/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-api-mock.coffee b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-api-mock.coffee new file mode 100644 index 0000000..c0ed88f --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-api-mock.coffee @@ -0,0 +1,487 @@ +###global _:true, angular:true, google:true ### +do -> + capitalize = (s) -> + return s[0].toUpperCase() + s.slice(1) + + class MapObject + getMap: => + @map + setMap: (m) => + @map = m + setOptions: (o) => + @opts = o + + class DraggableObject extends MapObject + setDraggable: (bool) => + @draggable = bool + getDraggable: => + @draggable + + class VisibleObject extends MapObject + setVisible: (bool) => + @visible = bool + getVisible: => + @visible + + class PositionObject extends MapObject + setPosition:(position) => + @position + getPosition: => + @position + + class MockInfoWindow + constructor: -> + @_isOpen = false + + open: (map, anchor) => + @_isOpen = true + return + + close: => + @_isOpen = false + return + + isOpen: (val = undefined) -> + unless val? + return @_isOpen + else + @_isOpen = val + + setContent: (content) => + @content = content + + getContent: => + @content + + getLatLng = -> + class LatLng + constructor: (@y,@x, nowrap) -> + lat: => + @y + lng: => + @x + + getMarker = -> + class Marker extends MapObject + _.extend @::, PositionObject::, DraggableObject::, VisibleObject:: + @instances = 0 + @resetInstances = => + @instances = 0 + @creationSubscribe = (obj, cb) -> + window.google.maps.event.addListener(obj, 'creation', cb) + @creationUnSubscribe = (listener) -> + window.google.maps.event.removeListener listener + + constructor: (opts) -> + super() + if opts? + ['draggable', 'editable', + 'map','visible', 'position'].forEach (o) => + @[o] = opts[o] + Marker.instances += 1 + if window?.google?.maps?.event? + window.google.maps.event.fireAllListeners 'creation', @ + + setOptions: (o) => + super(o) + if o?.position? + @position = o.position + setAnimation:(obj) => + @animation = obj + getAnimation: => + @animation + setIcon: (icon) => + @icon + getIcon: => + @icon + setClickable: (bool) => + @clickable = bool + getClickable: => + @clickable + setZIndex:(z) => + @zIndex = z + getZIndex: => + @zIndex + setTitle: (str) => + @title = str + getTitle: => + @title + setOpacity: (num) => + @opacity = num + getOpacity: => + @opacity + + getCircle = -> + class Circle extends MapObject + _.extend @::, DraggableObject::, VisibleObject:: + @instances = 0 + @resetInstances = => + @instances = 0 + @creationSubscribe = (obj, cb) -> + window.google.maps.event.addListener(obj, 'creation', cb) + @creationUnSubscribe = (listener) -> + window.google.maps.event.removeListener listener + + constructor: (opts) -> + super() + @props = ['draggable', 'editable', 'map','visible', 'radius', 'center'] + @setOptions opts + + #getters + @props.forEach (p) => + @["get#{capitalize p}"] = => + @[p] + + #setters + @props.forEach (p) => + @["set#{capitalize p}"] = (val) => + @[p] = val + if p == "radius" or p == "center" + window.google.maps.event.fireAllListeners "#{p}_changed", @ + + Circle.instances += 1 + @instance = Circle.instances + if window?.google?.maps?.event? + window.google.maps.event.fireAllListeners 'creation', @ + + setOptions: (o) => + super(o) + _.extend @, o + + + + getMap = -> + Map = (opts) -> return + Map::center = + lat: -> 0 + lng: -> 0 + Map::controls = { + TOP_CENTER: [], + TOP_LEFT: [], + TOP_RIGHT: [], + LEFT_TOP: [], + RIGHT_TOP: [], + LEFT_CENTER: [], + RIGHT_CENTER: [], + LEFT_BOTTOM: [], + RIGHT_BOTTOM: [], + BOTTOM_CENTER: [], + BOTTOM_LEFT: [], + BOTTOM_RIGHT: [] + } + Map::overlayMapTypes = new window.google.maps.MVCArray() + Map::getControls = -> return @controls + Map::setOpts = -> return + Map::setOptions = -> return + Map::setZoom = -> return + Map::setCenter = -> return + Map::getCoords = -> return {latitude: 47, longitude: -27} unless Map.getCoords? + Map::getBounds = -> + unless Map.getBounds? + getNorthEast: -> + google.maps.LatLng(47,27) + getSouthWest: -> + google.maps.LatLng(89,100) + return Map + + + getMarkerWithLabel: -> + class MarkerWithLabel extends getMarker() + @instances = 0 + @resetInstances = => + @instances = 0 + constructor: (opts) -> + if opts? + ['draggable', 'editable', 'map','path', 'visible'].forEach (o) => + @[o] = opts[o] + @drawn = false + MarkerWithLabel.instances += 1 + + setAnchor: (anchor) => + @anchor = @anchor + getAnchor: => + @anchor + setMandatoryStyles: (obj) => + @mandatoryStyles = obj + getMandatoryStyles: => + @mandatoryStyles + setStyles:(obj) => + @styles = obj + getStyles: => + @styles + setContent:(content) => + @content = content + getContent: => + @content + draw: => + @drawn = true + onRemove: -> + onAdd: -> + + getPolyline = -> + class Polyline extends DraggableObject + @instances = 0 + @resetInstances = => + @instances = 0 + constructor: (opts) -> + if opts? + ['draggable', 'editable', 'map','path', 'visible'].forEach (o) => + @[o] = opts[o] + Polyline.instances += 1 + + getEditable: => + @editable + getPath: => + @path + setEditable: (bool) => + @editable = bool + setPath: (array) => + @path = array + + getMVCArray = -> + class MVCArray extends Array + @instances = 0 + @resetInstances = => + @instances = 0 + constructor: -> + MVCArray.instances += 1 + super() + clear: -> + @length = 0 + getArray: => + @ + getAt:(i) => + @[i] + getLength: => + @length + insertAt:(i, elem) => + @splice(i, 0, elem) + removeAt:(i) -> + @splice(i,1) + setAt:(i, elem) -> + @[i] = elem + + class GoogleApiMock + constructor: -> + @mocks = [ + @mockAPI + @mockLatLng + @mockLatLngBounds + @mockControlPosition + @mockAnimation + @mockMapTypeId + @mockOverlayView + @mockOverlayView + @mockEvent + @mockInfoWindow + @mockMarker + @mockCircle + @mockMVCArray + @mockPoint + @mockPolygon + @mockPolyline + @mockMap + @mockPlaces + @mockSearchBox + ] + @initAll = -> @mocks.forEach (fn) -> fn?() + + mockAPI: -> + window.google = {} + window.google.maps = {} + + # To make debugging easier, mock everything with exceptions + unmocked = (api) -> () -> throw new String('Unmocked API ' + api) + window.google.maps.Marker = unmocked('Marker') + window.google.maps.event = + clearListeners: unmocked('event.clearListeners') + addListener: unmocked('event.addListener') + removeListener: unmocked('event.removeListener') + window.google.maps.OverlayView = unmocked('OverlayView') + window.google.maps.InfoWindow = unmocked('InfoWindow') + window.google.maps.LatLng = unmocked('LatLng') + window.google.maps.MVCArray = unmocked('MVCArray') + window.google.maps.Point = unmocked('Point') + window.google.maps.LatLngBounds = unmocked('LatLngBounds') + window.google.maps.Polyline = unmocked('Polyline') + + mockPlaces: -> + window.google.maps.places = {} + + mockSearchBox: (SearchBox = () -> return) -> + window.google.maps.places.SearchBox = SearchBox + + mockLatLng: (yours) -> + window.google.maps.LatLng = unless yours then getLatLng() else yours + + mockLatLngBounds: (LatLngBounds = () -> return) -> + if not (LatLngBounds.extend?) + LatLngBounds.prototype.extend = () -> return + + window.google.maps.LatLngBounds = LatLngBounds + + mockMap: => + @mockMapTypeId() + @mockLatLng() + @mockOverlayView() + @mockEvent() + @mockMVCArray() + Map = getMap() + window.google.maps.Map = Map + + mockControlPosition: -> + ControlPosition = + TOP_CENTER: 'TOP_CENTER', + TOP_LEFT: 'TOP_LEFT', + TOP_RIGHT: 'TOP_RIGHT', + LEFT_TOP: 'LEFT_TOP', + RIGHT_TOP: 'RIGHT_TOP', + LEFT_CENTER: 'LEFT_CENTER', + RIGHT_CENTER: 'RIGHT_CENTER', + LEFT_BOTTOM: 'LEFT_BOTTOM', + RIGHT_BOTTOM: 'RIGHT_BOTTOM', + BOTTOM_CENTER: 'BOTTOM_CENTER', + BOTTOM_LEFT: 'BOTTOM_LEFT', + BOTTOM_RIGHT: 'BOTTOM_RIGHT' + window.google.maps.ControlPosition = ControlPosition + + mockAnimation: (Animation = {BOUNCE: 'bounce'}) -> + window.google.maps.Animation = Animation + + mockMapTypeId: (MapTypeId = {ROADMAP: 'roadmap'}) -> + window.google.maps.MapTypeId = MapTypeId + + mockOverlayView: (OverlayView = class OverlayView + setMap: () ->) -> + window.google.maps.OverlayView = OverlayView + + mockEvent: (event = {}) -> + listeners = [] + #mocking google maps event listener + if not event.addListener + event.addListener = (thing, eventName, callBack) -> + found = _.find listeners, (obj) -> + obj.obj == thing + unless found? + toPush = {} + toPush.obj = thing + toPush.events = {} + toPush.events[eventName] = [callBack] + listeners.push toPush + else + if !found.events[eventName] + found.events[eventName] = [callBack] + else + found.events[eventName].push callBack + + event.addListenerOnce = (thing, eventName, callBack) -> + callBack() #forcing immediate return for idle so async api kicks off + event.addListener(thing, eventName, callBack) + + if not event.clearListeners + event.clearListeners = () -> + listeners.length = 0 + + if not event.removeListener + event.removeListener = (item) -> + index = listeners.indexOf(item) + if index != -1 + listeners.splice(index) + + unless event.fireListener + event.fireListener = (thing, eventName) -> + found = _.find listeners, (obj) -> + obj.obj == thing + if found? and found?.events[eventName]? + found.events[eventName].forEach (cb) -> cb(found.obj) + + unless event.normalizedEvents + event.normalizedEvents = -> + ret = _ listeners.map (obj) -> + _.keys(obj.events) + .chain() + .flatten() + .uniq() + .value() + ret + + unless event.fireAllListeners + event.fireAllListeners = (eventName, state) -> + listeners.forEach (obj) -> + if obj.events[eventName]? + obj.events[eventName].forEach (cb) -> cb(state) + + window.google.maps.event = event + return listeners + + mockInfoWindow: (InfoWindow = MockInfoWindow) -> + window.google.maps.InfoWindow = InfoWindow + + mockMarker: (Marker = getMarker()) -> + window.google.maps.Marker = Marker + + mockMVCArray: (impl = getMVCArray()) -> + window.google.maps.MVCArray = impl + + mockCircle: (Circle = getCircle()) -> + window.google.maps.Circle = Circle + + mockPoint: (Point = (x, y) -> return {x: x, y: y}) -> + window.google.maps.Point = Point + + mockPolyline: (impl = getPolyline()) -> + return window.google.maps.Polyline = impl + + mockPolygon: (polygon) -> + return window.google.maps.Polygon = polygon if polygon? + + #https://developers.google.com/maps/documentation/javascript/reference#Polygon + #https://developers.google.com/maps/documentation/javascript/reference#PolygonOptions + window.google.maps.Polygon = (options) -> + @getDraggable = -> + options.draggable + @getEditable = -> + options.editable + @getMap = -> + options.map + @getPath = -> + _.first(options.paths) + @getPaths = -> + options.paths + @getVisible = -> + options.visible + @setOptions = (opts) -> + options = opts + + @setDraggable = (boolean) -> + options.draggable = boolean + @setEditable = (boolean) -> + options.editable = boolean + @setMap = (map) -> + options.map = map + @setPath = (path) -> + if options.paths? and options.paths.length > 0 + options.paths[0] = path + else + options.paths = [] + options.paths.push path + + @setPaths = (paths) -> + options.paths = paths + + @setVisible = (boolean) -> + options.visible = boolean + @ + + getMarker: getMarker + getMap: getMap + getPolyline: getPolyline + getMVCArray: getMVCArray + getLatLng: getLatLng + + (new GoogleApiMock()).initAll() + + angular.module('uiGmapgoogle-maps.mocks', ['uiGmapgoogle-maps']) + .factory('GoogleApiMock', -> + GoogleApiMock + ) diff --git a/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-map-spec-controller.coffee b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-map-spec-controller.coffee new file mode 100644 index 0000000..3857ca2 --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/google-map-spec-controller.coffee @@ -0,0 +1,19 @@ +do -> + module = angular.module("angular-google-maps-specs", ['uiGmapgoogle-maps']) + .controller 'GoogleMapSpecController', ($scope, $timeout, $log) -> + self = @ + @hasRun = false + @map = {} + google.maps.visualRefresh = true + angular.extend $scope, + showTraffic: true, + center: + latitude: 45 + longitude: -73 + zoom: 3, + events: #direct hook to google maps sdk events + tilesloaded: (map, eventName, originalEventArgs) -> + if !self.hasRun + self.map = map + document.gMap = map + self.hasRun = true diff --git a/client/www/lib/angular-google-maps/spec/coffee/bootstrap/initiator.coffee b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/initiator.coffee new file mode 100644 index 0000000..aaa7eca --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/bootstrap/initiator.coffee @@ -0,0 +1,35 @@ +window.uiGmapInitiator = + initDirective: (testSuite, apiSubjectClassName, thingsToInit = ['initAll']) -> + + injects = ['uiGmapLogger'] + if apiSubjectClassName? + injects.push 'uiGmap' + apiSubjectClassName + + module "uiGmapgoogle-maps.mocks" + + inject (GoogleApiMock) -> + testSuite.apiMock = new GoogleApiMock() + thingsToInit.forEach (init) -> + testSuite.apiMock[init]() + + injects.push (Logger, SubjectClass) -> + testSuite.subject = new SubjectClass() if SubjectClass? + testSuite.log = Logger + + spyOn testSuite.log, 'error' + + testSuite.injects.push injects + + testSuite + + initMock: (testSuite, injectedCb) -> + app = window.module "uiGmapgoogle-maps.mocks" + window.module "uiGmapgoogle-maps.directives.api.utils" + apiMock = undefined + testSuite.injects.push (GoogleApiMock) -> + apiMock = new GoogleApiMock() + apiMock.initAll() + injectedCb(apiMock) if injectedCb? and _.isFunction injectedCb + + app: app + apiMock: apiMock diff --git a/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.mockEvents.spec.coffee b/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.mockEvents.spec.coffee new file mode 100644 index 0000000..367f876 --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.mockEvents.spec.coffee @@ -0,0 +1,54 @@ +describe 'Events Mock', -> + subject = null + afterEach -> + google.maps.event.clearListeners() + beforeEach -> + window['uiGmapInitiator'].initMock @, (apiMock) -> + subject = apiMock.getPolyline() + subject.resetInstances() + + @injectAll() + + it 'exists', -> + expect(window.google.maps.event).toBeDefined() + + describe 'flatten', -> + it 'can add a few events and they all are flattened', -> + obj = {} + expectedEvents = [ + 'click' + 'mouseover' + 'mousedown' + ] + expectedEvents.forEach (e) -> + google.maps.event.addListener obj, e, -> + + actualEvents = window.google.maps.event.normalizedEvents() + + expectedEvents.forEach (e) -> + expect(actualEvents).toContain e + + it 'two individul object listeners', -> + obj = {} + obj2 = {} + expectedEvents = [ + 'click' + 'mouseover' + 'mousedown' + ] + expectedEvents2 = [ + 'lol' + 'crap' + 'ROFL' + ] + expectedEvents.forEach (e) -> + google.maps.event.addListener obj, e, -> + + expectedEvents2.forEach (e) -> + google.maps.event.addListener obj2, e, -> + + actualEvents = window.google.maps.event.normalizedEvents() + + expectedEvents + .concat(expectedEvents2).forEach (e) -> + expect(actualEvents).toContain e diff --git a/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.polyline.spec.coffee b/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.polyline.spec.coffee new file mode 100644 index 0000000..d4a76f5 --- /dev/null +++ b/client/www/lib/angular-google-maps/spec/coffee/helpers/helper.polyline.spec.coffee @@ -0,0 +1,16 @@ +describe 'Polyline Mock', -> + subject = null + beforeEach -> + module "uiGmapgoogle-maps.mocks" + inject (GoogleApiMock) -> + apiMock = new GoogleApiMock() + subject = apiMock.getPolyline() + subject.resetInstances() + + it 'constructor exists', -> + expect(subject).toBeDefined() + + it 'can create exists', -> + poly = new subject() + expect(poly).toBeDefined() + expect(subject.instances).toBe(1) diff --git a/client/www/lib/angular-google-maps/spec/js/.keep b/client/www/lib/angular-google-maps/spec/js/.keep new file mode 100644 index 0000000..e69de29 diff --git a/client/www/lib/angular-mocks/.bower.json b/client/www/lib/angular-mocks/.bower.json new file mode 100644 index 0000000..b6c5c08 --- /dev/null +++ b/client/www/lib/angular-mocks/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "angular-mocks", + "version": "1.3.13", + "main": "./angular-mocks.js", + "ignore": [], + "dependencies": { + "angular": "1.3.13" + }, + "homepage": "https://github.com/angular/bower-angular-mocks", + "_release": "1.3.13", + "_resolution": { + "type": "version", + "tag": "v1.3.13", + "commit": "8f53bfda01696e53549fe3266b0a4d220ea9bf77" + }, + "_source": "https://github.com/angular/bower-angular-mocks.git", + "_target": "1.3.13", + "_originalSource": "angular-mocks" +} \ No newline at end of file diff --git a/client/www/lib/angular-mocks/README.md b/client/www/lib/angular-mocks/README.md new file mode 100644 index 0000000..1604ef8 --- /dev/null +++ b/client/www/lib/angular-mocks/README.md @@ -0,0 +1,57 @@ +# packaged angular-mocks + +This repo is for distribution on `npm` and `bower`. The source for this module is in the +[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngMock). +Please file issues and pull requests against that repo. + +## Install + +You can install this package either with `npm` or with `bower`. + +### npm + +```shell +npm install angular-mocks +``` + +The mocks are then available at `node_modules/angular-mocks/angular-mocks.js`. + +Note that this package is not in CommonJS format, so doing `require('angular-mocks')` will +return `undefined`. + +### bower + +```shell +bower install angular-mocks +``` + +The mocks are then available at `bower_components/angular-mocks/angular-mocks.js`. + +## Documentation + +Documentation is available on the +[AngularJS docs site](https://docs.angularjs.org/guide/unit-testing). + +## License + +The MIT License + +Copyright (c) 2010-2012 Google, Inc. http://angularjs.org + +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/client/www/lib/angular-mocks/angular-mocks.js b/client/www/lib/angular-mocks/angular-mocks.js new file mode 100644 index 0000000..dbbe3c6 --- /dev/null +++ b/client/www/lib/angular-mocks/angular-mocks.js @@ -0,0 +1,2396 @@ +/** + * @license AngularJS v1.3.13 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) { + +'use strict'; + +/** + * @ngdoc object + * @name angular.mock + * @description + * + * Namespace from 'angular-mocks.js' which contains testing related code. + */ +angular.mock = {}; + +/** + * ! This is a private undocumented service ! + * + * @name $browser + * + * @description + * This service is a mock implementation of {@link ng.$browser}. It provides fake + * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr, + * cookies, etc... + * + * The api of this service is the same as that of the real {@link ng.$browser $browser}, except + * that there are several helper methods available which can be used in tests. + */ +angular.mock.$BrowserProvider = function() { + this.$get = function() { + return new angular.mock.$Browser(); + }; +}; + +angular.mock.$Browser = function() { + var self = this; + + this.isMock = true; + self.$$url = "http://server/"; + self.$$lastUrl = self.$$url; // used by url polling fn + self.pollFns = []; + + // TODO(vojta): remove this temporary api + self.$$completeOutstandingRequest = angular.noop; + self.$$incOutstandingRequestCount = angular.noop; + + + // register url polling fn + + self.onUrlChange = function(listener) { + self.pollFns.push( + function() { + if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) { + self.$$lastUrl = self.$$url; + self.$$lastState = self.$$state; + listener(self.$$url, self.$$state); + } + } + ); + + return listener; + }; + + self.$$checkUrlChange = angular.noop; + + self.cookieHash = {}; + self.lastCookieHash = {}; + self.deferredFns = []; + self.deferredNextId = 0; + + self.defer = function(fn, delay) { + delay = delay || 0; + self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId}); + self.deferredFns.sort(function(a, b) { return a.time - b.time;}); + return self.deferredNextId++; + }; + + + /** + * @name $browser#defer.now + * + * @description + * Current milliseconds mock time. + */ + self.defer.now = 0; + + + self.defer.cancel = function(deferId) { + var fnIndex; + + angular.forEach(self.deferredFns, function(fn, index) { + if (fn.id === deferId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + self.deferredFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + + /** + * @name $browser#defer.flush + * + * @description + * Flushes all pending requests and executes the defer callbacks. + * + * @param {number=} number of milliseconds to flush. See {@link #defer.now} + */ + self.defer.flush = function(delay) { + if (angular.isDefined(delay)) { + self.defer.now += delay; + } else { + if (self.deferredFns.length) { + self.defer.now = self.deferredFns[self.deferredFns.length - 1].time; + } else { + throw new Error('No deferred tasks to be flushed'); + } + } + + while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) { + self.deferredFns.shift().fn(); + } + }; + + self.$$baseHref = '/'; + self.baseHref = function() { + return this.$$baseHref; + }; +}; +angular.mock.$Browser.prototype = { + +/** + * @name $browser#poll + * + * @description + * run all fns in pollFns + */ + poll: function poll() { + angular.forEach(this.pollFns, function(pollFn) { + pollFn(); + }); + }, + + addPollFn: function(pollFn) { + this.pollFns.push(pollFn); + return pollFn; + }, + + url: function(url, replace, state) { + if (angular.isUndefined(state)) { + state = null; + } + if (url) { + this.$$url = url; + // Native pushState serializes & copies the object; simulate it. + this.$$state = angular.copy(state); + return this; + } + + return this.$$url; + }, + + state: function() { + return this.$$state; + }, + + cookies: function(name, value) { + if (name) { + if (angular.isUndefined(value)) { + delete this.cookieHash[name]; + } else { + if (angular.isString(value) && //strings only + value.length <= 4096) { //strict cookie storage limits + this.cookieHash[name] = value; + } + } + } else { + if (!angular.equals(this.cookieHash, this.lastCookieHash)) { + this.lastCookieHash = angular.copy(this.cookieHash); + this.cookieHash = angular.copy(this.cookieHash); + } + return this.cookieHash; + } + }, + + notifyWhenNoOutstandingRequests: function(fn) { + fn(); + } +}; + + +/** + * @ngdoc provider + * @name $exceptionHandlerProvider + * + * @description + * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors + * passed to the `$exceptionHandler`. + */ + +/** + * @ngdoc service + * @name $exceptionHandler + * + * @description + * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed + * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration + * information. + * + * + * ```js + * describe('$exceptionHandlerProvider', function() { + * + * it('should capture log messages and exceptions', function() { + * + * module(function($exceptionHandlerProvider) { + * $exceptionHandlerProvider.mode('log'); + * }); + * + * inject(function($log, $exceptionHandler, $timeout) { + * $timeout(function() { $log.log(1); }); + * $timeout(function() { $log.log(2); throw 'banana peel'; }); + * $timeout(function() { $log.log(3); }); + * expect($exceptionHandler.errors).toEqual([]); + * expect($log.assertEmpty()); + * $timeout.flush(); + * expect($exceptionHandler.errors).toEqual(['banana peel']); + * expect($log.log.logs).toEqual([[1], [2], [3]]); + * }); + * }); + * }); + * ``` + */ + +angular.mock.$ExceptionHandlerProvider = function() { + var handler; + + /** + * @ngdoc method + * @name $exceptionHandlerProvider#mode + * + * @description + * Sets the logging mode. + * + * @param {string} mode Mode of operation, defaults to `rethrow`. + * + * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log` + * mode stores an array of errors in `$exceptionHandler.errors`, to allow later + * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and + * {@link ngMock.$log#reset reset()} + * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there + * is a bug in the application or test, so this mock will make these tests fail. + * For any implementations that expect exceptions to be thrown, the `rethrow` mode + * will also maintain a log of thrown errors. + */ + this.mode = function(mode) { + + switch (mode) { + case 'log': + case 'rethrow': + var errors = []; + handler = function(e) { + if (arguments.length == 1) { + errors.push(e); + } else { + errors.push([].slice.call(arguments, 0)); + } + if (mode === "rethrow") { + throw e; + } + }; + handler.errors = errors; + break; + default: + throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!"); + } + }; + + this.$get = function() { + return handler; + }; + + this.mode('rethrow'); +}; + + +/** + * @ngdoc service + * @name $log + * + * @description + * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays + * (one array per logging level). These arrays are exposed as `logs` property of each of the + * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`. + * + */ +angular.mock.$LogProvider = function() { + var debug = true; + + function concat(array1, array2, index) { + return array1.concat(Array.prototype.slice.call(array2, index)); + } + + this.debugEnabled = function(flag) { + if (angular.isDefined(flag)) { + debug = flag; + return this; + } else { + return debug; + } + }; + + this.$get = function() { + var $log = { + log: function() { $log.log.logs.push(concat([], arguments, 0)); }, + warn: function() { $log.warn.logs.push(concat([], arguments, 0)); }, + info: function() { $log.info.logs.push(concat([], arguments, 0)); }, + error: function() { $log.error.logs.push(concat([], arguments, 0)); }, + debug: function() { + if (debug) { + $log.debug.logs.push(concat([], arguments, 0)); + } + } + }; + + /** + * @ngdoc method + * @name $log#reset + * + * @description + * Reset all of the logging arrays to empty. + */ + $log.reset = function() { + /** + * @ngdoc property + * @name $log#log.logs + * + * @description + * Array of messages logged using {@link ng.$log#log `log()`}. + * + * @example + * ```js + * $log.log('Some Log'); + * var first = $log.log.logs.unshift(); + * ``` + */ + $log.log.logs = []; + /** + * @ngdoc property + * @name $log#info.logs + * + * @description + * Array of messages logged using {@link ng.$log#info `info()`}. + * + * @example + * ```js + * $log.info('Some Info'); + * var first = $log.info.logs.unshift(); + * ``` + */ + $log.info.logs = []; + /** + * @ngdoc property + * @name $log#warn.logs + * + * @description + * Array of messages logged using {@link ng.$log#warn `warn()`}. + * + * @example + * ```js + * $log.warn('Some Warning'); + * var first = $log.warn.logs.unshift(); + * ``` + */ + $log.warn.logs = []; + /** + * @ngdoc property + * @name $log#error.logs + * + * @description + * Array of messages logged using {@link ng.$log#error `error()`}. + * + * @example + * ```js + * $log.error('Some Error'); + * var first = $log.error.logs.unshift(); + * ``` + */ + $log.error.logs = []; + /** + * @ngdoc property + * @name $log#debug.logs + * + * @description + * Array of messages logged using {@link ng.$log#debug `debug()`}. + * + * @example + * ```js + * $log.debug('Some Error'); + * var first = $log.debug.logs.unshift(); + * ``` + */ + $log.debug.logs = []; + }; + + /** + * @ngdoc method + * @name $log#assertEmpty + * + * @description + * Assert that all of the logging methods have no logged messages. If any messages are present, + * an exception is thrown. + */ + $log.assertEmpty = function() { + var errors = []; + angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) { + angular.forEach($log[logLevel].logs, function(log) { + angular.forEach(log, function(logItem) { + errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + + (logItem.stack || '')); + }); + }); + }); + if (errors.length) { + errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or " + + "an expected log message was not checked and removed:"); + errors.push(''); + throw new Error(errors.join('\n---------\n')); + } + }; + + $log.reset(); + return $log; + }; +}; + + +/** + * @ngdoc service + * @name $interval + * + * @description + * Mock implementation of the $interval service. + * + * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to + * move forward by `millis` milliseconds and trigger any functions scheduled to run in that + * time. + * + * @param {function()} fn A function that should be called repeatedly. + * @param {number} delay Number of milliseconds between each function call. + * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat + * indefinitely. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @returns {promise} A promise which will be notified on each iteration. + */ +angular.mock.$IntervalProvider = function() { + this.$get = ['$browser', '$rootScope', '$q', '$$q', + function($browser, $rootScope, $q, $$q) { + var repeatFns = [], + nextRepeatId = 0, + now = 0; + + var $interval = function(fn, delay, count, invokeApply) { + var iteration = 0, + skipApply = (angular.isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise; + + count = (angular.isDefined(count)) ? count : 0; + promise.then(null, null, fn); + + promise.$$intervalId = nextRepeatId; + + function tick() { + deferred.notify(iteration++); + + if (count > 0 && iteration >= count) { + var fnIndex; + deferred.resolve(iteration); + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns.splice(fnIndex, 1); + } + } + + if (skipApply) { + $browser.defer.flush(); + } else { + $rootScope.$apply(); + } + } + + repeatFns.push({ + nextTime:(now + delay), + delay: delay, + fn: tick, + id: nextRepeatId, + deferred: deferred + }); + repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); + + nextRepeatId++; + return promise; + }; + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {promise} promise A promise from calling the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully cancelled. + */ + $interval.cancel = function(promise) { + if (!promise) return false; + var fnIndex; + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns[fnIndex].deferred.reject('canceled'); + repeatFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + /** + * @ngdoc method + * @name $interval#flush + * @description + * + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param {number=} millis maximum timeout amount to flush up until. + * + * @return {number} The amount of time moved forward. + */ + $interval.flush = function(millis) { + now += millis; + while (repeatFns.length && repeatFns[0].nextTime <= now) { + var task = repeatFns[0]; + task.fn(); + task.nextTime += task.delay; + repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;}); + } + return millis; + }; + + return $interval; + }]; +}; + + +/* jshint -W101 */ +/* The R_ISO8061_STR regex is never going to fit into the 100 char limit! + * This directive should go inside the anonymous function but a bug in JSHint means that it would + * not be enacted early enough to prevent the warning. + */ +var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; + +function jsonStringToDate(string) { + var match; + if (match = string.match(R_ISO8061_STR)) { + var date = new Date(0), + tzHour = 0, + tzMin = 0; + if (match[9]) { + tzHour = int(match[9] + match[10]); + tzMin = int(match[9] + match[11]); + } + date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3])); + date.setUTCHours(int(match[4] || 0) - tzHour, + int(match[5] || 0) - tzMin, + int(match[6] || 0), + int(match[7] || 0)); + return date; + } + return string; +} + +function int(str) { + return parseInt(str, 10); +} + +function padNumber(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while (num.length < digits) num = '0' + num; + if (trim) + num = num.substr(num.length - digits); + return neg + num; +} + + +/** + * @ngdoc type + * @name angular.mock.TzDate + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. + * + * Mock of the Date type which has its timezone specified via constructor arg. + * + * The main purpose is to create Date-like instances with timezone fixed to the specified timezone + * offset, so that we can test code that depends on local timezone settings without dependency on + * the time zone settings of the machine where the code is running. + * + * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) + * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* + * + * @example + * !!!! WARNING !!!!! + * This is not a complete Date object so only methods that were implemented can be called safely. + * To make matters worse, TzDate instances inherit stuff from Date via a prototype. + * + * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is + * incomplete we might be missing some non-standard methods. This can result in errors like: + * "Date.prototype.foo called on incompatible Object". + * + * ```js + * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); + * newYearInBratislava.getTimezoneOffset() => -60; + * newYearInBratislava.getFullYear() => 2010; + * newYearInBratislava.getMonth() => 0; + * newYearInBratislava.getDate() => 1; + * newYearInBratislava.getHours() => 0; + * newYearInBratislava.getMinutes() => 0; + * newYearInBratislava.getSeconds() => 0; + * ``` + * + */ +angular.mock.TzDate = function(offset, timestamp) { + var self = new Date(0); + if (angular.isString(timestamp)) { + var tsStr = timestamp; + + self.origDate = jsonStringToDate(timestamp); + + timestamp = self.origDate.getTime(); + if (isNaN(timestamp)) + throw { + name: "Illegal Argument", + message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string" + }; + } else { + self.origDate = new Date(timestamp); + } + + var localOffset = new Date(timestamp).getTimezoneOffset(); + self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60; + self.date = new Date(timestamp + self.offsetDiff); + + self.getTime = function() { + return self.date.getTime() - self.offsetDiff; + }; + + self.toLocaleDateString = function() { + return self.date.toLocaleDateString(); + }; + + self.getFullYear = function() { + return self.date.getFullYear(); + }; + + self.getMonth = function() { + return self.date.getMonth(); + }; + + self.getDate = function() { + return self.date.getDate(); + }; + + self.getHours = function() { + return self.date.getHours(); + }; + + self.getMinutes = function() { + return self.date.getMinutes(); + }; + + self.getSeconds = function() { + return self.date.getSeconds(); + }; + + self.getMilliseconds = function() { + return self.date.getMilliseconds(); + }; + + self.getTimezoneOffset = function() { + return offset * 60; + }; + + self.getUTCFullYear = function() { + return self.origDate.getUTCFullYear(); + }; + + self.getUTCMonth = function() { + return self.origDate.getUTCMonth(); + }; + + self.getUTCDate = function() { + return self.origDate.getUTCDate(); + }; + + self.getUTCHours = function() { + return self.origDate.getUTCHours(); + }; + + self.getUTCMinutes = function() { + return self.origDate.getUTCMinutes(); + }; + + self.getUTCSeconds = function() { + return self.origDate.getUTCSeconds(); + }; + + self.getUTCMilliseconds = function() { + return self.origDate.getUTCMilliseconds(); + }; + + self.getDay = function() { + return self.date.getDay(); + }; + + // provide this method only on browsers that already have it + if (self.toISOString) { + self.toISOString = function() { + return padNumber(self.origDate.getUTCFullYear(), 4) + '-' + + padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' + + padNumber(self.origDate.getUTCDate(), 2) + 'T' + + padNumber(self.origDate.getUTCHours(), 2) + ':' + + padNumber(self.origDate.getUTCMinutes(), 2) + ':' + + padNumber(self.origDate.getUTCSeconds(), 2) + '.' + + padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'; + }; + } + + //hide all methods not implemented in this mock that the Date prototype exposes + var unimplementedMethods = ['getUTCDay', + 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', + 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', + 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', + 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; + + angular.forEach(unimplementedMethods, function(methodName) { + self[methodName] = function() { + throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock"); + }; + }); + + return self; +}; + +//make "tzDateInstance instanceof Date" return true +angular.mock.TzDate.prototype = Date.prototype; +/* jshint +W101 */ + +angular.mock.animate = angular.module('ngAnimateMock', ['ng']) + + .config(['$provide', function($provide) { + + var reflowQueue = []; + $provide.value('$$animateReflow', function(fn) { + var index = reflowQueue.length; + reflowQueue.push(fn); + return function cancel() { + reflowQueue.splice(index, 1); + }; + }); + + $provide.decorator('$animate', ['$delegate', '$$asyncCallback', '$timeout', '$browser', + function($delegate, $$asyncCallback, $timeout, $browser) { + var animate = { + queue: [], + cancel: $delegate.cancel, + enabled: $delegate.enabled, + triggerCallbackEvents: function() { + $$asyncCallback.flush(); + }, + triggerCallbackPromise: function() { + $timeout.flush(0); + }, + triggerCallbacks: function() { + this.triggerCallbackEvents(); + this.triggerCallbackPromise(); + }, + triggerReflow: function() { + angular.forEach(reflowQueue, function(fn) { + fn(); + }); + reflowQueue = []; + } + }; + + angular.forEach( + ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) { + animate[method] = function() { + animate.queue.push({ + event: method, + element: arguments[0], + options: arguments[arguments.length - 1], + args: arguments + }); + return $delegate[method].apply($delegate, arguments); + }; + }); + + return animate; + }]); + + }]); + + +/** + * @ngdoc function + * @name angular.mock.dump + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available function. + * + * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for + * debugging. + * + * This method is also available on window, where it can be used to display objects on debug + * console. + * + * @param {*} object - any object to turn into string. + * @return {string} a serialized string of the argument + */ +angular.mock.dump = function(object) { + return serialize(object); + + function serialize(object) { + var out; + + if (angular.isElement(object)) { + object = angular.element(object); + out = angular.element('
'); + angular.forEach(object, function(element) { + out.append(angular.element(element).clone()); + }); + out = out.html(); + } else if (angular.isArray(object)) { + out = []; + angular.forEach(object, function(o) { + out.push(serialize(o)); + }); + out = '[ ' + out.join(', ') + ' ]'; + } else if (angular.isObject(object)) { + if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { + out = serializeScope(object); + } else if (object instanceof Error) { + out = object.stack || ('' + object.name + ': ' + object.message); + } else { + // TODO(i): this prevents methods being logged, + // we should have a better way to serialize objects + out = angular.toJson(object, true); + } + } else { + out = String(object); + } + + return out; + } + + function serializeScope(scope, offset) { + offset = offset || ' '; + var log = [offset + 'Scope(' + scope.$id + '): {']; + for (var key in scope) { + if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { + log.push(' ' + key + ': ' + angular.toJson(scope[key])); + } + } + var child = scope.$$childHead; + while (child) { + log.push(serializeScope(child, offset + ' ')); + child = child.$$nextSibling; + } + log.push('}'); + return log.join('\n' + offset); + } +}; + +/** + * @ngdoc service + * @name $httpBackend + * @description + * Fake HTTP backend implementation suitable for unit testing applications that use the + * {@link ng.$http $http service}. + * + * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less + * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. + * + * During unit testing, we want our unit tests to run quickly and have no external dependencies so + * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or + * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is + * to verify whether a certain request has been sent or not, or alternatively just let the + * application make requests, respond with pre-trained responses and assert that the end result is + * what we expect it to be. + * + * This mock implementation can be used to respond with static or dynamic responses via the + * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). + * + * When an Angular application needs some data from a server, it calls the $http service, which + * sends the request to a real server using $httpBackend service. With dependency injection, it is + * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify + * the requests and respond with some testing data without sending a request to a real server. + * + * There are two ways to specify what test data should be returned as http responses by the mock + * backend when the code under test makes http requests: + * + * - `$httpBackend.expect` - specifies a request expectation + * - `$httpBackend.when` - specifies a backend definition + * + * + * # Request Expectations vs Backend Definitions + * + * Request expectations provide a way to make assertions about requests made by the application and + * to define responses for those requests. The test will fail if the expected requests are not made + * or they are made in the wrong order. + * + * Backend definitions allow you to define a fake backend for your application which doesn't assert + * if a particular request was made or not, it just returns a trained response if a request is made. + * The test will pass whether or not the request gets made during testing. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Request expectationsBackend definitions
Syntax.expect(...).respond(...).when(...).respond(...)
Typical usagestrict unit testsloose (black-box) unit testing
Fulfills multiple requestsNOYES
Order of requests mattersYESNO
Request requiredYESNO
Response requiredoptional (see below)YES
+ * + * In cases where both backend definitions and request expectations are specified during unit + * testing, the request expectations are evaluated first. + * + * If a request expectation has no response specified, the algorithm will search your backend + * definitions for an appropriate response. + * + * If a request didn't match any expectation or if the expectation doesn't have the response + * defined, the backend definitions are evaluated in sequential order to see if any of them match + * the request. The response from the first matched definition is returned. + * + * + * # Flushing HTTP requests + * + * The $httpBackend used in production always responds to requests asynchronously. If we preserved + * this behavior in unit testing, we'd have to create async unit tests, which are hard to write, + * to follow and to maintain. But neither can the testing mock respond synchronously; that would + * change the execution of the code under test. For this reason, the mock $httpBackend has a + * `flush()` method, which allows the test to explicitly flush pending requests. This preserves + * the async api of the backend, while allowing the test to execute synchronously. + * + * + * # Unit testing with mock $httpBackend + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test: + * + ```js + // The module code + angular + .module('MyApp', []) + .controller('MyController', MyController); + + // The controller code + function MyController($scope, $http) { + var authToken; + + $http.get('/auth.py').success(function(data, status, headers) { + authToken = headers('A-Token'); + $scope.user = data; + }); + + $scope.saveMessage = function(message) { + var headers = { 'Authorization': authToken }; + $scope.status = 'Saving...'; + + $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) { + $scope.status = ''; + }).error(function() { + $scope.status = 'ERROR!'; + }); + }; + } + ``` + * + * Now we setup the mock backend and create the test specs: + * + ```js + // testing controller + describe('MyController', function() { + var $httpBackend, $rootScope, createController, authRequestHandler; + + // Set up the module + beforeEach(module('MyApp')); + + beforeEach(inject(function($injector) { + // Set up the mock http service responses + $httpBackend = $injector.get('$httpBackend'); + // backend definition common for all tests + authRequestHandler = $httpBackend.when('GET', '/auth.py') + .respond({userId: 'userX'}, {'A-Token': 'xxx'}); + + // Get hold of a scope (i.e. the root scope) + $rootScope = $injector.get('$rootScope'); + // The $controller service is used to create instances of controllers + var $controller = $injector.get('$controller'); + + createController = function() { + return $controller('MyController', {'$scope' : $rootScope }); + }; + })); + + + afterEach(function() { + $httpBackend.verifyNoOutstandingExpectation(); + $httpBackend.verifyNoOutstandingRequest(); + }); + + + it('should fetch authentication token', function() { + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + }); + + + it('should fail authentication', function() { + + // Notice how you can change the response even after it was set + authRequestHandler.respond(401, ''); + + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + expect($rootScope.status).toBe('Failed...'); + }); + + + it('should send msg to server', function() { + var controller = createController(); + $httpBackend.flush(); + + // now you don’t care about the authentication, but + // the controller will still send the request and + // $httpBackend will respond without you having to + // specify the expectation and response for this request + + $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); + $rootScope.saveMessage('message content'); + expect($rootScope.status).toBe('Saving...'); + $httpBackend.flush(); + expect($rootScope.status).toBe(''); + }); + + + it('should send auth header', function() { + var controller = createController(); + $httpBackend.flush(); + + $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { + // check if the header was send, if it wasn't the expectation won't + // match the request and the test will fail + return headers['Authorization'] == 'xxx'; + }).respond(201, ''); + + $rootScope.saveMessage('whatever'); + $httpBackend.flush(); + }); + }); + ``` + */ +angular.mock.$HttpBackendProvider = function() { + this.$get = ['$rootScope', '$timeout', createHttpBackendMock]; +}; + +/** + * General factory function for $httpBackend mock. + * Returns instance for unit testing (when no arguments specified): + * - passing through is disabled + * - auto flushing is disabled + * + * Returns instance for e2e testing (when `$delegate` and `$browser` specified): + * - passing through (delegating request to real backend) is enabled + * - auto flushing is enabled + * + * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) + * @param {Object=} $browser Auto-flushing enabled if specified + * @return {Object} Instance of $httpBackend mock + */ +function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) { + var definitions = [], + expectations = [], + responses = [], + responsesPush = angular.bind(responses, responses.push), + copy = angular.copy; + + function createResponse(status, data, headers, statusText) { + if (angular.isFunction(status)) return status; + + return function() { + return angular.isNumber(status) + ? [status, data, headers, statusText] + : [200, status, data, headers]; + }; + } + + // TODO(vojta): change params to: method, url, data, headers, callback + function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { + var xhr = new MockXhr(), + expectation = expectations[0], + wasExpected = false; + + function prettyPrint(data) { + return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) + ? data + : angular.toJson(data); + } + + function wrapResponse(wrapped) { + if (!$browser && timeout) { + timeout.then ? timeout.then(handleTimeout) : $timeout(handleTimeout, timeout); + } + + return handleResponse; + + function handleResponse() { + var response = wrapped.response(method, url, data, headers); + xhr.$$respHeaders = response[2]; + callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(), + copy(response[3] || '')); + } + + function handleTimeout() { + for (var i = 0, ii = responses.length; i < ii; i++) { + if (responses[i] === handleResponse) { + responses.splice(i, 1); + callback(-1, undefined, ''); + break; + } + } + } + } + + if (expectation && expectation.match(method, url)) { + if (!expectation.matchData(data)) + throw new Error('Expected ' + expectation + ' with different data\n' + + 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); + + if (!expectation.matchHeaders(headers)) + throw new Error('Expected ' + expectation + ' with different headers\n' + + 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + + prettyPrint(headers)); + + expectations.shift(); + + if (expectation.response) { + responses.push(wrapResponse(expectation)); + return; + } + wasExpected = true; + } + + var i = -1, definition; + while ((definition = definitions[++i])) { + if (definition.match(method, url, data, headers || {})) { + if (definition.response) { + // if $browser specified, we do auto flush all requests + ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); + } else if (definition.passThrough) { + $delegate(method, url, data, callback, headers, timeout, withCredentials); + } else throw new Error('No response defined !'); + return; + } + } + throw wasExpected ? + new Error('No response defined !') : + new Error('Unexpected request: ' + method + ' ' + url + '\n' + + (expectation ? 'Expected ' + expectation : 'No more request expected')); + } + + /** + * @ngdoc method + * @name $httpBackend#when + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). The respond method returns the + * `requestHandler` object for possible overrides. + */ + $httpBackend.when = function(method, url, data, headers) { + var definition = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function(status, data, headers, statusText) { + definition.passThrough = undefined; + definition.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + if ($browser) { + chain.passThrough = function() { + definition.response = undefined; + definition.passThrough = true; + return chain; + }; + } + + definitions.push(definition); + return chain; + }; + + /** + * @ngdoc method + * @name $httpBackend#whenGET + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPOST + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenPUT + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('when'); + + + /** + * @ngdoc method + * @name $httpBackend#expect + * @description + * Creates a new request expectation. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current expectation. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can + * return an array containing response status (number), response data (string), response + * headers (Object), and the text for the status (string). The respond method returns the + * `requestHandler` object for possible overrides. + */ + $httpBackend.expect = function(method, url, data, headers) { + var expectation = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function(status, data, headers, statusText) { + expectation.response = createResponse(status, data, headers, statusText); + return chain; + } + }; + + expectations.push(expectation); + return chain; + }; + + + /** + * @ngdoc method + * @name $httpBackend#expectGET + * @description + * Creates a new request expectation for GET requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. See #expect for more info. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectHEAD + * @description + * Creates a new request expectation for HEAD requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectDELETE + * @description + * Creates a new request expectation for DELETE requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPOST + * @description + * Creates a new request expectation for POST requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPUT + * @description + * Creates a new request expectation for PUT requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectPATCH + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + + /** + * @ngdoc method + * @name $httpBackend#expectJSONP + * @description + * Creates a new request expectation for JSONP requests. For more info see `expect()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. You can save this object for later use and invoke `respond` again in + * order to change how a matched request is handled. + */ + createShortMethods('expect'); + + + /** + * @ngdoc method + * @name $httpBackend#flush + * @description + * Flushes all pending requests using the trained responses. + * + * @param {number=} count Number of responses to flush (in the order they arrived). If undefined, + * all pending requests will be flushed. If there are no pending requests when the flush method + * is called an exception is thrown (as this typically a sign of programming error). + */ + $httpBackend.flush = function(count, digest) { + if (digest !== false) $rootScope.$digest(); + if (!responses.length) throw new Error('No pending request to flush !'); + + if (angular.isDefined(count) && count !== null) { + while (count--) { + if (!responses.length) throw new Error('No more pending request to flush !'); + responses.shift()(); + } + } else { + while (responses.length) { + responses.shift()(); + } + } + $httpBackend.verifyNoOutstandingExpectation(digest); + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingExpectation + * @description + * Verifies that all of the requests defined via the `expect` api were made. If any of the + * requests were not made, verifyNoOutstandingExpectation throws an exception. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingExpectation); + * ``` + */ + $httpBackend.verifyNoOutstandingExpectation = function(digest) { + if (digest !== false) $rootScope.$digest(); + if (expectations.length) { + throw new Error('Unsatisfied requests: ' + expectations.join(', ')); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#verifyNoOutstandingRequest + * @description + * Verifies that there are no outstanding requests that need to be flushed. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * ```js + * afterEach($httpBackend.verifyNoOutstandingRequest); + * ``` + */ + $httpBackend.verifyNoOutstandingRequest = function() { + if (responses.length) { + throw new Error('Unflushed requests: ' + responses.length); + } + }; + + + /** + * @ngdoc method + * @name $httpBackend#resetExpectations + * @description + * Resets all request expectations, but preserves all backend definitions. Typically, you would + * call resetExpectations during a multiple-phase test when you want to reuse the same instance of + * $httpBackend mock. + */ + $httpBackend.resetExpectations = function() { + expectations.length = 0; + responses.length = 0; + }; + + return $httpBackend; + + + function createShortMethods(prefix) { + angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) { + $httpBackend[prefix + method] = function(url, headers) { + return $httpBackend[prefix](method, url, undefined, headers); + }; + }); + + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { + $httpBackend[prefix + method] = function(url, data, headers) { + return $httpBackend[prefix](method, url, data, headers); + }; + }); + } +} + +function MockHttpExpectation(method, url, data, headers) { + + this.data = data; + this.headers = headers; + + this.match = function(m, u, d, h) { + if (method != m) return false; + if (!this.matchUrl(u)) return false; + if (angular.isDefined(d) && !this.matchData(d)) return false; + if (angular.isDefined(h) && !this.matchHeaders(h)) return false; + return true; + }; + + this.matchUrl = function(u) { + if (!url) return true; + if (angular.isFunction(url.test)) return url.test(u); + if (angular.isFunction(url)) return url(u); + return url == u; + }; + + this.matchHeaders = function(h) { + if (angular.isUndefined(headers)) return true; + if (angular.isFunction(headers)) return headers(h); + return angular.equals(headers, h); + }; + + this.matchData = function(d) { + if (angular.isUndefined(data)) return true; + if (data && angular.isFunction(data.test)) return data.test(d); + if (data && angular.isFunction(data)) return data(d); + if (data && !angular.isString(data)) { + return angular.equals(angular.fromJson(angular.toJson(data)), angular.fromJson(d)); + } + return data == d; + }; + + this.toString = function() { + return method + ' ' + url; + }; +} + +function createMockXhr() { + return new MockXhr(); +} + +function MockXhr() { + + // hack for testing $http, $httpBackend + MockXhr.$$lastInstance = this; + + this.open = function(method, url, async) { + this.$$method = method; + this.$$url = url; + this.$$async = async; + this.$$reqHeaders = {}; + this.$$respHeaders = {}; + }; + + this.send = function(data) { + this.$$data = data; + }; + + this.setRequestHeader = function(key, value) { + this.$$reqHeaders[key] = value; + }; + + this.getResponseHeader = function(name) { + // the lookup must be case insensitive, + // that's why we try two quick lookups first and full scan last + var header = this.$$respHeaders[name]; + if (header) return header; + + name = angular.lowercase(name); + header = this.$$respHeaders[name]; + if (header) return header; + + header = undefined; + angular.forEach(this.$$respHeaders, function(headerVal, headerName) { + if (!header && angular.lowercase(headerName) == name) header = headerVal; + }); + return header; + }; + + this.getAllResponseHeaders = function() { + var lines = []; + + angular.forEach(this.$$respHeaders, function(value, key) { + lines.push(key + ': ' + value); + }); + return lines.join('\n'); + }; + + this.abort = angular.noop; +} + + +/** + * @ngdoc service + * @name $timeout + * @description + * + * This service is just a simple decorator for {@link ng.$timeout $timeout} service + * that adds a "flush" and "verifyNoPendingTasks" methods. + */ + +angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) { + + /** + * @ngdoc method + * @name $timeout#flush + * @description + * + * Flushes the queue of pending tasks. + * + * @param {number=} delay maximum timeout amount to flush up until + */ + $delegate.flush = function(delay) { + $browser.defer.flush(delay); + }; + + /** + * @ngdoc method + * @name $timeout#verifyNoPendingTasks + * @description + * + * Verifies that there are no pending tasks that need to be flushed. + */ + $delegate.verifyNoPendingTasks = function() { + if ($browser.deferredFns.length) { + throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + + formatPendingTasksAsString($browser.deferredFns)); + } + }; + + function formatPendingTasksAsString(tasks) { + var result = []; + angular.forEach(tasks, function(task) { + result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}'); + }); + + return result.join(', '); + } + + return $delegate; +}]; + +angular.mock.$RAFDecorator = ['$delegate', function($delegate) { + var queue = []; + var rafFn = function(fn) { + var index = queue.length; + queue.push(fn); + return function() { + queue.splice(index, 1); + }; + }; + + rafFn.supported = $delegate.supported; + + rafFn.flush = function() { + if (queue.length === 0) { + throw new Error('No rAF callbacks present'); + } + + var length = queue.length; + for (var i = 0; i < length; i++) { + queue[i](); + } + + queue = []; + }; + + return rafFn; +}]; + +angular.mock.$AsyncCallbackDecorator = ['$delegate', function($delegate) { + var callbacks = []; + var addFn = function(fn) { + callbacks.push(fn); + }; + addFn.flush = function() { + angular.forEach(callbacks, function(fn) { + fn(); + }); + callbacks = []; + }; + return addFn; +}]; + +/** + * + */ +angular.mock.$RootElementProvider = function() { + this.$get = function() { + return angular.element('
'); + }; +}; + +/** + * @ngdoc module + * @name ngMock + * @packageName angular-mocks + * @description + * + * # ngMock + * + * The `ngMock` module provides support to inject and mock Angular services into unit tests. + * In addition, ngMock also extends various core ng services such that they can be + * inspected and controlled in a synchronous manner within test code. + * + * + *
+ * + */ +angular.module('ngMock', ['ng']).provider({ + $browser: angular.mock.$BrowserProvider, + $exceptionHandler: angular.mock.$ExceptionHandlerProvider, + $log: angular.mock.$LogProvider, + $interval: angular.mock.$IntervalProvider, + $httpBackend: angular.mock.$HttpBackendProvider, + $rootElement: angular.mock.$RootElementProvider +}).config(['$provide', function($provide) { + $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); + $provide.decorator('$$rAF', angular.mock.$RAFDecorator); + $provide.decorator('$$asyncCallback', angular.mock.$AsyncCallbackDecorator); + $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator); +}]); + +/** + * @ngdoc module + * @name ngMockE2E + * @module ngMockE2E + * @packageName angular-mocks + * @description + * + * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. + * Currently there is only one mock present in this module - + * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. + */ +angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { + $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); +}]); + +/** + * @ngdoc service + * @name $httpBackend + * @module ngMockE2E + * @description + * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of + * applications that use the {@link ng.$http $http service}. + * + * *Note*: For fake http backend implementation suitable for unit testing please see + * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. + * + * This implementation can be used to respond with static or dynamic responses via the `when` api + * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the + * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch + * templates from a webserver). + * + * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application + * is being developed with the real backend api replaced with a mock, it is often desirable for + * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch + * templates or static files from the webserver). To configure the backend with this behavior + * use the `passThrough` request handler of `when` instead of `respond`. + * + * Additionally, we don't want to manually have to flush mocked out requests like we do during unit + * testing. For this reason the e2e $httpBackend flushes mocked out requests + * automatically, closely simulating the behavior of the XMLHttpRequest object. + * + * To setup the application to run with this http backend, you have to create a module that depends + * on the `ngMockE2E` and your application modules and defines the fake backend: + * + * ```js + * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); + * myAppDev.run(function($httpBackend) { + * phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * var phone = angular.fromJson(data); + * phones.push(phone); + * return [200, phone, {}]; + * }); + * $httpBackend.whenGET(/^\/templates\//).passThrough(); + * //... + * }); + * ``` + * + * Afterwards, bootstrap your app with this new module. + */ + +/** + * @ngdoc method + * @name $httpBackend#when + * @module ngMockE2E + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers, statusText]) + * | function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string), response headers + * (Object), and the text for the status (string). + * - passThrough – `{function()}` – Any request matching a backend definition with + * `passThrough` handler will be passed through to the real backend (an XHR request will be made + * to the server.) + * - Both methods return the `requestHandler` object for possible overrides. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenGET + * @module ngMockE2E + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenHEAD + * @module ngMockE2E + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenDELETE + * @module ngMockE2E + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPOST + * @module ngMockE2E + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPUT + * @module ngMockE2E + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenPATCH + * @module ngMockE2E + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ + +/** + * @ngdoc method + * @name $httpBackend#whenJSONP + * @module ngMockE2E + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp|function(string)} url HTTP url or function that receives the url + * and returns true if the url match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. You can save this object for later use and invoke + * `respond` or `passThrough` again in order to change how a matched request is handled. + */ +angular.mock.e2e = {}; +angular.mock.e2e.$httpBackendDecorator = + ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock]; + + +/** + * @ngdoc type + * @name $rootScope.Scope + * @module ngMock + * @description + * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These + * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when + * `ngMock` module is loaded. + * + * In addition to all the regular `Scope` methods, the following helper methods are available: + */ +angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) { + + var $rootScopePrototype = Object.getPrototypeOf($delegate); + + $rootScopePrototype.$countChildScopes = countChildScopes; + $rootScopePrototype.$countWatchers = countWatchers; + + return $delegate; + + // ------------------------------------------------------------------------------------------ // + + /** + * @ngdoc method + * @name $rootScope.Scope#$countChildScopes + * @module ngMock + * @description + * Counts all the direct and indirect child scopes of the current scope. + * + * The current scope is excluded from the count. The count includes all isolate child scopes. + * + * @returns {number} Total number of child scopes. + */ + function countChildScopes() { + // jshint validthis: true + var count = 0; // exclude the current scope + var pendingChildHeads = [this.$$childHead]; + var currentScope; + + while (pendingChildHeads.length) { + currentScope = pendingChildHeads.shift(); + + while (currentScope) { + count += 1; + pendingChildHeads.push(currentScope.$$childHead); + currentScope = currentScope.$$nextSibling; + } + } + + return count; + } + + + /** + * @ngdoc method + * @name $rootScope.Scope#$countWatchers + * @module ngMock + * @description + * Counts all the watchers of direct and indirect child scopes of the current scope. + * + * The watchers of the current scope are included in the count and so are all the watchers of + * isolate child scopes. + * + * @returns {number} Total number of watchers. + */ + function countWatchers() { + // jshint validthis: true + var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope + var pendingChildHeads = [this.$$childHead]; + var currentScope; + + while (pendingChildHeads.length) { + currentScope = pendingChildHeads.shift(); + + while (currentScope) { + count += currentScope.$$watchers ? currentScope.$$watchers.length : 0; + pendingChildHeads.push(currentScope.$$childHead); + currentScope = currentScope.$$nextSibling; + } + } + + return count; + } +}]; + + +if (window.jasmine || window.mocha) { + + var currentSpec = null, + annotatedFunctions = [], + isSpecRunning = function() { + return !!currentSpec; + }; + + angular.mock.$$annotate = angular.injector.$$annotate; + angular.injector.$$annotate = function(fn) { + if (typeof fn === 'function' && !fn.$inject) { + annotatedFunctions.push(fn); + } + return angular.mock.$$annotate.apply(this, arguments); + }; + + + (window.beforeEach || window.setup)(function() { + annotatedFunctions = []; + currentSpec = this; + }); + + (window.afterEach || window.teardown)(function() { + var injector = currentSpec.$injector; + + annotatedFunctions.forEach(function(fn) { + delete fn.$inject; + }); + + angular.forEach(currentSpec.$modules, function(module) { + if (module && module.$$hashKey) { + module.$$hashKey = undefined; + } + }); + + currentSpec.$injector = null; + currentSpec.$modules = null; + currentSpec = null; + + if (injector) { + injector.get('$rootElement').off(); + injector.get('$browser').pollFns.length = 0; + } + + // clean up jquery's fragment cache + angular.forEach(angular.element.fragments, function(val, key) { + delete angular.element.fragments[key]; + }); + + MockXhr.$$lastInstance = null; + + angular.forEach(angular.callbacks, function(val, key) { + delete angular.callbacks[key]; + }); + angular.callbacks.counter = 0; + }); + + /** + * @ngdoc function + * @name angular.mock.module + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * This function registers a module configuration code. It collects the configuration information + * which will be used when the injector is created by {@link angular.mock.inject inject}. + * + * See {@link angular.mock.inject inject} for usage example + * + * @param {...(string|Function|Object)} fns any number of modules which are represented as string + * aliases or as anonymous module initialization functions. The modules are used to + * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + * object literal is passed they will be registered as values in the module, the key being + * the module name and the value being what is returned. + */ + window.module = angular.mock.module = function() { + var moduleFns = Array.prototype.slice.call(arguments, 0); + return isSpecRunning() ? workFn() : workFn; + ///////////////////// + function workFn() { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not register a module!'); + } else { + var modules = currentSpec.$modules || (currentSpec.$modules = []); + angular.forEach(moduleFns, function(module) { + if (angular.isObject(module) && !angular.isArray(module)) { + modules.push(function($provide) { + angular.forEach(module, function(value, key) { + $provide.value(key, value); + }); + }); + } else { + modules.push(module); + } + }); + } + } + }; + + /** + * @ngdoc function + * @name angular.mock.inject + * @description + * + * *NOTE*: This function is also published on window for easy access.
+ * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha + * + * The inject function wraps a function into an injectable function. The inject() creates new + * instance of {@link auto.$injector $injector} per test, which is then used for + * resolving references. + * + * + * ## Resolving References (Underscore Wrapping) + * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this + * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable + * that is declared in the scope of the `describe()` block. Since we would, most likely, want + * the variable to have the same name of the reference we have a problem, since the parameter + * to the `inject()` function would hide the outer variable. + * + * To help with this, the injected parameters can, optionally, be enclosed with underscores. + * These are ignored by the injector when the reference name is resolved. + * + * For example, the parameter `_myService_` would be resolved as the reference `myService`. + * Since it is available in the function body as _myService_, we can then assign it to a variable + * defined in an outer scope. + * + * ``` + * // Defined out reference variable outside + * var myService; + * + * // Wrap the parameter in underscores + * beforeEach( inject( function(_myService_){ + * myService = _myService_; + * })); + * + * // Use myService in a series of tests. + * it('makes use of myService', function() { + * myService.doStuff(); + * }); + * + * ``` + * + * See also {@link angular.mock.module angular.mock.module} + * + * ## Example + * Example of what a typical jasmine tests looks like with the inject method. + * ```js + * + * angular.module('myApplicationModule', []) + * .value('mode', 'app') + * .value('version', 'v1.0.1'); + * + * + * describe('MyApp', function() { + * + * // You need to load modules that you want to test, + * // it loads only the "ng" module by default. + * beforeEach(module('myApplicationModule')); + * + * + * // inject() is used to inject arguments of all given functions + * it('should provide a version', inject(function(mode, version) { + * expect(version).toEqual('v1.0.1'); + * expect(mode).toEqual('app'); + * })); + * + * + * // The inject and module method can also be used inside of the it or beforeEach + * it('should override a version and test the new version is injected', function() { + * // module() takes functions or strings (module aliases) + * module(function($provide) { + * $provide.value('version', 'overridden'); // override version here + * }); + * + * inject(function(version) { + * expect(version).toEqual('overridden'); + * }); + * }); + * }); + * + * ``` + * + * @param {...Function} fns any number of functions which will be injected using the injector. + */ + + + + var ErrorAddingDeclarationLocationStack = function(e, errorForStack) { + this.message = e.message; + this.name = e.name; + if (e.line) this.line = e.line; + if (e.sourceId) this.sourceId = e.sourceId; + if (e.stack && errorForStack) + this.stack = e.stack + '\n' + errorForStack.stack; + if (e.stackArray) this.stackArray = e.stackArray; + }; + ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString; + + window.inject = angular.mock.inject = function() { + var blockFns = Array.prototype.slice.call(arguments, 0); + var errorForStack = new Error('Declaration Location'); + return isSpecRunning() ? workFn.call(currentSpec) : workFn; + ///////////////////// + function workFn() { + var modules = currentSpec.$modules || []; + var strictDi = !!currentSpec.$injectorStrict; + modules.unshift('ngMock'); + modules.unshift('ng'); + var injector = currentSpec.$injector; + if (!injector) { + if (strictDi) { + // If strictDi is enabled, annotate the providerInjector blocks + angular.forEach(modules, function(moduleFn) { + if (typeof moduleFn === "function") { + angular.injector.$$annotate(moduleFn); + } + }); + } + injector = currentSpec.$injector = angular.injector(modules, strictDi); + currentSpec.$injectorStrict = strictDi; + } + for (var i = 0, ii = blockFns.length; i < ii; i++) { + if (currentSpec.$injectorStrict) { + // If the injector is strict / strictDi, and the spec wants to inject using automatic + // annotation, then annotate the function here. + injector.annotate(blockFns[i]); + } + try { + /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */ + injector.invoke(blockFns[i] || angular.noop, this); + /* jshint +W040 */ + } catch (e) { + if (e.stack && errorForStack) { + throw new ErrorAddingDeclarationLocationStack(e, errorForStack); + } + throw e; + } finally { + errorForStack = null; + } + } + } + }; + + + angular.mock.inject.strictDi = function(value) { + value = arguments.length ? !!value : true; + return isSpecRunning() ? workFn() : workFn; + + function workFn() { + if (value !== currentSpec.$injectorStrict) { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not modify strict annotations'); + } else { + currentSpec.$injectorStrict = value; + } + } + } + }; +} + + +})(window, window.angular); diff --git a/client/www/lib/angular-mocks/bower.json b/client/www/lib/angular-mocks/bower.json new file mode 100644 index 0000000..953ed68 --- /dev/null +++ b/client/www/lib/angular-mocks/bower.json @@ -0,0 +1,9 @@ +{ + "name": "angular-mocks", + "version": "1.3.13", + "main": "./angular-mocks.js", + "ignore": [], + "dependencies": { + "angular": "1.3.13" + } +} diff --git a/client/www/lib/angular-mocks/package.json b/client/www/lib/angular-mocks/package.json new file mode 100644 index 0000000..19207e3 --- /dev/null +++ b/client/www/lib/angular-mocks/package.json @@ -0,0 +1,27 @@ +{ + "name": "angular-mocks", + "version": "1.3.13", + "description": "AngularJS mocks for testing", + "main": "angular-mocks.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/angular/angular.js.git" + }, + "keywords": [ + "angular", + "framework", + "browser", + "mocks", + "testing", + "client-side" + ], + "author": "Angular Core Team ", + "license": "MIT", + "bugs": { + "url": "https://github.com/angular/angular.js/issues" + }, + "homepage": "http://angularjs.org" +} diff --git a/client/www/lib/angular-sanitize/.bower.json b/client/www/lib/angular-sanitize/.bower.json new file mode 100644 index 0000000..009f652 --- /dev/null +++ b/client/www/lib/angular-sanitize/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "angular-sanitize", + "version": "1.4.3", + "main": "./angular-sanitize.js", + "ignore": [], + "dependencies": { + "angular": "1.4.3" + }, + "homepage": "https://github.com/angular/bower-angular-sanitize", + "_release": "1.4.3", + "_resolution": { + "type": "version", + "tag": "v1.4.3", + "commit": "0367ee4c3f9cb8af5d1da9ec35b71a8b523d9fc0" + }, + "_source": "https://github.com/angular/bower-angular-sanitize.git", + "_target": "1.4.3", + "_originalSource": "angular-sanitize" +} \ No newline at end of file diff --git a/client/www/lib/angular-sanitize/README.md b/client/www/lib/angular-sanitize/README.md new file mode 100644 index 0000000..b84aaf6 --- /dev/null +++ b/client/www/lib/angular-sanitize/README.md @@ -0,0 +1,68 @@ +# packaged angular-sanitize + +This repo is for distribution on `npm` and `bower`. The source for this module is in the +[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngSanitize). +Please file issues and pull requests against that repo. + +## Install + +You can install this package either with `npm` or with `bower`. + +### npm + +```shell +npm install angular-sanitize +``` + +Then add `ngSanitize` as a dependency for your app: + +```javascript +angular.module('myApp', [require('angular-sanitize')]); +``` + +### bower + +```shell +bower install angular-sanitize +``` + +Add a ` +``` + +Then add `ngSanitize` as a dependency for your app: + +```javascript +angular.module('myApp', ['ngSanitize']); +``` + +## Documentation + +Documentation is available on the +[AngularJS docs site](http://docs.angularjs.org/api/ngSanitize). + +## License + +The MIT License + +Copyright (c) 2010-2015 Google, Inc. http://angularjs.org + +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/client/www/lib/angular-sanitize/angular-sanitize.js b/client/www/lib/angular-sanitize/angular-sanitize.js new file mode 100644 index 0000000..bebe1a7 --- /dev/null +++ b/client/www/lib/angular-sanitize/angular-sanitize.js @@ -0,0 +1,683 @@ +/** + * @license AngularJS v1.4.3 + * (c) 2010-2015 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +var $sanitizeMinErr = angular.$$minErr('$sanitize'); + +/** + * @ngdoc module + * @name ngSanitize + * @description + * + * # ngSanitize + * + * The `ngSanitize` module provides functionality to sanitize HTML. + * + * + *
+ * + * See {@link ngSanitize.$sanitize `$sanitize`} for usage. + */ + +/* + * HTML Parser By Misko Hevery (misko@hevery.com) + * based on: HTML Parser By John Resig (ejohn.org) + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * // Use like so: + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + */ + + +/** + * @ngdoc service + * @name $sanitize + * @kind function + * + * @description + * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are + * then serialized back to properly escaped html string. This means that no unsafe input can make + * it into the returned string, however, since our parser is more strict than a typical browser + * parser, it's possible that some obscure input, which would be recognized as valid HTML by a + * browser, won't make it through the sanitizer. The input may also contain SVG markup. + * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and + * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}. + * + * @param {string} html HTML input. + * @returns {string} Sanitized HTML. + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectiveHowSourceRendered
ng-bind-htmlAutomatically uses $sanitize
<div ng-bind-html="snippet">
</div>
ng-bind-htmlBypass $sanitize by explicitly trusting the dangerous value +
<div ng-bind-html="deliberatelyTrustDangerousSnippet()">
+</div>
+
ng-bindAutomatically escapes
<div ng-bind="snippet">
</div>
+
+
+ + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('

an html\nclick here\nsnippet

'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("

an html\n" + + "click here\n" + + "snippet

"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new text'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new text'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new text'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); +
+
+ */ +function $SanitizeProvider() { + this.$get = ['$$sanitizeUri', function($$sanitizeUri) { + return function(html) { + var buf = []; + htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { + return !/^unsafe/.test($$sanitizeUri(uri, isImage)); + })); + return buf.join(''); + }; + }]; +} + +function sanitizeText(chars) { + var buf = []; + var writer = htmlSanitizeWriter(buf, angular.noop); + writer.chars(chars); + return buf.join(''); +} + + +// Regular Expressions for parsing tags and attributes +var START_TAG_REGEXP = + /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/, + END_TAG_REGEXP = /^<\/\s*([\w:-]+)[^>]*>/, + ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, + BEGIN_TAG_REGEXP = /^/g, + DOCTYPE_REGEXP = /]*?)>/i, + CDATA_REGEXP = //g, + SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + // Match everything outside of normal chars and " (quote character) + NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; + + +// Good source of info about elements and attributes +// http://dev.w3.org/html5/spec/Overview.html#semantics +// http://simon.html5.org/html-elements + +// Safe Void Elements - HTML5 +// http://dev.w3.org/html5/spec/Overview.html#void-elements +var voidElements = makeMap("area,br,col,hr,img,wbr"); + +// Elements that you can, intentionally, leave open (and which close themselves) +// http://dev.w3.org/html5/spec/Overview.html#optional-tags +var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), + optionalEndTagInlineElements = makeMap("rp,rt"), + optionalEndTagElements = angular.extend({}, + optionalEndTagInlineElements, + optionalEndTagBlockElements); + +// Safe Block Elements - HTML5 +var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," + + "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," + + "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")); + +// Inline Elements - HTML5 +var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," + + "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," + + "samp,small,span,strike,strong,sub,sup,time,tt,u,var")); + +// SVG Elements +// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements +// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted. +// They can potentially allow for arbitrary javascript to be executed. See #11290 +var svgElements = makeMap("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph," + + "hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline," + + "radialGradient,rect,stop,svg,switch,text,title,tspan,use"); + +// Special Elements (can contain anything) +var specialElements = makeMap("script,style"); + +var validElements = angular.extend({}, + voidElements, + blockElements, + inlineElements, + optionalEndTagElements, + svgElements); + +//Attributes that have href and hence need to be sanitized +var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap,xlink:href"); + +var htmlAttrs = makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' + + 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' + + 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' + + 'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' + + 'valign,value,vspace,width'); + +// SVG attributes (without "id" and "name" attributes) +// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes +var svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' + + 'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' + + 'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' + + 'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' + + 'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' + + 'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' + + 'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' + + 'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' + + 'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' + + 'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' + + 'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' + + 'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' + + 'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' + + 'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' + + 'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true); + +var validAttrs = angular.extend({}, + uriAttrs, + svgAttrs, + htmlAttrs); + +function makeMap(str, lowercaseKeys) { + var obj = {}, items = str.split(','), i; + for (i = 0; i < items.length; i++) { + obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true; + } + return obj; +} + + +/** + * @example + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * @param {string} html string + * @param {object} handler + */ +function htmlParser(html, handler) { + if (typeof html !== 'string') { + if (html === null || typeof html === 'undefined') { + html = ''; + } else { + html = '' + html; + } + } + var index, chars, match, stack = [], last = html, text; + stack.last = function() { return stack[stack.length - 1]; }; + + while (html) { + text = ''; + chars = true; + + // Make sure we're not in a script or style element + if (!stack.last() || !specialElements[stack.last()]) { + + // Comment + if (html.indexOf("", index) === index) { + if (handler.comment) handler.comment(html.substring(4, index)); + html = html.substring(index + 3); + chars = false; + } + // DOCTYPE + } else if (DOCTYPE_REGEXP.test(html)) { + match = html.match(DOCTYPE_REGEXP); + + if (match) { + html = html.replace(match[0], ''); + chars = false; + } + // end tag + } else if (BEGING_END_TAGE_REGEXP.test(html)) { + match = html.match(END_TAG_REGEXP); + + if (match) { + html = html.substring(match[0].length); + match[0].replace(END_TAG_REGEXP, parseEndTag); + chars = false; + } + + // start tag + } else if (BEGIN_TAG_REGEXP.test(html)) { + match = html.match(START_TAG_REGEXP); + + if (match) { + // We only have a valid start-tag if there is a '>'. + if (match[4]) { + html = html.substring(match[0].length); + match[0].replace(START_TAG_REGEXP, parseStartTag); + } + chars = false; + } else { + // no ending tag found --- this piece should be encoded as an entity. + text += '<'; + html = html.substring(1); + } + } + + if (chars) { + index = html.indexOf("<"); + + text += index < 0 ? html : html.substring(0, index); + html = index < 0 ? "" : html.substring(index); + + if (handler.chars) handler.chars(decodeEntities(text)); + } + + } else { + // IE versions 9 and 10 do not understand the regex '[^]', so using a workaround with [\W\w]. + html = html.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), + function(all, text) { + text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1"); + + if (handler.chars) handler.chars(decodeEntities(text)); + + return ""; + }); + + parseEndTag("", stack.last()); + } + + if (html == last) { + throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " + + "of html: {0}", html); + } + last = html; + } + + // Clean up any remaining tags + parseEndTag(); + + function parseStartTag(tag, tagName, rest, unary) { + tagName = angular.lowercase(tagName); + if (blockElements[tagName]) { + while (stack.last() && inlineElements[stack.last()]) { + parseEndTag("", stack.last()); + } + } + + if (optionalEndTagElements[tagName] && stack.last() == tagName) { + parseEndTag("", tagName); + } + + unary = voidElements[tagName] || !!unary; + + if (!unary) { + stack.push(tagName); + } + + var attrs = {}; + + rest.replace(ATTR_REGEXP, + function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) { + var value = doubleQuotedValue + || singleQuotedValue + || unquotedValue + || ''; + + attrs[name] = decodeEntities(value); + }); + if (handler.start) handler.start(tagName, attrs, unary); + } + + function parseEndTag(tag, tagName) { + var pos = 0, i; + tagName = angular.lowercase(tagName); + if (tagName) { + // Find the closest opened tag of the same type + for (pos = stack.length - 1; pos >= 0; pos--) { + if (stack[pos] == tagName) break; + } + } + + if (pos >= 0) { + // Close all the open elements, up the stack + for (i = stack.length - 1; i >= pos; i--) + if (handler.end) handler.end(stack[i]); + + // Remove the open elements from the stack + stack.length = pos; + } + } +} + +var hiddenPre=document.createElement("pre"); +/** + * decodes all entities into regular string + * @param value + * @returns {string} A string with decoded entities. + */ +function decodeEntities(value) { + if (!value) { return ''; } + + hiddenPre.innerHTML = value.replace(//g, '>'); +} + +/** + * create an HTML/XML writer which writes to buffer + * @param {Array} buf use buf.jain('') to get out sanitized html string + * @returns {object} in the form of { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * } + */ +function htmlSanitizeWriter(buf, uriValidator) { + var ignore = false; + var out = angular.bind(buf, buf.push); + return { + start: function(tag, attrs, unary) { + tag = angular.lowercase(tag); + if (!ignore && specialElements[tag]) { + ignore = tag; + } + if (!ignore && validElements[tag] === true) { + out('<'); + out(tag); + angular.forEach(attrs, function(value, key) { + var lkey=angular.lowercase(key); + var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); + if (validAttrs[lkey] === true && + (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { + out(' '); + out(key); + out('="'); + out(encodeEntities(value)); + out('"'); + } + }); + out(unary ? '/>' : '>'); + } + }, + end: function(tag) { + tag = angular.lowercase(tag); + if (!ignore && validElements[tag] === true) { + out(''); + } + if (tag == ignore) { + ignore = false; + } + }, + chars: function(chars) { + if (!ignore) { + out(encodeEntities(chars)); + } + } + }; +} + + +// define ngSanitize module and register $sanitize service +angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); + +/* global sanitizeText: false */ + +/** + * @ngdoc filter + * @name linky + * @kind function + * + * @description + * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and + * plain email address links. + * + * Requires the {@link ngSanitize `ngSanitize`} module to be installed. + * + * @param {string} text Input text. + * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in. + * @returns {string} Html-linkified text. + * + * @usage + + * + * @example + + + +
+ Snippet: + + + + + + + + + + + + + + + + + + + + + +
FilterSourceRendered
linky filter +
<div ng-bind-html="snippet | linky">
</div>
+
+
+
linky target +
<div ng-bind-html="snippetWithTarget | linky:'_blank'">
</div>
+
+
+
no filter
<div ng-bind="snippet">
</div>
+ + + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); + + + */ +angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { + var LINKY_URL_REGEXP = + /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"”’]/i, + MAILTO_REGEXP = /^mailto:/i; + + return function(text, target) { + if (!text) return text; + var match; + var raw = text; + var html = []; + var url; + var i; + while ((match = raw.match(LINKY_URL_REGEXP))) { + // We can not end in these as they are sometimes found at the end of the sentence + url = match[0]; + // if we did not match ftp/http/www/mailto then assume mailto + if (!match[2] && !match[4]) { + url = (match[3] ? 'http://' : 'mailto:') + url; + } + i = match.index; + addText(raw.substr(0, i)); + addLink(url, match[0].replace(MAILTO_REGEXP, '')); + raw = raw.substring(i + match[0].length); + } + addText(raw); + return $sanitize(html.join('')); + + function addText(text) { + if (!text) { + return; + } + html.push(sanitizeText(text)); + } + + function addLink(url, text) { + html.push(''); + addText(text); + html.push(''); + } + }; +}]); + + +})(window, window.angular); diff --git a/client/www/lib/angular-sanitize/angular-sanitize.min.js b/client/www/lib/angular-sanitize/angular-sanitize.min.js new file mode 100644 index 0000000..e8c4226 --- /dev/null +++ b/client/www/lib/angular-sanitize/angular-sanitize.min.js @@ -0,0 +1,16 @@ +/* + AngularJS v1.4.3 + (c) 2010-2015 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e", +b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML= +a.replace(//g,">")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k|| +"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c(""));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^]*?)>/i, +I=/"\u201d\u2019]/i,d=/^mailto:/i;return function(c,b){function k(a){a&&g.push(E(a))}function e(a, +c){g.push("');k(c);g.push("")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/client/www/lib/angular-sanitize/angular-sanitize.min.js.map b/client/www/lib/angular-sanitize/angular-sanitize.min.js.map new file mode 100644 index 0000000..2f360f4 --- /dev/null +++ b/client/www/lib/angular-sanitize/angular-sanitize.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-sanitize.min.js", +"lineCount":15, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6JtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAmG7BC,QAASA,EAAO,CAACC,CAAD,CAAMC,CAAN,CAAqB,CAAA,IAC/BC,EAAM,EADyB,CACrBC,EAAQH,CAAAI,MAAA,CAAU,GAAV,CADa,CACGC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CACEH,CAAA,CAAID,CAAA,CAAgBX,CAAAiB,UAAA,CAAkBJ,CAAA,CAAME,CAAN,CAAlB,CAAhB,CAA8CF,CAAA,CAAME,CAAN,CAAlD,CAAA,CAA8D,CAAA,CAEhE,OAAOH,EAL4B,CAqBrCM,QAASA,EAAU,CAACC,CAAD,CAAOC,CAAP,CAAgB,CAiGjCC,QAASA,EAAa,CAACC,CAAD,CAAMC,CAAN,CAAeC,CAAf,CAAqBC,CAArB,CAA4B,CAChDF,CAAA,CAAUvB,CAAAiB,UAAA,CAAkBM,CAAlB,CACV,IAAIG,CAAA,CAAcH,CAAd,CAAJ,CACE,IAAA,CAAOI,CAAAC,KAAA,EAAP,EAAuBC,CAAA,CAAeF,CAAAC,KAAA,EAAf,CAAvB,CAAA,CACEE,CAAA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ined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","lowercaseKeys","obj","items","split","i","length","lowercase","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","hiddenPre","innerHTML","textContent","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","svgElements","htmlAttrs","svgAttrs","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"] +} diff --git a/client/www/lib/angular-sanitize/bower.json b/client/www/lib/angular-sanitize/bower.json new file mode 100644 index 0000000..ffa9554 --- /dev/null +++ b/client/www/lib/angular-sanitize/bower.json @@ -0,0 +1,9 @@ +{ + "name": "angular-sanitize", + "version": "1.4.3", + "main": "./angular-sanitize.js", + "ignore": [], + "dependencies": { + "angular": "1.4.3" + } +} diff --git a/client/www/lib/angular-sanitize/index.js b/client/www/lib/angular-sanitize/index.js new file mode 100644 index 0000000..dd5d22e --- /dev/null +++ b/client/www/lib/angular-sanitize/index.js @@ -0,0 +1,2 @@ +require('./angular-sanitize'); +module.exports = 'ngSanitize'; diff --git a/client/www/lib/angular-sanitize/package.json b/client/www/lib/angular-sanitize/package.json new file mode 100644 index 0000000..d8ee360 --- /dev/null +++ b/client/www/lib/angular-sanitize/package.json @@ -0,0 +1,26 @@ +{ + "name": "angular-sanitize", + "version": "1.4.3", + "description": "AngularJS module for sanitizing HTML", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/angular/angular.js.git" + }, + "keywords": [ + "angular", + "framework", + "browser", + "html", + "client-side" + ], + "author": "Angular Core Team ", + "license": "MIT", + "bugs": { + "url": "https://github.com/angular/angular.js/issues" + }, + "homepage": "http://angularjs.org" +} diff --git a/client/www/lib/angular-simple-logger/.bower.json b/client/www/lib/angular-simple-logger/.bower.json new file mode 100644 index 0000000..3de0d57 --- /dev/null +++ b/client/www/lib/angular-simple-logger/.bower.json @@ -0,0 +1,48 @@ +{ + "name": "angular-simple-logger", + "version": "0.1.7", + "description": "Basic logger with level logging which can also be independent.", + "main": "./dist/angular-simple-logger.js", + "homepage": "https://github.com/nmccready/angular-simple-logger", + "repository": { + "type": "git", + "url": "git://github.com/nmccready/angular-simple-logger.git" + }, + "author": "Nicholas McCready", + "license": "MIT", + "dependencies": { + "angular": "^1.2" + }, + "devDependencies": { + "angular-mocks": "^1.2" + }, + "resolutions": { + "angular": "1.4.X" + }, + "ignore": [ + ".*", + "spec", + "*.coffee", + "*.json", + ".gitignore", + ".travis.yml", + "*.html", + "package.js", + "*.md", + "src", + "gulp", + "scripts", + "node_modules", + "bower_components", + "tmp" + ], + "_release": "0.1.7", + "_resolution": { + "type": "version", + "tag": "0.1.7", + "commit": "9f0e640b4cebffbc6d35fdf92ef7472774fc401a" + }, + "_source": "https://github.com/nmccready/angular-simple-logger.git", + "_target": ">=0.0.1", + "_originalSource": "angular-simple-logger" +} \ No newline at end of file diff --git a/client/www/lib/angular-simple-logger/bower.json b/client/www/lib/angular-simple-logger/bower.json new file mode 100644 index 0000000..5befc2b --- /dev/null +++ b/client/www/lib/angular-simple-logger/bower.json @@ -0,0 +1,39 @@ +{ + "name": "angular-simple-logger", + "version": "0.1.7", + "description": "Basic logger with level logging which can also be independent.", + "main": "./dist/angular-simple-logger.js", + "homepage": "https://github.com/nmccready/angular-simple-logger", + "repository": { + "type": "git", + "url": "git://github.com/nmccready/angular-simple-logger.git" + }, + "author": "Nicholas McCready", + "license": "MIT", + "dependencies": { + "angular": "^1.2" + }, + "devDependencies": { + "angular-mocks": "^1.2" + }, + "resolutions": { + "angular": "1.4.X" + }, + "ignore": [ + ".*", + "spec", + "*.coffee", + "*.json", + ".gitignore", + ".travis.yml", + "*.html", + "package.js", + "*.md", + "src", + "gulp", + "scripts", + "node_modules", + "bower_components", + "tmp" + ] +} diff --git a/client/www/lib/angular-simple-logger/dist/angular-simple-logger.js b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.js new file mode 100644 index 0000000..7d35de4 --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.js @@ -0,0 +1,635 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= current) { + return fn(); + } + }; + _isValidLogObject = function(logObject) { + var isValid, j, len1; + isValid = false; + if (!logObject) { + return isValid; + } + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + isValid = (logObject[val] != null) && typeof logObject[val] === 'function'; + if (!isValid) { + break; + } + } + return isValid; + }; + + /* + Overide logeObject.debug with a nemDebug instance + see: https://github.com/visionmedia/debug/blob/master/Readme.md + */ + _wrapDebug = function(namespace, logObject) { + var debugInstance, j, len1, newLogger; + if (_debugCache[namespace] == null) { + _debugCache[namespace] = nemDebug(namespace); + } + debugInstance = _debugCache[namespace]; + newLogger = {}; + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + newLogger[val] = val === 'debug' ? debugInstance : logObject[val]; + } + return newLogger; + }; + Logger = (function() { + function Logger($log1) { + var fn1, j, len1, level, logFns; + this.$log = $log1; + this.spawn = bind(this.spawn, this); + if (!this.$log) { + throw 'internalLogger undefined'; + } + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + this.doLog = true; + logFns = {}; + fn1 = (function(_this) { + return function(level) { + logFns[level] = function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (_this.doLog) { + return _maybeExecLevel(LEVELS[level], _this.currentLevel, function() { + var ref; + return (ref = _this.$log)[level].apply(ref, args); + }); + } + }; + return _this[level] = logFns[level]; + }; + })(this); + for (j = 0, len1 = _fns.length; j < len1; j++) { + level = _fns[j]; + fn1(level); + } + this.LEVELS = LEVELS; + this.currentLevel = LEVELS.error; + } + + Logger.prototype.spawn = function(newInternalLogger) { + if (typeof newInternalLogger === 'string') { + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + if (!nemDebug) { + throw 'nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!'; + } + return _wrapDebug(newInternalLogger, this.$log); + } + return new Logger(newInternalLogger || this.$log); + }; + + return Logger; + + })(); + this.decorator = [ + '$log', function($delegate) { + var log; + log = new Logger($delegate); + log.currentLevel = LEVELS.debug; + return log; + } + ]; + this.$get = [ + '$log', function($log) { + return new Logger($log); + } + ]; + return this; + } +]); + +},{"debug":2}],2:[function(require,module,exports){ + +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // is webkit? http://stackoverflow.com/a/16459606/376773 + return ('WebkitAppearance' in document.documentElement.style) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (window.console && (console.firebug || (console.exception && console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + return JSON.stringify(v); +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs() { + var args = arguments; + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return args; + + var c = 'color: ' + this.color; + args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + return args; +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage(){ + try { + return window.localStorage; + } catch (e) {} +} + +},{"./debug":3}],3:[function(require,module,exports){ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = debug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lowercased letter, i.e. "n". + */ + +exports.formatters = {}; + +/** + * Previously assigned color. + */ + +var prevColor = 0; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * + * @return {Number} + * @api private + */ + +function selectColor() { + return exports.colors[prevColor++ % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function debug(namespace) { + + // define the `disabled` version + function disabled() { + } + disabled.enabled = false; + + // define the `enabled` version + function enabled() { + + var self = enabled; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // add the `color` if not set + if (null == self.useColors) self.useColors = exports.useColors(); + if (null == self.color && self.useColors) self.color = selectColor(); + + var args = Array.prototype.slice.call(arguments); + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %o + args = ['%o'].concat(args); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + if ('function' === typeof exports.formatArgs) { + args = exports.formatArgs.apply(self, args); + } + var logFn = enabled.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + enabled.enabled = true; + + var fn = exports.enabled(namespace) ? enabled : disabled; + + fn.namespace = namespace; + + return fn; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + var split = (namespaces || '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} + +},{"ms":4}],4:[function(require,module,exports){ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} options + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options){ + options = options || {}; + if ('string' == typeof val) return parse(val); + return options.long + ? long(val) + : short(val); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = '' + str; + if (str.length > 10000) return; + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function short(ms) { + if (ms >= d) return Math.round(ms / d) + 'd'; + if (ms >= h) return Math.round(ms / h) + 'h'; + if (ms >= m) return Math.round(ms / m) + 'm'; + if (ms >= s) return Math.round(ms / s) + 's'; + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function long(ms) { + return plural(ms, d, 'day') + || plural(ms, h, 'hour') + || plural(ms, m, 'minute') + || plural(ms, s, 'second') + || ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) return; + if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; + return Math.ceil(ms / n) + ' ' + name + 's'; +} + +},{}]},{},[1]); diff --git a/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.js b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.js new file mode 100644 index 0000000..c1b165c --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.js @@ -0,0 +1,147 @@ +/** + * angular-simple-logger + * + * @version: 0.1.7 + * @author: Nicholas McCready + * @date: Tue Jan 26 2016 10:15:01 GMT-0500 (EST) + * @license: MIT + */ + +(function (window, angular){ + angular.module('nemLogging', []); + +angular.module('nemLogging').provider('nemDebug', function (){ + var ourDebug = null; + + this.$get = function(){ + //avail as service + return ourDebug; + }; + + //avail at provider, config time + this.debug = ourDebug; + + return this; +}); +var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + slice = [].slice; + +angular.module('nemLogging').provider('nemSimpleLogger', [ + 'nemDebugProvider', function(nemDebugProvider) { + var LEVELS, Logger, _debugCache, _fns, _isValidLogObject, _maybeExecLevel, _wrapDebug, i, key, len, nemDebug, val; + nemDebug = nemDebugProvider.debug; + _debugCache = {}; + _fns = ['debug', 'info', 'warn', 'error', 'log']; + LEVELS = {}; + for (key = i = 0, len = _fns.length; i < len; key = ++i) { + val = _fns[key]; + LEVELS[val] = key; + } + _maybeExecLevel = function(level, current, fn) { + if (level >= current) { + return fn(); + } + }; + _isValidLogObject = function(logObject) { + var isValid, j, len1; + isValid = false; + if (!logObject) { + return isValid; + } + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + isValid = (logObject[val] != null) && typeof logObject[val] === 'function'; + if (!isValid) { + break; + } + } + return isValid; + }; + + /* + Overide logeObject.debug with a nemDebug instance + see: https://github.com/visionmedia/debug/blob/master/Readme.md + */ + _wrapDebug = function(namespace, logObject) { + var debugInstance, j, len1, newLogger; + if (_debugCache[namespace] == null) { + _debugCache[namespace] = nemDebug(namespace); + } + debugInstance = _debugCache[namespace]; + newLogger = {}; + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + newLogger[val] = val === 'debug' ? debugInstance : logObject[val]; + } + return newLogger; + }; + Logger = (function() { + function Logger($log1) { + var fn1, j, len1, level, logFns; + this.$log = $log1; + this.spawn = bind(this.spawn, this); + if (!this.$log) { + throw 'internalLogger undefined'; + } + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + this.doLog = true; + logFns = {}; + fn1 = (function(_this) { + return function(level) { + logFns[level] = function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (_this.doLog) { + return _maybeExecLevel(LEVELS[level], _this.currentLevel, function() { + var ref; + return (ref = _this.$log)[level].apply(ref, args); + }); + } + }; + return _this[level] = logFns[level]; + }; + })(this); + for (j = 0, len1 = _fns.length; j < len1; j++) { + level = _fns[j]; + fn1(level); + } + this.LEVELS = LEVELS; + this.currentLevel = LEVELS.error; + } + + Logger.prototype.spawn = function(newInternalLogger) { + if (typeof newInternalLogger === 'string') { + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + if (!nemDebug) { + throw 'nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!'; + } + return _wrapDebug(newInternalLogger, this.$log); + } + return new Logger(newInternalLogger || this.$log); + }; + + return Logger; + + })(); + this.decorator = [ + '$log', function($delegate) { + var log; + log = new Logger($delegate); + log.currentLevel = LEVELS.debug; + return log; + } + ]; + this.$get = [ + '$log', function($log) { + return new Logger($log); + } + ]; + return this; + } +]); + +})(window, angular); \ No newline at end of file diff --git a/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.min.js b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.min.js new file mode 100644 index 0000000..9c00654 --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.light.min.js @@ -0,0 +1 @@ +!function(n,r){r.module("nemLogging",[]),r.module("nemLogging").provider("nemDebug",function(){var n=null;return this.$get=function(){return n},this.debug=n,this});var t=function(n,r){return function(){return n.apply(r,arguments)}},e=[].slice;r.module("nemLogging").provider("nemSimpleLogger",["nemDebugProvider",function(n){var r,i,o,u,g,l,s,f,h,a,c,d;for(c=n.debug,o={},u=["debug","info","warn","error","log"],r={},h=f=0,a=u.length;a>f;h=++f)d=u[h],r[d]=h;return l=function(n,r,t){return n>=r?t():void 0},g=function(n){var r,t,e;if(r=!1,!n)return r;for(t=0,e=u.length;e>t&&(d=u[t],r=null!=n[d]&&"function"==typeof n[d],r);t++);return r},s=function(n,r){var t,e,i,g;for(null==o[n]&&(o[n]=c(n)),t=o[n],g={},e=0,i=u.length;i>e;e++)d=u[e],g[d]="debug"===d?t:r[d];return g},i=function(){function n(n){var i,o,s,f,h;if(this.$log=n,this.spawn=t(this.spawn,this),!this.$log)throw"internalLogger undefined";if(!g(this.$log))throw"@$log is invalid";for(this.doLog=!0,h={},i=function(n){return function(t){return h[t]=function(){var i;return i=1<=arguments.length?e.call(arguments,0):[],n.doLog?l(r[t],n.currentLevel,function(){var r;return(r=n.$log)[t].apply(r,i)}):void 0},n[t]=h[t]}}(this),o=0,s=u.length;s>o;o++)f=u[o],i(f);this.LEVELS=r,this.currentLevel=r.error}return n.prototype.spawn=function(r){if("string"==typeof r){if(!g(this.$log))throw"@$log is invalid";if(!c)throw"nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!";return s(r,this.$log)}return new n(r||this.$log)},n}(),this.decorator=["$log",function(n){var t;return t=new i(n),t.currentLevel=r.debug,t}],this.$get=["$log",function(n){return new i(n)}],this}])}(window,angular); \ No newline at end of file diff --git a/client/www/lib/angular-simple-logger/dist/angular-simple-logger.min.js b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.min.js new file mode 100644 index 0000000..9f2ade9 --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/angular-simple-logger.min.js @@ -0,0 +1 @@ +!function e(r,n,o){function t(i,u){if(!n[i]){if(!r[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[i]={exports:{}};r[i][0].call(l.exports,function(e){var n=r[i][1][e];return t(n?n:e)},l,l.exports,e,r,n,o)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;il;f=++l)h=i[f],r[h]=f;return a=function(e,r,n){return e>=r?n():void 0},u=function(e){var r,n,o;if(r=!1,!e)return r;for(n=0,o=i.length;o>n&&(h=i[n],r=null!=e[h]&&"function"==typeof e[h],r);n++);return r},c=function(e,r){var n,o,t,u;for(null==s[e]&&(s[e]=d(e)),n=s[e],u={},o=0,t=i.length;t>o;o++)h=i[o],u[h]="debug"===h?n:r[h];return u},n=function(){function e(e){var n,s,c,l,f;if(this.$log=e,this.spawn=o(this.spawn,this),!this.$log)throw"internalLogger undefined";if(!u(this.$log))throw"@$log is invalid";for(this.doLog=!0,f={},n=function(e){return function(n){return f[n]=function(){var o;return o=1<=arguments.length?t.call(arguments,0):[],e.doLog?a(r[n],e.currentLevel,function(){var r;return(r=e.$log)[n].apply(r,o)}):void 0},e[n]=f[n]}}(this),s=0,c=i.length;c>s;s++)l=i[s],n(l);this.LEVELS=r,this.currentLevel=r.error}return e.prototype.spawn=function(r){if("string"==typeof r){if(!u(this.$log))throw"@$log is invalid";if(!d)throw"nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!";return c(r,this.$log)}return new e(r||this.$log)},e}(),this.decorator=["$log",function(e){var o;return o=new n(e),o.currentLevel=r.debug,o}],this.$get=["$log",function(e){return new n(e)}],this}])},{debug:2}],2:[function(e,r,n){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function t(){var e=arguments,r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+n.humanize(this.diff),!r)return e;var o="color: "+this.color;e=[e[0],o,"color: inherit"].concat(Array.prototype.slice.call(e,1));var t=0,s=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(t++,"%c"===e&&(s=t))}),e.splice(s,0,o),e}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(r){}}function u(){var e;try{e=n.storage.debug}catch(r){}return e}function a(){try{return window.localStorage}catch(e){}}n=r.exports=e("./debug"),n.log=s,n.formatArgs=t,n.save=i,n.load=u,n.useColors=o,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(u())},{"./debug":3}],3:[function(e,r,n){function o(){return n.colors[l++%n.colors.length]}function t(e){function r(){}function t(){var e=t,r=+new Date,s=r-(c||r);e.diff=s,e.prev=c,e.curr=r,c=r,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=o());var i=Array.prototype.slice.call(arguments);i[0]=n.coerce(i[0]),"string"!=typeof i[0]&&(i=["%o"].concat(i));var u=0;i[0]=i[0].replace(/%([a-z%])/g,function(r,o){if("%%"===r)return r;u++;var t=n.formatters[o];if("function"==typeof t){var s=i[u];r=t.call(e,s),i.splice(u,1),u--}return r}),"function"==typeof n.formatArgs&&(i=n.formatArgs.apply(e,i));var a=t.log||n.log||console.log.bind(console);a.apply(e,i)}r.enabled=!1,t.enabled=!0;var s=n.enabled(e)?t:r;return s.namespace=e,s}function s(e){n.save(e);for(var r=(e||"").split(/[\s,]+/),o=r.length,t=0;o>t;t++)r[t]&&(e=r[t].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function i(){n.enable("")}function u(e){var r,o;for(r=0,o=n.skips.length;o>r;r++)if(n.skips[r].test(e))return!1;for(r=0,o=n.names.length;o>r;r++)if(n.names[r].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}n=r.exports=t,n.coerce=a,n.disable=i,n.enable=s,n.enabled=u,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var c,l=0},{ms:4}],4:[function(e,r,n){function o(e){if(e=""+e,!(e.length>1e4)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(r){var n=parseFloat(r[1]),o=(r[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function t(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function s(e){return i(e,l,"day")||i(e,c,"hour")||i(e,a,"minute")||i(e,u,"second")||e+" ms"}function i(e,r,n){return r>e?void 0:1.5*r>e?Math.floor(e/r)+" "+n:Math.ceil(e/r)+" "+n+"s"}var u=1e3,a=60*u,c=60*a,l=24*c,f=365.25*l;r.exports=function(e,r){return r=r||{},"string"==typeof e?o(e):r["long"]?s(e):t(e)}},{}]},{},[1]); \ No newline at end of file diff --git a/client/www/lib/angular-simple-logger/dist/browser.js b/client/www/lib/angular-simple-logger/dist/browser.js new file mode 100644 index 0000000..7d35de4 --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/browser.js @@ -0,0 +1,635 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= current) { + return fn(); + } + }; + _isValidLogObject = function(logObject) { + var isValid, j, len1; + isValid = false; + if (!logObject) { + return isValid; + } + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + isValid = (logObject[val] != null) && typeof logObject[val] === 'function'; + if (!isValid) { + break; + } + } + return isValid; + }; + + /* + Overide logeObject.debug with a nemDebug instance + see: https://github.com/visionmedia/debug/blob/master/Readme.md + */ + _wrapDebug = function(namespace, logObject) { + var debugInstance, j, len1, newLogger; + if (_debugCache[namespace] == null) { + _debugCache[namespace] = nemDebug(namespace); + } + debugInstance = _debugCache[namespace]; + newLogger = {}; + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + newLogger[val] = val === 'debug' ? debugInstance : logObject[val]; + } + return newLogger; + }; + Logger = (function() { + function Logger($log1) { + var fn1, j, len1, level, logFns; + this.$log = $log1; + this.spawn = bind(this.spawn, this); + if (!this.$log) { + throw 'internalLogger undefined'; + } + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + this.doLog = true; + logFns = {}; + fn1 = (function(_this) { + return function(level) { + logFns[level] = function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (_this.doLog) { + return _maybeExecLevel(LEVELS[level], _this.currentLevel, function() { + var ref; + return (ref = _this.$log)[level].apply(ref, args); + }); + } + }; + return _this[level] = logFns[level]; + }; + })(this); + for (j = 0, len1 = _fns.length; j < len1; j++) { + level = _fns[j]; + fn1(level); + } + this.LEVELS = LEVELS; + this.currentLevel = LEVELS.error; + } + + Logger.prototype.spawn = function(newInternalLogger) { + if (typeof newInternalLogger === 'string') { + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + if (!nemDebug) { + throw 'nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!'; + } + return _wrapDebug(newInternalLogger, this.$log); + } + return new Logger(newInternalLogger || this.$log); + }; + + return Logger; + + })(); + this.decorator = [ + '$log', function($delegate) { + var log; + log = new Logger($delegate); + log.currentLevel = LEVELS.debug; + return log; + } + ]; + this.$get = [ + '$log', function($log) { + return new Logger($log); + } + ]; + return this; + } +]); + +},{"debug":2}],2:[function(require,module,exports){ + +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // is webkit? http://stackoverflow.com/a/16459606/376773 + return ('WebkitAppearance' in document.documentElement.style) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (window.console && (console.firebug || (console.exception && console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + return JSON.stringify(v); +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs() { + var args = arguments; + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return args; + + var c = 'color: ' + this.color; + args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); + return args; +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage(){ + try { + return window.localStorage; + } catch (e) {} +} + +},{"./debug":3}],3:[function(require,module,exports){ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = debug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lowercased letter, i.e. "n". + */ + +exports.formatters = {}; + +/** + * Previously assigned color. + */ + +var prevColor = 0; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * + * @return {Number} + * @api private + */ + +function selectColor() { + return exports.colors[prevColor++ % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function debug(namespace) { + + // define the `disabled` version + function disabled() { + } + disabled.enabled = false; + + // define the `enabled` version + function enabled() { + + var self = enabled; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // add the `color` if not set + if (null == self.useColors) self.useColors = exports.useColors(); + if (null == self.color && self.useColors) self.color = selectColor(); + + var args = Array.prototype.slice.call(arguments); + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %o + args = ['%o'].concat(args); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + if ('function' === typeof exports.formatArgs) { + args = exports.formatArgs.apply(self, args); + } + var logFn = enabled.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + enabled.enabled = true; + + var fn = exports.enabled(namespace) ? enabled : disabled; + + fn.namespace = namespace; + + return fn; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + var split = (namespaces || '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} + +},{"ms":4}],4:[function(require,module,exports){ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} options + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options){ + options = options || {}; + if ('string' == typeof val) return parse(val); + return options.long + ? long(val) + : short(val); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = '' + str; + if (str.length > 10000) return; + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str); + if (!match) return; + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function short(ms) { + if (ms >= d) return Math.round(ms / d) + 'd'; + if (ms >= h) return Math.round(ms / h) + 'h'; + if (ms >= m) return Math.round(ms / m) + 'm'; + if (ms >= s) return Math.round(ms / s) + 's'; + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function long(ms) { + return plural(ms, d, 'day') + || plural(ms, h, 'hour') + || plural(ms, m, 'minute') + || plural(ms, s, 'second') + || ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) return; + if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; + return Math.ceil(ms / n) + ' ' + name + 's'; +} + +},{}]},{},[1]); diff --git a/client/www/lib/angular-simple-logger/dist/index.js b/client/www/lib/angular-simple-logger/dist/index.js new file mode 100644 index 0000000..78eb9b8 --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/index.js @@ -0,0 +1,146 @@ +/** + * angular-simple-logger + * + * @version: 0.1.7 + * @author: Nicholas McCready + * @date: Tue Jan 26 2016 10:15:01 GMT-0500 (EST) + * @license: MIT + */ +var angular = require('angular'); + +angular.module('nemLogging', []); + +angular.module('nemLogging').provider('nemDebug', function (){ + var ourDebug = null; + ourDebug = require('debug'); + + this.$get = function(){ + //avail as service + return ourDebug; + }; + + //avail at provider, config time + this.debug = ourDebug; + + return this; +}); +var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + slice = [].slice; + +angular.module('nemLogging').provider('nemSimpleLogger', [ + 'nemDebugProvider', function(nemDebugProvider) { + var LEVELS, Logger, _debugCache, _fns, _isValidLogObject, _maybeExecLevel, _wrapDebug, i, key, len, nemDebug, val; + nemDebug = nemDebugProvider.debug; + _debugCache = {}; + _fns = ['debug', 'info', 'warn', 'error', 'log']; + LEVELS = {}; + for (key = i = 0, len = _fns.length; i < len; key = ++i) { + val = _fns[key]; + LEVELS[val] = key; + } + _maybeExecLevel = function(level, current, fn) { + if (level >= current) { + return fn(); + } + }; + _isValidLogObject = function(logObject) { + var isValid, j, len1; + isValid = false; + if (!logObject) { + return isValid; + } + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + isValid = (logObject[val] != null) && typeof logObject[val] === 'function'; + if (!isValid) { + break; + } + } + return isValid; + }; + + /* + Overide logeObject.debug with a nemDebug instance + see: https://github.com/visionmedia/debug/blob/master/Readme.md + */ + _wrapDebug = function(namespace, logObject) { + var debugInstance, j, len1, newLogger; + if (_debugCache[namespace] == null) { + _debugCache[namespace] = nemDebug(namespace); + } + debugInstance = _debugCache[namespace]; + newLogger = {}; + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + newLogger[val] = val === 'debug' ? debugInstance : logObject[val]; + } + return newLogger; + }; + Logger = (function() { + function Logger($log1) { + var fn1, j, len1, level, logFns; + this.$log = $log1; + this.spawn = bind(this.spawn, this); + if (!this.$log) { + throw 'internalLogger undefined'; + } + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + this.doLog = true; + logFns = {}; + fn1 = (function(_this) { + return function(level) { + logFns[level] = function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (_this.doLog) { + return _maybeExecLevel(LEVELS[level], _this.currentLevel, function() { + var ref; + return (ref = _this.$log)[level].apply(ref, args); + }); + } + }; + return _this[level] = logFns[level]; + }; + })(this); + for (j = 0, len1 = _fns.length; j < len1; j++) { + level = _fns[j]; + fn1(level); + } + this.LEVELS = LEVELS; + this.currentLevel = LEVELS.error; + } + + Logger.prototype.spawn = function(newInternalLogger) { + if (typeof newInternalLogger === 'string') { + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + if (!nemDebug) { + throw 'nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!'; + } + return _wrapDebug(newInternalLogger, this.$log); + } + return new Logger(newInternalLogger || this.$log); + }; + + return Logger; + + })(); + this.decorator = [ + '$log', function($delegate) { + var log; + log = new Logger($delegate); + log.currentLevel = LEVELS.debug; + return log; + } + ]; + this.$get = [ + '$log', function($log) { + return new Logger($log); + } + ]; + return this; + } +]); diff --git a/client/www/lib/angular-simple-logger/dist/index.light.js b/client/www/lib/angular-simple-logger/dist/index.light.js new file mode 100644 index 0000000..c1b165c --- /dev/null +++ b/client/www/lib/angular-simple-logger/dist/index.light.js @@ -0,0 +1,147 @@ +/** + * angular-simple-logger + * + * @version: 0.1.7 + * @author: Nicholas McCready + * @date: Tue Jan 26 2016 10:15:01 GMT-0500 (EST) + * @license: MIT + */ + +(function (window, angular){ + angular.module('nemLogging', []); + +angular.module('nemLogging').provider('nemDebug', function (){ + var ourDebug = null; + + this.$get = function(){ + //avail as service + return ourDebug; + }; + + //avail at provider, config time + this.debug = ourDebug; + + return this; +}); +var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + slice = [].slice; + +angular.module('nemLogging').provider('nemSimpleLogger', [ + 'nemDebugProvider', function(nemDebugProvider) { + var LEVELS, Logger, _debugCache, _fns, _isValidLogObject, _maybeExecLevel, _wrapDebug, i, key, len, nemDebug, val; + nemDebug = nemDebugProvider.debug; + _debugCache = {}; + _fns = ['debug', 'info', 'warn', 'error', 'log']; + LEVELS = {}; + for (key = i = 0, len = _fns.length; i < len; key = ++i) { + val = _fns[key]; + LEVELS[val] = key; + } + _maybeExecLevel = function(level, current, fn) { + if (level >= current) { + return fn(); + } + }; + _isValidLogObject = function(logObject) { + var isValid, j, len1; + isValid = false; + if (!logObject) { + return isValid; + } + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + isValid = (logObject[val] != null) && typeof logObject[val] === 'function'; + if (!isValid) { + break; + } + } + return isValid; + }; + + /* + Overide logeObject.debug with a nemDebug instance + see: https://github.com/visionmedia/debug/blob/master/Readme.md + */ + _wrapDebug = function(namespace, logObject) { + var debugInstance, j, len1, newLogger; + if (_debugCache[namespace] == null) { + _debugCache[namespace] = nemDebug(namespace); + } + debugInstance = _debugCache[namespace]; + newLogger = {}; + for (j = 0, len1 = _fns.length; j < len1; j++) { + val = _fns[j]; + newLogger[val] = val === 'debug' ? debugInstance : logObject[val]; + } + return newLogger; + }; + Logger = (function() { + function Logger($log1) { + var fn1, j, len1, level, logFns; + this.$log = $log1; + this.spawn = bind(this.spawn, this); + if (!this.$log) { + throw 'internalLogger undefined'; + } + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + this.doLog = true; + logFns = {}; + fn1 = (function(_this) { + return function(level) { + logFns[level] = function() { + var args; + args = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (_this.doLog) { + return _maybeExecLevel(LEVELS[level], _this.currentLevel, function() { + var ref; + return (ref = _this.$log)[level].apply(ref, args); + }); + } + }; + return _this[level] = logFns[level]; + }; + })(this); + for (j = 0, len1 = _fns.length; j < len1; j++) { + level = _fns[j]; + fn1(level); + } + this.LEVELS = LEVELS; + this.currentLevel = LEVELS.error; + } + + Logger.prototype.spawn = function(newInternalLogger) { + if (typeof newInternalLogger === 'string') { + if (!_isValidLogObject(this.$log)) { + throw '@$log is invalid'; + } + if (!nemDebug) { + throw 'nemDebug is undefined this is probably the light version of this library sep debug logggers is not supported!'; + } + return _wrapDebug(newInternalLogger, this.$log); + } + return new Logger(newInternalLogger || this.$log); + }; + + return Logger; + + })(); + this.decorator = [ + '$log', function($delegate) { + var log; + log = new Logger($delegate); + log.currentLevel = LEVELS.debug; + return log; + } + ]; + this.$get = [ + '$log', function($log) { + return new Logger($log); + } + ]; + return this; + } +]); + +})(window, angular); \ No newline at end of file diff --git a/client/www/lib/angular-ui-router/.bower.json b/client/www/lib/angular-ui-router/.bower.json new file mode 100644 index 0000000..879b42f --- /dev/null +++ b/client/www/lib/angular-ui-router/.bower.json @@ -0,0 +1,33 @@ +{ + "name": "angular-ui-router", + "version": "0.2.13", + "main": "./release/angular-ui-router.js", + "dependencies": { + "angular": ">= 1.0.8" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "component.json", + "package.json", + "lib", + "config", + "sample", + "test", + "tests", + "ngdoc_assets", + "Gruntfile.js", + "files.js" + ], + "homepage": "https://github.com/angular-ui/angular-ui-router-bower", + "_release": "0.2.13", + "_resolution": { + "type": "version", + "tag": "0.2.13", + "commit": "2e580f271defdec34f464aab0cca519e41d1ee33" + }, + "_source": "https://github.com/angular-ui/angular-ui-router-bower.git", + "_target": "0.2.13", + "_originalSource": "angular-ui-router" +} \ No newline at end of file diff --git a/client/www/lib/angular-ui-router/CHANGELOG.md b/client/www/lib/angular-ui-router/CHANGELOG.md new file mode 100644 index 0000000..e0848c3 --- /dev/null +++ b/client/www/lib/angular-ui-router/CHANGELOG.md @@ -0,0 +1,197 @@ + +### 0.2.13 (2014-11-20) + +This release primarily fixes issues reported against 0.2.12 + +#### Bug Fixes + +* **$state:** fix $state.includes/.is to apply param types before comparisions fix(uiSref): ma ([19715d15](https://github.com/angular-ui/ui-router/commit/19715d15e3cbfff724519e9febedd05b49c75baa), closes [#1513](https://github.com/angular-ui/ui-router/issues/1513)) + * Avoid re-synchronizing from url after .transitionTo ([b267ecd3](https://github.com/angular-ui/ui-router/commit/b267ecd348e5c415233573ef95ebdbd051875f52), closes [#1573](https://github.com/angular-ui/ui-router/issues/1573)) +* **$urlMatcherFactory:** + * Built-in date type uses local time zone ([d726bedc](https://github.com/angular-ui/ui-router/commit/d726bedcbb5f70a5660addf43fd52ec730790293)) + * make date type fn check .is before running ([aa94ce3b](https://github.com/angular-ui/ui-router/commit/aa94ce3b86632ad05301530a2213099da73a3dc0), closes [#1564](https://github.com/angular-ui/ui-router/issues/1564)) + * early binding of array handler bypasses type resolution ([ada4bc27](https://github.com/angular-ui/ui-router/commit/ada4bc27df5eff3ba3ab0de94a09bd91b0f7a28c)) + * add 'any' Type for non-encoding non-url params ([3bfd75ab](https://github.com/angular-ui/ui-router/commit/3bfd75ab445ee2f1dd55275465059ed116b10b27), closes [#1562](https://github.com/angular-ui/ui-router/issues/1562)) + * fix encoding slashes in params ([0c983a08](https://github.com/angular-ui/ui-router/commit/0c983a08e2947f999683571477debd73038e95cf), closes [#1119](https://github.com/angular-ui/ui-router/issues/1119)) + * fix mixed path/query params ordering problem ([a479fbd0](https://github.com/angular-ui/ui-router/commit/a479fbd0b8eb393a94320973e5b9a62d83912ee2), closes [#1543](https://github.com/angular-ui/ui-router/issues/1543)) +* **ArrayType:** + * specify empty array mapping corner case ([74aa6091](https://github.com/angular-ui/ui-router/commit/74aa60917e996b0b4e27bbb4eb88c3c03832021d), closes [#1511](https://github.com/angular-ui/ui-router/issues/1511)) + * fix .equals for array types ([5e6783b7](https://github.com/angular-ui/ui-router/commit/5e6783b77af9a90ddff154f990b43dbb17eeda6e), closes [#1538](https://github.com/angular-ui/ui-router/issues/1538)) +* **Param:** fix default value shorthand declaration ([831d812a](https://github.com/angular-ui/ui-router/commit/831d812a524524c71f0ee1c9afaf0487a5a66230), closes [#1554](https://github.com/angular-ui/ui-router/issues/1554)) +* **common:** fixed the _.filter clone to not create sparse arrays ([750f5cf5](https://github.com/angular-ui/ui-router/commit/750f5cf5fd91f9ada96f39e50d39aceb2caf22b6), closes [#1563](https://github.com/angular-ui/ui-router/issues/1563)) +* **ie8:** fix calls to indexOf and filter ([dcb31b84](https://github.com/angular-ui/ui-router/commit/dcb31b843391b3e61dee4de13f368c109541813e), closes [#1556](https://github.com/angular-ui/ui-router/issues/1556)) + + +#### Features + +* add json parameter Type ([027f1fcf](https://github.com/angular-ui/ui-router/commit/027f1fcf9c0916cea651e88981345da6f9ff214a)) + + + +### 0.2.12 (2014-11-13) + +#### Bug Fixes + +* **$resolve:** use resolve fn result, not parent resolved value of same name ([67f5e00c](https://github.com/angular-ui/ui-router/commit/67f5e00cc9aa006ce3fe6cde9dff261c28eab70a), closes [#1317], [#1353]) +* **$state:** + * populate default params in .transitionTo. ([3f60fbe6](https://github.com/angular-ui/ui-router/commit/3f60fbe6d65ebeca8d97952c05aa1d269f1b7ba1), closes [#1396]) + * reload() now reinvokes controllers ([73443420](https://github.com/angular-ui/ui-router/commit/7344342018847902594dc1fc62d30a5c30f01763), closes [#582]) + * do not emit $viewContentLoading if notify: false ([74255feb](https://github.com/angular-ui/ui-router/commit/74255febdf48ae082a02ca1e735165f2c369a463), closes [#1387](https://github.com/angular-ui/ui-router/issues/1387)) + * register states at config-time ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) + * handle parent.name when parent is obj ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a)) +* **$urlMatcherFactory:** + * register types at config ([4533fe36](https://github.com/angular-ui/ui-router/commit/4533fe36e0ab2f0143edd854a4145deaa013915a), closes [#1476]) + * made path params default value "" for backwards compat ([8f998e71](https://github.com/angular-ui/ui-router/commit/8f998e71e43a0b31293331c981f5db0f0097b8ba)) + * Pre-replace certain param values for better mapping ([6374a3e2](https://github.com/angular-ui/ui-router/commit/6374a3e29ab932014a7c77d2e1ab884cc841a2e3)) + * fixed ParamSet.$$keys() ordering ([9136fecb](https://github.com/angular-ui/ui-router/commit/9136fecbc2bfd4fda748a9914f0225a46c933860)) + * empty string policy now respected in Param.value() ([db12c85c](https://github.com/angular-ui/ui-router/commit/db12c85c16f2d105415f9bbbdeb11863f64728e0)) + * "string" type now encodes/decodes slashes ([3045e415](https://github.com/angular-ui/ui-router/commit/3045e41577a8b8b8afc6039f42adddf5f3c061ec), closes [#1119]) + * allow arrays in both path and query params ([fdd2f2c1](https://github.com/angular-ui/ui-router/commit/fdd2f2c191c4a67c874fdb9ec9a34f8dde9ad180), closes [#1073], [#1045], [#1486], [#1394]) + * typed params in search ([8d4cab69](https://github.com/angular-ui/ui-router/commit/8d4cab69dd67058e1a716892cc37b7d80a57037f), closes [#1488](https://github.com/angular-ui/ui-router/issues/1488)) + * no longer generate unroutable urls ([cb9fd9d8](https://github.com/angular-ui/ui-router/commit/cb9fd9d8943cb26c7223f6990db29c82ae8740f8), closes [#1487](https://github.com/angular-ui/ui-router/issues/1487)) + * handle optional parameter followed by required parameter in url format. ([efc72106](https://github.com/angular-ui/ui-router/commit/efc72106ddcc4774b48ea176a505ef9e95193b41)) + * default to parameter string coersion. ([13a468a7](https://github.com/angular-ui/ui-router/commit/13a468a7d54c2fb0751b94c0c1841d580b71e6dc), closes [#1414](https://github.com/angular-ui/ui-router/issues/1414)) + * concat respects strictMode/caseInsensitive ([dd72e103](https://github.com/angular-ui/ui-router/commit/dd72e103edb342d9cf802816fe127e1bbd68fd5f), closes [#1395]) +* **ui-sref:** + * Allow sref state options to take a scope object ([b5f7b596](https://github.com/angular-ui/ui-router/commit/b5f7b59692ce4933e2d63eb5df3f50a4ba68ccc0)) + * replace raw href modification with attrs. ([08c96782](https://github.com/angular-ui/ui-router/commit/08c96782faf881b0c7ab00afc233ee6729548fa0)) + * nagivate to state when url is "" fix($state.href): generate href for state with ([656b5aab](https://github.com/angular-ui/ui-router/commit/656b5aab906e5749db9b5a080c6a83b95f50fd91), closes [#1363](https://github.com/angular-ui/ui-router/issues/1363)) + * Check that state is defined in isMatch() ([92aebc75](https://github.com/angular-ui/ui-router/commit/92aebc7520f88babdc6e266536086e07263514c3), closes [#1314](https://github.com/angular-ui/ui-router/issues/1314), [#1332](https://github.com/angular-ui/ui-router/issues/1332)) +* **uiView:** + * allow inteprolated ui-view names ([81f6a19a](https://github.com/angular-ui/ui-router/commit/81f6a19a432dac9198fd33243855bfd3b4fea8c0), closes [#1324](https://github.com/angular-ui/ui-router/issues/1324)) + * Made anim work with angular 1.3 ([c3bb7ad9](https://github.com/angular-ui/ui-router/commit/c3bb7ad903da1e1f3c91019cfd255be8489ff4ef), closes [#1367](https://github.com/angular-ui/ui-router/issues/1367), [#1345](https://github.com/angular-ui/ui-router/issues/1345)) +* **urlRouter:** html5Mode accepts an object from angular v1.3.0-rc.3 ([7fea1e9d](https://github.com/angular-ui/ui-router/commit/7fea1e9d0d8c6e09cc6c895ecb93d4221e9adf48)) +* **stateFilters:** mark state filters as stateful. ([a00b353e](https://github.com/angular-ui/ui-router/commit/a00b353e3036f64a81245c4e7898646ba218f833), closes [#1479]) +* **ui-router:** re-add IE8 compatibility for map/filter/keys ([8ce69d9f](https://github.com/angular-ui/ui-router/commit/8ce69d9f7c886888ab53eca7e53536f36b428aae), closes [#1518], [#1383]) +* **package:** point 'main' to a valid filename ([ac903350](https://github.com/angular-ui/ui-router/commit/ac9033501debb63364539d91fbf3a0cba4579f8e)) +* **travis:** make CI build faster ([0531de05](https://github.com/angular-ui/ui-router/commit/0531de052e414a8d839fbb4e7635e923e94865b3)) + + +#### Features + +##### Default and Typed params + +This release includes a lot of bug fixes around default/optional and typed parameters. As such, 0.2.12 is the first release where we recommend those features be used. + +* **$state:** + * add state params validation ([b1379e6a](https://github.com/angular-ui/ui-router/commit/b1379e6a4d38f7ed7436e05873932d7c279af578), closes [#1433](https://github.com/angular-ui/ui-router/issues/1433)) + * is/includes/get work on relative stateOrName ([232e94b3](https://github.com/angular-ui/ui-router/commit/232e94b3c2ca2c764bb9510046e4b61690c87852)) + * .reload() returns state transition promise ([639e0565](https://github.com/angular-ui/ui-router/commit/639e0565dece9d5544cc93b3eee6e11c99bd7373)) +* **$templateFactory:** request templateURL as text/html ([ccd60769](https://github.com/angular-ui/ui-router/commit/ccd6076904a4b801d77b47f6e2de4c06ce9962f8), closes [#1287]) +* **$urlMatcherFactory:** Made a Params and ParamSet class ([0cc1e6cc](https://github.com/angular-ui/ui-router/commit/0cc1e6cc461a4640618e2bb594566551c54834e2)) + + + + +### 0.2.11 (2014-08-26) + + +#### Bug Fixes + +* **$resolve:** Resolves only inherit from immediate parent fixes #702 ([df34e20c](https://github.com/angular-ui/ui-router/commit/df34e20c576299e7a3c8bd4ebc68d42341c0ace9)) +* **$state:** + * change $state.href default options.inherit to true ([deea695f](https://github.com/angular-ui/ui-router/commit/deea695f5cacc55de351ab985144fd233c02a769)) + * sanity-check state lookups ([456fd5ae](https://github.com/angular-ui/ui-router/commit/456fd5aec9ea507518927bfabd62b4afad4cf714), closes [#980](https://github.com/angular-ui/ui-router/issues/980)) + * didn't comply to inherit parameter ([09836781](https://github.com/angular-ui/ui-router/commit/09836781f126c1c485b06551eb9cfd4fa0f45c35)) + * allow view content loading broadcast ([7b78edee](https://github.com/angular-ui/ui-router/commit/7b78edeeb52a74abf4d3f00f79534033d5a08d1a)) +* **$urlMatcherFactory:** + * detect injected functions ([91f75ae6](https://github.com/angular-ui/ui-router/commit/91f75ae66c4d129f6f69e53bd547594e9661f5d5)) + * syntax ([1ebed370](https://github.com/angular-ui/ui-router/commit/1ebed37069bae8614d41541d56521f5c45f703f3)) +* **UrlMatcher:** + * query param function defaults ([f9c20530](https://github.com/angular-ui/ui-router/commit/f9c205304f10d8a4ebe7efe9025e642016479a51)) + * don't decode default values ([63607bdb](https://github.com/angular-ui/ui-router/commit/63607bdbbcb432d3fb37856a1cb3da0cd496804e)) +* **travis:** update Node version to fix build ([d6b95ef2](https://github.com/angular-ui/ui-router/commit/d6b95ef23d9dacb4eba08897f5190a0bcddb3a48)) +* **uiSref:** + * Generate an href for states with a blank url. closes #1293 ([691745b1](https://github.com/angular-ui/ui-router/commit/691745b12fa05d3700dd28f0c8d25f8a105074ad)) + * should inherit params by default ([b973dad1](https://github.com/angular-ui/ui-router/commit/b973dad155ad09a7975e1476bd096f7b2c758eeb)) + * cancel transition if preventDefault() has been called ([2e6d9167](https://github.com/angular-ui/ui-router/commit/2e6d9167d3afbfbca6427e53e012f94fb5fb8022)) +* **uiView:** Fixed infinite loop when is called .go() from a controller. ([e13988b8](https://github.com/angular-ui/ui-router/commit/e13988b8cd6231d75c78876ee9d012cc87f4a8d9), closes [#1194](https://github.com/angular-ui/ui-router/issues/1194)) +* **docs:** + * Fixed link to milestones ([6c0ae500](https://github.com/angular-ui/ui-router/commit/6c0ae500cc238ea9fc95adcc15415c55fc9e1f33)) + * fix bug in decorator example ([4bd00af5](https://github.com/angular-ui/ui-router/commit/4bd00af50b8b88a49d1545a76290731cb8e0feb1)) + * Removed an incorrect semi-colon ([af97cef8](https://github.com/angular-ui/ui-router/commit/af97cef8b967f2e32177e539ef41450dca131a7d)) + * Explain return value of rule as function ([5e887890](https://github.com/angular-ui/ui-router/commit/5e8878900a6ffe59a81aed531a3925e34a297377)) + + +#### Features + +* **$state:** + * allow parameters to pass unharmed ([8939d057](https://github.com/angular-ui/ui-router/commit/8939d0572ab1316e458ef016317ecff53131a822)) + * **BREAKING CHANGE**: state parameters are no longer automatically coerced to strings, and unspecified parameter values are now set to undefined rather than null. + * allow prevent syncUrl on failure ([753060b9](https://github.com/angular-ui/ui-router/commit/753060b910d5d2da600a6fa0757976e401c33172)) +* **typescript:** Add typescript definitions for component builds ([521ceb3f](https://github.com/angular-ui/ui-router/commit/521ceb3fd7850646422f411921e21ce5e7d82e0f)) +* **uiSref:** extend syntax for ui-sref ([71cad3d6](https://github.com/angular-ui/ui-router/commit/71cad3d636508b5a9fe004775ad1f1adc0c80c3e)) +* **uiSrefActive:** + * Also activate for child states. ([bf163ad6](https://github.com/angular-ui/ui-router/commit/bf163ad6ce176ce28792696c8302d7cdf5c05a01), closes [#818](https://github.com/angular-ui/ui-router/issues/818)) + * **BREAKING CHANGE** Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance. + + * uiSrefActiveEq: new directive with old ui-sref-active behavior +* **$urlRouter:** + * defer URL change interception ([c72d8ce1](https://github.com/angular-ui/ui-router/commit/c72d8ce11916d0ac22c81b409c9e61d7048554d7)) + * force URLs to have valid params ([d48505cd](https://github.com/angular-ui/ui-router/commit/d48505cd328d83e39d5706e085ba319715f999a6)) + * abstract $location handling ([08b4636b](https://github.com/angular-ui/ui-router/commit/08b4636b294611f08db35f00641eb5211686fb50)) +* **$urlMatcherFactory:** + * fail on bad parameters ([d8f124c1](https://github.com/angular-ui/ui-router/commit/d8f124c10d00c7e5dde88c602d966db261aea221)) + * date type support ([b7f074ff](https://github.com/angular-ui/ui-router/commit/b7f074ff65ca150a3cdbda4d5ad6cb17107300eb)) + * implement type support ([450b1f0e](https://github.com/angular-ui/ui-router/commit/450b1f0e8e03c738174ff967f688b9a6373290f4)) +* **UrlMatcher:** + * handle query string arrays ([9cf764ef](https://github.com/angular-ui/ui-router/commit/9cf764efab45fa9309368688d535ddf6e96d6449), closes [#373](https://github.com/angular-ui/ui-router/issues/373)) + * injectable functions as defaults ([00966ecd](https://github.com/angular-ui/ui-router/commit/00966ecd91fb745846039160cab707bfca8b3bec)) + * default values & type decoding for query params ([a472b301](https://github.com/angular-ui/ui-router/commit/a472b301389fbe84d1c1fa9f24852b492a569d11)) + * allow shorthand definitions ([5b724304](https://github.com/angular-ui/ui-router/commit/5b7243049793505e44b6608ea09878c37c95b1f5)) + * validates whole interface ([32b27db1](https://github.com/angular-ui/ui-router/commit/32b27db173722e9194ef1d5c0ea7d93f25a98d11)) + * implement non-strict matching ([a3e21366](https://github.com/angular-ui/ui-router/commit/a3e21366bee0475c9795a1ec76f70eec41c5b4e3)) + * add per-param config support ([07b3029f](https://github.com/angular-ui/ui-router/commit/07b3029f4d409cf955780113df92e36401b47580)) + * **BREAKING CHANGE**: the `params` option in state configurations must now be an object keyed by parameter name. + +### 0.2.10 (2014-03-12) + + +#### Bug Fixes + +* **$state:** use $browser.baseHref() when generating urls with .href() ([cbcc8488](https://github.com/angular-ui/ui-router/commit/cbcc84887d6b6d35258adabb97c714cd9c1e272d)) +* **bower.json:** JS files should not be ignored ([ccdab193](https://github.com/angular-ui/ui-router/commit/ccdab193315f304eb3be5f5b97c47a926c79263e)) +* **dev:** karma:background task is missing, can't run grunt:dev. ([d9f7b898](https://github.com/angular-ui/ui-router/commit/d9f7b898e8e3abb8c846b0faa16a382913d7b22b)) +* **sample:** Contacts menu button not staying active when navigating to detail states. Need t ([2fcb8443](https://github.com/angular-ui/ui-router/commit/2fcb84437cb43ade12682a92b764f13cac77dfe7)) +* **uiSref:** support mock-clicks/events with no data ([717d3ff7](https://github.com/angular-ui/ui-router/commit/717d3ff7d0ba72d239892dee562b401cdf90e418)) +* **uiView:** + * Do NOT autoscroll when autoscroll attr is missing ([affe5bd7](https://github.com/angular-ui/ui-router/commit/affe5bd785cdc3f02b7a9f64a52e3900386ec3a0), closes [#807](https://github.com/angular-ui/ui-router/issues/807)) + * Refactoring uiView directive to copy ngView logic ([548fab6a](https://github.com/angular-ui/ui-router/commit/548fab6ab9debc9904c5865c8bc68b4fc3271dd0), closes [#857](https://github.com/angular-ui/ui-router/issues/857), [#552](https://github.com/angular-ui/ui-router/issues/552)) + + +#### Features + +* **$state:** includes() allows glob patterns for state matching. ([2d5f6b37](https://github.com/angular-ui/ui-router/commit/2d5f6b37191a3135f4a6d9e8f344c54edcdc065b)) +* **UrlMatcher:** Add support for case insensitive url matching ([642d5247](https://github.com/angular-ui/ui-router/commit/642d524799f604811e680331002feec7199a1fb5)) +* **uiSref:** add support for transition options ([2ed7a728](https://github.com/angular-ui/ui-router/commit/2ed7a728cee6854b38501fbc1df6139d3de5b28a)) +* **uiView:** add controllerAs config with function ([1ee7334a](https://github.com/angular-ui/ui-router/commit/1ee7334a73efeccc9b95340e315cdfd59944762d)) + + +### 0.2.9 (2014-01-17) + + +This release is identical to 0.2.8. 0.2.8 was re-tagged in git to fix a problem with bower. + + +### 0.2.8 (2014-01-16) + + +#### Bug Fixes + +* **$state:** allow null to be passed as 'params' param ([094dc30e](https://github.com/angular-ui/ui-router/commit/094dc30e883e1bd14e50a475553bafeaade3b178)) +* **$state.go:** param inheritance shouldn't inherit from siblings ([aea872e0](https://github.com/angular-ui/ui-router/commit/aea872e0b983cb433436ce5875df10c838fccedb)) +* **bower.json:** fixes bower.json ([eed3cc4d](https://github.com/angular-ui/ui-router/commit/eed3cc4d4dfef1d3ef84b9fd063127538ebf59d3)) +* **uiSrefActive:** annotate controller injection ([85921422](https://github.com/angular-ui/ui-router/commit/85921422ff7fb0effed358136426d616cce3d583), closes [#671](https://github.com/angular-ui/ui-router/issues/671)) +* **uiView:** + * autoscroll tests pass on 1.2.4 & 1.1.5 ([86eacac0](https://github.com/angular-ui/ui-router/commit/86eacac09ca5e9000bd3b9c7ba6e2cc95d883a3a)) + * don't animate initial load ([83b6634d](https://github.com/angular-ui/ui-router/commit/83b6634d27942ca74766b2b1244a7fc52c5643d9)) + * test pass against 1.0.8 and 1.2.4 ([a402415a](https://github.com/angular-ui/ui-router/commit/a402415a2a28b360c43b9fe8f4f54c540f6c33de)) + * it should autoscroll when expr is missing. ([8bb9e27a](https://github.com/angular-ui/ui-router/commit/8bb9e27a2986725f45daf44c4c9f846385095aff)) + + +#### Features + +* **uiSref:** add target attribute behaviour ([c12bf9a5](https://github.com/angular-ui/ui-router/commit/c12bf9a520d30d70294e3d82de7661900f8e394e)) +* **uiView:** + * merge autoscroll expression test. ([b89e0f87](https://github.com/angular-ui/ui-router/commit/b89e0f871d5cc35c10925ede986c10684d5c9252)) + * cache and test autoscroll expression ([ee262282](https://github.com/angular-ui/ui-router/commit/ee2622828c2ce83807f006a459ac4e11406d9258)) diff --git a/client/www/lib/angular-ui-router/CONTRIBUTING.md b/client/www/lib/angular-ui-router/CONTRIBUTING.md new file mode 100644 index 0000000..63829a5 --- /dev/null +++ b/client/www/lib/angular-ui-router/CONTRIBUTING.md @@ -0,0 +1,65 @@ + +# Report an Issue + +Help us make UI-Router better! If you think you might have found a bug, or some other weirdness, start by making sure +it hasn't already been reported. You can [search through existing issues](https://github.com/angular-ui/ui-router/search?q=wat%3F&type=Issues) +to see if someone's reported one similar to yours. + +If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code +as possible: the more minimalist, the faster we can debug it). + +Next, [create a new issue](https://github.com/angular-ui/ui-router/issues/new) that briefly explains the problem, +and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to +that plunkr you created! + +**Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure +is a bug, it's best to talk it out on +[StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) before reporting it. This +keeps development streamlined, and helps us focus on building great software. + + +Issues only! | +-------------| +Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, see one of the above-mentioned forums or [IRC](irc://irc.freenode.net/#angularjs). | + +####Purple Labels +A purple label means that **you** need to take some further action. + - ![Not Actionable - Need Info](http://angular-ui.github.io/ui-router/images/notactionable.png): Your issue is not specific enough, or there is no clear action that we can take. Please clarify and refine your issue. + - ![Plunkr Please](http://angular-ui.github.io/ui-router/images/plunkrplease.png): Please [create a plunkr](http://bit.ly/UIR-Plunk) + - ![StackOverflow](http://angular-ui.github.io/ui-router/images/stackoverflow.png): We suspect your issue is really a help request, or could be answered by the community. Please ask your question on [StackOverflow](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router). If you determine that is an actual issue, please explain why. + +If your issue gets labeled with purple label, no further action will be taken until you respond to the label appropriately. + +# Contribute + +**(1)** See the **[Developing](#developing)** section below, to get the development version of UI-Router up and running on your local machine. + +**(2)** Check out the [roadmap](https://github.com/angular-ui/ui-router/milestones) to see where the project is headed, and if your feature idea fits with where we're headed. + +**(3)** If you're not sure, [open an RFC](https://github.com/angular-ui/ui-router/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea. + +**(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules: + +- *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests +- Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one +- Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release. +- Changes should always respect the coding style of the project + + + +# Developing + +UI-Router uses grunt >= 0.4.x. Make sure to upgrade your environment and read the +[Migration Guide](http://gruntjs.com/upgrading-from-0.3-to-0.4). + +Dependencies for building from source and running tests: + +* [grunt-cli](https://github.com/gruntjs/grunt-cli) - run: `$ npm install -g grunt-cli` +* Then, install the development dependencies by running `$ npm install` from the project directory + +There are a number of targets in the gruntfile that are used to generating different builds: + +* `grunt`: Perform a normal build, runs jshint and karma tests +* `grunt build`: Perform a normal build +* `grunt dist`: Perform a clean build and generate documentation +* `grunt dev`: Run dev server (sample app) and watch for changes, builds and runs karma tests on changes. diff --git a/client/www/lib/angular-ui-router/LICENSE b/client/www/lib/angular-ui-router/LICENSE new file mode 100644 index 0000000..939f8f8 --- /dev/null +++ b/client/www/lib/angular-ui-router/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2014 The AngularUI Team, Karsten Sperling + +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/client/www/lib/angular-ui-router/README.md b/client/www/lib/angular-ui-router/README.md new file mode 100644 index 0000000..f02d83b --- /dev/null +++ b/client/www/lib/angular-ui-router/README.md @@ -0,0 +1,243 @@ +# AngularUI Router  [![Build Status](https://travis-ci.org/angular-ui/ui-router.svg?branch=master)](https://travis-ci.org/angular-ui/ui-router) + +#### The de-facto solution to flexible routing with nested views +--- +**[Download 0.2.11](http://angular-ui.github.io/ui-router/release/angular-ui-router.js)** (or **[Minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js)**) **|** +**[Guide](https://github.com/angular-ui/ui-router/wiki) |** +**[API](http://angular-ui.github.io/ui-router/site) |** +**[Sample](http://angular-ui.github.com/ui-router/sample/) ([Src](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) |** +**[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |** +**[Resources](#resources) |** +**[Report an Issue](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#report-an-issue) |** +**[Contribute](https://github.com/angular-ui/ui-router/blob/master/CONTRIBUTING.md#contribute) |** +**[Help!](http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router) |** +**[Discuss](https://groups.google.com/forum/#!categories/angular-ui/router)** + +--- + +AngularUI Router is a routing framework for [AngularJS](http://angularjs.org), which allows you to organize the +parts of your interface into a [*state machine*](https://en.wikipedia.org/wiki/Finite-state_machine). Unlike the +[`$route` service](http://docs.angularjs.org/api/ngRoute.$route) in the Angular ngRoute module, which is organized around URL +routes, UI-Router is organized around [*states*](https://github.com/angular-ui/ui-router/wiki), +which may optionally have routes, as well as other behavior, attached. + +States are bound to *named*, *nested* and *parallel views*, allowing you to powerfully manage your application's interface. + +Check out the sample app: http://angular-ui.github.io/ui-router/sample/ + +- +**Note:** *UI-Router is under active development. As such, while this library is well-tested, the API may change. Consider using it in production applications only if you're comfortable following a changelog and updating your usage accordingly.* + + +## Get Started + +**(1)** Get UI-Router in one of the following ways: + - clone & [build](CONTRIBUTING.md#developing) this repository + - [download the release](http://angular-ui.github.io/ui-router/release/angular-ui-router.js) (or [minified](http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js)) + - via **[Bower](http://bower.io/)**: by running `$ bower install angular-ui-router` from your console + - or via **[npm](https://www.npmjs.org/)**: by running `$ npm install angular-ui-router` from your console + - or via **[Component](https://github.com/component/component)**: by running `$ component install angular-ui/ui-router` from your console + +**(2)** Include `angular-ui-router.js` (or `angular-ui-router.min.js`) in your `index.html`, after including Angular itself (For Component users: ignore this step) + +**(3)** Add `'ui.router'` to your main module's list of dependencies (For Component users: replace `'ui.router'` with `require('angular-ui-router')`) + +When you're done, your setup should look similar to the following: + +> +```html + + + + + + + ... + + + ... + + +``` + +### [Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview) + +The majority of UI-Router's power is in its ability to nest states & views. + +**(1)** First, follow the [setup](#get-started) instructions detailed above. + +**(2)** Then, add a [`ui-view` directive](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-view) to the `` of your app. + +> +```html + + +
+ + State 1 + State 2 + +``` + +**(3)** You'll notice we also added some links with [`ui-sref` directives](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#ui-sref). In addition to managing state transitions, this directive auto-generates the `href` attribute of the `` element it's attached to, if the corresponding state has a URL. Next we'll add some templates. These will plug into the `ui-view` within `index.html`. Notice that they have their own `ui-view` as well! That is the key to nesting states and views. + +> +```html + +

State 1

+
+
Show List +
+``` +```html + +

State 2

+
+Show List +
+``` + +**(4)** Next, we'll add some child templates. *These* will get plugged into the `ui-view` of their parent state templates. + +> +```html + +

List of State 1 Items

+
    +
  • {{ item }}
  • +
+``` + +> +```html + +

List of State 2 Things

+
    +
  • {{ thing }}
  • +
+``` + +**(5)** Finally, we'll wire it all up with `$stateProvider`. Set up your states in the module config, as in the following: + + +> +```javascript +myApp.config(function($stateProvider, $urlRouterProvider) { + // + // For any unmatched url, redirect to /state1 + $urlRouterProvider.otherwise("/state1"); + // + // Now set up the states + $stateProvider + .state('state1', { + url: "/state1", + templateUrl: "partials/state1.html" + }) + .state('state1.list', { + url: "/list", + templateUrl: "partials/state1.list.html", + controller: function($scope) { + $scope.items = ["A", "List", "Of", "Items"]; + } + }) + .state('state2', { + url: "/state2", + templateUrl: "partials/state2.html" + }) + .state('state2.list', { + url: "/list", + templateUrl: "partials/state2.list.html", + controller: function($scope) { + $scope.things = ["A", "Set", "Of", "Things"]; + } + }); +}); +``` + +**(6)** See this quick start example in action. +>**[Go to Quick Start Plunker for Nested States & Views](http://plnkr.co/edit/u18KQc?p=preview)** + +**(7)** This only scratches the surface +>**[Dive Deeper!](https://github.com/angular-ui/ui-router/wiki)** + + +### [Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview) + +Another great feature is the ability to have multiple `ui-view`s view per template. + +**Pro Tip:** *While multiple parallel views are a powerful feature, you'll often be able to manage your +interfaces more effectively by nesting your views, and pairing those views with nested states.* + +**(1)** Follow the [setup](#get-started) instructions detailed above. + +**(2)** Add one or more `ui-view` to your app, give them names. +> +```html + + +
+
+ + Route 1 + Route 2 + +``` + +**(3)** Set up your states in the module config: +> +```javascript +myApp.config(function($stateProvider) { + $stateProvider + .state('index', { + url: "", + views: { + "viewA": { template: "index.viewA" }, + "viewB": { template: "index.viewB" } + } + }) + .state('route1', { + url: "/route1", + views: { + "viewA": { template: "route1.viewA" }, + "viewB": { template: "route1.viewB" } + } + }) + .state('route2', { + url: "/route2", + views: { + "viewA": { template: "route2.viewA" }, + "viewB": { template: "route2.viewB" } + } + }) +}); +``` + +**(4)** See this quick start example in action. +>**[Go to Quick Start Plunker for Multiple & Named Views](http://plnkr.co/edit/SDOcGS?p=preview)** + + +## Resources + +* [In-Depth Guide](https://github.com/angular-ui/ui-router/wiki) +* [API Reference](http://angular-ui.github.io/ui-router/site) +* [Sample App](http://angular-ui.github.com/ui-router/sample/) ([Source](https://github.com/angular-ui/ui-router/tree/gh-pages/sample)) +* [FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) +* [Slides comparing ngRoute to ui-router](http://slid.es/timkindberg/ui-router#/) +* [UI-Router Extras / Addons](http://christopherthielen.github.io/ui-router-extras/#/home) (@christopherthielen) + +### Videos + +* [Introduction Video](https://egghead.io/lessons/angularjs-introduction-ui-router) (egghead.io) +* [Tim Kindberg on Angular UI-Router](https://www.youtube.com/watch?v=lBqiZSemrqg) +* [Activating States](https://egghead.io/lessons/angularjs-ui-router-activating-states) (egghead.io) +* [Learn Angular.js using UI-Router](http://youtu.be/QETUuZ27N0w) (LearnCode.academy) + + + +## Reporting issues and Contributing + +Please read our [Contributor guidelines](CONTRIBUTING.md) before reporting an issue or creating a pull request. diff --git a/client/www/lib/angular-ui-router/api/angular-ui-router.d.ts b/client/www/lib/angular-ui-router/api/angular-ui-router.d.ts new file mode 100644 index 0000000..55c5d5e --- /dev/null +++ b/client/www/lib/angular-ui-router/api/angular-ui-router.d.ts @@ -0,0 +1,126 @@ +// Type definitions for Angular JS 1.1.5+ (ui.router module) +// Project: https://github.com/angular-ui/ui-router +// Definitions by: Michel Salib +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module ng.ui { + + interface IState { + name?: string; + template?: string; + templateUrl?: any; // string || () => string + templateProvider?: any; // () => string || IPromise + controller?: any; + controllerAs?: string; + controllerProvider?: any; + resolve?: {}; + url?: string; + params?: any; + views?: {}; + abstract?: boolean; + onEnter?: (...args: any[]) => void; + onExit?: (...args: any[]) => void; + data?: any; + reloadOnSearch?: boolean; + } + + interface ITypedState extends IState { + data?: T; + } + + interface IStateProvider extends IServiceProvider { + state(name: string, config: IState): IStateProvider; + state(config: IState): IStateProvider; + decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any; + } + + interface IUrlMatcher { + concat(pattern: string): IUrlMatcher; + exec(path: string, searchParams: {}): {}; + parameters(): string[]; + format(values: {}): string; + } + + interface IUrlMatcherFactory { + compile(pattern: string): IUrlMatcher; + isMatcher(o: any): boolean; + } + + interface IUrlRouterProvider extends IServiceProvider { + when(whenPath: RegExp, handler: Function): IUrlRouterProvider; + when(whenPath: RegExp, handler: any[]): IUrlRouterProvider; + when(whenPath: RegExp, toPath: string): IUrlRouterProvider; + when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider; + when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider; + when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider; + when(whenPath: string, handler: Function): IUrlRouterProvider; + when(whenPath: string, handler: any[]): IUrlRouterProvider; + when(whenPath: string, toPath: string): IUrlRouterProvider; + otherwise(handler: Function): IUrlRouterProvider; + otherwise(handler: any[]): IUrlRouterProvider; + otherwise(path: string): IUrlRouterProvider; + rule(handler: Function): IUrlRouterProvider; + rule(handler: any[]): IUrlRouterProvider; + } + + interface IStateOptions { + location?: any; + inherit?: boolean; + relative?: IState; + notify?: boolean; + reload?: boolean; + } + + interface IHrefOptions { + lossy?: boolean; + inherit?: boolean; + relative?: IState; + absolute?: boolean; + } + + interface IStateService { + go(to: string, params?: {}, options?: IStateOptions): IPromise; + transitionTo(state: string, params?: {}, updateLocation?: boolean): void; + transitionTo(state: string, params?: {}, options?: IStateOptions): void; + includes(state: string, params?: {}): boolean; + is(state:string, params?: {}): boolean; + is(state: IState, params?: {}): boolean; + href(state: IState, params?: {}, options?: IHrefOptions): string; + href(state: string, params?: {}, options?: IHrefOptions): string; + get(state: string): IState; + get(): IState[]; + current: IState; + params: any; + reload(): void; + } + + interface IStateParamsService { + [key: string]: any; + } + + interface IStateParams { + [key: string]: any; + } + + interface IUrlRouterService { + /* + * Triggers an update; the same update that happens when the address bar + * url changes, aka $locationChangeSuccess. + * + * This method is useful when you need to use preventDefault() on the + * $locationChangeSuccess event, perform some custom logic (route protection, + * auth, config, redirection, etc) and then finally proceed with the transition + * by calling $urlRouter.sync(). + * + */ + sync(): void; + } + + interface IUiViewScrollProvider { + /* + * Reverts back to using the core $anchorScroll service for scrolling + * based on the url anchor. + */ + useAnchorScroll(): void; + } +} diff --git a/client/www/lib/angular-ui-router/bower.json b/client/www/lib/angular-ui-router/bower.json new file mode 100644 index 0000000..45e802a --- /dev/null +++ b/client/www/lib/angular-ui-router/bower.json @@ -0,0 +1,23 @@ +{ + "name": "angular-ui-router", + "version": "0.2.13", + "main": "./release/angular-ui-router.js", + "dependencies": { + "angular": ">= 1.0.8" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "component.json", + "package.json", + "lib", + "config", + "sample", + "test", + "tests", + "ngdoc_assets", + "Gruntfile.js", + "files.js" + ] +} diff --git a/client/www/lib/angular-ui-router/release/angular-ui-router.js b/client/www/lib/angular-ui-router/release/angular-ui-router.js new file mode 100644 index 0000000..d2636f8 --- /dev/null +++ b/client/www/lib/angular-ui-router/release/angular-ui-router.js @@ -0,0 +1,4232 @@ +/** + * State-based routing for AngularJS + * @version v0.2.13 + * @link http://angular-ui.github.com/ + * @license MIT License, http://www.opensource.org/licenses/MIT + */ + +/* commonjs package manager support (eg componentjs) */ +if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ + module.exports = 'ui.router'; +} + +(function (window, angular, undefined) { +/*jshint globalstrict:true*/ +/*global angular:false*/ +'use strict'; + +var isDefined = angular.isDefined, + isFunction = angular.isFunction, + isString = angular.isString, + isObject = angular.isObject, + isArray = angular.isArray, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy; + +function inherit(parent, extra) { + return extend(new (extend(function() {}, { prototype: parent }))(), extra); +} + +function merge(dst) { + forEach(arguments, function(obj) { + if (obj !== dst) { + forEach(obj, function(value, key) { + if (!dst.hasOwnProperty(key)) dst[key] = value; + }); + } + }); + return dst; +} + +/** + * Finds the common ancestor path between two states. + * + * @param {Object} first The first state. + * @param {Object} second The second state. + * @return {Array} Returns an array of state names in descending order, not including the root. + */ +function ancestors(first, second) { + var path = []; + + for (var n in first.path) { + if (first.path[n] !== second.path[n]) break; + path.push(first.path[n]); + } + return path; +} + +/** + * IE8-safe wrapper for `Object.keys()`. + * + * @param {Object} object A JavaScript object. + * @return {Array} Returns the keys of the object as an array. + */ +function objectKeys(object) { + if (Object.keys) { + return Object.keys(object); + } + var result = []; + + angular.forEach(object, function(val, key) { + result.push(key); + }); + return result; +} + +/** + * IE8-safe wrapper for `Array.prototype.indexOf()`. + * + * @param {Array} array A JavaScript array. + * @param {*} value A value to search the array for. + * @return {Number} Returns the array index value of `value`, or `-1` if not present. + */ +function indexOf(array, value) { + if (Array.prototype.indexOf) { + return array.indexOf(value, Number(arguments[2]) || 0); + } + var len = array.length >>> 0, from = Number(arguments[2]) || 0; + from = (from < 0) ? Math.ceil(from) : Math.floor(from); + + if (from < 0) from += len; + + for (; from < len; from++) { + if (from in array && array[from] === value) return from; + } + return -1; +} + +/** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} currentParams The value of the current state parameters ($stateParams). + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ +function inheritParams(currentParams, newParams, $current, $to) { + var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + + for (var i in parents) { + if (!parents[i].params) continue; + parentParams = objectKeys(parents[i].params); + if (!parentParams.length) continue; + + for (var j in parentParams) { + if (indexOf(inheritList, parentParams[j]) >= 0) continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = currentParams[parentParams[j]]; + } + } + return extend({}, inherited, newParams); +} + +/** + * Performs a non-strict comparison of the subset of two objects, defined by a list of keys. + * + * @param {Object} a The first object. + * @param {Object} b The second object. + * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified, + * it defaults to the list of keys in `a`. + * @return {Boolean} Returns `true` if the keys match, otherwise `false`. + */ +function equalForKeys(a, b, keys) { + if (!keys) { + keys = []; + for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility + } + + for (var i=0; i + * + * + * + * + * + * + * + * + * + * + * + * + */ +angular.module('ui.router', ['ui.router.state']); + +angular.module('ui.router.compat', ['ui.router']); + +/** + * @ngdoc object + * @name ui.router.util.$resolve + * + * @requires $q + * @requires $injector + * + * @description + * Manages resolution of (acyclic) graphs of promises. + */ +$Resolve.$inject = ['$q', '$injector']; +function $Resolve( $q, $injector) { + + var VISIT_IN_PROGRESS = 1, + VISIT_DONE = 2, + NOTHING = {}, + NO_DEPENDENCIES = [], + NO_LOCALS = NOTHING, + NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING }); + + + /** + * @ngdoc function + * @name ui.router.util.$resolve#study + * @methodOf ui.router.util.$resolve + * + * @description + * Studies a set of invocables that are likely to be used multiple times. + *
+   * $resolve.study(invocables)(locals, parent, self)
+   * 
+ * is equivalent to + *
+   * $resolve.resolve(invocables, locals, parent, self)
+   * 
+ * but the former is more efficient (in fact `resolve` just calls `study` + * internally). + * + * @param {object} invocables Invocable objects + * @return {function} a function to pass in locals, parent and self + */ + this.study = function (invocables) { + if (!isObject(invocables)) throw new Error("'invocables' must be an object"); + var invocableKeys = objectKeys(invocables || {}); + + // Perform a topological sort of invocables to build an ordered plan + var plan = [], cycle = [], visited = {}; + function visit(value, key) { + if (visited[key] === VISIT_DONE) return; + + cycle.push(key); + if (visited[key] === VISIT_IN_PROGRESS) { + cycle.splice(0, indexOf(cycle, key)); + throw new Error("Cyclic dependency: " + cycle.join(" -> ")); + } + visited[key] = VISIT_IN_PROGRESS; + + if (isString(value)) { + plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES); + } else { + var params = $injector.annotate(value); + forEach(params, function (param) { + if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param); + }); + plan.push(key, value, params); + } + + cycle.pop(); + visited[key] = VISIT_DONE; + } + forEach(invocables, visit); + invocables = cycle = visited = null; // plan is all that's required + + function isResolve(value) { + return isObject(value) && value.then && value.$$promises; + } + + return function (locals, parent, self) { + if (isResolve(locals) && self === undefined) { + self = parent; parent = locals; locals = null; + } + if (!locals) locals = NO_LOCALS; + else if (!isObject(locals)) { + throw new Error("'locals' must be an object"); + } + if (!parent) parent = NO_PARENT; + else if (!isResolve(parent)) { + throw new Error("'parent' must be a promise returned by $resolve.resolve()"); + } + + // To complete the overall resolution, we have to wait for the parent + // promise and for the promise for each invokable in our plan. + var resolution = $q.defer(), + result = resolution.promise, + promises = result.$$promises = {}, + values = extend({}, locals), + wait = 1 + plan.length/3, + merged = false; + + function done() { + // Merge parent values we haven't got yet and publish our own $$values + if (!--wait) { + if (!merged) merge(values, parent.$$values); + result.$$values = values; + result.$$promises = result.$$promises || true; // keep for isResolve() + delete result.$$inheritedValues; + resolution.resolve(values); + } + } + + function fail(reason) { + result.$$failure = reason; + resolution.reject(reason); + } + + // Short-circuit if parent has already failed + if (isDefined(parent.$$failure)) { + fail(parent.$$failure); + return result; + } + + if (parent.$$inheritedValues) { + merge(values, omit(parent.$$inheritedValues, invocableKeys)); + } + + // Merge parent values if the parent has already resolved, or merge + // parent promises and wait if the parent resolve is still in progress. + extend(promises, parent.$$promises); + if (parent.$$values) { + merged = merge(values, omit(parent.$$values, invocableKeys)); + result.$$inheritedValues = omit(parent.$$values, invocableKeys); + done(); + } else { + if (parent.$$inheritedValues) { + result.$$inheritedValues = omit(parent.$$inheritedValues, invocableKeys); + } + parent.then(done, fail); + } + + // Process each invocable in the plan, but ignore any where a local of the same name exists. + for (var i=0, ii=plan.length; i} The template html as a string, or a promise + * for that string. + */ + this.fromUrl = function (url, params) { + if (isFunction(url)) url = url(params); + if (url == null) return null; + else return $http + .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }}) + .then(function(response) { return response.data; }); + }; + + /** + * @ngdoc function + * @name ui.router.util.$templateFactory#fromProvider + * @methodOf ui.router.util.$templateFactory + * + * @description + * Creates a template by invoking an injectable provider function. + * + * @param {Function} provider Function to invoke via `$injector.invoke` + * @param {Object} params Parameters for the template. + * @param {Object} locals Locals to pass to `invoke`. Defaults to + * `{ params: params }`. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + this.fromProvider = function (provider, params, locals) { + return $injector.invoke(provider, null, locals || { params: params }); + }; +} + +angular.module('ui.router.util').service('$templateFactory', $TemplateFactory); + +var $$UMFP; // reference to $UrlMatcherFactoryProvider + +/** + * @ngdoc object + * @name ui.router.util.type:UrlMatcher + * + * @description + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list + * of search parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}. + * + * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace + * syntax, which optionally allows a regular expression for the parameter to be specified: + * + * * `':'` name - colon placeholder + * * `'*'` name - catch-all placeholder + * * `'{' name '}'` - curly placeholder + * * `'{' name ':' regexp|type '}'` - curly placeholder with regexp or type name. Should the + * regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). For colon + * placeholders or curly placeholders without an explicit regexp, a path parameter matches any + * number of characters other than '/'. For catch-all placeholders the path parameter matches + * any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` Type matches `2014-11-12`) and provides a Date object in $stateParams.start + * + * @param {string} pattern The pattern to compile into a matcher. + * @param {Object} config A configuration object hash: + * @param {Object=} parentMatcher Used to concatenate the pattern/config onto + * an existing UrlMatcher + * + * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + * + * @property {string} prefix A static prefix of this pattern. The matcher guarantees that any + * URL matching this matcher (i.e. any string for which {@link ui.router.util.type:UrlMatcher#methods_exec exec()} returns + * non-null) will start with this prefix. + * + * @property {string} source The pattern that was passed into the constructor + * + * @property {string} sourcePath The path portion of the source property + * + * @property {string} sourceSearch The search portion of the source property + * + * @property {string} regex The constructed regex that will be used to match against the url when + * it is time to determine which url will match. + * + * @returns {Object} New `UrlMatcher` object + */ +function UrlMatcher(pattern, config, parentMatcher) { + config = extend({ params: {} }, isObject(config) ? config : {}); + + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + searchPlaceholder = /([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + compiled = '^', last = 0, m, + segments = this.segments = [], + parentParams = parentMatcher ? parentMatcher.params : {}, + params = this.params = parentMatcher ? parentMatcher.params.$$new() : new $$UMFP.ParamSet(), + paramNames = []; + + function addParameter(id, type, config, location) { + paramNames.push(id); + if (parentParams[id]) return parentParams[id]; + if (!/^\w+(-+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); + if (params[id]) throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); + params[id] = new $$UMFP.Param(id, type, config, location); + return params[id]; + } + + function quoteRegExp(string, pattern, squash) { + var surroundPattern = ['',''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!pattern) return result; + switch(squash) { + case false: surroundPattern = ['(', ')']; break; + case true: surroundPattern = ['?(', ')?']; break; + default: surroundPattern = ['(' + squash + "|", ')?']; break; + } + return result + surroundPattern[0] + pattern + surroundPattern[1]; + } + + this.source = pattern; + + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + function matchDetails(m, isSearch) { + var id, regexp, segment, type, cfg, arrayMode; + id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null + cfg = config.params[id]; + segment = pattern.substring(last, m.index); + regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null); + type = $$UMFP.type(regexp || "string") || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp) }); + return { + id: id, regexp: regexp, segment: segment, type: type, cfg: cfg + }; + } + + var p, param, segment; + while ((m = placeholder.exec(pattern))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) break; // we're into the search part + + param = addParameter(p.id, p.type, p.cfg, "path"); + compiled += quoteRegExp(p.segment, param.type.pattern.source, param.squash); + segments.push(p.segment); + last = placeholder.lastIndex; + } + segment = pattern.substring(last); + + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + + if (i >= 0) { + var search = this.sourceSearch = segment.substring(i); + segment = segment.substring(0, i); + this.sourcePath = pattern.substring(0, last + i); + + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + param = addParameter(p.id, p.type, p.cfg, "search"); + last = placeholder.lastIndex; + // check if ?& + } + } + } else { + this.sourcePath = pattern; + this.sourceSearch = ''; + } + + compiled += quoteRegExp(segment) + (config.strict === false ? '\/?' : '') + '$'; + segments.push(segment); + + this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined); + this.prefix = segments[0]; + this.$$paramNames = paramNames; +} + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#concat + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Returns a new matcher for a pattern constructed by appending the path part and adding the + * search parameters of the specified pattern to this pattern. The current pattern is not + * modified. This can be understood as creating a pattern for URLs that are relative to (or + * suffixes of) the current pattern. + * + * @example + * The following two matchers are equivalent: + *
+ * new UrlMatcher('/user/{id}?q').concat('/details?date');
+ * new UrlMatcher('/user/{id}/details?q&date');
+ * 
+ * + * @param {string} pattern The pattern to append. + * @param {Object} config An object hash of the configuration for the matcher. + * @returns {UrlMatcher} A matcher for the concatenated pattern. + */ +UrlMatcher.prototype.concat = function (pattern, config) { + // Because order of search parameters is irrelevant, we can add our own search + // parameters to the end of the new pattern. Parse the new pattern by itself + // and then join the bits together, but it's much easier to do this on a string level. + var defaultConfig = { + caseInsensitive: $$UMFP.caseInsensitive(), + strict: $$UMFP.strictMode(), + squash: $$UMFP.defaultSquashPolicy() + }; + return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch, extend(defaultConfig, config), this); +}; + +UrlMatcher.prototype.toString = function () { + return this.source; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#exec + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Tests the specified path against this matcher, and returns an object containing the captured + * parameter values, or null if the path does not match. The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `searchParams`. This means that search parameters are always treated + * as optional. + * + * @example + *
+ * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {
+ *   x: '1', q: 'hello'
+ * });
+ * // returns { id: 'bob', q: 'hello', r: null }
+ * 
+ * + * @param {string} path The URL path to match, e.g. `$location.path()`. + * @param {Object} searchParams URL search parameters, e.g. `$location.search()`. + * @returns {Object} The captured parameter values. + */ +UrlMatcher.prototype.exec = function (path, searchParams) { + var m = this.regexp.exec(path); + if (!m) return null; + searchParams = searchParams || {}; + + var paramNames = this.parameters(), nTotal = paramNames.length, + nPath = this.segments.length - 1, + values = {}, i, j, cfg, paramName; + + if (nPath !== m.length - 1) throw new Error("Unbalanced capture group in route '" + this.source + "'"); + + function decodePathArray(string) { + function reverseString(str) { return str.split("").reverse().join(""); } + function unquoteDashes(str) { return str.replace(/\\-/, "-"); } + + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = map(split, reverseString); + return map(allReversed, unquoteDashes).reverse(); + } + + for (i = 0; i < nPath; i++) { + paramName = paramNames[i]; + var param = this.params[paramName]; + var paramVal = m[i+1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (j = 0; j < param.replace; j++) { + if (param.replace[j].from === paramVal) paramVal = param.replace[j].to; + } + if (paramVal && param.array === true) paramVal = decodePathArray(paramVal); + values[paramName] = param.value(paramVal); + } + for (/**/; i < nTotal; i++) { + paramName = paramNames[i]; + values[paramName] = this.params[paramName].value(searchParams[paramName]); + } + + return values; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#parameters + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Returns the names of all path and search parameters of this pattern in an unspecified order. + * + * @returns {Array.} An array of parameter names. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ +UrlMatcher.prototype.parameters = function (param) { + if (!isDefined(param)) return this.$$paramNames; + return this.params[param] || null; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#validate + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param {Object} params The object hash of parameters to validate. + * @returns {boolean} Returns `true` if `params` validates, otherwise `false`. + */ +UrlMatcher.prototype.validates = function (params) { + return this.params.$$validates(params); +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#format + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. Null values for path parameters are + * treated as empty strings. + * + * @example + *
+ * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });
+ * // returns '/user/bob?q=yes'
+ * 
+ * + * @param {Object} values the values to substitute for the parameters in this pattern. + * @returns {string} the formatted URL (path and optionally search part). + */ +UrlMatcher.prototype.format = function (values) { + values = values || {}; + var segments = this.segments, params = this.parameters(), paramset = this.params; + if (!this.validates(values)) return null; + + var i, search = false, nPath = segments.length - 1, nTotal = params.length, result = segments[0]; + + function encodeDashes(str) { // Replace dashes with encoded "\-" + return encodeURIComponent(str).replace(/-/g, function(c) { return '%5C%' + c.charCodeAt(0).toString(16).toUpperCase(); }); + } + + for (i = 0; i < nTotal; i++) { + var isPathParam = i < nPath; + var name = params[i], param = paramset[name], value = param.value(values[name]); + var isDefaultValue = param.isOptional && param.type.equals(param.value(), value); + var squash = isDefaultValue ? param.squash : false; + var encoded = param.type.encode(value); + + if (isPathParam) { + var nextSegment = segments[i + 1]; + if (squash === false) { + if (encoded != null) { + if (isArray(encoded)) { + result += map(encoded, encodeDashes).join("-"); + } else { + result += encodeURIComponent(encoded); + } + } + result += nextSegment; + } else if (squash === true) { + var capture = result.match(/\/$/) ? /\/?(.*)/ : /(.*)/; + result += nextSegment.match(capture)[1]; + } else if (isString(squash)) { + result += squash + nextSegment; + } + } else { + if (encoded == null || (isDefaultValue && squash !== false)) continue; + if (!isArray(encoded)) encoded = [ encoded ]; + encoded = map(encoded, encodeURIComponent).join('&' + name + '='); + result += (search ? '&' : '?') + (name + '=' + encoded); + search = true; + } + } + + return result; +}; + +/** + * @ngdoc object + * @name ui.router.util.type:Type + * + * @description + * Implements an interface to define custom parameter types that can be decoded from and encoded to + * string parameters matched in a URL. Used by {@link ui.router.util.type:UrlMatcher `UrlMatcher`} + * objects when matching or formatting URLs, or comparing or validating parameter values. + * + * See {@link ui.router.util.$urlMatcherFactory#methods_type `$urlMatcherFactory#type()`} for more + * information on registering custom types. + * + * @param {Object} config A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `Type`'s public interface. + * @example + *
+ * {
+ *   decode: function(val) { return parseInt(val, 10); },
+ *   encode: function(val) { return val && val.toString(); },
+ *   equals: function(a, b) { return this.is(a) && a === b; },
+ *   is: function(val) { return angular.isNumber(val) isFinite(val) && val % 1 === 0; },
+ *   pattern: /\d+/
+ * }
+ * 
+ * + * @property {RegExp} pattern The regular expression pattern used to match values of this type when + * coming from a substring of a URL. + * + * @returns {Object} Returns a new `Type` object. + */ +function Type(config) { + extend(this, config); +} + +/** + * @ngdoc function + * @name ui.router.util.type:Type#is + * @methodOf ui.router.util.type:Type + * + * @description + * Detects whether a value is of a particular type. Accepts a native (decoded) value + * and determines whether it matches the current `Type` object. + * + * @param {*} val The value to check. + * @param {string} key Optional. If the type check is happening in the context of a specific + * {@link ui.router.util.type:UrlMatcher `UrlMatcher`} object, this is the name of the + * parameter in which `val` is stored. Can be used for meta-programming of `Type` objects. + * @returns {Boolean} Returns `true` if the value matches the type, otherwise `false`. + */ +Type.prototype.is = function(val, key) { + return true; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#encode + * @methodOf ui.router.util.type:Type + * + * @description + * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the + * return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`), it + * only needs to be a representation of `val` that has been coerced to a string. + * + * @param {*} val The value to encode. + * @param {string} key The name of the parameter in which `val` is stored. Can be used for + * meta-programming of `Type` objects. + * @returns {string} Returns a string representation of `val` that can be encoded in a URL. + */ +Type.prototype.encode = function(val, key) { + return val; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#decode + * @methodOf ui.router.util.type:Type + * + * @description + * Converts a parameter value (from URL string or transition param) to a custom/native value. + * + * @param {string} val The URL parameter value to decode. + * @param {string} key The name of the parameter in which `val` is stored. Can be used for + * meta-programming of `Type` objects. + * @returns {*} Returns a custom representation of the URL parameter value. + */ +Type.prototype.decode = function(val, key) { + return val; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#equals + * @methodOf ui.router.util.type:Type + * + * @description + * Determines whether two decoded values are equivalent. + * + * @param {*} a A value to compare against. + * @param {*} b A value to compare against. + * @returns {Boolean} Returns `true` if the values are equivalent/equal, otherwise `false`. + */ +Type.prototype.equals = function(a, b) { + return a == b; +}; + +Type.prototype.$subPattern = function() { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); +}; + +Type.prototype.pattern = /.*/; + +Type.prototype.toString = function() { return "{Type:" + this.name + "}"; }; + +/* + * Wraps an existing custom Type as an array of Type, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ +Type.prototype.$asArray = function(mode, isSearch) { + if (!mode) return this; + if (mode === "auto" && !isSearch) throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + + function ArrayType(type, mode) { + function bindTo(type, callbackName) { + return function() { + return type[callbackName].apply(type, arguments); + }; + } + + // Wrap non-array value as array + function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch(val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + function falsey(val) { return !val; } + + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + val = arrayWrap(val); + var result = map(val, callback); + if (allTruthyMode === true) + return filter(result, falsey).length === 0; + return arrayUnwrap(result); + }; + } + + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) return false; + } + return true; + }; + } + + this.encode = arrayHandler(bindTo(type, 'encode')); + this.decode = arrayHandler(bindTo(type, 'decode')); + this.is = arrayHandler(bindTo(type, 'is'), true); + this.equals = arrayEqualsHandler(bindTo(type, 'equals')); + this.pattern = type.pattern; + this.$arrayMode = mode; + } +}; + + + +/** + * @ngdoc object + * @name ui.router.util.$urlMatcherFactory + * + * @description + * Factory for {@link ui.router.util.type:UrlMatcher `UrlMatcher`} instances. The factory + * is also available to providers under the name `$urlMatcherFactoryProvider`. + */ +function $UrlMatcherFactory() { + $$UMFP = this; + + var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false; + + function valToString(val) { return val != null ? val.toString().replace(/\//g, "%2F") : val; } + function valFromString(val) { return val != null ? val.toString().replace(/%2F/g, "/") : val; } +// TODO: in 1.0, make string .is() return false if value is undefined by default. +// function regexpMatches(val) { /*jshint validthis:true */ return isDefined(val) && this.pattern.test(val); } + function regexpMatches(val) { /*jshint validthis:true */ return this.pattern.test(val); } + + var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = { + string: { + encode: valToString, + decode: valFromString, + is: regexpMatches, + pattern: /[^/]*/ + }, + int: { + encode: valToString, + decode: function(val) { return parseInt(val, 10); }, + is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; }, + pattern: /\d+/ + }, + bool: { + encode: function(val) { return val ? 1 : 0; }, + decode: function(val) { return parseInt(val, 10) !== 0; }, + is: function(val) { return val === true || val === false; }, + pattern: /0|1/ + }, + date: { + encode: function (val) { + if (!this.is(val)) + return undefined; + return [ val.getFullYear(), + ('0' + (val.getMonth() + 1)).slice(-2), + ('0' + val.getDate()).slice(-2) + ].join("-"); + }, + decode: function (val) { + if (this.is(val)) return val; + var match = this.capture.exec(val); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function(val) { return val instanceof Date && !isNaN(val.valueOf()); }, + equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString(); }, + pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, + capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ + }, + json: { + encode: angular.toJson, + decode: angular.fromJson, + is: angular.isObject, + equals: angular.equals, + pattern: /[^/]*/ + }, + any: { // does not encode/decode + encode: angular.identity, + decode: angular.identity, + is: angular.identity, + equals: angular.equals, + pattern: /.*/ + } + }; + + function getDefaultConfig() { + return { + strict: isStrictMode, + caseInsensitive: isCaseInsensitive + }; + } + + function isInjectable(value) { + return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1]))); + } + + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + $UrlMatcherFactory.$$getDefaultValue = function(config) { + if (!isInjectable(config.value)) return config.value; + if (!injector) throw new Error("Injectable functions cannot be called at configuration time"); + return injector.invoke(config.value); + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#caseInsensitive + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Defines whether URL matching should be case sensitive (the default behavior), or not. + * + * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`; + * @returns {boolean} the current value of caseInsensitive + */ + this.caseInsensitive = function(value) { + if (isDefined(value)) + isCaseInsensitive = value; + return isCaseInsensitive; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#strictMode + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Defines whether URLs should match trailing slashes, or not (the default behavior). + * + * @param {boolean=} value `false` to match trailing slashes in URLs, otherwise `true`. + * @returns {boolean} the current value of strictMode + */ + this.strictMode = function(value) { + if (isDefined(value)) + isStrictMode = value; + return isStrictMode; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#defaultSquashPolicy + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Sets the default behavior when generating or matching URLs with default parameter values. + * + * @param {string} value A string that defines the default parameter URL squashing behavior. + * `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL + * `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the + * parameter is surrounded by slashes, squash (remove) one slash from the URL + * any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) + * the parameter value from the URL and replace it with this string. + */ + this.defaultSquashPolicy = function(value) { + if (!isDefined(value)) return defaultSquashPolicy; + if (value !== true && value !== false && !isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + defaultSquashPolicy = value; + return value; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#compile + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Creates a {@link ui.router.util.type:UrlMatcher `UrlMatcher`} for the specified pattern. + * + * @param {string} pattern The URL pattern. + * @param {Object} config The config object hash. + * @returns {UrlMatcher} The UrlMatcher. + */ + this.compile = function (pattern, config) { + return new UrlMatcher(pattern, extend(getDefaultConfig(), config)); + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#isMatcher + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Returns true if the specified object is a `UrlMatcher`, or false otherwise. + * + * @param {Object} object The object to perform the type check against. + * @returns {Boolean} Returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + this.isMatcher = function (o) { + if (!isObject(o)) return false; + var result = true; + + forEach(UrlMatcher.prototype, function(val, name) { + if (isFunction(val)) { + result = result && (isDefined(o[name]) && isFunction(o[name])); + } + }); + return result; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#type + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Registers a custom {@link ui.router.util.type:Type `Type`} object that can be used to + * generate URLs with typed parameters. + * + * @param {string} name The type name. + * @param {Object|Function} definition The type definition. See + * {@link ui.router.util.type:Type `Type`} for information on the values accepted. + * @param {Object|Function} definitionFn (optional) A function that is injected before the app + * runtime starts. The result of this function is merged into the existing `definition`. + * See {@link ui.router.util.type:Type `Type`} for information on the values accepted. + * + * @returns {Object} Returns `$urlMatcherFactoryProvider`. + * + * @example + * This is a simple example of a custom type that encodes and decodes items from an + * array, using the array index as the URL-encoded value: + * + *
+   * var list = ['John', 'Paul', 'George', 'Ringo'];
+   *
+   * $urlMatcherFactoryProvider.type('listItem', {
+   *   encode: function(item) {
+   *     // Represent the list item in the URL using its corresponding index
+   *     return list.indexOf(item);
+   *   },
+   *   decode: function(item) {
+   *     // Look up the list item by index
+   *     return list[parseInt(item, 10)];
+   *   },
+   *   is: function(item) {
+   *     // Ensure the item is valid by checking to see that it appears
+   *     // in the list
+   *     return list.indexOf(item) > -1;
+   *   }
+   * });
+   *
+   * $stateProvider.state('list', {
+   *   url: "/list/{item:listItem}",
+   *   controller: function($scope, $stateParams) {
+   *     console.log($stateParams.item);
+   *   }
+   * });
+   *
+   * // ...
+   *
+   * // Changes URL to '/list/3', logs "Ringo" to the console
+   * $state.go('list', { item: "Ringo" });
+   * 
+ * + * This is a more complex example of a type that relies on dependency injection to + * interact with services, and uses the parameter name from the URL to infer how to + * handle encoding and decoding parameter values: + * + *
+   * // Defines a custom type that gets a value from a service,
+   * // where each service gets different types of values from
+   * // a backend API:
+   * $urlMatcherFactoryProvider.type('dbObject', {}, function(Users, Posts) {
+   *
+   *   // Matches up services to URL parameter names
+   *   var services = {
+   *     user: Users,
+   *     post: Posts
+   *   };
+   *
+   *   return {
+   *     encode: function(object) {
+   *       // Represent the object in the URL using its unique ID
+   *       return object.id;
+   *     },
+   *     decode: function(value, key) {
+   *       // Look up the object by ID, using the parameter
+   *       // name (key) to call the correct service
+   *       return services[key].findById(value);
+   *     },
+   *     is: function(object, key) {
+   *       // Check that object is a valid dbObject
+   *       return angular.isObject(object) && object.id && services[key];
+   *     }
+   *     equals: function(a, b) {
+   *       // Check the equality of decoded objects by comparing
+   *       // their unique IDs
+   *       return a.id === b.id;
+   *     }
+   *   };
+   * });
+   *
+   * // In a config() block, you can then attach URLs with
+   * // type-annotated parameters:
+   * $stateProvider.state('users', {
+   *   url: "/users",
+   *   // ...
+   * }).state('users.item', {
+   *   url: "/{user:dbObject}",
+   *   controller: function($scope, $stateParams) {
+   *     // $stateParams.user will now be an object returned from
+   *     // the Users service
+   *   },
+   *   // ...
+   * });
+   * 
+ */ + this.type = function (name, definition, definitionFn) { + if (!isDefined(definition)) return $types[name]; + if ($types.hasOwnProperty(name)) throw new Error("A type named '" + name + "' has already been defined."); + + $types[name] = new Type(extend({ name: name }, definition)); + if (definitionFn) { + typeQueue.push({ name: name, def: definitionFn }); + if (!enqueue) flushTypeQueue(); + } + return this; + }; + + // `flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s + function flushTypeQueue() { + while(typeQueue.length) { + var type = typeQueue.shift(); + if (type.pattern) throw new Error("You cannot override a type's .pattern at runtime."); + angular.extend($types[type.name], injector.invoke(type.def)); + } + } + + // Register default types. Store them in the prototype of $types. + forEach(defaultTypes, function(type, name) { $types[name] = new Type(extend({name: name}, type)); }); + $types = inherit($types, {}); + + /* No need to document $get, since it returns this */ + this.$get = ['$injector', function ($injector) { + injector = $injector; + enqueue = false; + flushTypeQueue(); + + forEach(defaultTypes, function(type, name) { + if (!$types[name]) $types[name] = new Type(type); + }); + return this; + }]; + + this.Param = function Param(id, type, config, location) { + var self = this; + config = unwrapShorthand(config); + type = getType(config, type, location); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === "search") : type; + if (type.name === "string" && !arrayMode && location === "path" && config.value === undefined) + config.value = ""; // for 0.2.x; in 0.3.0+ do not automatically default to "" + var isOptional = config.value !== undefined; + var squash = getSquashPolicy(config, isOptional); + var replace = getReplace(config, arrayMode, isOptional, squash); + + function unwrapShorthand(config) { + var keys = isObject(config) ? objectKeys(config) : []; + var isShorthand = indexOf(keys, "value") === -1 && indexOf(keys, "type") === -1 && + indexOf(keys, "squash") === -1 && indexOf(keys, "array") === -1; + if (isShorthand) config = { value: config }; + config.$$fn = isInjectable(config.value) ? config.value : function () { return config.value; }; + return config; + } + + function getType(config, urlType, location) { + if (config.type && urlType) throw new Error("Param '"+id+"' has two type configurations."); + if (urlType) return urlType; + if (!config.type) return (location === "config" ? $types.any : $types.string); + return config.type instanceof Type ? config.type : new Type(config.type); + } + + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === "search" ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return extend(arrayDefaults, arrayParamNomenclature, config).array; + } + + /** + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ + function getSquashPolicy(config, isOptional) { + var squash = config.squash; + if (!isOptional || squash === false) return false; + if (!isDefined(squash) || squash == null) return defaultSquashPolicy; + if (squash === true || isString(squash)) return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); + } + + function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") } + ]; + replace = isArray(config.replace) ? config.replace : []; + if (isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = map(replace, function(item) { return item.from; } ); + return filter(defaultPolicy, function(item) { return indexOf(configuredKeys, item.from) === -1; }).concat(replace); + } + + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + function $$getDefaultValue() { + if (!injector) throw new Error("Injectable functions cannot be called at configuration time"); + return injector.invoke(config.$$fn); + } + + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + function $value(value) { + function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; } + function $replace(value) { + var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; }); + return replacement.length ? replacement[0] : value; + } + value = $replace(value); + return isDefined(value) ? self.type.decode(value) : $$getDefaultValue(); + } + + function toString() { return "{Param:" + id + " " + type + " squash: '" + squash + "' optional: " + isOptional + "}"; } + + extend(this, { + id: id, + type: type, + location: location, + array: arrayMode, + squash: squash, + replace: replace, + isOptional: isOptional, + value: $value, + dynamic: undefined, + config: config, + toString: toString + }); + }; + + function ParamSet(params) { + extend(this, params || {}); + } + + ParamSet.prototype = { + $$new: function() { + return inherit(this, extend(new ParamSet(), { $$parent: this})); + }, + $$keys: function () { + var keys = [], chain = [], parent = this, + ignore = objectKeys(ParamSet.prototype); + while (parent) { chain.push(parent); parent = parent.$$parent; } + chain.reverse(); + forEach(chain, function(paramset) { + forEach(objectKeys(paramset), function(key) { + if (indexOf(keys, key) === -1 && indexOf(ignore, key) === -1) keys.push(key); + }); + }); + return keys; + }, + $$values: function(paramValues) { + var values = {}, self = this; + forEach(self.$$keys(), function(key) { + values[key] = self[key].value(paramValues && paramValues[key]); + }); + return values; + }, + $$equals: function(paramValues1, paramValues2) { + var equal = true, self = this; + forEach(self.$$keys(), function(key) { + var left = paramValues1 && paramValues1[key], right = paramValues2 && paramValues2[key]; + if (!self[key].type.equals(left, right)) equal = false; + }); + return equal; + }, + $$validates: function $$validate(paramValues) { + var result = true, isOptional, val, param, self = this; + + forEach(this.$$keys(), function(key) { + param = self[key]; + val = paramValues[key]; + isOptional = !val && param.isOptional; + result = result && (isOptional || !!param.type.is(val)); + }); + return result; + }, + $$parent: undefined + }; + + this.ParamSet = ParamSet; +} + +// Register as a provider so it's available to other providers +angular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory); +angular.module('ui.router.util').run(['$urlMatcherFactory', function($urlMatcherFactory) { }]); + +/** + * @ngdoc object + * @name ui.router.router.$urlRouterProvider + * + * @requires ui.router.util.$urlMatcherFactoryProvider + * @requires $locationProvider + * + * @description + * `$urlRouterProvider` has the responsibility of watching `$location`. + * When `$location` changes it runs through a list of rules one by one until a + * match is found. `$urlRouterProvider` is used behind the scenes anytime you specify + * a url in a state configuration. All urls are compiled into a UrlMatcher object. + * + * There are several methods on `$urlRouterProvider` that make it useful to use directly + * in your module config. + */ +$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider']; +function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { + var rules = [], otherwise = null, interceptDeferred = false, listener; + + // Returns a string that is a prefix of all strings matching the RegExp + function regExpPrefix(re) { + var prefix = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source); + return (prefix != null) ? prefix[1].replace(/\\(.)/g, "$1") : ''; + } + + // Interpolates matched values into a String.replace()-style pattern + function interpolate(pattern, match) { + return pattern.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + } + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#rule + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Defines rules that are used by `$urlRouterProvider` to find matches for + * specific URLs. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   // Here's an example of how you might allow case insensitive urls
+   *   $urlRouterProvider.rule(function ($injector, $location) {
+   *     var path = $location.path(),
+   *         normalized = path.toLowerCase();
+   *
+   *     if (path !== normalized) {
+   *       return normalized;
+   *     }
+   *   });
+   * });
+   * 
+ * + * @param {object} rule Handler function that takes `$injector` and `$location` + * services as arguments. You can use them to return a valid path as a string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + this.rule = function (rule) { + if (!isFunction(rule)) throw new Error("'rule' must be a function"); + rules.push(rule); + return this; + }; + + /** + * @ngdoc object + * @name ui.router.router.$urlRouterProvider#otherwise + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Defines a path that is used when an invalid route is requested. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   // if the path doesn't match any of the urls you configured
+   *   // otherwise will take care of routing the user to the
+   *   // specified url
+   *   $urlRouterProvider.otherwise('/index');
+   *
+   *   // Example of using function rule as param
+   *   $urlRouterProvider.otherwise(function ($injector, $location) {
+   *     return '/a/valid/url';
+   *   });
+   * });
+   * 
+ * + * @param {string|object} rule The url path you want to redirect to or a function + * rule that returns the url path. The function version is passed two params: + * `$injector` and `$location` services, and must return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + this.otherwise = function (rule) { + if (isString(rule)) { + var redirect = rule; + rule = function () { return redirect; }; + } + else if (!isFunction(rule)) throw new Error("'rule' must be a function"); + otherwise = rule; + return this; + }; + + + function handleIfMatch($injector, handler, match) { + if (!match) return false; + var result = $injector.invoke(handler, handler, { $match: match }); + return isDefined(result) ? result : true; + } + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#when + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Registers a handler for a given url matching. if handle is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. It gets invoked if `$location` + * matches. You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   $urlRouterProvider.when($state.url, function ($match, $stateParams) {
+   *     if ($state.$current.navigable !== state ||
+   *         !equalForKeys($match, $stateParams) {
+   *      $state.transitionTo(state, $match, false);
+   *     }
+   *   });
+   * });
+   * 
+ * + * @param {string|object} what The incoming path that you want to redirect. + * @param {string|object} handler The path you want to redirect your user to. + */ + this.when = function (what, handler) { + var redirect, handlerIsString = isString(handler); + if (isString(what)) what = $urlMatcherFactory.compile(what); + + if (!handlerIsString && !isFunction(handler) && !isArray(handler)) + throw new Error("invalid 'handler' in when()"); + + var strategies = { + matcher: function (what, handler) { + if (handlerIsString) { + redirect = $urlMatcherFactory.compile(handler); + handler = ['$match', function ($match) { return redirect.format($match); }]; + } + return extend(function ($injector, $location) { + return handleIfMatch($injector, handler, what.exec($location.path(), $location.search())); + }, { + prefix: isString(what.prefix) ? what.prefix : '' + }); + }, + regex: function (what, handler) { + if (what.global || what.sticky) throw new Error("when() RegExp must not be global or sticky"); + + if (handlerIsString) { + redirect = handler; + handler = ['$match', function ($match) { return interpolate(redirect, $match); }]; + } + return extend(function ($injector, $location) { + return handleIfMatch($injector, handler, what.exec($location.path())); + }, { + prefix: regExpPrefix(what) + }); + } + }; + + var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp }; + + for (var n in check) { + if (check[n]) return this.rule(strategies[n](what, handler)); + } + + throw new Error("invalid 'what' in when()"); + }; + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#deferIntercept + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Disables (or enables) deferring location change interception. + * + * If you wish to customize the behavior of syncing the URL (for example, if you wish to + * defer a transition but maintain the current URL), call this method at configuration time. + * Then, at run time, call `$urlRouter.listen()` after you have configured your own + * `$locationChangeSuccess` event handler. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *
+   *   // Prevent $urlRouter from automatically intercepting URL changes;
+   *   // this allows you to configure custom behavior in between
+   *   // location changes and route synchronization:
+   *   $urlRouterProvider.deferIntercept();
+   *
+   * }).run(function ($rootScope, $urlRouter, UserService) {
+   *
+   *   $rootScope.$on('$locationChangeSuccess', function(e) {
+   *     // UserService is an example service for managing user state
+   *     if (UserService.isLoggedIn()) return;
+   *
+   *     // Prevent $urlRouter's default handler from firing
+   *     e.preventDefault();
+   *
+   *     UserService.handleLogin().then(function() {
+   *       // Once the user has logged in, sync the current URL
+   *       // to the router:
+   *       $urlRouter.sync();
+   *     });
+   *   });
+   *
+   *   // Configures $urlRouter's listener *after* your custom listener
+   *   $urlRouter.listen();
+   * });
+   * 
+ * + * @param {boolean} defer Indicates whether to defer location change interception. Passing + no parameter is equivalent to `true`. + */ + this.deferIntercept = function (defer) { + if (defer === undefined) defer = true; + interceptDeferred = defer; + }; + + /** + * @ngdoc object + * @name ui.router.router.$urlRouter + * + * @requires $location + * @requires $rootScope + * @requires $injector + * @requires $browser + * + * @description + * + */ + this.$get = $get; + $get.$inject = ['$location', '$rootScope', '$injector', '$browser']; + function $get( $location, $rootScope, $injector, $browser) { + + var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl; + + function appendBasePath(url, isHtml5, absolute) { + if (baseHref === '/') return url; + if (isHtml5) return baseHref.slice(0, -1) + url; + if (absolute) return baseHref.slice(1) + url; + return url; + } + + // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree + function update(evt) { + if (evt && evt.defaultPrevented) return; + var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl; + lastPushedUrl = undefined; + if (ignoreUpdate) return true; + + function check(rule) { + var handled = rule($injector, $location); + + if (!handled) return false; + if (isString(handled)) $location.replace().url(handled); + return true; + } + var n = rules.length, i; + + for (i = 0; i < n; i++) { + if (check(rules[i])) return; + } + // always check otherwise last to allow dynamic updates to the set of rules + if (otherwise) check(otherwise); + } + + function listen() { + listener = listener || $rootScope.$on('$locationChangeSuccess', update); + return listener; + } + + if (!interceptDeferred) listen(); + + return { + /** + * @ngdoc function + * @name ui.router.router.$urlRouter#sync + * @methodOf ui.router.router.$urlRouter + * + * @description + * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`. + * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event, + * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed + * with the transition by calling `$urlRouter.sync()`. + * + * @example + *
+       * angular.module('app', ['ui.router'])
+       *   .run(function($rootScope, $urlRouter) {
+       *     $rootScope.$on('$locationChangeSuccess', function(evt) {
+       *       // Halt state change from even starting
+       *       evt.preventDefault();
+       *       // Perform custom logic
+       *       var meetsRequirement = ...
+       *       // Continue with the update and state transition if logic allows
+       *       if (meetsRequirement) $urlRouter.sync();
+       *     });
+       * });
+       * 
+ */ + sync: function() { + update(); + }, + + listen: function() { + return listen(); + }, + + update: function(read) { + if (read) { + location = $location.url(); + return; + } + if ($location.url() === location) return; + + $location.url(location); + $location.replace(); + }, + + push: function(urlMatcher, params, options) { + $location.url(urlMatcher.format(params || {})); + lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined; + if (options && options.replace) $location.replace(); + }, + + /** + * @ngdoc function + * @name ui.router.router.$urlRouter#href + * @methodOf ui.router.router.$urlRouter + * + * @description + * A URL generation method that returns the compiled URL for a given + * {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters. + * + * @example + *
+       * $bob = $urlRouter.href(new UrlMatcher("/about/:person"), {
+       *   person: "bob"
+       * });
+       * // $bob == "/about/bob";
+       * 
+ * + * @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate. + * @param {object=} params An object of parameter values to fill the matcher's required parameters. + * @param {object=} options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + href: function(urlMatcher, params, options) { + if (!urlMatcher.validates(params)) return null; + + var isHtml5 = $locationProvider.html5Mode(); + if (angular.isObject(isHtml5)) { + isHtml5 = isHtml5.enabled; + } + + var url = urlMatcher.format(params); + options = options || {}; + + if (!isHtml5 && url !== null) { + url = "#" + $locationProvider.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute); + + if (!options.absolute || !url) { + return url; + } + + var slash = (!isHtml5 && url ? '/' : ''), port = $location.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + + return [$location.protocol(), '://', $location.host(), port, slash, url].join(''); + } + }; + } +} + +angular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider); + +/** + * @ngdoc object + * @name ui.router.state.$stateProvider + * + * @requires ui.router.router.$urlRouterProvider + * @requires ui.router.util.$urlMatcherFactoryProvider + * + * @description + * The new `$stateProvider` works similar to Angular's v1 router, but it focuses purely + * on state. + * + * A state corresponds to a "place" in the application in terms of the overall UI and + * navigation. A state describes (via the controller / template / view properties) what + * the UI looks like and does at that place. + * + * States often have things in common, and the primary way of factoring out these + * commonalities in this model is via the state hierarchy, i.e. parent/child states aka + * nested states. + * + * The `$stateProvider` provides interfaces to declare these states for your app. + */ +$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider']; +function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { + + var root, states = {}, $state, queue = {}, abstractKey = 'abstract'; + + // Builds state properties from definition passed to registerState() + var stateBuilder = { + + // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined. + // state.children = []; + // if (parent) parent.children.push(state); + parent: function(state) { + if (isDefined(state.parent) && state.parent) return findState(state.parent); + // regex matches any valid composite state name + // would match "contact.list" but not "contacts" + var compositeName = /^(.+)\.[^.]+$/.exec(state.name); + return compositeName ? findState(compositeName[1]) : root; + }, + + // inherit 'data' from parent and override by own values (if any) + data: function(state) { + if (state.parent && state.parent.data) { + state.data = state.self.data = extend({}, state.parent.data, state.data); + } + return state.data; + }, + + // Build a URLMatcher if necessary, either via a relative or absolute URL + url: function(state) { + var url = state.url, config = { params: state.params || {} }; + + if (isString(url)) { + if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config); + return (state.parent.navigable || root).url.concat(url, config); + } + + if (!url || $urlMatcherFactory.isMatcher(url)) return url; + throw new Error("Invalid url '" + url + "' in state '" + state + "'"); + }, + + // Keep track of the closest ancestor state that has a URL (i.e. is navigable) + navigable: function(state) { + return state.url ? state : (state.parent ? state.parent.navigable : null); + }, + + // Own parameters for this state. state.url.params is already built at this point. Create and add non-url params + ownParams: function(state) { + var params = state.url && state.url.params || new $$UMFP.ParamSet(); + forEach(state.params || {}, function(config, id) { + if (!params[id]) params[id] = new $$UMFP.Param(id, null, config, "config"); + }); + return params; + }, + + // Derive parameters for this state and ensure they're a super-set of parent's parameters + params: function(state) { + return state.parent && state.parent.params ? extend(state.parent.params.$$new(), state.ownParams) : new $$UMFP.ParamSet(); + }, + + // If there is no explicit multi-view configuration, make one up so we don't have + // to handle both cases in the view directive later. Note that having an explicit + // 'views' property will mean the default unnamed view properties are ignored. This + // is also a good time to resolve view names to absolute names, so everything is a + // straight lookup at link time. + views: function(state) { + var views = {}; + + forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) { + if (name.indexOf('@') < 0) name += '@' + state.parent.name; + views[name] = view; + }); + return views; + }, + + // Keep a full path from the root down to this state as this is needed for state activation. + path: function(state) { + return state.parent ? state.parent.path.concat(state) : []; // exclude root from path + }, + + // Speed up $state.contains() as it's used a lot + includes: function(state) { + var includes = state.parent ? extend({}, state.parent.includes) : {}; + includes[state.name] = true; + return includes; + }, + + $delegates: {} + }; + + function isRelative(stateName) { + return stateName.indexOf(".") === 0 || stateName.indexOf("^") === 0; + } + + function findState(stateOrName, base) { + if (!stateOrName) return undefined; + + var isStr = isString(stateOrName), + name = isStr ? stateOrName : stateOrName.name, + path = isRelative(name); + + if (path) { + if (!base) throw new Error("No reference point given for path '" + name + "'"); + base = findState(base); + + var rel = name.split("."), i = 0, pathLength = rel.length, current = base; + + for (; i < pathLength; i++) { + if (rel[i] === "" && i === 0) { + current = base; + continue; + } + if (rel[i] === "^") { + if (!current.parent) throw new Error("Path '" + name + "' not valid for state '" + base.name + "'"); + current = current.parent; + continue; + } + break; + } + rel = rel.slice(i).join("."); + name = current.name + (current.name && rel ? "." : "") + rel; + } + var state = states[name]; + + if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { + return state; + } + return undefined; + } + + function queueState(parentName, state) { + if (!queue[parentName]) { + queue[parentName] = []; + } + queue[parentName].push(state); + } + + function flushQueuedChildren(parentName) { + var queued = queue[parentName] || []; + while(queued.length) { + registerState(queued.shift()); + } + } + + function registerState(state) { + // Wrap a new object around the state so we can store our private details easily. + state = inherit(state, { + self: state, + resolve: state.resolve || {}, + toString: function() { return this.name; } + }); + + var name = state.name; + if (!isString(name) || name.indexOf('@') >= 0) throw new Error("State must have a valid name"); + if (states.hasOwnProperty(name)) throw new Error("State '" + name + "'' is already defined"); + + // Get parent name + var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.')) + : (isString(state.parent)) ? state.parent + : (isObject(state.parent) && isString(state.parent.name)) ? state.parent.name + : ''; + + // If parent is not registered yet, add state to queue and register later + if (parentName && !states[parentName]) { + return queueState(parentName, state.self); + } + + for (var key in stateBuilder) { + if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]); + } + states[name] = state; + + // Register the state in the global state list and with $urlRouter if necessary. + if (!state[abstractKey] && state.url) { + $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) { + if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) { + $state.transitionTo(state, $match, { inherit: true, location: false }); + } + }]); + } + + // Register any queued children + flushQueuedChildren(name); + + return state; + } + + // Checks text to see if it looks like a glob. + function isGlob (text) { + return text.indexOf('*') > -1; + } + + // Returns true if glob matches current $state name. + function doesStateMatchGlob (glob) { + var globSegments = glob.split('.'), + segments = $state.$current.name.split('.'); + + //match greedy starts + if (globSegments[0] === '**') { + segments = segments.slice(indexOf(segments, globSegments[1])); + segments.unshift('**'); + } + //match greedy ends + if (globSegments[globSegments.length - 1] === '**') { + segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE); + segments.push('**'); + } + + if (globSegments.length != segments.length) { + return false; + } + + //match single stars + for (var i = 0, l = globSegments.length; i < l; i++) { + if (globSegments[i] === '*') { + segments[i] = '*'; + } + } + + return segments.join('') === globSegments.join(''); + } + + + // Implicit root state that is always active + root = registerState({ + name: '', + url: '^', + views: null, + 'abstract': true + }); + root.navigable = null; + + + /** + * @ngdoc function + * @name ui.router.state.$stateProvider#decorator + * @methodOf ui.router.state.$stateProvider + * + * @description + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by `$stateProvider`. This can be used + * to add custom functionality to ui-router, for example inferring templateUrl + * based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * @example + *
+   * // Override the internal 'views' builder with a function that takes the state
+   * // definition, and a reference to the internal function being overridden:
+   * $stateProvider.decorator('views', function (state, parent) {
+   *   var result = {},
+   *       views = parent(state);
+   *
+   *   angular.forEach(views, function (config, name) {
+   *     var autoName = (state.name + '.' + name).replace('.', '/');
+   *     config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';
+   *     result[name] = config;
+   *   });
+   *   return result;
+   * });
+   *
+   * $stateProvider.state('home', {
+   *   views: {
+   *     'contact.list': { controller: 'ListController' },
+   *     'contact.item': { controller: 'ItemController' }
+   *   }
+   * });
+   *
+   * // ...
+   *
+   * $state.go('home');
+   * // Auto-populates list and item views with /partials/home/contact/list.html,
+   * // and /partials/home/contact/item.html, respectively.
+   * 
+ * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + this.decorator = decorator; + function decorator(name, func) { + /*jshint validthis: true */ + if (isString(name) && !isDefined(func)) { + return stateBuilder[name]; + } + if (!isFunction(func) || !isString(name)) { + return this; + } + if (stateBuilder[name] && !stateBuilder.$delegates[name]) { + stateBuilder.$delegates[name] = stateBuilder[name]; + } + stateBuilder[name] = func; + return this; + } + + /** + * @ngdoc function + * @name ui.router.state.$stateProvider#state + * @methodOf ui.router.state.$stateProvider + * + * @description + * Registers a state configuration under a given state name. The stateConfig object + * has the following acceptable properties. + * + * @param {string} name A unique state name, e.g. "home", "about", "contacts". + * To create a parent/child state use a dot, e.g. "about.sales", "home.newest". + * @param {object} stateConfig State configuration object. + * @param {string|function=} stateConfig.template + * + * html template as a string or a function that returns + * an html template as a string which should be used by the uiView directives. This property + * takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + *
template:
+   *   "

inline template definition

" + + * "
"
+ *
template: function(params) {
+   *       return "

generated template

"; }
+ *
+ * + * @param {string|function=} stateConfig.templateUrl + * + * + * path or function that returns a path to an html + * template that should be used by uiView. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + *
templateUrl: "home.html"
+ *
templateUrl: function(params) {
+   *     return myTemplates[params.pageId]; }
+ * + * @param {function=} stateConfig.templateProvider + * + * Provider function that returns HTML content string. + *
 templateProvider:
+   *       function(MyTemplateService, params) {
+   *         return MyTemplateService.getTemplate(params.pageId);
+   *       }
+ * + * @param {string|function=} stateConfig.controller + * + * + * Controller fn that should be associated with newly + * related scope or the name of a registered controller if passed as a string. + * Optionally, the ControllerAs may be declared here. + *
controller: "MyRegisteredController"
+ *
controller:
+   *     "MyRegisteredController as fooCtrl"}
+ *
controller: function($scope, MyService) {
+   *     $scope.data = MyService.getData(); }
+ * + * @param {function=} stateConfig.controllerProvider + * + * + * Injectable provider function that returns the actual controller or string. + *
controllerProvider:
+   *   function(MyResolveData) {
+   *     if (MyResolveData.foo)
+   *       return "FooCtrl"
+   *     else if (MyResolveData.bar)
+   *       return "BarCtrl";
+   *     else return function($scope) {
+   *       $scope.baz = "Qux";
+   *     }
+   *   }
+ * + * @param {string=} stateConfig.controllerAs + * + * + * A controller alias name. If present the controller will be + * published to scope under the controllerAs name. + *
controllerAs: "myCtrl"
+ * + * @param {object=} stateConfig.resolve + * + * + * An optional map<string, function> of dependencies which + * should be injected into the controller. If any of these dependencies are promises, + * the router will wait for them all to be resolved before the controller is instantiated. + * If all the promises are resolved successfully, the $stateChangeSuccess event is fired + * and the values of the resolved promises are injected into any controllers that reference them. + * If any of the promises are rejected the $stateChangeError event is fired. + * + * The map object is: + * + * - key - {string}: name of dependency to be injected into controller + * - factory - {string|function}: If string then it is alias for service. Otherwise if function, + * it is injected and return value it treated as dependency. If result is a promise, it is + * resolved before its value is injected into controller. + * + *
resolve: {
+   *     myResolve1:
+   *       function($http, $stateParams) {
+   *         return $http.get("/api/foos/"+stateParams.fooID);
+   *       }
+   *     }
+ * + * @param {string=} stateConfig.url + * + * + * A url fragment with optional parameters. When a state is navigated or + * transitioned to, the `$stateParams` service will be populated with any + * parameters that were passed. + * + * examples: + *
url: "/home"
+   * url: "/users/:userid"
+   * url: "/books/{bookid:[a-zA-Z_-]}"
+   * url: "/books/{categoryid:int}"
+   * url: "/books/{publishername:string}/{categoryid:int}"
+   * url: "/messages?before&after"
+   * url: "/messages?{before:date}&{after:date}"
+ * url: "/messages/:mailboxid?{before:date}&{after:date}" + * + * @param {object=} stateConfig.views + * + * an optional map<string, object> which defined multiple views, or targets views + * manually/explicitly. + * + * Examples: + * + * Targets three named `ui-view`s in the parent state's template + *
views: {
+   *     header: {
+   *       controller: "headerCtrl",
+   *       templateUrl: "header.html"
+   *     }, body: {
+   *       controller: "bodyCtrl",
+   *       templateUrl: "body.html"
+   *     }, footer: {
+   *       controller: "footCtrl",
+   *       templateUrl: "footer.html"
+   *     }
+   *   }
+ * + * Targets named `ui-view="header"` from grandparent state 'top''s template, and named `ui-view="body" from parent state's template. + *
views: {
+   *     'header@top': {
+   *       controller: "msgHeaderCtrl",
+   *       templateUrl: "msgHeader.html"
+   *     }, 'body': {
+   *       controller: "messagesCtrl",
+   *       templateUrl: "messages.html"
+   *     }
+   *   }
+ * + * @param {boolean=} [stateConfig.abstract=false] + * + * An abstract state will never be directly activated, + * but can provide inherited properties to its common children states. + *
abstract: true
+ * + * @param {function=} stateConfig.onEnter + * + * + * Callback function for when a state is entered. Good way + * to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, + * because it won't be automatically annotated by your build tools. + * + *
onEnter: function(MyService, $stateParams) {
+   *     MyService.foo($stateParams.myParam);
+   * }
+ * + * @param {function=} stateConfig.onExit + * + * + * Callback function for when a state is exited. Good way to + * trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, + * because it won't be automatically annotated by your build tools. + * + *
onExit: function(MyService, $stateParams) {
+   *     MyService.cleanup($stateParams.myParam);
+   * }
+ * + * @param {boolean=} [stateConfig.reloadOnSearch=true] + * + * + * If `false`, will not retrigger the same state + * just because a search/query parameter has changed (via $location.search() or $location.hash()). + * Useful for when you'd like to modify $location.search() without triggering a reload. + *
reloadOnSearch: false
+ * + * @param {object=} stateConfig.data + * + * + * Arbitrary data object, useful for custom configuration. The parent state's `data` is + * prototypally inherited. In other words, adding a data property to a state adds it to + * the entire subtree via prototypal inheritance. + * + *
data: {
+   *     requiredRole: 'foo'
+   * } 
+ * + * @param {object=} stateConfig.params + * + * + * A map which optionally configures parameters declared in the `url`, or + * defines additional non-url parameters. For each parameter being + * configured, add a configuration object keyed to the name of the parameter. + * + * Each parameter configuration object may contain the following properties: + * + * - ** value ** - {object|function=}: specifies the default value for this + * parameter. This implicitly sets this parameter as optional. + * + * When UI-Router routes to a state and no value is + * specified for this parameter in the URL or transition, the + * default value will be used instead. If `value` is a function, + * it will be injected and invoked, and the return value used. + * + * *Note*: `undefined` is treated as "no default value" while `null` + * is treated as "the default value is `null`". + * + * *Shorthand*: If you only need to configure the default value of the + * parameter, you may use a shorthand syntax. In the **`params`** + * map, instead mapping the param name to a full parameter configuration + * object, simply set map it to the default parameter value, e.g.: + * + *
// define a parameter's default value
+   * params: {
+   *     param1: { value: "defaultValue" }
+   * }
+   * // shorthand default values
+   * params: {
+   *     param1: "defaultValue",
+   *     param2: "param2Default"
+   * }
+ * + * - ** array ** - {boolean=}: *(default: false)* If true, the param value will be + * treated as an array of values. If you specified a Type, the value will be + * treated as an array of the specified Type. Note: query parameter values + * default to a special `"auto"` mode. + * + * For query parameters in `"auto"` mode, if multiple values for a single parameter + * are present in the URL (e.g.: `/foo?bar=1&bar=2&bar=3`) then the values + * are mapped to an array (e.g.: `{ foo: [ '1', '2', '3' ] }`). However, if + * only one value is present (e.g.: `/foo?bar=1`) then the value is treated as single + * value (e.g.: `{ foo: '1' }`). + * + *
params: {
+   *     param1: { array: true }
+   * }
+ * + * - ** squash ** - {bool|string=}: `squash` configures how a default parameter value is represented in the URL when + * the current parameter value is the same as the default value. If `squash` is not set, it uses the + * configured default squash policy. + * (See {@link ui.router.util.$urlMatcherFactory#methods_defaultSquashPolicy `defaultSquashPolicy()`}) + * + * There are three squash settings: + * + * - false: The parameter's default value is not squashed. It is encoded and included in the URL + * - true: The parameter's default value is omitted from the URL. If the parameter is preceeded and followed + * by slashes in the state's `url` declaration, then one of those slashes are omitted. + * This can allow for cleaner looking URLs. + * - `""`: The parameter's default value is replaced with an arbitrary placeholder of your choice. + * + *
params: {
+   *     param1: {
+   *       value: "defaultId",
+   *       squash: true
+   * } }
+   * // squash "defaultValue" to "~"
+   * params: {
+   *     param1: {
+   *       value: "defaultValue",
+   *       squash: "~"
+   * } }
+   * 
+ * + * + * @example + *
+   * // Some state name examples
+   *
+   * // stateName can be a single top-level name (must be unique).
+   * $stateProvider.state("home", {});
+   *
+   * // Or it can be a nested state name. This state is a child of the
+   * // above "home" state.
+   * $stateProvider.state("home.newest", {});
+   *
+   * // Nest states as deeply as needed.
+   * $stateProvider.state("home.newest.abc.xyz.inception", {});
+   *
+   * // state() returns $stateProvider, so you can chain state declarations.
+   * $stateProvider
+   *   .state("home", {})
+   *   .state("about", {})
+   *   .state("contacts", {});
+   * 
+ * + */ + this.state = state; + function state(name, definition) { + /*jshint validthis: true */ + if (isObject(name)) definition = name; + else definition.name = name; + registerState(definition); + return this; + } + + /** + * @ngdoc object + * @name ui.router.state.$state + * + * @requires $rootScope + * @requires $q + * @requires ui.router.state.$view + * @requires $injector + * @requires ui.router.util.$resolve + * @requires ui.router.state.$stateParams + * @requires ui.router.router.$urlRouter + * + * @property {object} params A param object, e.g. {sectionId: section.id)}, that + * you'd like to test against the current active state. + * @property {object} current A reference to the state's config object. However + * you passed it in. Useful for accessing custom data. + * @property {object} transition Currently pending transition. A promise that'll + * resolve or reject. + * + * @description + * `$state` service is responsible for representing states as well as transitioning + * between them. It also provides interfaces to ask for current state or even states + * you're coming from. + */ + this.$get = $get; + $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$urlRouter', '$location', '$urlMatcherFactory']; + function $get( $rootScope, $q, $view, $injector, $resolve, $stateParams, $urlRouter, $location, $urlMatcherFactory) { + + var TransitionSuperseded = $q.reject(new Error('transition superseded')); + var TransitionPrevented = $q.reject(new Error('transition prevented')); + var TransitionAborted = $q.reject(new Error('transition aborted')); + var TransitionFailed = $q.reject(new Error('transition failed')); + + // Handles the case where a state which is the target of a transition is not found, and the user + // can optionally retry or defer the transition + function handleRedirect(redirect, state, params, options) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateNotFound + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when a requested state **cannot be found** using the provided state name during transition. + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A special `unfoundState` object is passed to the listener handler, + * you can see its three properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `go` will be rejected with a `'transition aborted'` value. + * + * @param {Object} event Event object. + * @param {Object} unfoundState Unfound State information. Contains: `to, toParams, options` properties. + * @param {State} fromState Current state object. + * @param {Object} fromParams Current state params. + * + * @example + * + *
+       * // somewhere, assume lazy.state has not been defined
+       * $state.go("lazy.state", {a:1, b:2}, {inherit:false});
+       *
+       * // somewhere else
+       * $scope.$on('$stateNotFound',
+       * function(event, unfoundState, fromState, fromParams){
+       *     console.log(unfoundState.to); // "lazy.state"
+       *     console.log(unfoundState.toParams); // {a:1, b:2}
+       *     console.log(unfoundState.options); // {inherit:false} + default options
+       * })
+       * 
+ */ + var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params); + + if (evt.defaultPrevented) { + $urlRouter.update(); + return TransitionAborted; + } + + if (!evt.retry) { + return null; + } + + // Allow the handler to return a promise to defer state lookup retry + if (options.$retry) { + $urlRouter.update(); + return TransitionFailed; + } + var retryTransition = $state.transition = $q.when(evt.retry); + + retryTransition.then(function() { + if (retryTransition !== $state.transition) return TransitionSuperseded; + redirect.options.$retry = true; + return $state.transitionTo(redirect.to, redirect.toParams, redirect.options); + }, function() { + return TransitionAborted; + }); + $urlRouter.update(); + + return retryTransition; + } + + root.locals = { resolve: null, globals: { $stateParams: {} } }; + + $state = { + params: {}, + current: root.self, + $current: root, + transition: null + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#reload + * @methodOf ui.router.state.$state + * + * @description + * A method that force reloads the current state. All resolves are re-resolved, events are not re-fired, + * and controllers reinstantiated (bug with controllers reinstantiating right now, fixing soon). + * + * @example + *
+     * var app angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.reload = function(){
+     *     $state.reload();
+     *   }
+     * });
+     * 
+ * + * `reload()` is just an alias for: + *
+     * $state.transitionTo($state.current, $stateParams, { 
+     *   reload: true, inherit: false, notify: true
+     * });
+     * 
+ * + * @returns {promise} A promise representing the state of the new transition. See + * {@link ui.router.state.$state#methods_go $state.go}. + */ + $state.reload = function reload() { + return $state.transitionTo($state.current, $stateParams, { reload: true, inherit: false, notify: true }); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#go + * @methodOf ui.router.state.$state + * + * @description + * Convenience method for transitioning to a new state. `$state.go` calls + * `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: $state.$current, notify: true }`. + * This allows you to easily use an absolute or relative to path and specify + * only the parameters you'd like to update (while letting unspecified parameters + * inherit from the currently active ancestor states). + * + * @example + *
+     * var app = angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.changeState = function () {
+     *     $state.go('contact.detail');
+     *   };
+     * });
+     * 
+ * + * + * @param {string} to Absolute state name or relative state path. Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to a parent state + * - `$state.go('^.sibling')` - will go to a sibling state + * - `$state.go('.child.grandchild')` - will go to grandchild state + * + * @param {object=} params A map of the parameters that will be sent to the state, + * will populate $stateParams. Any parameters that are not specified will be inherited from currently + * defined parameters. This allows, for example, going to a sibling state that shares parameters + * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. + * transitioning to a sibling will get you the parameters for all parents, transitioning to a child + * will get you all current parameters, etc. + * @param {object=} options Options object. The options are: + * + * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false` + * will not. If string, must be `"replace"`, which will update url and also replace last history record. + * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events. + * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params + * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd + * use this when you want to force a reload when *everything* is the same, including search params. + * + * @returns {promise} A promise representing the state of the new transition. + * + * Possible success values: + * + * - $state.current + * + *
Possible rejection values: + * + * - 'transition superseded' - when a newer transition has been started after this one + * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener + * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or + * when a `$stateNotFound` `event.retry` promise errors. + * - 'transition failed' - when a state has been unsuccessfully found after 2 tries. + * - *resolve error* - when an error has occurred with a `resolve` + * + */ + $state.go = function go(to, params, options) { + return $state.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options)); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#transitionTo + * @methodOf ui.router.state.$state + * + * @description + * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go} + * uses `transitionTo` internally. `$state.go` is recommended in most situations. + * + * @example + *
+     * var app = angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.changeState = function () {
+     *     $state.transitionTo('contact.detail');
+     *   };
+     * });
+     * 
+ * + * @param {string} to State name. + * @param {object=} toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param {object=} options Options object. The options are: + * + * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false` + * will not. If string, must be `"replace"`, which will update url and also replace last history record. + * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events. + * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params + * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd + * use this when you want to force a reload when *everything* is the same, including search params. + * + * @returns {promise} A promise representing the state of the new transition. See + * {@link ui.router.state.$state#methods_go $state.go}. + */ + $state.transitionTo = function transitionTo(to, toParams, options) { + toParams = toParams || {}; + options = extend({ + location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false + }, options || {}); + + var from = $state.$current, fromParams = $state.params, fromPath = from.path; + var evt, toState = findState(to, options.relative); + + if (!isDefined(toState)) { + var redirect = { to: to, toParams: toParams, options: options }; + var redirectResult = handleRedirect(redirect, from.self, fromParams, options); + + if (redirectResult) { + return redirectResult; + } + + // Always retry once if the $stateNotFound was not prevented + // (handles either redirect changed or state lazy-definition) + to = redirect.to; + toParams = redirect.toParams; + options = redirect.options; + toState = findState(to, options.relative); + + if (!isDefined(toState)) { + if (!options.relative) throw new Error("No such state '" + to + "'"); + throw new Error("Could not resolve '" + to + "' from state '" + options.relative + "'"); + } + } + if (toState[abstractKey]) throw new Error("Cannot transition to abstract state '" + to + "'"); + if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState); + if (!toState.params.$$validates(toParams)) return TransitionFailed; + + toParams = toState.params.$$values(toParams); + to = toState; + + var toPath = to.path; + + // Starting from the root of the path, keep all levels that haven't changed + var keep = 0, state = toPath[keep], locals = root.locals, toLocals = []; + + if (!options.reload) { + while (state && state === fromPath[keep] && state.ownParams.$$equals(toParams, fromParams)) { + locals = toLocals[keep] = state.locals; + keep++; + state = toPath[keep]; + } + } + + // If we're going to the same state and all locals are kept, we've got nothing to do. + // But clear 'transition', as we still want to cancel any other pending transitions. + // TODO: We may not want to bump 'transition' if we're called from a location change + // that we've initiated ourselves, because we might accidentally abort a legitimate + // transition initiated from code? + if (shouldTriggerReload(to, from, locals, options)) { + if (to.self.reloadOnSearch !== false) $urlRouter.update(); + $state.transition = null; + return $q.when($state.current); + } + + // Filter parameters before we pass them to event handlers etc. + toParams = filterByKeys(to.params.$$keys(), toParams || {}); + + // Broadcast start event and cancel the transition if requested + if (options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeStart + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when the state transition **begins**. You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + * + * @example + * + *
+         * $rootScope.$on('$stateChangeStart',
+         * function(event, toState, toParams, fromState, fromParams){
+         *     event.preventDefault();
+         *     // transitionTo() promise will be rejected with
+         *     // a 'transition prevented' error
+         * })
+         * 
+ */ + if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams).defaultPrevented) { + $urlRouter.update(); + return TransitionPrevented; + } + } + + // Resolve locals for the remaining states, but don't update any global state just + // yet -- if anything fails to resolve the current state needs to remain untouched. + // We also set up an inheritance chain for the locals here. This allows the view directive + // to quickly look up the correct definition for each view in the current state. Even + // though we create the locals object itself outside resolveState(), it is initially + // empty and gets filled asynchronously. We need to keep track of the promise for the + // (fully resolved) current locals, and pass this down the chain. + var resolved = $q.when(locals); + + for (var l = keep; l < toPath.length; l++, state = toPath[l]) { + locals = toLocals[l] = inherit(locals); + resolved = resolveState(state, toParams, state === to, resolved, locals, options); + } + + // Once everything is resolved, we are ready to perform the actual transition + // and return a promise for the new state. We also keep track of what the + // current promise is, so that we can detect overlapping transitions and + // keep only the outcome of the last transition. + var transition = $state.transition = resolved.then(function () { + var l, entering, exiting; + + if ($state.transition !== transition) return TransitionSuperseded; + + // Exit 'from' states not kept + for (l = fromPath.length - 1; l >= keep; l--) { + exiting = fromPath[l]; + if (exiting.self.onExit) { + $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals); + } + exiting.locals = null; + } + + // Enter 'to' states not kept + for (l = keep; l < toPath.length; l++) { + entering = toPath[l]; + entering.locals = toLocals[l]; + if (entering.self.onEnter) { + $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals); + } + } + + // Run it again, to catch any transitions in callbacks + if ($state.transition !== transition) return TransitionSuperseded; + + // Update globals in $state + $state.$current = to; + $state.current = to.self; + $state.params = toParams; + copy($state.params, $stateParams); + $state.transition = null; + + if (options.location && to.navigable) { + $urlRouter.push(to.navigable.url, to.navigable.locals.globals.$stateParams, { + $$avoidResync: true, replace: options.location === 'replace' + }); + } + + if (options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeSuccess + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired once the state transition is **complete**. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + */ + $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams); + } + $urlRouter.update(true); + + return $state.current; + }, function (error) { + if ($state.transition !== transition) return TransitionSuperseded; + + $state.transition = null; + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeError + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when an **error occurs** during transition. It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + * @param {Error} error The resolve error object. + */ + evt = $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error); + + if (!evt.defaultPrevented) { + $urlRouter.update(); + } + + return $q.reject(error); + }); + + return transition; + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#is + * @methodOf ui.router.state.$state + * + * @description + * Similar to {@link ui.router.state.$state#methods_includes $state.includes}, + * but only checks for the full state name. If params is supplied then it will be + * tested for strict equality against the current active params object, so all params + * must match with none missing and no extras. + * + * @example + *
+     * $state.$current.name = 'contacts.details.item';
+     *
+     * // absolute name
+     * $state.is('contact.details.item'); // returns true
+     * $state.is(contactDetailItemStateObject); // returns true
+     *
+     * // relative name (. and ^), typically from a template
+     * // E.g. from the 'contacts.details' template
+     * 
Item
+ *
+ * + * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param {object=} options An options object. The options are: + * + * - **`relative`** - {string|object} - If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it is the state. + */ + $state.is = function is(stateOrName, params, options) { + options = extend({ relative: $state.$current }, options || {}); + var state = findState(stateOrName, options.relative); + + if (!isDefined(state)) { return undefined; } + if ($state.$current !== state) { return false; } + return params ? equalForKeys(state.params.$$values(params), $stateParams) : true; + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#includes + * @methodOf ui.router.state.$state + * + * @description + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * @example + * Partial and relative names + *
+     * $state.$current.name = 'contacts.details.item';
+     *
+     * // Using partial names
+     * $state.includes("contacts"); // returns true
+     * $state.includes("contacts.details"); // returns true
+     * $state.includes("contacts.details.item"); // returns true
+     * $state.includes("contacts.list"); // returns false
+     * $state.includes("about"); // returns false
+     *
+     * // Using relative names (. and ^), typically from a template
+     * // E.g. from the 'contacts.details' template
+     * 
Item
+ *
+ * + * Basic globbing patterns + *
+     * $state.$current.name = 'contacts.details.item.url';
+     *
+     * $state.includes("*.details.*.*"); // returns true
+     * $state.includes("*.details.**"); // returns true
+     * $state.includes("**.item.**"); // returns true
+     * $state.includes("*.details.item.url"); // returns true
+     * $state.includes("*.details.*.url"); // returns true
+     * $state.includes("*.details.*"); // returns false
+     * $state.includes("item.**"); // returns false
+     * 
+ * + * @param {string} stateOrName A partial name, relative name, or glob pattern + * to be searched for within the current state name. + * @param {object=} params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param {object=} options An options object. The options are: + * + * - **`relative`** - {string|object=} - If `stateOrName` is a relative state reference and `options.relative` is set, + * .includes will test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + $state.includes = function includes(stateOrName, params, options) { + options = extend({ relative: $state.$current }, options || {}); + if (isString(stateOrName) && isGlob(stateOrName)) { + if (!doesStateMatchGlob(stateOrName)) { + return false; + } + stateOrName = $state.$current.name; + } + + var state = findState(stateOrName, options.relative); + if (!isDefined(state)) { return undefined; } + if (!isDefined($state.$current.includes[state.name])) { return false; } + return params ? equalForKeys(state.params.$$values(params), $stateParams, objectKeys(params)) : true; + }; + + + /** + * @ngdoc function + * @name ui.router.state.$state#href + * @methodOf ui.router.state.$state + * + * @description + * A url generation method that returns the compiled url for the given state populated with the given params. + * + * @example + *
+     * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob");
+     * 
+ * + * @param {string|object} stateOrName The state name or state object you'd like to generate a url from. + * @param {object=} params An object of parameter values to fill the state's required parameters. + * @param {object=} options Options object. The options are: + * + * - **`lossy`** - {boolean=true} - If true, and if there is no url associated with the state provided in the + * first parameter, then the constructed href url will be built from the first navigable ancestor (aka + * ancestor with a valid url). + * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns {string} compiled state url + */ + $state.href = function href(stateOrName, params, options) { + options = extend({ + lossy: true, + inherit: true, + absolute: false, + relative: $state.$current + }, options || {}); + + var state = findState(stateOrName, options.relative); + + if (!isDefined(state)) return null; + if (options.inherit) params = inheritParams($stateParams, params || {}, $state.$current, state); + + var nav = (state && options.lossy) ? state.navigable : state; + + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return $urlRouter.href(nav.url, filterByKeys(state.params.$$keys(), params || {}), { + absolute: options.absolute + }); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#get + * @methodOf ui.router.state.$state + * + * @description + * Returns the state configuration object for any specific state or all states. + * + * @param {string|object=} stateOrName (absolute or relative) If provided, will only get the config for + * the requested state. If not provided, returns an array of ALL state configs. + * @param {string|object=} context When stateOrName is a relative state reference, the state will be retrieved relative to context. + * @returns {Object|Array} State configuration object or array of all objects. + */ + $state.get = function (stateOrName, context) { + if (arguments.length === 0) return map(objectKeys(states), function(name) { return states[name].self; }); + var state = findState(stateOrName, context || $state.$current); + return (state && state.self) ? state.self : null; + }; + + function resolveState(state, params, paramsAreFiltered, inherited, dst, options) { + // Make a restricted $stateParams with only the parameters that apply to this state if + // necessary. In addition to being available to the controller and onEnter/onExit callbacks, + // we also need $stateParams to be available for any $injector calls we make during the + // dependency resolution process. + var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params.$$keys(), params); + var locals = { $stateParams: $stateParams }; + + // Resolve 'global' dependencies for the state, i.e. those not specific to a view. + // We're also including $stateParams in this; that way the parameters are restricted + // to the set that should be visible to the state, and are independent of when we update + // the global $state and $stateParams values. + dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state); + var promises = [dst.resolve.then(function (globals) { + dst.globals = globals; + })]; + if (inherited) promises.push(inherited); + + // Resolve template and dependencies for all views. + forEach(state.views, function (view, name) { + var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {}); + injectables.$template = [ function () { + return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: options.notify }) || ''; + }]; + + promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) { + // References to the controller (only instantiated at link time) + if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) { + var injectLocals = angular.extend({}, injectables, locals); + result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals); + } else { + result.$$controller = view.controller; + } + // Provide access to the state itself for internal use + result.$$state = state; + result.$$controllerAs = view.controllerAs; + dst[name] = result; + })); + }); + + // Wait for all the promises and then return the activation object + return $q.all(promises).then(function (values) { + return dst; + }); + } + + return $state; + } + + function shouldTriggerReload(to, from, locals, options) { + if (to === from && ((locals === from.locals && !options.reload) || (to.self.reloadOnSearch === false))) { + return true; + } + } +} + +angular.module('ui.router.state') + .value('$stateParams', {}) + .provider('$state', $StateProvider); + + +$ViewProvider.$inject = []; +function $ViewProvider() { + + this.$get = $get; + /** + * @ngdoc object + * @name ui.router.state.$view + * + * @requires ui.router.util.$templateFactory + * @requires $rootScope + * + * @description + * + */ + $get.$inject = ['$rootScope', '$templateFactory']; + function $get( $rootScope, $templateFactory) { + return { + // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... }) + /** + * @ngdoc function + * @name ui.router.state.$view#load + * @methodOf ui.router.state.$view + * + * @description + * + * @param {string} name name + * @param {object} options option object. + */ + load: function load(name, options) { + var result, defaults = { + template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {} + }; + options = extend(defaults, options); + + if (options.view) { + result = $templateFactory.fromConfig(options.view, options.params, options.locals); + } + if (result && options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$viewContentLoading + * @eventOf ui.router.state.$view + * @eventType broadcast on root scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {Object} viewConfig The view config properties (template, controller, etc). + * + * @example + * + *
+         * $scope.$on('$viewContentLoading',
+         * function(event, viewConfig){
+         *     // Access to all the view config properties.
+         *     // and one special property 'targetView'
+         *     // viewConfig.targetView
+         * });
+         * 
+ */ + $rootScope.$broadcast('$viewContentLoading', options); + } + return result; + } + }; + } +} + +angular.module('ui.router.state').provider('$view', $ViewProvider); + +/** + * @ngdoc object + * @name ui.router.state.$uiViewScrollProvider + * + * @description + * Provider that returns the {@link ui.router.state.$uiViewScroll} service function. + */ +function $ViewScrollProvider() { + + var useAnchorScroll = false; + + /** + * @ngdoc function + * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll + * @methodOf ui.router.state.$uiViewScrollProvider + * + * @description + * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for + * scrolling based on the url anchor. + */ + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + + /** + * @ngdoc object + * @name ui.router.state.$uiViewScroll + * + * @requires $anchorScroll + * @requires $timeout + * + * @description + * When called with a jqLite element, it scrolls the element into view (after a + * `$timeout` so the DOM has time to refresh). + * + * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, + * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}. + */ + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + + return function ($element) { + $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} + +angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-view + * + * @requires ui.router.state.$state + * @requires $compile + * @requires $controller + * @requires $injector + * @requires ui.router.state.$uiViewScroll + * @requires $document + * + * @restrict ECA + * + * @description + * The ui-view directive tells $state where to place your templates. + * + * @param {string=} name A view name. The name should be unique amongst the other views in the + * same state. You can have views of the same name that live in different states. + * + * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window + * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll + * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you + * scroll ui-view elements into view when they are populated during a state activation. + * + * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) + * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.* + * + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @example + * A view can be unnamed or named. + *
+ * 
+ * 
+ * + * + *
+ *
+ * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + *
+ * 
+ * $stateProvider.state("home", { + * template: "

HELLO!

" + * }) + *
+ * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`} + * config property, by name, in this case an empty name: + *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "": {
+ *       template: "

HELLO!

" + * } + * } + * }) + *
+ * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + *
+ * 
+ *
+ *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "main": {
+ *       template: "

HELLO!

" + * } + * } + * }) + *
+ * + * Really though, you'll use views to set up multiple views: + *
+ * 
+ *
+ *
+ *
+ * + *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "": {
+ *       template: "

HELLO!

" + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + *
+ * + * Examples for `autoscroll`: + * + *
+ * 
+ * 
+ *
+ * 
+ * 
+ * 
+ * 
+ * 
+ */ +$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate']; +function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) { + + function getService() { + return ($injector.has) ? function(service) { + return $injector.has(service) ? $injector.get(service) : null; + } : function(service) { + try { + return $injector.get(service); + } catch (e) { + return null; + } + }; + } + + var service = getService(), + $animator = service('$animator'), + $animate = service('$animate'); + + // Returns a set of DOM manipulation functions based on which Angular version + // it should use + function getRenderer(attrs, scope) { + var statics = function() { + return { + enter: function (element, target, cb) { target.after(element); cb(); }, + leave: function (element, cb) { element.remove(); cb(); } + }; + }; + + if ($animate) { + return { + enter: function(element, target, cb) { + var promise = $animate.enter(element, null, target, cb); + if (promise && promise.then) promise.then(cb); + }, + leave: function(element, cb) { + var promise = $animate.leave(element, cb); + if (promise && promise.then) promise.then(cb); + } + }; + } + + if ($animator) { + var animate = $animator && $animator(scope, attrs); + + return { + enter: function(element, target, cb) {animate.enter(element, null, target); cb(); }, + leave: function(element, cb) { animate.leave(element); cb(); } + }; + } + + return statics(); + } + + var directive = { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, latestLocals, + onloadExp = attrs.onload || '', + autoScrollExp = attrs.autoscroll, + renderer = getRenderer(attrs, scope); + + scope.$on('$stateChangeSuccess', function() { + updateView(false); + }); + scope.$on('$viewContentLoading', function() { + updateView(false); + }); + + updateView(true); + + function cleanupLastView() { + if (previousEl) { + previousEl.remove(); + previousEl = null; + } + + if (currentScope) { + currentScope.$destroy(); + currentScope = null; + } + + if (currentEl) { + renderer.leave(currentEl, function() { + previousEl = null; + }); + + previousEl = currentEl; + currentEl = null; + } + } + + function updateView(firstTime) { + var newScope, + name = getUiViewName(scope, attrs, $element, $interpolate), + previousLocals = name && $state.$current && $state.$current.locals[name]; + + if (!firstTime && previousLocals === latestLocals) return; // nothing to do + newScope = scope.$new(); + latestLocals = $state.$current.locals[name]; + + var clone = $transclude(newScope, function(clone) { + renderer.enter(clone, $element, function onUiViewEnter() { + if(currentScope) { + currentScope.$emit('$viewContentAnimationEnded'); + } + + if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + + currentEl = clone; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } + }; + } + }; + + return directive; +} + +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate']; +function $ViewDirectiveFill ( $compile, $controller, $state, $interpolate) { + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + return function (scope, $element, attrs) { + var current = $state.$current, + name = getUiViewName(scope, attrs, $element, $interpolate), + locals = current && current.locals[name]; + + if (! locals) { + return; + } + + $element.data('$uiView', { name: name, state: locals.$$state }); + $element.html(locals.$template ? locals.$template : initial); + + var link = $compile($element.contents()); + + if (locals.$$controller) { + locals.$scope = scope; + var controller = $controller(locals.$$controller, locals); + if (locals.$$controllerAs) { + scope[locals.$$controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + + link(scope); + }; + } + }; +} + +/** + * Shared ui-view code for both directives: + * Given scope, element, and its attributes, return the view's name + */ +function getUiViewName(scope, attrs, element, $interpolate) { + var name = $interpolate(attrs.uiView || attrs.name || '')(scope); + var inherited = element.inheritedData('$uiView'); + return name.indexOf('@') >= 0 ? name : (name + '@' + (inherited ? inherited.state.name : '')); +} + +angular.module('ui.router.state').directive('uiView', $ViewDirective); +angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill); + +function parseStateRef(ref, current) { + var preparsed = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (preparsed) ref = current + '(' + preparsed[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/); + if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1], paramExpr: parsed[3] || null }; +} + +function stateContext(el) { + var stateData = el.parent().inheritedData('$uiView'); + + if (stateData && stateData.state && stateData.state.name) { + return stateData.state; + } +} + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref + * + * @requires ui.router.state.$state + * @requires $timeout + * + * @restrict A + * + * @description + * A directive that binds a link (`` tag) to a state. If the state has an associated + * URL, the directive will automatically generate & update the `href` attribute via + * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking + * the link will trigger a state transition with optional parameters. + * + * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be + * handled natively by the browser. + * + * You can also use relative state paths within ui-sref, just like the relative + * paths passed to `$state.go()`. You just need to be aware that the path is relative + * to the state that the link lives in, in other words the state that loaded the + * template containing the link. + * + * You can specify options to pass to {@link ui.router.state.$state#go $state.go()} + * using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`, + * and `reload`. + * + * @example + * Here's an example of how you'd use ui-sref and how it would compile. If you have the + * following template: + *
+ * Home | About | Next page
+ * 
+ * 
+ * 
+ * + * Then the compiled html would be (assuming Html5Mode is off and current state is contacts): + *
+ * Home | About | Next page
+ * 
+ * 
    + *
  • + * Joe + *
  • + *
  • + * Alice + *
  • + *
  • + * Bob + *
  • + *
+ * + * Home + *
+ * + * @param {string} ui-sref 'stateName' can be any valid absolute or relative state + * @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#go $state.go()} + */ +$StateRefDirective.$inject = ['$state', '$timeout']; +function $StateRefDirective($state, $timeout) { + var allowedOptions = ['location', 'inherit', 'reload']; + + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function(scope, element, attrs, uiSrefActive) { + var ref = parseStateRef(attrs.uiSref, $state.current.name); + var params = null, url = null, base = stateContext(element) || $state.$current; + var newHref = null, isAnchor = element.prop("tagName") === "A"; + var isForm = element[0].nodeName === "FORM"; + var attr = isForm ? "action" : "href", nav = true; + + var options = { relative: base, inherit: true }; + var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {}; + + angular.forEach(allowedOptions, function(option) { + if (option in optionsOverride) { + options[option] = optionsOverride[option]; + } + }); + + var update = function(newVal) { + if (newVal) params = angular.copy(newVal); + if (!nav) return; + + newHref = $state.href(ref.state, params, options); + + var activeDirective = uiSrefActive[1] || uiSrefActive[0]; + if (activeDirective) { + activeDirective.$$setStateInfo(ref.state, params); + } + if (newHref === null) { + nav = false; + return false; + } + attrs.$set(attr, newHref); + }; + + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function(newVal, oldVal) { + if (newVal !== params) update(newVal); + }, true); + params = angular.copy(scope.$eval(ref.paramExpr)); + } + update(); + + if (isForm) return; + + element.bind("click", function(e) { + var button = e.which || e.button; + if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function() { + $state.go(ref.state, params, options); + }); + e.preventDefault(); + + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = isAnchor && !newHref ? 1: 0; + e.preventDefault = function() { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }); + } + }; +} + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref-active + * + * @requires ui.router.state.$state + * @requires ui.router.state.$stateParams + * @requires $interpolate + * + * @restrict A + * + * @description + * A directive working alongside ui-sref to add classes to an element when the + * related ui-sref directive's state is active, and removing them when it is inactive. + * The primary use-case is to simplify the special appearance of navigation menus + * relying on `ui-sref`, by having the "active" state's menu button appear different, + * distinguishing it from the inactive menu items. + * + * ui-sref-active can live on the same element as ui-sref or on a parent element. The first + * ui-sref-active found at the same level or above the ui-sref will be used. + * + * Will activate when the ui-sref's target state or any child state is active. If you + * need to activate only when the ui-sref target state is active and *not* any of + * it's children, then you will use + * {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq} + * + * @example + * Given the following template: + *
+ * 
+ * 
+ * + * + * When the app state is "app.user" (or any children states), and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + *
+ * 
+ * 
+ * + * The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * Multiple classes may be specified in a space-separated format: + *
+ * 
    + *
  • + * link + *
  • + *
+ *
+ */ + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref-active-eq + * + * @requires ui.router.state.$state + * @requires ui.router.state.$stateParams + * @requires $interpolate + * + * @restrict A + * + * @description + * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate + * when the exact target state used in the `ui-sref` is active; no child states. + * + */ +$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate']; +function $StateRefActiveDirective($state, $stateParams, $interpolate) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) { + var state, params, activeClass; + + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope); + + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$setStateInfo = function (newState, newParams) { + state = $state.get(newState, stateContext($element)); + params = newParams; + update(); + }; + + $scope.$on('$stateChangeSuccess', update); + + // Update route state + function update() { + if (isMatch()) { + $element.addClass(activeClass); + } else { + $element.removeClass(activeClass); + } + } + + function isMatch() { + if (typeof $attrs.uiSrefActiveEq !== 'undefined') { + return state && $state.is(state.name, params); + } else { + return state && $state.includes(state.name, params); + } + } + }] + }; +} + +angular.module('ui.router.state') + .directive('uiSref', $StateRefDirective) + .directive('uiSrefActive', $StateRefActiveDirective) + .directive('uiSrefActiveEq', $StateRefActiveDirective); + +/** + * @ngdoc filter + * @name ui.router.state.filter:isState + * + * @requires ui.router.state.$state + * + * @description + * Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}. + */ +$IsStateFilter.$inject = ['$state']; +function $IsStateFilter($state) { + var isFilter = function (state) { + return $state.is(state); + }; + isFilter.$stateful = true; + return isFilter; +} + +/** + * @ngdoc filter + * @name ui.router.state.filter:includedByState + * + * @requires ui.router.state.$state + * + * @description + * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}. + */ +$IncludedByStateFilter.$inject = ['$state']; +function $IncludedByStateFilter($state) { + var includesFilter = function (state) { + return $state.includes(state); + }; + includesFilter.$stateful = true; + return includesFilter; +} + +angular.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); +})(window, window.angular); \ No newline at end of file diff --git a/client/www/lib/angular-ui-router/release/angular-ui-router.min.js b/client/www/lib/angular-ui-router/release/angular-ui-router.min.js new file mode 100644 index 0000000..be06fb5 --- /dev/null +++ b/client/www/lib/angular-ui-router/release/angular-ui-router.min.js @@ -0,0 +1,7 @@ +/** + * State-based routing for AngularJS + * @version v0.2.13 + * @link http://angular-ui.github.com/ + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return M(new(M(function(){},{prototype:a})),b)}function e(a){return L(arguments,function(b){b!==a&&L(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var c=[];return b.forEach(a,function(a,b){c.push(b)}),c}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return M({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(s[c]=d,I(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);L(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return J(a)&&a.then&&a.$$promises}if(!J(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return L(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!G(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;L(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!J(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=m;var n=a.defer(),r=n.promise,s=r.$$promises={},t=M({},d),u=1+q.length/3,v=!1;if(G(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,l(f.$$inheritedValues,p)),M(s,f.$$promises),f.$$values?(v=e(t,l(f.$$values,p)),r.$$inheritedValues=l(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=l(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function p(a,b,c){this.fromConfig=function(a,b,c){return G(a.template)?this.fromString(a.template,b):G(a.templateUrl)?this.fromUrl(a.templateUrl,b):G(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return H(a)?a(b):a},this.fromUrl=function(c,d){return H(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function q(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new O.Param(b,c,d,e),p[b]}function g(a,b,c){var d=["",""],e=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return e;switch(c){case!1:d=["(",")"];break;case!0:d=["?(",")?"];break;default:d=["("+c+"|",")?"]}return e+d[0]+b+d[1]}function h(c,e){var f,g,h,i,j;return f=c[2]||c[3],j=b.params[f],h=a.substring(m,c.index),g=e?c[4]:c[4]||("*"==c[1]?".*":null),i=O.type(g||"string")||d(O.type("string"),{pattern:new RegExp(g)}),{id:f,regexp:g,segment:h,type:i,cfg:j}}b=M({params:{}},J(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new O.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function r(a){M(this,a)}function s(){function a(a){return null!=a?a.toString().replace(/\//g,"%2F"):a}function e(a){return null!=a?a.toString().replace(/%2F/g,"/"):a}function f(a){return this.pattern.test(a)}function i(){return{strict:t,caseInsensitive:p}}function j(a){return H(a)||K(a)&&H(a[a.length-1])}function k(){for(;x.length;){var a=x.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(v[a.name],o.invoke(a.def))}}function l(a){M(this,a||{})}O=this;var o,p=!1,t=!0,u=!1,v={},w=!0,x=[],y={string:{encode:a,decode:e,is:f,pattern:/[^/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return G(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^/]*/},any:{encode:b.identity,decode:b.identity,is:b.identity,equals:b.equals,pattern:/.*/}};s.$$getDefaultValue=function(a){if(!j(a.value))return a.value;if(!o)throw new Error("Injectable functions cannot be called at configuration time");return o.invoke(a.value)},this.caseInsensitive=function(a){return G(a)&&(p=a),p},this.strictMode=function(a){return G(a)&&(t=a),t},this.defaultSquashPolicy=function(a){if(!G(a))return u;if(a!==!0&&a!==!1&&!I(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return u=a,a},this.compile=function(a,b){return new q(a,M(i(),b))},this.isMatcher=function(a){if(!J(a))return!1;var b=!0;return L(q.prototype,function(c,d){H(c)&&(b=b&&G(a[d])&&H(a[d]))}),b},this.type=function(a,b,c){if(!G(b))return v[a];if(v.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return v[a]=new r(M({name:a},b)),c&&(x.push({name:a,def:c}),w||k()),this},L(y,function(a,b){v[b]=new r(M({name:b},a))}),v=d(v,{}),this.$get=["$injector",function(a){return o=a,w=!1,k(),L(y,function(a,b){v[b]||(v[b]=new r(a))}),this}],this.Param=function(a,b,d,e){function f(a){var b=J(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=j(a.value)?a.value:function(){return a.value},a}function i(b,c,d){if(b.type&&c)throw new Error("Param '"+a+"' has two type configurations.");return c?c:b.type?b.type instanceof r?b.type:new r(b.type):"config"===d?v.any:v.string}function k(){var b={array:"search"===e?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return M(b,c,d).array}function l(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!G(c)||null==c)return u;if(c===!0||I(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function p(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=K(a.replace)?a.replace:[],I(e)&&f.push({from:e,to:c}),g=n(f,function(a){return a.from}),m(i,function(a){return-1===h(g,a.from)}).concat(f)}function q(){if(!o)throw new Error("Injectable functions cannot be called at configuration time");return o.invoke(d.$$fn)}function s(a){function b(a){return function(b){return b.from===a}}function c(a){var c=n(m(w.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),G(a)?w.type.decode(a):q()}function t(){return"{Param:"+a+" "+b+" squash: '"+z+"' optional: "+y+"}"}var w=this;d=f(d),b=i(d,b,e);var x=k();b=x?b.$asArray(x,"search"===e):b,"string"!==b.name||x||"path"!==e||d.value!==c||(d.value="");var y=d.value!==c,z=l(d,y),A=p(d,x,y,z);M(this,{id:a,type:b,location:e,array:x,squash:z,replace:A,isOptional:y,value:s,dynamic:c,config:d,toString:t})},l.prototype={$$new:function(){return d(this,M(new l,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(l.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),L(b,function(b){L(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return L(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return L(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var b,c,d,e=!0,f=this;return L(this.$$keys(),function(g){d=f[g],c=a[g],b=!c&&d.isOptional,e=e&&(b||!!d.type.is(c))}),e},$$parent:c},this.ParamSet=l}function t(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return G(d)?d:!0}function h(d,e,f,g){function h(a,b,c){return"/"===p?a:b?p.slice(0,-1)+a:c?p.slice(1)+a:a}function m(a){function b(a){var b=a(f,d);return b?(I(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){var e=o&&d.url()===o;if(o=c,e)return!0;var g,h=j.length;for(g=0;h>g;g++)if(b(j[g]))return;k&&b(k)}}function n(){return i=i||e.$on("$locationChangeSuccess",m)}var o,p=g.baseHref(),q=d.url();return l||n(),{sync:function(){m()},listen:function(){return n()},update:function(a){return a?void(q=d.url()):void(d.url()!==q&&(d.url(q),d.replace()))},push:function(a,b,e){d.url(a.format(b||{})),o=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled);var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),i=h(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!H(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(I(a)){var b=a;a=function(){return b}}else if(!H(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=I(b);if(I(a)&&(a=d.compile(a)),!h&&!H(b)&&!K(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),M(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:I(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),M(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser"]}function u(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function l(a,b){if(!a)return c;var d=I(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=l(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var m=y[e];return!m||!d&&(d||m!==a&&m.self!==a)?c:m}function m(a,b){z[a]||(z[a]=[]),z[a].push(b)}function o(a){for(var b=z[a]||[];b.length;)p(b.shift())}function p(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!I(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(y.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):I(b.parent)?b.parent:J(b.parent)&&I(b.parent.name)?b.parent.name:"";if(e&&!y[e])return m(e,b.self);for(var f in B)H(B[f])&&(b[f]=B[f](b,B.$delegates[f]));return y[c]=b,!b[A]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){x.$current.navigable==b&&j(a,c)||x.transitionTo(b,a,{inherit:!0,location:!1})}]),o(c),b}function q(a){return a.indexOf("*")>-1}function r(a){var b=a.split("."),c=x.$current.name.split(".");if("**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length)return!1;for(var d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return c.join("")===b.join("")}function s(a,b){return I(a)&&!G(b)?B[a]:H(b)&&I(a)?(B[a]&&!B.$delegates[a]&&(B.$delegates[a]=B[a]),B[a]=b,this):this}function t(a,b){return J(a)?b=a:b.name=a,p(b),this}function u(a,e,f,h,m,o,p){function s(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),B;if(!g.retry)return null;if(f.$retry)return p.update(),C;var h=x.transition=e.when(g.retry);return h.then(function(){return h!==x.transition?u:(b.options.$retry=!0,x.transitionTo(b.to,b.toParams,b.options))},function(){return B}),p.update(),h}function t(a,c,d,g,i,j){var l=d?c:k(a.params.$$keys(),c),n={$stateParams:l};i.resolve=m.resolve(a.resolve,n,i.resolve,a);var o=[i.resolve.then(function(a){i.globals=a})];return g&&o.push(g),L(a.views,function(c,d){var e=c.resolve&&c.resolve!==a.resolve?c.resolve:{};e.$template=[function(){return f.load(d,{view:c,locals:n,params:l,notify:j.notify})||""}],o.push(m.resolve(e,n,i.resolve,a).then(function(f){if(H(c.controllerProvider)||K(c.controllerProvider)){var g=b.extend({},e,n);f.$$controller=h.invoke(c.controllerProvider,null,g)}else f.$$controller=c.controller;f.$$state=a,f.$$controllerAs=c.controllerAs,i[d]=f}))}),e.all(o).then(function(){return i})}var u=e.reject(new Error("transition superseded")),z=e.reject(new Error("transition prevented")),B=e.reject(new Error("transition aborted")),C=e.reject(new Error("transition failed"));return w.locals={resolve:null,globals:{$stateParams:{}}},x={params:{},current:w.self,$current:w,transition:null},x.reload=function(){return x.transitionTo(x.current,o,{reload:!0,inherit:!1,notify:!0})},x.go=function(a,b,c){return x.transitionTo(a,b,M({inherit:!0,relative:x.$current},c))},x.transitionTo=function(b,c,f){c=c||{},f=M({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=x.$current,m=x.params,n=j.path,q=l(b,f.relative);if(!G(q)){var r={to:b,toParams:c,options:f},y=s(r,j.self,m,f);if(y)return y;if(b=r.to,c=r.toParams,f=r.options,q=l(b,f.relative),!G(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[A])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(o,c||{},x.$current,q)),!q.params.$$validates(c))return C;c=q.params.$$values(c),b=q;var B=b.path,D=0,E=B[D],F=w.locals,H=[];if(!f.reload)for(;E&&E===n[D]&&E.ownParams.$$equals(c,m);)F=H[D]=E.locals,D++,E=B[D];if(v(b,j,F,f))return b.self.reloadOnSearch!==!1&&p.update(),x.transition=null,e.when(x.current);if(c=k(b.params.$$keys(),c||{}),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,m).defaultPrevented)return p.update(),z;for(var I=e.when(F),J=D;J=D;d--)g=n[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d=0?e:e+"@"+(f?f.state.name:"")}function A(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function B(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function C(a,c){var d=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,f,g,h){var i=A(g.uiSref,a.current.name),j=null,k=B(f)||a.$current,l=null,m="A"===f.prop("tagName"),n="FORM"===f[0].nodeName,o=n?"action":"href",p=!0,q={relative:k,inherit:!0},r=e.$eval(g.uiSrefOpts)||{};b.forEach(d,function(a){a in r&&(q[a]=r[a])});var s=function(c){if(c&&(j=b.copy(c)),p){l=a.href(i.state,j,q);var d=h[1]||h[0];return d&&d.$$setStateInfo(i.state,j),null===l?(p=!1,!1):void g.$set(o,l)}};i.paramExpr&&(e.$watch(i.paramExpr,function(a){a!==j&&s(a)},!0),j=b.copy(e.$eval(i.paramExpr))),s(),n||f.bind("click",function(b){var d=b.which||b.button;if(!(d>1||b.ctrlKey||b.metaKey||b.shiftKey||f.attr("target"))){var e=c(function(){a.go(i.state,j,q)});b.preventDefault();var g=m&&!l?1:0;b.preventDefault=function(){g--<=0&&c.cancel(e)}}})}}}function D(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs",function(b,d,e){function f(){g()?d.addClass(j):d.removeClass(j)}function g(){return"undefined"!=typeof e.uiSrefActiveEq?h&&a.is(h.name,i):h&&a.includes(h.name,i)}var h,i,j;j=c(e.uiSrefActiveEq||e.uiSrefActive||"",!1)(b),this.$$setStateInfo=function(b,c){h=a.get(b,B(d)),i=c,f()},b.$on("$stateChangeSuccess",f)}]}}function E(a){var b=function(b){return a.is(b)};return b.$stateful=!0,b}function F(a){var b=function(b){return a.includes(b)};return b.$stateful=!0,b}var G=b.isDefined,H=b.isFunction,I=b.isString,J=b.isObject,K=b.isArray,L=b.forEach,M=b.extend,N=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),o.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",o),p.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",p);var O;q.prototype.concat=function(a,b){var c={caseInsensitive:O.caseInsensitive(),strict:O.strictMode(),squash:O.defaultSquashPolicy()};return new q(this.sourcePath+a+this.sourceSearch,M(c,b),this)},q.prototype.toString=function(){return this.source},q.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/,"-")}var d=b(a).split(/-(?!\\)/),e=n(d,b);return n(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(e=0;j>e;e++){g=h[e];var l=this.params[g],m=d[e+1];for(f=0;fe;e++)g=h[e],k[g]=this.params[g].value(b[g]);return k},q.prototype.parameters=function(a){return G(a)?this.params[a]||null:this.$$paramNames},q.prototype.validates=function(a){return this.params.$$validates(a)},q.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],o=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),o),q=p?m.squash:!1,r=m.type.encode(o);if(k){var s=c[f+1];if(q===!1)null!=r&&(j+=K(r)?n(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var t=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(t)[1]}else I(q)&&(j+=q+s)}else{if(null==r||p&&q!==!1)continue;K(r)||(r=[r]),r=n(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},r.prototype.is=function(){return!0},r.prototype.encode=function(a){return a},r.prototype.decode=function(a){return a},r.prototype.equals=function(a,b){return a==b},r.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},r.prototype.pattern=/.*/,r.prototype.toString=function(){return"{Type:"+this.name+"}"},r.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return K(a)?a:G(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){c=e(c);var d=n(c,a);return b===!0?0===m(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g>> 0, from = Number(arguments[2]) || 0; + from = (from < 0) ? Math.ceil(from) : Math.floor(from); + + if (from < 0) from += len; + + for (; from < len; from++) { + if (from in array && array[from] === value) return from; + } + return -1; +} + +/** + * Merges a set of parameters with all parameters inherited between the common parents of the + * current state and a given destination state. + * + * @param {Object} currentParams The value of the current state parameters ($stateParams). + * @param {Object} newParams The set of parameters which will be composited with inherited params. + * @param {Object} $current Internal definition of object representing the current state. + * @param {Object} $to Internal definition of object representing state to transition to. + */ +function inheritParams(currentParams, newParams, $current, $to) { + var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = []; + + for (var i in parents) { + if (!parents[i].params) continue; + parentParams = objectKeys(parents[i].params); + if (!parentParams.length) continue; + + for (var j in parentParams) { + if (indexOf(inheritList, parentParams[j]) >= 0) continue; + inheritList.push(parentParams[j]); + inherited[parentParams[j]] = currentParams[parentParams[j]]; + } + } + return extend({}, inherited, newParams); +} + +/** + * Performs a non-strict comparison of the subset of two objects, defined by a list of keys. + * + * @param {Object} a The first object. + * @param {Object} b The second object. + * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified, + * it defaults to the list of keys in `a`. + * @return {Boolean} Returns `true` if the keys match, otherwise `false`. + */ +function equalForKeys(a, b, keys) { + if (!keys) { + keys = []; + for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility + } + + for (var i=0; i + * + * + * + * + * + * + * + * + * + * + * + * + */ +angular.module('ui.router', ['ui.router.state']); + +angular.module('ui.router.compat', ['ui.router']); diff --git a/client/www/lib/angular-ui-router/src/resolve.js b/client/www/lib/angular-ui-router/src/resolve.js new file mode 100644 index 0000000..f1c1790 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/resolve.js @@ -0,0 +1,252 @@ +/** + * @ngdoc object + * @name ui.router.util.$resolve + * + * @requires $q + * @requires $injector + * + * @description + * Manages resolution of (acyclic) graphs of promises. + */ +$Resolve.$inject = ['$q', '$injector']; +function $Resolve( $q, $injector) { + + var VISIT_IN_PROGRESS = 1, + VISIT_DONE = 2, + NOTHING = {}, + NO_DEPENDENCIES = [], + NO_LOCALS = NOTHING, + NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING }); + + + /** + * @ngdoc function + * @name ui.router.util.$resolve#study + * @methodOf ui.router.util.$resolve + * + * @description + * Studies a set of invocables that are likely to be used multiple times. + *
+   * $resolve.study(invocables)(locals, parent, self)
+   * 
+ * is equivalent to + *
+   * $resolve.resolve(invocables, locals, parent, self)
+   * 
+ * but the former is more efficient (in fact `resolve` just calls `study` + * internally). + * + * @param {object} invocables Invocable objects + * @return {function} a function to pass in locals, parent and self + */ + this.study = function (invocables) { + if (!isObject(invocables)) throw new Error("'invocables' must be an object"); + var invocableKeys = objectKeys(invocables || {}); + + // Perform a topological sort of invocables to build an ordered plan + var plan = [], cycle = [], visited = {}; + function visit(value, key) { + if (visited[key] === VISIT_DONE) return; + + cycle.push(key); + if (visited[key] === VISIT_IN_PROGRESS) { + cycle.splice(0, indexOf(cycle, key)); + throw new Error("Cyclic dependency: " + cycle.join(" -> ")); + } + visited[key] = VISIT_IN_PROGRESS; + + if (isString(value)) { + plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES); + } else { + var params = $injector.annotate(value); + forEach(params, function (param) { + if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param); + }); + plan.push(key, value, params); + } + + cycle.pop(); + visited[key] = VISIT_DONE; + } + forEach(invocables, visit); + invocables = cycle = visited = null; // plan is all that's required + + function isResolve(value) { + return isObject(value) && value.then && value.$$promises; + } + + return function (locals, parent, self) { + if (isResolve(locals) && self === undefined) { + self = parent; parent = locals; locals = null; + } + if (!locals) locals = NO_LOCALS; + else if (!isObject(locals)) { + throw new Error("'locals' must be an object"); + } + if (!parent) parent = NO_PARENT; + else if (!isResolve(parent)) { + throw new Error("'parent' must be a promise returned by $resolve.resolve()"); + } + + // To complete the overall resolution, we have to wait for the parent + // promise and for the promise for each invokable in our plan. + var resolution = $q.defer(), + result = resolution.promise, + promises = result.$$promises = {}, + values = extend({}, locals), + wait = 1 + plan.length/3, + merged = false; + + function done() { + // Merge parent values we haven't got yet and publish our own $$values + if (!--wait) { + if (!merged) merge(values, parent.$$values); + result.$$values = values; + result.$$promises = result.$$promises || true; // keep for isResolve() + delete result.$$inheritedValues; + resolution.resolve(values); + } + } + + function fail(reason) { + result.$$failure = reason; + resolution.reject(reason); + } + + // Short-circuit if parent has already failed + if (isDefined(parent.$$failure)) { + fail(parent.$$failure); + return result; + } + + if (parent.$$inheritedValues) { + merge(values, omit(parent.$$inheritedValues, invocableKeys)); + } + + // Merge parent values if the parent has already resolved, or merge + // parent promises and wait if the parent resolve is still in progress. + extend(promises, parent.$$promises); + if (parent.$$values) { + merged = merge(values, omit(parent.$$values, invocableKeys)); + result.$$inheritedValues = omit(parent.$$values, invocableKeys); + done(); + } else { + if (parent.$$inheritedValues) { + result.$$inheritedValues = omit(parent.$$inheritedValues, invocableKeys); + } + parent.then(done, fail); + } + + // Process each invocable in the plan, but ignore any where a local of the same name exists. + for (var i=0, ii=plan.length; i= 0) throw new Error("State must have a valid name"); + if (states.hasOwnProperty(name)) throw new Error("State '" + name + "'' is already defined"); + + // Get parent name + var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.')) + : (isString(state.parent)) ? state.parent + : (isObject(state.parent) && isString(state.parent.name)) ? state.parent.name + : ''; + + // If parent is not registered yet, add state to queue and register later + if (parentName && !states[parentName]) { + return queueState(parentName, state.self); + } + + for (var key in stateBuilder) { + if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]); + } + states[name] = state; + + // Register the state in the global state list and with $urlRouter if necessary. + if (!state[abstractKey] && state.url) { + $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) { + if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) { + $state.transitionTo(state, $match, { inherit: true, location: false }); + } + }]); + } + + // Register any queued children + flushQueuedChildren(name); + + return state; + } + + // Checks text to see if it looks like a glob. + function isGlob (text) { + return text.indexOf('*') > -1; + } + + // Returns true if glob matches current $state name. + function doesStateMatchGlob (glob) { + var globSegments = glob.split('.'), + segments = $state.$current.name.split('.'); + + //match greedy starts + if (globSegments[0] === '**') { + segments = segments.slice(indexOf(segments, globSegments[1])); + segments.unshift('**'); + } + //match greedy ends + if (globSegments[globSegments.length - 1] === '**') { + segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE); + segments.push('**'); + } + + if (globSegments.length != segments.length) { + return false; + } + + //match single stars + for (var i = 0, l = globSegments.length; i < l; i++) { + if (globSegments[i] === '*') { + segments[i] = '*'; + } + } + + return segments.join('') === globSegments.join(''); + } + + + // Implicit root state that is always active + root = registerState({ + name: '', + url: '^', + views: null, + 'abstract': true + }); + root.navigable = null; + + + /** + * @ngdoc function + * @name ui.router.state.$stateProvider#decorator + * @methodOf ui.router.state.$stateProvider + * + * @description + * Allows you to extend (carefully) or override (at your own peril) the + * `stateBuilder` object used internally by `$stateProvider`. This can be used + * to add custom functionality to ui-router, for example inferring templateUrl + * based on the state name. + * + * When passing only a name, it returns the current (original or decorated) builder + * function that matches `name`. + * + * The builder functions that can be decorated are listed below. Though not all + * necessarily have a good use case for decoration, that is up to you to decide. + * + * In addition, users can attach custom decorators, which will generate new + * properties within the state's internal definition. There is currently no clear + * use-case for this beyond accessing internal states (i.e. $state.$current), + * however, expect this to become increasingly relevant as we introduce additional + * meta-programming features. + * + * **Warning**: Decorators should not be interdependent because the order of + * execution of the builder functions in non-deterministic. Builder functions + * should only be dependent on the state definition object and super function. + * + * + * Existing builder functions and current return values: + * + * - **parent** `{object}` - returns the parent state object. + * - **data** `{object}` - returns state data, including any inherited data that is not + * overridden by own values (if any). + * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} + * or `null`. + * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is + * navigable). + * - **params** `{object}` - returns an array of state params that are ensured to + * be a super-set of parent's params. + * - **views** `{object}` - returns a views object where each key is an absolute view + * name (i.e. "viewName@stateName") and each value is the config object + * (template, controller) for the view. Even when you don't use the views object + * explicitly on a state config, one is still created for you internally. + * So by decorating this builder function you have access to decorating template + * and controller properties. + * - **ownParams** `{object}` - returns an array of params that belong to the state, + * not including any params defined by ancestor states. + * - **path** `{string}` - returns the full path from the root down to this state. + * Needed for state activation. + * - **includes** `{object}` - returns an object that includes every state that + * would pass a `$state.includes()` test. + * + * @example + *
+   * // Override the internal 'views' builder with a function that takes the state
+   * // definition, and a reference to the internal function being overridden:
+   * $stateProvider.decorator('views', function (state, parent) {
+   *   var result = {},
+   *       views = parent(state);
+   *
+   *   angular.forEach(views, function (config, name) {
+   *     var autoName = (state.name + '.' + name).replace('.', '/');
+   *     config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';
+   *     result[name] = config;
+   *   });
+   *   return result;
+   * });
+   *
+   * $stateProvider.state('home', {
+   *   views: {
+   *     'contact.list': { controller: 'ListController' },
+   *     'contact.item': { controller: 'ItemController' }
+   *   }
+   * });
+   *
+   * // ...
+   *
+   * $state.go('home');
+   * // Auto-populates list and item views with /partials/home/contact/list.html,
+   * // and /partials/home/contact/item.html, respectively.
+   * 
+ * + * @param {string} name The name of the builder function to decorate. + * @param {object} func A function that is responsible for decorating the original + * builder function. The function receives two parameters: + * + * - `{object}` - state - The state config object. + * - `{object}` - super - The original builder function. + * + * @return {object} $stateProvider - $stateProvider instance + */ + this.decorator = decorator; + function decorator(name, func) { + /*jshint validthis: true */ + if (isString(name) && !isDefined(func)) { + return stateBuilder[name]; + } + if (!isFunction(func) || !isString(name)) { + return this; + } + if (stateBuilder[name] && !stateBuilder.$delegates[name]) { + stateBuilder.$delegates[name] = stateBuilder[name]; + } + stateBuilder[name] = func; + return this; + } + + /** + * @ngdoc function + * @name ui.router.state.$stateProvider#state + * @methodOf ui.router.state.$stateProvider + * + * @description + * Registers a state configuration under a given state name. The stateConfig object + * has the following acceptable properties. + * + * @param {string} name A unique state name, e.g. "home", "about", "contacts". + * To create a parent/child state use a dot, e.g. "about.sales", "home.newest". + * @param {object} stateConfig State configuration object. + * @param {string|function=} stateConfig.template + * + * html template as a string or a function that returns + * an html template as a string which should be used by the uiView directives. This property + * takes precedence over templateUrl. + * + * If `template` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + *
template:
+   *   "

inline template definition

" + + * "
"
+ *
template: function(params) {
+   *       return "

generated template

"; }
+ * + * + * @param {string|function=} stateConfig.templateUrl + * + * + * path or function that returns a path to an html + * template that should be used by uiView. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - {array.<object>} - state parameters extracted from the current $location.path() by + * applying the current state + * + *
templateUrl: "home.html"
+ *
templateUrl: function(params) {
+   *     return myTemplates[params.pageId]; }
+ * + * @param {function=} stateConfig.templateProvider + * + * Provider function that returns HTML content string. + *
 templateProvider:
+   *       function(MyTemplateService, params) {
+   *         return MyTemplateService.getTemplate(params.pageId);
+   *       }
+ * + * @param {string|function=} stateConfig.controller + * + * + * Controller fn that should be associated with newly + * related scope or the name of a registered controller if passed as a string. + * Optionally, the ControllerAs may be declared here. + *
controller: "MyRegisteredController"
+ *
controller:
+   *     "MyRegisteredController as fooCtrl"}
+ *
controller: function($scope, MyService) {
+   *     $scope.data = MyService.getData(); }
+ * + * @param {function=} stateConfig.controllerProvider + * + * + * Injectable provider function that returns the actual controller or string. + *
controllerProvider:
+   *   function(MyResolveData) {
+   *     if (MyResolveData.foo)
+   *       return "FooCtrl"
+   *     else if (MyResolveData.bar)
+   *       return "BarCtrl";
+   *     else return function($scope) {
+   *       $scope.baz = "Qux";
+   *     }
+   *   }
+ * + * @param {string=} stateConfig.controllerAs + * + * + * A controller alias name. If present the controller will be + * published to scope under the controllerAs name. + *
controllerAs: "myCtrl"
+ * + * @param {object=} stateConfig.resolve + * + * + * An optional map<string, function> of dependencies which + * should be injected into the controller. If any of these dependencies are promises, + * the router will wait for them all to be resolved before the controller is instantiated. + * If all the promises are resolved successfully, the $stateChangeSuccess event is fired + * and the values of the resolved promises are injected into any controllers that reference them. + * If any of the promises are rejected the $stateChangeError event is fired. + * + * The map object is: + * + * - key - {string}: name of dependency to be injected into controller + * - factory - {string|function}: If string then it is alias for service. Otherwise if function, + * it is injected and return value it treated as dependency. If result is a promise, it is + * resolved before its value is injected into controller. + * + *
resolve: {
+   *     myResolve1:
+   *       function($http, $stateParams) {
+   *         return $http.get("/api/foos/"+stateParams.fooID);
+   *       }
+   *     }
+ * + * @param {string=} stateConfig.url + * + * + * A url fragment with optional parameters. When a state is navigated or + * transitioned to, the `$stateParams` service will be populated with any + * parameters that were passed. + * + * examples: + *
url: "/home"
+   * url: "/users/:userid"
+   * url: "/books/{bookid:[a-zA-Z_-]}"
+   * url: "/books/{categoryid:int}"
+   * url: "/books/{publishername:string}/{categoryid:int}"
+   * url: "/messages?before&after"
+   * url: "/messages?{before:date}&{after:date}"
+ * url: "/messages/:mailboxid?{before:date}&{after:date}" + * + * @param {object=} stateConfig.views + * + * an optional map<string, object> which defined multiple views, or targets views + * manually/explicitly. + * + * Examples: + * + * Targets three named `ui-view`s in the parent state's template + *
views: {
+   *     header: {
+   *       controller: "headerCtrl",
+   *       templateUrl: "header.html"
+   *     }, body: {
+   *       controller: "bodyCtrl",
+   *       templateUrl: "body.html"
+   *     }, footer: {
+   *       controller: "footCtrl",
+   *       templateUrl: "footer.html"
+   *     }
+   *   }
+ * + * Targets named `ui-view="header"` from grandparent state 'top''s template, and named `ui-view="body" from parent state's template. + *
views: {
+   *     'header@top': {
+   *       controller: "msgHeaderCtrl",
+   *       templateUrl: "msgHeader.html"
+   *     }, 'body': {
+   *       controller: "messagesCtrl",
+   *       templateUrl: "messages.html"
+   *     }
+   *   }
+ * + * @param {boolean=} [stateConfig.abstract=false] + * + * An abstract state will never be directly activated, + * but can provide inherited properties to its common children states. + *
abstract: true
+ * + * @param {function=} stateConfig.onEnter + * + * + * Callback function for when a state is entered. Good way + * to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, + * because it won't be automatically annotated by your build tools. + * + *
onEnter: function(MyService, $stateParams) {
+   *     MyService.foo($stateParams.myParam);
+   * }
+ * + * @param {function=} stateConfig.onExit + * + * + * Callback function for when a state is exited. Good way to + * trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, + * because it won't be automatically annotated by your build tools. + * + *
onExit: function(MyService, $stateParams) {
+   *     MyService.cleanup($stateParams.myParam);
+   * }
+ * + * @param {boolean=} [stateConfig.reloadOnSearch=true] + * + * + * If `false`, will not retrigger the same state + * just because a search/query parameter has changed (via $location.search() or $location.hash()). + * Useful for when you'd like to modify $location.search() without triggering a reload. + *
reloadOnSearch: false
+ * + * @param {object=} stateConfig.data + * + * + * Arbitrary data object, useful for custom configuration. The parent state's `data` is + * prototypally inherited. In other words, adding a data property to a state adds it to + * the entire subtree via prototypal inheritance. + * + *
data: {
+   *     requiredRole: 'foo'
+   * } 
+ * + * @param {object=} stateConfig.params + * + * + * A map which optionally configures parameters declared in the `url`, or + * defines additional non-url parameters. For each parameter being + * configured, add a configuration object keyed to the name of the parameter. + * + * Each parameter configuration object may contain the following properties: + * + * - ** value ** - {object|function=}: specifies the default value for this + * parameter. This implicitly sets this parameter as optional. + * + * When UI-Router routes to a state and no value is + * specified for this parameter in the URL or transition, the + * default value will be used instead. If `value` is a function, + * it will be injected and invoked, and the return value used. + * + * *Note*: `undefined` is treated as "no default value" while `null` + * is treated as "the default value is `null`". + * + * *Shorthand*: If you only need to configure the default value of the + * parameter, you may use a shorthand syntax. In the **`params`** + * map, instead mapping the param name to a full parameter configuration + * object, simply set map it to the default parameter value, e.g.: + * + *
// define a parameter's default value
+   * params: {
+   *     param1: { value: "defaultValue" }
+   * }
+   * // shorthand default values
+   * params: {
+   *     param1: "defaultValue",
+   *     param2: "param2Default"
+   * }
+ * + * - ** array ** - {boolean=}: *(default: false)* If true, the param value will be + * treated as an array of values. If you specified a Type, the value will be + * treated as an array of the specified Type. Note: query parameter values + * default to a special `"auto"` mode. + * + * For query parameters in `"auto"` mode, if multiple values for a single parameter + * are present in the URL (e.g.: `/foo?bar=1&bar=2&bar=3`) then the values + * are mapped to an array (e.g.: `{ foo: [ '1', '2', '3' ] }`). However, if + * only one value is present (e.g.: `/foo?bar=1`) then the value is treated as single + * value (e.g.: `{ foo: '1' }`). + * + *
params: {
+   *     param1: { array: true }
+   * }
+ * + * - ** squash ** - {bool|string=}: `squash` configures how a default parameter value is represented in the URL when + * the current parameter value is the same as the default value. If `squash` is not set, it uses the + * configured default squash policy. + * (See {@link ui.router.util.$urlMatcherFactory#methods_defaultSquashPolicy `defaultSquashPolicy()`}) + * + * There are three squash settings: + * + * - false: The parameter's default value is not squashed. It is encoded and included in the URL + * - true: The parameter's default value is omitted from the URL. If the parameter is preceeded and followed + * by slashes in the state's `url` declaration, then one of those slashes are omitted. + * This can allow for cleaner looking URLs. + * - `""`: The parameter's default value is replaced with an arbitrary placeholder of your choice. + * + *
params: {
+   *     param1: {
+   *       value: "defaultId",
+   *       squash: true
+   * } }
+   * // squash "defaultValue" to "~"
+   * params: {
+   *     param1: {
+   *       value: "defaultValue",
+   *       squash: "~"
+   * } }
+   * 
+ * + * + * @example + *
+   * // Some state name examples
+   *
+   * // stateName can be a single top-level name (must be unique).
+   * $stateProvider.state("home", {});
+   *
+   * // Or it can be a nested state name. This state is a child of the
+   * // above "home" state.
+   * $stateProvider.state("home.newest", {});
+   *
+   * // Nest states as deeply as needed.
+   * $stateProvider.state("home.newest.abc.xyz.inception", {});
+   *
+   * // state() returns $stateProvider, so you can chain state declarations.
+   * $stateProvider
+   *   .state("home", {})
+   *   .state("about", {})
+   *   .state("contacts", {});
+   * 
+ * + */ + this.state = state; + function state(name, definition) { + /*jshint validthis: true */ + if (isObject(name)) definition = name; + else definition.name = name; + registerState(definition); + return this; + } + + /** + * @ngdoc object + * @name ui.router.state.$state + * + * @requires $rootScope + * @requires $q + * @requires ui.router.state.$view + * @requires $injector + * @requires ui.router.util.$resolve + * @requires ui.router.state.$stateParams + * @requires ui.router.router.$urlRouter + * + * @property {object} params A param object, e.g. {sectionId: section.id)}, that + * you'd like to test against the current active state. + * @property {object} current A reference to the state's config object. However + * you passed it in. Useful for accessing custom data. + * @property {object} transition Currently pending transition. A promise that'll + * resolve or reject. + * + * @description + * `$state` service is responsible for representing states as well as transitioning + * between them. It also provides interfaces to ask for current state or even states + * you're coming from. + */ + this.$get = $get; + $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$urlRouter', '$location', '$urlMatcherFactory']; + function $get( $rootScope, $q, $view, $injector, $resolve, $stateParams, $urlRouter, $location, $urlMatcherFactory) { + + var TransitionSuperseded = $q.reject(new Error('transition superseded')); + var TransitionPrevented = $q.reject(new Error('transition prevented')); + var TransitionAborted = $q.reject(new Error('transition aborted')); + var TransitionFailed = $q.reject(new Error('transition failed')); + + // Handles the case where a state which is the target of a transition is not found, and the user + // can optionally retry or defer the transition + function handleRedirect(redirect, state, params, options) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateNotFound + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when a requested state **cannot be found** using the provided state name during transition. + * The event is broadcast allowing any handlers a single chance to deal with the error (usually by + * lazy-loading the unfound state). A special `unfoundState` object is passed to the listener handler, + * you can see its three properties in the example. You can use `event.preventDefault()` to abort the + * transition and the promise returned from `go` will be rejected with a `'transition aborted'` value. + * + * @param {Object} event Event object. + * @param {Object} unfoundState Unfound State information. Contains: `to, toParams, options` properties. + * @param {State} fromState Current state object. + * @param {Object} fromParams Current state params. + * + * @example + * + *
+       * // somewhere, assume lazy.state has not been defined
+       * $state.go("lazy.state", {a:1, b:2}, {inherit:false});
+       *
+       * // somewhere else
+       * $scope.$on('$stateNotFound',
+       * function(event, unfoundState, fromState, fromParams){
+       *     console.log(unfoundState.to); // "lazy.state"
+       *     console.log(unfoundState.toParams); // {a:1, b:2}
+       *     console.log(unfoundState.options); // {inherit:false} + default options
+       * })
+       * 
+ */ + var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params); + + if (evt.defaultPrevented) { + $urlRouter.update(); + return TransitionAborted; + } + + if (!evt.retry) { + return null; + } + + // Allow the handler to return a promise to defer state lookup retry + if (options.$retry) { + $urlRouter.update(); + return TransitionFailed; + } + var retryTransition = $state.transition = $q.when(evt.retry); + + retryTransition.then(function() { + if (retryTransition !== $state.transition) return TransitionSuperseded; + redirect.options.$retry = true; + return $state.transitionTo(redirect.to, redirect.toParams, redirect.options); + }, function() { + return TransitionAborted; + }); + $urlRouter.update(); + + return retryTransition; + } + + root.locals = { resolve: null, globals: { $stateParams: {} } }; + + $state = { + params: {}, + current: root.self, + $current: root, + transition: null + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#reload + * @methodOf ui.router.state.$state + * + * @description + * A method that force reloads the current state. All resolves are re-resolved, events are not re-fired, + * and controllers reinstantiated (bug with controllers reinstantiating right now, fixing soon). + * + * @example + *
+     * var app angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.reload = function(){
+     *     $state.reload();
+     *   }
+     * });
+     * 
+ * + * `reload()` is just an alias for: + *
+     * $state.transitionTo($state.current, $stateParams, { 
+     *   reload: true, inherit: false, notify: true
+     * });
+     * 
+ * + * @returns {promise} A promise representing the state of the new transition. See + * {@link ui.router.state.$state#methods_go $state.go}. + */ + $state.reload = function reload() { + return $state.transitionTo($state.current, $stateParams, { reload: true, inherit: false, notify: true }); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#go + * @methodOf ui.router.state.$state + * + * @description + * Convenience method for transitioning to a new state. `$state.go` calls + * `$state.transitionTo` internally but automatically sets options to + * `{ location: true, inherit: true, relative: $state.$current, notify: true }`. + * This allows you to easily use an absolute or relative to path and specify + * only the parameters you'd like to update (while letting unspecified parameters + * inherit from the currently active ancestor states). + * + * @example + *
+     * var app = angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.changeState = function () {
+     *     $state.go('contact.detail');
+     *   };
+     * });
+     * 
+ * + * + * @param {string} to Absolute state name or relative state path. Some examples: + * + * - `$state.go('contact.detail')` - will go to the `contact.detail` state + * - `$state.go('^')` - will go to a parent state + * - `$state.go('^.sibling')` - will go to a sibling state + * - `$state.go('.child.grandchild')` - will go to grandchild state + * + * @param {object=} params A map of the parameters that will be sent to the state, + * will populate $stateParams. Any parameters that are not specified will be inherited from currently + * defined parameters. This allows, for example, going to a sibling state that shares parameters + * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. + * transitioning to a sibling will get you the parameters for all parents, transitioning to a child + * will get you all current parameters, etc. + * @param {object=} options Options object. The options are: + * + * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false` + * will not. If string, must be `"replace"`, which will update url and also replace last history record. + * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events. + * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params + * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd + * use this when you want to force a reload when *everything* is the same, including search params. + * + * @returns {promise} A promise representing the state of the new transition. + * + * Possible success values: + * + * - $state.current + * + *
Possible rejection values: + * + * - 'transition superseded' - when a newer transition has been started after this one + * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener + * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or + * when a `$stateNotFound` `event.retry` promise errors. + * - 'transition failed' - when a state has been unsuccessfully found after 2 tries. + * - *resolve error* - when an error has occurred with a `resolve` + * + */ + $state.go = function go(to, params, options) { + return $state.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options)); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#transitionTo + * @methodOf ui.router.state.$state + * + * @description + * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go} + * uses `transitionTo` internally. `$state.go` is recommended in most situations. + * + * @example + *
+     * var app = angular.module('app', ['ui.router']);
+     *
+     * app.controller('ctrl', function ($scope, $state) {
+     *   $scope.changeState = function () {
+     *     $state.transitionTo('contact.detail');
+     *   };
+     * });
+     * 
+ * + * @param {string} to State name. + * @param {object=} toParams A map of the parameters that will be sent to the state, + * will populate $stateParams. + * @param {object=} options Options object. The options are: + * + * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false` + * will not. If string, must be `"replace"`, which will update url and also replace last history record. + * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events. + * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params + * have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd + * use this when you want to force a reload when *everything* is the same, including search params. + * + * @returns {promise} A promise representing the state of the new transition. See + * {@link ui.router.state.$state#methods_go $state.go}. + */ + $state.transitionTo = function transitionTo(to, toParams, options) { + toParams = toParams || {}; + options = extend({ + location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false + }, options || {}); + + var from = $state.$current, fromParams = $state.params, fromPath = from.path; + var evt, toState = findState(to, options.relative); + + if (!isDefined(toState)) { + var redirect = { to: to, toParams: toParams, options: options }; + var redirectResult = handleRedirect(redirect, from.self, fromParams, options); + + if (redirectResult) { + return redirectResult; + } + + // Always retry once if the $stateNotFound was not prevented + // (handles either redirect changed or state lazy-definition) + to = redirect.to; + toParams = redirect.toParams; + options = redirect.options; + toState = findState(to, options.relative); + + if (!isDefined(toState)) { + if (!options.relative) throw new Error("No such state '" + to + "'"); + throw new Error("Could not resolve '" + to + "' from state '" + options.relative + "'"); + } + } + if (toState[abstractKey]) throw new Error("Cannot transition to abstract state '" + to + "'"); + if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState); + if (!toState.params.$$validates(toParams)) return TransitionFailed; + + toParams = toState.params.$$values(toParams); + to = toState; + + var toPath = to.path; + + // Starting from the root of the path, keep all levels that haven't changed + var keep = 0, state = toPath[keep], locals = root.locals, toLocals = []; + + if (!options.reload) { + while (state && state === fromPath[keep] && state.ownParams.$$equals(toParams, fromParams)) { + locals = toLocals[keep] = state.locals; + keep++; + state = toPath[keep]; + } + } + + // If we're going to the same state and all locals are kept, we've got nothing to do. + // But clear 'transition', as we still want to cancel any other pending transitions. + // TODO: We may not want to bump 'transition' if we're called from a location change + // that we've initiated ourselves, because we might accidentally abort a legitimate + // transition initiated from code? + if (shouldTriggerReload(to, from, locals, options)) { + if (to.self.reloadOnSearch !== false) $urlRouter.update(); + $state.transition = null; + return $q.when($state.current); + } + + // Filter parameters before we pass them to event handlers etc. + toParams = filterByKeys(to.params.$$keys(), toParams || {}); + + // Broadcast start event and cancel the transition if requested + if (options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeStart + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when the state transition **begins**. You can use `event.preventDefault()` + * to prevent the transition from happening and then the transition promise will be + * rejected with a `'transition prevented'` value. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + * + * @example + * + *
+         * $rootScope.$on('$stateChangeStart',
+         * function(event, toState, toParams, fromState, fromParams){
+         *     event.preventDefault();
+         *     // transitionTo() promise will be rejected with
+         *     // a 'transition prevented' error
+         * })
+         * 
+ */ + if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams).defaultPrevented) { + $urlRouter.update(); + return TransitionPrevented; + } + } + + // Resolve locals for the remaining states, but don't update any global state just + // yet -- if anything fails to resolve the current state needs to remain untouched. + // We also set up an inheritance chain for the locals here. This allows the view directive + // to quickly look up the correct definition for each view in the current state. Even + // though we create the locals object itself outside resolveState(), it is initially + // empty and gets filled asynchronously. We need to keep track of the promise for the + // (fully resolved) current locals, and pass this down the chain. + var resolved = $q.when(locals); + + for (var l = keep; l < toPath.length; l++, state = toPath[l]) { + locals = toLocals[l] = inherit(locals); + resolved = resolveState(state, toParams, state === to, resolved, locals, options); + } + + // Once everything is resolved, we are ready to perform the actual transition + // and return a promise for the new state. We also keep track of what the + // current promise is, so that we can detect overlapping transitions and + // keep only the outcome of the last transition. + var transition = $state.transition = resolved.then(function () { + var l, entering, exiting; + + if ($state.transition !== transition) return TransitionSuperseded; + + // Exit 'from' states not kept + for (l = fromPath.length - 1; l >= keep; l--) { + exiting = fromPath[l]; + if (exiting.self.onExit) { + $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals); + } + exiting.locals = null; + } + + // Enter 'to' states not kept + for (l = keep; l < toPath.length; l++) { + entering = toPath[l]; + entering.locals = toLocals[l]; + if (entering.self.onEnter) { + $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals); + } + } + + // Run it again, to catch any transitions in callbacks + if ($state.transition !== transition) return TransitionSuperseded; + + // Update globals in $state + $state.$current = to; + $state.current = to.self; + $state.params = toParams; + copy($state.params, $stateParams); + $state.transition = null; + + if (options.location && to.navigable) { + $urlRouter.push(to.navigable.url, to.navigable.locals.globals.$stateParams, { + $$avoidResync: true, replace: options.location === 'replace' + }); + } + + if (options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeSuccess + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired once the state transition is **complete**. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + */ + $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams); + } + $urlRouter.update(true); + + return $state.current; + }, function (error) { + if ($state.transition !== transition) return TransitionSuperseded; + + $state.transition = null; + /** + * @ngdoc event + * @name ui.router.state.$state#$stateChangeError + * @eventOf ui.router.state.$state + * @eventType broadcast on root scope + * @description + * Fired when an **error occurs** during transition. It's important to note that if you + * have any errors in your resolve functions (javascript errors, non-existent services, etc) + * they will not throw traditionally. You must listen for this $stateChangeError event to + * catch **ALL** errors. + * + * @param {Object} event Event object. + * @param {State} toState The state being transitioned to. + * @param {Object} toParams The params supplied to the `toState`. + * @param {State} fromState The current state, pre-transition. + * @param {Object} fromParams The params supplied to the `fromState`. + * @param {Error} error The resolve error object. + */ + evt = $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error); + + if (!evt.defaultPrevented) { + $urlRouter.update(); + } + + return $q.reject(error); + }); + + return transition; + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#is + * @methodOf ui.router.state.$state + * + * @description + * Similar to {@link ui.router.state.$state#methods_includes $state.includes}, + * but only checks for the full state name. If params is supplied then it will be + * tested for strict equality against the current active params object, so all params + * must match with none missing and no extras. + * + * @example + *
+     * $state.$current.name = 'contacts.details.item';
+     *
+     * // absolute name
+     * $state.is('contact.details.item'); // returns true
+     * $state.is(contactDetailItemStateObject); // returns true
+     *
+     * // relative name (. and ^), typically from a template
+     * // E.g. from the 'contacts.details' template
+     * 
Item
+ *
+ * + * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check. + * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like + * to test against the current active state. + * @param {object=} options An options object. The options are: + * + * - **`relative`** - {string|object} - If `stateOrName` is a relative state name and `options.relative` is set, .is will + * test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it is the state. + */ + $state.is = function is(stateOrName, params, options) { + options = extend({ relative: $state.$current }, options || {}); + var state = findState(stateOrName, options.relative); + + if (!isDefined(state)) { return undefined; } + if ($state.$current !== state) { return false; } + return params ? equalForKeys(state.params.$$values(params), $stateParams) : true; + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#includes + * @methodOf ui.router.state.$state + * + * @description + * A method to determine if the current active state is equal to or is the child of the + * state stateName. If any params are passed then they will be tested for a match as well. + * Not all the parameters need to be passed, just the ones you'd like to test for equality. + * + * @example + * Partial and relative names + *
+     * $state.$current.name = 'contacts.details.item';
+     *
+     * // Using partial names
+     * $state.includes("contacts"); // returns true
+     * $state.includes("contacts.details"); // returns true
+     * $state.includes("contacts.details.item"); // returns true
+     * $state.includes("contacts.list"); // returns false
+     * $state.includes("about"); // returns false
+     *
+     * // Using relative names (. and ^), typically from a template
+     * // E.g. from the 'contacts.details' template
+     * 
Item
+ *
+ * + * Basic globbing patterns + *
+     * $state.$current.name = 'contacts.details.item.url';
+     *
+     * $state.includes("*.details.*.*"); // returns true
+     * $state.includes("*.details.**"); // returns true
+     * $state.includes("**.item.**"); // returns true
+     * $state.includes("*.details.item.url"); // returns true
+     * $state.includes("*.details.*.url"); // returns true
+     * $state.includes("*.details.*"); // returns false
+     * $state.includes("item.**"); // returns false
+     * 
+ * + * @param {string} stateOrName A partial name, relative name, or glob pattern + * to be searched for within the current state name. + * @param {object=} params A param object, e.g. `{sectionId: section.id}`, + * that you'd like to test against the current active state. + * @param {object=} options An options object. The options are: + * + * - **`relative`** - {string|object=} - If `stateOrName` is a relative state reference and `options.relative` is set, + * .includes will test relative to `options.relative` state (or name). + * + * @returns {boolean} Returns true if it does include the state + */ + $state.includes = function includes(stateOrName, params, options) { + options = extend({ relative: $state.$current }, options || {}); + if (isString(stateOrName) && isGlob(stateOrName)) { + if (!doesStateMatchGlob(stateOrName)) { + return false; + } + stateOrName = $state.$current.name; + } + + var state = findState(stateOrName, options.relative); + if (!isDefined(state)) { return undefined; } + if (!isDefined($state.$current.includes[state.name])) { return false; } + return params ? equalForKeys(state.params.$$values(params), $stateParams, objectKeys(params)) : true; + }; + + + /** + * @ngdoc function + * @name ui.router.state.$state#href + * @methodOf ui.router.state.$state + * + * @description + * A url generation method that returns the compiled url for the given state populated with the given params. + * + * @example + *
+     * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob");
+     * 
+ * + * @param {string|object} stateOrName The state name or state object you'd like to generate a url from. + * @param {object=} params An object of parameter values to fill the state's required parameters. + * @param {object=} options Options object. The options are: + * + * - **`lossy`** - {boolean=true} - If true, and if there is no url associated with the state provided in the + * first parameter, then the constructed href url will be built from the first navigable ancestor (aka + * ancestor with a valid url). + * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url. + * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), + * defines which state to be relative from. + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns {string} compiled state url + */ + $state.href = function href(stateOrName, params, options) { + options = extend({ + lossy: true, + inherit: true, + absolute: false, + relative: $state.$current + }, options || {}); + + var state = findState(stateOrName, options.relative); + + if (!isDefined(state)) return null; + if (options.inherit) params = inheritParams($stateParams, params || {}, $state.$current, state); + + var nav = (state && options.lossy) ? state.navigable : state; + + if (!nav || nav.url === undefined || nav.url === null) { + return null; + } + return $urlRouter.href(nav.url, filterByKeys(state.params.$$keys(), params || {}), { + absolute: options.absolute + }); + }; + + /** + * @ngdoc function + * @name ui.router.state.$state#get + * @methodOf ui.router.state.$state + * + * @description + * Returns the state configuration object for any specific state or all states. + * + * @param {string|object=} stateOrName (absolute or relative) If provided, will only get the config for + * the requested state. If not provided, returns an array of ALL state configs. + * @param {string|object=} context When stateOrName is a relative state reference, the state will be retrieved relative to context. + * @returns {Object|Array} State configuration object or array of all objects. + */ + $state.get = function (stateOrName, context) { + if (arguments.length === 0) return map(objectKeys(states), function(name) { return states[name].self; }); + var state = findState(stateOrName, context || $state.$current); + return (state && state.self) ? state.self : null; + }; + + function resolveState(state, params, paramsAreFiltered, inherited, dst, options) { + // Make a restricted $stateParams with only the parameters that apply to this state if + // necessary. In addition to being available to the controller and onEnter/onExit callbacks, + // we also need $stateParams to be available for any $injector calls we make during the + // dependency resolution process. + var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params.$$keys(), params); + var locals = { $stateParams: $stateParams }; + + // Resolve 'global' dependencies for the state, i.e. those not specific to a view. + // We're also including $stateParams in this; that way the parameters are restricted + // to the set that should be visible to the state, and are independent of when we update + // the global $state and $stateParams values. + dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state); + var promises = [dst.resolve.then(function (globals) { + dst.globals = globals; + })]; + if (inherited) promises.push(inherited); + + // Resolve template and dependencies for all views. + forEach(state.views, function (view, name) { + var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {}); + injectables.$template = [ function () { + return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: options.notify }) || ''; + }]; + + promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) { + // References to the controller (only instantiated at link time) + if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) { + var injectLocals = angular.extend({}, injectables, locals); + result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals); + } else { + result.$$controller = view.controller; + } + // Provide access to the state itself for internal use + result.$$state = state; + result.$$controllerAs = view.controllerAs; + dst[name] = result; + })); + }); + + // Wait for all the promises and then return the activation object + return $q.all(promises).then(function (values) { + return dst; + }); + } + + return $state; + } + + function shouldTriggerReload(to, from, locals, options) { + if (to === from && ((locals === from.locals && !options.reload) || (to.self.reloadOnSearch === false))) { + return true; + } + } +} + +angular.module('ui.router.state') + .value('$stateParams', {}) + .provider('$state', $StateProvider); diff --git a/client/www/lib/angular-ui-router/src/stateDirectives.js b/client/www/lib/angular-ui-router/src/stateDirectives.js new file mode 100644 index 0000000..4d9d527 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/stateDirectives.js @@ -0,0 +1,268 @@ +function parseStateRef(ref, current) { + var preparsed = ref.match(/^\s*({[^}]*})\s*$/), parsed; + if (preparsed) ref = current + '(' + preparsed[1] + ')'; + parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/); + if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'"); + return { state: parsed[1], paramExpr: parsed[3] || null }; +} + +function stateContext(el) { + var stateData = el.parent().inheritedData('$uiView'); + + if (stateData && stateData.state && stateData.state.name) { + return stateData.state; + } +} + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref + * + * @requires ui.router.state.$state + * @requires $timeout + * + * @restrict A + * + * @description + * A directive that binds a link (`` tag) to a state. If the state has an associated + * URL, the directive will automatically generate & update the `href` attribute via + * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking + * the link will trigger a state transition with optional parameters. + * + * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be + * handled natively by the browser. + * + * You can also use relative state paths within ui-sref, just like the relative + * paths passed to `$state.go()`. You just need to be aware that the path is relative + * to the state that the link lives in, in other words the state that loaded the + * template containing the link. + * + * You can specify options to pass to {@link ui.router.state.$state#go $state.go()} + * using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`, + * and `reload`. + * + * @example + * Here's an example of how you'd use ui-sref and how it would compile. If you have the + * following template: + *
+ * Home | About | Next page
+ * 
+ * 
+ * 
+ * + * Then the compiled html would be (assuming Html5Mode is off and current state is contacts): + *
+ * Home | About | Next page
+ * 
+ * 
    + *
  • + * Joe + *
  • + *
  • + * Alice + *
  • + *
  • + * Bob + *
  • + *
+ * + * Home + *
+ * + * @param {string} ui-sref 'stateName' can be any valid absolute or relative state + * @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#go $state.go()} + */ +$StateRefDirective.$inject = ['$state', '$timeout']; +function $StateRefDirective($state, $timeout) { + var allowedOptions = ['location', 'inherit', 'reload']; + + return { + restrict: 'A', + require: ['?^uiSrefActive', '?^uiSrefActiveEq'], + link: function(scope, element, attrs, uiSrefActive) { + var ref = parseStateRef(attrs.uiSref, $state.current.name); + var params = null, url = null, base = stateContext(element) || $state.$current; + var newHref = null, isAnchor = element.prop("tagName") === "A"; + var isForm = element[0].nodeName === "FORM"; + var attr = isForm ? "action" : "href", nav = true; + + var options = { relative: base, inherit: true }; + var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {}; + + angular.forEach(allowedOptions, function(option) { + if (option in optionsOverride) { + options[option] = optionsOverride[option]; + } + }); + + var update = function(newVal) { + if (newVal) params = angular.copy(newVal); + if (!nav) return; + + newHref = $state.href(ref.state, params, options); + + var activeDirective = uiSrefActive[1] || uiSrefActive[0]; + if (activeDirective) { + activeDirective.$$setStateInfo(ref.state, params); + } + if (newHref === null) { + nav = false; + return false; + } + attrs.$set(attr, newHref); + }; + + if (ref.paramExpr) { + scope.$watch(ref.paramExpr, function(newVal, oldVal) { + if (newVal !== params) update(newVal); + }, true); + params = angular.copy(scope.$eval(ref.paramExpr)); + } + update(); + + if (isForm) return; + + element.bind("click", function(e) { + var button = e.which || e.button; + if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) { + // HACK: This is to allow ng-clicks to be processed before the transition is initiated: + var transition = $timeout(function() { + $state.go(ref.state, params, options); + }); + e.preventDefault(); + + // if the state has no URL, ignore one preventDefault from the directive. + var ignorePreventDefaultCount = isAnchor && !newHref ? 1: 0; + e.preventDefault = function() { + if (ignorePreventDefaultCount-- <= 0) + $timeout.cancel(transition); + }; + } + }); + } + }; +} + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref-active + * + * @requires ui.router.state.$state + * @requires ui.router.state.$stateParams + * @requires $interpolate + * + * @restrict A + * + * @description + * A directive working alongside ui-sref to add classes to an element when the + * related ui-sref directive's state is active, and removing them when it is inactive. + * The primary use-case is to simplify the special appearance of navigation menus + * relying on `ui-sref`, by having the "active" state's menu button appear different, + * distinguishing it from the inactive menu items. + * + * ui-sref-active can live on the same element as ui-sref or on a parent element. The first + * ui-sref-active found at the same level or above the ui-sref will be used. + * + * Will activate when the ui-sref's target state or any child state is active. If you + * need to activate only when the ui-sref target state is active and *not* any of + * it's children, then you will use + * {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq} + * + * @example + * Given the following template: + *
+ * 
+ * 
+ * + * + * When the app state is "app.user" (or any children states), and contains the state parameter "user" with value "bilbobaggins", + * the resulting HTML will appear as (note the 'active' class): + *
+ * 
+ * 
+ * + * The class name is interpolated **once** during the directives link time (any further changes to the + * interpolated value are ignored). + * + * Multiple classes may be specified in a space-separated format: + *
+ * 
    + *
  • + * link + *
  • + *
+ *
+ */ + +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-sref-active-eq + * + * @requires ui.router.state.$state + * @requires ui.router.state.$stateParams + * @requires $interpolate + * + * @restrict A + * + * @description + * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate + * when the exact target state used in the `ui-sref` is active; no child states. + * + */ +$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate']; +function $StateRefActiveDirective($state, $stateParams, $interpolate) { + return { + restrict: "A", + controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) { + var state, params, activeClass; + + // There probably isn't much point in $observing this + // uiSrefActive and uiSrefActiveEq share the same directive object with some + // slight difference in logic routing + activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope); + + // Allow uiSref to communicate with uiSrefActive[Equals] + this.$$setStateInfo = function (newState, newParams) { + state = $state.get(newState, stateContext($element)); + params = newParams; + update(); + }; + + $scope.$on('$stateChangeSuccess', update); + + // Update route state + function update() { + if (isMatch()) { + $element.addClass(activeClass); + } else { + $element.removeClass(activeClass); + } + } + + function isMatch() { + if (typeof $attrs.uiSrefActiveEq !== 'undefined') { + return state && $state.is(state.name, params); + } else { + return state && $state.includes(state.name, params); + } + } + }] + }; +} + +angular.module('ui.router.state') + .directive('uiSref', $StateRefDirective) + .directive('uiSrefActive', $StateRefActiveDirective) + .directive('uiSrefActiveEq', $StateRefActiveDirective); diff --git a/client/www/lib/angular-ui-router/src/stateFilters.js b/client/www/lib/angular-ui-router/src/stateFilters.js new file mode 100644 index 0000000..e0a1175 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/stateFilters.js @@ -0,0 +1,39 @@ +/** + * @ngdoc filter + * @name ui.router.state.filter:isState + * + * @requires ui.router.state.$state + * + * @description + * Translates to {@link ui.router.state.$state#methods_is $state.is("stateName")}. + */ +$IsStateFilter.$inject = ['$state']; +function $IsStateFilter($state) { + var isFilter = function (state) { + return $state.is(state); + }; + isFilter.$stateful = true; + return isFilter; +} + +/** + * @ngdoc filter + * @name ui.router.state.filter:includedByState + * + * @requires ui.router.state.$state + * + * @description + * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}. + */ +$IncludedByStateFilter.$inject = ['$state']; +function $IncludedByStateFilter($state) { + var includesFilter = function (state) { + return $state.includes(state); + }; + includesFilter.$stateful = true; + return includesFilter; +} + +angular.module('ui.router.state') + .filter('isState', $IsStateFilter) + .filter('includedByState', $IncludedByStateFilter); diff --git a/client/www/lib/angular-ui-router/src/templateFactory.js b/client/www/lib/angular-ui-router/src/templateFactory.js new file mode 100644 index 0000000..ca491a9 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/templateFactory.js @@ -0,0 +1,110 @@ +/** + * @ngdoc object + * @name ui.router.util.$templateFactory + * + * @requires $http + * @requires $templateCache + * @requires $injector + * + * @description + * Service. Manages loading of templates. + */ +$TemplateFactory.$inject = ['$http', '$templateCache', '$injector']; +function $TemplateFactory( $http, $templateCache, $injector) { + + /** + * @ngdoc function + * @name ui.router.util.$templateFactory#fromConfig + * @methodOf ui.router.util.$templateFactory + * + * @description + * Creates a template from a configuration object. + * + * @param {object} config Configuration object for which to load a template. + * The following properties are search in the specified order, and the first one + * that is defined is used to create the template: + * + * @param {string|object} config.template html string template or function to + * load via {@link ui.router.util.$templateFactory#fromString fromString}. + * @param {string|object} config.templateUrl url to load or a function returning + * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}. + * @param {Function} config.templateProvider function to invoke via + * {@link ui.router.util.$templateFactory#fromProvider fromProvider}. + * @param {object} params Parameters to pass to the template function. + * @param {object} locals Locals to pass to `invoke` if the template is loaded + * via a `templateProvider`. Defaults to `{ params: params }`. + * + * @return {string|object} The template html as a string, or a promise for + * that string,or `null` if no template is configured. + */ + this.fromConfig = function (config, params, locals) { + return ( + isDefined(config.template) ? this.fromString(config.template, params) : + isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) : + isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) : + null + ); + }; + + /** + * @ngdoc function + * @name ui.router.util.$templateFactory#fromString + * @methodOf ui.router.util.$templateFactory + * + * @description + * Creates a template from a string or a function returning a string. + * + * @param {string|object} template html template as a string or function that + * returns an html template as a string. + * @param {object} params Parameters to pass to the template function. + * + * @return {string|object} The template html as a string, or a promise for that + * string. + */ + this.fromString = function (template, params) { + return isFunction(template) ? template(params) : template; + }; + + /** + * @ngdoc function + * @name ui.router.util.$templateFactory#fromUrl + * @methodOf ui.router.util.$templateFactory + * + * @description + * Loads a template from the a URL via `$http` and `$templateCache`. + * + * @param {string|Function} url url of the template to load, or a function + * that returns a url. + * @param {Object} params Parameters to pass to the url function. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + this.fromUrl = function (url, params) { + if (isFunction(url)) url = url(params); + if (url == null) return null; + else return $http + .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }}) + .then(function(response) { return response.data; }); + }; + + /** + * @ngdoc function + * @name ui.router.util.$templateFactory#fromProvider + * @methodOf ui.router.util.$templateFactory + * + * @description + * Creates a template by invoking an injectable provider function. + * + * @param {Function} provider Function to invoke via `$injector.invoke` + * @param {Object} params Parameters for the template. + * @param {Object} locals Locals to pass to `invoke`. Defaults to + * `{ params: params }`. + * @return {string|Promise.} The template html as a string, or a promise + * for that string. + */ + this.fromProvider = function (provider, params, locals) { + return $injector.invoke(provider, null, locals || { params: params }); + }; +} + +angular.module('ui.router.util').service('$templateFactory', $TemplateFactory); diff --git a/client/www/lib/angular-ui-router/src/urlMatcherFactory.js b/client/www/lib/angular-ui-router/src/urlMatcherFactory.js new file mode 100644 index 0000000..a16e728 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/urlMatcherFactory.js @@ -0,0 +1,1036 @@ +var $$UMFP; // reference to $UrlMatcherFactoryProvider + +/** + * @ngdoc object + * @name ui.router.util.type:UrlMatcher + * + * @description + * Matches URLs against patterns and extracts named parameters from the path or the search + * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list + * of search parameters. Multiple search parameter names are separated by '&'. Search parameters + * do not influence whether or not a URL is matched, but their values are passed through into + * the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}. + * + * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace + * syntax, which optionally allows a regular expression for the parameter to be specified: + * + * * `':'` name - colon placeholder + * * `'*'` name - catch-all placeholder + * * `'{' name '}'` - curly placeholder + * * `'{' name ':' regexp|type '}'` - curly placeholder with regexp or type name. Should the + * regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. + * + * Parameter names may contain only word characters (latin letters, digits, and underscore) and + * must be unique within the pattern (across both path and search parameters). For colon + * placeholders or curly placeholders without an explicit regexp, a path parameter matches any + * number of characters other than '/'. For catch-all placeholders the path parameter matches + * any number of characters. + * + * Examples: + * + * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for + * trailing slashes, and patterns have to match the entire path, not just a prefix. + * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or + * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. + * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. + * * `'/user/{id:[^/]*}'` - Same as the previous example. + * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id + * parameter consists of 1 to 8 hex digits. + * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the + * path into the parameter 'path'. + * * `'/files/*path'` - ditto. + * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined + * in the built-in `date` Type matches `2014-11-12`) and provides a Date object in $stateParams.start + * + * @param {string} pattern The pattern to compile into a matcher. + * @param {Object} config A configuration object hash: + * @param {Object=} parentMatcher Used to concatenate the pattern/config onto + * an existing UrlMatcher + * + * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`. + * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`. + * + * @property {string} prefix A static prefix of this pattern. The matcher guarantees that any + * URL matching this matcher (i.e. any string for which {@link ui.router.util.type:UrlMatcher#methods_exec exec()} returns + * non-null) will start with this prefix. + * + * @property {string} source The pattern that was passed into the constructor + * + * @property {string} sourcePath The path portion of the source property + * + * @property {string} sourceSearch The search portion of the source property + * + * @property {string} regex The constructed regex that will be used to match against the url when + * it is time to determine which url will match. + * + * @returns {Object} New `UrlMatcher` object + */ +function UrlMatcher(pattern, config, parentMatcher) { + config = extend({ params: {} }, isObject(config) ? config : {}); + + // Find all placeholders and create a compiled pattern, using either classic or curly syntax: + // '*' name + // ':' name + // '{' name '}' + // '{' name ':' regexp '}' + // The regular expression is somewhat complicated due to the need to allow curly braces + // inside the regular expression. The placeholder regexp breaks down as follows: + // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) + // \{([\w\[\]]+)(?:\:( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case + // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either + // [^{}\\]+ - anything other than curly braces or backslash + // \\. - a backslash escape + // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms + var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + searchPlaceholder = /([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, + compiled = '^', last = 0, m, + segments = this.segments = [], + parentParams = parentMatcher ? parentMatcher.params : {}, + params = this.params = parentMatcher ? parentMatcher.params.$$new() : new $$UMFP.ParamSet(), + paramNames = []; + + function addParameter(id, type, config, location) { + paramNames.push(id); + if (parentParams[id]) return parentParams[id]; + if (!/^\w+(-+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); + if (params[id]) throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); + params[id] = new $$UMFP.Param(id, type, config, location); + return params[id]; + } + + function quoteRegExp(string, pattern, squash) { + var surroundPattern = ['',''], result = string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); + if (!pattern) return result; + switch(squash) { + case false: surroundPattern = ['(', ')']; break; + case true: surroundPattern = ['?(', ')?']; break; + default: surroundPattern = ['(' + squash + "|", ')?']; break; + } + return result + surroundPattern[0] + pattern + surroundPattern[1]; + } + + this.source = pattern; + + // Split into static segments separated by path parameter placeholders. + // The number of segments is always 1 more than the number of parameters. + function matchDetails(m, isSearch) { + var id, regexp, segment, type, cfg, arrayMode; + id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null + cfg = config.params[id]; + segment = pattern.substring(last, m.index); + regexp = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null); + type = $$UMFP.type(regexp || "string") || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp) }); + return { + id: id, regexp: regexp, segment: segment, type: type, cfg: cfg + }; + } + + var p, param, segment; + while ((m = placeholder.exec(pattern))) { + p = matchDetails(m, false); + if (p.segment.indexOf('?') >= 0) break; // we're into the search part + + param = addParameter(p.id, p.type, p.cfg, "path"); + compiled += quoteRegExp(p.segment, param.type.pattern.source, param.squash); + segments.push(p.segment); + last = placeholder.lastIndex; + } + segment = pattern.substring(last); + + // Find any search parameter names and remove them from the last segment + var i = segment.indexOf('?'); + + if (i >= 0) { + var search = this.sourceSearch = segment.substring(i); + segment = segment.substring(0, i); + this.sourcePath = pattern.substring(0, last + i); + + if (search.length > 0) { + last = 0; + while ((m = searchPlaceholder.exec(search))) { + p = matchDetails(m, true); + param = addParameter(p.id, p.type, p.cfg, "search"); + last = placeholder.lastIndex; + // check if ?& + } + } + } else { + this.sourcePath = pattern; + this.sourceSearch = ''; + } + + compiled += quoteRegExp(segment) + (config.strict === false ? '\/?' : '') + '$'; + segments.push(segment); + + this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined); + this.prefix = segments[0]; + this.$$paramNames = paramNames; +} + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#concat + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Returns a new matcher for a pattern constructed by appending the path part and adding the + * search parameters of the specified pattern to this pattern. The current pattern is not + * modified. This can be understood as creating a pattern for URLs that are relative to (or + * suffixes of) the current pattern. + * + * @example + * The following two matchers are equivalent: + *
+ * new UrlMatcher('/user/{id}?q').concat('/details?date');
+ * new UrlMatcher('/user/{id}/details?q&date');
+ * 
+ * + * @param {string} pattern The pattern to append. + * @param {Object} config An object hash of the configuration for the matcher. + * @returns {UrlMatcher} A matcher for the concatenated pattern. + */ +UrlMatcher.prototype.concat = function (pattern, config) { + // Because order of search parameters is irrelevant, we can add our own search + // parameters to the end of the new pattern. Parse the new pattern by itself + // and then join the bits together, but it's much easier to do this on a string level. + var defaultConfig = { + caseInsensitive: $$UMFP.caseInsensitive(), + strict: $$UMFP.strictMode(), + squash: $$UMFP.defaultSquashPolicy() + }; + return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch, extend(defaultConfig, config), this); +}; + +UrlMatcher.prototype.toString = function () { + return this.source; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#exec + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Tests the specified path against this matcher, and returns an object containing the captured + * parameter values, or null if the path does not match. The returned object contains the values + * of any search parameters that are mentioned in the pattern, but their value may be null if + * they are not present in `searchParams`. This means that search parameters are always treated + * as optional. + * + * @example + *
+ * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {
+ *   x: '1', q: 'hello'
+ * });
+ * // returns { id: 'bob', q: 'hello', r: null }
+ * 
+ * + * @param {string} path The URL path to match, e.g. `$location.path()`. + * @param {Object} searchParams URL search parameters, e.g. `$location.search()`. + * @returns {Object} The captured parameter values. + */ +UrlMatcher.prototype.exec = function (path, searchParams) { + var m = this.regexp.exec(path); + if (!m) return null; + searchParams = searchParams || {}; + + var paramNames = this.parameters(), nTotal = paramNames.length, + nPath = this.segments.length - 1, + values = {}, i, j, cfg, paramName; + + if (nPath !== m.length - 1) throw new Error("Unbalanced capture group in route '" + this.source + "'"); + + function decodePathArray(string) { + function reverseString(str) { return str.split("").reverse().join(""); } + function unquoteDashes(str) { return str.replace(/\\-/, "-"); } + + var split = reverseString(string).split(/-(?!\\)/); + var allReversed = map(split, reverseString); + return map(allReversed, unquoteDashes).reverse(); + } + + for (i = 0; i < nPath; i++) { + paramName = paramNames[i]; + var param = this.params[paramName]; + var paramVal = m[i+1]; + // if the param value matches a pre-replace pair, replace the value before decoding. + for (j = 0; j < param.replace; j++) { + if (param.replace[j].from === paramVal) paramVal = param.replace[j].to; + } + if (paramVal && param.array === true) paramVal = decodePathArray(paramVal); + values[paramName] = param.value(paramVal); + } + for (/**/; i < nTotal; i++) { + paramName = paramNames[i]; + values[paramName] = this.params[paramName].value(searchParams[paramName]); + } + + return values; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#parameters + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Returns the names of all path and search parameters of this pattern in an unspecified order. + * + * @returns {Array.} An array of parameter names. Must be treated as read-only. If the + * pattern has no parameters, an empty array is returned. + */ +UrlMatcher.prototype.parameters = function (param) { + if (!isDefined(param)) return this.$$paramNames; + return this.params[param] || null; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#validate + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Checks an object hash of parameters to validate their correctness according to the parameter + * types of this `UrlMatcher`. + * + * @param {Object} params The object hash of parameters to validate. + * @returns {boolean} Returns `true` if `params` validates, otherwise `false`. + */ +UrlMatcher.prototype.validates = function (params) { + return this.params.$$validates(params); +}; + +/** + * @ngdoc function + * @name ui.router.util.type:UrlMatcher#format + * @methodOf ui.router.util.type:UrlMatcher + * + * @description + * Creates a URL that matches this pattern by substituting the specified values + * for the path and search parameters. Null values for path parameters are + * treated as empty strings. + * + * @example + *
+ * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });
+ * // returns '/user/bob?q=yes'
+ * 
+ * + * @param {Object} values the values to substitute for the parameters in this pattern. + * @returns {string} the formatted URL (path and optionally search part). + */ +UrlMatcher.prototype.format = function (values) { + values = values || {}; + var segments = this.segments, params = this.parameters(), paramset = this.params; + if (!this.validates(values)) return null; + + var i, search = false, nPath = segments.length - 1, nTotal = params.length, result = segments[0]; + + function encodeDashes(str) { // Replace dashes with encoded "\-" + return encodeURIComponent(str).replace(/-/g, function(c) { return '%5C%' + c.charCodeAt(0).toString(16).toUpperCase(); }); + } + + for (i = 0; i < nTotal; i++) { + var isPathParam = i < nPath; + var name = params[i], param = paramset[name], value = param.value(values[name]); + var isDefaultValue = param.isOptional && param.type.equals(param.value(), value); + var squash = isDefaultValue ? param.squash : false; + var encoded = param.type.encode(value); + + if (isPathParam) { + var nextSegment = segments[i + 1]; + if (squash === false) { + if (encoded != null) { + if (isArray(encoded)) { + result += map(encoded, encodeDashes).join("-"); + } else { + result += encodeURIComponent(encoded); + } + } + result += nextSegment; + } else if (squash === true) { + var capture = result.match(/\/$/) ? /\/?(.*)/ : /(.*)/; + result += nextSegment.match(capture)[1]; + } else if (isString(squash)) { + result += squash + nextSegment; + } + } else { + if (encoded == null || (isDefaultValue && squash !== false)) continue; + if (!isArray(encoded)) encoded = [ encoded ]; + encoded = map(encoded, encodeURIComponent).join('&' + name + '='); + result += (search ? '&' : '?') + (name + '=' + encoded); + search = true; + } + } + + return result; +}; + +/** + * @ngdoc object + * @name ui.router.util.type:Type + * + * @description + * Implements an interface to define custom parameter types that can be decoded from and encoded to + * string parameters matched in a URL. Used by {@link ui.router.util.type:UrlMatcher `UrlMatcher`} + * objects when matching or formatting URLs, or comparing or validating parameter values. + * + * See {@link ui.router.util.$urlMatcherFactory#methods_type `$urlMatcherFactory#type()`} for more + * information on registering custom types. + * + * @param {Object} config A configuration object which contains the custom type definition. The object's + * properties will override the default methods and/or pattern in `Type`'s public interface. + * @example + *
+ * {
+ *   decode: function(val) { return parseInt(val, 10); },
+ *   encode: function(val) { return val && val.toString(); },
+ *   equals: function(a, b) { return this.is(a) && a === b; },
+ *   is: function(val) { return angular.isNumber(val) isFinite(val) && val % 1 === 0; },
+ *   pattern: /\d+/
+ * }
+ * 
+ * + * @property {RegExp} pattern The regular expression pattern used to match values of this type when + * coming from a substring of a URL. + * + * @returns {Object} Returns a new `Type` object. + */ +function Type(config) { + extend(this, config); +} + +/** + * @ngdoc function + * @name ui.router.util.type:Type#is + * @methodOf ui.router.util.type:Type + * + * @description + * Detects whether a value is of a particular type. Accepts a native (decoded) value + * and determines whether it matches the current `Type` object. + * + * @param {*} val The value to check. + * @param {string} key Optional. If the type check is happening in the context of a specific + * {@link ui.router.util.type:UrlMatcher `UrlMatcher`} object, this is the name of the + * parameter in which `val` is stored. Can be used for meta-programming of `Type` objects. + * @returns {Boolean} Returns `true` if the value matches the type, otherwise `false`. + */ +Type.prototype.is = function(val, key) { + return true; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#encode + * @methodOf ui.router.util.type:Type + * + * @description + * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the + * return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`), it + * only needs to be a representation of `val` that has been coerced to a string. + * + * @param {*} val The value to encode. + * @param {string} key The name of the parameter in which `val` is stored. Can be used for + * meta-programming of `Type` objects. + * @returns {string} Returns a string representation of `val` that can be encoded in a URL. + */ +Type.prototype.encode = function(val, key) { + return val; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#decode + * @methodOf ui.router.util.type:Type + * + * @description + * Converts a parameter value (from URL string or transition param) to a custom/native value. + * + * @param {string} val The URL parameter value to decode. + * @param {string} key The name of the parameter in which `val` is stored. Can be used for + * meta-programming of `Type` objects. + * @returns {*} Returns a custom representation of the URL parameter value. + */ +Type.prototype.decode = function(val, key) { + return val; +}; + +/** + * @ngdoc function + * @name ui.router.util.type:Type#equals + * @methodOf ui.router.util.type:Type + * + * @description + * Determines whether two decoded values are equivalent. + * + * @param {*} a A value to compare against. + * @param {*} b A value to compare against. + * @returns {Boolean} Returns `true` if the values are equivalent/equal, otherwise `false`. + */ +Type.prototype.equals = function(a, b) { + return a == b; +}; + +Type.prototype.$subPattern = function() { + var sub = this.pattern.toString(); + return sub.substr(1, sub.length - 2); +}; + +Type.prototype.pattern = /.*/; + +Type.prototype.toString = function() { return "{Type:" + this.name + "}"; }; + +/* + * Wraps an existing custom Type as an array of Type, depending on 'mode'. + * e.g.: + * - urlmatcher pattern "/path?{queryParam[]:int}" + * - url: "/path?queryParam=1&queryParam=2 + * - $stateParams.queryParam will be [1, 2] + * if `mode` is "auto", then + * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 + * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] + */ +Type.prototype.$asArray = function(mode, isSearch) { + if (!mode) return this; + if (mode === "auto" && !isSearch) throw new Error("'auto' array mode is for query parameters only"); + return new ArrayType(this, mode); + + function ArrayType(type, mode) { + function bindTo(type, callbackName) { + return function() { + return type[callbackName].apply(type, arguments); + }; + } + + // Wrap non-array value as array + function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); } + // Unwrap array value for "auto" mode. Return undefined for empty array. + function arrayUnwrap(val) { + switch(val.length) { + case 0: return undefined; + case 1: return mode === "auto" ? val[0] : val; + default: return val; + } + } + function falsey(val) { return !val; } + + // Wraps type (.is/.encode/.decode) functions to operate on each value of an array + function arrayHandler(callback, allTruthyMode) { + return function handleArray(val) { + val = arrayWrap(val); + var result = map(val, callback); + if (allTruthyMode === true) + return filter(result, falsey).length === 0; + return arrayUnwrap(result); + }; + } + + // Wraps type (.equals) functions to operate on each value of an array + function arrayEqualsHandler(callback) { + return function handleArray(val1, val2) { + var left = arrayWrap(val1), right = arrayWrap(val2); + if (left.length !== right.length) return false; + for (var i = 0; i < left.length; i++) { + if (!callback(left[i], right[i])) return false; + } + return true; + }; + } + + this.encode = arrayHandler(bindTo(type, 'encode')); + this.decode = arrayHandler(bindTo(type, 'decode')); + this.is = arrayHandler(bindTo(type, 'is'), true); + this.equals = arrayEqualsHandler(bindTo(type, 'equals')); + this.pattern = type.pattern; + this.$arrayMode = mode; + } +}; + + + +/** + * @ngdoc object + * @name ui.router.util.$urlMatcherFactory + * + * @description + * Factory for {@link ui.router.util.type:UrlMatcher `UrlMatcher`} instances. The factory + * is also available to providers under the name `$urlMatcherFactoryProvider`. + */ +function $UrlMatcherFactory() { + $$UMFP = this; + + var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false; + + function valToString(val) { return val != null ? val.toString().replace(/\//g, "%2F") : val; } + function valFromString(val) { return val != null ? val.toString().replace(/%2F/g, "/") : val; } +// TODO: in 1.0, make string .is() return false if value is undefined by default. +// function regexpMatches(val) { /*jshint validthis:true */ return isDefined(val) && this.pattern.test(val); } + function regexpMatches(val) { /*jshint validthis:true */ return this.pattern.test(val); } + + var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = { + string: { + encode: valToString, + decode: valFromString, + is: regexpMatches, + pattern: /[^/]*/ + }, + int: { + encode: valToString, + decode: function(val) { return parseInt(val, 10); }, + is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; }, + pattern: /\d+/ + }, + bool: { + encode: function(val) { return val ? 1 : 0; }, + decode: function(val) { return parseInt(val, 10) !== 0; }, + is: function(val) { return val === true || val === false; }, + pattern: /0|1/ + }, + date: { + encode: function (val) { + if (!this.is(val)) + return undefined; + return [ val.getFullYear(), + ('0' + (val.getMonth() + 1)).slice(-2), + ('0' + val.getDate()).slice(-2) + ].join("-"); + }, + decode: function (val) { + if (this.is(val)) return val; + var match = this.capture.exec(val); + return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; + }, + is: function(val) { return val instanceof Date && !isNaN(val.valueOf()); }, + equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString(); }, + pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, + capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ + }, + json: { + encode: angular.toJson, + decode: angular.fromJson, + is: angular.isObject, + equals: angular.equals, + pattern: /[^/]*/ + }, + any: { // does not encode/decode + encode: angular.identity, + decode: angular.identity, + is: angular.identity, + equals: angular.equals, + pattern: /.*/ + } + }; + + function getDefaultConfig() { + return { + strict: isStrictMode, + caseInsensitive: isCaseInsensitive + }; + } + + function isInjectable(value) { + return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1]))); + } + + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + $UrlMatcherFactory.$$getDefaultValue = function(config) { + if (!isInjectable(config.value)) return config.value; + if (!injector) throw new Error("Injectable functions cannot be called at configuration time"); + return injector.invoke(config.value); + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#caseInsensitive + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Defines whether URL matching should be case sensitive (the default behavior), or not. + * + * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`; + * @returns {boolean} the current value of caseInsensitive + */ + this.caseInsensitive = function(value) { + if (isDefined(value)) + isCaseInsensitive = value; + return isCaseInsensitive; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#strictMode + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Defines whether URLs should match trailing slashes, or not (the default behavior). + * + * @param {boolean=} value `false` to match trailing slashes in URLs, otherwise `true`. + * @returns {boolean} the current value of strictMode + */ + this.strictMode = function(value) { + if (isDefined(value)) + isStrictMode = value; + return isStrictMode; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#defaultSquashPolicy + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Sets the default behavior when generating or matching URLs with default parameter values. + * + * @param {string} value A string that defines the default parameter URL squashing behavior. + * `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL + * `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the + * parameter is surrounded by slashes, squash (remove) one slash from the URL + * any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) + * the parameter value from the URL and replace it with this string. + */ + this.defaultSquashPolicy = function(value) { + if (!isDefined(value)) return defaultSquashPolicy; + if (value !== true && value !== false && !isString(value)) + throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); + defaultSquashPolicy = value; + return value; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#compile + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Creates a {@link ui.router.util.type:UrlMatcher `UrlMatcher`} for the specified pattern. + * + * @param {string} pattern The URL pattern. + * @param {Object} config The config object hash. + * @returns {UrlMatcher} The UrlMatcher. + */ + this.compile = function (pattern, config) { + return new UrlMatcher(pattern, extend(getDefaultConfig(), config)); + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#isMatcher + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Returns true if the specified object is a `UrlMatcher`, or false otherwise. + * + * @param {Object} object The object to perform the type check against. + * @returns {Boolean} Returns `true` if the object matches the `UrlMatcher` interface, by + * implementing all the same methods. + */ + this.isMatcher = function (o) { + if (!isObject(o)) return false; + var result = true; + + forEach(UrlMatcher.prototype, function(val, name) { + if (isFunction(val)) { + result = result && (isDefined(o[name]) && isFunction(o[name])); + } + }); + return result; + }; + + /** + * @ngdoc function + * @name ui.router.util.$urlMatcherFactory#type + * @methodOf ui.router.util.$urlMatcherFactory + * + * @description + * Registers a custom {@link ui.router.util.type:Type `Type`} object that can be used to + * generate URLs with typed parameters. + * + * @param {string} name The type name. + * @param {Object|Function} definition The type definition. See + * {@link ui.router.util.type:Type `Type`} for information on the values accepted. + * @param {Object|Function} definitionFn (optional) A function that is injected before the app + * runtime starts. The result of this function is merged into the existing `definition`. + * See {@link ui.router.util.type:Type `Type`} for information on the values accepted. + * + * @returns {Object} Returns `$urlMatcherFactoryProvider`. + * + * @example + * This is a simple example of a custom type that encodes and decodes items from an + * array, using the array index as the URL-encoded value: + * + *
+   * var list = ['John', 'Paul', 'George', 'Ringo'];
+   *
+   * $urlMatcherFactoryProvider.type('listItem', {
+   *   encode: function(item) {
+   *     // Represent the list item in the URL using its corresponding index
+   *     return list.indexOf(item);
+   *   },
+   *   decode: function(item) {
+   *     // Look up the list item by index
+   *     return list[parseInt(item, 10)];
+   *   },
+   *   is: function(item) {
+   *     // Ensure the item is valid by checking to see that it appears
+   *     // in the list
+   *     return list.indexOf(item) > -1;
+   *   }
+   * });
+   *
+   * $stateProvider.state('list', {
+   *   url: "/list/{item:listItem}",
+   *   controller: function($scope, $stateParams) {
+   *     console.log($stateParams.item);
+   *   }
+   * });
+   *
+   * // ...
+   *
+   * // Changes URL to '/list/3', logs "Ringo" to the console
+   * $state.go('list', { item: "Ringo" });
+   * 
+ * + * This is a more complex example of a type that relies on dependency injection to + * interact with services, and uses the parameter name from the URL to infer how to + * handle encoding and decoding parameter values: + * + *
+   * // Defines a custom type that gets a value from a service,
+   * // where each service gets different types of values from
+   * // a backend API:
+   * $urlMatcherFactoryProvider.type('dbObject', {}, function(Users, Posts) {
+   *
+   *   // Matches up services to URL parameter names
+   *   var services = {
+   *     user: Users,
+   *     post: Posts
+   *   };
+   *
+   *   return {
+   *     encode: function(object) {
+   *       // Represent the object in the URL using its unique ID
+   *       return object.id;
+   *     },
+   *     decode: function(value, key) {
+   *       // Look up the object by ID, using the parameter
+   *       // name (key) to call the correct service
+   *       return services[key].findById(value);
+   *     },
+   *     is: function(object, key) {
+   *       // Check that object is a valid dbObject
+   *       return angular.isObject(object) && object.id && services[key];
+   *     }
+   *     equals: function(a, b) {
+   *       // Check the equality of decoded objects by comparing
+   *       // their unique IDs
+   *       return a.id === b.id;
+   *     }
+   *   };
+   * });
+   *
+   * // In a config() block, you can then attach URLs with
+   * // type-annotated parameters:
+   * $stateProvider.state('users', {
+   *   url: "/users",
+   *   // ...
+   * }).state('users.item', {
+   *   url: "/{user:dbObject}",
+   *   controller: function($scope, $stateParams) {
+   *     // $stateParams.user will now be an object returned from
+   *     // the Users service
+   *   },
+   *   // ...
+   * });
+   * 
+ */ + this.type = function (name, definition, definitionFn) { + if (!isDefined(definition)) return $types[name]; + if ($types.hasOwnProperty(name)) throw new Error("A type named '" + name + "' has already been defined."); + + $types[name] = new Type(extend({ name: name }, definition)); + if (definitionFn) { + typeQueue.push({ name: name, def: definitionFn }); + if (!enqueue) flushTypeQueue(); + } + return this; + }; + + // `flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s + function flushTypeQueue() { + while(typeQueue.length) { + var type = typeQueue.shift(); + if (type.pattern) throw new Error("You cannot override a type's .pattern at runtime."); + angular.extend($types[type.name], injector.invoke(type.def)); + } + } + + // Register default types. Store them in the prototype of $types. + forEach(defaultTypes, function(type, name) { $types[name] = new Type(extend({name: name}, type)); }); + $types = inherit($types, {}); + + /* No need to document $get, since it returns this */ + this.$get = ['$injector', function ($injector) { + injector = $injector; + enqueue = false; + flushTypeQueue(); + + forEach(defaultTypes, function(type, name) { + if (!$types[name]) $types[name] = new Type(type); + }); + return this; + }]; + + this.Param = function Param(id, type, config, location) { + var self = this; + config = unwrapShorthand(config); + type = getType(config, type, location); + var arrayMode = getArrayMode(); + type = arrayMode ? type.$asArray(arrayMode, location === "search") : type; + if (type.name === "string" && !arrayMode && location === "path" && config.value === undefined) + config.value = ""; // for 0.2.x; in 0.3.0+ do not automatically default to "" + var isOptional = config.value !== undefined; + var squash = getSquashPolicy(config, isOptional); + var replace = getReplace(config, arrayMode, isOptional, squash); + + function unwrapShorthand(config) { + var keys = isObject(config) ? objectKeys(config) : []; + var isShorthand = indexOf(keys, "value") === -1 && indexOf(keys, "type") === -1 && + indexOf(keys, "squash") === -1 && indexOf(keys, "array") === -1; + if (isShorthand) config = { value: config }; + config.$$fn = isInjectable(config.value) ? config.value : function () { return config.value; }; + return config; + } + + function getType(config, urlType, location) { + if (config.type && urlType) throw new Error("Param '"+id+"' has two type configurations."); + if (urlType) return urlType; + if (!config.type) return (location === "config" ? $types.any : $types.string); + return config.type instanceof Type ? config.type : new Type(config.type); + } + + // array config: param name (param[]) overrides default settings. explicit config overrides param name. + function getArrayMode() { + var arrayDefaults = { array: (location === "search" ? "auto" : false) }; + var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; + return extend(arrayDefaults, arrayParamNomenclature, config).array; + } + + /** + * returns false, true, or the squash value to indicate the "default parameter url squash policy". + */ + function getSquashPolicy(config, isOptional) { + var squash = config.squash; + if (!isOptional || squash === false) return false; + if (!isDefined(squash) || squash == null) return defaultSquashPolicy; + if (squash === true || isString(squash)) return squash; + throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); + } + + function getReplace(config, arrayMode, isOptional, squash) { + var replace, configuredKeys, defaultPolicy = [ + { from: "", to: (isOptional || arrayMode ? undefined : "") }, + { from: null, to: (isOptional || arrayMode ? undefined : "") } + ]; + replace = isArray(config.replace) ? config.replace : []; + if (isString(squash)) + replace.push({ from: squash, to: undefined }); + configuredKeys = map(replace, function(item) { return item.from; } ); + return filter(defaultPolicy, function(item) { return indexOf(configuredKeys, item.from) === -1; }).concat(replace); + } + + /** + * [Internal] Get the default value of a parameter, which may be an injectable function. + */ + function $$getDefaultValue() { + if (!injector) throw new Error("Injectable functions cannot be called at configuration time"); + return injector.invoke(config.$$fn); + } + + /** + * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the + * default value, which may be the result of an injectable function. + */ + function $value(value) { + function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; } + function $replace(value) { + var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; }); + return replacement.length ? replacement[0] : value; + } + value = $replace(value); + return isDefined(value) ? self.type.decode(value) : $$getDefaultValue(); + } + + function toString() { return "{Param:" + id + " " + type + " squash: '" + squash + "' optional: " + isOptional + "}"; } + + extend(this, { + id: id, + type: type, + location: location, + array: arrayMode, + squash: squash, + replace: replace, + isOptional: isOptional, + value: $value, + dynamic: undefined, + config: config, + toString: toString + }); + }; + + function ParamSet(params) { + extend(this, params || {}); + } + + ParamSet.prototype = { + $$new: function() { + return inherit(this, extend(new ParamSet(), { $$parent: this})); + }, + $$keys: function () { + var keys = [], chain = [], parent = this, + ignore = objectKeys(ParamSet.prototype); + while (parent) { chain.push(parent); parent = parent.$$parent; } + chain.reverse(); + forEach(chain, function(paramset) { + forEach(objectKeys(paramset), function(key) { + if (indexOf(keys, key) === -1 && indexOf(ignore, key) === -1) keys.push(key); + }); + }); + return keys; + }, + $$values: function(paramValues) { + var values = {}, self = this; + forEach(self.$$keys(), function(key) { + values[key] = self[key].value(paramValues && paramValues[key]); + }); + return values; + }, + $$equals: function(paramValues1, paramValues2) { + var equal = true, self = this; + forEach(self.$$keys(), function(key) { + var left = paramValues1 && paramValues1[key], right = paramValues2 && paramValues2[key]; + if (!self[key].type.equals(left, right)) equal = false; + }); + return equal; + }, + $$validates: function $$validate(paramValues) { + var result = true, isOptional, val, param, self = this; + + forEach(this.$$keys(), function(key) { + param = self[key]; + val = paramValues[key]; + isOptional = !val && param.isOptional; + result = result && (isOptional || !!param.type.is(val)); + }); + return result; + }, + $$parent: undefined + }; + + this.ParamSet = ParamSet; +} + +// Register as a provider so it's available to other providers +angular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory); +angular.module('ui.router.util').run(['$urlMatcherFactory', function($urlMatcherFactory) { }]); diff --git a/client/www/lib/angular-ui-router/src/urlRouter.js b/client/www/lib/angular-ui-router/src/urlRouter.js new file mode 100644 index 0000000..2b22937 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/urlRouter.js @@ -0,0 +1,413 @@ +/** + * @ngdoc object + * @name ui.router.router.$urlRouterProvider + * + * @requires ui.router.util.$urlMatcherFactoryProvider + * @requires $locationProvider + * + * @description + * `$urlRouterProvider` has the responsibility of watching `$location`. + * When `$location` changes it runs through a list of rules one by one until a + * match is found. `$urlRouterProvider` is used behind the scenes anytime you specify + * a url in a state configuration. All urls are compiled into a UrlMatcher object. + * + * There are several methods on `$urlRouterProvider` that make it useful to use directly + * in your module config. + */ +$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider']; +function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { + var rules = [], otherwise = null, interceptDeferred = false, listener; + + // Returns a string that is a prefix of all strings matching the RegExp + function regExpPrefix(re) { + var prefix = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source); + return (prefix != null) ? prefix[1].replace(/\\(.)/g, "$1") : ''; + } + + // Interpolates matched values into a String.replace()-style pattern + function interpolate(pattern, match) { + return pattern.replace(/\$(\$|\d{1,2})/, function (m, what) { + return match[what === '$' ? 0 : Number(what)]; + }); + } + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#rule + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Defines rules that are used by `$urlRouterProvider` to find matches for + * specific URLs. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   // Here's an example of how you might allow case insensitive urls
+   *   $urlRouterProvider.rule(function ($injector, $location) {
+   *     var path = $location.path(),
+   *         normalized = path.toLowerCase();
+   *
+   *     if (path !== normalized) {
+   *       return normalized;
+   *     }
+   *   });
+   * });
+   * 
+ * + * @param {object} rule Handler function that takes `$injector` and `$location` + * services as arguments. You can use them to return a valid path as a string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + this.rule = function (rule) { + if (!isFunction(rule)) throw new Error("'rule' must be a function"); + rules.push(rule); + return this; + }; + + /** + * @ngdoc object + * @name ui.router.router.$urlRouterProvider#otherwise + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Defines a path that is used when an invalid route is requested. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   // if the path doesn't match any of the urls you configured
+   *   // otherwise will take care of routing the user to the
+   *   // specified url
+   *   $urlRouterProvider.otherwise('/index');
+   *
+   *   // Example of using function rule as param
+   *   $urlRouterProvider.otherwise(function ($injector, $location) {
+   *     return '/a/valid/url';
+   *   });
+   * });
+   * 
+ * + * @param {string|object} rule The url path you want to redirect to or a function + * rule that returns the url path. The function version is passed two params: + * `$injector` and `$location` services, and must return a url string. + * + * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance + */ + this.otherwise = function (rule) { + if (isString(rule)) { + var redirect = rule; + rule = function () { return redirect; }; + } + else if (!isFunction(rule)) throw new Error("'rule' must be a function"); + otherwise = rule; + return this; + }; + + + function handleIfMatch($injector, handler, match) { + if (!match) return false; + var result = $injector.invoke(handler, handler, { $match: match }); + return isDefined(result) ? result : true; + } + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#when + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Registers a handler for a given url matching. if handle is a string, it is + * treated as a redirect, and is interpolated according to the syntax of match + * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). + * + * If the handler is a function, it is injectable. It gets invoked if `$location` + * matches. You have the option of inject the match object as `$match`. + * + * The handler can return + * + * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` + * will continue trying to find another one that matches. + * - **string** which is treated as a redirect and passed to `$location.url()` + * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *   $urlRouterProvider.when($state.url, function ($match, $stateParams) {
+   *     if ($state.$current.navigable !== state ||
+   *         !equalForKeys($match, $stateParams) {
+   *      $state.transitionTo(state, $match, false);
+   *     }
+   *   });
+   * });
+   * 
+ * + * @param {string|object} what The incoming path that you want to redirect. + * @param {string|object} handler The path you want to redirect your user to. + */ + this.when = function (what, handler) { + var redirect, handlerIsString = isString(handler); + if (isString(what)) what = $urlMatcherFactory.compile(what); + + if (!handlerIsString && !isFunction(handler) && !isArray(handler)) + throw new Error("invalid 'handler' in when()"); + + var strategies = { + matcher: function (what, handler) { + if (handlerIsString) { + redirect = $urlMatcherFactory.compile(handler); + handler = ['$match', function ($match) { return redirect.format($match); }]; + } + return extend(function ($injector, $location) { + return handleIfMatch($injector, handler, what.exec($location.path(), $location.search())); + }, { + prefix: isString(what.prefix) ? what.prefix : '' + }); + }, + regex: function (what, handler) { + if (what.global || what.sticky) throw new Error("when() RegExp must not be global or sticky"); + + if (handlerIsString) { + redirect = handler; + handler = ['$match', function ($match) { return interpolate(redirect, $match); }]; + } + return extend(function ($injector, $location) { + return handleIfMatch($injector, handler, what.exec($location.path())); + }, { + prefix: regExpPrefix(what) + }); + } + }; + + var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp }; + + for (var n in check) { + if (check[n]) return this.rule(strategies[n](what, handler)); + } + + throw new Error("invalid 'what' in when()"); + }; + + /** + * @ngdoc function + * @name ui.router.router.$urlRouterProvider#deferIntercept + * @methodOf ui.router.router.$urlRouterProvider + * + * @description + * Disables (or enables) deferring location change interception. + * + * If you wish to customize the behavior of syncing the URL (for example, if you wish to + * defer a transition but maintain the current URL), call this method at configuration time. + * Then, at run time, call `$urlRouter.listen()` after you have configured your own + * `$locationChangeSuccess` event handler. + * + * @example + *
+   * var app = angular.module('app', ['ui.router.router']);
+   *
+   * app.config(function ($urlRouterProvider) {
+   *
+   *   // Prevent $urlRouter from automatically intercepting URL changes;
+   *   // this allows you to configure custom behavior in between
+   *   // location changes and route synchronization:
+   *   $urlRouterProvider.deferIntercept();
+   *
+   * }).run(function ($rootScope, $urlRouter, UserService) {
+   *
+   *   $rootScope.$on('$locationChangeSuccess', function(e) {
+   *     // UserService is an example service for managing user state
+   *     if (UserService.isLoggedIn()) return;
+   *
+   *     // Prevent $urlRouter's default handler from firing
+   *     e.preventDefault();
+   *
+   *     UserService.handleLogin().then(function() {
+   *       // Once the user has logged in, sync the current URL
+   *       // to the router:
+   *       $urlRouter.sync();
+   *     });
+   *   });
+   *
+   *   // Configures $urlRouter's listener *after* your custom listener
+   *   $urlRouter.listen();
+   * });
+   * 
+ * + * @param {boolean} defer Indicates whether to defer location change interception. Passing + no parameter is equivalent to `true`. + */ + this.deferIntercept = function (defer) { + if (defer === undefined) defer = true; + interceptDeferred = defer; + }; + + /** + * @ngdoc object + * @name ui.router.router.$urlRouter + * + * @requires $location + * @requires $rootScope + * @requires $injector + * @requires $browser + * + * @description + * + */ + this.$get = $get; + $get.$inject = ['$location', '$rootScope', '$injector', '$browser']; + function $get( $location, $rootScope, $injector, $browser) { + + var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl; + + function appendBasePath(url, isHtml5, absolute) { + if (baseHref === '/') return url; + if (isHtml5) return baseHref.slice(0, -1) + url; + if (absolute) return baseHref.slice(1) + url; + return url; + } + + // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree + function update(evt) { + if (evt && evt.defaultPrevented) return; + var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl; + lastPushedUrl = undefined; + if (ignoreUpdate) return true; + + function check(rule) { + var handled = rule($injector, $location); + + if (!handled) return false; + if (isString(handled)) $location.replace().url(handled); + return true; + } + var n = rules.length, i; + + for (i = 0; i < n; i++) { + if (check(rules[i])) return; + } + // always check otherwise last to allow dynamic updates to the set of rules + if (otherwise) check(otherwise); + } + + function listen() { + listener = listener || $rootScope.$on('$locationChangeSuccess', update); + return listener; + } + + if (!interceptDeferred) listen(); + + return { + /** + * @ngdoc function + * @name ui.router.router.$urlRouter#sync + * @methodOf ui.router.router.$urlRouter + * + * @description + * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`. + * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event, + * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed + * with the transition by calling `$urlRouter.sync()`. + * + * @example + *
+       * angular.module('app', ['ui.router'])
+       *   .run(function($rootScope, $urlRouter) {
+       *     $rootScope.$on('$locationChangeSuccess', function(evt) {
+       *       // Halt state change from even starting
+       *       evt.preventDefault();
+       *       // Perform custom logic
+       *       var meetsRequirement = ...
+       *       // Continue with the update and state transition if logic allows
+       *       if (meetsRequirement) $urlRouter.sync();
+       *     });
+       * });
+       * 
+ */ + sync: function() { + update(); + }, + + listen: function() { + return listen(); + }, + + update: function(read) { + if (read) { + location = $location.url(); + return; + } + if ($location.url() === location) return; + + $location.url(location); + $location.replace(); + }, + + push: function(urlMatcher, params, options) { + $location.url(urlMatcher.format(params || {})); + lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined; + if (options && options.replace) $location.replace(); + }, + + /** + * @ngdoc function + * @name ui.router.router.$urlRouter#href + * @methodOf ui.router.router.$urlRouter + * + * @description + * A URL generation method that returns the compiled URL for a given + * {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters. + * + * @example + *
+       * $bob = $urlRouter.href(new UrlMatcher("/about/:person"), {
+       *   person: "bob"
+       * });
+       * // $bob == "/about/bob";
+       * 
+ * + * @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate. + * @param {object=} params An object of parameter values to fill the matcher's required parameters. + * @param {object=} options Options object. The options are: + * + * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". + * + * @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` + */ + href: function(urlMatcher, params, options) { + if (!urlMatcher.validates(params)) return null; + + var isHtml5 = $locationProvider.html5Mode(); + if (angular.isObject(isHtml5)) { + isHtml5 = isHtml5.enabled; + } + + var url = urlMatcher.format(params); + options = options || {}; + + if (!isHtml5 && url !== null) { + url = "#" + $locationProvider.hashPrefix() + url; + } + url = appendBasePath(url, isHtml5, options.absolute); + + if (!options.absolute || !url) { + return url; + } + + var slash = (!isHtml5 && url ? '/' : ''), port = $location.port(); + port = (port === 80 || port === 443 ? '' : ':' + port); + + return [$location.protocol(), '://', $location.host(), port, slash, url].join(''); + } + }; + } +} + +angular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider); diff --git a/client/www/lib/angular-ui-router/src/view.js b/client/www/lib/angular-ui-router/src/view.js new file mode 100644 index 0000000..f19a3c5 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/view.js @@ -0,0 +1,71 @@ + +$ViewProvider.$inject = []; +function $ViewProvider() { + + this.$get = $get; + /** + * @ngdoc object + * @name ui.router.state.$view + * + * @requires ui.router.util.$templateFactory + * @requires $rootScope + * + * @description + * + */ + $get.$inject = ['$rootScope', '$templateFactory']; + function $get( $rootScope, $templateFactory) { + return { + // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... }) + /** + * @ngdoc function + * @name ui.router.state.$view#load + * @methodOf ui.router.state.$view + * + * @description + * + * @param {string} name name + * @param {object} options option object. + */ + load: function load(name, options) { + var result, defaults = { + template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {} + }; + options = extend(defaults, options); + + if (options.view) { + result = $templateFactory.fromConfig(options.view, options.params, options.locals); + } + if (result && options.notify) { + /** + * @ngdoc event + * @name ui.router.state.$state#$viewContentLoading + * @eventOf ui.router.state.$view + * @eventType broadcast on root scope + * @description + * + * Fired once the view **begins loading**, *before* the DOM is rendered. + * + * @param {Object} event Event object. + * @param {Object} viewConfig The view config properties (template, controller, etc). + * + * @example + * + *
+         * $scope.$on('$viewContentLoading',
+         * function(event, viewConfig){
+         *     // Access to all the view config properties.
+         *     // and one special property 'targetView'
+         *     // viewConfig.targetView
+         * });
+         * 
+ */ + $rootScope.$broadcast('$viewContentLoading', options); + } + return result; + } + }; + } +} + +angular.module('ui.router.state').provider('$view', $ViewProvider); diff --git a/client/www/lib/angular-ui-router/src/viewDirective.js b/client/www/lib/angular-ui-router/src/viewDirective.js new file mode 100644 index 0000000..d3cf100 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/viewDirective.js @@ -0,0 +1,302 @@ +/** + * @ngdoc directive + * @name ui.router.state.directive:ui-view + * + * @requires ui.router.state.$state + * @requires $compile + * @requires $controller + * @requires $injector + * @requires ui.router.state.$uiViewScroll + * @requires $document + * + * @restrict ECA + * + * @description + * The ui-view directive tells $state where to place your templates. + * + * @param {string=} name A view name. The name should be unique amongst the other views in the + * same state. You can have views of the same name that live in different states. + * + * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window + * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll + * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you + * scroll ui-view elements into view when they are populated during a state activation. + * + * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) + * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.* + * + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @example + * A view can be unnamed or named. + *
+ * 
+ * 
+ * + * + *
+ *
+ * + * You can only have one unnamed view within any template (or root html). If you are only using a + * single view and it is unnamed then you can populate it like so: + *
+ * 
+ * $stateProvider.state("home", { + * template: "

HELLO!

" + * }) + *
+ * + * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`} + * config property, by name, in this case an empty name: + *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "": {
+ *       template: "

HELLO!

" + * } + * } + * }) + *
+ * + * But typically you'll only use the views property if you name your view or have more than one view + * in the same template. There's not really a compelling reason to name a view if its the only one, + * but you could if you wanted, like so: + *
+ * 
+ *
+ *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "main": {
+ *       template: "

HELLO!

" + * } + * } + * }) + *
+ * + * Really though, you'll use views to set up multiple views: + *
+ * 
+ *
+ *
+ *
+ * + *
+ * $stateProvider.state("home", {
+ *   views: {
+ *     "": {
+ *       template: "

HELLO!

" + * }, + * "chart": { + * template: "" + * }, + * "data": { + * template: "" + * } + * } + * }) + *
+ * + * Examples for `autoscroll`: + * + *
+ * 
+ * 
+ *
+ * 
+ * 
+ * 
+ * 
+ * 
+ */ +$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate']; +function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) { + + function getService() { + return ($injector.has) ? function(service) { + return $injector.has(service) ? $injector.get(service) : null; + } : function(service) { + try { + return $injector.get(service); + } catch (e) { + return null; + } + }; + } + + var service = getService(), + $animator = service('$animator'), + $animate = service('$animate'); + + // Returns a set of DOM manipulation functions based on which Angular version + // it should use + function getRenderer(attrs, scope) { + var statics = function() { + return { + enter: function (element, target, cb) { target.after(element); cb(); }, + leave: function (element, cb) { element.remove(); cb(); } + }; + }; + + if ($animate) { + return { + enter: function(element, target, cb) { + var promise = $animate.enter(element, null, target, cb); + if (promise && promise.then) promise.then(cb); + }, + leave: function(element, cb) { + var promise = $animate.leave(element, cb); + if (promise && promise.then) promise.then(cb); + } + }; + } + + if ($animator) { + var animate = $animator && $animator(scope, attrs); + + return { + enter: function(element, target, cb) {animate.enter(element, null, target); cb(); }, + leave: function(element, cb) { animate.leave(element); cb(); } + }; + } + + return statics(); + } + + var directive = { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + compile: function (tElement, tAttrs, $transclude) { + return function (scope, $element, attrs) { + var previousEl, currentEl, currentScope, latestLocals, + onloadExp = attrs.onload || '', + autoScrollExp = attrs.autoscroll, + renderer = getRenderer(attrs, scope); + + scope.$on('$stateChangeSuccess', function() { + updateView(false); + }); + scope.$on('$viewContentLoading', function() { + updateView(false); + }); + + updateView(true); + + function cleanupLastView() { + if (previousEl) { + previousEl.remove(); + previousEl = null; + } + + if (currentScope) { + currentScope.$destroy(); + currentScope = null; + } + + if (currentEl) { + renderer.leave(currentEl, function() { + previousEl = null; + }); + + previousEl = currentEl; + currentEl = null; + } + } + + function updateView(firstTime) { + var newScope, + name = getUiViewName(scope, attrs, $element, $interpolate), + previousLocals = name && $state.$current && $state.$current.locals[name]; + + if (!firstTime && previousLocals === latestLocals) return; // nothing to do + newScope = scope.$new(); + latestLocals = $state.$current.locals[name]; + + var clone = $transclude(newScope, function(clone) { + renderer.enter(clone, $element, function onUiViewEnter() { + if(currentScope) { + currentScope.$emit('$viewContentAnimationEnded'); + } + + if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) { + $uiViewScroll(clone); + } + }); + cleanupLastView(); + }); + + currentEl = clone; + currentScope = newScope; + /** + * @ngdoc event + * @name ui.router.state.directive:ui-view#$viewContentLoaded + * @eventOf ui.router.state.directive:ui-view + * @eventType emits on ui-view directive scope + * @description * + * Fired once the view is **loaded**, *after* the DOM is rendered. + * + * @param {Object} event Event object. + */ + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } + }; + } + }; + + return directive; +} + +$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate']; +function $ViewDirectiveFill ( $compile, $controller, $state, $interpolate) { + return { + restrict: 'ECA', + priority: -400, + compile: function (tElement) { + var initial = tElement.html(); + return function (scope, $element, attrs) { + var current = $state.$current, + name = getUiViewName(scope, attrs, $element, $interpolate), + locals = current && current.locals[name]; + + if (! locals) { + return; + } + + $element.data('$uiView', { name: name, state: locals.$$state }); + $element.html(locals.$template ? locals.$template : initial); + + var link = $compile($element.contents()); + + if (locals.$$controller) { + locals.$scope = scope; + var controller = $controller(locals.$$controller, locals); + if (locals.$$controllerAs) { + scope[locals.$$controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + + link(scope); + }; + } + }; +} + +/** + * Shared ui-view code for both directives: + * Given scope, element, and its attributes, return the view's name + */ +function getUiViewName(scope, attrs, element, $interpolate) { + var name = $interpolate(attrs.uiView || attrs.name || '')(scope); + var inherited = element.inheritedData('$uiView'); + return name.indexOf('@') >= 0 ? name : (name + '@' + (inherited ? inherited.state.name : '')); +} + +angular.module('ui.router.state').directive('uiView', $ViewDirective); +angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill); diff --git a/client/www/lib/angular-ui-router/src/viewScroll.js b/client/www/lib/angular-ui-router/src/viewScroll.js new file mode 100644 index 0000000..dfe0a03 --- /dev/null +++ b/client/www/lib/angular-ui-router/src/viewScroll.js @@ -0,0 +1,52 @@ +/** + * @ngdoc object + * @name ui.router.state.$uiViewScrollProvider + * + * @description + * Provider that returns the {@link ui.router.state.$uiViewScroll} service function. + */ +function $ViewScrollProvider() { + + var useAnchorScroll = false; + + /** + * @ngdoc function + * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll + * @methodOf ui.router.state.$uiViewScrollProvider + * + * @description + * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for + * scrolling based on the url anchor. + */ + this.useAnchorScroll = function () { + useAnchorScroll = true; + }; + + /** + * @ngdoc object + * @name ui.router.state.$uiViewScroll + * + * @requires $anchorScroll + * @requires $timeout + * + * @description + * When called with a jqLite element, it scrolls the element into view (after a + * `$timeout` so the DOM has time to refresh). + * + * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, + * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}. + */ + this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) { + if (useAnchorScroll) { + return $anchorScroll; + } + + return function ($element) { + $timeout(function () { + $element[0].scrollIntoView(); + }, 0, false); + }; + }]; +} + +angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); diff --git a/client/www/lib/angular/.bower.json b/client/www/lib/angular/.bower.json new file mode 100644 index 0000000..1bc3863 --- /dev/null +++ b/client/www/lib/angular/.bower.json @@ -0,0 +1,17 @@ +{ + "name": "angular", + "version": "1.4.3", + "main": "./angular.js", + "ignore": [], + "dependencies": {}, + "homepage": "https://github.com/angular/bower-angular", + "_release": "1.4.3", + "_resolution": { + "type": "version", + "tag": "v1.4.3", + "commit": "dbd689e8103a6366e53e1f6786727f7c65ccfd75" + }, + "_source": "https://github.com/angular/bower-angular.git", + "_target": "1.4.3", + "_originalSource": "angular" +} \ No newline at end of file diff --git a/client/www/lib/angular/README.md b/client/www/lib/angular/README.md new file mode 100644 index 0000000..d1bc0ed --- /dev/null +++ b/client/www/lib/angular/README.md @@ -0,0 +1,64 @@ +# packaged angular + +This repo is for distribution on `npm` and `bower`. The source for this module is in the +[main AngularJS repo](https://github.com/angular/angular.js). +Please file issues and pull requests against that repo. + +## Install + +You can install this package either with `npm` or with `bower`. + +### npm + +```shell +npm install angular +``` + +Then add a ` +``` + +Or `require('angular')` from your code. + +### bower + +```shell +bower install angular +``` + +Then add a ` +``` + +## Documentation + +Documentation is available on the +[AngularJS docs site](http://docs.angularjs.org/). + +## License + +The MIT License + +Copyright (c) 2010-2015 Google, Inc. http://angularjs.org + +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/client/www/lib/angular/angular-csp.css b/client/www/lib/angular/angular-csp.css new file mode 100644 index 0000000..f3cd926 --- /dev/null +++ b/client/www/lib/angular/angular-csp.css @@ -0,0 +1,21 @@ +/* Include this file in your html if you are using the CSP mode. */ + +@charset "UTF-8"; + +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], +.ng-cloak, .x-ng-cloak, +.ng-hide:not(.ng-hide-animate) { + display: none !important; +} + +ng\:form { + display: block; +} + +.ng-animate-shim { + visibility:hidden; +} + +.ng-anchor { + position:absolute; +} diff --git a/client/www/lib/angular/angular.js b/client/www/lib/angular/angular.js new file mode 100644 index 0000000..f7442c0 --- /dev/null +++ b/client/www/lib/angular/angular.js @@ -0,0 +1,28364 @@ +/** + * @license AngularJS v1.4.3 + * (c) 2010-2015 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, document, undefined) {'use strict'; + +/** + * @description + * + * This object provides a utility for producing rich Error messages within + * Angular. It can be called as follows: + * + * var exampleMinErr = minErr('example'); + * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); + * + * The above creates an instance of minErr in the example namespace. The + * resulting error will have a namespaced error code of example.one. The + * resulting error will replace {0} with the value of foo, and {1} with the + * value of bar. The object is not restricted in the number of arguments it can + * take. + * + * If fewer arguments are specified than necessary for interpolation, the extra + * interpolation markers will be preserved in the final string. + * + * Since data will be parsed statically during a build step, some restrictions + * are applied with respect to how minErr instances are created and called. + * Instances should have names of the form namespaceMinErr for a minErr created + * using minErr('namespace') . Error codes, namespaces and template strings + * should all be static strings, not variables or general expressions. + * + * @param {string} module The namespace to use for the new minErr instance. + * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning + * error from returned function, for cases when a particular type of error is useful. + * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance + */ + +function minErr(module, ErrorConstructor) { + ErrorConstructor = ErrorConstructor || Error; + return function() { + var SKIP_INDEXES = 2; + + var templateArgs = arguments, + code = templateArgs[0], + message = '[' + (module ? module + ':' : '') + code + '] ', + template = templateArgs[1], + paramPrefix, i; + + message += template.replace(/\{\d+\}/g, function(match) { + var index = +match.slice(1, -1), + shiftedIndex = index + SKIP_INDEXES; + + if (shiftedIndex < templateArgs.length) { + return toDebugString(templateArgs[shiftedIndex]); + } + + return match; + }); + + message += '\nhttp://errors.angularjs.org/1.4.3/' + + (module ? module + '/' : '') + code; + + for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { + message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' + + encodeURIComponent(toDebugString(templateArgs[i])); + } + + return new ErrorConstructor(message); + }; +} + +/* We need to tell jshint what variables are being exported */ +/* global angular: true, + msie: true, + jqLite: true, + jQuery: true, + slice: true, + splice: true, + push: true, + toString: true, + ngMinErr: true, + angularModule: true, + uid: true, + REGEX_STRING_REGEXP: true, + VALIDITY_STATE_PROPERTY: true, + + lowercase: true, + uppercase: true, + manualLowercase: true, + manualUppercase: true, + nodeName_: true, + isArrayLike: true, + forEach: true, + forEachSorted: true, + reverseParams: true, + nextUid: true, + setHashKey: true, + extend: true, + toInt: true, + inherit: true, + merge: true, + noop: true, + identity: true, + valueFn: true, + isUndefined: true, + isDefined: true, + isObject: true, + isBlankObject: true, + isString: true, + isNumber: true, + isDate: true, + isArray: true, + isFunction: true, + isRegExp: true, + isWindow: true, + isScope: true, + isFile: true, + isFormData: true, + isBlob: true, + isBoolean: true, + isPromiseLike: true, + trim: true, + escapeForRegexp: true, + isElement: true, + makeMap: true, + includes: true, + arrayRemove: true, + copy: true, + shallowCopy: true, + equals: true, + csp: true, + jq: true, + concat: true, + sliceArgs: true, + bind: true, + toJsonReplacer: true, + toJson: true, + fromJson: true, + convertTimezoneToLocal: true, + timezoneToOffset: true, + startingTag: true, + tryDecodeURIComponent: true, + parseKeyValue: true, + toKeyValue: true, + encodeUriSegment: true, + encodeUriQuery: true, + angularInit: true, + bootstrap: true, + getTestability: true, + snake_case: true, + bindJQuery: true, + assertArg: true, + assertArgFn: true, + assertNotHasOwnProperty: true, + getter: true, + getBlockNodes: true, + hasOwnProperty: true, + createMap: true, + + NODE_TYPE_ELEMENT: true, + NODE_TYPE_ATTRIBUTE: true, + NODE_TYPE_TEXT: true, + NODE_TYPE_COMMENT: true, + NODE_TYPE_DOCUMENT: true, + NODE_TYPE_DOCUMENT_FRAGMENT: true, +*/ + +//////////////////////////////////// + +/** + * @ngdoc module + * @name ng + * @module ng + * @description + * + * # ng (core module) + * The ng module is loaded by default when an AngularJS application is started. The module itself + * contains the essential components for an AngularJS application to function. The table below + * lists a high level breakdown of each of the services/factories, filters, directives and testing + * components available within this core module. + * + *
+ */ + +var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/; + +// The name of a form control's ValidityState property. +// This is used so that it's possible for internal tests to create mock ValidityStates. +var VALIDITY_STATE_PROPERTY = 'validity'; + +/** + * @ngdoc function + * @name angular.lowercase + * @module ng + * @kind function + * + * @description Converts the specified string to lowercase. + * @param {string} string String to be converted to lowercase. + * @returns {string} Lowercased string. + */ +var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;}; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * @ngdoc function + * @name angular.uppercase + * @module ng + * @kind function + * + * @description Converts the specified string to uppercase. + * @param {string} string String to be converted to uppercase. + * @returns {string} Uppercased string. + */ +var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;}; + + +var manualLowercase = function(s) { + /* jshint bitwise: false */ + return isString(s) + ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);}) + : s; +}; +var manualUppercase = function(s) { + /* jshint bitwise: false */ + return isString(s) + ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);}) + : s; +}; + + +// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish +// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods +// with correct but slower alternatives. +if ('i' !== 'I'.toLowerCase()) { + lowercase = manualLowercase; + uppercase = manualUppercase; +} + + +var + msie, // holds major version number for IE, or NaN if UA is not IE. + jqLite, // delay binding since jQuery could be loaded after us. + jQuery, // delay binding + slice = [].slice, + splice = [].splice, + push = [].push, + toString = Object.prototype.toString, + getPrototypeOf = Object.getPrototypeOf, + ngMinErr = minErr('ng'), + + /** @name angular */ + angular = window.angular || (window.angular = {}), + angularModule, + uid = 0; + +/** + * documentMode is an IE-only property + * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx + */ +msie = document.documentMode; + + +/** + * @private + * @param {*} obj + * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, + * String ...) + */ +function isArrayLike(obj) { + if (obj == null || isWindow(obj)) { + return false; + } + + // Support: iOS 8.2 (not reproducible in simulator) + // "length" in obj used to prevent JIT error (gh-11508) + var length = "length" in Object(obj) && obj.length; + + if (obj.nodeType === NODE_TYPE_ELEMENT && length) { + return true; + } + + return isString(obj) || isArray(obj) || length === 0 || + typeof length === 'number' && length > 0 && (length - 1) in obj; +} + +/** + * @ngdoc function + * @name angular.forEach + * @module ng + * @kind function + * + * @description + * Invokes the `iterator` function once for each item in `obj` collection, which can be either an + * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value` + * is the value of an object property or an array element, `key` is the object property key or + * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional. + * + * It is worth noting that `.forEach` does not iterate over inherited properties because it filters + * using the `hasOwnProperty` method. + * + * Unlike ES262's + * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18), + * Providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just + * return the value provided. + * + ```js + var values = {name: 'misko', gender: 'male'}; + var log = []; + angular.forEach(values, function(value, key) { + this.push(key + ': ' + value); + }, log); + expect(log).toEqual(['name: misko', 'gender: male']); + ``` + * + * @param {Object|Array} obj Object to iterate over. + * @param {Function} iterator Iterator function. + * @param {Object=} context Object to become context (`this`) for the iterator function. + * @returns {Object|Array} Reference to `obj`. + */ + +function forEach(obj, iterator, context) { + var key, length; + if (obj) { + if (isFunction(obj)) { + for (key in obj) { + // Need to check if hasOwnProperty exists, + // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function + if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) { + iterator.call(context, obj[key], key, obj); + } + } + } else if (isArray(obj) || isArrayLike(obj)) { + var isPrimitive = typeof obj !== 'object'; + for (key = 0, length = obj.length; key < length; key++) { + if (isPrimitive || key in obj) { + iterator.call(context, obj[key], key, obj); + } + } + } else if (obj.forEach && obj.forEach !== forEach) { + obj.forEach(iterator, context, obj); + } else if (isBlankObject(obj)) { + // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty + for (key in obj) { + iterator.call(context, obj[key], key, obj); + } + } else if (typeof obj.hasOwnProperty === 'function') { + // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed + for (key in obj) { + if (obj.hasOwnProperty(key)) { + iterator.call(context, obj[key], key, obj); + } + } + } else { + // Slow path for objects which do not have a method `hasOwnProperty` + for (key in obj) { + if (hasOwnProperty.call(obj, key)) { + iterator.call(context, obj[key], key, obj); + } + } + } + } + return obj; +} + +function forEachSorted(obj, iterator, context) { + var keys = Object.keys(obj).sort(); + for (var i = 0; i < keys.length; i++) { + iterator.call(context, obj[keys[i]], keys[i]); + } + return keys; +} + + +/** + * when using forEach the params are value, key, but it is often useful to have key, value. + * @param {function(string, *)} iteratorFn + * @returns {function(*, string)} + */ +function reverseParams(iteratorFn) { + return function(value, key) { iteratorFn(key, value); }; +} + +/** + * A consistent way of creating unique IDs in angular. + * + * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before + * we hit number precision issues in JavaScript. + * + * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M + * + * @returns {number} an unique alpha-numeric string + */ +function nextUid() { + return ++uid; +} + + +/** + * Set or clear the hashkey for an object. + * @param obj object + * @param h the hashkey (!truthy to delete the hashkey) + */ +function setHashKey(obj, h) { + if (h) { + obj.$$hashKey = h; + } else { + delete obj.$$hashKey; + } +} + + +function baseExtend(dst, objs, deep) { + var h = dst.$$hashKey; + + for (var i = 0, ii = objs.length; i < ii; ++i) { + var obj = objs[i]; + if (!isObject(obj) && !isFunction(obj)) continue; + var keys = Object.keys(obj); + for (var j = 0, jj = keys.length; j < jj; j++) { + var key = keys[j]; + var src = obj[key]; + + if (deep && isObject(src)) { + if (isDate(src)) { + dst[key] = new Date(src.valueOf()); + } else { + if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {}; + baseExtend(dst[key], [src], true); + } + } else { + dst[key] = src; + } + } + } + + setHashKey(dst, h); + return dst; +} + +/** + * @ngdoc function + * @name angular.extend + * @module ng + * @kind function + * + * @description + * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s) + * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so + * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`. + * + * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use + * {@link angular.merge} for this. + * + * @param {Object} dst Destination object. + * @param {...Object} src Source object(s). + * @returns {Object} Reference to `dst`. + */ +function extend(dst) { + return baseExtend(dst, slice.call(arguments, 1), false); +} + + +/** +* @ngdoc function +* @name angular.merge +* @module ng +* @kind function +* +* @description +* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s) +* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so +* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`. +* +* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source +* objects, performing a deep copy. +* +* @param {Object} dst Destination object. +* @param {...Object} src Source object(s). +* @returns {Object} Reference to `dst`. +*/ +function merge(dst) { + return baseExtend(dst, slice.call(arguments, 1), true); +} + + + +function toInt(str) { + return parseInt(str, 10); +} + + +function inherit(parent, extra) { + return extend(Object.create(parent), extra); +} + +/** + * @ngdoc function + * @name angular.noop + * @module ng + * @kind function + * + * @description + * A function that performs no operations. This function can be useful when writing code in the + * functional style. + ```js + function foo(callback) { + var result = calculateResult(); + (callback || angular.noop)(result); + } + ``` + */ +function noop() {} +noop.$inject = []; + + +/** + * @ngdoc function + * @name angular.identity + * @module ng + * @kind function + * + * @description + * A function that returns its first argument. This function is useful when writing code in the + * functional style. + * + ```js + function transformer(transformationFn, value) { + return (transformationFn || angular.identity)(value); + }; + ``` + * @param {*} value to be returned. + * @returns {*} the value passed in. + */ +function identity($) {return $;} +identity.$inject = []; + + +function valueFn(value) {return function() {return value;};} + +function hasCustomToString(obj) { + return isFunction(obj.toString) && obj.toString !== Object.prototype.toString; +} + + +/** + * @ngdoc function + * @name angular.isUndefined + * @module ng + * @kind function + * + * @description + * Determines if a reference is undefined. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is undefined. + */ +function isUndefined(value) {return typeof value === 'undefined';} + + +/** + * @ngdoc function + * @name angular.isDefined + * @module ng + * @kind function + * + * @description + * Determines if a reference is defined. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is defined. + */ +function isDefined(value) {return typeof value !== 'undefined';} + + +/** + * @ngdoc function + * @name angular.isObject + * @module ng + * @kind function + * + * @description + * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not + * considered to be objects. Note that JavaScript arrays are objects. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is an `Object` but not `null`. + */ +function isObject(value) { + // http://jsperf.com/isobject4 + return value !== null && typeof value === 'object'; +} + + +/** + * Determine if a value is an object with a null prototype + * + * @returns {boolean} True if `value` is an `Object` with a null prototype + */ +function isBlankObject(value) { + return value !== null && typeof value === 'object' && !getPrototypeOf(value); +} + + +/** + * @ngdoc function + * @name angular.isString + * @module ng + * @kind function + * + * @description + * Determines if a reference is a `String`. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a `String`. + */ +function isString(value) {return typeof value === 'string';} + + +/** + * @ngdoc function + * @name angular.isNumber + * @module ng + * @kind function + * + * @description + * Determines if a reference is a `Number`. + * + * This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`. + * + * If you wish to exclude these then you can use the native + * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite) + * method. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a `Number`. + */ +function isNumber(value) {return typeof value === 'number';} + + +/** + * @ngdoc function + * @name angular.isDate + * @module ng + * @kind function + * + * @description + * Determines if a value is a date. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a `Date`. + */ +function isDate(value) { + return toString.call(value) === '[object Date]'; +} + + +/** + * @ngdoc function + * @name angular.isArray + * @module ng + * @kind function + * + * @description + * Determines if a reference is an `Array`. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is an `Array`. + */ +var isArray = Array.isArray; + +/** + * @ngdoc function + * @name angular.isFunction + * @module ng + * @kind function + * + * @description + * Determines if a reference is a `Function`. + * + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a `Function`. + */ +function isFunction(value) {return typeof value === 'function';} + + +/** + * Determines if a value is a regular expression object. + * + * @private + * @param {*} value Reference to check. + * @returns {boolean} True if `value` is a `RegExp`. + */ +function isRegExp(value) { + return toString.call(value) === '[object RegExp]'; +} + + +/** + * Checks if `obj` is a window object. + * + * @private + * @param {*} obj Object to check + * @returns {boolean} True if `obj` is a window obj. + */ +function isWindow(obj) { + return obj && obj.window === obj; +} + + +function isScope(obj) { + return obj && obj.$evalAsync && obj.$watch; +} + + +function isFile(obj) { + return toString.call(obj) === '[object File]'; +} + + +function isFormData(obj) { + return toString.call(obj) === '[object FormData]'; +} + + +function isBlob(obj) { + return toString.call(obj) === '[object Blob]'; +} + + +function isBoolean(value) { + return typeof value === 'boolean'; +} + + +function isPromiseLike(obj) { + return obj && isFunction(obj.then); +} + + +var TYPED_ARRAY_REGEXP = /^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/; +function isTypedArray(value) { + return TYPED_ARRAY_REGEXP.test(toString.call(value)); +} + + +var trim = function(value) { + return isString(value) ? value.trim() : value; +}; + +// Copied from: +// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021 +// Prereq: s is a string. +var escapeForRegexp = function(s) { + return s.replace(/([-()\[\]{}+?*.$\^|,:#= 0) { + array.splice(index, 1); + } + return index; +} + +/** + * @ngdoc function + * @name angular.copy + * @module ng + * @kind function + * + * @description + * Creates a deep copy of `source`, which should be an object or an array. + * + * * If no destination is supplied, a copy of the object or array is created. + * * If a destination is provided, all of its elements (for arrays) or properties (for objects) + * are deleted and then all elements/properties from the source are copied to it. + * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned. + * * If `source` is identical to 'destination' an exception will be thrown. + * + * @param {*} source The source that will be used to make a copy. + * Can be any type, including primitives, `null`, and `undefined`. + * @param {(Object|Array)=} destination Destination into which the source is copied. If + * provided, must be of the same type as `source`. + * @returns {*} The copy or updated `destination`, if `destination` was specified. + * + * @example + + +
+
+ Name:
+ E-mail:
+ Gender: male + female
+ + +
+
form = {{user | json}}
+
master = {{master | json}}
+
+ + +
+
+ */ +function copy(source, destination, stackSource, stackDest) { + if (isWindow(source) || isScope(source)) { + throw ngMinErr('cpws', + "Can't copy! Making copies of Window or Scope instances is not supported."); + } + if (isTypedArray(destination)) { + throw ngMinErr('cpta', + "Can't copy! TypedArray destination cannot be mutated."); + } + + if (!destination) { + destination = source; + if (isObject(source)) { + var index; + if (stackSource && (index = stackSource.indexOf(source)) !== -1) { + return stackDest[index]; + } + + // TypedArray, Date and RegExp have specific copy functionality and must be + // pushed onto the stack before returning. + // Array and other objects create the base object and recurse to copy child + // objects. The array/object will be pushed onto the stack when recursed. + if (isArray(source)) { + return copy(source, [], stackSource, stackDest); + } else if (isTypedArray(source)) { + destination = new source.constructor(source); + } else if (isDate(source)) { + destination = new Date(source.getTime()); + } else if (isRegExp(source)) { + destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]); + destination.lastIndex = source.lastIndex; + } else { + var emptyObject = Object.create(getPrototypeOf(source)); + return copy(source, emptyObject, stackSource, stackDest); + } + + if (stackDest) { + stackSource.push(source); + stackDest.push(destination); + } + } + } else { + if (source === destination) throw ngMinErr('cpi', + "Can't copy! Source and destination are identical."); + + stackSource = stackSource || []; + stackDest = stackDest || []; + + if (isObject(source)) { + stackSource.push(source); + stackDest.push(destination); + } + + var result, key; + if (isArray(source)) { + destination.length = 0; + for (var i = 0; i < source.length; i++) { + destination.push(copy(source[i], null, stackSource, stackDest)); + } + } else { + var h = destination.$$hashKey; + if (isArray(destination)) { + destination.length = 0; + } else { + forEach(destination, function(value, key) { + delete destination[key]; + }); + } + if (isBlankObject(source)) { + // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty + for (key in source) { + destination[key] = copy(source[key], null, stackSource, stackDest); + } + } else if (source && typeof source.hasOwnProperty === 'function') { + // Slow path, which must rely on hasOwnProperty + for (key in source) { + if (source.hasOwnProperty(key)) { + destination[key] = copy(source[key], null, stackSource, stackDest); + } + } + } else { + // Slowest path --- hasOwnProperty can't be called as a method + for (key in source) { + if (hasOwnProperty.call(source, key)) { + destination[key] = copy(source[key], null, stackSource, stackDest); + } + } + } + setHashKey(destination,h); + } + } + return destination; +} + +/** + * Creates a shallow copy of an object, an array or a primitive. + * + * Assumes that there are no proto properties for objects. + */ +function shallowCopy(src, dst) { + if (isArray(src)) { + dst = dst || []; + + for (var i = 0, ii = src.length; i < ii; i++) { + dst[i] = src[i]; + } + } else if (isObject(src)) { + dst = dst || {}; + + for (var key in src) { + if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + } + + return dst || src; +} + + +/** + * @ngdoc function + * @name angular.equals + * @module ng + * @kind function + * + * @description + * Determines if two objects or two values are equivalent. Supports value types, regular + * expressions, arrays and objects. + * + * Two objects or values are considered equivalent if at least one of the following is true: + * + * * Both objects or values pass `===` comparison. + * * Both objects or values are of the same type and all of their properties are equal by + * comparing them with `angular.equals`. + * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal) + * * Both values represent the same regular expression (In JavaScript, + * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual + * representation matches). + * + * During a property comparison, properties of `function` type and properties with names + * that begin with `$` are ignored. + * + * Scope and DOMWindow objects are being compared only by identify (`===`). + * + * @param {*} o1 Object or value to compare. + * @param {*} o2 Object or value to compare. + * @returns {boolean} True if arguments are equal. + */ +function equals(o1, o2) { + if (o1 === o2) return true; + if (o1 === null || o2 === null) return false; + if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN + var t1 = typeof o1, t2 = typeof o2, length, key, keySet; + if (t1 == t2) { + if (t1 == 'object') { + if (isArray(o1)) { + if (!isArray(o2)) return false; + if ((length = o1.length) == o2.length) { + for (key = 0; key < length; key++) { + if (!equals(o1[key], o2[key])) return false; + } + return true; + } + } else if (isDate(o1)) { + if (!isDate(o2)) return false; + return equals(o1.getTime(), o2.getTime()); + } else if (isRegExp(o1)) { + return isRegExp(o2) ? o1.toString() == o2.toString() : false; + } else { + if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || + isArray(o2) || isDate(o2) || isRegExp(o2)) return false; + keySet = createMap(); + for (key in o1) { + if (key.charAt(0) === '$' || isFunction(o1[key])) continue; + if (!equals(o1[key], o2[key])) return false; + keySet[key] = true; + } + for (key in o2) { + if (!(key in keySet) && + key.charAt(0) !== '$' && + o2[key] !== undefined && + !isFunction(o2[key])) return false; + } + return true; + } + } + } + return false; +} + +var csp = function() { + if (isDefined(csp.isActive_)) return csp.isActive_; + + var active = !!(document.querySelector('[ng-csp]') || + document.querySelector('[data-ng-csp]')); + + if (!active) { + try { + /* jshint -W031, -W054 */ + new Function(''); + /* jshint +W031, +W054 */ + } catch (e) { + active = true; + } + } + + return (csp.isActive_ = active); +}; + +/** + * @ngdoc directive + * @module ng + * @name ngJq + * + * @element ANY + * @param {string=} ngJq the name of the library available under `window` + * to be used for angular.element + * @description + * Use this directive to force the angular.element library. This should be + * used to force either jqLite by leaving ng-jq blank or setting the name of + * the jquery variable under window (eg. jQuery). + * + * Since angular looks for this directive when it is loaded (doesn't wait for the + * DOMContentLoaded event), it must be placed on an element that comes before the script + * which loads angular. Also, only the first instance of `ng-jq` will be used and all + * others ignored. + * + * @example + * This example shows how to force jqLite using the `ngJq` directive to the `html` tag. + ```html + + + ... + ... + + ``` + * @example + * This example shows how to use a jQuery based library of a different name. + * The library name must be available at the top most 'window'. + ```html + + + ... + ... + + ``` + */ +var jq = function() { + if (isDefined(jq.name_)) return jq.name_; + var el; + var i, ii = ngAttrPrefixes.length, prefix, name; + for (i = 0; i < ii; ++i) { + prefix = ngAttrPrefixes[i]; + if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) { + name = el.getAttribute(prefix + 'jq'); + break; + } + } + + return (jq.name_ = name); +}; + +function concat(array1, array2, index) { + return array1.concat(slice.call(array2, index)); +} + +function sliceArgs(args, startIndex) { + return slice.call(args, startIndex || 0); +} + + +/* jshint -W101 */ +/** + * @ngdoc function + * @name angular.bind + * @module ng + * @kind function + * + * @description + * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for + * `fn`). You can supply optional `args` that are prebound to the function. This feature is also + * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as + * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application). + * + * @param {Object} self Context which `fn` should be evaluated in. + * @param {function()} fn Function to be bound. + * @param {...*} args Optional arguments to be prebound to the `fn` function call. + * @returns {function()} Function that wraps the `fn` with all the specified bindings. + */ +/* jshint +W101 */ +function bind(self, fn) { + var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : []; + if (isFunction(fn) && !(fn instanceof RegExp)) { + return curryArgs.length + ? function() { + return arguments.length + ? fn.apply(self, concat(curryArgs, arguments, 0)) + : fn.apply(self, curryArgs); + } + : function() { + return arguments.length + ? fn.apply(self, arguments) + : fn.call(self); + }; + } else { + // in IE, native methods are not functions so they cannot be bound (note: they don't need to be) + return fn; + } +} + + +function toJsonReplacer(key, value) { + var val = value; + + if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') { + val = undefined; + } else if (isWindow(value)) { + val = '$WINDOW'; + } else if (value && document === value) { + val = '$DOCUMENT'; + } else if (isScope(value)) { + val = '$SCOPE'; + } + + return val; +} + + +/** + * @ngdoc function + * @name angular.toJson + * @module ng + * @kind function + * + * @description + * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be + * stripped since angular uses this notation internally. + * + * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON. + * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace. + * If set to an integer, the JSON output will contain that many spaces per indentation. + * @returns {string|undefined} JSON-ified string representing `obj`. + */ +function toJson(obj, pretty) { + if (typeof obj === 'undefined') return undefined; + if (!isNumber(pretty)) { + pretty = pretty ? 2 : null; + } + return JSON.stringify(obj, toJsonReplacer, pretty); +} + + +/** + * @ngdoc function + * @name angular.fromJson + * @module ng + * @kind function + * + * @description + * Deserializes a JSON string. + * + * @param {string} json JSON string to deserialize. + * @returns {Object|Array|string|number} Deserialized JSON string. + */ +function fromJson(json) { + return isString(json) + ? JSON.parse(json) + : json; +} + + +function timezoneToOffset(timezone, fallback) { + var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; + return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; +} + + +function addDateMinutes(date, minutes) { + date = new Date(date.getTime()); + date.setMinutes(date.getMinutes() + minutes); + return date; +} + + +function convertTimezoneToLocal(date, timezone, reverse) { + reverse = reverse ? -1 : 1; + var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset()); + return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset())); +} + + +/** + * @returns {string} Returns the string representation of the element. + */ +function startingTag(element) { + element = jqLite(element).clone(); + try { + // turns out IE does not let you set .html() on elements which + // are not allowed to have children. So we just ignore it. + element.empty(); + } catch (e) {} + var elemHtml = jqLite('
').append(element).html(); + try { + return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) : + elemHtml. + match(/^(<[^>]+>)/)[1]. + replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); }); + } catch (e) { + return lowercase(elemHtml); + } + +} + + +///////////////////////////////////////////////// + +/** + * Tries to decode the URI component without throwing an exception. + * + * @private + * @param str value potential URI component to check. + * @returns {boolean} True if `value` can be decoded + * with the decodeURIComponent function. + */ +function tryDecodeURIComponent(value) { + try { + return decodeURIComponent(value); + } catch (e) { + // Ignore any invalid uri component + } +} + + +/** + * Parses an escaped url query string into key-value pairs. + * @returns {Object.} + */ +function parseKeyValue(/**string*/keyValue) { + var obj = {}, key_value, key; + forEach((keyValue || "").split('&'), function(keyValue) { + if (keyValue) { + key_value = keyValue.replace(/\+/g,'%20').split('='); + key = tryDecodeURIComponent(key_value[0]); + if (isDefined(key)) { + var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true; + if (!hasOwnProperty.call(obj, key)) { + obj[key] = val; + } else if (isArray(obj[key])) { + obj[key].push(val); + } else { + obj[key] = [obj[key],val]; + } + } + } + }); + return obj; +} + +function toKeyValue(obj) { + var parts = []; + forEach(obj, function(value, key) { + if (isArray(value)) { + forEach(value, function(arrayValue) { + parts.push(encodeUriQuery(key, true) + + (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); + }); + } else { + parts.push(encodeUriQuery(key, true) + + (value === true ? '' : '=' + encodeUriQuery(value, true))); + } + }); + return parts.length ? parts.join('&') : ''; +} + + +/** + * We need our custom method because encodeURIComponent is too aggressive and doesn't follow + * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path + * segments: + * segment = *pchar + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * pct-encoded = "%" HEXDIG HEXDIG + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ +function encodeUriSegment(val) { + return encodeUriQuery(val, true). + replace(/%26/gi, '&'). + replace(/%3D/gi, '='). + replace(/%2B/gi, '+'); +} + + +/** + * This method is intended for encoding *key* or *value* parts of query component. We need a custom + * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be + * encoded per http://tools.ietf.org/html/rfc3986: + * query = *( pchar / "/" / "?" ) + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * pct-encoded = "%" HEXDIG HEXDIG + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ +function encodeUriQuery(val, pctEncodeSpaces) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%3B/gi, ';'). + replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); +} + +var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; + +function getNgAttribute(element, ngAttr) { + var attr, i, ii = ngAttrPrefixes.length; + for (i = 0; i < ii; ++i) { + attr = ngAttrPrefixes[i] + ngAttr; + if (isString(attr = element.getAttribute(attr))) { + return attr; + } + } + return null; +} + +/** + * @ngdoc directive + * @name ngApp + * @module ng + * + * @element ANY + * @param {angular.Module} ngApp an optional application + * {@link angular.module module} name to load. + * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be + * created in "strict-di" mode. This means that the application will fail to invoke functions which + * do not use explicit function annotation (and are thus unsuitable for minification), as described + * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in + * tracking down the root of these bugs. + * + * @description + * + * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive + * designates the **root element** of the application and is typically placed near the root element + * of the page - e.g. on the `` or `` tags. + * + * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp` + * found in the document will be used to define the root element to auto-bootstrap as an + * application. To run multiple applications in an HTML document you must manually bootstrap them using + * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other. + * + * You can specify an **AngularJS module** to be used as the root module for the application. This + * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It + * should contain the application code needed or have dependencies on other modules that will + * contain the code. See {@link angular.module} for more information. + * + * In the example below if the `ngApp` directive were not placed on the `html` element then the + * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}` + * would not be resolved to `3`. + * + * `ngApp` is the easiest, and most common way to bootstrap an application. + * + + +
+ I can add: {{a}} + {{b}} = {{ a+b }} +
+
+ + angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) { + $scope.a = 1; + $scope.b = 2; + }); + +
+ * + * Using `ngStrictDi`, you would see something like this: + * + + +
+
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style (see + script.js for details) +

+
+ +
+ Name:
+ Hello, {{name}}! + +

This renders because the controller does not fail to + instantiate, by using explicit annotation style + (see script.js for details) +

+
+ +
+ I can add: {{a}} + {{b}} = {{ a+b }} + +

The controller could not be instantiated, due to relying + on automatic function annotations (which are disabled in + strict mode). As such, the content of this section is not + interpolated, and there should be an error in your web console. +

+
+
+
+ + angular.module('ngAppStrictDemo', []) + // BadController will fail to instantiate, due to relying on automatic function annotation, + // rather than an explicit annotation + .controller('BadController', function($scope) { + $scope.a = 1; + $scope.b = 2; + }) + // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated, + // due to using explicit annotations using the array style and $inject property, respectively. + .controller('GoodController1', ['$scope', function($scope) { + $scope.a = 1; + $scope.b = 2; + }]) + .controller('GoodController2', GoodController2); + function GoodController2($scope) { + $scope.name = "World"; + } + GoodController2.$inject = ['$scope']; + + + div[ng-controller] { + margin-bottom: 1em; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 1px solid; + padding: .5em; + } + div[ng-controller^=Good] { + border-color: #d6e9c6; + background-color: #dff0d8; + color: #3c763d; + } + div[ng-controller^=Bad] { + border-color: #ebccd1; + background-color: #f2dede; + color: #a94442; + margin-bottom: 0; + } + +
+ */ +function angularInit(element, bootstrap) { + var appElement, + module, + config = {}; + + // The element `element` has priority over any other element + forEach(ngAttrPrefixes, function(prefix) { + var name = prefix + 'app'; + + if (!appElement && element.hasAttribute && element.hasAttribute(name)) { + appElement = element; + module = element.getAttribute(name); + } + }); + forEach(ngAttrPrefixes, function(prefix) { + var name = prefix + 'app'; + var candidate; + + if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) { + appElement = candidate; + module = candidate.getAttribute(name); + } + }); + if (appElement) { + config.strictDi = getNgAttribute(appElement, "strict-di") !== null; + bootstrap(appElement, module ? [module] : [], config); + } +} + +/** + * @ngdoc function + * @name angular.bootstrap + * @module ng + * @description + * Use this function to manually start up angular application. + * + * See: {@link guide/bootstrap Bootstrap} + * + * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually. + * They must use {@link ng.directive:ngApp ngApp}. + * + * Angular will detect if it has been loaded into the browser more than once and only allow the + * first loaded script to be bootstrapped and will report a warning to the browser console for + * each of the subsequent scripts. This prevents strange results in applications, where otherwise + * multiple instances of Angular try to work on the DOM. + * + * ```html + * + * + * + *
+ * {{greeting}} + *
+ * + * + * + * + * + * ``` + * + * @param {DOMElement} element DOM element which is the root of angular application. + * @param {Array=} modules an array of modules to load into the application. + * Each item in the array should be the name of a predefined module or a (DI annotated) + * function that will be invoked by the injector as a `config` block. + * See: {@link angular.module modules} + * @param {Object=} config an object for defining configuration options for the application. The + * following keys are supported: + * + * * `strictDi` - disable automatic function annotation for the application. This is meant to + * assist in finding bugs which break minified code. Defaults to `false`. + * + * @returns {auto.$injector} Returns the newly created injector for this app. + */ +function bootstrap(element, modules, config) { + if (!isObject(config)) config = {}; + var defaultConfig = { + strictDi: false + }; + config = extend(defaultConfig, config); + var doBootstrap = function() { + element = jqLite(element); + + if (element.injector()) { + var tag = (element[0] === document) ? 'document' : startingTag(element); + //Encode angle brackets to prevent input from being sanitized to empty string #8683 + throw ngMinErr( + 'btstrpd', + "App Already Bootstrapped with this Element '{0}'", + tag.replace(//,'>')); + } + + modules = modules || []; + modules.unshift(['$provide', function($provide) { + $provide.value('$rootElement', element); + }]); + + if (config.debugInfoEnabled) { + // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`. + modules.push(['$compileProvider', function($compileProvider) { + $compileProvider.debugInfoEnabled(true); + }]); + } + + modules.unshift('ng'); + var injector = createInjector(modules, config.strictDi); + injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', + function bootstrapApply(scope, element, compile, injector) { + scope.$apply(function() { + element.data('$injector', injector); + compile(element)(scope); + }); + }] + ); + return injector; + }; + + var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/; + var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/; + + if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) { + config.debugInfoEnabled = true; + window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, ''); + } + + if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) { + return doBootstrap(); + } + + window.name = window.name.replace(NG_DEFER_BOOTSTRAP, ''); + angular.resumeBootstrap = function(extraModules) { + forEach(extraModules, function(module) { + modules.push(module); + }); + return doBootstrap(); + }; + + if (isFunction(angular.resumeDeferredBootstrap)) { + angular.resumeDeferredBootstrap(); + } +} + +/** + * @ngdoc function + * @name angular.reloadWithDebugInfo + * @module ng + * @description + * Use this function to reload the current application with debug information turned on. + * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`. + * + * See {@link ng.$compileProvider#debugInfoEnabled} for more. + */ +function reloadWithDebugInfo() { + window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name; + window.location.reload(); +} + +/** + * @name angular.getTestability + * @module ng + * @description + * Get the testability service for the instance of Angular on the given + * element. + * @param {DOMElement} element DOM element which is the root of angular application. + */ +function getTestability(rootElement) { + var injector = angular.element(rootElement).injector(); + if (!injector) { + throw ngMinErr('test', + 'no injector found for element argument to getTestability'); + } + return injector.get('$$testability'); +} + +var SNAKE_CASE_REGEXP = /[A-Z]/g; +function snake_case(name, separator) { + separator = separator || '_'; + return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) { + return (pos ? separator : '') + letter.toLowerCase(); + }); +} + +var bindJQueryFired = false; +var skipDestroyOnNextJQueryCleanData; +function bindJQuery() { + var originalCleanData; + + if (bindJQueryFired) { + return; + } + + // bind to jQuery if present; + var jqName = jq(); + jQuery = window.jQuery; // use default jQuery. + if (isDefined(jqName)) { // `ngJq` present + jQuery = jqName === null ? undefined : window[jqName]; // if empty; use jqLite. if not empty, use jQuery specified by `ngJq`. + } + + // Use jQuery if it exists with proper functionality, otherwise default to us. + // Angular 1.2+ requires jQuery 1.7+ for on()/off() support. + // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older + // versions. It will not work for sure with jQuery <1.7, though. + if (jQuery && jQuery.fn.on) { + jqLite = jQuery; + extend(jQuery.fn, { + scope: JQLitePrototype.scope, + isolateScope: JQLitePrototype.isolateScope, + controller: JQLitePrototype.controller, + injector: JQLitePrototype.injector, + inheritedData: JQLitePrototype.inheritedData + }); + + // All nodes removed from the DOM via various jQuery APIs like .remove() + // are passed through jQuery.cleanData. Monkey-patch this method to fire + // the $destroy event on all removed nodes. + originalCleanData = jQuery.cleanData; + jQuery.cleanData = function(elems) { + var events; + if (!skipDestroyOnNextJQueryCleanData) { + for (var i = 0, elem; (elem = elems[i]) != null; i++) { + events = jQuery._data(elem, "events"); + if (events && events.$destroy) { + jQuery(elem).triggerHandler('$destroy'); + } + } + } else { + skipDestroyOnNextJQueryCleanData = false; + } + originalCleanData(elems); + }; + } else { + jqLite = JQLite; + } + + angular.element = jqLite; + + // Prevent double-proxying. + bindJQueryFired = true; +} + +/** + * throw error if the argument is falsy. + */ +function assertArg(arg, name, reason) { + if (!arg) { + throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); + } + return arg; +} + +function assertArgFn(arg, name, acceptArrayAnnotation) { + if (acceptArrayAnnotation && isArray(arg)) { + arg = arg[arg.length - 1]; + } + + assertArg(isFunction(arg), name, 'not a function, got ' + + (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg)); + return arg; +} + +/** + * throw error if the name given is hasOwnProperty + * @param {String} name the name to test + * @param {String} context the context in which the name is used, such as module or directive + */ +function assertNotHasOwnProperty(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context); + } +} + +/** + * Return the value accessible from the object by path. Any undefined traversals are ignored + * @param {Object} obj starting object + * @param {String} path path to traverse + * @param {boolean} [bindFnToScope=true] + * @returns {Object} value as accessible by path + */ +//TODO(misko): this function needs to be removed +function getter(obj, path, bindFnToScope) { + if (!path) return obj; + var keys = path.split('.'); + var key; + var lastInstance = obj; + var len = keys.length; + + for (var i = 0; i < len; i++) { + key = keys[i]; + if (obj) { + obj = (lastInstance = obj)[key]; + } + } + if (!bindFnToScope && isFunction(obj)) { + return bind(lastInstance, obj); + } + return obj; +} + +/** + * Return the DOM siblings between the first and last node in the given array. + * @param {Array} array like object + * @returns {jqLite} jqLite collection containing the nodes + */ +function getBlockNodes(nodes) { + // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original + // collection, otherwise update the original collection. + var node = nodes[0]; + var endNode = nodes[nodes.length - 1]; + var blockNodes = [node]; + + do { + node = node.nextSibling; + if (!node) break; + blockNodes.push(node); + } while (node !== endNode); + + return jqLite(blockNodes); +} + + +/** + * Creates a new object without a prototype. This object is useful for lookup without having to + * guard against prototypically inherited properties via hasOwnProperty. + * + * Related micro-benchmarks: + * - http://jsperf.com/object-create2 + * - http://jsperf.com/proto-map-lookup/2 + * - http://jsperf.com/for-in-vs-object-keys2 + * + * @returns {Object} + */ +function createMap() { + return Object.create(null); +} + +var NODE_TYPE_ELEMENT = 1; +var NODE_TYPE_ATTRIBUTE = 2; +var NODE_TYPE_TEXT = 3; +var NODE_TYPE_COMMENT = 8; +var NODE_TYPE_DOCUMENT = 9; +var NODE_TYPE_DOCUMENT_FRAGMENT = 11; + +/** + * @ngdoc type + * @name angular.Module + * @module ng + * @description + * + * Interface for configuring angular {@link angular.module modules}. + */ + +function setupModuleLoader(window) { + + var $injectorMinErr = minErr('$injector'); + var ngMinErr = minErr('ng'); + + function ensure(obj, name, factory) { + return obj[name] || (obj[name] = factory()); + } + + var angular = ensure(window, 'angular', Object); + + // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap + angular.$$minErr = angular.$$minErr || minErr; + + return ensure(angular, 'module', function() { + /** @type {Object.} */ + var modules = {}; + + /** + * @ngdoc function + * @name angular.module + * @module ng + * @description + * + * The `angular.module` is a global place for creating, registering and retrieving Angular + * modules. + * All modules (angular core or 3rd party) that should be available to an application must be + * registered using this mechanism. + * + * When passed two or more arguments, a new module is created. If passed only one argument, an + * existing module (the name passed as the first argument to `module`) is retrieved. + * + * + * # Module + * + * A module is a collection of services, directives, controllers, filters, and configuration information. + * `angular.module` is used to configure the {@link auto.$injector $injector}. + * + * ```js + * // Create a new module + * var myModule = angular.module('myModule', []); + * + * // register a new service + * myModule.value('appName', 'MyCoolApp'); + * + * // configure existing services inside initialization blocks. + * myModule.config(['$locationProvider', function($locationProvider) { + * // Configure existing providers + * $locationProvider.hashPrefix('!'); + * }]); + * ``` + * + * Then you can create an injector and load your modules like this: + * + * ```js + * var injector = angular.injector(['ng', 'myModule']) + * ``` + * + * However it's more likely that you'll just use + * {@link ng.directive:ngApp ngApp} or + * {@link angular.bootstrap} to simplify this process for you. + * + * @param {!string} name The name of the module to create or retrieve. + * @param {!Array.=} requires If specified then new module is being created. If + * unspecified then the module is being retrieved for further configuration. + * @param {Function=} configFn Optional configuration function for the module. Same as + * {@link angular.Module#config Module#config()}. + * @returns {module} new module with the {@link angular.Module} api. + */ + return function module(name, requires, configFn) { + var assertNotHasOwnProperty = function(name, context) { + if (name === 'hasOwnProperty') { + throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); + } + }; + + assertNotHasOwnProperty(name, 'module'); + if (requires && modules.hasOwnProperty(name)) { + modules[name] = null; + } + return ensure(modules, name, function() { + if (!requires) { + throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " + + "the module name or forgot to load it. If registering a module ensure that you " + + "specify the dependencies as the second argument.", name); + } + + /** @type {!Array.>} */ + var invokeQueue = []; + + /** @type {!Array.} */ + var configBlocks = []; + + /** @type {!Array.} */ + var runBlocks = []; + + var config = invokeLater('$injector', 'invoke', 'push', configBlocks); + + /** @type {angular.Module} */ + var moduleInstance = { + // Private state + _invokeQueue: invokeQueue, + _configBlocks: configBlocks, + _runBlocks: runBlocks, + + /** + * @ngdoc property + * @name angular.Module#requires + * @module ng + * + * @description + * Holds the list of modules which the injector will load before the current module is + * loaded. + */ + requires: requires, + + /** + * @ngdoc property + * @name angular.Module#name + * @module ng + * + * @description + * Name of the module. + */ + name: name, + + + /** + * @ngdoc method + * @name angular.Module#provider + * @module ng + * @param {string} name service name + * @param {Function} providerType Construction function for creating new instance of the + * service. + * @description + * See {@link auto.$provide#provider $provide.provider()}. + */ + provider: invokeLaterAndSetModuleName('$provide', 'provider'), + + /** + * @ngdoc method + * @name angular.Module#factory + * @module ng + * @param {string} name service name + * @param {Function} providerFunction Function for creating new instance of the service. + * @description + * See {@link auto.$provide#factory $provide.factory()}. + */ + factory: invokeLaterAndSetModuleName('$provide', 'factory'), + + /** + * @ngdoc method + * @name angular.Module#service + * @module ng + * @param {string} name service name + * @param {Function} constructor A constructor function that will be instantiated. + * @description + * See {@link auto.$provide#service $provide.service()}. + */ + service: invokeLaterAndSetModuleName('$provide', 'service'), + + /** + * @ngdoc method + * @name angular.Module#value + * @module ng + * @param {string} name service name + * @param {*} object Service instance object. + * @description + * See {@link auto.$provide#value $provide.value()}. + */ + value: invokeLater('$provide', 'value'), + + /** + * @ngdoc method + * @name angular.Module#constant + * @module ng + * @param {string} name constant name + * @param {*} object Constant value. + * @description + * Because the constant are fixed, they get applied before other provide methods. + * See {@link auto.$provide#constant $provide.constant()}. + */ + constant: invokeLater('$provide', 'constant', 'unshift'), + + /** + * @ngdoc method + * @name angular.Module#decorator + * @module ng + * @param {string} The name of the service to decorate. + * @param {Function} This function will be invoked when the service needs to be + * instantiated and should return the decorated service instance. + * @description + * See {@link auto.$provide#decorator $provide.decorator()}. + */ + decorator: invokeLaterAndSetModuleName('$provide', 'decorator'), + + /** + * @ngdoc method + * @name angular.Module#animation + * @module ng + * @param {string} name animation name + * @param {Function} animationFactory Factory function for creating new instance of an + * animation. + * @description + * + * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. + * + * + * Defines an animation hook that can be later used with + * {@link $animate $animate} service and directives that use this service. + * + * ```js + * module.animation('.animation-name', function($inject1, $inject2) { + * return { + * eventName : function(element, done) { + * //code to run the animation + * //once complete, then run done() + * return function cancellationFunction(element) { + * //code to cancel the animation + * } + * } + * } + * }) + * ``` + * + * See {@link ng.$animateProvider#register $animateProvider.register()} and + * {@link ngAnimate ngAnimate module} for more information. + */ + animation: invokeLaterAndSetModuleName('$animateProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#filter + * @module ng + * @param {string} name Filter name - this must be a valid angular expression identifier + * @param {Function} filterFactory Factory function for creating new instance of filter. + * @description + * See {@link ng.$filterProvider#register $filterProvider.register()}. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ */ + filter: invokeLaterAndSetModuleName('$filterProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#controller + * @module ng + * @param {string|Object} name Controller name, or an object map of controllers where the + * keys are the names and the values are the constructors. + * @param {Function} constructor Controller constructor function. + * @description + * See {@link ng.$controllerProvider#register $controllerProvider.register()}. + */ + controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'), + + /** + * @ngdoc method + * @name angular.Module#directive + * @module ng + * @param {string|Object} name Directive name, or an object map of directives where the + * keys are the names and the values are the factories. + * @param {Function} directiveFactory Factory function for creating new instance of + * directives. + * @description + * See {@link ng.$compileProvider#directive $compileProvider.directive()}. + */ + directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), + + /** + * @ngdoc method + * @name angular.Module#config + * @module ng + * @param {Function} configFn Execute this function on module load. Useful for service + * configuration. + * @description + * Use this method to register work which needs to be performed on module loading. + * For more about how to configure services, see + * {@link providers#provider-recipe Provider Recipe}. + */ + config: config, + + /** + * @ngdoc method + * @name angular.Module#run + * @module ng + * @param {Function} initializationFn Execute this function after injector creation. + * Useful for application initialization. + * @description + * Use this method to register work which should be performed when the injector is done + * loading all modules. + */ + run: function(block) { + runBlocks.push(block); + return this; + } + }; + + if (configFn) { + config(configFn); + } + + return moduleInstance; + + /** + * @param {string} provider + * @param {string} method + * @param {String=} insertMethod + * @returns {angular.Module} + */ + function invokeLater(provider, method, insertMethod, queue) { + if (!queue) queue = invokeQueue; + return function() { + queue[insertMethod || 'push']([provider, method, arguments]); + return moduleInstance; + }; + } + + /** + * @param {string} provider + * @param {string} method + * @returns {angular.Module} + */ + function invokeLaterAndSetModuleName(provider, method) { + return function(recipeName, factoryFunction) { + if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name; + invokeQueue.push([provider, method, arguments]); + return moduleInstance; + }; + } + }); + }; + }); + +} + +/* global: toDebugString: true */ + +function serializeObject(obj) { + var seen = []; + + return JSON.stringify(obj, function(key, val) { + val = toJsonReplacer(key, val); + if (isObject(val)) { + + if (seen.indexOf(val) >= 0) return '<>'; + + seen.push(val); + } + return val; + }); +} + +function toDebugString(obj) { + if (typeof obj === 'function') { + return obj.toString().replace(/ \{[\s\S]*$/, ''); + } else if (typeof obj === 'undefined') { + return 'undefined'; + } else if (typeof obj !== 'string') { + return serializeObject(obj); + } + return obj; +} + +/* global angularModule: true, + version: true, + + $LocaleProvider, + $CompileProvider, + + htmlAnchorDirective, + inputDirective, + inputDirective, + formDirective, + scriptDirective, + selectDirective, + styleDirective, + optionDirective, + ngBindDirective, + ngBindHtmlDirective, + ngBindTemplateDirective, + ngClassDirective, + ngClassEvenDirective, + ngClassOddDirective, + ngCspDirective, + ngCloakDirective, + ngControllerDirective, + ngFormDirective, + ngHideDirective, + ngIfDirective, + ngIncludeDirective, + ngIncludeFillContentDirective, + ngInitDirective, + ngNonBindableDirective, + ngPluralizeDirective, + ngRepeatDirective, + ngShowDirective, + ngStyleDirective, + ngSwitchDirective, + ngSwitchWhenDirective, + ngSwitchDefaultDirective, + ngOptionsDirective, + ngTranscludeDirective, + ngModelDirective, + ngListDirective, + ngChangeDirective, + patternDirective, + patternDirective, + requiredDirective, + requiredDirective, + minlengthDirective, + minlengthDirective, + maxlengthDirective, + maxlengthDirective, + ngValueDirective, + ngModelOptionsDirective, + ngAttributeAliasDirectives, + ngEventDirectives, + + $AnchorScrollProvider, + $AnimateProvider, + $$CoreAnimateQueueProvider, + $$CoreAnimateRunnerProvider, + $BrowserProvider, + $CacheFactoryProvider, + $ControllerProvider, + $DocumentProvider, + $ExceptionHandlerProvider, + $FilterProvider, + $InterpolateProvider, + $IntervalProvider, + $$HashMapProvider, + $HttpProvider, + $HttpParamSerializerProvider, + $HttpParamSerializerJQLikeProvider, + $HttpBackendProvider, + $LocationProvider, + $LogProvider, + $ParseProvider, + $RootScopeProvider, + $QProvider, + $$QProvider, + $$SanitizeUriProvider, + $SceProvider, + $SceDelegateProvider, + $SnifferProvider, + $TemplateCacheProvider, + $TemplateRequestProvider, + $$TestabilityProvider, + $TimeoutProvider, + $$RAFProvider, + $WindowProvider, + $$jqLiteProvider, + $$CookieReaderProvider +*/ + + +/** + * @ngdoc object + * @name angular.version + * @module ng + * @description + * An object that contains information about the current AngularJS version. This object has the + * following properties: + * + * - `full` – `{string}` – Full version string, such as "0.9.18". + * - `major` – `{number}` – Major version number, such as "0". + * - `minor` – `{number}` – Minor version number, such as "9". + * - `dot` – `{number}` – Dot version number, such as "18". + * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". + */ +var version = { + full: '1.4.3', // all of these placeholder strings will be replaced by grunt's + major: 1, // package task + minor: 4, + dot: 3, + codeName: 'foam-acceleration' +}; + + +function publishExternalAPI(angular) { + extend(angular, { + 'bootstrap': bootstrap, + 'copy': copy, + 'extend': extend, + 'merge': merge, + 'equals': equals, + 'element': jqLite, + 'forEach': forEach, + 'injector': createInjector, + 'noop': noop, + 'bind': bind, + 'toJson': toJson, + 'fromJson': fromJson, + 'identity': identity, + 'isUndefined': isUndefined, + 'isDefined': isDefined, + 'isString': isString, + 'isFunction': isFunction, + 'isObject': isObject, + 'isNumber': isNumber, + 'isElement': isElement, + 'isArray': isArray, + 'version': version, + 'isDate': isDate, + 'lowercase': lowercase, + 'uppercase': uppercase, + 'callbacks': {counter: 0}, + 'getTestability': getTestability, + '$$minErr': minErr, + '$$csp': csp, + 'reloadWithDebugInfo': reloadWithDebugInfo + }); + + angularModule = setupModuleLoader(window); + try { + angularModule('ngLocale'); + } catch (e) { + angularModule('ngLocale', []).provider('$locale', $LocaleProvider); + } + + angularModule('ng', ['ngLocale'], ['$provide', + function ngModule($provide) { + // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it. + $provide.provider({ + $$sanitizeUri: $$SanitizeUriProvider + }); + $provide.provider('$compile', $CompileProvider). + directive({ + a: htmlAnchorDirective, + input: inputDirective, + textarea: inputDirective, + form: formDirective, + script: scriptDirective, + select: selectDirective, + style: styleDirective, + option: optionDirective, + ngBind: ngBindDirective, + ngBindHtml: ngBindHtmlDirective, + ngBindTemplate: ngBindTemplateDirective, + ngClass: ngClassDirective, + ngClassEven: ngClassEvenDirective, + ngClassOdd: ngClassOddDirective, + ngCloak: ngCloakDirective, + ngController: ngControllerDirective, + ngForm: ngFormDirective, + ngHide: ngHideDirective, + ngIf: ngIfDirective, + ngInclude: ngIncludeDirective, + ngInit: ngInitDirective, + ngNonBindable: ngNonBindableDirective, + ngPluralize: ngPluralizeDirective, + ngRepeat: ngRepeatDirective, + ngShow: ngShowDirective, + ngStyle: ngStyleDirective, + ngSwitch: ngSwitchDirective, + ngSwitchWhen: ngSwitchWhenDirective, + ngSwitchDefault: ngSwitchDefaultDirective, + ngOptions: ngOptionsDirective, + ngTransclude: ngTranscludeDirective, + ngModel: ngModelDirective, + ngList: ngListDirective, + ngChange: ngChangeDirective, + pattern: patternDirective, + ngPattern: patternDirective, + required: requiredDirective, + ngRequired: requiredDirective, + minlength: minlengthDirective, + ngMinlength: minlengthDirective, + maxlength: maxlengthDirective, + ngMaxlength: maxlengthDirective, + ngValue: ngValueDirective, + ngModelOptions: ngModelOptionsDirective + }). + directive({ + ngInclude: ngIncludeFillContentDirective + }). + directive(ngAttributeAliasDirectives). + directive(ngEventDirectives); + $provide.provider({ + $anchorScroll: $AnchorScrollProvider, + $animate: $AnimateProvider, + $$animateQueue: $$CoreAnimateQueueProvider, + $$AnimateRunner: $$CoreAnimateRunnerProvider, + $browser: $BrowserProvider, + $cacheFactory: $CacheFactoryProvider, + $controller: $ControllerProvider, + $document: $DocumentProvider, + $exceptionHandler: $ExceptionHandlerProvider, + $filter: $FilterProvider, + $interpolate: $InterpolateProvider, + $interval: $IntervalProvider, + $http: $HttpProvider, + $httpParamSerializer: $HttpParamSerializerProvider, + $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider, + $httpBackend: $HttpBackendProvider, + $location: $LocationProvider, + $log: $LogProvider, + $parse: $ParseProvider, + $rootScope: $RootScopeProvider, + $q: $QProvider, + $$q: $$QProvider, + $sce: $SceProvider, + $sceDelegate: $SceDelegateProvider, + $sniffer: $SnifferProvider, + $templateCache: $TemplateCacheProvider, + $templateRequest: $TemplateRequestProvider, + $$testability: $$TestabilityProvider, + $timeout: $TimeoutProvider, + $window: $WindowProvider, + $$rAF: $$RAFProvider, + $$jqLite: $$jqLiteProvider, + $$HashMap: $$HashMapProvider, + $$cookieReader: $$CookieReaderProvider + }); + } + ]); +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* global JQLitePrototype: true, + addEventListenerFn: true, + removeEventListenerFn: true, + BOOLEAN_ATTR: true, + ALIASED_ATTR: true, +*/ + +////////////////////////////////// +//JQLite +////////////////////////////////// + +/** + * @ngdoc function + * @name angular.element + * @module ng + * @kind function + * + * @description + * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element. + * + * If jQuery is available, `angular.element` is an alias for the + * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element` + * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." + * + *
jqLite is a tiny, API-compatible subset of jQuery that allows + * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most + * commonly needed functionality with the goal of having a very small footprint.
+ * + * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. + * + *
**Note:** all element references in Angular are always wrapped with jQuery or + * jqLite; they are never raw DOM references.
+ * + * ## Angular's jqLite + * jqLite provides only the following jQuery methods: + * + * - [`addClass()`](http://api.jquery.com/addClass/) + * - [`after()`](http://api.jquery.com/after/) + * - [`append()`](http://api.jquery.com/append/) + * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters + * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData + * - [`children()`](http://api.jquery.com/children/) - Does not support selectors + * - [`clone()`](http://api.jquery.com/clone/) + * - [`contents()`](http://api.jquery.com/contents/) + * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'. + * - [`data()`](http://api.jquery.com/data/) + * - [`detach()`](http://api.jquery.com/detach/) + * - [`empty()`](http://api.jquery.com/empty/) + * - [`eq()`](http://api.jquery.com/eq/) + * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name + * - [`hasClass()`](http://api.jquery.com/hasClass/) + * - [`html()`](http://api.jquery.com/html/) + * - [`next()`](http://api.jquery.com/next/) - Does not support selectors + * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData + * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors + * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors + * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors + * - [`prepend()`](http://api.jquery.com/prepend/) + * - [`prop()`](http://api.jquery.com/prop/) + * - [`ready()`](http://api.jquery.com/ready/) + * - [`remove()`](http://api.jquery.com/remove/) + * - [`removeAttr()`](http://api.jquery.com/removeAttr/) + * - [`removeClass()`](http://api.jquery.com/removeClass/) + * - [`removeData()`](http://api.jquery.com/removeData/) + * - [`replaceWith()`](http://api.jquery.com/replaceWith/) + * - [`text()`](http://api.jquery.com/text/) + * - [`toggleClass()`](http://api.jquery.com/toggleClass/) + * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers. + * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces + * - [`val()`](http://api.jquery.com/val/) + * - [`wrap()`](http://api.jquery.com/wrap/) + * + * ## jQuery/jqLite Extras + * Angular also provides the following additional methods and events to both jQuery and jqLite: + * + * ### Events + * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event + * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM + * element before it is removed. + * + * ### Methods + * - `controller(name)` - retrieves the controller of the current element or its parent. By default + * retrieves controller associated with the `ngController` directive. If `name` is provided as + * camelCase directive name, then the controller for this directive will be retrieved (e.g. + * `'ngModel'`). + * - `injector()` - retrieves the injector of the current element or its parent. + * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current + * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to + * be enabled. + * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the + * current element. This getter should be used only on elements that contain a directive which starts a new isolate + * scope. Calling `scope()` on this element always returns the original non-isolate scope. + * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled. + * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top + * parent element is reached. + * + * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. + * @returns {Object} jQuery object. + */ + +JQLite.expando = 'ng339'; + +var jqCache = JQLite.cache = {}, + jqId = 1, + addEventListenerFn = function(element, type, fn) { + element.addEventListener(type, fn, false); + }, + removeEventListenerFn = function(element, type, fn) { + element.removeEventListener(type, fn, false); + }; + +/* + * !!! This is an undocumented "private" function !!! + */ +JQLite._data = function(node) { + //jQuery always returns an object on cache miss + return this.cache[node[this.expando]] || {}; +}; + +function jqNextId() { return ++jqId; } + + +var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; +var MOZ_HACK_REGEXP = /^moz([A-Z])/; +var MOUSE_EVENT_MAP= { mouseleave: "mouseout", mouseenter: "mouseover"}; +var jqLiteMinErr = minErr('jqLite'); + +/** + * Converts snake_case to camelCase. + * Also there is special case for Moz prefix starting with upper case letter. + * @param name Name to normalize + */ +function camelCase(name) { + return name. + replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { + return offset ? letter.toUpperCase() : letter; + }). + replace(MOZ_HACK_REGEXP, 'Moz$1'); +} + +var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/; +var HTML_REGEXP = /<|&#?\w+;/; +var TAG_NAME_REGEXP = /<([\w:]+)/; +var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi; + +var wrapMap = { + 'option': [1, ''], + + 'thead': [1, '', '
'], + 'col': [2, '', '
'], + 'tr': [2, '', '
'], + 'td': [3, '', '
'], + '_default': [0, "", ""] +}; + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function jqLiteIsTextNode(html) { + return !HTML_REGEXP.test(html); +} + +function jqLiteAcceptsData(node) { + // The window object can accept data but has no nodeType + // Otherwise we are only interested in elements (1) and documents (9) + var nodeType = node.nodeType; + return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT; +} + +function jqLiteHasData(node) { + for (var key in jqCache[node.ng339]) { + return true; + } + return false; +} + +function jqLiteBuildFragment(html, context) { + var tmp, tag, wrap, + fragment = context.createDocumentFragment(), + nodes = [], i; + + if (jqLiteIsTextNode(html)) { + // Convert non-html into a text node + nodes.push(context.createTextNode(html)); + } else { + // Convert html into DOM nodes + tmp = tmp || fragment.appendChild(context.createElement("div")); + tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase(); + wrap = wrapMap[tag] || wrapMap._default; + tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1>") + wrap[2]; + + // Descend through wrappers to the right content + i = wrap[0]; + while (i--) { + tmp = tmp.lastChild; + } + + nodes = concat(nodes, tmp.childNodes); + + tmp = fragment.firstChild; + tmp.textContent = ""; + } + + // Remove wrapper from fragment + fragment.textContent = ""; + fragment.innerHTML = ""; // Clear inner HTML + forEach(nodes, function(node) { + fragment.appendChild(node); + }); + + return fragment; +} + +function jqLiteParseHTML(html, context) { + context = context || document; + var parsed; + + if ((parsed = SINGLE_TAG_REGEXP.exec(html))) { + return [context.createElement(parsed[1])]; + } + + if ((parsed = jqLiteBuildFragment(html, context))) { + return parsed.childNodes; + } + + return []; +} + +///////////////////////////////////////////// +function JQLite(element) { + if (element instanceof JQLite) { + return element; + } + + var argIsString; + + if (isString(element)) { + element = trim(element); + argIsString = true; + } + if (!(this instanceof JQLite)) { + if (argIsString && element.charAt(0) != '<') { + throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); + } + return new JQLite(element); + } + + if (argIsString) { + jqLiteAddNodes(this, jqLiteParseHTML(element)); + } else { + jqLiteAddNodes(this, element); + } +} + +function jqLiteClone(element) { + return element.cloneNode(true); +} + +function jqLiteDealoc(element, onlyDescendants) { + if (!onlyDescendants) jqLiteRemoveData(element); + + if (element.querySelectorAll) { + var descendants = element.querySelectorAll('*'); + for (var i = 0, l = descendants.length; i < l; i++) { + jqLiteRemoveData(descendants[i]); + } + } +} + +function jqLiteOff(element, type, fn, unsupported) { + if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument'); + + var expandoStore = jqLiteExpandoStore(element); + var events = expandoStore && expandoStore.events; + var handle = expandoStore && expandoStore.handle; + + if (!handle) return; //no listeners registered + + if (!type) { + for (type in events) { + if (type !== '$destroy') { + removeEventListenerFn(element, type, handle); + } + delete events[type]; + } + } else { + forEach(type.split(' '), function(type) { + if (isDefined(fn)) { + var listenerFns = events[type]; + arrayRemove(listenerFns || [], fn); + if (listenerFns && listenerFns.length > 0) { + return; + } + } + + removeEventListenerFn(element, type, handle); + delete events[type]; + }); + } +} + +function jqLiteRemoveData(element, name) { + var expandoId = element.ng339; + var expandoStore = expandoId && jqCache[expandoId]; + + if (expandoStore) { + if (name) { + delete expandoStore.data[name]; + return; + } + + if (expandoStore.handle) { + if (expandoStore.events.$destroy) { + expandoStore.handle({}, '$destroy'); + } + jqLiteOff(element); + } + delete jqCache[expandoId]; + element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it + } +} + + +function jqLiteExpandoStore(element, createIfNecessary) { + var expandoId = element.ng339, + expandoStore = expandoId && jqCache[expandoId]; + + if (createIfNecessary && !expandoStore) { + element.ng339 = expandoId = jqNextId(); + expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined}; + } + + return expandoStore; +} + + +function jqLiteData(element, key, value) { + if (jqLiteAcceptsData(element)) { + + var isSimpleSetter = isDefined(value); + var isSimpleGetter = !isSimpleSetter && key && !isObject(key); + var massGetter = !key; + var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter); + var data = expandoStore && expandoStore.data; + + if (isSimpleSetter) { // data('key', value) + data[key] = value; + } else { + if (massGetter) { // data() + return data; + } else { + if (isSimpleGetter) { // data('key') + // don't force creation of expandoStore if it doesn't exist yet + return data && data[key]; + } else { // mass-setter: data({key1: val1, key2: val2}) + extend(data, key); + } + } + } + } +} + +function jqLiteHasClass(element, selector) { + if (!element.getAttribute) return false; + return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " "). + indexOf(" " + selector + " ") > -1); +} + +function jqLiteRemoveClass(element, cssClasses) { + if (cssClasses && element.setAttribute) { + forEach(cssClasses.split(' '), function(cssClass) { + element.setAttribute('class', trim( + (" " + (element.getAttribute('class') || '') + " ") + .replace(/[\n\t]/g, " ") + .replace(" " + trim(cssClass) + " ", " ")) + ); + }); + } +} + +function jqLiteAddClass(element, cssClasses) { + if (cssClasses && element.setAttribute) { + var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ') + .replace(/[\n\t]/g, " "); + + forEach(cssClasses.split(' '), function(cssClass) { + cssClass = trim(cssClass); + if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) { + existingClasses += cssClass + ' '; + } + }); + + element.setAttribute('class', trim(existingClasses)); + } +} + + +function jqLiteAddNodes(root, elements) { + // THIS CODE IS VERY HOT. Don't make changes without benchmarking. + + if (elements) { + + // if a Node (the most common case) + if (elements.nodeType) { + root[root.length++] = elements; + } else { + var length = elements.length; + + // if an Array or NodeList and not a Window + if (typeof length === 'number' && elements.window !== elements) { + if (length) { + for (var i = 0; i < length; i++) { + root[root.length++] = elements[i]; + } + } + } else { + root[root.length++] = elements; + } + } + } +} + + +function jqLiteController(element, name) { + return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller'); +} + +function jqLiteInheritedData(element, name, value) { + // if element is the document object work with the html element instead + // this makes $(document).scope() possible + if (element.nodeType == NODE_TYPE_DOCUMENT) { + element = element.documentElement; + } + var names = isArray(name) ? name : [name]; + + while (element) { + for (var i = 0, ii = names.length; i < ii; i++) { + if ((value = jqLite.data(element, names[i])) !== undefined) return value; + } + + // If dealing with a document fragment node with a host element, and no parent, use the host + // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM + // to lookup parent controllers. + element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); + } +} + +function jqLiteEmpty(element) { + jqLiteDealoc(element, true); + while (element.firstChild) { + element.removeChild(element.firstChild); + } +} + +function jqLiteRemove(element, keepData) { + if (!keepData) jqLiteDealoc(element); + var parent = element.parentNode; + if (parent) parent.removeChild(element); +} + + +function jqLiteDocumentLoaded(action, win) { + win = win || window; + if (win.document.readyState === 'complete') { + // Force the action to be run async for consistent behaviour + // from the action's point of view + // i.e. it will definitely not be in a $apply + win.setTimeout(action); + } else { + // No need to unbind this handler as load is only ever called once + jqLite(win).on('load', action); + } +} + +////////////////////////////////////////// +// Functions which are declared directly. +////////////////////////////////////////// +var JQLitePrototype = JQLite.prototype = { + ready: function(fn) { + var fired = false; + + function trigger() { + if (fired) return; + fired = true; + fn(); + } + + // check if document is already loaded + if (document.readyState === 'complete') { + setTimeout(trigger); + } else { + this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9 + // we can not use jqLite since we are not done loading and jQuery could be loaded later. + // jshint -W064 + JQLite(window).on('load', trigger); // fallback to window.onload for others + // jshint +W064 + } + }, + toString: function() { + var value = []; + forEach(this, function(e) { value.push('' + e);}); + return '[' + value.join(', ') + ']'; + }, + + eq: function(index) { + return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]); + }, + + length: 0, + push: push, + sort: [].sort, + splice: [].splice +}; + +////////////////////////////////////////// +// Functions iterating getter/setters. +// these functions return self on setter and +// value on get. +////////////////////////////////////////// +var BOOLEAN_ATTR = {}; +forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) { + BOOLEAN_ATTR[lowercase(value)] = value; +}); +var BOOLEAN_ELEMENTS = {}; +forEach('input,select,option,textarea,button,form,details'.split(','), function(value) { + BOOLEAN_ELEMENTS[value] = true; +}); +var ALIASED_ATTR = { + 'ngMinlength': 'minlength', + 'ngMaxlength': 'maxlength', + 'ngMin': 'min', + 'ngMax': 'max', + 'ngPattern': 'pattern' +}; + +function getBooleanAttrName(element, name) { + // check dom last since we will most likely fail on name + var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()]; + + // booleanAttr is here twice to minimize DOM access + return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr; +} + +function getAliasedAttrName(element, name) { + var nodeName = element.nodeName; + return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name]; +} + +forEach({ + data: jqLiteData, + removeData: jqLiteRemoveData, + hasData: jqLiteHasData +}, function(fn, name) { + JQLite[name] = fn; +}); + +forEach({ + data: jqLiteData, + inheritedData: jqLiteInheritedData, + + scope: function(element) { + // Can't use jqLiteData here directly so we stay compatible with jQuery! + return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']); + }, + + isolateScope: function(element) { + // Can't use jqLiteData here directly so we stay compatible with jQuery! + return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate'); + }, + + controller: jqLiteController, + + injector: function(element) { + return jqLiteInheritedData(element, '$injector'); + }, + + removeAttr: function(element, name) { + element.removeAttribute(name); + }, + + hasClass: jqLiteHasClass, + + css: function(element, name, value) { + name = camelCase(name); + + if (isDefined(value)) { + element.style[name] = value; + } else { + return element.style[name]; + } + }, + + attr: function(element, name, value) { + var nodeType = element.nodeType; + if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) { + return; + } + var lowercasedName = lowercase(name); + if (BOOLEAN_ATTR[lowercasedName]) { + if (isDefined(value)) { + if (!!value) { + element[name] = true; + element.setAttribute(name, lowercasedName); + } else { + element[name] = false; + element.removeAttribute(lowercasedName); + } + } else { + return (element[name] || + (element.attributes.getNamedItem(name) || noop).specified) + ? lowercasedName + : undefined; + } + } else if (isDefined(value)) { + element.setAttribute(name, value); + } else if (element.getAttribute) { + // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code + // some elements (e.g. Document) don't have get attribute, so return undefined + var ret = element.getAttribute(name, 2); + // normalize non-existing attributes to undefined (as jQuery) + return ret === null ? undefined : ret; + } + }, + + prop: function(element, name, value) { + if (isDefined(value)) { + element[name] = value; + } else { + return element[name]; + } + }, + + text: (function() { + getText.$dv = ''; + return getText; + + function getText(element, value) { + if (isUndefined(value)) { + var nodeType = element.nodeType; + return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : ''; + } + element.textContent = value; + } + })(), + + val: function(element, value) { + if (isUndefined(value)) { + if (element.multiple && nodeName_(element) === 'select') { + var result = []; + forEach(element.options, function(option) { + if (option.selected) { + result.push(option.value || option.text); + } + }); + return result.length === 0 ? null : result; + } + return element.value; + } + element.value = value; + }, + + html: function(element, value) { + if (isUndefined(value)) { + return element.innerHTML; + } + jqLiteDealoc(element, true); + element.innerHTML = value; + }, + + empty: jqLiteEmpty +}, function(fn, name) { + /** + * Properties: writes return selection, reads return first value + */ + JQLite.prototype[name] = function(arg1, arg2) { + var i, key; + var nodeCount = this.length; + + // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it + // in a way that survives minification. + // jqLiteEmpty takes no arguments but is a setter. + if (fn !== jqLiteEmpty && + (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) { + if (isObject(arg1)) { + + // we are a write, but the object properties are the key/values + for (i = 0; i < nodeCount; i++) { + if (fn === jqLiteData) { + // data() takes the whole object in jQuery + fn(this[i], arg1); + } else { + for (key in arg1) { + fn(this[i], key, arg1[key]); + } + } + } + // return self for chaining + return this; + } else { + // we are a read, so read the first child. + // TODO: do we still need this? + var value = fn.$dv; + // Only if we have $dv do we iterate over all, otherwise it is just the first element. + var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount; + for (var j = 0; j < jj; j++) { + var nodeValue = fn(this[j], arg1, arg2); + value = value ? value + nodeValue : nodeValue; + } + return value; + } + } else { + // we are a write, so apply to all children + for (i = 0; i < nodeCount; i++) { + fn(this[i], arg1, arg2); + } + // return self for chaining + return this; + } + }; +}); + +function createEventHandler(element, events) { + var eventHandler = function(event, type) { + // jQuery specific api + event.isDefaultPrevented = function() { + return event.defaultPrevented; + }; + + var eventFns = events[type || event.type]; + var eventFnsLength = eventFns ? eventFns.length : 0; + + if (!eventFnsLength) return; + + if (isUndefined(event.immediatePropagationStopped)) { + var originalStopImmediatePropagation = event.stopImmediatePropagation; + event.stopImmediatePropagation = function() { + event.immediatePropagationStopped = true; + + if (event.stopPropagation) { + event.stopPropagation(); + } + + if (originalStopImmediatePropagation) { + originalStopImmediatePropagation.call(event); + } + }; + } + + event.isImmediatePropagationStopped = function() { + return event.immediatePropagationStopped === true; + }; + + // Copy event handlers in case event handlers array is modified during execution. + if ((eventFnsLength > 1)) { + eventFns = shallowCopy(eventFns); + } + + for (var i = 0; i < eventFnsLength; i++) { + if (!event.isImmediatePropagationStopped()) { + eventFns[i].call(element, event); + } + } + }; + + // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all + // events on `element` + eventHandler.elem = element; + return eventHandler; +} + +////////////////////////////////////////// +// Functions iterating traversal. +// These functions chain results into a single +// selector. +////////////////////////////////////////// +forEach({ + removeData: jqLiteRemoveData, + + on: function jqLiteOn(element, type, fn, unsupported) { + if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters'); + + // Do not add event handlers to non-elements because they will not be cleaned up. + if (!jqLiteAcceptsData(element)) { + return; + } + + var expandoStore = jqLiteExpandoStore(element, true); + var events = expandoStore.events; + var handle = expandoStore.handle; + + if (!handle) { + handle = expandoStore.handle = createEventHandler(element, events); + } + + // http://jsperf.com/string-indexof-vs-split + var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type]; + var i = types.length; + + while (i--) { + type = types[i]; + var eventFns = events[type]; + + if (!eventFns) { + events[type] = []; + + if (type === 'mouseenter' || type === 'mouseleave') { + // Refer to jQuery's implementation of mouseenter & mouseleave + // Read about mouseenter and mouseleave: + // http://www.quirksmode.org/js/events_mouse.html#link8 + + jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) { + var target = this, related = event.relatedTarget; + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if (!related || (related !== target && !target.contains(related))) { + handle(event, type); + } + }); + + } else { + if (type !== '$destroy') { + addEventListenerFn(element, type, handle); + } + } + eventFns = events[type]; + } + eventFns.push(fn); + } + }, + + off: jqLiteOff, + + one: function(element, type, fn) { + element = jqLite(element); + + //add the listener twice so that when it is called + //you can remove the original function and still be + //able to call element.off(ev, fn) normally + element.on(type, function onFn() { + element.off(type, fn); + element.off(type, onFn); + }); + element.on(type, fn); + }, + + replaceWith: function(element, replaceNode) { + var index, parent = element.parentNode; + jqLiteDealoc(element); + forEach(new JQLite(replaceNode), function(node) { + if (index) { + parent.insertBefore(node, index.nextSibling); + } else { + parent.replaceChild(node, element); + } + index = node; + }); + }, + + children: function(element) { + var children = []; + forEach(element.childNodes, function(element) { + if (element.nodeType === NODE_TYPE_ELEMENT) { + children.push(element); + } + }); + return children; + }, + + contents: function(element) { + return element.contentDocument || element.childNodes || []; + }, + + append: function(element, node) { + var nodeType = element.nodeType; + if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return; + + node = new JQLite(node); + + for (var i = 0, ii = node.length; i < ii; i++) { + var child = node[i]; + element.appendChild(child); + } + }, + + prepend: function(element, node) { + if (element.nodeType === NODE_TYPE_ELEMENT) { + var index = element.firstChild; + forEach(new JQLite(node), function(child) { + element.insertBefore(child, index); + }); + } + }, + + wrap: function(element, wrapNode) { + wrapNode = jqLite(wrapNode).eq(0).clone()[0]; + var parent = element.parentNode; + if (parent) { + parent.replaceChild(wrapNode, element); + } + wrapNode.appendChild(element); + }, + + remove: jqLiteRemove, + + detach: function(element) { + jqLiteRemove(element, true); + }, + + after: function(element, newElement) { + var index = element, parent = element.parentNode; + newElement = new JQLite(newElement); + + for (var i = 0, ii = newElement.length; i < ii; i++) { + var node = newElement[i]; + parent.insertBefore(node, index.nextSibling); + index = node; + } + }, + + addClass: jqLiteAddClass, + removeClass: jqLiteRemoveClass, + + toggleClass: function(element, selector, condition) { + if (selector) { + forEach(selector.split(' '), function(className) { + var classCondition = condition; + if (isUndefined(classCondition)) { + classCondition = !jqLiteHasClass(element, className); + } + (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className); + }); + } + }, + + parent: function(element) { + var parent = element.parentNode; + return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null; + }, + + next: function(element) { + return element.nextElementSibling; + }, + + find: function(element, selector) { + if (element.getElementsByTagName) { + return element.getElementsByTagName(selector); + } else { + return []; + } + }, + + clone: jqLiteClone, + + triggerHandler: function(element, event, extraParameters) { + + var dummyEvent, eventFnsCopy, handlerArgs; + var eventName = event.type || event; + var expandoStore = jqLiteExpandoStore(element); + var events = expandoStore && expandoStore.events; + var eventFns = events && events[eventName]; + + if (eventFns) { + // Create a dummy event to pass to the handlers + dummyEvent = { + preventDefault: function() { this.defaultPrevented = true; }, + isDefaultPrevented: function() { return this.defaultPrevented === true; }, + stopImmediatePropagation: function() { this.immediatePropagationStopped = true; }, + isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; }, + stopPropagation: noop, + type: eventName, + target: element + }; + + // If a custom event was provided then extend our dummy event with it + if (event.type) { + dummyEvent = extend(dummyEvent, event); + } + + // Copy event handlers in case event handlers array is modified during execution. + eventFnsCopy = shallowCopy(eventFns); + handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent]; + + forEach(eventFnsCopy, function(fn) { + if (!dummyEvent.isImmediatePropagationStopped()) { + fn.apply(element, handlerArgs); + } + }); + } + } +}, function(fn, name) { + /** + * chaining functions + */ + JQLite.prototype[name] = function(arg1, arg2, arg3) { + var value; + + for (var i = 0, ii = this.length; i < ii; i++) { + if (isUndefined(value)) { + value = fn(this[i], arg1, arg2, arg3); + if (isDefined(value)) { + // any function which returns a value needs to be wrapped + value = jqLite(value); + } + } else { + jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3)); + } + } + return isDefined(value) ? value : this; + }; + + // bind legacy bind/unbind to on/off + JQLite.prototype.bind = JQLite.prototype.on; + JQLite.prototype.unbind = JQLite.prototype.off; +}); + + +// Provider for private $$jqLite service +function $$jqLiteProvider() { + this.$get = function $$jqLite() { + return extend(JQLite, { + hasClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteHasClass(node, classes); + }, + addClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteAddClass(node, classes); + }, + removeClass: function(node, classes) { + if (node.attr) node = node[0]; + return jqLiteRemoveClass(node, classes); + } + }); + }; +} + +/** + * Computes a hash of an 'obj'. + * Hash of a: + * string is string + * number is number as string + * object is either result of calling $$hashKey function on the object or uniquely generated id, + * that is also assigned to the $$hashKey property of the object. + * + * @param obj + * @returns {string} hash string such that the same input will have the same hash string. + * The resulting string key is in 'type:hashKey' format. + */ +function hashKey(obj, nextUidFn) { + var key = obj && obj.$$hashKey; + + if (key) { + if (typeof key === 'function') { + key = obj.$$hashKey(); + } + return key; + } + + var objType = typeof obj; + if (objType == 'function' || (objType == 'object' && obj !== null)) { + key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)(); + } else { + key = objType + ':' + obj; + } + + return key; +} + +/** + * HashMap which can use objects as keys + */ +function HashMap(array, isolatedUid) { + if (isolatedUid) { + var uid = 0; + this.nextUid = function() { + return ++uid; + }; + } + forEach(array, this.put, this); +} +HashMap.prototype = { + /** + * Store key value pair + * @param key key to store can be any type + * @param value value to store can be any type + */ + put: function(key, value) { + this[hashKey(key, this.nextUid)] = value; + }, + + /** + * @param key + * @returns {Object} the value for the key + */ + get: function(key) { + return this[hashKey(key, this.nextUid)]; + }, + + /** + * Remove the key/value pair + * @param key + */ + remove: function(key) { + var value = this[key = hashKey(key, this.nextUid)]; + delete this[key]; + return value; + } +}; + +var $$HashMapProvider = [function() { + this.$get = [function() { + return HashMap; + }]; +}]; + +/** + * @ngdoc function + * @module ng + * @name angular.injector + * @kind function + * + * @description + * Creates an injector object that can be used for retrieving services as well as for + * dependency injection (see {@link guide/di dependency injection}). + * + * @param {Array.} modules A list of module functions or their aliases. See + * {@link angular.module}. The `ng` module must be explicitly added. + * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which + * disallows argument name annotation inference. + * @returns {injector} Injector object. See {@link auto.$injector $injector}. + * + * @example + * Typical usage + * ```js + * // create an injector + * var $injector = angular.injector(['ng']); + * + * // use the injector to kick off your application + * // use the type inference to auto inject arguments, or use implicit injection + * $injector.invoke(function($rootScope, $compile, $document) { + * $compile($document)($rootScope); + * $rootScope.$digest(); + * }); + * ``` + * + * Sometimes you want to get access to the injector of a currently running Angular app + * from outside Angular. Perhaps, you want to inject and compile some markup after the + * application has been bootstrapped. You can do this using the extra `injector()` added + * to JQuery/jqLite elements. See {@link angular.element}. + * + * *This is fairly rare but could be the case if a third party library is injecting the + * markup.* + * + * In the following example a new block of HTML containing a `ng-controller` + * directive is added to the end of the document body by JQuery. We then compile and link + * it into the current AngularJS scope. + * + * ```js + * var $div = $('
{{content.label}}
'); + * $(document.body).append($div); + * + * angular.element(document).injector().invoke(function($compile) { + * var scope = angular.element($div).scope(); + * $compile($div)(scope); + * }); + * ``` + */ + + +/** + * @ngdoc module + * @name auto + * @description + * + * Implicit module which gets automatically added to each {@link auto.$injector $injector}. + */ + +var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; +var FN_ARG_SPLIT = /,/; +var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; +var $injectorMinErr = minErr('$injector'); + +function anonFn(fn) { + // For anonymous functions, showing at the very least the function signature can help in + // debugging. + var fnText = fn.toString().replace(STRIP_COMMENTS, ''), + args = fnText.match(FN_ARGS); + if (args) { + return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')'; + } + return 'fn'; +} + +function annotate(fn, strictDi, name) { + var $inject, + fnText, + argDecl, + last; + + if (typeof fn === 'function') { + if (!($inject = fn.$inject)) { + $inject = []; + if (fn.length) { + if (strictDi) { + if (!isString(name) || !name) { + name = fn.name || anonFn(fn); + } + throw $injectorMinErr('strictdi', + '{0} is not using explicit annotation and cannot be invoked in strict mode', name); + } + fnText = fn.toString().replace(STRIP_COMMENTS, ''); + argDecl = fnText.match(FN_ARGS); + forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) { + arg.replace(FN_ARG, function(all, underscore, name) { + $inject.push(name); + }); + }); + } + fn.$inject = $inject; + } + } else if (isArray(fn)) { + last = fn.length - 1; + assertArgFn(fn[last], 'fn'); + $inject = fn.slice(0, last); + } else { + assertArgFn(fn, 'fn', true); + } + return $inject; +} + +/////////////////////////////////////// + +/** + * @ngdoc service + * @name $injector + * + * @description + * + * `$injector` is used to retrieve object instances as defined by + * {@link auto.$provide provider}, instantiate types, invoke methods, + * and load modules. + * + * The following always holds true: + * + * ```js + * var $injector = angular.injector(); + * expect($injector.get('$injector')).toBe($injector); + * expect($injector.invoke(function($injector) { + * return $injector; + * })).toBe($injector); + * ``` + * + * # Injection Function Annotation + * + * JavaScript does not have annotations, and annotations are needed for dependency injection. The + * following are all valid ways of annotating function with injection arguments and are equivalent. + * + * ```js + * // inferred (only works if code not minified/obfuscated) + * $injector.invoke(function(serviceA){}); + * + * // annotated + * function explicit(serviceA) {}; + * explicit.$inject = ['serviceA']; + * $injector.invoke(explicit); + * + * // inline + * $injector.invoke(['serviceA', function(serviceA){}]); + * ``` + * + * ## Inference + * + * In JavaScript calling `toString()` on a function returns the function definition. The definition + * can then be parsed and the function arguments can be extracted. This method of discovering + * annotations is disallowed when the injector is in strict mode. + * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the + * argument names. + * + * ## `$inject` Annotation + * By adding an `$inject` property onto a function the injection parameters can be specified. + * + * ## Inline + * As an array of injection names, where the last item in the array is the function to call. + */ + +/** + * @ngdoc method + * @name $injector#get + * + * @description + * Return an instance of the service. + * + * @param {string} name The name of the instance to retrieve. + * @param {string=} caller An optional string to provide the origin of the function call for error messages. + * @return {*} The instance. + */ + +/** + * @ngdoc method + * @name $injector#invoke + * + * @description + * Invoke the method and supply the method arguments from the `$injector`. + * + * @param {Function|Array.} fn The injectable function to invoke. Function parameters are + * injected according to the {@link guide/di $inject Annotation} rules. + * @param {Object=} self The `this` for the invoked method. + * @param {Object=} locals Optional object. If preset then any argument names are read from this + * object first, before the `$injector` is consulted. + * @returns {*} the value returned by the invoked `fn` function. + */ + +/** + * @ngdoc method + * @name $injector#has + * + * @description + * Allows the user to query if the particular service exists. + * + * @param {string} name Name of the service to query. + * @returns {boolean} `true` if injector has given service. + */ + +/** + * @ngdoc method + * @name $injector#instantiate + * @description + * Create a new instance of JS type. The method takes a constructor function, invokes the new + * operator, and supplies all of the arguments to the constructor function as specified by the + * constructor annotation. + * + * @param {Function} Type Annotated constructor function. + * @param {Object=} locals Optional object. If preset then any argument names are read from this + * object first, before the `$injector` is consulted. + * @returns {Object} new instance of `Type`. + */ + +/** + * @ngdoc method + * @name $injector#annotate + * + * @description + * Returns an array of service names which the function is requesting for injection. This API is + * used by the injector to determine which services need to be injected into the function when the + * function is invoked. There are three ways in which the function can be annotated with the needed + * dependencies. + * + * # Argument names + * + * The simplest form is to extract the dependencies from the arguments of the function. This is done + * by converting the function into a string using `toString()` method and extracting the argument + * names. + * ```js + * // Given + * function MyController($scope, $route) { + * // ... + * } + * + * // Then + * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); + * ``` + * + * You can disallow this method by using strict injection mode. + * + * This method does not work with code minification / obfuscation. For this reason the following + * annotation strategies are supported. + * + * # The `$inject` property + * + * If a function has an `$inject` property and its value is an array of strings, then the strings + * represent names of services to be injected into the function. + * ```js + * // Given + * var MyController = function(obfuscatedScope, obfuscatedRoute) { + * // ... + * } + * // Define function dependencies + * MyController['$inject'] = ['$scope', '$route']; + * + * // Then + * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); + * ``` + * + * # The array notation + * + * It is often desirable to inline Injected functions and that's when setting the `$inject` property + * is very inconvenient. In these situations using the array notation to specify the dependencies in + * a way that survives minification is a better choice: + * + * ```js + * // We wish to write this (not minification / obfuscation safe) + * injector.invoke(function($compile, $rootScope) { + * // ... + * }); + * + * // We are forced to write break inlining + * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) { + * // ... + * }; + * tmpFn.$inject = ['$compile', '$rootScope']; + * injector.invoke(tmpFn); + * + * // To better support inline function the inline annotation is supported + * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) { + * // ... + * }]); + * + * // Therefore + * expect(injector.annotate( + * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}]) + * ).toEqual(['$compile', '$rootScope']); + * ``` + * + * @param {Function|Array.} fn Function for which dependent service names need to + * be retrieved as described above. + * + * @param {boolean=} [strictDi=false] Disallow argument name annotation inference. + * + * @returns {Array.} The names of the services which the function requires. + */ + + + + +/** + * @ngdoc service + * @name $provide + * + * @description + * + * The {@link auto.$provide $provide} service has a number of methods for registering components + * with the {@link auto.$injector $injector}. Many of these functions are also exposed on + * {@link angular.Module}. + * + * An Angular **service** is a singleton object created by a **service factory**. These **service + * factories** are functions which, in turn, are created by a **service provider**. + * The **service providers** are constructor functions. When instantiated they must contain a + * property called `$get`, which holds the **service factory** function. + * + * When you request a service, the {@link auto.$injector $injector} is responsible for finding the + * correct **service provider**, instantiating it and then calling its `$get` **service factory** + * function to get the instance of the **service**. + * + * Often services have no configuration options and there is no need to add methods to the service + * provider. The provider will be no more than a constructor function with a `$get` property. For + * these cases the {@link auto.$provide $provide} service has additional helper methods to register + * services without specifying a provider. + * + * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the + * {@link auto.$injector $injector} + * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by + * providers and services. + * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by + * services, not providers. + * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`, + * that will be wrapped in a **service provider** object, whose `$get` property will contain the + * given factory function. + * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class` + * that will be wrapped in a **service provider** object, whose `$get` property will instantiate + * a new object using the given constructor function. + * + * See the individual methods for more information and examples. + */ + +/** + * @ngdoc method + * @name $provide#provider + * @description + * + * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions + * are constructor functions, whose instances are responsible for "providing" a factory for a + * service. + * + * Service provider names start with the name of the service they provide followed by `Provider`. + * For example, the {@link ng.$log $log} service has a provider called + * {@link ng.$logProvider $logProvider}. + * + * Service provider objects can have additional methods which allow configuration of the provider + * and its service. Importantly, you can configure what kind of service is created by the `$get` + * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a + * method {@link ng.$logProvider#debugEnabled debugEnabled} + * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the + * console or not. + * + * @param {string} name The name of the instance. NOTE: the provider will be available under `name + + 'Provider'` key. + * @param {(Object|function())} provider If the provider is: + * + * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using + * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created. + * - `Constructor`: a new instance of the provider will be created using + * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`. + * + * @returns {Object} registered provider instance + + * @example + * + * The following example shows how to create a simple event tracking service and register it using + * {@link auto.$provide#provider $provide.provider()}. + * + * ```js + * // Define the eventTracker provider + * function EventTrackerProvider() { + * var trackingUrl = '/track'; + * + * // A provider method for configuring where the tracked events should been saved + * this.setTrackingUrl = function(url) { + * trackingUrl = url; + * }; + * + * // The service factory function + * this.$get = ['$http', function($http) { + * var trackedEvents = {}; + * return { + * // Call this to track an event + * event: function(event) { + * var count = trackedEvents[event] || 0; + * count += 1; + * trackedEvents[event] = count; + * return count; + * }, + * // Call this to save the tracked events to the trackingUrl + * save: function() { + * $http.post(trackingUrl, trackedEvents); + * } + * }; + * }]; + * } + * + * describe('eventTracker', function() { + * var postSpy; + * + * beforeEach(module(function($provide) { + * // Register the eventTracker provider + * $provide.provider('eventTracker', EventTrackerProvider); + * })); + * + * beforeEach(module(function(eventTrackerProvider) { + * // Configure eventTracker provider + * eventTrackerProvider.setTrackingUrl('/custom-track'); + * })); + * + * it('tracks events', inject(function(eventTracker) { + * expect(eventTracker.event('login')).toEqual(1); + * expect(eventTracker.event('login')).toEqual(2); + * })); + * + * it('saves to the tracking url', inject(function(eventTracker, $http) { + * postSpy = spyOn($http, 'post'); + * eventTracker.event('login'); + * eventTracker.save(); + * expect(postSpy).toHaveBeenCalled(); + * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track'); + * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track'); + * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 }); + * })); + * }); + * ``` + */ + +/** + * @ngdoc method + * @name $provide#factory + * @description + * + * Register a **service factory**, which will be called to return the service instance. + * This is short for registering a service where its provider consists of only a `$get` property, + * which is the given service factory function. + * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to + * configure your service in a provider. + * + * @param {string} name The name of the instance. + * @param {Function|Array.} $getFn The injectable $getFn for the instance creation. + * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`. + * @returns {Object} registered provider instance + * + * @example + * Here is an example of registering a service + * ```js + * $provide.factory('ping', ['$http', function($http) { + * return function ping() { + * return $http.send('/ping'); + * }; + * }]); + * ``` + * You would then inject and use this service like this: + * ```js + * someModule.controller('Ctrl', ['ping', function(ping) { + * ping(); + * }]); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#service + * @description + * + * Register a **service constructor**, which will be invoked with `new` to create the service + * instance. + * This is short for registering a service where its provider's `$get` property is the service + * constructor function that will be used to instantiate the service instance. + * + * You should use {@link auto.$provide#service $provide.service(class)} if you define your service + * as a type/class. + * + * @param {string} name The name of the instance. + * @param {Function|Array.} constructor An injectable class (constructor function) + * that will be instantiated. + * @returns {Object} registered provider instance + * + * @example + * Here is an example of registering a service using + * {@link auto.$provide#service $provide.service(class)}. + * ```js + * var Ping = function($http) { + * this.$http = $http; + * }; + * + * Ping.$inject = ['$http']; + * + * Ping.prototype.send = function() { + * return this.$http.get('/ping'); + * }; + * $provide.service('ping', Ping); + * ``` + * You would then inject and use this service like this: + * ```js + * someModule.controller('Ctrl', ['ping', function(ping) { + * ping.send(); + * }]); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#value + * @description + * + * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a + * number, an array, an object or a function. This is short for registering a service where its + * provider's `$get` property is a factory function that takes no arguments and returns the **value + * service**. + * + * Value services are similar to constant services, except that they cannot be injected into a + * module configuration function (see {@link angular.Module#config}) but they can be overridden by + * an Angular + * {@link auto.$provide#decorator decorator}. + * + * @param {string} name The name of the instance. + * @param {*} value The value. + * @returns {Object} registered provider instance + * + * @example + * Here are some examples of creating value services. + * ```js + * $provide.value('ADMIN_USER', 'admin'); + * + * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 }); + * + * $provide.value('halfOf', function(value) { + * return value / 2; + * }); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#constant + * @description + * + * Register a **constant service**, such as a string, a number, an array, an object or a function, + * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be + * injected into a module configuration function (see {@link angular.Module#config}) and it cannot + * be overridden by an Angular {@link auto.$provide#decorator decorator}. + * + * @param {string} name The name of the constant. + * @param {*} value The constant value. + * @returns {Object} registered instance + * + * @example + * Here a some examples of creating constants: + * ```js + * $provide.constant('SHARD_HEIGHT', 306); + * + * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']); + * + * $provide.constant('double', function(value) { + * return value * 2; + * }); + * ``` + */ + + +/** + * @ngdoc method + * @name $provide#decorator + * @description + * + * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator + * intercepts the creation of a service, allowing it to override or modify the behaviour of the + * service. The object returned by the decorator may be the original service, or a new service + * object which replaces or wraps and delegates to the original service. + * + * @param {string} name The name of the service to decorate. + * @param {Function|Array.} decorator This function will be invoked when the service needs to be + * instantiated and should return the decorated service instance. The function is called using + * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable. + * Local injection arguments: + * + * * `$delegate` - The original service instance, which can be monkey patched, configured, + * decorated or delegated to. + * + * @example + * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting + * calls to {@link ng.$log#error $log.warn()}. + * ```js + * $provide.decorator('$log', ['$delegate', function($delegate) { + * $delegate.warn = $delegate.error; + * return $delegate; + * }]); + * ``` + */ + + +function createInjector(modulesToLoad, strictDi) { + strictDi = (strictDi === true); + var INSTANTIATING = {}, + providerSuffix = 'Provider', + path = [], + loadedModules = new HashMap([], true), + providerCache = { + $provide: { + provider: supportObject(provider), + factory: supportObject(factory), + service: supportObject(service), + value: supportObject(value), + constant: supportObject(constant), + decorator: decorator + } + }, + providerInjector = (providerCache.$injector = + createInternalInjector(providerCache, function(serviceName, caller) { + if (angular.isString(caller)) { + path.push(caller); + } + throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- ')); + })), + instanceCache = {}, + instanceInjector = (instanceCache.$injector = + createInternalInjector(instanceCache, function(serviceName, caller) { + var provider = providerInjector.get(serviceName + providerSuffix, caller); + return instanceInjector.invoke(provider.$get, provider, undefined, serviceName); + })); + + + forEach(loadModules(modulesToLoad), function(fn) { if (fn) instanceInjector.invoke(fn); }); + + return instanceInjector; + + //////////////////////////////////// + // $provider + //////////////////////////////////// + + function supportObject(delegate) { + return function(key, value) { + if (isObject(key)) { + forEach(key, reverseParams(delegate)); + } else { + return delegate(key, value); + } + }; + } + + function provider(name, provider_) { + assertNotHasOwnProperty(name, 'service'); + if (isFunction(provider_) || isArray(provider_)) { + provider_ = providerInjector.instantiate(provider_); + } + if (!provider_.$get) { + throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name); + } + return providerCache[name + providerSuffix] = provider_; + } + + function enforceReturnValue(name, factory) { + return function enforcedReturnValue() { + var result = instanceInjector.invoke(factory, this); + if (isUndefined(result)) { + throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name); + } + return result; + }; + } + + function factory(name, factoryFn, enforce) { + return provider(name, { + $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn + }); + } + + function service(name, constructor) { + return factory(name, ['$injector', function($injector) { + return $injector.instantiate(constructor); + }]); + } + + function value(name, val) { return factory(name, valueFn(val), false); } + + function constant(name, value) { + assertNotHasOwnProperty(name, 'constant'); + providerCache[name] = value; + instanceCache[name] = value; + } + + function decorator(serviceName, decorFn) { + var origProvider = providerInjector.get(serviceName + providerSuffix), + orig$get = origProvider.$get; + + origProvider.$get = function() { + var origInstance = instanceInjector.invoke(orig$get, origProvider); + return instanceInjector.invoke(decorFn, null, {$delegate: origInstance}); + }; + } + + //////////////////////////////////// + // Module Loading + //////////////////////////////////// + function loadModules(modulesToLoad) { + var runBlocks = [], moduleFn; + forEach(modulesToLoad, function(module) { + if (loadedModules.get(module)) return; + loadedModules.put(module, true); + + function runInvokeQueue(queue) { + var i, ii; + for (i = 0, ii = queue.length; i < ii; i++) { + var invokeArgs = queue[i], + provider = providerInjector.get(invokeArgs[0]); + + provider[invokeArgs[1]].apply(provider, invokeArgs[2]); + } + } + + try { + if (isString(module)) { + moduleFn = angularModule(module); + runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks); + runInvokeQueue(moduleFn._invokeQueue); + runInvokeQueue(moduleFn._configBlocks); + } else if (isFunction(module)) { + runBlocks.push(providerInjector.invoke(module)); + } else if (isArray(module)) { + runBlocks.push(providerInjector.invoke(module)); + } else { + assertArgFn(module, 'module'); + } + } catch (e) { + if (isArray(module)) { + module = module[module.length - 1]; + } + if (e.message && e.stack && e.stack.indexOf(e.message) == -1) { + // Safari & FF's stack traces don't contain error.message content + // unlike those of Chrome and IE + // So if stack doesn't contain message, we create a new string that contains both. + // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here. + /* jshint -W022 */ + e = e.message + '\n' + e.stack; + } + throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}", + module, e.stack || e.message || e); + } + }); + return runBlocks; + } + + //////////////////////////////////// + // internal Injector + //////////////////////////////////// + + function createInternalInjector(cache, factory) { + + function getService(serviceName, caller) { + if (cache.hasOwnProperty(serviceName)) { + if (cache[serviceName] === INSTANTIATING) { + throw $injectorMinErr('cdep', 'Circular dependency found: {0}', + serviceName + ' <- ' + path.join(' <- ')); + } + return cache[serviceName]; + } else { + try { + path.unshift(serviceName); + cache[serviceName] = INSTANTIATING; + return cache[serviceName] = factory(serviceName, caller); + } catch (err) { + if (cache[serviceName] === INSTANTIATING) { + delete cache[serviceName]; + } + throw err; + } finally { + path.shift(); + } + } + } + + function invoke(fn, self, locals, serviceName) { + if (typeof locals === 'string') { + serviceName = locals; + locals = null; + } + + var args = [], + $inject = createInjector.$$annotate(fn, strictDi, serviceName), + length, i, + key; + + for (i = 0, length = $inject.length; i < length; i++) { + key = $inject[i]; + if (typeof key !== 'string') { + throw $injectorMinErr('itkn', + 'Incorrect injection token! Expected service name as string, got {0}', key); + } + args.push( + locals && locals.hasOwnProperty(key) + ? locals[key] + : getService(key, serviceName) + ); + } + if (isArray(fn)) { + fn = fn[length]; + } + + // http://jsperf.com/angularjs-invoke-apply-vs-switch + // #5388 + return fn.apply(self, args); + } + + function instantiate(Type, locals, serviceName) { + // Check if Type is annotated and use just the given function at n-1 as parameter + // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]); + // Object creation: http://jsperf.com/create-constructor/2 + var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null); + var returnedValue = invoke(Type, instance, locals, serviceName); + + return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance; + } + + return { + invoke: invoke, + instantiate: instantiate, + get: getService, + annotate: createInjector.$$annotate, + has: function(name) { + return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name); + } + }; + } +} + +createInjector.$$annotate = annotate; + +/** + * @ngdoc provider + * @name $anchorScrollProvider + * + * @description + * Use `$anchorScrollProvider` to disable automatic scrolling whenever + * {@link ng.$location#hash $location.hash()} changes. + */ +function $AnchorScrollProvider() { + + var autoScrollingEnabled = true; + + /** + * @ngdoc method + * @name $anchorScrollProvider#disableAutoScrolling + * + * @description + * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to + * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.
+ * Use this method to disable automatic scrolling. + * + * If automatic scrolling is disabled, one must explicitly call + * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the + * current hash. + */ + this.disableAutoScrolling = function() { + autoScrollingEnabled = false; + }; + + /** + * @ngdoc service + * @name $anchorScroll + * @kind function + * @requires $window + * @requires $location + * @requires $rootScope + * + * @description + * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the + * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified + * in the + * [HTML5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document). + * + * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to + * match any anchor whenever it changes. This can be disabled by calling + * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}. + * + * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a + * vertical scroll-offset (either fixed or dynamic). + * + * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of + * {@link ng.$location#hash $location.hash()} will be used. + * + * @property {(number|function|jqLite)} yOffset + * If set, specifies a vertical scroll-offset. This is often useful when there are fixed + * positioned elements at the top of the page, such as navbars, headers etc. + * + * `yOffset` can be specified in various ways: + * - **number**: A fixed number of pixels to be used as offset.

+ * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return + * a number representing the offset (in pixels).

+ * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from + * the top of the page to the element's bottom will be used as offset.
+ * **Note**: The element will be taken into account only as long as its `position` is set to + * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust + * their height and/or positioning according to the viewport's size. + * + *
+ *
+ * In order for `yOffset` to work properly, scrolling should take place on the document's root and + * not some child element. + *
+ * + * @example + + +
+ Go to bottom + You're at the bottom! +
+
+ + angular.module('anchorScrollExample', []) + .controller('ScrollController', ['$scope', '$location', '$anchorScroll', + function ($scope, $location, $anchorScroll) { + $scope.gotoBottom = function() { + // set the location.hash to the id of + // the element you wish to scroll to. + $location.hash('bottom'); + + // call $anchorScroll() + $anchorScroll(); + }; + }]); + + + #scrollArea { + height: 280px; + overflow: auto; + } + + #bottom { + display: block; + margin-top: 2000px; + } + +
+ * + *
+ * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value). + * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details. + * + * @example + + + +
+ Anchor {{x}} of 5 +
+
+ + angular.module('anchorScrollOffsetExample', []) + .run(['$anchorScroll', function($anchorScroll) { + $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels + }]) + .controller('headerCtrl', ['$anchorScroll', '$location', '$scope', + function ($anchorScroll, $location, $scope) { + $scope.gotoAnchor = function(x) { + var newHash = 'anchor' + x; + if ($location.hash() !== newHash) { + // set the $location.hash to `newHash` and + // $anchorScroll will automatically scroll to it + $location.hash('anchor' + x); + } else { + // call $anchorScroll() explicitly, + // since $location.hash hasn't changed + $anchorScroll(); + } + }; + } + ]); + + + body { + padding-top: 50px; + } + + .anchor { + border: 2px dashed DarkOrchid; + padding: 10px 10px 200px 10px; + } + + .fixed-header { + background-color: rgba(0, 0, 0, 0.2); + height: 50px; + position: fixed; + top: 0; left: 0; right: 0; + } + + .fixed-header > a { + display: inline-block; + margin: 5px 15px; + } + +
+ */ + this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) { + var document = $window.document; + + // Helper function to get first anchor from a NodeList + // (using `Array#some()` instead of `angular#forEach()` since it's more performant + // and working in all supported browsers.) + function getFirstAnchor(list) { + var result = null; + Array.prototype.some.call(list, function(element) { + if (nodeName_(element) === 'a') { + result = element; + return true; + } + }); + return result; + } + + function getYOffset() { + + var offset = scroll.yOffset; + + if (isFunction(offset)) { + offset = offset(); + } else if (isElement(offset)) { + var elem = offset[0]; + var style = $window.getComputedStyle(elem); + if (style.position !== 'fixed') { + offset = 0; + } else { + offset = elem.getBoundingClientRect().bottom; + } + } else if (!isNumber(offset)) { + offset = 0; + } + + return offset; + } + + function scrollTo(elem) { + if (elem) { + elem.scrollIntoView(); + + var offset = getYOffset(); + + if (offset) { + // `offset` is the number of pixels we should scroll UP in order to align `elem` properly. + // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the + // top of the viewport. + // + // IF the number of pixels from the top of `elem` to the end of the page's content is less + // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some + // way down the page. + // + // This is often the case for elements near the bottom of the page. + // + // In such cases we do not need to scroll the whole `offset` up, just the difference between + // the top of the element and the offset, which is enough to align the top of `elem` at the + // desired position. + var elemTop = elem.getBoundingClientRect().top; + $window.scrollBy(0, elemTop - offset); + } + } else { + $window.scrollTo(0, 0); + } + } + + function scroll(hash) { + hash = isString(hash) ? hash : $location.hash(); + var elm; + + // empty hash, scroll to the top of the page + if (!hash) scrollTo(null); + + // element with given id + else if ((elm = document.getElementById(hash))) scrollTo(elm); + + // first anchor with given name :-D + else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm); + + // no element and hash == 'top', scroll to the top of the page + else if (hash === 'top') scrollTo(null); + } + + // does not scroll when user clicks on anchor link that is currently on + // (no url change, no $location.hash() change), browser native does scroll + if (autoScrollingEnabled) { + $rootScope.$watch(function autoScrollWatch() {return $location.hash();}, + function autoScrollWatchAction(newVal, oldVal) { + // skip the initial scroll if $location.hash is empty + if (newVal === oldVal && newVal === '') return; + + jqLiteDocumentLoaded(function() { + $rootScope.$evalAsync(scroll); + }); + }); + } + + return scroll; + }]; +} + +var $animateMinErr = minErr('$animate'); +var ELEMENT_NODE = 1; +var NG_ANIMATE_CLASSNAME = 'ng-animate'; + +function mergeClasses(a,b) { + if (!a && !b) return ''; + if (!a) return b; + if (!b) return a; + if (isArray(a)) a = a.join(' '); + if (isArray(b)) b = b.join(' '); + return a + ' ' + b; +} + +function extractElementNode(element) { + for (var i = 0; i < element.length; i++) { + var elm = element[i]; + if (elm.nodeType === ELEMENT_NODE) { + return elm; + } + } +} + +function splitClasses(classes) { + if (isString(classes)) { + classes = classes.split(' '); + } + + // Use createMap() to prevent class assumptions involving property names in + // Object.prototype + var obj = createMap(); + forEach(classes, function(klass) { + // sometimes the split leaves empty string values + // incase extra spaces were applied to the options + if (klass.length) { + obj[klass] = true; + } + }); + return obj; +} + +// if any other type of options value besides an Object value is +// passed into the $animate.method() animation then this helper code +// will be run which will ignore it. While this patch is not the +// greatest solution to this, a lot of existing plugins depend on +// $animate to either call the callback (< 1.2) or return a promise +// that can be changed. This helper function ensures that the options +// are wiped clean incase a callback function is provided. +function prepareAnimateOptions(options) { + return isObject(options) + ? options + : {}; +} + +var $$CoreAnimateRunnerProvider = function() { + this.$get = ['$q', '$$rAF', function($q, $$rAF) { + function AnimateRunner() {} + AnimateRunner.all = noop; + AnimateRunner.chain = noop; + AnimateRunner.prototype = { + end: noop, + cancel: noop, + resume: noop, + pause: noop, + complete: noop, + then: function(pass, fail) { + return $q(function(resolve) { + $$rAF(function() { + resolve(); + }); + }).then(pass, fail); + } + }; + return AnimateRunner; + }]; +}; + +// this is prefixed with Core since it conflicts with +// the animateQueueProvider defined in ngAnimate/animateQueue.js +var $$CoreAnimateQueueProvider = function() { + var postDigestQueue = new HashMap(); + var postDigestElements = []; + + this.$get = ['$$AnimateRunner', '$rootScope', + function($$AnimateRunner, $rootScope) { + return { + enabled: noop, + on: noop, + off: noop, + pin: noop, + + push: function(element, event, options, domOperation) { + domOperation && domOperation(); + + options = options || {}; + options.from && element.css(options.from); + options.to && element.css(options.to); + + if (options.addClass || options.removeClass) { + addRemoveClassesPostDigest(element, options.addClass, options.removeClass); + } + + return new $$AnimateRunner(); // jshint ignore:line + } + }; + + function addRemoveClassesPostDigest(element, add, remove) { + var data = postDigestQueue.get(element); + var classVal; + + if (!data) { + postDigestQueue.put(element, data = {}); + postDigestElements.push(element); + } + + if (add) { + forEach(add.split(' '), function(className) { + if (className) { + data[className] = true; + } + }); + } + + if (remove) { + forEach(remove.split(' '), function(className) { + if (className) { + data[className] = false; + } + }); + } + + if (postDigestElements.length > 1) return; + + $rootScope.$$postDigest(function() { + forEach(postDigestElements, function(element) { + var data = postDigestQueue.get(element); + if (data) { + var existing = splitClasses(element.attr('class')); + var toAdd = ''; + var toRemove = ''; + forEach(data, function(status, className) { + var hasClass = !!existing[className]; + if (status !== hasClass) { + if (status) { + toAdd += (toAdd.length ? ' ' : '') + className; + } else { + toRemove += (toRemove.length ? ' ' : '') + className; + } + } + }); + + forEach(element, function(elm) { + toAdd && jqLiteAddClass(elm, toAdd); + toRemove && jqLiteRemoveClass(elm, toRemove); + }); + postDigestQueue.remove(element); + } + }); + + postDigestElements.length = 0; + }); + } + }]; +}; + +/** + * @ngdoc provider + * @name $animateProvider + * + * @description + * Default implementation of $animate that doesn't perform any animations, instead just + * synchronously performs DOM updates and resolves the returned runner promise. + * + * In order to enable animations the `ngAnimate` module has to be loaded. + * + * To see the functional implementation check out `src/ngAnimate/animate.js`. + */ +var $AnimateProvider = ['$provide', function($provide) { + var provider = this; + + this.$$registeredAnimations = Object.create(null); + + /** + * @ngdoc method + * @name $animateProvider#register + * + * @description + * Registers a new injectable animation factory function. The factory function produces the + * animation object which contains callback functions for each event that is expected to be + * animated. + * + * * `eventFn`: `function(element, ... , doneFunction, options)` + * The element to animate, the `doneFunction` and the options fed into the animation. Depending + * on the type of animation additional arguments will be injected into the animation function. The + * list below explains the function signatures for the different animation methods: + * + * - setClass: function(element, addedClasses, removedClasses, doneFunction, options) + * - addClass: function(element, addedClasses, doneFunction, options) + * - removeClass: function(element, removedClasses, doneFunction, options) + * - enter, leave, move: function(element, doneFunction, options) + * - animate: function(element, fromStyles, toStyles, doneFunction, options) + * + * Make sure to trigger the `doneFunction` once the animation is fully complete. + * + * ```js + * return { + * //enter, leave, move signature + * eventFn : function(element, done, options) { + * //code to run the animation + * //once complete, then run done() + * return function endFunction(wasCancelled) { + * //code to cancel the animation + * } + * } + * } + * ``` + * + * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to). + * @param {Function} factory The factory function that will be executed to return the animation + * object. + */ + this.register = function(name, factory) { + if (name && name.charAt(0) !== '.') { + throw $animateMinErr('notcsel', "Expecting class selector starting with '.' got '{0}'.", name); + } + + var key = name + '-animation'; + provider.$$registeredAnimations[name.substr(1)] = key; + $provide.factory(key, factory); + }; + + /** + * @ngdoc method + * @name $animateProvider#classNameFilter + * + * @description + * Sets and/or returns the CSS class regular expression that is checked when performing + * an animation. Upon bootstrap the classNameFilter value is not set at all and will + * therefore enable $animate to attempt to perform an animation on any element that is triggered. + * When setting the `classNameFilter` value, animations will only be performed on elements + * that successfully match the filter expression. This in turn can boost performance + * for low-powered devices as well as applications containing a lot of structural operations. + * @param {RegExp=} expression The className expression which will be checked against all animations + * @return {RegExp} The current CSS className expression value. If null then there is no expression value + */ + this.classNameFilter = function(expression) { + if (arguments.length === 1) { + this.$$classNameFilter = (expression instanceof RegExp) ? expression : null; + if (this.$$classNameFilter) { + var reservedRegex = new RegExp("(\\s+|\\/)" + NG_ANIMATE_CLASSNAME + "(\\s+|\\/)"); + if (reservedRegex.test(this.$$classNameFilter.toString())) { + throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME); + + } + } + } + return this.$$classNameFilter; + }; + + this.$get = ['$$animateQueue', function($$animateQueue) { + function domInsert(element, parentElement, afterElement) { + // if for some reason the previous element was removed + // from the dom sometime before this code runs then let's + // just stick to using the parent element as the anchor + if (afterElement) { + var afterNode = extractElementNode(afterElement); + if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) { + afterElement = null; + } + } + afterElement ? afterElement.after(element) : parentElement.prepend(element); + } + + /** + * @ngdoc service + * @name $animate + * @description The $animate service exposes a series of DOM utility methods that provide support + * for animation hooks. The default behavior is the application of DOM operations, however, + * when an animation is detected (and animations are enabled), $animate will do the heavy lifting + * to ensure that animation runs with the triggered DOM operation. + * + * By default $animate doesn't trigger an animations. This is because the `ngAnimate` module isn't + * included and only when it is active then the animation hooks that `$animate` triggers will be + * functional. Once active then all structural `ng-` directives will trigger animations as they perform + * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`, + * `ngShow`, `ngHide` and `ngMessages` also provide support for animations. + * + * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives. + * + * To learn more about enabling animation support, click here to visit the + * {@link ngAnimate ngAnimate module page}. + */ + return { + // we don't call it directly since non-existant arguments may + // be interpreted as null within the sub enabled function + + /** + * + * @ngdoc method + * @name $animate#on + * @kind function + * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) + * has fired on the given element or among any of its children. Once the listener is fired, the provided callback + * is fired with the following params: + * + * ```js + * $animate.on('enter', container, + * function callback(element, phase) { + * // cool we detected an enter animation within the container + * } + * ); + * ``` + * + * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) + * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself + * as well as among its children + * @param {Function} callback the callback function that will be fired when the listener is triggered + * + * The arguments present in the callback function are: + * * `element` - The captured DOM element that the animation was fired on. + * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends). + */ + on: $$animateQueue.on, + + /** + * + * @ngdoc method + * @name $animate#off + * @kind function + * @description Deregisters an event listener based on the event which has been associated with the provided element. This method + * can be used in three different ways depending on the arguments: + * + * ```js + * // remove all the animation event listeners listening for `enter` + * $animate.off('enter'); + * + * // remove all the animation event listeners listening for `enter` on the given element and its children + * $animate.off('enter', container); + * + * // remove the event listener function provided by `listenerFn` that is set + * // to listen for `enter` on the given `element` as well as its children + * $animate.off('enter', container, callback); + * ``` + * + * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...) + * @param {DOMElement=} container the container element the event listener was placed on + * @param {Function=} callback the callback function that was registered as the listener + */ + off: $$animateQueue.off, + + /** + * @ngdoc method + * @name $animate#pin + * @kind function + * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists + * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the + * element despite being outside the realm of the application or within another application. Say for example if the application + * was bootstrapped on an element that is somewhere inside of the `` tag, but we wanted to allow for an element to be situated + * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind + * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association. + * + * Note that this feature is only active when the `ngAnimate` module is used. + * + * @param {DOMElement} element the external element that will be pinned + * @param {DOMElement} parentElement the host parent element that will be associated with the external element + */ + pin: $$animateQueue.pin, + + /** + * + * @ngdoc method + * @name $animate#enabled + * @kind function + * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This + * function can be called in four ways: + * + * ```js + * // returns true or false + * $animate.enabled(); + * + * // changes the enabled state for all animations + * $animate.enabled(false); + * $animate.enabled(true); + * + * // returns true or false if animations are enabled for an element + * $animate.enabled(element); + * + * // changes the enabled state for an element and its children + * $animate.enabled(element, true); + * $animate.enabled(element, false); + * ``` + * + * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state + * @param {boolean=} enabled whether or not the animations will be enabled for the element + * + * @return {boolean} whether or not animations are enabled + */ + enabled: $$animateQueue.enabled, + + /** + * @ngdoc method + * @name $animate#cancel + * @kind function + * @description Cancels the provided animation. + * + * @param {Promise} animationPromise The animation promise that is returned when an animation is started. + */ + cancel: function(runner) { + runner.end && runner.end(); + }, + + /** + * + * @ngdoc method + * @name $animate#enter + * @kind function + * @description Inserts the element into the DOM either after the `after` element (if provided) or + * as the first child within the `parent` element and then triggers an animation. + * A promise is returned that will be resolved during the next digest once the animation + * has completed. + * + * @param {DOMElement} element the element which will be inserted into the DOM + * @param {DOMElement} parent the parent element which will append the element as + * a child (so long as the after element is not present) + * @param {DOMElement=} after the sibling element after which the element will be appended + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + enter: function(element, parent, after, options) { + parent = parent && jqLite(parent); + after = after && jqLite(after); + parent = parent || after.parent(); + domInsert(element, parent, after); + return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options)); + }, + + /** + * + * @ngdoc method + * @name $animate#move + * @kind function + * @description Inserts (moves) the element into its new position in the DOM either after + * the `after` element (if provided) or as the first child within the `parent` element + * and then triggers an animation. A promise is returned that will be resolved + * during the next digest once the animation has completed. + * + * @param {DOMElement} element the element which will be moved into the new DOM position + * @param {DOMElement} parent the parent element which will append the element as + * a child (so long as the after element is not present) + * @param {DOMElement=} after the sibling element after which the element will be appended + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + move: function(element, parent, after, options) { + parent = parent && jqLite(parent); + after = after && jqLite(after); + parent = parent || after.parent(); + domInsert(element, parent, after); + return $$animateQueue.push(element, 'move', prepareAnimateOptions(options)); + }, + + /** + * @ngdoc method + * @name $animate#leave + * @kind function + * @description Triggers an animation and then removes the element from the DOM. + * When the function is called a promise is returned that will be resolved during the next + * digest once the animation has completed. + * + * @param {DOMElement} element the element which will be removed from the DOM + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + leave: function(element, options) { + return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() { + element.remove(); + }); + }, + + /** + * @ngdoc method + * @name $animate#addClass + * @kind function + * + * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon + * execution, the addClass operation will only be handled after the next digest and it will not trigger an + * animation if element already contains the CSS class or if the class is removed at a later step. + * Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + addClass: function(element, className, options) { + options = prepareAnimateOptions(options); + options.addClass = mergeClasses(options.addclass, className); + return $$animateQueue.push(element, 'addClass', options); + }, + + /** + * @ngdoc method + * @name $animate#removeClass + * @kind function + * + * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon + * execution, the removeClass operation will only be handled after the next digest and it will not trigger an + * animation if element does not contain the CSS class or if the class is added at a later step. + * Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + removeClass: function(element, className, options) { + options = prepareAnimateOptions(options); + options.removeClass = mergeClasses(options.removeClass, className); + return $$animateQueue.push(element, 'removeClass', options); + }, + + /** + * @ngdoc method + * @name $animate#setClass + * @kind function + * + * @description Performs both the addition and removal of a CSS classes on an element and (during the process) + * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and + * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has + * passed. Note that class-based animations are treated differently compared to structural animations + * (like enter, move and leave) since the CSS classes may be added/removed at different points + * depending if CSS or JavaScript animations are used. + * + * @param {DOMElement} element the element which the CSS classes will be applied to + * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces) + * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces) + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + setClass: function(element, add, remove, options) { + options = prepareAnimateOptions(options); + options.addClass = mergeClasses(options.addClass, add); + options.removeClass = mergeClasses(options.removeClass, remove); + return $$animateQueue.push(element, 'setClass', options); + }, + + /** + * @ngdoc method + * @name $animate#animate + * @kind function + * + * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element. + * If any detected CSS transition, keyframe or JavaScript matches the provided className value then the animation will take + * on the provided styles. For example, if a transition animation is set for the given className then the provided from and + * to styles will be applied alongside the given transition. If a JavaScript animation is detected then the provided styles + * will be given in as function paramters into the `animate` method (or as apart of the `options` parameter). + * + * @param {DOMElement} element the element which the CSS styles will be applied to + * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation. + * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation. + * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If + * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element. + * (Note that if no animation is detected then this value will not be appplied to the element.) + * @param {object=} options an optional collection of options/styles that will be applied to the element + * + * @return {Promise} the animation callback promise + */ + animate: function(element, from, to, className, options) { + options = prepareAnimateOptions(options); + options.from = options.from ? extend(options.from, from) : from; + options.to = options.to ? extend(options.to, to) : to; + + className = className || 'ng-inline-animate'; + options.tempClasses = mergeClasses(options.tempClasses, className); + return $$animateQueue.push(element, 'animate', options); + } + }; + }]; +}]; + +function $$AsyncCallbackProvider() { + this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) { + return $$rAF.supported + ? function(fn) { return $$rAF(fn); } + : function(fn) { + return $timeout(fn, 0, false); + }; + }]; +} + +/* global stripHash: true */ + +/** + * ! This is a private undocumented service ! + * + * @name $browser + * @requires $log + * @description + * This object has two goals: + * + * - hide all the global state in the browser caused by the window object + * - abstract away all the browser specific features and inconsistencies + * + * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser` + * service, which can be used for convenient testing of the application without the interaction with + * the real browser apis. + */ +/** + * @param {object} window The global window object. + * @param {object} document jQuery wrapped document. + * @param {object} $log window.console or an object with the same interface. + * @param {object} $sniffer $sniffer service + */ +function Browser(window, document, $log, $sniffer) { + var self = this, + rawDocument = document[0], + location = window.location, + history = window.history, + setTimeout = window.setTimeout, + clearTimeout = window.clearTimeout, + pendingDeferIds = {}; + + self.isMock = false; + + var outstandingRequestCount = 0; + var outstandingRequestCallbacks = []; + + // TODO(vojta): remove this temporary api + self.$$completeOutstandingRequest = completeOutstandingRequest; + self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; }; + + /** + * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` + * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed. + */ + function completeOutstandingRequest(fn) { + try { + fn.apply(null, sliceArgs(arguments, 1)); + } finally { + outstandingRequestCount--; + if (outstandingRequestCount === 0) { + while (outstandingRequestCallbacks.length) { + try { + outstandingRequestCallbacks.pop()(); + } catch (e) { + $log.error(e); + } + } + } + } + } + + function getHash(url) { + var index = url.indexOf('#'); + return index === -1 ? '' : url.substr(index); + } + + /** + * @private + * Note: this method is used only by scenario runner + * TODO(vojta): prefix this method with $$ ? + * @param {function()} callback Function that will be called when no outstanding request + */ + self.notifyWhenNoOutstandingRequests = function(callback) { + if (outstandingRequestCount === 0) { + callback(); + } else { + outstandingRequestCallbacks.push(callback); + } + }; + + ////////////////////////////////////////////////////////////// + // URL API + ////////////////////////////////////////////////////////////// + + var cachedState, lastHistoryState, + lastBrowserUrl = location.href, + baseElement = document.find('base'), + reloadLocation = null; + + cacheState(); + lastHistoryState = cachedState; + + /** + * @name $browser#url + * + * @description + * GETTER: + * Without any argument, this method just returns current value of location.href. + * + * SETTER: + * With at least one argument, this method sets url to new value. + * If html5 history api supported, pushState/replaceState is used, otherwise + * location.href/location.replace is used. + * Returns its own instance to allow chaining + * + * NOTE: this api is intended for use only by the $location service. Please use the + * {@link ng.$location $location service} to change url. + * + * @param {string} url New url (when used as setter) + * @param {boolean=} replace Should new url replace current history record? + * @param {object=} state object to use with pushState/replaceState + */ + self.url = function(url, replace, state) { + // In modern browsers `history.state` is `null` by default; treating it separately + // from `undefined` would cause `$browser.url('/foo')` to change `history.state` + // to undefined via `pushState`. Instead, let's change `undefined` to `null` here. + if (isUndefined(state)) { + state = null; + } + + // Android Browser BFCache causes location, history reference to become stale. + if (location !== window.location) location = window.location; + if (history !== window.history) history = window.history; + + // setter + if (url) { + var sameState = lastHistoryState === state; + + // Don't change anything if previous and current URLs and states match. This also prevents + // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode. + // See https://github.com/angular/angular.js/commit/ffb2701 + if (lastBrowserUrl === url && (!$sniffer.history || sameState)) { + return self; + } + var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url); + lastBrowserUrl = url; + lastHistoryState = state; + // Don't use history API if only the hash changed + // due to a bug in IE10/IE11 which leads + // to not firing a `hashchange` nor `popstate` event + // in some cases (see #9143). + if ($sniffer.history && (!sameBase || !sameState)) { + history[replace ? 'replaceState' : 'pushState'](state, '', url); + cacheState(); + // Do the assignment again so that those two variables are referentially identical. + lastHistoryState = cachedState; + } else { + if (!sameBase || reloadLocation) { + reloadLocation = url; + } + if (replace) { + location.replace(url); + } else if (!sameBase) { + location.href = url; + } else { + location.hash = getHash(url); + } + } + return self; + // getter + } else { + // - reloadLocation is needed as browsers don't allow to read out + // the new location.href if a reload happened. + // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172 + return reloadLocation || location.href.replace(/%27/g,"'"); + } + }; + + /** + * @name $browser#state + * + * @description + * This method is a getter. + * + * Return history.state or null if history.state is undefined. + * + * @returns {object} state + */ + self.state = function() { + return cachedState; + }; + + var urlChangeListeners = [], + urlChangeInit = false; + + function cacheStateAndFireUrlChange() { + cacheState(); + fireUrlChange(); + } + + function getCurrentState() { + try { + return history.state; + } catch (e) { + // MSIE can reportedly throw when there is no state (UNCONFIRMED). + } + } + + // This variable should be used *only* inside the cacheState function. + var lastCachedState = null; + function cacheState() { + // This should be the only place in $browser where `history.state` is read. + cachedState = getCurrentState(); + cachedState = isUndefined(cachedState) ? null : cachedState; + + // Prevent callbacks fo fire twice if both hashchange & popstate were fired. + if (equals(cachedState, lastCachedState)) { + cachedState = lastCachedState; + } + lastCachedState = cachedState; + } + + function fireUrlChange() { + if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) { + return; + } + + lastBrowserUrl = self.url(); + lastHistoryState = cachedState; + forEach(urlChangeListeners, function(listener) { + listener(self.url(), cachedState); + }); + } + + /** + * @name $browser#onUrlChange + * + * @description + * Register callback function that will be called, when url changes. + * + * It's only called when the url is changed from outside of angular: + * - user types different url into address bar + * - user clicks on history (forward/back) button + * - user clicks on a link + * + * It's not called when url is changed by $browser.url() method + * + * The listener gets called with new url as parameter. + * + * NOTE: this api is intended for use only by the $location service. Please use the + * {@link ng.$location $location service} to monitor url changes in angular apps. + * + * @param {function(string)} listener Listener function to be called when url changes. + * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous. + */ + self.onUrlChange = function(callback) { + // TODO(vojta): refactor to use node's syntax for events + if (!urlChangeInit) { + // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera) + // don't fire popstate when user change the address bar and don't fire hashchange when url + // changed by push/replaceState + + // html5 history api - popstate event + if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange); + // hashchange event + jqLite(window).on('hashchange', cacheStateAndFireUrlChange); + + urlChangeInit = true; + } + + urlChangeListeners.push(callback); + return callback; + }; + + /** + * @private + * Remove popstate and hashchange handler from window. + * + * NOTE: this api is intended for use only by $rootScope. + */ + self.$$applicationDestroyed = function() { + jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange); + }; + + /** + * Checks whether the url has changed outside of Angular. + * Needs to be exported to be able to check for changes that have been done in sync, + * as hashchange/popstate events fire in async. + */ + self.$$checkUrlChange = fireUrlChange; + + ////////////////////////////////////////////////////////////// + // Misc API + ////////////////////////////////////////////////////////////// + + /** + * @name $browser#baseHref + * + * @description + * Returns current + * (always relative - without domain) + * + * @returns {string} The current base href + */ + self.baseHref = function() { + var href = baseElement.attr('href'); + return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : ''; + }; + + /** + * @name $browser#defer + * @param {function()} fn A function, who's execution should be deferred. + * @param {number=} [delay=0] of milliseconds to defer the function execution. + * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`. + * + * @description + * Executes a fn asynchronously via `setTimeout(fn, delay)`. + * + * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using + * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed + * via `$browser.defer.flush()`. + * + */ + self.defer = function(fn, delay) { + var timeoutId; + outstandingRequestCount++; + timeoutId = setTimeout(function() { + delete pendingDeferIds[timeoutId]; + completeOutstandingRequest(fn); + }, delay || 0); + pendingDeferIds[timeoutId] = true; + return timeoutId; + }; + + + /** + * @name $browser#defer.cancel + * + * @description + * Cancels a deferred task identified with `deferId`. + * + * @param {*} deferId Token returned by the `$browser.defer` function. + * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully + * canceled. + */ + self.defer.cancel = function(deferId) { + if (pendingDeferIds[deferId]) { + delete pendingDeferIds[deferId]; + clearTimeout(deferId); + completeOutstandingRequest(noop); + return true; + } + return false; + }; + +} + +function $BrowserProvider() { + this.$get = ['$window', '$log', '$sniffer', '$document', + function($window, $log, $sniffer, $document) { + return new Browser($window, $document, $log, $sniffer); + }]; +} + +/** + * @ngdoc service + * @name $cacheFactory + * + * @description + * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to + * them. + * + * ```js + * + * var cache = $cacheFactory('cacheId'); + * expect($cacheFactory.get('cacheId')).toBe(cache); + * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined(); + * + * cache.put("key", "value"); + * cache.put("another key", "another value"); + * + * // We've specified no options on creation + * expect(cache.info()).toEqual({id: 'cacheId', size: 2}); + * + * ``` + * + * + * @param {string} cacheId Name or id of the newly created cache. + * @param {object=} options Options object that specifies the cache behavior. Properties: + * + * - `{number=}` `capacity` — turns the cache into LRU cache. + * + * @returns {object} Newly created cache object with the following set of methods: + * + * - `{object}` `info()` — Returns id, size, and options of cache. + * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns + * it. + * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss. + * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache. + * - `{void}` `removeAll()` — Removes all cached values. + * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory. + * + * @example + + +
+ + + + +

Cached Values

+
+ + : + +
+ +

Cache Info

+
+ + : + +
+
+
+ + angular.module('cacheExampleApp', []). + controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) { + $scope.keys = []; + $scope.cache = $cacheFactory('cacheId'); + $scope.put = function(key, value) { + if ($scope.cache.get(key) === undefined) { + $scope.keys.push(key); + } + $scope.cache.put(key, value === undefined ? null : value); + }; + }]); + + + p { + margin: 10px 0 3px; + } + +
+ */ +function $CacheFactoryProvider() { + + this.$get = function() { + var caches = {}; + + function cacheFactory(cacheId, options) { + if (cacheId in caches) { + throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId); + } + + var size = 0, + stats = extend({}, options, {id: cacheId}), + data = {}, + capacity = (options && options.capacity) || Number.MAX_VALUE, + lruHash = {}, + freshEnd = null, + staleEnd = null; + + /** + * @ngdoc type + * @name $cacheFactory.Cache + * + * @description + * A cache object used to store and retrieve data, primarily used by + * {@link $http $http} and the {@link ng.directive:script script} directive to cache + * templates and other data. + * + * ```js + * angular.module('superCache') + * .factory('superCache', ['$cacheFactory', function($cacheFactory) { + * return $cacheFactory('super-cache'); + * }]); + * ``` + * + * Example test: + * + * ```js + * it('should behave like a cache', inject(function(superCache) { + * superCache.put('key', 'value'); + * superCache.put('another key', 'another value'); + * + * expect(superCache.info()).toEqual({ + * id: 'super-cache', + * size: 2 + * }); + * + * superCache.remove('another key'); + * expect(superCache.get('another key')).toBeUndefined(); + * + * superCache.removeAll(); + * expect(superCache.info()).toEqual({ + * id: 'super-cache', + * size: 0 + * }); + * })); + * ``` + */ + return caches[cacheId] = { + + /** + * @ngdoc method + * @name $cacheFactory.Cache#put + * @kind function + * + * @description + * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be + * retrieved later, and incrementing the size of the cache if the key was not already + * present in the cache. If behaving like an LRU cache, it will also remove stale + * entries from the set. + * + * It will not insert undefined values into the cache. + * + * @param {string} key the key under which the cached data is stored. + * @param {*} value the value to store alongside the key. If it is undefined, the key + * will not be stored. + * @returns {*} the value stored. + */ + put: function(key, value) { + if (isUndefined(value)) return; + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key] || (lruHash[key] = {key: key}); + + refresh(lruEntry); + } + + if (!(key in data)) size++; + data[key] = value; + + if (size > capacity) { + this.remove(staleEnd.key); + } + + return value; + }, + + /** + * @ngdoc method + * @name $cacheFactory.Cache#get + * @kind function + * + * @description + * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object. + * + * @param {string} key the key of the data to be retrieved + * @returns {*} the value stored. + */ + get: function(key) { + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key]; + + if (!lruEntry) return; + + refresh(lruEntry); + } + + return data[key]; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#remove + * @kind function + * + * @description + * Removes an entry from the {@link $cacheFactory.Cache Cache} object. + * + * @param {string} key the key of the entry to be removed + */ + remove: function(key) { + if (capacity < Number.MAX_VALUE) { + var lruEntry = lruHash[key]; + + if (!lruEntry) return; + + if (lruEntry == freshEnd) freshEnd = lruEntry.p; + if (lruEntry == staleEnd) staleEnd = lruEntry.n; + link(lruEntry.n,lruEntry.p); + + delete lruHash[key]; + } + + delete data[key]; + size--; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#removeAll + * @kind function + * + * @description + * Clears the cache object of any entries. + */ + removeAll: function() { + data = {}; + size = 0; + lruHash = {}; + freshEnd = staleEnd = null; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#destroy + * @kind function + * + * @description + * Destroys the {@link $cacheFactory.Cache Cache} object entirely, + * removing it from the {@link $cacheFactory $cacheFactory} set. + */ + destroy: function() { + data = null; + stats = null; + lruHash = null; + delete caches[cacheId]; + }, + + + /** + * @ngdoc method + * @name $cacheFactory.Cache#info + * @kind function + * + * @description + * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}. + * + * @returns {object} an object with the following properties: + *
    + *
  • **id**: the id of the cache instance
  • + *
  • **size**: the number of entries kept in the cache instance
  • + *
  • **...**: any additional properties from the options object when creating the + * cache.
  • + *
+ */ + info: function() { + return extend({}, stats, {size: size}); + } + }; + + + /** + * makes the `entry` the freshEnd of the LRU linked list + */ + function refresh(entry) { + if (entry != freshEnd) { + if (!staleEnd) { + staleEnd = entry; + } else if (staleEnd == entry) { + staleEnd = entry.n; + } + + link(entry.n, entry.p); + link(entry, freshEnd); + freshEnd = entry; + freshEnd.n = null; + } + } + + + /** + * bidirectionally links two entries of the LRU linked list + */ + function link(nextEntry, prevEntry) { + if (nextEntry != prevEntry) { + if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify + if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify + } + } + } + + + /** + * @ngdoc method + * @name $cacheFactory#info + * + * @description + * Get information about all the caches that have been created + * + * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info` + */ + cacheFactory.info = function() { + var info = {}; + forEach(caches, function(cache, cacheId) { + info[cacheId] = cache.info(); + }); + return info; + }; + + + /** + * @ngdoc method + * @name $cacheFactory#get + * + * @description + * Get access to a cache object by the `cacheId` used when it was created. + * + * @param {string} cacheId Name or id of a cache to access. + * @returns {object} Cache object identified by the cacheId or undefined if no such cache. + */ + cacheFactory.get = function(cacheId) { + return caches[cacheId]; + }; + + + return cacheFactory; + }; +} + +/** + * @ngdoc service + * @name $templateCache + * + * @description + * The first time a template is used, it is loaded in the template cache for quick retrieval. You + * can load templates directly into the cache in a `script` tag, or by consuming the + * `$templateCache` service directly. + * + * Adding via the `script` tag: + * + * ```html + * + * ``` + * + * **Note:** the `script` tag containing the template does not need to be included in the `head` of + * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE, + * element with ng-app attribute), otherwise the template will be ignored. + * + * Adding via the `$templateCache` service: + * + * ```js + * var myApp = angular.module('myApp', []); + * myApp.run(function($templateCache) { + * $templateCache.put('templateId.html', 'This is the content of the template'); + * }); + * ``` + * + * To retrieve the template later, simply use it in your HTML: + * ```html + *
+ * ``` + * + * or get it via Javascript: + * ```js + * $templateCache.get('templateId.html') + * ``` + * + * See {@link ng.$cacheFactory $cacheFactory}. + * + */ +function $TemplateCacheProvider() { + this.$get = ['$cacheFactory', function($cacheFactory) { + return $cacheFactory('templates'); + }]; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE! + * + * DOM-related variables: + * + * - "node" - DOM Node + * - "element" - DOM Element or Node + * - "$node" or "$element" - jqLite-wrapped node or element + * + * + * Compiler related stuff: + * + * - "linkFn" - linking fn of a single directive + * - "nodeLinkFn" - function that aggregates all linking fns for a particular node + * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node + * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList) + */ + + +/** + * @ngdoc service + * @name $compile + * @kind function + * + * @description + * Compiles an HTML string or DOM into a template and produces a template function, which + * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together. + * + * The compilation is a process of walking the DOM tree and matching DOM elements to + * {@link ng.$compileProvider#directive directives}. + * + *
+ * **Note:** This document is an in-depth reference of all directive options. + * For a gentle introduction to directives with examples of common use cases, + * see the {@link guide/directive directive guide}. + *
+ * + * ## Comprehensive Directive API + * + * There are many different options for a directive. + * + * The difference resides in the return value of the factory function. + * You can either return a "Directive Definition Object" (see below) that defines the directive properties, + * or just the `postLink` function (all other properties will have the default values). + * + *
+ * **Best Practice:** It's recommended to use the "directive definition object" form. + *
+ * + * Here's an example directive declared with a Directive Definition Object: + * + * ```js + * var myModule = angular.module(...); + * + * myModule.directive('directiveName', function factory(injectables) { + * var directiveDefinitionObject = { + * priority: 0, + * template: '
', // or // function(tElement, tAttrs) { ... }, + * // or + * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... }, + * transclude: false, + * restrict: 'A', + * templateNamespace: 'html', + * scope: false, + * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... }, + * controllerAs: 'stringIdentifier', + * bindToController: false, + * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'], + * compile: function compile(tElement, tAttrs, transclude) { + * return { + * pre: function preLink(scope, iElement, iAttrs, controller) { ... }, + * post: function postLink(scope, iElement, iAttrs, controller) { ... } + * } + * // or + * // return function postLink( ... ) { ... } + * }, + * // or + * // link: { + * // pre: function preLink(scope, iElement, iAttrs, controller) { ... }, + * // post: function postLink(scope, iElement, iAttrs, controller) { ... } + * // } + * // or + * // link: function postLink( ... ) { ... } + * }; + * return directiveDefinitionObject; + * }); + * ``` + * + *
+ * **Note:** Any unspecified options will use the default value. You can see the default values below. + *
+ * + * Therefore the above can be simplified as: + * + * ```js + * var myModule = angular.module(...); + * + * myModule.directive('directiveName', function factory(injectables) { + * var directiveDefinitionObject = { + * link: function postLink(scope, iElement, iAttrs) { ... } + * }; + * return directiveDefinitionObject; + * // or + * // return function postLink(scope, iElement, iAttrs) { ... } + * }); + * ``` + * + * + * + * ### Directive Definition Object + * + * The directive definition object provides instructions to the {@link ng.$compile + * compiler}. The attributes are: + * + * #### `multiElement` + * When this property is set to true, the HTML compiler will collect DOM nodes between + * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them + * together as the directive elements. It is recommended that this feature be used on directives + * which are not strictly behavioural (such as {@link ngClick}), and which + * do not manipulate or replace child nodes (such as {@link ngInclude}). + * + * #### `priority` + * When there are multiple directives defined on a single DOM element, sometimes it + * is necessary to specify the order in which the directives are applied. The `priority` is used + * to sort the directives before their `compile` functions get called. Priority is defined as a + * number. Directives with greater numerical `priority` are compiled first. Pre-link functions + * are also run in priority order, but post-link functions are run in reverse order. The order + * of directives with the same priority is undefined. The default priority is `0`. + * + * #### `terminal` + * If set to true then the current `priority` will be the last set of directives + * which will execute (any directives at the current priority will still execute + * as the order of execution on same `priority` is undefined). Note that expressions + * and other directives used in the directive's template will also be excluded from execution. + * + * #### `scope` + * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the + * same element request a new scope, only one new scope is created. The new scope rule does not + * apply for the root of the template since the root of the template always gets a new scope. + * + * **If set to `{}` (object hash),** then a new "isolate" scope is created. The 'isolate' scope differs from + * normal scope in that it does not prototypically inherit from the parent scope. This is useful + * when creating reusable components, which should not accidentally read or modify data in the + * parent scope. + * + * The 'isolate' scope takes an object hash which defines a set of local scope properties + * derived from the parent scope. These local properties are useful for aliasing values for + * templates. Locals definition is a hash of local scope property to its source: + * + * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is + * always a string since DOM attributes are strings. If no `attr` name is specified then the + * attribute name is assumed to be the same as the local name. + * Given `` and widget definition + * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect + * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the + * `localName` property on the widget scope. The `name` is read from the parent scope (not + * component scope). + * + * * `=` or `=attr` - set up bi-directional binding between a local scope property and the + * parent scope property of name defined via the value of the `attr` attribute. If no `attr` + * name is specified then the attribute name is assumed to be the same as the local name. + * Given `` and widget definition of + * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the + * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected + * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent + * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You + * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional. If + * you want to shallow watch for changes (i.e. $watchCollection instead of $watch) you can use + * `=*` or `=*attr` (`=*?` or `=*?attr` if the property is optional). + * + * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope. + * If no `attr` name is specified then the attribute name is assumed to be the same as the + * local name. Given `` and widget definition of + * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to + * a function wrapper for the `count = count + value` expression. Often it's desirable to + * pass data from the isolated scope via an expression to the parent scope, this can be + * done by passing a map of local variable names and values into the expression wrapper fn. + * For example, if the expression is `increment(amount)` then we can specify the amount value + * by calling the `localFn` as `localFn({amount: 22})`. + * + * + * #### `bindToController` + * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will + * allow a component to have its properties bound to the controller, rather than to scope. When the controller + * is instantiated, the initial values of the isolate scope bindings are already available. + * + * #### `controller` + * Controller constructor function. The controller is instantiated before the + * pre-linking phase and it is shared with other directives (see + * `require` attribute). This allows the directives to communicate with each other and augment + * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals: + * + * * `$scope` - Current scope associated with the element + * * `$element` - Current element + * * `$attrs` - Current attributes object for the element + * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope: + * `function([scope], cloneLinkingFn, futureParentElement)`. + * * `scope`: optional argument to override the scope. + * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content. + * * `futureParentElement`: + * * defines the parent to which the `cloneLinkingFn` will add the cloned elements. + * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`. + * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements) + * and when the `cloneLinkinFn` is passed, + * as those elements need to created and cloned in a special way when they are defined outside their + * usual containers (e.g. like ``). + * * See also the `directive.templateNamespace` property. + * + * + * #### `require` + * Require another directive and inject its controller as the fourth argument to the linking function. The + * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the + * injected argument will be an array in corresponding order. If no such directive can be + * found, or if the directive does not have a controller, then an error is raised (unless no link function + * is specified, in which case error checking is skipped). The name can be prefixed with: + * + * * (no prefix) - Locate the required controller on the current element. Throw an error if not found. + * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found. + * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found. + * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found. + * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass + * `null` to the `link` fn if not found. + * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass + * `null` to the `link` fn if not found. + * + * + * #### `controllerAs` + * Identifier name for a reference to the controller in the directive's scope. + * This allows the controller to be referenced from the directive template. The directive + * needs to define a scope for this configuration to be used. Useful in the case when + * directive is used as component. + * + * + * #### `restrict` + * String of subset of `EACM` which restricts the directive to a specific directive + * declaration style. If omitted, the defaults (elements and attributes) are used. + * + * * `E` - Element name (default): `` + * * `A` - Attribute (default): `
` + * * `C` - Class: `
` + * * `M` - Comment: `` + * + * + * #### `templateNamespace` + * String representing the document type used by the markup in the template. + * AngularJS needs this information as those elements need to be created and cloned + * in a special way when they are defined outside their usual containers like `` and ``. + * + * * `html` - All root nodes in the template are HTML. Root nodes may also be + * top-level elements such as `` or ``. + * * `svg` - The root nodes in the template are SVG elements (excluding ``). + * * `math` - The root nodes in the template are MathML elements (excluding ``). + * + * If no `templateNamespace` is specified, then the namespace is considered to be `html`. + * + * #### `template` + * HTML markup that may: + * * Replace the contents of the directive's element (default). + * * Replace the directive's element itself (if `replace` is true - DEPRECATED). + * * Wrap the contents of the directive's element (if `transclude` is true). + * + * Value may be: + * + * * A string. For example `
{{delete_str}}
`. + * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` + * function api below) and returns a string value. + * + * + * #### `templateUrl` + * This is similar to `template` but the template is loaded from the specified URL, asynchronously. + * + * Because template loading is asynchronous the compiler will suspend compilation of directives on that element + * for later when the template has been resolved. In the meantime it will continue to compile and link + * sibling and parent elements as though this element had not contained any directives. + * + * The compiler does not suspend the entire compilation to wait for templates to be loaded because this + * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the + * case when only one deeply nested directive has `templateUrl`. + * + * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache} + * + * You can specify `templateUrl` as a string representing the URL or as a function which takes two + * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns + * a string value representing the url. In either case, the template URL is passed through {@link + * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}. + * + * + * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0) + * specify what the template should replace. Defaults to `false`. + * + * * `true` - the template will replace the directive's element. + * * `false` - the template will replace the contents of the directive's element. + * + * The replacement process migrates all of the attributes / classes from the old element to the new + * one. See the {@link guide/directive#template-expanding-directive + * Directives Guide} for an example. + * + * There are very few scenarios where element replacement is required for the application function, + * the main one being reusable custom components that are used within SVG contexts + * (because SVG doesn't work with custom elements in the DOM tree). + * + * #### `transclude` + * Extract the contents of the element where the directive appears and make it available to the directive. + * The contents are compiled and provided to the directive as a **transclusion function**. See the + * {@link $compile#transclusion Transclusion} section below. + * + * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the + * directive's element or the entire element: + * + * * `true` - transclude the content (i.e. the child nodes) of the directive's element. + * * `'element'` - transclude the whole of the directive's element including any directives on this + * element that defined at a lower priority than this directive. When used, the `template` + * property is ignored. + * + * + * #### `compile` + * + * ```js + * function compile(tElement, tAttrs, transclude) { ... } + * ``` + * + * The compile function deals with transforming the template DOM. Since most directives do not do + * template transformation, it is not used often. The compile function takes the following arguments: + * + * * `tElement` - template element - The element where the directive has been declared. It is + * safe to do template transformation on the element and child elements only. + * + * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared + * between all directive compile functions. + * + * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)` + * + *
+ * **Note:** The template instance and the link instance may be different objects if the template has + * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that + * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration + * should be done in a linking function rather than in a compile function. + *
+ + *
+ * **Note:** The compile function cannot handle directives that recursively use themselves in their + * own templates or compile functions. Compiling these directives results in an infinite loop and a + * stack overflow errors. + * + * This can be avoided by manually using $compile in the postLink function to imperatively compile + * a directive's template instead of relying on automatic template compilation via `template` or + * `templateUrl` declaration or manual compilation inside the compile function. + *
+ * + *
+ * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it + * e.g. does not know about the right outer scope. Please use the transclude function that is passed + * to the link function instead. + *
+ + * A compile function can have a return value which can be either a function or an object. + * + * * returning a (post-link) function - is equivalent to registering the linking function via the + * `link` property of the config object when the compile function is empty. + * + * * returning an object with function(s) registered via `pre` and `post` properties - allows you to + * control when a linking function should be called during the linking phase. See info about + * pre-linking and post-linking functions below. + * + * + * #### `link` + * This property is used only if the `compile` property is not defined. + * + * ```js + * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... } + * ``` + * + * The link function is responsible for registering DOM listeners as well as updating the DOM. It is + * executed after the template has been cloned. This is where most of the directive logic will be + * put. + * + * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the + * directive for registering {@link ng.$rootScope.Scope#$watch watches}. + * + * * `iElement` - instance element - The element where the directive is to be used. It is safe to + * manipulate the children of the element only in `postLink` function since the children have + * already been linked. + * + * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared + * between all directive linking functions. + * + * * `controller` - the directive's required controller instance(s) - Instances are shared + * among all directives, which allows the directives to use the controllers as a communication + * channel. The exact value depends on the directive's `require` property: + * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one + * * `string`: the controller instance + * * `array`: array of controller instances + * + * If a required controller cannot be found, and it is optional, the instance is `null`, + * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown. + * + * Note that you can also require the directive's own controller - it will be made available like + * like any other controller. + * + * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope. + * This is the same as the `$transclude` + * parameter of directive controllers, see there for details. + * `function([scope], cloneLinkingFn, futureParentElement)`. + * + * #### Pre-linking function + * + * Executed before the child elements are linked. Not safe to do DOM transformation since the + * compiler linking function will fail to locate the correct elements for linking. + * + * #### Post-linking function + * + * Executed after the child elements are linked. + * + * Note that child elements that contain `templateUrl` directives will not have been compiled + * and linked since they are waiting for their template to load asynchronously and their own + * compilation and linking has been suspended until that occurs. + * + * It is safe to do DOM transformation in the post-linking function on elements that are not waiting + * for their async templates to be resolved. + * + * + * ### Transclusion + * + * Transclusion is the process of extracting a collection of DOM element from one part of the DOM and + * copying them to another part of the DOM, while maintaining their connection to the original AngularJS + * scope from where they were taken. + * + * Transclusion is used (often with {@link ngTransclude}) to insert the + * original contents of a directive's element into a specified place in the template of the directive. + * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded + * content has access to the properties on the scope from which it was taken, even if the directive + * has isolated scope. + * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}. + * + * This makes it possible for the widget to have private state for its template, while the transcluded + * content has access to its originating scope. + * + *
+ * **Note:** When testing an element transclude directive you must not place the directive at the root of the + * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives + * Testing Transclusion Directives}. + *
+ * + * #### Transclusion Functions + * + * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion + * function** to the directive's `link` function and `controller`. This transclusion function is a special + * **linking function** that will return the compiled contents linked to a new transclusion scope. + * + *
+ * If you are just using {@link ngTransclude} then you don't need to worry about this function, since + * ngTransclude will deal with it for us. + *
+ * + * If you want to manually control the insertion and removal of the transcluded content in your directive + * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery + * object that contains the compiled DOM, which is linked to the correct transclusion scope. + * + * When you call a transclusion function you can pass in a **clone attach function**. This function accepts + * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded + * content and the `scope` is the newly created transclusion scope, to which the clone is bound. + * + *
+ * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function + * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope. + *
+ * + * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone + * attach function**: + * + * ```js + * var transcludedContent, transclusionScope; + * + * $transclude(function(clone, scope) { + * element.append(clone); + * transcludedContent = clone; + * transclusionScope = scope; + * }); + * ``` + * + * Later, if you want to remove the transcluded content from your DOM then you should also destroy the + * associated transclusion scope: + * + * ```js + * transcludedContent.remove(); + * transclusionScope.$destroy(); + * ``` + * + *
+ * **Best Practice**: if you intend to add and remove transcluded content manually in your directive + * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it), + * then you are also responsible for calling `$destroy` on the transclusion scope. + *
+ * + * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat} + * automatically destroy their transluded clones as necessary so you do not need to worry about this if + * you are simply using {@link ngTransclude} to inject the transclusion into your directive. + * + * + * #### Transclusion Scopes + * + * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion + * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed + * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it + * was taken. + * + * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look + * like this: + * + * ```html + *
+ *
+ *
+ *
+ *
+ *
+ * ``` + * + * The `$parent` scope hierarchy will look like this: + * + * ``` + * - $rootScope + * - isolate + * - transclusion + * ``` + * + * but the scopes will inherit prototypically from different scopes to their `$parent`. + * + * ``` + * - $rootScope + * - transclusion + * - isolate + * ``` + * + * + * ### Attributes + * + * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the + * `link()` or `compile()` functions. It has a variety of uses. + * + * accessing *Normalized attribute names:* + * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. + * the attributes object allows for normalized access to + * the attributes. + * + * * *Directive inter-communication:* All directives share the same instance of the attributes + * object which allows the directives to use the attributes object as inter directive + * communication. + * + * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object + * allowing other directives to read the interpolated value. + * + * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes + * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also + * the only way to easily get the actual value because during the linking phase the interpolation + * hasn't been evaluated yet and so the value is at this time set to `undefined`. + * + * ```js + * function linkingFn(scope, elm, attrs, ctrl) { + * // get the attribute value + * console.log(attrs.ngModel); + * + * // change the attribute + * attrs.$set('ngModel', 'new value'); + * + * // observe changes to interpolated attribute + * attrs.$observe('ngModel', function(value) { + * console.log('ngModel has changed value to ' + value); + * }); + * } + * ``` + * + * ## Example + * + *
+ * **Note**: Typically directives are registered with `module.directive`. The example below is + * to illustrate how `$compile` works. + *
+ * + + + +
+
+
+
+
+
+ + it('should auto compile', function() { + var textarea = $('textarea'); + var output = $('div[compile]'); + // The initial state reads 'Hello Angular'. + expect(output.getText()).toBe('Hello Angular'); + textarea.clear(); + textarea.sendKeys('{{name}}!'); + expect(output.getText()).toBe('Angular!'); + }); + +
+ + * + * + * @param {string|DOMElement} element Element or HTML string to compile into a template function. + * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED. + * + *
+ * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it + * e.g. will not use the right outer scope. Please pass the transclude function as a + * `parentBoundTranscludeFn` to the link function instead. + *
+ * + * @param {number} maxPriority only apply directives lower than given priority (Only effects the + * root element(s), not their children) + * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template + * (a DOM element/tree) to a scope. Where: + * + * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to. + * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the + * `template` and call the `cloneAttachFn` function allowing the caller to attach the + * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is + * called as:
`cloneAttachFn(clonedElement, scope)` where: + * + * * `clonedElement` - is a clone of the original `element` passed into the compiler. + * * `scope` - is the current scope with which the linking function is working with. + * + * * `options` - An optional object hash with linking options. If `options` is provided, then the following + * keys may be used to control linking behavior: + * + * * `parentBoundTranscludeFn` - the transclude function made available to + * directives; if given, it will be passed through to the link functions of + * directives found in `element` during compilation. + * * `transcludeControllers` - an object hash with keys that map controller names + * to controller instances; if given, it will make the controllers + * available to directives. + * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add + * the cloned elements; only needed for transcludes that are allowed to contain non html + * elements (e.g. SVG elements). See also the directive.controller property. + * + * Calling the linking function returns the element of the template. It is either the original + * element passed in, or the clone of the element if the `cloneAttachFn` is provided. + * + * After linking the view is not updated until after a call to $digest which typically is done by + * Angular automatically. + * + * If you need access to the bound view, there are two ways to do it: + * + * - If you are not asking the linking function to clone the template, create the DOM element(s) + * before you send them to the compiler and keep this reference around. + * ```js + * var element = $compile('

{{total}}

')(scope); + * ``` + * + * - if on the other hand, you need the element to be cloned, the view reference from the original + * example would not point to the clone, but rather to the original template that was cloned. In + * this case, you can access the clone via the cloneAttachFn: + * ```js + * var templateElement = angular.element('

{{total}}

'), + * scope = ....; + * + * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) { + * //attach the clone to DOM document at the right place + * }); + * + * //now we have reference to the cloned DOM via `clonedElement` + * ``` + * + * + * For information on how the compiler works, see the + * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide. + */ + +var $compileMinErr = minErr('$compile'); + +/** + * @ngdoc provider + * @name $compileProvider + * + * @description + */ +$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider']; +function $CompileProvider($provide, $$sanitizeUriProvider) { + var hasDirectives = {}, + Suffix = 'Directive', + COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/, + CLASS_DIRECTIVE_REGEXP = /(([\w\-]+)(?:\:([^;]+))?;?)/, + ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'), + REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/; + + // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes + // The assumption is that future DOM event attribute names will begin with + // 'on' and be composed of only English letters. + var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; + + function parseIsolateBindings(scope, directiveName, isController) { + var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/; + + var bindings = {}; + + forEach(scope, function(definition, scopeName) { + var match = definition.match(LOCAL_REGEXP); + + if (!match) { + throw $compileMinErr('iscp', + "Invalid {3} for directive '{0}'." + + " Definition: {... {1}: '{2}' ...}", + directiveName, scopeName, definition, + (isController ? "controller bindings definition" : + "isolate scope definition")); + } + + bindings[scopeName] = { + mode: match[1][0], + collection: match[2] === '*', + optional: match[3] === '?', + attrName: match[4] || scopeName + }; + }); + + return bindings; + } + + function parseDirectiveBindings(directive, directiveName) { + var bindings = { + isolateScope: null, + bindToController: null + }; + if (isObject(directive.scope)) { + if (directive.bindToController === true) { + bindings.bindToController = parseIsolateBindings(directive.scope, + directiveName, true); + bindings.isolateScope = {}; + } else { + bindings.isolateScope = parseIsolateBindings(directive.scope, + directiveName, false); + } + } + if (isObject(directive.bindToController)) { + bindings.bindToController = + parseIsolateBindings(directive.bindToController, directiveName, true); + } + if (isObject(bindings.bindToController)) { + var controller = directive.controller; + var controllerAs = directive.controllerAs; + if (!controller) { + // There is no controller, there may or may not be a controllerAs property + throw $compileMinErr('noctrl', + "Cannot bind to controller without directive '{0}'s controller.", + directiveName); + } else if (!identifierForController(controller, controllerAs)) { + // There is a controller, but no identifier or controllerAs property + throw $compileMinErr('noident', + "Cannot bind to controller without identifier for directive '{0}'.", + directiveName); + } + } + return bindings; + } + + function assertValidDirectiveName(name) { + var letter = name.charAt(0); + if (!letter || letter !== lowercase(letter)) { + throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name); + } + if (name !== name.trim()) { + throw $compileMinErr('baddir', + "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces", + name); + } + } + + /** + * @ngdoc method + * @name $compileProvider#directive + * @kind function + * + * @description + * Register a new directive with the compiler. + * + * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which + * will match as ng-bind), or an object map of directives where the keys are the + * names and the values are the factories. + * @param {Function|Array} directiveFactory An injectable directive factory function. See + * {@link guide/directive} for more info. + * @returns {ng.$compileProvider} Self for chaining. + */ + this.directive = function registerDirective(name, directiveFactory) { + assertNotHasOwnProperty(name, 'directive'); + if (isString(name)) { + assertValidDirectiveName(name); + assertArg(directiveFactory, 'directiveFactory'); + if (!hasDirectives.hasOwnProperty(name)) { + hasDirectives[name] = []; + $provide.factory(name + Suffix, ['$injector', '$exceptionHandler', + function($injector, $exceptionHandler) { + var directives = []; + forEach(hasDirectives[name], function(directiveFactory, index) { + try { + var directive = $injector.invoke(directiveFactory); + if (isFunction(directive)) { + directive = { compile: valueFn(directive) }; + } else if (!directive.compile && directive.link) { + directive.compile = valueFn(directive.link); + } + directive.priority = directive.priority || 0; + directive.index = index; + directive.name = directive.name || name; + directive.require = directive.require || (directive.controller && directive.name); + directive.restrict = directive.restrict || 'EA'; + var bindings = directive.$$bindings = + parseDirectiveBindings(directive, directive.name); + if (isObject(bindings.isolateScope)) { + directive.$$isolateBindings = bindings.isolateScope; + } + directive.$$moduleName = directiveFactory.$$moduleName; + directives.push(directive); + } catch (e) { + $exceptionHandler(e); + } + }); + return directives; + }]); + } + hasDirectives[name].push(directiveFactory); + } else { + forEach(name, reverseParams(registerDirective)); + } + return this; + }; + + + /** + * @ngdoc method + * @name $compileProvider#aHrefSanitizationWhitelist + * @kind function + * + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during a[href] sanitization. + * + * The sanitization is a security measure aimed at preventing XSS attacks via html links. + * + * Any url about to be assigned to a[href] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.aHrefSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp); + return this; + } else { + return $$sanitizeUriProvider.aHrefSanitizationWhitelist(); + } + }; + + + /** + * @ngdoc method + * @name $compileProvider#imgSrcSanitizationWhitelist + * @kind function + * + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during img[src] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to img[src] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.imgSrcSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp); + return this; + } else { + return $$sanitizeUriProvider.imgSrcSanitizationWhitelist(); + } + }; + + /** + * @ngdoc method + * @name $compileProvider#debugInfoEnabled + * + * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the + * current debugInfoEnabled state + * @returns {*} current value if used as getter or itself (chaining) if used as setter + * + * @kind function + * + * @description + * Call this method to enable/disable various debug runtime information in the compiler such as adding + * binding information and a reference to the current scope on to DOM elements. + * If enabled, the compiler will add the following to DOM elements that have been bound to the scope + * * `ng-binding` CSS class + * * `$binding` data property containing an array of the binding expressions + * + * You may want to disable this in production for a significant performance boost. See + * {@link guide/production#disabling-debug-data Disabling Debug Data} for more. + * + * The default value is true. + */ + var debugInfoEnabled = true; + this.debugInfoEnabled = function(enabled) { + if (isDefined(enabled)) { + debugInfoEnabled = enabled; + return this; + } + return debugInfoEnabled; + }; + + this.$get = [ + '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse', + '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri', + function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse, + $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) { + + var Attributes = function(element, attributesToCopy) { + if (attributesToCopy) { + var keys = Object.keys(attributesToCopy); + var i, l, key; + + for (i = 0, l = keys.length; i < l; i++) { + key = keys[i]; + this[key] = attributesToCopy[key]; + } + } else { + this.$attr = {}; + } + + this.$$element = element; + }; + + Attributes.prototype = { + /** + * @ngdoc method + * @name $compile.directive.Attributes#$normalize + * @kind function + * + * @description + * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or + * `data-`) to its normalized, camelCase form. + * + * Also there is special case for Moz prefix starting with upper case letter. + * + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} + * + * @param {string} name Name to normalize + */ + $normalize: directiveNormalize, + + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$addClass + * @kind function + * + * @description + * Adds the CSS class value specified by the classVal parameter to the element. If animations + * are enabled then an animation will be triggered for the class addition. + * + * @param {string} classVal The className value that will be added to the element + */ + $addClass: function(classVal) { + if (classVal && classVal.length > 0) { + $animate.addClass(this.$$element, classVal); + } + }, + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$removeClass + * @kind function + * + * @description + * Removes the CSS class value specified by the classVal parameter from the element. If + * animations are enabled then an animation will be triggered for the class removal. + * + * @param {string} classVal The className value that will be removed from the element + */ + $removeClass: function(classVal) { + if (classVal && classVal.length > 0) { + $animate.removeClass(this.$$element, classVal); + } + }, + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$updateClass + * @kind function + * + * @description + * Adds and removes the appropriate CSS class values to the element based on the difference + * between the new and old CSS class values (specified as newClasses and oldClasses). + * + * @param {string} newClasses The current CSS className value + * @param {string} oldClasses The former CSS className value + */ + $updateClass: function(newClasses, oldClasses) { + var toAdd = tokenDifference(newClasses, oldClasses); + if (toAdd && toAdd.length) { + $animate.addClass(this.$$element, toAdd); + } + + var toRemove = tokenDifference(oldClasses, newClasses); + if (toRemove && toRemove.length) { + $animate.removeClass(this.$$element, toRemove); + } + }, + + /** + * Set a normalized attribute on the element in a way such that all directives + * can share the attribute. This function properly handles boolean attributes. + * @param {string} key Normalized key. (ie ngAttribute) + * @param {string|boolean} value The value to set. If `null` attribute will be deleted. + * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute. + * Defaults to true. + * @param {string=} attrName Optional none normalized name. Defaults to key. + */ + $set: function(key, value, writeAttr, attrName) { + // TODO: decide whether or not to throw an error if "class" + //is set through this function since it may cause $updateClass to + //become unstable. + + var node = this.$$element[0], + booleanKey = getBooleanAttrName(node, key), + aliasedKey = getAliasedAttrName(node, key), + observer = key, + nodeName; + + if (booleanKey) { + this.$$element.prop(key, value); + attrName = booleanKey; + } else if (aliasedKey) { + this[aliasedKey] = value; + observer = aliasedKey; + } + + this[key] = value; + + // translate normalized key to actual key + if (attrName) { + this.$attr[key] = attrName; + } else { + attrName = this.$attr[key]; + if (!attrName) { + this.$attr[key] = attrName = snake_case(key, '-'); + } + } + + nodeName = nodeName_(this.$$element); + + if ((nodeName === 'a' && key === 'href') || + (nodeName === 'img' && key === 'src')) { + // sanitize a[href] and img[src] values + this[key] = value = $$sanitizeUri(value, key === 'src'); + } else if (nodeName === 'img' && key === 'srcset') { + // sanitize img[srcset] values + var result = ""; + + // first check if there are spaces because it's not the same pattern + var trimmedSrcset = trim(value); + // ( 999x ,| 999w ,| ,|, ) + var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/; + var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/; + + // split srcset into tuple of uri and descriptor except for the last item + var rawUris = trimmedSrcset.split(pattern); + + // for each tuples + var nbrUrisWith2parts = Math.floor(rawUris.length / 2); + for (var i = 0; i < nbrUrisWith2parts; i++) { + var innerIdx = i * 2; + // sanitize the uri + result += $$sanitizeUri(trim(rawUris[innerIdx]), true); + // add the descriptor + result += (" " + trim(rawUris[innerIdx + 1])); + } + + // split the last item into uri and descriptor + var lastTuple = trim(rawUris[i * 2]).split(/\s/); + + // sanitize the last uri + result += $$sanitizeUri(trim(lastTuple[0]), true); + + // and add the last descriptor if any + if (lastTuple.length === 2) { + result += (" " + trim(lastTuple[1])); + } + this[key] = value = result; + } + + if (writeAttr !== false) { + if (value === null || value === undefined) { + this.$$element.removeAttr(attrName); + } else { + this.$$element.attr(attrName, value); + } + } + + // fire observers + var $$observers = this.$$observers; + $$observers && forEach($$observers[observer], function(fn) { + try { + fn(value); + } catch (e) { + $exceptionHandler(e); + } + }); + }, + + + /** + * @ngdoc method + * @name $compile.directive.Attributes#$observe + * @kind function + * + * @description + * Observes an interpolated attribute. + * + * The observer function will be invoked once during the next `$digest` following + * compilation. The observer is then invoked whenever the interpolated value + * changes. + * + * @param {string} key Normalized key. (ie ngAttribute) . + * @param {function(interpolatedValue)} fn Function that will be called whenever + the interpolated value of the attribute changes. + * See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info. + * @returns {function()} Returns a deregistration function for this observer. + */ + $observe: function(key, fn) { + var attrs = this, + $$observers = (attrs.$$observers || (attrs.$$observers = createMap())), + listeners = ($$observers[key] || ($$observers[key] = [])); + + listeners.push(fn); + $rootScope.$evalAsync(function() { + if (!listeners.$$inter && attrs.hasOwnProperty(key)) { + // no one registered attribute interpolation function, so lets call it manually + fn(attrs[key]); + } + }); + + return function() { + arrayRemove(listeners, fn); + }; + } + }; + + + function safeAddClass($element, className) { + try { + $element.addClass(className); + } catch (e) { + // ignore, since it means that we are trying to set class on + // SVG element, where class name is read-only. + } + } + + + var startSymbol = $interpolate.startSymbol(), + endSymbol = $interpolate.endSymbol(), + denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}') + ? identity + : function denormalizeTemplate(template) { + return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol); + }, + NG_ATTR_BINDING = /^ngAttr[A-Z]/; + + compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) { + var bindings = $element.data('$binding') || []; + + if (isArray(binding)) { + bindings = bindings.concat(binding); + } else { + bindings.push(binding); + } + + $element.data('$binding', bindings); + } : noop; + + compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) { + safeAddClass($element, 'ng-binding'); + } : noop; + + compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) { + var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope'; + $element.data(dataName, scope); + } : noop; + + compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) { + safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope'); + } : noop; + + return compile; + + //================================ + + function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, + previousCompileContext) { + if (!($compileNodes instanceof jqLite)) { + // jquery always rewraps, whereas we need to preserve the original selector so that we can + // modify it. + $compileNodes = jqLite($compileNodes); + } + // We can not compile top level text elements since text nodes can be merged and we will + // not be able to attach scope data to them, so we will wrap them in + forEach($compileNodes, function(node, index) { + if (node.nodeType == NODE_TYPE_TEXT && node.nodeValue.match(/\S+/) /* non-empty */ ) { + $compileNodes[index] = jqLite(node).wrap('').parent()[0]; + } + }); + var compositeLinkFn = + compileNodes($compileNodes, transcludeFn, $compileNodes, + maxPriority, ignoreDirective, previousCompileContext); + compile.$$addScopeClass($compileNodes); + var namespace = null; + return function publicLinkFn(scope, cloneConnectFn, options) { + assertArg(scope, 'scope'); + + options = options || {}; + var parentBoundTranscludeFn = options.parentBoundTranscludeFn, + transcludeControllers = options.transcludeControllers, + futureParentElement = options.futureParentElement; + + // When `parentBoundTranscludeFn` is passed, it is a + // `controllersBoundTransclude` function (it was previously passed + // as `transclude` to directive.link) so we must unwrap it to get + // its `boundTranscludeFn` + if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) { + parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude; + } + + if (!namespace) { + namespace = detectNamespaceForChildElements(futureParentElement); + } + var $linkNode; + if (namespace !== 'html') { + // When using a directive with replace:true and templateUrl the $compileNodes + // (or a child element inside of them) + // might change, so we need to recreate the namespace adapted compileNodes + // for call to the link function. + // Note: This will already clone the nodes... + $linkNode = jqLite( + wrapTemplate(namespace, jqLite('
').append($compileNodes).html()) + ); + } else if (cloneConnectFn) { + // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart + // and sometimes changes the structure of the DOM. + $linkNode = JQLitePrototype.clone.call($compileNodes); + } else { + $linkNode = $compileNodes; + } + + if (transcludeControllers) { + for (var controllerName in transcludeControllers) { + $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance); + } + } + + compile.$$addScopeInfo($linkNode, scope); + + if (cloneConnectFn) cloneConnectFn($linkNode, scope); + if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn); + return $linkNode; + }; + } + + function detectNamespaceForChildElements(parentElement) { + // TODO: Make this detect MathML as well... + var node = parentElement && parentElement[0]; + if (!node) { + return 'html'; + } else { + return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html'; + } + } + + /** + * Compile function matches each node in nodeList against the directives. Once all directives + * for a particular node are collected their compile functions are executed. The compile + * functions return values - the linking functions - are combined into a composite linking + * function, which is the a linking function for the node. + * + * @param {NodeList} nodeList an array of nodes or NodeList to compile + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the + * scope argument is auto-generated to the new child of the transcluded parent scope. + * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then + * the rootElement must be set the jqLite collection of the compile root. This is + * needed so that the jqLite collection items can be replaced with widgets. + * @param {number=} maxPriority Max directive priority. + * @returns {Function} A composite linking function of all of the matched directives or null. + */ + function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, + previousCompileContext) { + var linkFns = [], + attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound; + + for (var i = 0; i < nodeList.length; i++) { + attrs = new Attributes(); + + // we must always refer to nodeList[i] since the nodes can be replaced underneath us. + directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined, + ignoreDirective); + + nodeLinkFn = (directives.length) + ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement, + null, [], [], previousCompileContext) + : null; + + if (nodeLinkFn && nodeLinkFn.scope) { + compile.$$addScopeClass(attrs.$$element); + } + + childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || + !(childNodes = nodeList[i].childNodes) || + !childNodes.length) + ? null + : compileNodes(childNodes, + nodeLinkFn ? ( + (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement) + && nodeLinkFn.transclude) : transcludeFn); + + if (nodeLinkFn || childLinkFn) { + linkFns.push(i, nodeLinkFn, childLinkFn); + linkFnFound = true; + nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn; + } + + //use the previous context only for the first element in the virtual group + previousCompileContext = null; + } + + // return a linking function if we have found anything, null otherwise + return linkFnFound ? compositeLinkFn : null; + + function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) { + var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn; + var stableNodeList; + + + if (nodeLinkFnFound) { + // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our + // offsets don't get screwed up + var nodeListLength = nodeList.length; + stableNodeList = new Array(nodeListLength); + + // create a sparse array by only copying the elements which have a linkFn + for (i = 0; i < linkFns.length; i+=3) { + idx = linkFns[i]; + stableNodeList[idx] = nodeList[idx]; + } + } else { + stableNodeList = nodeList; + } + + for (i = 0, ii = linkFns.length; i < ii;) { + node = stableNodeList[linkFns[i++]]; + nodeLinkFn = linkFns[i++]; + childLinkFn = linkFns[i++]; + + if (nodeLinkFn) { + if (nodeLinkFn.scope) { + childScope = scope.$new(); + compile.$$addScopeInfo(jqLite(node), childScope); + var destroyBindings = nodeLinkFn.$$destroyBindings; + if (destroyBindings) { + nodeLinkFn.$$destroyBindings = null; + childScope.$on('$destroyed', destroyBindings); + } + } else { + childScope = scope; + } + + if (nodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn( + scope, nodeLinkFn.transclude, parentBoundTranscludeFn); + + } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) { + childBoundTranscludeFn = parentBoundTranscludeFn; + + } else if (!parentBoundTranscludeFn && transcludeFn) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn); + + } else { + childBoundTranscludeFn = null; + } + + nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn, + nodeLinkFn); + + } else if (childLinkFn) { + childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn); + } + } + } + } + + function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) { + + var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { + + if (!transcludedScope) { + transcludedScope = scope.$new(false, containingScope); + transcludedScope.$$transcluded = true; + } + + return transcludeFn(transcludedScope, cloneFn, { + parentBoundTranscludeFn: previousBoundTranscludeFn, + transcludeControllers: controllers, + futureParentElement: futureParentElement + }); + }; + + return boundTranscludeFn; + } + + /** + * Looks for directives on the given node and adds them to the directive collection which is + * sorted. + * + * @param node Node to search. + * @param directives An array to which the directives are added to. This array is sorted before + * the function returns. + * @param attrs The shared attrs object which is used to populate the normalized attributes. + * @param {number=} maxPriority Max directive priority. + */ + function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) { + var nodeType = node.nodeType, + attrsMap = attrs.$attr, + match, + className; + + switch (nodeType) { + case NODE_TYPE_ELEMENT: /* Element */ + // use the node name: + addDirective(directives, + directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective); + + // iterate over the attributes + for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes, + j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) { + var attrStartName = false; + var attrEndName = false; + + attr = nAttrs[j]; + name = attr.name; + value = trim(attr.value); + + // support ngAttr attribute binding + ngAttrName = directiveNormalize(name); + if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) { + name = name.replace(PREFIX_REGEXP, '') + .substr(8).replace(/_(.)/g, function(match, letter) { + return letter.toUpperCase(); + }); + } + + var directiveNName = ngAttrName.replace(/(Start|End)$/, ''); + if (directiveIsMultiElement(directiveNName)) { + if (ngAttrName === directiveNName + 'Start') { + attrStartName = name; + attrEndName = name.substr(0, name.length - 5) + 'end'; + name = name.substr(0, name.length - 6); + } + } + + nName = directiveNormalize(name.toLowerCase()); + attrsMap[nName] = name; + if (isNgAttr || !attrs.hasOwnProperty(nName)) { + attrs[nName] = value; + if (getBooleanAttrName(node, nName)) { + attrs[nName] = true; // presence means true + } + } + addAttrInterpolateDirective(node, directives, value, nName, isNgAttr); + addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName, + attrEndName); + } + + // use class as directive + className = node.className; + if (isObject(className)) { + // Maybe SVGAnimatedString + className = className.animVal; + } + if (isString(className) && className !== '') { + while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { + nName = directiveNormalize(match[2]); + if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) { + attrs[nName] = trim(match[3]); + } + className = className.substr(match.index + match[0].length); + } + } + break; + case NODE_TYPE_TEXT: /* Text Node */ + if (msie === 11) { + // Workaround for #11781 + while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) { + node.nodeValue = node.nodeValue + node.nextSibling.nodeValue; + node.parentNode.removeChild(node.nextSibling); + } + } + addTextInterpolateDirective(directives, node.nodeValue); + break; + case NODE_TYPE_COMMENT: /* Comment */ + try { + match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); + if (match) { + nName = directiveNormalize(match[1]); + if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) { + attrs[nName] = trim(match[2]); + } + } + } catch (e) { + // turns out that under some circumstances IE9 throws errors when one attempts to read + // comment's node value. + // Just ignore it and continue. (Can't seem to reproduce in test case.) + } + break; + } + + directives.sort(byPriority); + return directives; + } + + /** + * Given a node with an directive-start it collects all of the siblings until it finds + * directive-end. + * @param node + * @param attrStart + * @param attrEnd + * @returns {*} + */ + function groupScan(node, attrStart, attrEnd) { + var nodes = []; + var depth = 0; + if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { + do { + if (!node) { + throw $compileMinErr('uterdir', + "Unterminated attribute, found '{0}' but no matching '{1}' found.", + attrStart, attrEnd); + } + if (node.nodeType == NODE_TYPE_ELEMENT) { + if (node.hasAttribute(attrStart)) depth++; + if (node.hasAttribute(attrEnd)) depth--; + } + nodes.push(node); + node = node.nextSibling; + } while (depth > 0); + } else { + nodes.push(node); + } + + return jqLite(nodes); + } + + /** + * Wrapper for linking function which converts normal linking function into a grouped + * linking function. + * @param linkFn + * @param attrStart + * @param attrEnd + * @returns {Function} + */ + function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) { + return function(scope, element, attrs, controllers, transcludeFn) { + element = groupScan(element[0], attrStart, attrEnd); + return linkFn(scope, element, attrs, controllers, transcludeFn); + }; + } + + /** + * Once the directives have been collected, their compile functions are executed. This method + * is responsible for inlining directive templates as well as terminating the application + * of the directives if the terminal directive has been reached. + * + * @param {Array} directives Array of collected directives to execute their compile function. + * this needs to be pre-sorted by priority order. + * @param {Node} compileNode The raw DOM node to apply the compile functions to + * @param {Object} templateAttrs The shared attribute function + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the + * scope argument is auto-generated to the new + * child of the transcluded parent scope. + * @param {JQLite} jqCollection If we are working on the root of the compile tree then this + * argument has the root jqLite array so that we can replace nodes + * on it. + * @param {Object=} originalReplaceDirective An optional directive that will be ignored when + * compiling the transclusion. + * @param {Array.} preLinkFns + * @param {Array.} postLinkFns + * @param {Object} previousCompileContext Context used for previous compilation of the current + * node + * @returns {Function} linkFn + */ + function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, + jqCollection, originalReplaceDirective, preLinkFns, postLinkFns, + previousCompileContext) { + previousCompileContext = previousCompileContext || {}; + + var terminalPriority = -Number.MAX_VALUE, + newScopeDirective = previousCompileContext.newScopeDirective, + controllerDirectives = previousCompileContext.controllerDirectives, + newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective, + templateDirective = previousCompileContext.templateDirective, + nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective, + hasTranscludeDirective = false, + hasTemplate = false, + hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective, + $compileNode = templateAttrs.$$element = jqLite(compileNode), + directive, + directiveName, + $template, + replaceDirective = originalReplaceDirective, + childTranscludeFn = transcludeFn, + linkFn, + directiveValue; + + // executes all directives on the current element + for (var i = 0, ii = directives.length; i < ii; i++) { + directive = directives[i]; + var attrStart = directive.$$start; + var attrEnd = directive.$$end; + + // collect multiblock sections + if (attrStart) { + $compileNode = groupScan(compileNode, attrStart, attrEnd); + } + $template = undefined; + + if (terminalPriority > directive.priority) { + break; // prevent further processing of directives + } + + if (directiveValue = directive.scope) { + + // skip the check for directives with async templates, we'll check the derived sync + // directive when the template arrives + if (!directive.templateUrl) { + if (isObject(directiveValue)) { + // This directive is trying to add an isolated scope. + // Check that there is no scope of any kind already + assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective, + directive, $compileNode); + newIsolateScopeDirective = directive; + } else { + // This directive is trying to add a child scope. + // Check that there is no isolated scope already + assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive, + $compileNode); + } + } + + newScopeDirective = newScopeDirective || directive; + } + + directiveName = directive.name; + + if (!directive.templateUrl && directive.controller) { + directiveValue = directive.controller; + controllerDirectives = controllerDirectives || createMap(); + assertNoDuplicate("'" + directiveName + "' controller", + controllerDirectives[directiveName], directive, $compileNode); + controllerDirectives[directiveName] = directive; + } + + if (directiveValue = directive.transclude) { + hasTranscludeDirective = true; + + // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion. + // This option should only be used by directives that know how to safely handle element transclusion, + // where the transcluded nodes are added or replaced after linking. + if (!directive.$$tlb) { + assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode); + nonTlbTranscludeDirective = directive; + } + + if (directiveValue == 'element') { + hasElementTranscludeDirective = true; + terminalPriority = directive.priority; + $template = $compileNode; + $compileNode = templateAttrs.$$element = + jqLite(document.createComment(' ' + directiveName + ': ' + + templateAttrs[directiveName] + ' ')); + compileNode = $compileNode[0]; + replaceWith(jqCollection, sliceArgs($template), compileNode); + + childTranscludeFn = compile($template, transcludeFn, terminalPriority, + replaceDirective && replaceDirective.name, { + // Don't pass in: + // - controllerDirectives - otherwise we'll create duplicates controllers + // - newIsolateScopeDirective or templateDirective - combining templates with + // element transclusion doesn't make sense. + // + // We need only nonTlbTranscludeDirective so that we prevent putting transclusion + // on the same element more than once. + nonTlbTranscludeDirective: nonTlbTranscludeDirective + }); + } else { + $template = jqLite(jqLiteClone(compileNode)).contents(); + $compileNode.empty(); // clear contents + childTranscludeFn = compile($template, transcludeFn); + } + } + + if (directive.template) { + hasTemplate = true; + assertNoDuplicate('template', templateDirective, directive, $compileNode); + templateDirective = directive; + + directiveValue = (isFunction(directive.template)) + ? directive.template($compileNode, templateAttrs) + : directive.template; + + directiveValue = denormalizeTemplate(directiveValue); + + if (directive.replace) { + replaceDirective = directive; + if (jqLiteIsTextNode(directiveValue)) { + $template = []; + } else { + $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue))); + } + compileNode = $template[0]; + + if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { + throw $compileMinErr('tplrt', + "Template for directive '{0}' must have exactly one root element. {1}", + directiveName, ''); + } + + replaceWith(jqCollection, $compileNode, compileNode); + + var newTemplateAttrs = {$attr: {}}; + + // combine directives from the original node and from the template: + // - take the array of directives for this element + // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed) + // - collect directives from the template and sort them by priority + // - combine directives as: processed + template + unprocessed + var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs); + var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1)); + + if (newIsolateScopeDirective) { + markDirectivesAsIsolate(templateDirectives); + } + directives = directives.concat(templateDirectives).concat(unprocessedDirectives); + mergeTemplateAttributes(templateAttrs, newTemplateAttrs); + + ii = directives.length; + } else { + $compileNode.html(directiveValue); + } + } + + if (directive.templateUrl) { + hasTemplate = true; + assertNoDuplicate('template', templateDirective, directive, $compileNode); + templateDirective = directive; + + if (directive.replace) { + replaceDirective = directive; + } + + nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode, + templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, { + controllerDirectives: controllerDirectives, + newScopeDirective: (newScopeDirective !== directive) && newScopeDirective, + newIsolateScopeDirective: newIsolateScopeDirective, + templateDirective: templateDirective, + nonTlbTranscludeDirective: nonTlbTranscludeDirective + }); + ii = directives.length; + } else if (directive.compile) { + try { + linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn); + if (isFunction(linkFn)) { + addLinkFns(null, linkFn, attrStart, attrEnd); + } else if (linkFn) { + addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd); + } + } catch (e) { + $exceptionHandler(e, startingTag($compileNode)); + } + } + + if (directive.terminal) { + nodeLinkFn.terminal = true; + terminalPriority = Math.max(terminalPriority, directive.priority); + } + + } + + nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true; + nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective; + nodeLinkFn.templateOnThisElement = hasTemplate; + nodeLinkFn.transclude = childTranscludeFn; + + previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective; + + // might be normal or delayed nodeLinkFn depending on if templateUrl is present + return nodeLinkFn; + + //////////////////// + + function addLinkFns(pre, post, attrStart, attrEnd) { + if (pre) { + if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd); + pre.require = directive.require; + pre.directiveName = directiveName; + if (newIsolateScopeDirective === directive || directive.$$isolateScope) { + pre = cloneAndAnnotateFn(pre, {isolateScope: true}); + } + preLinkFns.push(pre); + } + if (post) { + if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd); + post.require = directive.require; + post.directiveName = directiveName; + if (newIsolateScopeDirective === directive || directive.$$isolateScope) { + post = cloneAndAnnotateFn(post, {isolateScope: true}); + } + postLinkFns.push(post); + } + } + + + function getControllers(directiveName, require, $element, elementControllers) { + var value; + + if (isString(require)) { + var match = require.match(REQUIRE_PREFIX_REGEXP); + var name = require.substring(match[0].length); + var inheritType = match[1] || match[3]; + var optional = match[2] === '?'; + + //If only parents then start at the parent element + if (inheritType === '^^') { + $element = $element.parent(); + //Otherwise attempt getting the controller from elementControllers in case + //the element is transcluded (and has no data) and to avoid .data if possible + } else { + value = elementControllers && elementControllers[name]; + value = value && value.instance; + } + + if (!value) { + var dataName = '$' + name + 'Controller'; + value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName); + } + + if (!value && !optional) { + throw $compileMinErr('ctreq', + "Controller '{0}', required by directive '{1}', can't be found!", + name, directiveName); + } + } else if (isArray(require)) { + value = []; + for (var i = 0, ii = require.length; i < ii; i++) { + value[i] = getControllers(directiveName, require[i], $element, elementControllers); + } + } + + return value || null; + } + + function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) { + var elementControllers = createMap(); + for (var controllerKey in controllerDirectives) { + var directive = controllerDirectives[controllerKey]; + var locals = { + $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope, + $element: $element, + $attrs: attrs, + $transclude: transcludeFn + }; + + var controller = directive.controller; + if (controller == '@') { + controller = attrs[directive.name]; + } + + var controllerInstance = $controller(controller, locals, true, directive.controllerAs); + + // For directives with element transclusion the element is a comment, + // but jQuery .data doesn't support attaching data to comment nodes as it's hard to + // clean up (http://bugs.jquery.com/ticket/8335). + // Instead, we save the controllers for the element in a local hash and attach to .data + // later, once we have the actual element. + elementControllers[directive.name] = controllerInstance; + if (!hasElementTranscludeDirective) { + $element.data('$' + directive.name + 'Controller', controllerInstance.instance); + } + } + return elementControllers; + } + + function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn, + thisLinkFn) { + var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element, + attrs; + + if (compileNode === linkNode) { + attrs = templateAttrs; + $element = templateAttrs.$$element; + } else { + $element = jqLite(linkNode); + attrs = new Attributes($element, templateAttrs); + } + + if (newIsolateScopeDirective) { + isolateScope = scope.$new(true); + } + + if (boundTranscludeFn) { + // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn` + // is later passed as `parentBoundTranscludeFn` to `publicLinkFn` + transcludeFn = controllersBoundTransclude; + transcludeFn.$$boundTransclude = boundTranscludeFn; + } + + if (controllerDirectives) { + elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope); + } + + if (newIsolateScopeDirective) { + // Initialize isolate scope bindings for new isolate scope directive. + compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective || + templateDirective === newIsolateScopeDirective.$$originalDirective))); + compile.$$addScopeClass($element, true); + isolateScope.$$isolateBindings = + newIsolateScopeDirective.$$isolateBindings; + initializeDirectiveBindings(scope, attrs, isolateScope, + isolateScope.$$isolateBindings, + newIsolateScopeDirective, isolateScope); + } + if (elementControllers) { + // Initialize bindToController bindings for new/isolate scopes + var scopeDirective = newIsolateScopeDirective || newScopeDirective; + var bindings; + var controllerForBindings; + if (scopeDirective && elementControllers[scopeDirective.name]) { + bindings = scopeDirective.$$bindings.bindToController; + controller = elementControllers[scopeDirective.name]; + + if (controller && controller.identifier && bindings) { + controllerForBindings = controller; + thisLinkFn.$$destroyBindings = + initializeDirectiveBindings(scope, attrs, controller.instance, + bindings, scopeDirective); + } + } + for (i in elementControllers) { + controller = elementControllers[i]; + var controllerResult = controller(); + + if (controllerResult !== controller.instance) { + // If the controller constructor has a return value, overwrite the instance + // from setupControllers and update the element data + controller.instance = controllerResult; + $element.data('$' + i + 'Controller', controllerResult); + if (controller === controllerForBindings) { + // Remove and re-install bindToController bindings + thisLinkFn.$$destroyBindings(); + thisLinkFn.$$destroyBindings = + initializeDirectiveBindings(scope, attrs, controllerResult, bindings, scopeDirective); + } + } + } + } + + // PRELINKING + for (i = 0, ii = preLinkFns.length; i < ii; i++) { + linkFn = preLinkFns[i]; + invokeLinkFn(linkFn, + linkFn.isolateScope ? isolateScope : scope, + $element, + attrs, + linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), + transcludeFn + ); + } + + // RECURSION + // We only pass the isolate scope, if the isolate directive has a template, + // otherwise the child elements do not belong to the isolate directive. + var scopeToChild = scope; + if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) { + scopeToChild = isolateScope; + } + childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn); + + // POSTLINKING + for (i = postLinkFns.length - 1; i >= 0; i--) { + linkFn = postLinkFns[i]; + invokeLinkFn(linkFn, + linkFn.isolateScope ? isolateScope : scope, + $element, + attrs, + linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), + transcludeFn + ); + } + + // This is the function that is injected as `$transclude`. + // Note: all arguments are optional! + function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) { + var transcludeControllers; + + // No scope passed in: + if (!isScope(scope)) { + futureParentElement = cloneAttachFn; + cloneAttachFn = scope; + scope = undefined; + } + + if (hasElementTranscludeDirective) { + transcludeControllers = elementControllers; + } + if (!futureParentElement) { + futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; + } + return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); + } + } + } + + function markDirectivesAsIsolate(directives) { + // mark all directives as needing isolate scope. + for (var j = 0, jj = directives.length; j < jj; j++) { + directives[j] = inherit(directives[j], {$$isolateScope: true}); + } + } + + /** + * looks up the directive and decorates it with exception handling and proper parameters. We + * call this the boundDirective. + * + * @param {string} name name of the directive to look up. + * @param {string} location The directive must be found in specific format. + * String containing any of theses characters: + * + * * `E`: element name + * * `A': attribute + * * `C`: class + * * `M`: comment + * @returns {boolean} true if directive was added. + */ + function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName, + endAttrName) { + if (name === ignoreDirective) return null; + var match = null; + if (hasDirectives.hasOwnProperty(name)) { + for (var directive, directives = $injector.get(name + Suffix), + i = 0, ii = directives.length; i < ii; i++) { + try { + directive = directives[i]; + if ((maxPriority === undefined || maxPriority > directive.priority) && + directive.restrict.indexOf(location) != -1) { + if (startAttrName) { + directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName}); + } + tDirectives.push(directive); + match = directive; + } + } catch (e) { $exceptionHandler(e); } + } + } + return match; + } + + + /** + * looks up the directive and returns true if it is a multi-element directive, + * and therefore requires DOM nodes between -start and -end markers to be grouped + * together. + * + * @param {string} name name of the directive to look up. + * @returns true if directive was registered as multi-element. + */ + function directiveIsMultiElement(name) { + if (hasDirectives.hasOwnProperty(name)) { + for (var directive, directives = $injector.get(name + Suffix), + i = 0, ii = directives.length; i < ii; i++) { + directive = directives[i]; + if (directive.multiElement) { + return true; + } + } + } + return false; + } + + /** + * When the element is replaced with HTML template then the new attributes + * on the template need to be merged with the existing attributes in the DOM. + * The desired effect is to have both of the attributes present. + * + * @param {object} dst destination attributes (original DOM) + * @param {object} src source attributes (from the directive template) + */ + function mergeTemplateAttributes(dst, src) { + var srcAttr = src.$attr, + dstAttr = dst.$attr, + $element = dst.$$element; + + // reapply the old attributes to the new element + forEach(dst, function(value, key) { + if (key.charAt(0) != '$') { + if (src[key] && src[key] !== value) { + value += (key === 'style' ? ';' : ' ') + src[key]; + } + dst.$set(key, value, true, srcAttr[key]); + } + }); + + // copy the new attributes on the old attrs object + forEach(src, function(value, key) { + if (key == 'class') { + safeAddClass($element, value); + dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value; + } else if (key == 'style') { + $element.attr('style', $element.attr('style') + ';' + value); + dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value; + // `dst` will never contain hasOwnProperty as DOM parser won't let it. + // You will get an "InvalidCharacterError: DOM Exception 5" error if you + // have an attribute like "has-own-property" or "data-has-own-property", etc. + } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) { + dst[key] = value; + dstAttr[key] = srcAttr[key]; + } + }); + } + + + function compileTemplateUrl(directives, $compileNode, tAttrs, + $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) { + var linkQueue = [], + afterTemplateNodeLinkFn, + afterTemplateChildLinkFn, + beforeTemplateCompileNode = $compileNode[0], + origAsyncDirective = directives.shift(), + derivedSyncDirective = inherit(origAsyncDirective, { + templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective + }), + templateUrl = (isFunction(origAsyncDirective.templateUrl)) + ? origAsyncDirective.templateUrl($compileNode, tAttrs) + : origAsyncDirective.templateUrl, + templateNamespace = origAsyncDirective.templateNamespace; + + $compileNode.empty(); + + $templateRequest(templateUrl) + .then(function(content) { + var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn; + + content = denormalizeTemplate(content); + + if (origAsyncDirective.replace) { + if (jqLiteIsTextNode(content)) { + $template = []; + } else { + $template = removeComments(wrapTemplate(templateNamespace, trim(content))); + } + compileNode = $template[0]; + + if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { + throw $compileMinErr('tplrt', + "Template for directive '{0}' must have exactly one root element. {1}", + origAsyncDirective.name, templateUrl); + } + + tempTemplateAttrs = {$attr: {}}; + replaceWith($rootElement, $compileNode, compileNode); + var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs); + + if (isObject(origAsyncDirective.scope)) { + markDirectivesAsIsolate(templateDirectives); + } + directives = templateDirectives.concat(directives); + mergeTemplateAttributes(tAttrs, tempTemplateAttrs); + } else { + compileNode = beforeTemplateCompileNode; + $compileNode.html(content); + } + + directives.unshift(derivedSyncDirective); + + afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs, + childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns, + previousCompileContext); + forEach($rootElement, function(node, i) { + if (node == compileNode) { + $rootElement[i] = $compileNode[0]; + } + }); + afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn); + + while (linkQueue.length) { + var scope = linkQueue.shift(), + beforeTemplateLinkNode = linkQueue.shift(), + linkRootElement = linkQueue.shift(), + boundTranscludeFn = linkQueue.shift(), + linkNode = $compileNode[0]; + + if (scope.$$destroyed) continue; + + if (beforeTemplateLinkNode !== beforeTemplateCompileNode) { + var oldClasses = beforeTemplateLinkNode.className; + + if (!(previousCompileContext.hasElementTranscludeDirective && + origAsyncDirective.replace)) { + // it was cloned therefore we have to clone as well. + linkNode = jqLiteClone(compileNode); + } + replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode); + + // Copy in CSS classes from original node + safeAddClass(jqLite(linkNode), oldClasses); + } + if (afterTemplateNodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); + } else { + childBoundTranscludeFn = boundTranscludeFn; + } + afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement, + childBoundTranscludeFn, afterTemplateNodeLinkFn); + } + linkQueue = null; + }); + + return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) { + var childBoundTranscludeFn = boundTranscludeFn; + if (scope.$$destroyed) return; + if (linkQueue) { + linkQueue.push(scope, + node, + rootElement, + childBoundTranscludeFn); + } else { + if (afterTemplateNodeLinkFn.transcludeOnThisElement) { + childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); + } + afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn, + afterTemplateNodeLinkFn); + } + }; + } + + + /** + * Sorting function for bound directives. + */ + function byPriority(a, b) { + var diff = b.priority - a.priority; + if (diff !== 0) return diff; + if (a.name !== b.name) return (a.name < b.name) ? -1 : 1; + return a.index - b.index; + } + + function assertNoDuplicate(what, previousDirective, directive, element) { + + function wrapModuleNameIfDefined(moduleName) { + return moduleName ? + (' (module: ' + moduleName + ')') : + ''; + } + + if (previousDirective) { + throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}', + previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName), + directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element)); + } + } + + + function addTextInterpolateDirective(directives, text) { + var interpolateFn = $interpolate(text, true); + if (interpolateFn) { + directives.push({ + priority: 0, + compile: function textInterpolateCompileFn(templateNode) { + var templateNodeParent = templateNode.parent(), + hasCompileParent = !!templateNodeParent.length; + + // When transcluding a template that has bindings in the root + // we don't have a parent and thus need to add the class during linking fn. + if (hasCompileParent) compile.$$addBindingClass(templateNodeParent); + + return function textInterpolateLinkFn(scope, node) { + var parent = node.parent(); + if (!hasCompileParent) compile.$$addBindingClass(parent); + compile.$$addBindingInfo(parent, interpolateFn.expressions); + scope.$watch(interpolateFn, function interpolateFnWatchAction(value) { + node[0].nodeValue = value; + }); + }; + } + }); + } + } + + + function wrapTemplate(type, template) { + type = lowercase(type || 'html'); + switch (type) { + case 'svg': + case 'math': + var wrapper = document.createElement('div'); + wrapper.innerHTML = '<' + type + '>' + template + ''; + return wrapper.childNodes[0].childNodes; + default: + return template; + } + } + + + function getTrustedContext(node, attrNormalizedName) { + if (attrNormalizedName == "srcdoc") { + return $sce.HTML; + } + var tag = nodeName_(node); + // maction[xlink:href] can source SVG. It's not limited to . + if (attrNormalizedName == "xlinkHref" || + (tag == "form" && attrNormalizedName == "action") || + (tag != "img" && (attrNormalizedName == "src" || + attrNormalizedName == "ngSrc"))) { + return $sce.RESOURCE_URL; + } + } + + + function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) { + var trustedContext = getTrustedContext(node, name); + allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing; + + var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing); + + // no interpolation found -> ignore + if (!interpolateFn) return; + + + if (name === "multiple" && nodeName_(node) === "select") { + throw $compileMinErr("selmulti", + "Binding to the 'multiple' attribute is not supported. Element: {0}", + startingTag(node)); + } + + directives.push({ + priority: 100, + compile: function() { + return { + pre: function attrInterpolatePreLinkFn(scope, element, attr) { + var $$observers = (attr.$$observers || (attr.$$observers = {})); + + if (EVENT_HANDLER_ATTR_REGEXP.test(name)) { + throw $compileMinErr('nodomevents', + "Interpolations for HTML DOM event attributes are disallowed. Please use the " + + "ng- versions (such as ng-click instead of onclick) instead."); + } + + // If the attribute has changed since last $interpolate()ed + var newValue = attr[name]; + if (newValue !== value) { + // we need to interpolate again since the attribute value has been updated + // (e.g. by another directive's compile function) + // ensure unset/empty values make interpolateFn falsy + interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing); + value = newValue; + } + + // if attribute was updated so that there is no interpolation going on we don't want to + // register any observers + if (!interpolateFn) return; + + // initialize attr object so that it's ready in case we need the value for isolate + // scope initialization, otherwise the value would not be available from isolate + // directive's linking fn during linking phase + attr[name] = interpolateFn(scope); + + ($$observers[name] || ($$observers[name] = [])).$$inter = true; + (attr.$$observers && attr.$$observers[name].$$scope || scope). + $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) { + //special case for class attribute addition + removal + //so that class changes can tap into the animation + //hooks provided by the $animate service. Be sure to + //skip animations when the first digest occurs (when + //both the new and the old values are the same) since + //the CSS classes are the non-interpolated values + if (name === 'class' && newValue != oldValue) { + attr.$updateClass(newValue, oldValue); + } else { + attr.$set(name, newValue); + } + }); + } + }; + } + }); + } + + + /** + * This is a special jqLite.replaceWith, which can replace items which + * have no parents, provided that the containing jqLite collection is provided. + * + * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes + * in the root of the tree. + * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep + * the shell, but replace its DOM node reference. + * @param {Node} newNode The new DOM node. + */ + function replaceWith($rootElement, elementsToRemove, newNode) { + var firstElementToRemove = elementsToRemove[0], + removeCount = elementsToRemove.length, + parent = firstElementToRemove.parentNode, + i, ii; + + if ($rootElement) { + for (i = 0, ii = $rootElement.length; i < ii; i++) { + if ($rootElement[i] == firstElementToRemove) { + $rootElement[i++] = newNode; + for (var j = i, j2 = j + removeCount - 1, + jj = $rootElement.length; + j < jj; j++, j2++) { + if (j2 < jj) { + $rootElement[j] = $rootElement[j2]; + } else { + delete $rootElement[j]; + } + } + $rootElement.length -= removeCount - 1; + + // If the replaced element is also the jQuery .context then replace it + // .context is a deprecated jQuery api, so we should set it only when jQuery set it + // http://api.jquery.com/context/ + if ($rootElement.context === firstElementToRemove) { + $rootElement.context = newNode; + } + break; + } + } + } + + if (parent) { + parent.replaceChild(newNode, firstElementToRemove); + } + + // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it? + var fragment = document.createDocumentFragment(); + fragment.appendChild(firstElementToRemove); + + if (jqLite.hasData(firstElementToRemove)) { + // Copy over user data (that includes Angular's $scope etc.). Don't copy private + // data here because there's no public interface in jQuery to do that and copying over + // event listeners (which is the main use of private data) wouldn't work anyway. + jqLite(newNode).data(jqLite(firstElementToRemove).data()); + + // Remove data of the replaced element. We cannot just call .remove() + // on the element it since that would deallocate scope that is needed + // for the new node. Instead, remove the data "manually". + if (!jQuery) { + delete jqLite.cache[firstElementToRemove[jqLite.expando]]; + } else { + // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after + // the replaced element. The cleanData version monkey-patched by Angular would cause + // the scope to be trashed and we do need the very same scope to work with the new + // element. However, we cannot just cache the non-patched version and use it here as + // that would break if another library patches the method after Angular does (one + // example is jQuery UI). Instead, set a flag indicating scope destroying should be + // skipped this one time. + skipDestroyOnNextJQueryCleanData = true; + jQuery.cleanData([firstElementToRemove]); + } + } + + for (var k = 1, kk = elementsToRemove.length; k < kk; k++) { + var element = elementsToRemove[k]; + jqLite(element).remove(); // must do this way to clean up expando + fragment.appendChild(element); + delete elementsToRemove[k]; + } + + elementsToRemove[0] = newNode; + elementsToRemove.length = 1; + } + + + function cloneAndAnnotateFn(fn, annotation) { + return extend(function() { return fn.apply(null, arguments); }, fn, annotation); + } + + + function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) { + try { + linkFn(scope, $element, attrs, controllers, transcludeFn); + } catch (e) { + $exceptionHandler(e, startingTag($element)); + } + } + + + // Set up $watches for isolate scope and controller bindings. This process + // only occurs for isolate scopes and new scopes with controllerAs. + function initializeDirectiveBindings(scope, attrs, destination, bindings, + directive, newScope) { + var onNewScopeDestroyed; + forEach(bindings, function(definition, scopeName) { + var attrName = definition.attrName, + optional = definition.optional, + mode = definition.mode, // @, =, or & + lastValue, + parentGet, parentSet, compare; + + if (!hasOwnProperty.call(attrs, attrName)) { + // In the case of user defined a binding with the same name as a method in Object.prototype but didn't set + // the corresponding attribute. We need to make sure subsequent code won't access to the prototype function + attrs[attrName] = undefined; + } + + switch (mode) { + + case '@': + if (!attrs[attrName] && !optional) { + destination[scopeName] = undefined; + } + + attrs.$observe(attrName, function(value) { + destination[scopeName] = value; + }); + attrs.$$observers[attrName].$$scope = scope; + if (attrs[attrName]) { + // If the attribute has been provided then we trigger an interpolation to ensure + // the value is there for use in the link fn + destination[scopeName] = $interpolate(attrs[attrName])(scope); + } + break; + + case '=': + if (optional && !attrs[attrName]) { + return; + } + parentGet = $parse(attrs[attrName]); + + if (parentGet.literal) { + compare = equals; + } else { + compare = function(a, b) { return a === b || (a !== a && b !== b); }; + } + parentSet = parentGet.assign || function() { + // reset the change, or we will throw this exception on every $digest + lastValue = destination[scopeName] = parentGet(scope); + throw $compileMinErr('nonassign', + "Expression '{0}' used with directive '{1}' is non-assignable!", + attrs[attrName], directive.name); + }; + lastValue = destination[scopeName] = parentGet(scope); + var parentValueWatch = function parentValueWatch(parentValue) { + if (!compare(parentValue, destination[scopeName])) { + // we are out of sync and need to copy + if (!compare(parentValue, lastValue)) { + // parent changed and it has precedence + destination[scopeName] = parentValue; + } else { + // if the parent can be assigned then do so + parentSet(scope, parentValue = destination[scopeName]); + } + } + return lastValue = parentValue; + }; + parentValueWatch.$stateful = true; + var unwatch; + if (definition.collection) { + unwatch = scope.$watchCollection(attrs[attrName], parentValueWatch); + } else { + unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal); + } + onNewScopeDestroyed = (onNewScopeDestroyed || []); + onNewScopeDestroyed.push(unwatch); + break; + + case '&': + parentGet = $parse(attrs[attrName]); + + // Don't assign noop to destination if expression is not valid + if (parentGet === noop && optional) break; + + destination[scopeName] = function(locals) { + return parentGet(scope, locals); + }; + break; + } + }); + var destroyBindings = onNewScopeDestroyed ? function destroyBindings() { + for (var i = 0, ii = onNewScopeDestroyed.length; i < ii; ++i) { + onNewScopeDestroyed[i](); + } + } : noop; + if (newScope && destroyBindings !== noop) { + newScope.$on('$destroy', destroyBindings); + return noop; + } + return destroyBindings; + } + }]; +} + +var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i; +/** + * Converts all accepted directives format into proper directive name. + * @param name Name to normalize + */ +function directiveNormalize(name) { + return camelCase(name.replace(PREFIX_REGEXP, '')); +} + +/** + * @ngdoc type + * @name $compile.directive.Attributes + * + * @description + * A shared object between directive compile / linking functions which contains normalized DOM + * element attributes. The values reflect current binding state `{{ }}`. The normalization is + * needed since all of these are treated as equivalent in Angular: + * + * ``` + * + * ``` + */ + +/** + * @ngdoc property + * @name $compile.directive.Attributes#$attr + * + * @description + * A map of DOM element attribute names to the normalized name. This is + * needed to do reverse lookup from normalized name back to actual name. + */ + + +/** + * @ngdoc method + * @name $compile.directive.Attributes#$set + * @kind function + * + * @description + * Set DOM element attribute value. + * + * + * @param {string} name Normalized element attribute name of the property to modify. The name is + * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr} + * property to the original name. + * @param {string} value Value to set the attribute to. The value can be an interpolated string. + */ + + + +/** + * Closure compiler type information + */ + +function nodesetLinkingFn( + /* angular.Scope */ scope, + /* NodeList */ nodeList, + /* Element */ rootElement, + /* function(Function) */ boundTranscludeFn +) {} + +function directiveLinkingFn( + /* nodesetLinkingFn */ nodesetLinkingFn, + /* angular.Scope */ scope, + /* Node */ node, + /* Element */ rootElement, + /* function(Function) */ boundTranscludeFn +) {} + +function tokenDifference(str1, str2) { + var values = '', + tokens1 = str1.split(/\s+/), + tokens2 = str2.split(/\s+/); + + outer: + for (var i = 0; i < tokens1.length; i++) { + var token = tokens1[i]; + for (var j = 0; j < tokens2.length; j++) { + if (token == tokens2[j]) continue outer; + } + values += (values.length > 0 ? ' ' : '') + token; + } + return values; +} + +function removeComments(jqNodes) { + jqNodes = jqLite(jqNodes); + var i = jqNodes.length; + + if (i <= 1) { + return jqNodes; + } + + while (i--) { + var node = jqNodes[i]; + if (node.nodeType === NODE_TYPE_COMMENT) { + splice.call(jqNodes, i, 1); + } + } + return jqNodes; +} + +var $controllerMinErr = minErr('$controller'); + + +var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/; +function identifierForController(controller, ident) { + if (ident && isString(ident)) return ident; + if (isString(controller)) { + var match = CNTRL_REG.exec(controller); + if (match) return match[3]; + } +} + + +/** + * @ngdoc provider + * @name $controllerProvider + * @description + * The {@link ng.$controller $controller service} is used by Angular to create new + * controllers. + * + * This provider allows controller registration via the + * {@link ng.$controllerProvider#register register} method. + */ +function $ControllerProvider() { + var controllers = {}, + globals = false; + + /** + * @ngdoc method + * @name $controllerProvider#register + * @param {string|Object} name Controller name, or an object map of controllers where the keys are + * the names and the values are the constructors. + * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI + * annotations in the array notation). + */ + this.register = function(name, constructor) { + assertNotHasOwnProperty(name, 'controller'); + if (isObject(name)) { + extend(controllers, name); + } else { + controllers[name] = constructor; + } + }; + + /** + * @ngdoc method + * @name $controllerProvider#allowGlobals + * @description If called, allows `$controller` to find controller constructors on `window` + */ + this.allowGlobals = function() { + globals = true; + }; + + + this.$get = ['$injector', '$window', function($injector, $window) { + + /** + * @ngdoc service + * @name $controller + * @requires $injector + * + * @param {Function|string} constructor If called with a function then it's considered to be the + * controller constructor function. Otherwise it's considered to be a string which is used + * to retrieve the controller constructor using the following steps: + * + * * check if a controller with given name is registered via `$controllerProvider` + * * check if evaluating the string on the current scope returns a constructor + * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global + * `window` object (not recommended) + * + * The string can use the `controller as property` syntax, where the controller instance is published + * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this + * to work correctly. + * + * @param {Object} locals Injection locals for Controller. + * @return {Object} Instance of given controller. + * + * @description + * `$controller` service is responsible for instantiating controllers. + * + * It's just a simple call to {@link auto.$injector $injector}, but extracted into + * a service, so that one can override this service with [BC version](https://gist.github.com/1649788). + */ + return function(expression, locals, later, ident) { + // PRIVATE API: + // param `later` --- indicates that the controller's constructor is invoked at a later time. + // If true, $controller will allocate the object with the correct + // prototype chain, but will not invoke the controller until a returned + // callback is invoked. + // param `ident` --- An optional label which overrides the label parsed from the controller + // expression, if any. + var instance, match, constructor, identifier; + later = later === true; + if (ident && isString(ident)) { + identifier = ident; + } + + if (isString(expression)) { + match = expression.match(CNTRL_REG); + if (!match) { + throw $controllerMinErr('ctrlfmt', + "Badly formed controller string '{0}'. " + + "Must match `__name__ as __id__` or `__name__`.", expression); + } + constructor = match[1], + identifier = identifier || match[3]; + expression = controllers.hasOwnProperty(constructor) + ? controllers[constructor] + : getter(locals.$scope, constructor, true) || + (globals ? getter($window, constructor, true) : undefined); + + assertArgFn(expression, constructor, true); + } + + if (later) { + // Instantiate controller later: + // This machinery is used to create an instance of the object before calling the + // controller's constructor itself. + // + // This allows properties to be added to the controller before the constructor is + // invoked. Primarily, this is used for isolate scope bindings in $compile. + // + // This feature is not intended for use by applications, and is thus not documented + // publicly. + // Object creation: http://jsperf.com/create-constructor/2 + var controllerPrototype = (isArray(expression) ? + expression[expression.length - 1] : expression).prototype; + instance = Object.create(controllerPrototype || null); + + if (identifier) { + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + + var instantiate; + return instantiate = extend(function() { + var result = $injector.invoke(expression, instance, locals, constructor); + if (result !== instance && (isObject(result) || isFunction(result))) { + instance = result; + if (identifier) { + // If result changed, re-assign controllerAs value to scope. + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + } + return instance; + }, { + instance: instance, + identifier: identifier + }); + } + + instance = $injector.instantiate(expression, locals, constructor); + + if (identifier) { + addIdentifier(locals, identifier, instance, constructor || expression.name); + } + + return instance; + }; + + function addIdentifier(locals, identifier, instance, name) { + if (!(locals && isObject(locals.$scope))) { + throw minErr('$controller')('noscp', + "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.", + name, identifier); + } + + locals.$scope[identifier] = instance; + } + }]; +} + +/** + * @ngdoc service + * @name $document + * @requires $window + * + * @description + * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object. + * + * @example + + +
+

$document title:

+

window.document title:

+
+
+ + angular.module('documentExample', []) + .controller('ExampleController', ['$scope', '$document', function($scope, $document) { + $scope.title = $document[0].title; + $scope.windowTitle = angular.element(window.document)[0].title; + }]); + +
+ */ +function $DocumentProvider() { + this.$get = ['$window', function(window) { + return jqLite(window.document); + }]; +} + +/** + * @ngdoc service + * @name $exceptionHandler + * @requires ng.$log + * + * @description + * Any uncaught exception in angular expressions is delegated to this service. + * The default implementation simply delegates to `$log.error` which logs it into + * the browser console. + * + * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by + * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing. + * + * ## Example: + * + * ```js + * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() { + * return function(exception, cause) { + * exception.message += ' (caused by "' + cause + '")'; + * throw exception; + * }; + * }); + * ``` + * + * This example will override the normal action of `$exceptionHandler`, to make angular + * exceptions fail hard when they happen, instead of just logging to the console. + * + *
+ * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind` + * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler} + * (unless executed during a digest). + * + * If you wish, you can manually delegate exceptions, e.g. + * `try { ... } catch(e) { $exceptionHandler(e); }` + * + * @param {Error} exception Exception associated with the error. + * @param {string=} cause optional information about the context in which + * the error was thrown. + * + */ +function $ExceptionHandlerProvider() { + this.$get = ['$log', function($log) { + return function(exception, cause) { + $log.error.apply($log, arguments); + }; + }]; +} + +var APPLICATION_JSON = 'application/json'; +var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'}; +var JSON_START = /^\[|^\{(?!\{)/; +var JSON_ENDS = { + '[': /]$/, + '{': /}$/ +}; +var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/; + +function serializeValue(v) { + if (isObject(v)) { + return isDate(v) ? v.toISOString() : toJson(v); + } + return v; +} + + +function $HttpParamSerializerProvider() { + /** + * @ngdoc service + * @name $httpParamSerializer + * @description + * + * Default {@link $http `$http`} params serializer that converts objects to strings + * according to the following rules: + * + * * `{'foo': 'bar'}` results in `foo=bar` + * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object) + * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element) + * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object) + * + * Note that serializer will sort the request parameters alphabetically. + * */ + + this.$get = function() { + return function ngParamSerializer(params) { + if (!params) return ''; + var parts = []; + forEachSorted(params, function(value, key) { + if (value === null || isUndefined(value)) return; + if (isArray(value)) { + forEach(value, function(v, k) { + parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v))); + }); + } else { + parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value))); + } + }); + + return parts.join('&'); + }; + }; +} + +function $HttpParamSerializerJQLikeProvider() { + /** + * @ngdoc service + * @name $httpParamSerializerJQLike + * @description + * + * Alternative {@link $http `$http`} params serializer that follows + * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic. + * The serializer will also sort the params alphabetically. + * + * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property: + * + * ```js + * $http({ + * url: myUrl, + * method: 'GET', + * params: myParams, + * paramSerializer: '$httpParamSerializerJQLike' + * }); + * ``` + * + * It is also possible to set it as the default `paramSerializer` in the + * {@link $httpProvider#defaults `$httpProvider`}. + * + * Additionally, you can inject the serializer and use it explicitly, for example to serialize + * form data for submission: + * + * ```js + * .controller(function($http, $httpParamSerializerJQLike) { + * //... + * + * $http({ + * url: myUrl, + * method: 'POST', + * data: $httpParamSerializerJQLike(myData), + * headers: { + * 'Content-Type': 'application/x-www-form-urlencoded' + * } + * }); + * + * }); + * ``` + * + * */ + this.$get = function() { + return function jQueryLikeParamSerializer(params) { + if (!params) return ''; + var parts = []; + serialize(params, '', true); + return parts.join('&'); + + function serialize(toSerialize, prefix, topLevel) { + if (toSerialize === null || isUndefined(toSerialize)) return; + if (isArray(toSerialize)) { + forEach(toSerialize, function(value) { + serialize(value, prefix + '[]'); + }); + } else if (isObject(toSerialize) && !isDate(toSerialize)) { + forEachSorted(toSerialize, function(value, key) { + serialize(value, prefix + + (topLevel ? '' : '[') + + key + + (topLevel ? '' : ']')); + }); + } else { + parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize))); + } + } + }; + }; +} + +function defaultHttpResponseTransform(data, headers) { + if (isString(data)) { + // Strip json vulnerability protection prefix and trim whitespace + var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim(); + + if (tempData) { + var contentType = headers('Content-Type'); + if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) { + data = fromJson(tempData); + } + } + } + + return data; +} + +function isJsonLike(str) { + var jsonStart = str.match(JSON_START); + return jsonStart && JSON_ENDS[jsonStart[0]].test(str); +} + +/** + * Parse headers into key value object + * + * @param {string} headers Raw headers as a string + * @returns {Object} Parsed headers as key value object + */ +function parseHeaders(headers) { + var parsed = createMap(), i; + + function fillInParsed(key, val) { + if (key) { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + + if (isString(headers)) { + forEach(headers.split('\n'), function(line) { + i = line.indexOf(':'); + fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1))); + }); + } else if (isObject(headers)) { + forEach(headers, function(headerVal, headerKey) { + fillInParsed(lowercase(headerKey), trim(headerVal)); + }); + } + + return parsed; +} + + +/** + * Returns a function that provides access to parsed headers. + * + * Headers are lazy parsed when first requested. + * @see parseHeaders + * + * @param {(string|Object)} headers Headers to provide access to. + * @returns {function(string=)} Returns a getter function which if called with: + * + * - if called with single an argument returns a single header value or null + * - if called with no arguments returns an object containing all headers. + */ +function headersGetter(headers) { + var headersObj; + + return function(name) { + if (!headersObj) headersObj = parseHeaders(headers); + + if (name) { + var value = headersObj[lowercase(name)]; + if (value === void 0) { + value = null; + } + return value; + } + + return headersObj; + }; +} + + +/** + * Chain all given functions + * + * This function is used for both request and response transforming + * + * @param {*} data Data to transform. + * @param {function(string=)} headers HTTP headers getter fn. + * @param {number} status HTTP status code of the response. + * @param {(Function|Array.)} fns Function or an array of functions. + * @returns {*} Transformed data. + */ +function transformData(data, headers, status, fns) { + if (isFunction(fns)) { + return fns(data, headers, status); + } + + forEach(fns, function(fn) { + data = fn(data, headers, status); + }); + + return data; +} + + +function isSuccess(status) { + return 200 <= status && status < 300; +} + + +/** + * @ngdoc provider + * @name $httpProvider + * @description + * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service. + * */ +function $HttpProvider() { + /** + * @ngdoc property + * @name $httpProvider#defaults + * @description + * + * Object containing default values for all {@link ng.$http $http} requests. + * + * - **`defaults.cache`** - {Object} - an object built with {@link ng.$cacheFactory `$cacheFactory`} + * that will provide the cache for all requests who set their `cache` property to `true`. + * If you set the `defaults.cache = false` then only requests that specify their own custom + * cache object will be cached. See {@link $http#caching $http Caching} for more information. + * + * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token. + * Defaults value is `'XSRF-TOKEN'`. + * + * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the + * XSRF token. Defaults value is `'X-XSRF-TOKEN'`. + * + * - **`defaults.headers`** - {Object} - Default headers for all $http requests. + * Refer to {@link ng.$http#setting-http-headers $http} for documentation on + * setting default headers. + * - **`defaults.headers.common`** + * - **`defaults.headers.post`** + * - **`defaults.headers.put`** + * - **`defaults.headers.patch`** + * + * + * - **`defaults.paramSerializer`** - `{string|function(Object):string}` - A function + * used to the prepare string representation of request parameters (specified as an object). + * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}. + * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}. + * + **/ + var defaults = this.defaults = { + // transform incoming response data + transformResponse: [defaultHttpResponseTransform], + + // transform outgoing request data + transformRequest: [function(d) { + return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d; + }], + + // default headers + headers: { + common: { + 'Accept': 'application/json, text/plain, */*' + }, + post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), + put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), + patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON) + }, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + paramSerializer: '$httpParamSerializer' + }; + + var useApplyAsync = false; + /** + * @ngdoc method + * @name $httpProvider#useApplyAsync + * @description + * + * Configure $http service to combine processing of multiple http responses received at around + * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in + * significant performance improvement for bigger applications that make many HTTP requests + * concurrently (common during application bootstrap). + * + * Defaults to false. If no value is specified, returns the current configured value. + * + * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred + * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window + * to load and share the same digest cycle. + * + * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining. + * otherwise, returns the current configured value. + **/ + this.useApplyAsync = function(value) { + if (isDefined(value)) { + useApplyAsync = !!value; + return this; + } + return useApplyAsync; + }; + + /** + * @ngdoc property + * @name $httpProvider#interceptors + * @description + * + * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http} + * pre-processing of request or postprocessing of responses. + * + * These service factories are ordered by request, i.e. they are applied in the same order as the + * array, on request, but reverse order, on response. + * + * {@link ng.$http#interceptors Interceptors detailed info} + **/ + var interceptorFactories = this.interceptors = []; + + this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', + function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) { + + var defaultCache = $cacheFactory('$http'); + + /** + * Make sure that default param serializer is exposed as a function + */ + defaults.paramSerializer = isString(defaults.paramSerializer) ? + $injector.get(defaults.paramSerializer) : defaults.paramSerializer; + + /** + * Interceptors stored in reverse order. Inner interceptors before outer interceptors. + * The reversal is needed so that we can build up the interception chain around the + * server request. + */ + var reversedInterceptors = []; + + forEach(interceptorFactories, function(interceptorFactory) { + reversedInterceptors.unshift(isString(interceptorFactory) + ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory)); + }); + + /** + * @ngdoc service + * @kind function + * @name $http + * @requires ng.$httpBackend + * @requires $cacheFactory + * @requires $rootScope + * @requires $q + * @requires $injector + * + * @description + * The `$http` service is a core Angular service that facilitates communication with the remote + * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest) + * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP). + * + * For unit testing applications that use `$http` service, see + * {@link ngMock.$httpBackend $httpBackend mock}. + * + * For a higher level of abstraction, please check out the {@link ngResource.$resource + * $resource} service. + * + * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by + * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage + * it is important to familiarize yourself with these APIs and the guarantees they provide. + * + * + * ## General usage + * The `$http` service is a function which takes a single argument — a configuration object — + * that is used to generate an HTTP request and returns a {@link ng.$q promise} + * with two $http specific methods: `success` and `error`. + * + * ```js + * // Simple GET request example : + * $http.get('/someUrl'). + * success(function(data, status, headers, config) { + * // this callback will be called asynchronously + * // when the response is available + * }). + * error(function(data, status, headers, config) { + * // called asynchronously if an error occurs + * // or server returns response with an error status. + * }); + * ``` + * + * ```js + * // Simple POST request example (passing data) : + * $http.post('/someUrl', {msg:'hello word!'}). + * success(function(data, status, headers, config) { + * // this callback will be called asynchronously + * // when the response is available + * }). + * error(function(data, status, headers, config) { + * // called asynchronously if an error occurs + * // or server returns response with an error status. + * }); + * ``` + * + * + * Since the returned value of calling the $http function is a `promise`, you can also use + * the `then` method to register callbacks, and these callbacks will receive a single argument – + * an object representing the response. See the API signature and type info below for more + * details. + * + * A response status code between 200 and 299 is considered a success status and + * will result in the success callback being called. Note that if the response is a redirect, + * XMLHttpRequest will transparently follow it, meaning that the error callback will not be + * called for such responses. + * + * ## Writing Unit Tests that use $http + * When unit testing (using {@link ngMock ngMock}), it is necessary to call + * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending + * request using trained responses. + * + * ``` + * $httpBackend.expectGET(...); + * $http.get(...); + * $httpBackend.flush(); + * ``` + * + * ## Shortcut methods + * + * Shortcut methods are also available. All shortcut methods require passing in the URL, and + * request data must be passed in for POST/PUT requests. + * + * ```js + * $http.get('/someUrl').success(successCallback); + * $http.post('/someUrl', data).success(successCallback); + * ``` + * + * Complete list of shortcut methods: + * + * - {@link ng.$http#get $http.get} + * - {@link ng.$http#head $http.head} + * - {@link ng.$http#post $http.post} + * - {@link ng.$http#put $http.put} + * - {@link ng.$http#delete $http.delete} + * - {@link ng.$http#jsonp $http.jsonp} + * - {@link ng.$http#patch $http.patch} + * + * + * ## Setting HTTP Headers + * + * The $http service will automatically add certain HTTP headers to all requests. These defaults + * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration + * object, which currently contains this default configuration: + * + * - `$httpProvider.defaults.headers.common` (headers that are common for all requests): + * - `Accept: application/json, text/plain, * / *` + * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests) + * - `Content-Type: application/json` + * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests) + * - `Content-Type: application/json` + * + * To add or overwrite these defaults, simply add or remove a property from these configuration + * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object + * with the lowercased HTTP method name as the key, e.g. + * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`. + * + * The defaults can also be set at runtime via the `$http.defaults` object in the same + * fashion. For example: + * + * ``` + * module.run(function($http) { + * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w' + * }); + * ``` + * + * In addition, you can supply a `headers` property in the config object passed when + * calling `$http(config)`, which overrides the defaults without changing them globally. + * + * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis, + * Use the `headers` property, setting the desired header to `undefined`. For example: + * + * ```js + * var req = { + * method: 'POST', + * url: 'http://example.com', + * headers: { + * 'Content-Type': undefined + * }, + * data: { test: 'test' } + * } + * + * $http(req).success(function(){...}).error(function(){...}); + * ``` + * + * ## Transforming Requests and Responses + * + * Both requests and responses can be transformed using transformation functions: `transformRequest` + * and `transformResponse`. These properties can be a single function that returns + * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions, + * which allows you to `push` or `unshift` a new transformation function into the transformation chain. + * + * ### Default Transformations + * + * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and + * `defaults.transformResponse` properties. If a request does not provide its own transformations + * then these will be applied. + * + * You can augment or replace the default transformations by modifying these properties by adding to or + * replacing the array. + * + * Angular provides the following default transformations: + * + * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`): + * + * - If the `data` property of the request configuration object contains an object, serialize it + * into JSON format. + * + * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`): + * + * - If XSRF prefix is detected, strip it (see Security Considerations section below). + * - If JSON response is detected, deserialize it using a JSON parser. + * + * + * ### Overriding the Default Transformations Per Request + * + * If you wish override the request/response transformations only for a single request then provide + * `transformRequest` and/or `transformResponse` properties on the configuration object passed + * into `$http`. + * + * Note that if you provide these properties on the config object the default transformations will be + * overwritten. If you wish to augment the default transformations then you must include them in your + * local transformation array. + * + * The following code demonstrates adding a new response transformation to be run after the default response + * transformations have been run. + * + * ```js + * function appendTransform(defaults, transform) { + * + * // We can't guarantee that the default transformation is an array + * defaults = angular.isArray(defaults) ? defaults : [defaults]; + * + * // Append the new transformation to the defaults + * return defaults.concat(transform); + * } + * + * $http({ + * url: '...', + * method: 'GET', + * transformResponse: appendTransform($http.defaults.transformResponse, function(value) { + * return doTransform(value); + * }) + * }); + * ``` + * + * + * ## Caching + * + * To enable caching, set the request configuration `cache` property to `true` (to use default + * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}). + * When the cache is enabled, `$http` stores the response from the server in the specified + * cache. The next time the same request is made, the response is served from the cache without + * sending a request to the server. + * + * Note that even if the response is served from cache, delivery of the data is asynchronous in + * the same way that real requests are. + * + * If there are multiple GET requests for the same URL that should be cached using the same + * cache, but the cache is not populated yet, only one request to the server will be made and + * the remaining requests will be fulfilled using the response from the first request. + * + * You can change the default cache to a new object (built with + * {@link ng.$cacheFactory `$cacheFactory`}) by updating the + * {@link ng.$http#defaults `$http.defaults.cache`} property. All requests who set + * their `cache` property to `true` will now use this cache object. + * + * If you set the default cache to `false` then only requests that specify their own custom + * cache object will be cached. + * + * ## Interceptors + * + * Before you start creating interceptors, be sure to understand the + * {@link ng.$q $q and deferred/promise APIs}. + * + * For purposes of global error handling, authentication, or any kind of synchronous or + * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be + * able to intercept requests before they are handed to the server and + * responses before they are handed over to the application code that + * initiated these requests. The interceptors leverage the {@link ng.$q + * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing. + * + * The interceptors are service factories that are registered with the `$httpProvider` by + * adding them to the `$httpProvider.interceptors` array. The factory is called and + * injected with dependencies (if specified) and returns the interceptor. + * + * There are two kinds of interceptors (and two kinds of rejection interceptors): + * + * * `request`: interceptors get called with a http `config` object. The function is free to + * modify the `config` object or create a new one. The function needs to return the `config` + * object directly, or a promise containing the `config` or a new `config` object. + * * `requestError`: interceptor gets called when a previous interceptor threw an error or + * resolved with a rejection. + * * `response`: interceptors get called with http `response` object. The function is free to + * modify the `response` object or create a new one. The function needs to return the `response` + * object directly, or as a promise containing the `response` or a new `response` object. + * * `responseError`: interceptor gets called when a previous interceptor threw an error or + * resolved with a rejection. + * + * + * ```js + * // register the interceptor as a service + * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { + * return { + * // optional method + * 'request': function(config) { + * // do something on success + * return config; + * }, + * + * // optional method + * 'requestError': function(rejection) { + * // do something on error + * if (canRecover(rejection)) { + * return responseOrNewPromise + * } + * return $q.reject(rejection); + * }, + * + * + * + * // optional method + * 'response': function(response) { + * // do something on success + * return response; + * }, + * + * // optional method + * 'responseError': function(rejection) { + * // do something on error + * if (canRecover(rejection)) { + * return responseOrNewPromise + * } + * return $q.reject(rejection); + * } + * }; + * }); + * + * $httpProvider.interceptors.push('myHttpInterceptor'); + * + * + * // alternatively, register the interceptor via an anonymous factory + * $httpProvider.interceptors.push(function($q, dependency1, dependency2) { + * return { + * 'request': function(config) { + * // same as above + * }, + * + * 'response': function(response) { + * // same as above + * } + * }; + * }); + * ``` + * + * ## Security Considerations + * + * When designing web applications, consider security threats from: + * + * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) + * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) + * + * Both server and the client must cooperate in order to eliminate these threats. Angular comes + * pre-configured with strategies that address these issues, but for this to work backend server + * cooperation is required. + * + * ### JSON Vulnerability Protection + * + * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) + * allows third party website to turn your JSON resource URL into + * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To + * counter this your server can prefix all JSON requests with following string `")]}',\n"`. + * Angular will automatically strip the prefix before processing it as JSON. + * + * For example if your server needs to return: + * ```js + * ['one','two'] + * ``` + * + * which is vulnerable to attack, your server can return: + * ```js + * )]}', + * ['one','two'] + * ``` + * + * Angular will strip the prefix, before processing the JSON. + * + * + * ### Cross Site Request Forgery (XSRF) Protection + * + * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which + * an unauthorized site can gain your user's private data. Angular provides a mechanism + * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie + * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only + * JavaScript that runs on your domain could read the cookie, your server can be assured that + * the XHR came from JavaScript running on your domain. The header will not be set for + * cross-domain requests. + * + * To take advantage of this, your server needs to set a token in a JavaScript readable session + * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the + * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure + * that only JavaScript running on your domain could have sent the request. The token must be + * unique for each user and must be verifiable by the server (to prevent the JavaScript from + * making up its own tokens). We recommend that the token is a digest of your site's + * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) + * for added security. + * + * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName + * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time, + * or the per-request config object. + * + * In order to prevent collisions in environments where multiple Angular apps share the + * same domain or subdomain, we recommend that each application uses unique cookie name. + * + * + * @param {object} config Object describing the request to be made and how it should be + * processed. The object has following properties: + * + * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc) + * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested. + * - **params** – `{Object.}` – Map of strings or objects which will be serialized + * with the `paramSerializer` and appended as GET parameters. + * - **data** – `{string|Object}` – Data to be sent as the request message data. + * - **headers** – `{Object}` – Map of strings or functions which return strings representing + * HTTP headers to send to the server. If the return value of a function is null, the + * header will not be sent. Functions accept a config object as an argument. + * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token. + * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token. + * - **transformRequest** – + * `{function(data, headersGetter)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * See {@link ng.$http#overriding-the-default-transformations-per-request + * Overriding the Default Transformations} + * - **transformResponse** – + * `{function(data, headersGetter, status)|Array.}` – + * transform function or an array of such functions. The transform function takes the http + * response body, headers and status and returns its transformed (typically deserialized) version. + * See {@link ng.$http#overriding-the-default-transformations-per-request + * Overriding the Default TransformationjqLiks} + * - **paramSerializer** - `{string|function(Object):string}` - A function used to + * prepare the string representation of request parameters (specified as an object). + * If specified as string, it is interpreted as function registered with the + * {@link $injector $injector}, which means you can create your own serializer + * by registering it as a {@link auto.$provide#service service}. + * The default serializer is the {@link $httpParamSerializer $httpParamSerializer}; + * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike} + * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the + * GET request, otherwise if a cache instance built with + * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for + * caching. + * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} + * that should abort the request when resolved. + * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials) + * for more information. + * - **responseType** - `{string}` - see + * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype). + * + * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the + * standard `then` method and two http specific methods: `success` and `error`. The `then` + * method takes two arguments a success and an error callback which will be called with a + * response object. The `success` and `error` methods take a single argument - a function that + * will be called when the request succeeds or fails respectively. The arguments passed into + * these functions are destructured representation of the response object passed into the + * `then` method. The response object has these properties: + * + * - **data** – `{string|Object}` – The response body transformed with the transform + * functions. + * - **status** – `{number}` – HTTP status code of the response. + * - **headers** – `{function([headerName])}` – Header getter function. + * - **config** – `{Object}` – The configuration object that was used to generate the request. + * - **statusText** – `{string}` – HTTP status text of the response. + * + * @property {Array.} pendingRequests Array of config objects for currently pending + * requests. This is primarily meant to be used for debugging purposes. + * + * + * @example + + +
+ + +
+ + + +
http status code: {{status}}
+
http response data: {{data}}
+
+
+ + angular.module('httpExample', []) + .controller('FetchController', ['$scope', '$http', '$templateCache', + function($scope, $http, $templateCache) { + $scope.method = 'GET'; + $scope.url = 'http-hello.html'; + + $scope.fetch = function() { + $scope.code = null; + $scope.response = null; + + $http({method: $scope.method, url: $scope.url, cache: $templateCache}). + success(function(data, status) { + $scope.status = status; + $scope.data = data; + }). + error(function(data, status) { + $scope.data = data || "Request failed"; + $scope.status = status; + }); + }; + + $scope.updateModel = function(method, url) { + $scope.method = method; + $scope.url = url; + }; + }]); + + + Hello, $http! + + + var status = element(by.binding('status')); + var data = element(by.binding('data')); + var fetchBtn = element(by.id('fetchbtn')); + var sampleGetBtn = element(by.id('samplegetbtn')); + var sampleJsonpBtn = element(by.id('samplejsonpbtn')); + var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); + + it('should make an xhr GET request', function() { + sampleGetBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('200'); + expect(data.getText()).toMatch(/Hello, \$http!/); + }); + +// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185 +// it('should make a JSONP request to angularjs.org', function() { +// sampleJsonpBtn.click(); +// fetchBtn.click(); +// expect(status.getText()).toMatch('200'); +// expect(data.getText()).toMatch(/Super Hero!/); +// }); + + it('should make JSONP request to invalid URL and invoke the error handler', + function() { + invalidJsonpBtn.click(); + fetchBtn.click(); + expect(status.getText()).toMatch('0'); + expect(data.getText()).toMatch('Request failed'); + }); + +
+ */ + function $http(requestConfig) { + + if (!angular.isObject(requestConfig)) { + throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig); + } + + var config = extend({ + method: 'get', + transformRequest: defaults.transformRequest, + transformResponse: defaults.transformResponse, + paramSerializer: defaults.paramSerializer + }, requestConfig); + + config.headers = mergeHeaders(requestConfig); + config.method = uppercase(config.method); + config.paramSerializer = isString(config.paramSerializer) ? + $injector.get(config.paramSerializer) : config.paramSerializer; + + var serverRequest = function(config) { + var headers = config.headers; + var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest); + + // strip content-type if data is undefined + if (isUndefined(reqData)) { + forEach(headers, function(value, header) { + if (lowercase(header) === 'content-type') { + delete headers[header]; + } + }); + } + + if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { + config.withCredentials = defaults.withCredentials; + } + + // send request + return sendReq(config, reqData).then(transformResponse, transformResponse); + }; + + var chain = [serverRequest, undefined]; + var promise = $q.when(config); + + // apply interceptors + forEach(reversedInterceptors, function(interceptor) { + if (interceptor.request || interceptor.requestError) { + chain.unshift(interceptor.request, interceptor.requestError); + } + if (interceptor.response || interceptor.responseError) { + chain.push(interceptor.response, interceptor.responseError); + } + }); + + while (chain.length) { + var thenFn = chain.shift(); + var rejectFn = chain.shift(); + + promise = promise.then(thenFn, rejectFn); + } + + promise.success = function(fn) { + assertArgFn(fn, 'fn'); + + promise.then(function(response) { + fn(response.data, response.status, response.headers, config); + }); + return promise; + }; + + promise.error = function(fn) { + assertArgFn(fn, 'fn'); + + promise.then(null, function(response) { + fn(response.data, response.status, response.headers, config); + }); + return promise; + }; + + return promise; + + function transformResponse(response) { + // make a copy since the response must be cacheable + var resp = extend({}, response); + if (!response.data) { + resp.data = response.data; + } else { + resp.data = transformData(response.data, response.headers, response.status, config.transformResponse); + } + return (isSuccess(response.status)) + ? resp + : $q.reject(resp); + } + + function executeHeaderFns(headers, config) { + var headerContent, processedHeaders = {}; + + forEach(headers, function(headerFn, header) { + if (isFunction(headerFn)) { + headerContent = headerFn(config); + if (headerContent != null) { + processedHeaders[header] = headerContent; + } + } else { + processedHeaders[header] = headerFn; + } + }); + + return processedHeaders; + } + + function mergeHeaders(config) { + var defHeaders = defaults.headers, + reqHeaders = extend({}, config.headers), + defHeaderName, lowercaseDefHeaderName, reqHeaderName; + + defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]); + + // using for-in instead of forEach to avoid unecessary iteration after header has been found + defaultHeadersIteration: + for (defHeaderName in defHeaders) { + lowercaseDefHeaderName = lowercase(defHeaderName); + + for (reqHeaderName in reqHeaders) { + if (lowercase(reqHeaderName) === lowercaseDefHeaderName) { + continue defaultHeadersIteration; + } + } + + reqHeaders[defHeaderName] = defHeaders[defHeaderName]; + } + + // execute if header value is a function for merged headers + return executeHeaderFns(reqHeaders, shallowCopy(config)); + } + } + + $http.pendingRequests = []; + + /** + * @ngdoc method + * @name $http#get + * + * @description + * Shortcut method to perform `GET` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#delete + * + * @description + * Shortcut method to perform `DELETE` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#head + * + * @description + * Shortcut method to perform `HEAD` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#jsonp + * + * @description + * Shortcut method to perform `JSONP` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request. + * The name of the callback should be the string `JSON_CALLBACK`. + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + createShortMethods('get', 'delete', 'head', 'jsonp'); + + /** + * @ngdoc method + * @name $http#post + * + * @description + * Shortcut method to perform `POST` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#put + * + * @description + * Shortcut method to perform `PUT` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + + /** + * @ngdoc method + * @name $http#patch + * + * @description + * Shortcut method to perform `PATCH` request. + * + * @param {string} url Relative or absolute URL specifying the destination of the request + * @param {*} data Request content + * @param {Object=} config Optional configuration object + * @returns {HttpPromise} Future object + */ + createShortMethodsWithData('post', 'put', 'patch'); + + /** + * @ngdoc property + * @name $http#defaults + * + * @description + * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of + * default headers, withCredentials as well as request and response transformations. + * + * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above. + */ + $http.defaults = defaults; + + + return $http; + + + function createShortMethods(names) { + forEach(arguments, function(name) { + $http[name] = function(url, config) { + return $http(extend({}, config || {}, { + method: name, + url: url + })); + }; + }); + } + + + function createShortMethodsWithData(name) { + forEach(arguments, function(name) { + $http[name] = function(url, data, config) { + return $http(extend({}, config || {}, { + method: name, + url: url, + data: data + })); + }; + }); + } + + + /** + * Makes the request. + * + * !!! ACCESSES CLOSURE VARS: + * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests + */ + function sendReq(config, reqData) { + var deferred = $q.defer(), + promise = deferred.promise, + cache, + cachedResp, + reqHeaders = config.headers, + url = buildUrl(config.url, config.paramSerializer(config.params)); + + $http.pendingRequests.push(config); + promise.then(removePendingReq, removePendingReq); + + + if ((config.cache || defaults.cache) && config.cache !== false && + (config.method === 'GET' || config.method === 'JSONP')) { + cache = isObject(config.cache) ? config.cache + : isObject(defaults.cache) ? defaults.cache + : defaultCache; + } + + if (cache) { + cachedResp = cache.get(url); + if (isDefined(cachedResp)) { + if (isPromiseLike(cachedResp)) { + // cached request has already been sent, but there is no response yet + cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult); + } else { + // serving from cache + if (isArray(cachedResp)) { + resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]); + } else { + resolvePromise(cachedResp, 200, {}, 'OK'); + } + } + } else { + // put the promise for the non-transformed response into cache as a placeholder + cache.put(url, promise); + } + } + + + // if we won't have the response in cache, set the xsrf headers and + // send the request to the backend + if (isUndefined(cachedResp)) { + var xsrfValue = urlIsSameOrigin(config.url) + ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName] + : undefined; + if (xsrfValue) { + reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue; + } + + $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout, + config.withCredentials, config.responseType); + } + + return promise; + + + /** + * Callback registered to $httpBackend(): + * - caches the response if desired + * - resolves the raw $http promise + * - calls $apply + */ + function done(status, response, headersString, statusText) { + if (cache) { + if (isSuccess(status)) { + cache.put(url, [status, response, parseHeaders(headersString), statusText]); + } else { + // remove promise from the cache + cache.remove(url); + } + } + + function resolveHttpPromise() { + resolvePromise(response, status, headersString, statusText); + } + + if (useApplyAsync) { + $rootScope.$applyAsync(resolveHttpPromise); + } else { + resolveHttpPromise(); + if (!$rootScope.$$phase) $rootScope.$apply(); + } + } + + + /** + * Resolves the raw $http promise. + */ + function resolvePromise(response, status, headers, statusText) { + // normalize internal statuses to 0 + status = Math.max(status, 0); + + (isSuccess(status) ? deferred.resolve : deferred.reject)({ + data: response, + status: status, + headers: headersGetter(headers), + config: config, + statusText: statusText + }); + } + + function resolvePromiseWithResult(result) { + resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText); + } + + function removePendingReq() { + var idx = $http.pendingRequests.indexOf(config); + if (idx !== -1) $http.pendingRequests.splice(idx, 1); + } + } + + + function buildUrl(url, serializedParams) { + if (serializedParams.length > 0) { + url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams; + } + return url; + } + }]; +} + +function createXhr() { + return new window.XMLHttpRequest(); +} + +/** + * @ngdoc service + * @name $httpBackend + * @requires $window + * @requires $document + * + * @description + * HTTP backend used by the {@link ng.$http service} that delegates to + * XMLHttpRequest object or JSONP and deals with browser incompatibilities. + * + * You should never need to use this service directly, instead use the higher-level abstractions: + * {@link ng.$http $http} or {@link ngResource.$resource $resource}. + * + * During testing this implementation is swapped with {@link ngMock.$httpBackend mock + * $httpBackend} which can be trained with responses. + */ +function $HttpBackendProvider() { + this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) { + return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]); + }]; +} + +function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) { + // TODO(vojta): fix the signature + return function(method, url, post, callback, headers, timeout, withCredentials, responseType) { + $browser.$$incOutstandingRequestCount(); + url = url || $browser.url(); + + if (lowercase(method) == 'jsonp') { + var callbackId = '_' + (callbacks.counter++).toString(36); + callbacks[callbackId] = function(data) { + callbacks[callbackId].data = data; + callbacks[callbackId].called = true; + }; + + var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId), + callbackId, function(status, text) { + completeRequest(callback, status, callbacks[callbackId].data, "", text); + callbacks[callbackId] = noop; + }); + } else { + + var xhr = createXhr(); + + xhr.open(method, url, true); + forEach(headers, function(value, key) { + if (isDefined(value)) { + xhr.setRequestHeader(key, value); + } + }); + + xhr.onload = function requestLoaded() { + var statusText = xhr.statusText || ''; + + // responseText is the old-school way of retrieving response (supported by IE8 & 9) + // response/responseType properties were introduced in XHR Level2 spec (supported by IE10) + var response = ('response' in xhr) ? xhr.response : xhr.responseText; + + // normalize IE9 bug (http://bugs.jquery.com/ticket/1450) + var status = xhr.status === 1223 ? 204 : xhr.status; + + // fix status code when it is 0 (0 status is undocumented). + // Occurs when accessing file resources or on Android 4.1 stock browser + // while retrieving files from application cache. + if (status === 0) { + status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0; + } + + completeRequest(callback, + status, + response, + xhr.getAllResponseHeaders(), + statusText); + }; + + var requestError = function() { + // The response is always empty + // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error + completeRequest(callback, -1, null, null, ''); + }; + + xhr.onerror = requestError; + xhr.onabort = requestError; + + if (withCredentials) { + xhr.withCredentials = true; + } + + if (responseType) { + try { + xhr.responseType = responseType; + } catch (e) { + // WebKit added support for the json responseType value on 09/03/2013 + // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are + // known to throw when setting the value "json" as the response type. Other older + // browsers implementing the responseType + // + // The json response type can be ignored if not supported, because JSON payloads are + // parsed on the client-side regardless. + if (responseType !== 'json') { + throw e; + } + } + } + + xhr.send(post); + } + + if (timeout > 0) { + var timeoutId = $browserDefer(timeoutRequest, timeout); + } else if (isPromiseLike(timeout)) { + timeout.then(timeoutRequest); + } + + + function timeoutRequest() { + jsonpDone && jsonpDone(); + xhr && xhr.abort(); + } + + function completeRequest(callback, status, response, headersString, statusText) { + // cancel timeout and subsequent timeout promise resolution + if (timeoutId !== undefined) { + $browserDefer.cancel(timeoutId); + } + jsonpDone = xhr = null; + + callback(status, response, headersString, statusText); + $browser.$$completeOutstandingRequest(noop); + } + }; + + function jsonpReq(url, callbackId, done) { + // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.: + // - fetches local scripts via XHR and evals them + // - adds and immediately removes script elements from the document + var script = rawDocument.createElement('script'), callback = null; + script.type = "text/javascript"; + script.src = url; + script.async = true; + + callback = function(event) { + removeEventListenerFn(script, "load", callback); + removeEventListenerFn(script, "error", callback); + rawDocument.body.removeChild(script); + script = null; + var status = -1; + var text = "unknown"; + + if (event) { + if (event.type === "load" && !callbacks[callbackId].called) { + event = { type: "error" }; + } + text = event.type; + status = event.type === "error" ? 404 : 200; + } + + if (done) { + done(status, text); + } + }; + + addEventListenerFn(script, "load", callback); + addEventListenerFn(script, "error", callback); + rawDocument.body.appendChild(script); + return callback; + } +} + +var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate'); +$interpolateMinErr.throwNoconcat = function(text) { + throw $interpolateMinErr('noconcat', + "Error while interpolating: {0}\nStrict Contextual Escaping disallows " + + "interpolations that concatenate multiple expressions when a trusted value is " + + "required. See http://docs.angularjs.org/api/ng.$sce", text); +}; + +$interpolateMinErr.interr = function(text, err) { + return $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, err.toString()); +}; + +/** + * @ngdoc provider + * @name $interpolateProvider + * + * @description + * + * Used for configuring the interpolation markup. Defaults to `{{` and `}}`. + * + * @example + + + +
+ //demo.label// +
+
+ + it('should interpolate binding with custom symbols', function() { + expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); + }); + +
+ */ +function $InterpolateProvider() { + var startSymbol = '{{'; + var endSymbol = '}}'; + + /** + * @ngdoc method + * @name $interpolateProvider#startSymbol + * @description + * Symbol to denote start of expression in the interpolated string. Defaults to `{{`. + * + * @param {string=} value new value to set the starting symbol to. + * @returns {string|self} Returns the symbol when used as getter and self if used as setter. + */ + this.startSymbol = function(value) { + if (value) { + startSymbol = value; + return this; + } else { + return startSymbol; + } + }; + + /** + * @ngdoc method + * @name $interpolateProvider#endSymbol + * @description + * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. + * + * @param {string=} value new value to set the ending symbol to. + * @returns {string|self} Returns the symbol when used as getter and self if used as setter. + */ + this.endSymbol = function(value) { + if (value) { + endSymbol = value; + return this; + } else { + return endSymbol; + } + }; + + + this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) { + var startSymbolLength = startSymbol.length, + endSymbolLength = endSymbol.length, + escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'), + escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g'); + + function escape(ch) { + return '\\\\\\' + ch; + } + + function unescapeText(text) { + return text.replace(escapedStartRegexp, startSymbol). + replace(escapedEndRegexp, endSymbol); + } + + function stringify(value) { + if (value == null) { // null || undefined + return ''; + } + switch (typeof value) { + case 'string': + break; + case 'number': + value = '' + value; + break; + default: + value = toJson(value); + } + + return value; + } + + /** + * @ngdoc service + * @name $interpolate + * @kind function + * + * @requires $parse + * @requires $sce + * + * @description + * + * Compiles a string with markup into an interpolation function. This service is used by the + * HTML {@link ng.$compile $compile} service for data binding. See + * {@link ng.$interpolateProvider $interpolateProvider} for configuring the + * interpolation markup. + * + * + * ```js + * var $interpolate = ...; // injected + * var exp = $interpolate('Hello {{name | uppercase}}!'); + * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!'); + * ``` + * + * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is + * `true`, the interpolation function will return `undefined` unless all embedded expressions + * evaluate to a value other than `undefined`. + * + * ```js + * var $interpolate = ...; // injected + * var context = {greeting: 'Hello', name: undefined }; + * + * // default "forgiving" mode + * var exp = $interpolate('{{greeting}} {{name}}!'); + * expect(exp(context)).toEqual('Hello !'); + * + * // "allOrNothing" mode + * exp = $interpolate('{{greeting}} {{name}}!', false, null, true); + * expect(exp(context)).toBeUndefined(); + * context.name = 'Angular'; + * expect(exp(context)).toEqual('Hello Angular!'); + * ``` + * + * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior. + * + * ####Escaped Interpolation + * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers + * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash). + * It will be rendered as a regular start/end marker, and will not be interpreted as an expression + * or binding. + * + * This enables web-servers to prevent script injection attacks and defacing attacks, to some + * degree, while also enabling code examples to work without relying on the + * {@link ng.directive:ngNonBindable ngNonBindable} directive. + * + * **For security purposes, it is strongly encouraged that web servers escape user-supplied data, + * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all + * interpolation start/end markers with their escaped counterparts.** + * + * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered + * output when the $interpolate service processes the text. So, for HTML elements interpolated + * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter + * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such, + * this is typically useful only when user-data is used in rendering a template from the server, or + * when otherwise untrusted data is used by a directive. + * + * + * + *
+ *

{{apptitle}}: \{\{ username = "defaced value"; \}\} + *

+ *

{{username}} attempts to inject code which will deface the + * application, but fails to accomplish their task, because the server has correctly + * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) + * characters.

+ *

Instead, the result of the attempted script injection is visible, and can be removed + * from the database by an administrator.

+ *
+ *
+ *
+ * + * @param {string} text The text with markup to interpolate. + * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have + * embedded expression in order to return an interpolation function. Strings with no + * embedded expression will return null for the interpolation function. + * @param {string=} trustedContext when provided, the returned function passes the interpolated + * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult, + * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that + * provides Strict Contextual Escaping for details. + * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined + * unless all embedded expressions evaluate to a value other than `undefined`. + * @returns {function(context)} an interpolation function which is used to compute the + * interpolated string. The function has these parameters: + * + * - `context`: evaluation context for all expressions embedded in the interpolated text + */ + function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) { + allOrNothing = !!allOrNothing; + var startIndex, + endIndex, + index = 0, + expressions = [], + parseFns = [], + textLength = text.length, + exp, + concat = [], + expressionPositions = []; + + while (index < textLength) { + if (((startIndex = text.indexOf(startSymbol, index)) != -1) && + ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) { + if (index !== startIndex) { + concat.push(unescapeText(text.substring(index, startIndex))); + } + exp = text.substring(startIndex + startSymbolLength, endIndex); + expressions.push(exp); + parseFns.push($parse(exp, parseStringifyInterceptor)); + index = endIndex + endSymbolLength; + expressionPositions.push(concat.length); + concat.push(''); + } else { + // we did not find an interpolation, so we have to add the remainder to the separators array + if (index !== textLength) { + concat.push(unescapeText(text.substring(index))); + } + break; + } + } + + // Concatenating expressions makes it hard to reason about whether some combination of + // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a + // single expression be used for iframe[src], object[src], etc., we ensure that the value + // that's used is assigned or constructed by some JS code somewhere that is more testable or + // make it obvious that you bound the value to some user controlled value. This helps reduce + // the load when auditing for XSS issues. + if (trustedContext && concat.length > 1) { + $interpolateMinErr.throwNoconcat(text); + } + + if (!mustHaveExpression || expressions.length) { + var compute = function(values) { + for (var i = 0, ii = expressions.length; i < ii; i++) { + if (allOrNothing && isUndefined(values[i])) return; + concat[expressionPositions[i]] = values[i]; + } + return concat.join(''); + }; + + var getValue = function(value) { + return trustedContext ? + $sce.getTrusted(trustedContext, value) : + $sce.valueOf(value); + }; + + return extend(function interpolationFn(context) { + var i = 0; + var ii = expressions.length; + var values = new Array(ii); + + try { + for (; i < ii; i++) { + values[i] = parseFns[i](context); + } + + return compute(values); + } catch (err) { + $exceptionHandler($interpolateMinErr.interr(text, err)); + } + + }, { + // all of these properties are undocumented for now + exp: text, //just for compatibility with regular watchers created via $watch + expressions: expressions, + $$watchDelegate: function(scope, listener) { + var lastValue; + return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) { + var currValue = compute(values); + if (isFunction(listener)) { + listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope); + } + lastValue = currValue; + }); + } + }); + } + + function parseStringifyInterceptor(value) { + try { + value = getValue(value); + return allOrNothing && !isDefined(value) ? value : stringify(value); + } catch (err) { + $exceptionHandler($interpolateMinErr.interr(text, err)); + } + } + } + + + /** + * @ngdoc method + * @name $interpolate#startSymbol + * @description + * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`. + * + * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change + * the symbol. + * + * @returns {string} start symbol. + */ + $interpolate.startSymbol = function() { + return startSymbol; + }; + + + /** + * @ngdoc method + * @name $interpolate#endSymbol + * @description + * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. + * + * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change + * the symbol. + * + * @returns {string} end symbol. + */ + $interpolate.endSymbol = function() { + return endSymbol; + }; + + return $interpolate; + }]; +} + +function $IntervalProvider() { + this.$get = ['$rootScope', '$window', '$q', '$$q', + function($rootScope, $window, $q, $$q) { + var intervals = {}; + + + /** + * @ngdoc service + * @name $interval + * + * @description + * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay` + * milliseconds. + * + * The return value of registering an interval function is a promise. This promise will be + * notified upon each tick of the interval, and will be resolved after `count` iterations, or + * run indefinitely if `count` is not defined. The value of the notification will be the + * number of iterations that have run. + * To cancel an interval, call `$interval.cancel(promise)`. + * + * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to + * move forward by `millis` milliseconds and trigger any functions scheduled to run in that + * time. + * + *
+ * **Note**: Intervals created by this service must be explicitly destroyed when you are finished + * with them. In particular they are not automatically destroyed when a controller's scope or a + * directive's element are destroyed. + * You should take this into consideration and make sure to always cancel the interval at the + * appropriate moment. See the example below for more details on how and when to do this. + *
+ * + * @param {function()} fn A function that should be called repeatedly. + * @param {number} delay Number of milliseconds between each function call. + * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat + * indefinitely. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @param {...*=} Pass additional parameters to the executed function. + * @returns {promise} A promise which will be notified on each iteration. + * + * @example + * + * + * + * + *
+ *
+ *
+ * Current time is: + *
+ * Blood 1 : {{blood_1}} + * Blood 2 : {{blood_2}} + * + * + * + *
+ *
+ * + *
+ *
+ */ + function interval(fn, delay, count, invokeApply) { + var hasParams = arguments.length > 4, + args = hasParams ? sliceArgs(arguments, 4) : [], + setInterval = $window.setInterval, + clearInterval = $window.clearInterval, + iteration = 0, + skipApply = (isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise; + + count = isDefined(count) ? count : 0; + + promise.then(null, null, (!hasParams) ? fn : function() { + fn.apply(null, args); + }); + + promise.$$intervalId = setInterval(function tick() { + deferred.notify(iteration++); + + if (count > 0 && iteration >= count) { + deferred.resolve(iteration); + clearInterval(promise.$$intervalId); + delete intervals[promise.$$intervalId]; + } + + if (!skipApply) $rootScope.$apply(); + + }, delay); + + intervals[promise.$$intervalId] = deferred; + + return promise; + } + + + /** + * @ngdoc method + * @name $interval#cancel + * + * @description + * Cancels a task associated with the `promise`. + * + * @param {promise} promise returned by the `$interval` function. + * @returns {boolean} Returns `true` if the task was successfully canceled. + */ + interval.cancel = function(promise) { + if (promise && promise.$$intervalId in intervals) { + intervals[promise.$$intervalId].reject('canceled'); + $window.clearInterval(promise.$$intervalId); + delete intervals[promise.$$intervalId]; + return true; + } + return false; + }; + + return interval; + }]; +} + +/** + * @ngdoc service + * @name $locale + * + * @description + * $locale service provides localization rules for various Angular components. As of right now the + * only public api is: + * + * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`) + */ +function $LocaleProvider() { + this.$get = function() { + return { + id: 'en-us', + + NUMBER_FORMATS: { + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PATTERNS: [ + { // Decimal Pattern + minInt: 1, + minFrac: 0, + maxFrac: 3, + posPre: '', + posSuf: '', + negPre: '-', + negSuf: '', + gSize: 3, + lgSize: 3 + },{ //Currency Pattern + 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', + ERANAMES: [ + "Before Christ", + "Anno Domini" + ], + ERAS: [ + "BC", + "AD" + ] + }, + + pluralCat: function(num) { + if (num === 1) { + return 'one'; + } + return 'other'; + } + }; + }; +} + +var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/, + DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21}; +var $locationMinErr = minErr('$location'); + + +/** + * Encode path using encodeUriSegment, ignoring forward slashes + * + * @param {string} path Path to encode + * @returns {string} + */ +function encodePath(path) { + var segments = path.split('/'), + i = segments.length; + + while (i--) { + segments[i] = encodeUriSegment(segments[i]); + } + + return segments.join('/'); +} + +function parseAbsoluteUrl(absoluteUrl, locationObj) { + var parsedUrl = urlResolve(absoluteUrl); + + locationObj.$$protocol = parsedUrl.protocol; + locationObj.$$host = parsedUrl.hostname; + locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null; +} + + +function parseAppUrl(relativeUrl, locationObj) { + var prefixed = (relativeUrl.charAt(0) !== '/'); + if (prefixed) { + relativeUrl = '/' + relativeUrl; + } + var match = urlResolve(relativeUrl); + locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ? + match.pathname.substring(1) : match.pathname); + locationObj.$$search = parseKeyValue(match.search); + locationObj.$$hash = decodeURIComponent(match.hash); + + // make sure path starts with '/'; + if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') { + locationObj.$$path = '/' + locationObj.$$path; + } +} + + +/** + * + * @param {string} begin + * @param {string} whole + * @returns {string} returns text from whole after begin or undefined if it does not begin with + * expected string. + */ +function beginsWith(begin, whole) { + if (whole.indexOf(begin) === 0) { + return whole.substr(begin.length); + } +} + + +function stripHash(url) { + var index = url.indexOf('#'); + return index == -1 ? url : url.substr(0, index); +} + +function trimEmptyHash(url) { + return url.replace(/(#.+)|#$/, '$1'); +} + + +function stripFile(url) { + return url.substr(0, stripHash(url).lastIndexOf('/') + 1); +} + +/* return the server only (scheme://host:port) */ +function serverBase(url) { + return url.substring(0, url.indexOf('/', url.indexOf('//') + 2)); +} + + +/** + * LocationHtml5Url represents an url + * This object is exposed as $location service when HTML5 mode is enabled and supported + * + * @constructor + * @param {string} appBase application base URL + * @param {string} basePrefix url path prefix + */ +function LocationHtml5Url(appBase, basePrefix) { + this.$$html5 = true; + basePrefix = basePrefix || ''; + var appBaseNoFile = stripFile(appBase); + parseAbsoluteUrl(appBase, this); + + + /** + * Parse given html5 (regular) url string into properties + * @param {string} url HTML5 url + * @private + */ + this.$$parse = function(url) { + var pathUrl = beginsWith(appBaseNoFile, url); + if (!isString(pathUrl)) { + throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url, + appBaseNoFile); + } + + parseAppUrl(pathUrl, this); + + if (!this.$$path) { + this.$$path = '/'; + } + + this.$$compose(); + }; + + /** + * Compose url and update `absUrl` property + * @private + */ + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/' + }; + + this.$$parseLinkUrl = function(url, relHref) { + if (relHref && relHref[0] === '#') { + // special case for links to hash fragments: + // keep the old url and only replace the hash fragment + this.hash(relHref.slice(1)); + return true; + } + var appUrl, prevAppUrl; + var rewrittenUrl; + + if ((appUrl = beginsWith(appBase, url)) !== undefined) { + prevAppUrl = appUrl; + if ((appUrl = beginsWith(basePrefix, appUrl)) !== undefined) { + rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl); + } else { + rewrittenUrl = appBase + prevAppUrl; + } + } else if ((appUrl = beginsWith(appBaseNoFile, url)) !== undefined) { + rewrittenUrl = appBaseNoFile + appUrl; + } else if (appBaseNoFile == url + '/') { + rewrittenUrl = appBaseNoFile; + } + if (rewrittenUrl) { + this.$$parse(rewrittenUrl); + } + return !!rewrittenUrl; + }; +} + + +/** + * LocationHashbangUrl represents url + * This object is exposed as $location service when developer doesn't opt into html5 mode. + * It also serves as the base class for html5 mode fallback on legacy browsers. + * + * @constructor + * @param {string} appBase application base URL + * @param {string} hashPrefix hashbang prefix + */ +function LocationHashbangUrl(appBase, hashPrefix) { + var appBaseNoFile = stripFile(appBase); + + parseAbsoluteUrl(appBase, this); + + + /** + * Parse given hashbang url into properties + * @param {string} url Hashbang url + * @private + */ + this.$$parse = function(url) { + var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url); + var withoutHashUrl; + + if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') { + + // The rest of the url starts with a hash so we have + // got either a hashbang path or a plain hash fragment + withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl); + if (isUndefined(withoutHashUrl)) { + // There was no hashbang prefix so we just have a hash fragment + withoutHashUrl = withoutBaseUrl; + } + + } else { + // There was no hashbang path nor hash fragment: + // If we are in HTML5 mode we use what is left as the path; + // Otherwise we ignore what is left + if (this.$$html5) { + withoutHashUrl = withoutBaseUrl; + } else { + withoutHashUrl = ''; + if (isUndefined(withoutBaseUrl)) { + appBase = url; + this.replace(); + } + } + } + + parseAppUrl(withoutHashUrl, this); + + this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase); + + this.$$compose(); + + /* + * In Windows, on an anchor node on documents loaded from + * the filesystem, the browser will return a pathname + * prefixed with the drive name ('/C:/path') when a + * pathname without a drive is set: + * * a.setAttribute('href', '/foo') + * * a.pathname === '/C:/foo' //true + * + * Inside of Angular, we're always using pathnames that + * do not include drive names for routing. + */ + function removeWindowsDriveName(path, url, base) { + /* + Matches paths for file protocol on windows, + such as /C:/foo/bar, and captures only /foo/bar. + */ + var windowsFilePathExp = /^\/[A-Z]:(\/.*)/; + + var firstPathSegmentMatch; + + //Get the relative path from the input URL. + if (url.indexOf(base) === 0) { + url = url.replace(base, ''); + } + + // The input URL intentionally contains a first path segment that ends with a colon. + if (windowsFilePathExp.exec(url)) { + return path; + } + + firstPathSegmentMatch = windowsFilePathExp.exec(path); + return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path; + } + }; + + /** + * Compose hashbang url and update `absUrl` property + * @private + */ + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : ''); + }; + + this.$$parseLinkUrl = function(url, relHref) { + if (stripHash(appBase) == stripHash(url)) { + this.$$parse(url); + return true; + } + return false; + }; +} + + +/** + * LocationHashbangUrl represents url + * This object is exposed as $location service when html5 history api is enabled but the browser + * does not support it. + * + * @constructor + * @param {string} appBase application base URL + * @param {string} hashPrefix hashbang prefix + */ +function LocationHashbangInHtml5Url(appBase, hashPrefix) { + this.$$html5 = true; + LocationHashbangUrl.apply(this, arguments); + + var appBaseNoFile = stripFile(appBase); + + this.$$parseLinkUrl = function(url, relHref) { + if (relHref && relHref[0] === '#') { + // special case for links to hash fragments: + // keep the old url and only replace the hash fragment + this.hash(relHref.slice(1)); + return true; + } + + var rewrittenUrl; + var appUrl; + + if (appBase == stripHash(url)) { + rewrittenUrl = url; + } else if ((appUrl = beginsWith(appBaseNoFile, url))) { + rewrittenUrl = appBase + hashPrefix + appUrl; + } else if (appBaseNoFile === url + '/') { + rewrittenUrl = appBaseNoFile; + } + if (rewrittenUrl) { + this.$$parse(rewrittenUrl); + } + return !!rewrittenUrl; + }; + + this.$$compose = function() { + var search = toKeyValue(this.$$search), + hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; + + this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; + // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#' + this.$$absUrl = appBase + hashPrefix + this.$$url; + }; + +} + + +var locationPrototype = { + + /** + * Are we in html5 mode? + * @private + */ + $$html5: false, + + /** + * Has any change been replacing? + * @private + */ + $$replace: false, + + /** + * @ngdoc method + * @name $location#absUrl + * + * @description + * This method is getter only. + * + * Return full url representation with all segments encoded according to rules specified in + * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt). + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var absUrl = $location.absUrl(); + * // => "http://example.com/#/some/path?foo=bar&baz=xoxo" + * ``` + * + * @return {string} full url + */ + absUrl: locationGetter('$$absUrl'), + + /** + * @ngdoc method + * @name $location#url + * + * @description + * This method is getter / setter. + * + * Return url (e.g. `/path?a=b#hash`) when called without any parameter. + * + * Change path, search and hash, when called with parameter and return `$location`. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var url = $location.url(); + * // => "/some/path?foo=bar&baz=xoxo" + * ``` + * + * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`) + * @return {string} url + */ + url: function(url) { + if (isUndefined(url)) { + return this.$$url; + } + + var match = PATH_MATCH.exec(url); + if (match[1] || url === '') this.path(decodeURIComponent(match[1])); + if (match[2] || match[1] || url === '') this.search(match[3] || ''); + this.hash(match[5] || ''); + + return this; + }, + + /** + * @ngdoc method + * @name $location#protocol + * + * @description + * This method is getter only. + * + * Return protocol of current url. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var protocol = $location.protocol(); + * // => "http" + * ``` + * + * @return {string} protocol of current url + */ + protocol: locationGetter('$$protocol'), + + /** + * @ngdoc method + * @name $location#host + * + * @description + * This method is getter only. + * + * Return host of current url. + * + * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var host = $location.host(); + * // => "example.com" + * + * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo + * host = $location.host(); + * // => "example.com" + * host = location.host; + * // => "example.com:8080" + * ``` + * + * @return {string} host of current url. + */ + host: locationGetter('$$host'), + + /** + * @ngdoc method + * @name $location#port + * + * @description + * This method is getter only. + * + * Return port of current url. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var port = $location.port(); + * // => 80 + * ``` + * + * @return {Number} port + */ + port: locationGetter('$$port'), + + /** + * @ngdoc method + * @name $location#path + * + * @description + * This method is getter / setter. + * + * Return path of current url when called without any parameter. + * + * Change path when called with parameter and return `$location`. + * + * Note: Path should always begin with forward slash (/), this method will add the forward slash + * if it is missing. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var path = $location.path(); + * // => "/some/path" + * ``` + * + * @param {(string|number)=} path New path + * @return {string} path + */ + path: locationGetterSetter('$$path', function(path) { + path = path !== null ? path.toString() : ''; + return path.charAt(0) == '/' ? path : '/' + path; + }), + + /** + * @ngdoc method + * @name $location#search + * + * @description + * This method is getter / setter. + * + * Return search part (as object) of current url when called without any parameter. + * + * Change search part when called with parameter and return `$location`. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo + * var searchObject = $location.search(); + * // => {foo: 'bar', baz: 'xoxo'} + * + * // set foo to 'yipee' + * $location.search('foo', 'yipee'); + * // $location.search() => {foo: 'yipee', baz: 'xoxo'} + * ``` + * + * @param {string|Object.|Object.>} search New search params - string or + * hash object. + * + * When called with a single argument the method acts as a setter, setting the `search` component + * of `$location` to the specified value. + * + * If the argument is a hash object containing an array of values, these values will be encoded + * as duplicate search parameters in the url. + * + * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue` + * will override only a single search property. + * + * If `paramValue` is an array, it will override the property of the `search` component of + * `$location` specified via the first argument. + * + * If `paramValue` is `null`, the property specified via the first argument will be deleted. + * + * If `paramValue` is `true`, the property specified via the first argument will be added with no + * value nor trailing equal sign. + * + * @return {Object} If called with no arguments returns the parsed `search` object. If called with + * one or more arguments returns `$location` object itself. + */ + search: function(search, paramValue) { + switch (arguments.length) { + case 0: + return this.$$search; + case 1: + if (isString(search) || isNumber(search)) { + search = search.toString(); + this.$$search = parseKeyValue(search); + } else if (isObject(search)) { + search = copy(search, {}); + // remove object undefined or null properties + forEach(search, function(value, key) { + if (value == null) delete search[key]; + }); + + this.$$search = search; + } else { + throw $locationMinErr('isrcharg', + 'The first argument of the `$location#search()` call must be a string or an object.'); + } + break; + default: + if (isUndefined(paramValue) || paramValue === null) { + delete this.$$search[search]; + } else { + this.$$search[search] = paramValue; + } + } + + this.$$compose(); + return this; + }, + + /** + * @ngdoc method + * @name $location#hash + * + * @description + * This method is getter / setter. + * + * Return hash fragment when called without any parameter. + * + * Change hash fragment when called with parameter and return `$location`. + * + * + * ```js + * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue + * var hash = $location.hash(); + * // => "hashValue" + * ``` + * + * @param {(string|number)=} hash New hash fragment + * @return {string} hash + */ + hash: locationGetterSetter('$$hash', function(hash) { + return hash !== null ? hash.toString() : ''; + }), + + /** + * @ngdoc method + * @name $location#replace + * + * @description + * If called, all changes to $location during current `$digest` will be replacing current history + * record, instead of adding new one. + */ + replace: function() { + this.$$replace = true; + return this; + } +}; + +forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) { + Location.prototype = Object.create(locationPrototype); + + /** + * @ngdoc method + * @name $location#state + * + * @description + * This method is getter / setter. + * + * Return the history state object when called without any parameter. + * + * Change the history state object when called with one parameter and return `$location`. + * The state object is later passed to `pushState` or `replaceState`. + * + * NOTE: This method is supported only in HTML5 mode and only in browsers supporting + * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support + * older browsers (like IE9 or Android < 4.0), don't use this method. + * + * @param {object=} state State object for pushState or replaceState + * @return {object} state + */ + Location.prototype.state = function(state) { + if (!arguments.length) { + return this.$$state; + } + + if (Location !== LocationHtml5Url || !this.$$html5) { + throw $locationMinErr('nostate', 'History API state support is available only ' + + 'in HTML5 mode and only in browsers supporting HTML5 History API'); + } + // The user might modify `stateObject` after invoking `$location.state(stateObject)` + // but we're changing the $$state reference to $browser.state() during the $digest + // so the modification window is narrow. + this.$$state = isUndefined(state) ? null : state; + + return this; + }; +}); + + +function locationGetter(property) { + return function() { + return this[property]; + }; +} + + +function locationGetterSetter(property, preprocess) { + return function(value) { + if (isUndefined(value)) { + return this[property]; + } + + this[property] = preprocess(value); + this.$$compose(); + + return this; + }; +} + + +/** + * @ngdoc service + * @name $location + * + * @requires $rootElement + * + * @description + * The $location service parses the URL in the browser address bar (based on the + * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL + * available to your application. Changes to the URL in the address bar are reflected into + * $location service and changes to $location are reflected into the browser address bar. + * + * **The $location service:** + * + * - Exposes the current URL in the browser address bar, so you can + * - Watch and observe the URL. + * - Change the URL. + * - Synchronizes the URL with the browser when the user + * - Changes the address bar. + * - Clicks the back or forward button (or clicks a History link). + * - Clicks on a link. + * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash). + * + * For more information see {@link guide/$location Developer Guide: Using $location} + */ + +/** + * @ngdoc provider + * @name $locationProvider + * @description + * Use the `$locationProvider` to configure how the application deep linking paths are stored. + */ +function $LocationProvider() { + var hashPrefix = '', + html5Mode = { + enabled: false, + requireBase: true, + rewriteLinks: true + }; + + /** + * @ngdoc method + * @name $locationProvider#hashPrefix + * @description + * @param {string=} prefix Prefix for hash part (containing path and search) + * @returns {*} current value if used as getter or itself (chaining) if used as setter + */ + this.hashPrefix = function(prefix) { + if (isDefined(prefix)) { + hashPrefix = prefix; + return this; + } else { + return hashPrefix; + } + }; + + /** + * @ngdoc method + * @name $locationProvider#html5Mode + * @description + * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value. + * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported + * properties: + * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to + * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not + * support `pushState`. + * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies + * whether or not a tag is required to be present. If `enabled` and `requireBase` are + * true, and a base tag is not present, an error will be thrown when `$location` is injected. + * See the {@link guide/$location $location guide for more information} + * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled, + * enables/disables url rewriting for relative links. + * + * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter + */ + this.html5Mode = function(mode) { + if (isBoolean(mode)) { + html5Mode.enabled = mode; + return this; + } else if (isObject(mode)) { + + if (isBoolean(mode.enabled)) { + html5Mode.enabled = mode.enabled; + } + + if (isBoolean(mode.requireBase)) { + html5Mode.requireBase = mode.requireBase; + } + + if (isBoolean(mode.rewriteLinks)) { + html5Mode.rewriteLinks = mode.rewriteLinks; + } + + return this; + } else { + return html5Mode; + } + }; + + /** + * @ngdoc event + * @name $location#$locationChangeStart + * @eventType broadcast on root scope + * @description + * Broadcasted before a URL will change. + * + * This change can be prevented by calling + * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more + * details about event object. Upon successful change + * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired. + * + * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when + * the browser supports the HTML5 History API. + * + * @param {Object} angularEvent Synthetic event object. + * @param {string} newUrl New URL + * @param {string=} oldUrl URL that was before it was changed. + * @param {string=} newState New history state object + * @param {string=} oldState History state object that was before it was changed. + */ + + /** + * @ngdoc event + * @name $location#$locationChangeSuccess + * @eventType broadcast on root scope + * @description + * Broadcasted after a URL was changed. + * + * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when + * the browser supports the HTML5 History API. + * + * @param {Object} angularEvent Synthetic event object. + * @param {string} newUrl New URL + * @param {string=} oldUrl URL that was before it was changed. + * @param {string=} newState New history state object + * @param {string=} oldState History state object that was before it was changed. + */ + + this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window', + function($rootScope, $browser, $sniffer, $rootElement, $window) { + var $location, + LocationMode, + baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to '' + initialUrl = $browser.url(), + appBase; + + if (html5Mode.enabled) { + if (!baseHref && html5Mode.requireBase) { + throw $locationMinErr('nobase', + "$location in HTML5 mode requires a tag to be present!"); + } + appBase = serverBase(initialUrl) + (baseHref || '/'); + LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url; + } else { + appBase = stripHash(initialUrl); + LocationMode = LocationHashbangUrl; + } + $location = new LocationMode(appBase, '#' + hashPrefix); + $location.$$parseLinkUrl(initialUrl, initialUrl); + + $location.$$state = $browser.state(); + + var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i; + + function setBrowserUrlWithFallback(url, replace, state) { + var oldUrl = $location.url(); + var oldState = $location.$$state; + try { + $browser.url(url, replace, state); + + // Make sure $location.state() returns referentially identical (not just deeply equal) + // state object; this makes possible quick checking if the state changed in the digest + // loop. Checking deep equality would be too expensive. + $location.$$state = $browser.state(); + } catch (e) { + // Restore old values if pushState fails + $location.url(oldUrl); + $location.$$state = oldState; + + throw e; + } + } + + $rootElement.on('click', function(event) { + // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser) + // currently we open nice url link and redirect then + + if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return; + + var elm = jqLite(event.target); + + // traverse the DOM up to find first A tag + while (nodeName_(elm[0]) !== 'a') { + // ignore rewriting if no A tag (reached root element, or no parent - removed from document) + if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return; + } + + var absHref = elm.prop('href'); + // get the actual href attribute - see + // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx + var relHref = elm.attr('href') || elm.attr('xlink:href'); + + if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') { + // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during + // an animation. + absHref = urlResolve(absHref.animVal).href; + } + + // Ignore when url is started with javascript: or mailto: + if (IGNORE_URI_REGEXP.test(absHref)) return; + + if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) { + if ($location.$$parseLinkUrl(absHref, relHref)) { + // We do a preventDefault for all urls that are part of the angular application, + // in html5mode and also without, so that we are able to abort navigation without + // getting double entries in the location history. + event.preventDefault(); + // update location manually + if ($location.absUrl() != $browser.url()) { + $rootScope.$apply(); + // hack to work around FF6 bug 684208 when scenario runner clicks on links + $window.angular['ff-684208-preventDefault'] = true; + } + } + } + }); + + + // rewrite hashbang url <> html5 url + if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) { + $browser.url($location.absUrl(), true); + } + + var initializing = true; + + // update $location when $browser url changes + $browser.onUrlChange(function(newUrl, newState) { + $rootScope.$evalAsync(function() { + var oldUrl = $location.absUrl(); + var oldState = $location.$$state; + var defaultPrevented; + + $location.$$parse(newUrl); + $location.$$state = newState; + + defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, + newState, oldState).defaultPrevented; + + // if the location was changed by a `$locationChangeStart` handler then stop + // processing this location change + if ($location.absUrl() !== newUrl) return; + + if (defaultPrevented) { + $location.$$parse(oldUrl); + $location.$$state = oldState; + setBrowserUrlWithFallback(oldUrl, false, oldState); + } else { + initializing = false; + afterLocationChange(oldUrl, oldState); + } + }); + if (!$rootScope.$$phase) $rootScope.$digest(); + }); + + // update browser + $rootScope.$watch(function $locationWatch() { + var oldUrl = trimEmptyHash($browser.url()); + var newUrl = trimEmptyHash($location.absUrl()); + var oldState = $browser.state(); + var currentReplace = $location.$$replace; + var urlOrStateChanged = oldUrl !== newUrl || + ($location.$$html5 && $sniffer.history && oldState !== $location.$$state); + + if (initializing || urlOrStateChanged) { + initializing = false; + + $rootScope.$evalAsync(function() { + var newUrl = $location.absUrl(); + var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, + $location.$$state, oldState).defaultPrevented; + + // if the location was changed by a `$locationChangeStart` handler then stop + // processing this location change + if ($location.absUrl() !== newUrl) return; + + if (defaultPrevented) { + $location.$$parse(oldUrl); + $location.$$state = oldState; + } else { + if (urlOrStateChanged) { + setBrowserUrlWithFallback(newUrl, currentReplace, + oldState === $location.$$state ? null : $location.$$state); + } + afterLocationChange(oldUrl, oldState); + } + }); + } + + $location.$$replace = false; + + // we don't need to return anything because $evalAsync will make the digest loop dirty when + // there is a change + }); + + return $location; + + function afterLocationChange(oldUrl, oldState) { + $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl, + $location.$$state, oldState); + } +}]; +} + +/** + * @ngdoc service + * @name $log + * @requires $window + * + * @description + * Simple service for logging. Default implementation safely writes the message + * into the browser's console (if present). + * + * The main purpose of this service is to simplify debugging and troubleshooting. + * + * The default is to log `debug` messages. You can use + * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this. + * + * @example + + + angular.module('logExample', []) + .controller('LogController', ['$scope', '$log', function($scope, $log) { + $scope.$log = $log; + $scope.message = 'Hello World!'; + }]); + + +
+

Reload this page with open console, enter text and hit the log button...

+ + + + + + +
+
+
+ */ + +/** + * @ngdoc provider + * @name $logProvider + * @description + * Use the `$logProvider` to configure how the application logs messages + */ +function $LogProvider() { + var debug = true, + self = this; + + /** + * @ngdoc method + * @name $logProvider#debugEnabled + * @description + * @param {boolean=} flag enable or disable debug level messages + * @returns {*} current value if used as getter or itself (chaining) if used as setter + */ + this.debugEnabled = function(flag) { + if (isDefined(flag)) { + debug = flag; + return this; + } else { + return debug; + } + }; + + this.$get = ['$window', function($window) { + return { + /** + * @ngdoc method + * @name $log#log + * + * @description + * Write a log message + */ + log: consoleLog('log'), + + /** + * @ngdoc method + * @name $log#info + * + * @description + * Write an information message + */ + info: consoleLog('info'), + + /** + * @ngdoc method + * @name $log#warn + * + * @description + * Write a warning message + */ + warn: consoleLog('warn'), + + /** + * @ngdoc method + * @name $log#error + * + * @description + * Write an error message + */ + error: consoleLog('error'), + + /** + * @ngdoc method + * @name $log#debug + * + * @description + * Write a debug message + */ + debug: (function() { + var fn = consoleLog('debug'); + + return function() { + if (debug) { + fn.apply(self, arguments); + } + }; + }()) + }; + + function formatError(arg) { + if (arg instanceof Error) { + if (arg.stack) { + arg = (arg.message && arg.stack.indexOf(arg.message) === -1) + ? 'Error: ' + arg.message + '\n' + arg.stack + : arg.stack; + } else if (arg.sourceURL) { + arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line; + } + } + return arg; + } + + function consoleLog(type) { + var console = $window.console || {}, + logFn = console[type] || console.log || noop, + hasApply = false; + + // Note: reading logFn.apply throws an error in IE11 in IE8 document mode. + // The reason behind this is that console.log has type "object" in IE8... + try { + hasApply = !!logFn.apply; + } catch (e) {} + + if (hasApply) { + return function() { + var args = []; + forEach(arguments, function(arg) { + args.push(formatError(arg)); + }); + return logFn.apply(console, args); + }; + } + + // we are IE which either doesn't have window.console => this is noop and we do nothing, + // or we are IE where console.log doesn't have apply so we log at least first 2 args + return function(arg1, arg2) { + logFn(arg1, arg2 == null ? '' : arg2); + }; + } + }]; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +var $parseMinErr = minErr('$parse'); + +// Sandboxing Angular Expressions +// ------------------------------ +// Angular expressions are generally considered safe because these expressions only have direct +// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by +// obtaining a reference to native JS functions such as the Function constructor. +// +// As an example, consider the following Angular expression: +// +// {}.toString.constructor('alert("evil JS code")') +// +// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits +// against the expression language, but not to prevent exploits that were enabled by exposing +// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good +// practice and therefore we are not even trying to protect against interaction with an object +// explicitly exposed in this way. +// +// In general, it is not possible to access a Window object from an angular expression unless a +// window or some DOM object that has a reference to window is published onto a Scope. +// Similarly we prevent invocations of function known to be dangerous, as well as assignments to +// native objects. +// +// See https://docs.angularjs.org/guide/security + + +function ensureSafeMemberName(name, fullExpression) { + if (name === "__defineGetter__" || name === "__defineSetter__" + || name === "__lookupGetter__" || name === "__lookupSetter__" + || name === "__proto__") { + throw $parseMinErr('isecfld', + 'Attempting to access a disallowed field in Angular expressions! ' + + 'Expression: {0}', fullExpression); + } + return name; +} + +function ensureSafeObject(obj, fullExpression) { + // nifty check if obj is Function that is fast and works across iframes and other contexts + if (obj) { + if (obj.constructor === obj) { + throw $parseMinErr('isecfn', + 'Referencing Function in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } else if (// isWindow(obj) + obj.window === obj) { + throw $parseMinErr('isecwindow', + 'Referencing the Window in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } else if (// isElement(obj) + obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) { + throw $parseMinErr('isecdom', + 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } else if (// block Object so that we can't get hold of dangerous Object.* methods + obj === Object) { + throw $parseMinErr('isecobj', + 'Referencing Object in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } + } + return obj; +} + +var CALL = Function.prototype.call; +var APPLY = Function.prototype.apply; +var BIND = Function.prototype.bind; + +function ensureSafeFunction(obj, fullExpression) { + if (obj) { + if (obj.constructor === obj) { + throw $parseMinErr('isecfn', + 'Referencing Function in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } else if (obj === CALL || obj === APPLY || obj === BIND) { + throw $parseMinErr('isecff', + 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}', + fullExpression); + } + } +} + +var OPERATORS = createMap(); +forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; }); +var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'}; + + +///////////////////////////////////////// + + +/** + * @constructor + */ +var Lexer = function(options) { + this.options = options; +}; + +Lexer.prototype = { + constructor: Lexer, + + lex: function(text) { + this.text = text; + this.index = 0; + this.tokens = []; + + while (this.index < this.text.length) { + var ch = this.text.charAt(this.index); + if (ch === '"' || ch === "'") { + this.readString(ch); + } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) { + this.readNumber(); + } else if (this.isIdent(ch)) { + this.readIdent(); + } else if (this.is(ch, '(){}[].,;:?')) { + this.tokens.push({index: this.index, text: ch}); + this.index++; + } else if (this.isWhitespace(ch)) { + this.index++; + } else { + var ch2 = ch + this.peek(); + var ch3 = ch2 + this.peek(2); + var op1 = OPERATORS[ch]; + var op2 = OPERATORS[ch2]; + var op3 = OPERATORS[ch3]; + if (op1 || op2 || op3) { + var token = op3 ? ch3 : (op2 ? ch2 : ch); + this.tokens.push({index: this.index, text: token, operator: true}); + this.index += token.length; + } else { + this.throwError('Unexpected next character ', this.index, this.index + 1); + } + } + } + return this.tokens; + }, + + is: function(ch, chars) { + return chars.indexOf(ch) !== -1; + }, + + peek: function(i) { + var num = i || 1; + return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false; + }, + + isNumber: function(ch) { + return ('0' <= ch && ch <= '9') && typeof ch === "string"; + }, + + isWhitespace: function(ch) { + // IE treats non-breaking space as \u00A0 + return (ch === ' ' || ch === '\r' || ch === '\t' || + ch === '\n' || ch === '\v' || ch === '\u00A0'); + }, + + isIdent: function(ch) { + return ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + '_' === ch || ch === '$'); + }, + + isExpOperator: function(ch) { + return (ch === '-' || ch === '+' || this.isNumber(ch)); + }, + + throwError: function(error, start, end) { + end = end || this.index; + var colStr = (isDefined(start) + ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']' + : ' ' + end); + throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].', + error, colStr, this.text); + }, + + readNumber: function() { + var number = ''; + var start = this.index; + while (this.index < this.text.length) { + var ch = lowercase(this.text.charAt(this.index)); + if (ch == '.' || this.isNumber(ch)) { + number += ch; + } else { + var peekCh = this.peek(); + if (ch == 'e' && this.isExpOperator(peekCh)) { + number += ch; + } else if (this.isExpOperator(ch) && + peekCh && this.isNumber(peekCh) && + number.charAt(number.length - 1) == 'e') { + number += ch; + } else if (this.isExpOperator(ch) && + (!peekCh || !this.isNumber(peekCh)) && + number.charAt(number.length - 1) == 'e') { + this.throwError('Invalid exponent'); + } else { + break; + } + } + this.index++; + } + this.tokens.push({ + index: start, + text: number, + constant: true, + value: Number(number) + }); + }, + + readIdent: function() { + var start = this.index; + while (this.index < this.text.length) { + var ch = this.text.charAt(this.index); + if (!(this.isIdent(ch) || this.isNumber(ch))) { + break; + } + this.index++; + } + this.tokens.push({ + index: start, + text: this.text.slice(start, this.index), + identifier: true + }); + }, + + readString: function(quote) { + var start = this.index; + this.index++; + var string = ''; + var rawString = quote; + var escape = false; + while (this.index < this.text.length) { + var ch = this.text.charAt(this.index); + rawString += ch; + if (escape) { + if (ch === 'u') { + var hex = this.text.substring(this.index + 1, this.index + 5); + if (!hex.match(/[\da-f]{4}/i)) { + this.throwError('Invalid unicode escape [\\u' + hex + ']'); + } + this.index += 4; + string += String.fromCharCode(parseInt(hex, 16)); + } else { + var rep = ESCAPE[ch]; + string = string + (rep || ch); + } + escape = false; + } else if (ch === '\\') { + escape = true; + } else if (ch === quote) { + this.index++; + this.tokens.push({ + index: start, + text: rawString, + constant: true, + value: string + }); + return; + } else { + string += ch; + } + this.index++; + } + this.throwError('Unterminated quote', start); + } +}; + +var AST = function(lexer, options) { + this.lexer = lexer; + this.options = options; +}; + +AST.Program = 'Program'; +AST.ExpressionStatement = 'ExpressionStatement'; +AST.AssignmentExpression = 'AssignmentExpression'; +AST.ConditionalExpression = 'ConditionalExpression'; +AST.LogicalExpression = 'LogicalExpression'; +AST.BinaryExpression = 'BinaryExpression'; +AST.UnaryExpression = 'UnaryExpression'; +AST.CallExpression = 'CallExpression'; +AST.MemberExpression = 'MemberExpression'; +AST.Identifier = 'Identifier'; +AST.Literal = 'Literal'; +AST.ArrayExpression = 'ArrayExpression'; +AST.Property = 'Property'; +AST.ObjectExpression = 'ObjectExpression'; +AST.ThisExpression = 'ThisExpression'; + +// Internal use only +AST.NGValueParameter = 'NGValueParameter'; + +AST.prototype = { + ast: function(text) { + this.text = text; + this.tokens = this.lexer.lex(text); + + var value = this.program(); + + if (this.tokens.length !== 0) { + this.throwError('is an unexpected token', this.tokens[0]); + } + + return value; + }, + + program: function() { + var body = []; + while (true) { + if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']')) + body.push(this.expressionStatement()); + if (!this.expect(';')) { + return { type: AST.Program, body: body}; + } + } + }, + + expressionStatement: function() { + return { type: AST.ExpressionStatement, expression: this.filterChain() }; + }, + + filterChain: function() { + var left = this.expression(); + var token; + while ((token = this.expect('|'))) { + left = this.filter(left); + } + return left; + }, + + expression: function() { + return this.assignment(); + }, + + assignment: function() { + var result = this.ternary(); + if (this.expect('=')) { + result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='}; + } + return result; + }, + + ternary: function() { + var test = this.logicalOR(); + var alternate; + var consequent; + if (this.expect('?')) { + alternate = this.expression(); + if (this.consume(':')) { + consequent = this.expression(); + return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent}; + } + } + return test; + }, + + logicalOR: function() { + var left = this.logicalAND(); + while (this.expect('||')) { + left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() }; + } + return left; + }, + + logicalAND: function() { + var left = this.equality(); + while (this.expect('&&')) { + left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()}; + } + return left; + }, + + equality: function() { + var left = this.relational(); + var token; + while ((token = this.expect('==','!=','===','!=='))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() }; + } + return left; + }, + + relational: function() { + var left = this.additive(); + var token; + while ((token = this.expect('<', '>', '<=', '>='))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() }; + } + return left; + }, + + additive: function() { + var left = this.multiplicative(); + var token; + while ((token = this.expect('+','-'))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() }; + } + return left; + }, + + multiplicative: function() { + var left = this.unary(); + var token; + while ((token = this.expect('*','/','%'))) { + left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() }; + } + return left; + }, + + unary: function() { + var token; + if ((token = this.expect('+', '-', '!'))) { + return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() }; + } else { + return this.primary(); + } + }, + + primary: function() { + var primary; + if (this.expect('(')) { + primary = this.filterChain(); + this.consume(')'); + } else if (this.expect('[')) { + primary = this.arrayDeclaration(); + } else if (this.expect('{')) { + primary = this.object(); + } else if (this.constants.hasOwnProperty(this.peek().text)) { + primary = copy(this.constants[this.consume().text]); + } else if (this.peek().identifier) { + primary = this.identifier(); + } else if (this.peek().constant) { + primary = this.constant(); + } else { + this.throwError('not a primary expression', this.peek()); + } + + var next; + while ((next = this.expect('(', '[', '.'))) { + if (next.text === '(') { + primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() }; + this.consume(')'); + } else if (next.text === '[') { + primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true }; + this.consume(']'); + } else if (next.text === '.') { + primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false }; + } else { + this.throwError('IMPOSSIBLE'); + } + } + return primary; + }, + + filter: function(baseExpression) { + var args = [baseExpression]; + var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true}; + + while (this.expect(':')) { + args.push(this.expression()); + } + + return result; + }, + + parseArguments: function() { + var args = []; + if (this.peekToken().text !== ')') { + do { + args.push(this.expression()); + } while (this.expect(',')); + } + return args; + }, + + identifier: function() { + var token = this.consume(); + if (!token.identifier) { + this.throwError('is not a valid identifier', token); + } + return { type: AST.Identifier, name: token.text }; + }, + + constant: function() { + // TODO check that it is a constant + return { type: AST.Literal, value: this.consume().value }; + }, + + arrayDeclaration: function() { + var elements = []; + if (this.peekToken().text !== ']') { + do { + if (this.peek(']')) { + // Support trailing commas per ES5.1. + break; + } + elements.push(this.expression()); + } while (this.expect(',')); + } + this.consume(']'); + + return { type: AST.ArrayExpression, elements: elements }; + }, + + object: function() { + var properties = [], property; + if (this.peekToken().text !== '}') { + do { + if (this.peek('}')) { + // Support trailing commas per ES5.1. + break; + } + property = {type: AST.Property, kind: 'init'}; + if (this.peek().constant) { + property.key = this.constant(); + } else if (this.peek().identifier) { + property.key = this.identifier(); + } else { + this.throwError("invalid key", this.peek()); + } + this.consume(':'); + property.value = this.expression(); + properties.push(property); + } while (this.expect(',')); + } + this.consume('}'); + + return {type: AST.ObjectExpression, properties: properties }; + }, + + throwError: function(msg, token) { + throw $parseMinErr('syntax', + 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].', + token.text, msg, (token.index + 1), this.text, this.text.substring(token.index)); + }, + + consume: function(e1) { + if (this.tokens.length === 0) { + throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); + } + + var token = this.expect(e1); + if (!token) { + this.throwError('is unexpected, expecting [' + e1 + ']', this.peek()); + } + return token; + }, + + peekToken: function() { + if (this.tokens.length === 0) { + throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); + } + return this.tokens[0]; + }, + + peek: function(e1, e2, e3, e4) { + return this.peekAhead(0, e1, e2, e3, e4); + }, + + peekAhead: function(i, e1, e2, e3, e4) { + if (this.tokens.length > i) { + var token = this.tokens[i]; + var t = token.text; + if (t === e1 || t === e2 || t === e3 || t === e4 || + (!e1 && !e2 && !e3 && !e4)) { + return token; + } + } + return false; + }, + + expect: function(e1, e2, e3, e4) { + var token = this.peek(e1, e2, e3, e4); + if (token) { + this.tokens.shift(); + return token; + } + return false; + }, + + + /* `undefined` is not a constant, it is an identifier, + * but using it as an identifier is not supported + */ + constants: { + 'true': { type: AST.Literal, value: true }, + 'false': { type: AST.Literal, value: false }, + 'null': { type: AST.Literal, value: null }, + 'undefined': {type: AST.Literal, value: undefined }, + 'this': {type: AST.ThisExpression } + } +}; + +function ifDefined(v, d) { + return typeof v !== 'undefined' ? v : d; +} + +function plusFn(l, r) { + if (typeof l === 'undefined') return r; + if (typeof r === 'undefined') return l; + return l + r; +} + +function isStateless($filter, filterName) { + var fn = $filter(filterName); + return !fn.$stateful; +} + +function findConstantAndWatchExpressions(ast, $filter) { + var allConstants; + var argsToWatch; + switch (ast.type) { + case AST.Program: + allConstants = true; + forEach(ast.body, function(expr) { + findConstantAndWatchExpressions(expr.expression, $filter); + allConstants = allConstants && expr.expression.constant; + }); + ast.constant = allConstants; + break; + case AST.Literal: + ast.constant = true; + ast.toWatch = []; + break; + case AST.UnaryExpression: + findConstantAndWatchExpressions(ast.argument, $filter); + ast.constant = ast.argument.constant; + ast.toWatch = ast.argument.toWatch; + break; + case AST.BinaryExpression: + findConstantAndWatchExpressions(ast.left, $filter); + findConstantAndWatchExpressions(ast.right, $filter); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch); + break; + case AST.LogicalExpression: + findConstantAndWatchExpressions(ast.left, $filter); + findConstantAndWatchExpressions(ast.right, $filter); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = ast.constant ? [] : [ast]; + break; + case AST.ConditionalExpression: + findConstantAndWatchExpressions(ast.test, $filter); + findConstantAndWatchExpressions(ast.alternate, $filter); + findConstantAndWatchExpressions(ast.consequent, $filter); + ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant; + ast.toWatch = ast.constant ? [] : [ast]; + break; + case AST.Identifier: + ast.constant = false; + ast.toWatch = [ast]; + break; + case AST.MemberExpression: + findConstantAndWatchExpressions(ast.object, $filter); + if (ast.computed) { + findConstantAndWatchExpressions(ast.property, $filter); + } + ast.constant = ast.object.constant && (!ast.computed || ast.property.constant); + ast.toWatch = [ast]; + break; + case AST.CallExpression: + allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false; + argsToWatch = []; + forEach(ast.arguments, function(expr) { + findConstantAndWatchExpressions(expr, $filter); + allConstants = allConstants && expr.constant; + if (!expr.constant) { + argsToWatch.push.apply(argsToWatch, expr.toWatch); + } + }); + ast.constant = allConstants; + ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast]; + break; + case AST.AssignmentExpression: + findConstantAndWatchExpressions(ast.left, $filter); + findConstantAndWatchExpressions(ast.right, $filter); + ast.constant = ast.left.constant && ast.right.constant; + ast.toWatch = [ast]; + break; + case AST.ArrayExpression: + allConstants = true; + argsToWatch = []; + forEach(ast.elements, function(expr) { + findConstantAndWatchExpressions(expr, $filter); + allConstants = allConstants && expr.constant; + if (!expr.constant) { + argsToWatch.push.apply(argsToWatch, expr.toWatch); + } + }); + ast.constant = allConstants; + ast.toWatch = argsToWatch; + break; + case AST.ObjectExpression: + allConstants = true; + argsToWatch = []; + forEach(ast.properties, function(property) { + findConstantAndWatchExpressions(property.value, $filter); + allConstants = allConstants && property.value.constant; + if (!property.value.constant) { + argsToWatch.push.apply(argsToWatch, property.value.toWatch); + } + }); + ast.constant = allConstants; + ast.toWatch = argsToWatch; + break; + case AST.ThisExpression: + ast.constant = false; + ast.toWatch = []; + break; + } +} + +function getInputs(body) { + if (body.length != 1) return; + var lastExpression = body[0].expression; + var candidate = lastExpression.toWatch; + if (candidate.length !== 1) return candidate; + return candidate[0] !== lastExpression ? candidate : undefined; +} + +function isAssignable(ast) { + return ast.type === AST.Identifier || ast.type === AST.MemberExpression; +} + +function assignableAST(ast) { + if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) { + return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='}; + } +} + +function isLiteral(ast) { + return ast.body.length === 0 || + ast.body.length === 1 && ( + ast.body[0].expression.type === AST.Literal || + ast.body[0].expression.type === AST.ArrayExpression || + ast.body[0].expression.type === AST.ObjectExpression); +} + +function isConstant(ast) { + return ast.constant; +} + +function ASTCompiler(astBuilder, $filter) { + this.astBuilder = astBuilder; + this.$filter = $filter; +} + +ASTCompiler.prototype = { + compile: function(expression, expensiveChecks) { + var self = this; + var ast = this.astBuilder.ast(expression); + this.state = { + nextId: 0, + filters: {}, + expensiveChecks: expensiveChecks, + fn: {vars: [], body: [], own: {}}, + assign: {vars: [], body: [], own: {}}, + inputs: [] + }; + findConstantAndWatchExpressions(ast, self.$filter); + var extra = ''; + var assignable; + this.stage = 'assign'; + if ((assignable = assignableAST(ast))) { + this.state.computing = 'assign'; + var result = this.nextId(); + this.recurse(assignable, result); + extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l'); + } + var toWatch = getInputs(ast.body); + self.stage = 'inputs'; + forEach(toWatch, function(watch, key) { + var fnKey = 'fn' + key; + self.state[fnKey] = {vars: [], body: [], own: {}}; + self.state.computing = fnKey; + var intoId = self.nextId(); + self.recurse(watch, intoId); + self.return_(intoId); + self.state.inputs.push(fnKey); + watch.watchId = key; + }); + this.state.computing = 'fn'; + this.stage = 'main'; + this.recurse(ast); + var fnString = + // The build and minification steps remove the string "use strict" from the code, but this is done using a regex. + // This is a workaround for this until we do a better job at only removing the prefix only when we should. + '"' + this.USE + ' ' + this.STRICT + '";\n' + + this.filterPrefix() + + 'var fn=' + this.generateFunction('fn', 's,l,a,i') + + extra + + this.watchFns() + + 'return fn;'; + + /* jshint -W054 */ + var fn = (new Function('$filter', + 'ensureSafeMemberName', + 'ensureSafeObject', + 'ensureSafeFunction', + 'ifDefined', + 'plus', + 'text', + fnString))( + this.$filter, + ensureSafeMemberName, + ensureSafeObject, + ensureSafeFunction, + ifDefined, + plusFn, + expression); + /* jshint +W054 */ + this.state = this.stage = undefined; + fn.literal = isLiteral(ast); + fn.constant = isConstant(ast); + return fn; + }, + + USE: 'use', + + STRICT: 'strict', + + watchFns: function() { + var result = []; + var fns = this.state.inputs; + var self = this; + forEach(fns, function(name) { + result.push('var ' + name + '=' + self.generateFunction(name, 's')); + }); + if (fns.length) { + result.push('fn.inputs=[' + fns.join(',') + '];'); + } + return result.join(''); + }, + + generateFunction: function(name, params) { + return 'function(' + params + '){' + + this.varsPrefix(name) + + this.body(name) + + '};'; + }, + + filterPrefix: function() { + var parts = []; + var self = this; + forEach(this.state.filters, function(id, filter) { + parts.push(id + '=$filter(' + self.escape(filter) + ')'); + }); + if (parts.length) return 'var ' + parts.join(',') + ';'; + return ''; + }, + + varsPrefix: function(section) { + return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : ''; + }, + + body: function(section) { + return this.state[section].body.join(''); + }, + + recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { + var left, right, self = this, args, expression; + recursionFn = recursionFn || noop; + if (!skipWatchIdCheck && isDefined(ast.watchId)) { + intoId = intoId || this.nextId(); + this.if_('i', + this.lazyAssign(intoId, this.computedMember('i', ast.watchId)), + this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true) + ); + return; + } + switch (ast.type) { + case AST.Program: + forEach(ast.body, function(expression, pos) { + self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; }); + if (pos !== ast.body.length - 1) { + self.current().body.push(right, ';'); + } else { + self.return_(right); + } + }); + break; + case AST.Literal: + expression = this.escape(ast.value); + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.UnaryExpression: + this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; }); + expression = ast.operator + '(' + this.ifDefined(right, 0) + ')'; + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.BinaryExpression: + this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; }); + this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; }); + if (ast.operator === '+') { + expression = this.plus(left, right); + } else if (ast.operator === '-') { + expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0); + } else { + expression = '(' + left + ')' + ast.operator + '(' + right + ')'; + } + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.LogicalExpression: + intoId = intoId || this.nextId(); + self.recurse(ast.left, intoId); + self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId)); + recursionFn(intoId); + break; + case AST.ConditionalExpression: + intoId = intoId || this.nextId(); + self.recurse(ast.test, intoId); + self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId)); + recursionFn(intoId); + break; + case AST.Identifier: + intoId = intoId || this.nextId(); + if (nameId) { + nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s'); + nameId.computed = false; + nameId.name = ast.name; + } + ensureSafeMemberName(ast.name); + self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)), + function() { + self.if_(self.stage === 'inputs' || 's', function() { + if (create && create !== 1) { + self.if_( + self.not(self.nonComputedMember('s', ast.name)), + self.lazyAssign(self.nonComputedMember('s', ast.name), '{}')); + } + self.assign(intoId, self.nonComputedMember('s', ast.name)); + }); + }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name)) + ); + if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) { + self.addEnsureSafeObject(intoId); + } + recursionFn(intoId); + break; + case AST.MemberExpression: + left = nameId && (nameId.context = this.nextId()) || this.nextId(); + intoId = intoId || this.nextId(); + self.recurse(ast.object, left, undefined, function() { + self.if_(self.notNull(left), function() { + if (ast.computed) { + right = self.nextId(); + self.recurse(ast.property, right); + self.addEnsureSafeMemberName(right); + if (create && create !== 1) { + self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}')); + } + expression = self.ensureSafeObject(self.computedMember(left, right)); + self.assign(intoId, expression); + if (nameId) { + nameId.computed = true; + nameId.name = right; + } + } else { + ensureSafeMemberName(ast.property.name); + if (create && create !== 1) { + self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}')); + } + expression = self.nonComputedMember(left, ast.property.name); + if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) { + expression = self.ensureSafeObject(expression); + } + self.assign(intoId, expression); + if (nameId) { + nameId.computed = false; + nameId.name = ast.property.name; + } + } + }, function() { + self.assign(intoId, 'undefined'); + }); + recursionFn(intoId); + }, !!create); + break; + case AST.CallExpression: + intoId = intoId || this.nextId(); + if (ast.filter) { + right = self.filter(ast.callee.name); + args = []; + forEach(ast.arguments, function(expr) { + var argument = self.nextId(); + self.recurse(expr, argument); + args.push(argument); + }); + expression = right + '(' + args.join(',') + ')'; + self.assign(intoId, expression); + recursionFn(intoId); + } else { + right = self.nextId(); + left = {}; + args = []; + self.recurse(ast.callee, right, left, function() { + self.if_(self.notNull(right), function() { + self.addEnsureSafeFunction(right); + forEach(ast.arguments, function(expr) { + self.recurse(expr, self.nextId(), undefined, function(argument) { + args.push(self.ensureSafeObject(argument)); + }); + }); + if (left.name) { + if (!self.state.expensiveChecks) { + self.addEnsureSafeObject(left.context); + } + expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')'; + } else { + expression = right + '(' + args.join(',') + ')'; + } + expression = self.ensureSafeObject(expression); + self.assign(intoId, expression); + }, function() { + self.assign(intoId, 'undefined'); + }); + recursionFn(intoId); + }); + } + break; + case AST.AssignmentExpression: + right = this.nextId(); + left = {}; + if (!isAssignable(ast.left)) { + throw $parseMinErr('lval', 'Trying to assing a value to a non l-value'); + } + this.recurse(ast.left, undefined, left, function() { + self.if_(self.notNull(left.context), function() { + self.recurse(ast.right, right); + self.addEnsureSafeObject(self.member(left.context, left.name, left.computed)); + expression = self.member(left.context, left.name, left.computed) + ast.operator + right; + self.assign(intoId, expression); + recursionFn(intoId || expression); + }); + }, 1); + break; + case AST.ArrayExpression: + args = []; + forEach(ast.elements, function(expr) { + self.recurse(expr, self.nextId(), undefined, function(argument) { + args.push(argument); + }); + }); + expression = '[' + args.join(',') + ']'; + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.ObjectExpression: + args = []; + forEach(ast.properties, function(property) { + self.recurse(property.value, self.nextId(), undefined, function(expr) { + args.push(self.escape( + property.key.type === AST.Identifier ? property.key.name : + ('' + property.key.value)) + + ':' + expr); + }); + }); + expression = '{' + args.join(',') + '}'; + this.assign(intoId, expression); + recursionFn(expression); + break; + case AST.ThisExpression: + this.assign(intoId, 's'); + recursionFn('s'); + break; + case AST.NGValueParameter: + this.assign(intoId, 'v'); + recursionFn('v'); + break; + } + }, + + getHasOwnProperty: function(element, property) { + var key = element + '.' + property; + var own = this.current().own; + if (!own.hasOwnProperty(key)) { + own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')'); + } + return own[key]; + }, + + assign: function(id, value) { + if (!id) return; + this.current().body.push(id, '=', value, ';'); + return id; + }, + + filter: function(filterName) { + if (!this.state.filters.hasOwnProperty(filterName)) { + this.state.filters[filterName] = this.nextId(true); + } + return this.state.filters[filterName]; + }, + + ifDefined: function(id, defaultValue) { + return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')'; + }, + + plus: function(left, right) { + return 'plus(' + left + ',' + right + ')'; + }, + + return_: function(id) { + this.current().body.push('return ', id, ';'); + }, + + if_: function(test, alternate, consequent) { + if (test === true) { + alternate(); + } else { + var body = this.current().body; + body.push('if(', test, '){'); + alternate(); + body.push('}'); + if (consequent) { + body.push('else{'); + consequent(); + body.push('}'); + } + } + }, + + not: function(expression) { + return '!(' + expression + ')'; + }, + + notNull: function(expression) { + return expression + '!=null'; + }, + + nonComputedMember: function(left, right) { + return left + '.' + right; + }, + + computedMember: function(left, right) { + return left + '[' + right + ']'; + }, + + member: function(left, right, computed) { + if (computed) return this.computedMember(left, right); + return this.nonComputedMember(left, right); + }, + + addEnsureSafeObject: function(item) { + this.current().body.push(this.ensureSafeObject(item), ';'); + }, + + addEnsureSafeMemberName: function(item) { + this.current().body.push(this.ensureSafeMemberName(item), ';'); + }, + + addEnsureSafeFunction: function(item) { + this.current().body.push(this.ensureSafeFunction(item), ';'); + }, + + ensureSafeObject: function(item) { + return 'ensureSafeObject(' + item + ',text)'; + }, + + ensureSafeMemberName: function(item) { + return 'ensureSafeMemberName(' + item + ',text)'; + }, + + ensureSafeFunction: function(item) { + return 'ensureSafeFunction(' + item + ',text)'; + }, + + lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { + var self = this; + return function() { + self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck); + }; + }, + + lazyAssign: function(id, value) { + var self = this; + return function() { + self.assign(id, value); + }; + }, + + stringEscapeRegex: /[^ a-zA-Z0-9]/g, + + stringEscapeFn: function(c) { + return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4); + }, + + escape: function(value) { + if (isString(value)) return "'" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"; + if (isNumber(value)) return value.toString(); + if (value === true) return 'true'; + if (value === false) return 'false'; + if (value === null) return 'null'; + if (typeof value === 'undefined') return 'undefined'; + + throw $parseMinErr('esc', 'IMPOSSIBLE'); + }, + + nextId: function(skip, init) { + var id = 'v' + (this.state.nextId++); + if (!skip) { + this.current().vars.push(id + (init ? '=' + init : '')); + } + return id; + }, + + current: function() { + return this.state[this.state.computing]; + } +}; + + +function ASTInterpreter(astBuilder, $filter) { + this.astBuilder = astBuilder; + this.$filter = $filter; +} + +ASTInterpreter.prototype = { + compile: function(expression, expensiveChecks) { + var self = this; + var ast = this.astBuilder.ast(expression); + this.expression = expression; + this.expensiveChecks = expensiveChecks; + findConstantAndWatchExpressions(ast, self.$filter); + var assignable; + var assign; + if ((assignable = assignableAST(ast))) { + assign = this.recurse(assignable); + } + var toWatch = getInputs(ast.body); + var inputs; + if (toWatch) { + inputs = []; + forEach(toWatch, function(watch, key) { + var input = self.recurse(watch); + watch.input = input; + inputs.push(input); + watch.watchId = key; + }); + } + var expressions = []; + forEach(ast.body, function(expression) { + expressions.push(self.recurse(expression.expression)); + }); + var fn = ast.body.length === 0 ? function() {} : + ast.body.length === 1 ? expressions[0] : + function(scope, locals) { + var lastValue; + forEach(expressions, function(exp) { + lastValue = exp(scope, locals); + }); + return lastValue; + }; + if (assign) { + fn.assign = function(scope, value, locals) { + return assign(scope, locals, value); + }; + } + if (inputs) { + fn.inputs = inputs; + } + fn.literal = isLiteral(ast); + fn.constant = isConstant(ast); + return fn; + }, + + recurse: function(ast, context, create) { + var left, right, self = this, args, expression; + if (ast.input) { + return this.inputs(ast.input, ast.watchId); + } + switch (ast.type) { + case AST.Literal: + return this.value(ast.value, context); + case AST.UnaryExpression: + right = this.recurse(ast.argument); + return this['unary' + ast.operator](right, context); + case AST.BinaryExpression: + left = this.recurse(ast.left); + right = this.recurse(ast.right); + return this['binary' + ast.operator](left, right, context); + case AST.LogicalExpression: + left = this.recurse(ast.left); + right = this.recurse(ast.right); + return this['binary' + ast.operator](left, right, context); + case AST.ConditionalExpression: + return this['ternary?:']( + this.recurse(ast.test), + this.recurse(ast.alternate), + this.recurse(ast.consequent), + context + ); + case AST.Identifier: + ensureSafeMemberName(ast.name, self.expression); + return self.identifier(ast.name, + self.expensiveChecks || isPossiblyDangerousMemberName(ast.name), + context, create, self.expression); + case AST.MemberExpression: + left = this.recurse(ast.object, false, !!create); + if (!ast.computed) { + ensureSafeMemberName(ast.property.name, self.expression); + right = ast.property.name; + } + if (ast.computed) right = this.recurse(ast.property); + return ast.computed ? + this.computedMember(left, right, context, create, self.expression) : + this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression); + case AST.CallExpression: + args = []; + forEach(ast.arguments, function(expr) { + args.push(self.recurse(expr)); + }); + if (ast.filter) right = this.$filter(ast.callee.name); + if (!ast.filter) right = this.recurse(ast.callee, true); + return ast.filter ? + function(scope, locals, assign, inputs) { + var values = []; + for (var i = 0; i < args.length; ++i) { + values.push(args[i](scope, locals, assign, inputs)); + } + var value = right.apply(undefined, values, inputs); + return context ? {context: undefined, name: undefined, value: value} : value; + } : + function(scope, locals, assign, inputs) { + var rhs = right(scope, locals, assign, inputs); + var value; + if (rhs.value != null) { + ensureSafeObject(rhs.context, self.expression); + ensureSafeFunction(rhs.value, self.expression); + var values = []; + for (var i = 0; i < args.length; ++i) { + values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression)); + } + value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression); + } + return context ? {value: value} : value; + }; + case AST.AssignmentExpression: + left = this.recurse(ast.left, true, 1); + right = this.recurse(ast.right); + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + ensureSafeObject(lhs.value, self.expression); + lhs.context[lhs.name] = rhs; + return context ? {value: rhs} : rhs; + }; + case AST.ArrayExpression: + args = []; + forEach(ast.elements, function(expr) { + args.push(self.recurse(expr)); + }); + return function(scope, locals, assign, inputs) { + var value = []; + for (var i = 0; i < args.length; ++i) { + value.push(args[i](scope, locals, assign, inputs)); + } + return context ? {value: value} : value; + }; + case AST.ObjectExpression: + args = []; + forEach(ast.properties, function(property) { + args.push({key: property.key.type === AST.Identifier ? + property.key.name : + ('' + property.key.value), + value: self.recurse(property.value) + }); + }); + return function(scope, locals, assign, inputs) { + var value = {}; + for (var i = 0; i < args.length; ++i) { + value[args[i].key] = args[i].value(scope, locals, assign, inputs); + } + return context ? {value: value} : value; + }; + case AST.ThisExpression: + return function(scope) { + return context ? {value: scope} : scope; + }; + case AST.NGValueParameter: + return function(scope, locals, assign, inputs) { + return context ? {value: assign} : assign; + }; + } + }, + + 'unary+': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = argument(scope, locals, assign, inputs); + if (isDefined(arg)) { + arg = +arg; + } else { + arg = 0; + } + return context ? {value: arg} : arg; + }; + }, + 'unary-': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = argument(scope, locals, assign, inputs); + if (isDefined(arg)) { + arg = -arg; + } else { + arg = 0; + } + return context ? {value: arg} : arg; + }; + }, + 'unary!': function(argument, context) { + return function(scope, locals, assign, inputs) { + var arg = !argument(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary+': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + var arg = plusFn(lhs, rhs); + return context ? {value: arg} : arg; + }; + }, + 'binary-': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs = right(scope, locals, assign, inputs); + var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0); + return context ? {value: arg} : arg; + }; + }, + 'binary*': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary/': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary%': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary===': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary!==': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary==': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary!=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary<': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary>': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary<=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary>=': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary&&': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'binary||': function(left, right, context) { + return function(scope, locals, assign, inputs) { + var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + 'ternary?:': function(test, alternate, consequent, context) { + return function(scope, locals, assign, inputs) { + var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs); + return context ? {value: arg} : arg; + }; + }, + value: function(value, context) { + return function() { return context ? {context: undefined, name: undefined, value: value} : value; }; + }, + identifier: function(name, expensiveChecks, context, create, expression) { + return function(scope, locals, assign, inputs) { + var base = locals && (name in locals) ? locals : scope; + if (create && create !== 1 && base && !(base[name])) { + base[name] = {}; + } + var value = base ? base[name] : undefined; + if (expensiveChecks) { + ensureSafeObject(value, expression); + } + if (context) { + return {context: base, name: name, value: value}; + } else { + return value; + } + }; + }, + computedMember: function(left, right, context, create, expression) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + var rhs; + var value; + if (lhs != null) { + rhs = right(scope, locals, assign, inputs); + ensureSafeMemberName(rhs, expression); + if (create && create !== 1 && lhs && !(lhs[rhs])) { + lhs[rhs] = {}; + } + value = lhs[rhs]; + ensureSafeObject(value, expression); + } + if (context) { + return {context: lhs, name: rhs, value: value}; + } else { + return value; + } + }; + }, + nonComputedMember: function(left, right, expensiveChecks, context, create, expression) { + return function(scope, locals, assign, inputs) { + var lhs = left(scope, locals, assign, inputs); + if (create && create !== 1 && lhs && !(lhs[right])) { + lhs[right] = {}; + } + var value = lhs != null ? lhs[right] : undefined; + if (expensiveChecks || isPossiblyDangerousMemberName(right)) { + ensureSafeObject(value, expression); + } + if (context) { + return {context: lhs, name: right, value: value}; + } else { + return value; + } + }; + }, + inputs: function(input, watchId) { + return function(scope, value, locals, inputs) { + if (inputs) return inputs[watchId]; + return input(scope, value, locals); + }; + } +}; + +/** + * @constructor + */ +var Parser = function(lexer, $filter, options) { + this.lexer = lexer; + this.$filter = $filter; + this.options = options; + this.ast = new AST(this.lexer); + this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) : + new ASTCompiler(this.ast, $filter); +}; + +Parser.prototype = { + constructor: Parser, + + parse: function(text) { + return this.astCompiler.compile(text, this.options.expensiveChecks); + } +}; + +////////////////////////////////////////////////// +// Parser helper functions +////////////////////////////////////////////////// + +function setter(obj, path, setValue, fullExp) { + ensureSafeObject(obj, fullExp); + + var element = path.split('.'), key; + for (var i = 0; element.length > 1; i++) { + key = ensureSafeMemberName(element.shift(), fullExp); + var propertyObj = ensureSafeObject(obj[key], fullExp); + if (!propertyObj) { + propertyObj = {}; + obj[key] = propertyObj; + } + obj = propertyObj; + } + key = ensureSafeMemberName(element.shift(), fullExp); + ensureSafeObject(obj[key], fullExp); + obj[key] = setValue; + return setValue; +} + +var getterFnCacheDefault = createMap(); +var getterFnCacheExpensive = createMap(); + +function isPossiblyDangerousMemberName(name) { + return name == 'constructor'; +} + +var objectValueOf = Object.prototype.valueOf; + +function getValueOf(value) { + return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value); +} + +/////////////////////////////////// + +/** + * @ngdoc service + * @name $parse + * @kind function + * + * @description + * + * Converts Angular {@link guide/expression expression} into a function. + * + * ```js + * var getter = $parse('user.name'); + * var setter = getter.assign; + * var context = {user:{name:'angular'}}; + * var locals = {user:{name:'local'}}; + * + * expect(getter(context)).toEqual('angular'); + * setter(context, 'newValue'); + * expect(context.user.name).toEqual('newValue'); + * expect(getter(context, locals)).toEqual('local'); + * ``` + * + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + * + * The returned function also has the following properties: + * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript + * literal. + * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript + * constant literals. + * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be + * set to a function to change its value on the given context. + * + */ + + +/** + * @ngdoc provider + * @name $parseProvider + * + * @description + * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse} + * service. + */ +function $ParseProvider() { + var cacheDefault = createMap(); + var cacheExpensive = createMap(); + + this.$get = ['$filter', '$sniffer', function($filter, $sniffer) { + var $parseOptions = { + csp: $sniffer.csp, + expensiveChecks: false + }, + $parseOptionsExpensive = { + csp: $sniffer.csp, + expensiveChecks: true + }; + + return function $parse(exp, interceptorFn, expensiveChecks) { + var parsedExpression, oneTime, cacheKey; + + switch (typeof exp) { + case 'string': + exp = exp.trim(); + cacheKey = exp; + + var cache = (expensiveChecks ? cacheExpensive : cacheDefault); + parsedExpression = cache[cacheKey]; + + if (!parsedExpression) { + if (exp.charAt(0) === ':' && exp.charAt(1) === ':') { + oneTime = true; + exp = exp.substring(2); + } + var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions; + var lexer = new Lexer(parseOptions); + var parser = new Parser(lexer, $filter, parseOptions); + parsedExpression = parser.parse(exp); + if (parsedExpression.constant) { + parsedExpression.$$watchDelegate = constantWatchDelegate; + } else if (oneTime) { + parsedExpression.$$watchDelegate = parsedExpression.literal ? + oneTimeLiteralWatchDelegate : oneTimeWatchDelegate; + } else if (parsedExpression.inputs) { + parsedExpression.$$watchDelegate = inputsWatchDelegate; + } + cache[cacheKey] = parsedExpression; + } + return addInterceptor(parsedExpression, interceptorFn); + + case 'function': + return addInterceptor(exp, interceptorFn); + + default: + return noop; + } + }; + + function expressionInputDirtyCheck(newValue, oldValueOfValue) { + + if (newValue == null || oldValueOfValue == null) { // null/undefined + return newValue === oldValueOfValue; + } + + if (typeof newValue === 'object') { + + // attempt to convert the value to a primitive type + // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can + // be cheaply dirty-checked + newValue = getValueOf(newValue); + + if (typeof newValue === 'object') { + // objects/arrays are not supported - deep-watching them would be too expensive + return false; + } + + // fall-through to the primitive equality check + } + + //Primitive or NaN + return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue); + } + + function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) { + var inputExpressions = parsedExpression.inputs; + var lastResult; + + if (inputExpressions.length === 1) { + var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails + inputExpressions = inputExpressions[0]; + return scope.$watch(function expressionInputWatch(scope) { + var newInputValue = inputExpressions(scope); + if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) { + lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]); + oldInputValueOf = newInputValue && getValueOf(newInputValue); + } + return lastResult; + }, listener, objectEquality, prettyPrintExpression); + } + + var oldInputValueOfValues = []; + var oldInputValues = []; + for (var i = 0, ii = inputExpressions.length; i < ii; i++) { + oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails + oldInputValues[i] = null; + } + + return scope.$watch(function expressionInputsWatch(scope) { + var changed = false; + + for (var i = 0, ii = inputExpressions.length; i < ii; i++) { + var newInputValue = inputExpressions[i](scope); + if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) { + oldInputValues[i] = newInputValue; + oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue); + } + } + + if (changed) { + lastResult = parsedExpression(scope, undefined, undefined, oldInputValues); + } + + return lastResult; + }, listener, objectEquality, prettyPrintExpression); + } + + function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) { + var unwatch, lastValue; + return unwatch = scope.$watch(function oneTimeWatch(scope) { + return parsedExpression(scope); + }, function oneTimeListener(value, old, scope) { + lastValue = value; + if (isFunction(listener)) { + listener.apply(this, arguments); + } + if (isDefined(value)) { + scope.$$postDigest(function() { + if (isDefined(lastValue)) { + unwatch(); + } + }); + } + }, objectEquality); + } + + function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) { + var unwatch, lastValue; + return unwatch = scope.$watch(function oneTimeWatch(scope) { + return parsedExpression(scope); + }, function oneTimeListener(value, old, scope) { + lastValue = value; + if (isFunction(listener)) { + listener.call(this, value, old, scope); + } + if (isAllDefined(value)) { + scope.$$postDigest(function() { + if (isAllDefined(lastValue)) unwatch(); + }); + } + }, objectEquality); + + function isAllDefined(value) { + var allDefined = true; + forEach(value, function(val) { + if (!isDefined(val)) allDefined = false; + }); + return allDefined; + } + } + + function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) { + var unwatch; + return unwatch = scope.$watch(function constantWatch(scope) { + return parsedExpression(scope); + }, function constantListener(value, old, scope) { + if (isFunction(listener)) { + listener.apply(this, arguments); + } + unwatch(); + }, objectEquality); + } + + function addInterceptor(parsedExpression, interceptorFn) { + if (!interceptorFn) return parsedExpression; + var watchDelegate = parsedExpression.$$watchDelegate; + + var regularWatch = + watchDelegate !== oneTimeLiteralWatchDelegate && + watchDelegate !== oneTimeWatchDelegate; + + var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) { + var value = parsedExpression(scope, locals, assign, inputs); + return interceptorFn(value, scope, locals); + } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) { + var value = parsedExpression(scope, locals, assign, inputs); + var result = interceptorFn(value, scope, locals); + // we only return the interceptor's result if the + // initial value is defined (for bind-once) + return isDefined(value) ? result : value; + }; + + // Propagate $$watchDelegates other then inputsWatchDelegate + if (parsedExpression.$$watchDelegate && + parsedExpression.$$watchDelegate !== inputsWatchDelegate) { + fn.$$watchDelegate = parsedExpression.$$watchDelegate; + } else if (!interceptorFn.$stateful) { + // If there is an interceptor, but no watchDelegate then treat the interceptor like + // we treat filters - it is assumed to be a pure function unless flagged with $stateful + fn.$$watchDelegate = inputsWatchDelegate; + fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression]; + } + + return fn; + } + }]; +} + +/** + * @ngdoc service + * @name $q + * @requires $rootScope + * + * @description + * A service that helps you run functions asynchronously, and use their return values (or exceptions) + * when they are done processing. + * + * This is an implementation of promises/deferred objects inspired by + * [Kris Kowal's Q](https://github.com/kriskowal/q). + * + * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred + * implementations, and the other which resembles ES6 promises to some degree. + * + * # $q constructor + * + * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver` + * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony, + * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are + * available yet. + * + * It can be used like so: + * + * ```js + * // for the purpose of this example let's assume that variables `$q` and `okToGreet` + * // are available in the current lexical scope (they could have been injected or passed in). + * + * function asyncGreet(name) { + * // perform some asynchronous operation, resolve or reject the promise when appropriate. + * return $q(function(resolve, reject) { + * setTimeout(function() { + * if (okToGreet(name)) { + * resolve('Hello, ' + name + '!'); + * } else { + * reject('Greeting ' + name + ' is not allowed.'); + * } + * }, 1000); + * }); + * } + * + * var promise = asyncGreet('Robin Hood'); + * promise.then(function(greeting) { + * alert('Success: ' + greeting); + * }, function(reason) { + * alert('Failed: ' + reason); + * }); + * ``` + * + * Note: progress/notify callbacks are not currently supported via the ES6-style interface. + * + * However, the more traditional CommonJS-style usage is still available, and documented below. + * + * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an + * interface for interacting with an object that represents the result of an action that is + * performed asynchronously, and may or may not be finished at any given point in time. + * + * From the perspective of dealing with error handling, deferred and promise APIs are to + * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming. + * + * ```js + * // for the purpose of this example let's assume that variables `$q` and `okToGreet` + * // are available in the current lexical scope (they could have been injected or passed in). + * + * function asyncGreet(name) { + * var deferred = $q.defer(); + * + * setTimeout(function() { + * deferred.notify('About to greet ' + name + '.'); + * + * if (okToGreet(name)) { + * deferred.resolve('Hello, ' + name + '!'); + * } else { + * deferred.reject('Greeting ' + name + ' is not allowed.'); + * } + * }, 1000); + * + * return deferred.promise; + * } + * + * var promise = asyncGreet('Robin Hood'); + * promise.then(function(greeting) { + * alert('Success: ' + greeting); + * }, function(reason) { + * alert('Failed: ' + reason); + * }, function(update) { + * alert('Got notification: ' + update); + * }); + * ``` + * + * At first it might not be obvious why this extra complexity is worth the trouble. The payoff + * comes in the way of guarantees that promise and deferred APIs make, see + * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md. + * + * Additionally the promise api allows for composition that is very hard to do with the + * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach. + * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the + * section on serial or parallel joining of promises. + * + * # The Deferred API + * + * A new instance of deferred is constructed by calling `$q.defer()`. + * + * The purpose of the deferred object is to expose the associated Promise instance as well as APIs + * that can be used for signaling the successful or unsuccessful completion, as well as the status + * of the task. + * + * **Methods** + * + * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection + * constructed via `$q.reject`, the promise will be rejected instead. + * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to + * resolving it with a rejection constructed via `$q.reject`. + * - `notify(value)` - provides updates on the status of the promise's execution. This may be called + * multiple times before the promise is either resolved or rejected. + * + * **Properties** + * + * - promise – `{Promise}` – promise object associated with this deferred. + * + * + * # The Promise API + * + * A new promise instance is created when a deferred instance is created and can be retrieved by + * calling `deferred.promise`. + * + * The purpose of the promise object is to allow for interested parties to get access to the result + * of the deferred task when it completes. + * + * **Methods** + * + * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or + * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously + * as soon as the result is available. The callbacks are called with a single argument: the result + * or rejection reason. Additionally, the notify callback may be called zero or more times to + * provide a progress indication, before the promise is resolved or rejected. + * + * This method *returns a new promise* which is resolved or rejected via the return value of the + * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved + * with the value which is resolved in that promise using + * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)). + * It also notifies via the return value of the `notifyCallback` method. The promise cannot be + * resolved or rejected from the notifyCallback method. + * + * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)` + * + * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise, + * but to do so without modifying the final value. This is useful to release resources or do some + * clean-up that needs to be done whether the promise was rejected or resolved. See the [full + * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for + * more information. + * + * # Chaining promises + * + * Because calling the `then` method of a promise returns a new derived promise, it is easily + * possible to create a chain of promises: + * + * ```js + * promiseB = promiseA.then(function(result) { + * return result + 1; + * }); + * + * // promiseB will be resolved immediately after promiseA is resolved and its value + * // will be the result of promiseA incremented by 1 + * ``` + * + * It is possible to create chains of any length and since a promise can be resolved with another + * promise (which will defer its resolution further), it is possible to pause/defer resolution of + * the promises at any point in the chain. This makes it possible to implement powerful APIs like + * $http's response interceptors. + * + * + * # Differences between Kris Kowal's Q and $q + * + * There are two main differences: + * + * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation + * mechanism in angular, which means faster propagation of resolution or rejection into your + * models and avoiding unnecessary browser repaints, which would result in flickering UI. + * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains + * all the important functionality needed for common async tasks. + * + * # Testing + * + * ```js + * it('should simulate promise', inject(function($q, $rootScope) { + * var deferred = $q.defer(); + * var promise = deferred.promise; + * var resolvedValue; + * + * promise.then(function(value) { resolvedValue = value; }); + * expect(resolvedValue).toBeUndefined(); + * + * // Simulate resolving of promise + * deferred.resolve(123); + * // Note that the 'then' function does not get called synchronously. + * // This is because we want the promise API to always be async, whether or not + * // it got called synchronously or asynchronously. + * expect(resolvedValue).toBeUndefined(); + * + * // Propagate promise resolution to 'then' functions using $apply(). + * $rootScope.$apply(); + * expect(resolvedValue).toEqual(123); + * })); + * ``` + * + * @param {function(function, function)} resolver Function which is responsible for resolving or + * rejecting the newly created promise. The first parameter is a function which resolves the + * promise, the second parameter is a function which rejects the promise. + * + * @returns {Promise} The newly created promise. + */ +function $QProvider() { + + this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) { + return qFactory(function(callback) { + $rootScope.$evalAsync(callback); + }, $exceptionHandler); + }]; +} + +function $$QProvider() { + this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) { + return qFactory(function(callback) { + $browser.defer(callback); + }, $exceptionHandler); + }]; +} + +/** + * Constructs a promise manager. + * + * @param {function(function)} nextTick Function for executing functions in the next turn. + * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for + * debugging purposes. + * @returns {object} Promise manager. + */ +function qFactory(nextTick, exceptionHandler) { + var $qMinErr = minErr('$q', TypeError); + function callOnce(self, resolveFn, rejectFn) { + var called = false; + function wrap(fn) { + return function(value) { + if (called) return; + called = true; + fn.call(self, value); + }; + } + + return [wrap(resolveFn), wrap(rejectFn)]; + } + + /** + * @ngdoc method + * @name ng.$q#defer + * @kind function + * + * @description + * Creates a `Deferred` object which represents a task which will finish in the future. + * + * @returns {Deferred} Returns a new instance of deferred. + */ + var defer = function() { + return new Deferred(); + }; + + function Promise() { + this.$$state = { status: 0 }; + } + + Promise.prototype = { + then: function(onFulfilled, onRejected, progressBack) { + var result = new Deferred(); + + this.$$state.pending = this.$$state.pending || []; + this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]); + if (this.$$state.status > 0) scheduleProcessQueue(this.$$state); + + return result.promise; + }, + + "catch": function(callback) { + return this.then(null, callback); + }, + + "finally": function(callback, progressBack) { + return this.then(function(value) { + return handleCallback(value, true, callback); + }, function(error) { + return handleCallback(error, false, callback); + }, progressBack); + } + }; + + //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native + function simpleBind(context, fn) { + return function(value) { + fn.call(context, value); + }; + } + + function processQueue(state) { + var fn, deferred, pending; + + pending = state.pending; + state.processScheduled = false; + state.pending = undefined; + for (var i = 0, ii = pending.length; i < ii; ++i) { + deferred = pending[i][0]; + fn = pending[i][state.status]; + try { + if (isFunction(fn)) { + deferred.resolve(fn(state.value)); + } else if (state.status === 1) { + deferred.resolve(state.value); + } else { + deferred.reject(state.value); + } + } catch (e) { + deferred.reject(e); + exceptionHandler(e); + } + } + } + + function scheduleProcessQueue(state) { + if (state.processScheduled || !state.pending) return; + state.processScheduled = true; + nextTick(function() { processQueue(state); }); + } + + function Deferred() { + this.promise = new Promise(); + //Necessary to support unbound execution :/ + this.resolve = simpleBind(this, this.resolve); + this.reject = simpleBind(this, this.reject); + this.notify = simpleBind(this, this.notify); + } + + Deferred.prototype = { + resolve: function(val) { + if (this.promise.$$state.status) return; + if (val === this.promise) { + this.$$reject($qMinErr( + 'qcycle', + "Expected promise to be resolved with value other than itself '{0}'", + val)); + } else { + this.$$resolve(val); + } + + }, + + $$resolve: function(val) { + var then, fns; + + fns = callOnce(this, this.$$resolve, this.$$reject); + try { + if ((isObject(val) || isFunction(val))) then = val && val.then; + if (isFunction(then)) { + this.promise.$$state.status = -1; + then.call(val, fns[0], fns[1], this.notify); + } else { + this.promise.$$state.value = val; + this.promise.$$state.status = 1; + scheduleProcessQueue(this.promise.$$state); + } + } catch (e) { + fns[1](e); + exceptionHandler(e); + } + }, + + reject: function(reason) { + if (this.promise.$$state.status) return; + this.$$reject(reason); + }, + + $$reject: function(reason) { + this.promise.$$state.value = reason; + this.promise.$$state.status = 2; + scheduleProcessQueue(this.promise.$$state); + }, + + notify: function(progress) { + var callbacks = this.promise.$$state.pending; + + if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) { + nextTick(function() { + var callback, result; + for (var i = 0, ii = callbacks.length; i < ii; i++) { + result = callbacks[i][0]; + callback = callbacks[i][3]; + try { + result.notify(isFunction(callback) ? callback(progress) : progress); + } catch (e) { + exceptionHandler(e); + } + } + }); + } + } + }; + + /** + * @ngdoc method + * @name $q#reject + * @kind function + * + * @description + * Creates a promise that is resolved as rejected with the specified `reason`. This api should be + * used to forward rejection in a chain of promises. If you are dealing with the last promise in + * a promise chain, you don't need to worry about it. + * + * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of + * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via + * a promise error callback and you want to forward the error to the promise derived from the + * current promise, you have to "rethrow" the error by returning a rejection constructed via + * `reject`. + * + * ```js + * promiseB = promiseA.then(function(result) { + * // success: do something and resolve promiseB + * // with the old or a new result + * return result; + * }, function(reason) { + * // error: handle the error if possible and + * // resolve promiseB with newPromiseOrValue, + * // otherwise forward the rejection to promiseB + * if (canHandle(reason)) { + * // handle the error and recover + * return newPromiseOrValue; + * } + * return $q.reject(reason); + * }); + * ``` + * + * @param {*} reason Constant, message, exception or an object representing the rejection reason. + * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`. + */ + var reject = function(reason) { + var result = new Deferred(); + result.reject(reason); + return result.promise; + }; + + var makePromise = function makePromise(value, resolved) { + var result = new Deferred(); + if (resolved) { + result.resolve(value); + } else { + result.reject(value); + } + return result.promise; + }; + + var handleCallback = function handleCallback(value, isResolved, callback) { + var callbackOutput = null; + try { + if (isFunction(callback)) callbackOutput = callback(); + } catch (e) { + return makePromise(e, false); + } + if (isPromiseLike(callbackOutput)) { + return callbackOutput.then(function() { + return makePromise(value, isResolved); + }, function(error) { + return makePromise(error, false); + }); + } else { + return makePromise(value, isResolved); + } + }; + + /** + * @ngdoc method + * @name $q#when + * @kind function + * + * @description + * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. + * This is useful when you are dealing with an object that might or might not be a promise, or if + * the promise comes from a source that can't be trusted. + * + * @param {*} value Value or a promise + * @returns {Promise} Returns a promise of the passed value or promise + */ + + + var when = function(value, callback, errback, progressBack) { + var result = new Deferred(); + result.resolve(value); + return result.promise.then(callback, errback, progressBack); + }; + + /** + * @ngdoc method + * @name $q#resolve + * @kind function + * + * @description + * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6. + * + * @param {*} value Value or a promise + * @returns {Promise} Returns a promise of the passed value or promise + */ + var resolve = when; + + /** + * @ngdoc method + * @name $q#all + * @kind function + * + * @description + * Combines multiple promises into a single promise that is resolved when all of the input + * promises are resolved. + * + * @param {Array.|Object.} promises An array or hash of promises. + * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values, + * each value corresponding to the promise at the same index/key in the `promises` array/hash. + * If any of the promises is resolved with a rejection, this resulting promise will be rejected + * with the same rejection value. + */ + + function all(promises) { + var deferred = new Deferred(), + counter = 0, + results = isArray(promises) ? [] : {}; + + forEach(promises, function(promise, key) { + counter++; + when(promise).then(function(value) { + if (results.hasOwnProperty(key)) return; + results[key] = value; + if (!(--counter)) deferred.resolve(results); + }, function(reason) { + if (results.hasOwnProperty(key)) return; + deferred.reject(reason); + }); + }); + + if (counter === 0) { + deferred.resolve(results); + } + + return deferred.promise; + } + + var $Q = function Q(resolver) { + if (!isFunction(resolver)) { + throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver); + } + + if (!(this instanceof Q)) { + // More useful when $Q is the Promise itself. + return new Q(resolver); + } + + var deferred = new Deferred(); + + function resolveFn(value) { + deferred.resolve(value); + } + + function rejectFn(reason) { + deferred.reject(reason); + } + + resolver(resolveFn, rejectFn); + + return deferred.promise; + }; + + $Q.defer = defer; + $Q.reject = reject; + $Q.when = when; + $Q.resolve = resolve; + $Q.all = all; + + return $Q; +} + +function $$RAFProvider() { //rAF + this.$get = ['$window', '$timeout', function($window, $timeout) { + var requestAnimationFrame = $window.requestAnimationFrame || + $window.webkitRequestAnimationFrame; + + var cancelAnimationFrame = $window.cancelAnimationFrame || + $window.webkitCancelAnimationFrame || + $window.webkitCancelRequestAnimationFrame; + + var rafSupported = !!requestAnimationFrame; + var rafFn = rafSupported + ? function(fn) { + var id = requestAnimationFrame(fn); + return function() { + cancelAnimationFrame(id); + }; + } + : function(fn) { + var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666 + return function() { + $timeout.cancel(timer); + }; + }; + + queueFn.supported = rafSupported; + + var cancelLastRAF; + var taskCount = 0; + var taskQueue = []; + return queueFn; + + function flush() { + for (var i = 0; i < taskQueue.length; i++) { + var task = taskQueue[i]; + if (task) { + taskQueue[i] = null; + task(); + } + } + taskCount = taskQueue.length = 0; + } + + function queueFn(asyncFn) { + var index = taskQueue.length; + + taskCount++; + taskQueue.push(asyncFn); + + if (index === 0) { + cancelLastRAF = rafFn(flush); + } + + return function cancelQueueFn() { + if (index >= 0) { + taskQueue[index] = null; + index = null; + + if (--taskCount === 0 && cancelLastRAF) { + cancelLastRAF(); + cancelLastRAF = null; + taskQueue.length = 0; + } + } + }; + } + }]; +} + +/** + * DESIGN NOTES + * + * The design decisions behind the scope are heavily favored for speed and memory consumption. + * + * The typical use of scope is to watch the expressions, which most of the time return the same + * value as last time so we optimize the operation. + * + * Closures construction is expensive in terms of speed as well as memory: + * - No closures, instead use prototypical inheritance for API + * - Internal state needs to be stored on scope directly, which means that private state is + * exposed as $$____ properties + * + * Loop operations are optimized by using while(count--) { ... } + * - this means that in order to keep the same order of execution as addition we have to add + * items to the array at the beginning (unshift) instead of at the end (push) + * + * Child scopes are created and removed often + * - Using an array would be slow since inserts in middle are expensive so we use linked list + * + * There are few watches then a lot of observers. This is why you don't want the observer to be + * implemented in the same way as watch. Watch requires return of initialization function which + * are expensive to construct. + */ + + +/** + * @ngdoc provider + * @name $rootScopeProvider + * @description + * + * Provider for the $rootScope service. + */ + +/** + * @ngdoc method + * @name $rootScopeProvider#digestTtl + * @description + * + * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and + * assuming that the model is unstable. + * + * The current default is 10 iterations. + * + * In complex applications it's possible that the dependencies between `$watch`s will result in + * several digest iterations. However if an application needs more than the default 10 digest + * iterations for its model to stabilize then you should investigate what is causing the model to + * continuously change during the digest. + * + * Increasing the TTL could have performance implications, so you should not change it without + * proper justification. + * + * @param {number} limit The number of digest iterations. + */ + + +/** + * @ngdoc service + * @name $rootScope + * @description + * + * Every application has a single root {@link ng.$rootScope.Scope scope}. + * All other scopes are descendant scopes of the root scope. Scopes provide separation + * between the model and the view, via a mechanism for watching the model for changes. + * They also provide an event emission/broadcast and subscription facility. See the + * {@link guide/scope developer guide on scopes}. + */ +function $RootScopeProvider() { + var TTL = 10; + var $rootScopeMinErr = minErr('$rootScope'); + var lastDirtyWatch = null; + var applyAsyncId = null; + + this.digestTtl = function(value) { + if (arguments.length) { + TTL = value; + } + return TTL; + }; + + function createChildScopeClass(parent) { + function ChildScope() { + this.$$watchers = this.$$nextSibling = + this.$$childHead = this.$$childTail = null; + this.$$listeners = {}; + this.$$listenerCount = {}; + this.$$watchersCount = 0; + this.$id = nextUid(); + this.$$ChildScope = null; + } + ChildScope.prototype = parent; + return ChildScope; + } + + this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser', + function($injector, $exceptionHandler, $parse, $browser) { + + function destroyChildScope($event) { + $event.currentScope.$$destroyed = true; + } + + /** + * @ngdoc type + * @name $rootScope.Scope + * + * @description + * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the + * {@link auto.$injector $injector}. Child scopes are created using the + * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when + * compiled HTML template is executed.) + * + * Here is a simple scope snippet to show how you can interact with the scope. + * ```html + * + * ``` + * + * # Inheritance + * A scope can inherit from a parent scope, as in this example: + * ```js + var parent = $rootScope; + var child = parent.$new(); + + parent.salutation = "Hello"; + expect(child.salutation).toEqual('Hello'); + + child.salutation = "Welcome"; + expect(child.salutation).toEqual('Welcome'); + expect(parent.salutation).toEqual('Hello'); + * ``` + * + * When interacting with `Scope` in tests, additional helper methods are available on the + * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional + * details. + * + * + * @param {Object.=} providers Map of service factory which need to be + * provided for the current scope. Defaults to {@link ng}. + * @param {Object.=} instanceCache Provides pre-instantiated services which should + * append/override services provided by `providers`. This is handy + * when unit-testing and having the need to override a default + * service. + * @returns {Object} Newly created scope. + * + */ + function Scope() { + this.$id = nextUid(); + this.$$phase = this.$parent = this.$$watchers = + this.$$nextSibling = this.$$prevSibling = + this.$$childHead = this.$$childTail = null; + this.$root = this; + this.$$destroyed = false; + this.$$listeners = {}; + this.$$listenerCount = {}; + this.$$watchersCount = 0; + this.$$isolateBindings = null; + } + + /** + * @ngdoc property + * @name $rootScope.Scope#$id + * + * @description + * Unique scope ID (monotonically increasing) useful for debugging. + */ + + /** + * @ngdoc property + * @name $rootScope.Scope#$parent + * + * @description + * Reference to the parent scope. + */ + + /** + * @ngdoc property + * @name $rootScope.Scope#$root + * + * @description + * Reference to the root scope. + */ + + Scope.prototype = { + constructor: Scope, + /** + * @ngdoc method + * @name $rootScope.Scope#$new + * @kind function + * + * @description + * Creates a new child {@link ng.$rootScope.Scope scope}. + * + * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event. + * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}. + * + * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is + * desired for the scope and its child scopes to be permanently detached from the parent and + * thus stop participating in model change detection and listener notification by invoking. + * + * @param {boolean} isolate If true, then the scope does not prototypically inherit from the + * parent scope. The scope is isolated, as it can not see parent scope properties. + * When creating widgets, it is useful for the widget to not accidentally read parent + * state. + * + * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent` + * of the newly created scope. Defaults to `this` scope if not provided. + * This is used when creating a transclude scope to correctly place it + * in the scope hierarchy while maintaining the correct prototypical + * inheritance. + * + * @returns {Object} The newly created child scope. + * + */ + $new: function(isolate, parent) { + var child; + + parent = parent || this; + + if (isolate) { + child = new Scope(); + child.$root = this.$root; + } else { + // Only create a child scope class if somebody asks for one, + // but cache it to allow the VM to optimize lookups. + if (!this.$$ChildScope) { + this.$$ChildScope = createChildScopeClass(this); + } + child = new this.$$ChildScope(); + } + child.$parent = parent; + child.$$prevSibling = parent.$$childTail; + if (parent.$$childHead) { + parent.$$childTail.$$nextSibling = child; + parent.$$childTail = child; + } else { + parent.$$childHead = parent.$$childTail = child; + } + + // When the new scope is not isolated or we inherit from `this`, and + // the parent scope is destroyed, the property `$$destroyed` is inherited + // prototypically. In all other cases, this property needs to be set + // when the parent scope is destroyed. + // The listener needs to be added after the parent is set + if (isolate || parent != this) child.$on('$destroy', destroyChildScope); + + return child; + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$watch + * @kind function + * + * @description + * Registers a `listener` callback to be executed whenever the `watchExpression` changes. + * + * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest + * $digest()} and should return the value that will be watched. (Since + * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the + * `watchExpression` can execute multiple times per + * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.) + * - The `listener` is called only when the value from the current `watchExpression` and the + * previous call to `watchExpression` are not equal (with the exception of the initial run, + * see below). Inequality is determined according to reference inequality, + * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators) + * via the `!==` Javascript operator, unless `objectEquality == true` + * (see next point) + * - When `objectEquality == true`, inequality of the `watchExpression` is determined + * according to the {@link angular.equals} function. To save the value of the object for + * later comparison, the {@link angular.copy} function is used. This therefore means that + * watching complex objects will have adverse memory and performance implications. + * - The watch `listener` may change the model, which may trigger other `listener`s to fire. + * This is achieved by rerunning the watchers until no changes are detected. The rerun + * iteration limit is 10 to prevent an infinite loop deadlock. + * + * + * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called, + * you can register a `watchExpression` function with no `listener`. (Since `watchExpression` + * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a + * change is detected, be prepared for multiple calls to your listener.) + * + * After a watcher is registered with the scope, the `listener` fn is called asynchronously + * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the + * watcher. In rare cases, this is undesirable because the listener is called when the result + * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you + * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the + * listener was called due to initialization. + * + * + * + * # Example + * ```js + // let's assume that scope was dependency injected as the $rootScope + var scope = $rootScope; + scope.name = 'misko'; + scope.counter = 0; + + expect(scope.counter).toEqual(0); + scope.$watch('name', function(newValue, oldValue) { + scope.counter = scope.counter + 1; + }); + expect(scope.counter).toEqual(0); + + scope.$digest(); + // the listener is always called during the first $digest loop after it was registered + expect(scope.counter).toEqual(1); + + scope.$digest(); + // but now it will not be called unless the value changes + expect(scope.counter).toEqual(1); + + scope.name = 'adam'; + scope.$digest(); + expect(scope.counter).toEqual(2); + + + + // Using a function as a watchExpression + var food; + scope.foodCounter = 0; + expect(scope.foodCounter).toEqual(0); + scope.$watch( + // This function returns the value being watched. It is called for each turn of the $digest loop + function() { return food; }, + // This is the change listener, called when the value returned from the above function changes + function(newValue, oldValue) { + if ( newValue !== oldValue ) { + // Only increment the counter if the value changed + scope.foodCounter = scope.foodCounter + 1; + } + } + ); + // No digest has been run so the counter will be zero + expect(scope.foodCounter).toEqual(0); + + // Run the digest but since food has not changed count will still be zero + scope.$digest(); + expect(scope.foodCounter).toEqual(0); + + // Update food and run digest. Now the counter will increment + food = 'cheeseburger'; + scope.$digest(); + expect(scope.foodCounter).toEqual(1); + + * ``` + * + * + * + * @param {(function()|string)} watchExpression Expression that is evaluated on each + * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers + * a call to the `listener`. + * + * - `string`: Evaluated as {@link guide/expression expression} + * - `function(scope)`: called with current `scope` as a parameter. + * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value + * of `watchExpression` changes. + * + * - `newVal` contains the current value of the `watchExpression` + * - `oldVal` contains the previous value of the `watchExpression` + * - `scope` refers to the current scope + * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of + * comparing for reference equality. + * @returns {function()} Returns a deregistration function for this listener. + */ + $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) { + var get = $parse(watchExp); + + if (get.$$watchDelegate) { + return get.$$watchDelegate(this, listener, objectEquality, get, watchExp); + } + var scope = this, + array = scope.$$watchers, + watcher = { + fn: listener, + last: initWatchVal, + get: get, + exp: prettyPrintExpression || watchExp, + eq: !!objectEquality + }; + + lastDirtyWatch = null; + + if (!isFunction(listener)) { + watcher.fn = noop; + } + + if (!array) { + array = scope.$$watchers = []; + } + // we use unshift since we use a while loop in $digest for speed. + // the while loop reads in reverse order. + array.unshift(watcher); + incrementWatchersCount(this, 1); + + return function deregisterWatch() { + if (arrayRemove(array, watcher) >= 0) { + incrementWatchersCount(scope, -1); + } + lastDirtyWatch = null; + }; + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$watchGroup + * @kind function + * + * @description + * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`. + * If any one expression in the collection changes the `listener` is executed. + * + * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every + * call to $digest() to see if any items changes. + * - The `listener` is called whenever any expression in the `watchExpressions` array changes. + * + * @param {Array.} watchExpressions Array of expressions that will be individually + * watched using {@link ng.$rootScope.Scope#$watch $watch()} + * + * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any + * expression in `watchExpressions` changes + * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching + * those of `watchExpression` + * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching + * those of `watchExpression` + * The `scope` refers to the current scope. + * @returns {function()} Returns a de-registration function for all listeners. + */ + $watchGroup: function(watchExpressions, listener) { + var oldValues = new Array(watchExpressions.length); + var newValues = new Array(watchExpressions.length); + var deregisterFns = []; + var self = this; + var changeReactionScheduled = false; + var firstRun = true; + + if (!watchExpressions.length) { + // No expressions means we call the listener ASAP + var shouldCall = true; + self.$evalAsync(function() { + if (shouldCall) listener(newValues, newValues, self); + }); + return function deregisterWatchGroup() { + shouldCall = false; + }; + } + + if (watchExpressions.length === 1) { + // Special case size of one + return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) { + newValues[0] = value; + oldValues[0] = oldValue; + listener(newValues, (value === oldValue) ? newValues : oldValues, scope); + }); + } + + forEach(watchExpressions, function(expr, i) { + var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) { + newValues[i] = value; + oldValues[i] = oldValue; + if (!changeReactionScheduled) { + changeReactionScheduled = true; + self.$evalAsync(watchGroupAction); + } + }); + deregisterFns.push(unwatchFn); + }); + + function watchGroupAction() { + changeReactionScheduled = false; + + if (firstRun) { + firstRun = false; + listener(newValues, newValues, self); + } else { + listener(newValues, oldValues, self); + } + } + + return function deregisterWatchGroup() { + while (deregisterFns.length) { + deregisterFns.shift()(); + } + }; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$watchCollection + * @kind function + * + * @description + * Shallow watches the properties of an object and fires whenever any of the properties change + * (for arrays, this implies watching the array items; for object maps, this implies watching + * the properties). If a change is detected, the `listener` callback is fired. + * + * - The `obj` collection is observed via standard $watch operation and is examined on every + * call to $digest() to see if any items have been added, removed, or moved. + * - The `listener` is called whenever anything within the `obj` has changed. Examples include + * adding, removing, and moving items belonging to an object or array. + * + * + * # Example + * ```js + $scope.names = ['igor', 'matias', 'misko', 'james']; + $scope.dataCount = 4; + + $scope.$watchCollection('names', function(newNames, oldNames) { + $scope.dataCount = newNames.length; + }); + + expect($scope.dataCount).toEqual(4); + $scope.$digest(); + + //still at 4 ... no changes + expect($scope.dataCount).toEqual(4); + + $scope.names.pop(); + $scope.$digest(); + + //now there's been a change + expect($scope.dataCount).toEqual(3); + * ``` + * + * + * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The + * expression value should evaluate to an object or an array which is observed on each + * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the + * collection will trigger a call to the `listener`. + * + * @param {function(newCollection, oldCollection, scope)} listener a callback function called + * when a change is detected. + * - The `newCollection` object is the newly modified data obtained from the `obj` expression + * - The `oldCollection` object is a copy of the former collection data. + * Due to performance considerations, the`oldCollection` value is computed only if the + * `listener` function declares two or more arguments. + * - The `scope` argument refers to the current scope. + * + * @returns {function()} Returns a de-registration function for this listener. When the + * de-registration function is executed, the internal watch operation is terminated. + */ + $watchCollection: function(obj, listener) { + $watchCollectionInterceptor.$stateful = true; + + var self = this; + // the current value, updated on each dirty-check run + var newValue; + // a shallow copy of the newValue from the last dirty-check run, + // updated to match newValue during dirty-check run + var oldValue; + // a shallow copy of the newValue from when the last change happened + var veryOldValue; + // only track veryOldValue if the listener is asking for it + var trackVeryOldValue = (listener.length > 1); + var changeDetected = 0; + var changeDetector = $parse(obj, $watchCollectionInterceptor); + var internalArray = []; + var internalObject = {}; + var initRun = true; + var oldLength = 0; + + function $watchCollectionInterceptor(_value) { + newValue = _value; + var newLength, key, bothNaN, newItem, oldItem; + + // If the new value is undefined, then return undefined as the watch may be a one-time watch + if (isUndefined(newValue)) return; + + if (!isObject(newValue)) { // if primitive + if (oldValue !== newValue) { + oldValue = newValue; + changeDetected++; + } + } else if (isArrayLike(newValue)) { + if (oldValue !== internalArray) { + // we are transitioning from something which was not an array into array. + oldValue = internalArray; + oldLength = oldValue.length = 0; + changeDetected++; + } + + newLength = newValue.length; + + if (oldLength !== newLength) { + // if lengths do not match we need to trigger change notification + changeDetected++; + oldValue.length = oldLength = newLength; + } + // copy the items to oldValue and look for changes. + for (var i = 0; i < newLength; i++) { + oldItem = oldValue[i]; + newItem = newValue[i]; + + bothNaN = (oldItem !== oldItem) && (newItem !== newItem); + if (!bothNaN && (oldItem !== newItem)) { + changeDetected++; + oldValue[i] = newItem; + } + } + } else { + if (oldValue !== internalObject) { + // we are transitioning from something which was not an object into object. + oldValue = internalObject = {}; + oldLength = 0; + changeDetected++; + } + // copy the items to oldValue and look for changes. + newLength = 0; + for (key in newValue) { + if (newValue.hasOwnProperty(key)) { + newLength++; + newItem = newValue[key]; + oldItem = oldValue[key]; + + if (key in oldValue) { + bothNaN = (oldItem !== oldItem) && (newItem !== newItem); + if (!bothNaN && (oldItem !== newItem)) { + changeDetected++; + oldValue[key] = newItem; + } + } else { + oldLength++; + oldValue[key] = newItem; + changeDetected++; + } + } + } + if (oldLength > newLength) { + // we used to have more keys, need to find them and destroy them. + changeDetected++; + for (key in oldValue) { + if (!newValue.hasOwnProperty(key)) { + oldLength--; + delete oldValue[key]; + } + } + } + } + return changeDetected; + } + + function $watchCollectionAction() { + if (initRun) { + initRun = false; + listener(newValue, newValue, self); + } else { + listener(newValue, veryOldValue, self); + } + + // make a copy for the next time a collection is changed + if (trackVeryOldValue) { + if (!isObject(newValue)) { + //primitive + veryOldValue = newValue; + } else if (isArrayLike(newValue)) { + veryOldValue = new Array(newValue.length); + for (var i = 0; i < newValue.length; i++) { + veryOldValue[i] = newValue[i]; + } + } else { // if object + veryOldValue = {}; + for (var key in newValue) { + if (hasOwnProperty.call(newValue, key)) { + veryOldValue[key] = newValue[key]; + } + } + } + } + } + + return this.$watch(changeDetector, $watchCollectionAction); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$digest + * @kind function + * + * @description + * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and + * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change + * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} + * until no more listeners are firing. This means that it is possible to get into an infinite + * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of + * iterations exceeds 10. + * + * Usually, you don't call `$digest()` directly in + * {@link ng.directive:ngController controllers} or in + * {@link ng.$compileProvider#directive directives}. + * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within + * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`. + * + * If you want to be notified whenever `$digest()` is called, + * you can register a `watchExpression` function with + * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`. + * + * In unit tests, you may need to call `$digest()` to simulate the scope life cycle. + * + * # Example + * ```js + var scope = ...; + scope.name = 'misko'; + scope.counter = 0; + + expect(scope.counter).toEqual(0); + scope.$watch('name', function(newValue, oldValue) { + scope.counter = scope.counter + 1; + }); + expect(scope.counter).toEqual(0); + + scope.$digest(); + // the listener is always called during the first $digest loop after it was registered + expect(scope.counter).toEqual(1); + + scope.$digest(); + // but now it will not be called unless the value changes + expect(scope.counter).toEqual(1); + + scope.name = 'adam'; + scope.$digest(); + expect(scope.counter).toEqual(2); + * ``` + * + */ + $digest: function() { + var watch, value, last, + watchers, + length, + dirty, ttl = TTL, + next, current, target = this, + watchLog = [], + logIdx, logMsg, asyncTask; + + beginPhase('$digest'); + // Check for changes to browser url that happened in sync before the call to $digest + $browser.$$checkUrlChange(); + + if (this === $rootScope && applyAsyncId !== null) { + // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then + // cancel the scheduled $apply and flush the queue of expressions to be evaluated. + $browser.defer.cancel(applyAsyncId); + flushApplyAsync(); + } + + lastDirtyWatch = null; + + do { // "while dirty" loop + dirty = false; + current = target; + + while (asyncQueue.length) { + try { + asyncTask = asyncQueue.shift(); + asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals); + } catch (e) { + $exceptionHandler(e); + } + lastDirtyWatch = null; + } + + traverseScopesLoop: + do { // "traverse the scopes" loop + if ((watchers = current.$$watchers)) { + // process our watches + length = watchers.length; + while (length--) { + try { + watch = watchers[length]; + // Most common watches are on primitives, in which case we can short + // circuit it with === operator, only when === fails do we use .equals + if (watch) { + if ((value = watch.get(current)) !== (last = watch.last) && + !(watch.eq + ? equals(value, last) + : (typeof value === 'number' && typeof last === 'number' + && isNaN(value) && isNaN(last)))) { + dirty = true; + lastDirtyWatch = watch; + watch.last = watch.eq ? copy(value, null) : value; + watch.fn(value, ((last === initWatchVal) ? value : last), current); + if (ttl < 5) { + logIdx = 4 - ttl; + if (!watchLog[logIdx]) watchLog[logIdx] = []; + watchLog[logIdx].push({ + msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp, + newVal: value, + oldVal: last + }); + } + } else if (watch === lastDirtyWatch) { + // If the most recently dirty watcher is now clean, short circuit since the remaining watchers + // have already been tested. + dirty = false; + break traverseScopesLoop; + } + } + } catch (e) { + $exceptionHandler(e); + } + } + } + + // Insanity Warning: scope depth-first traversal + // yes, this code is a bit crazy, but it works and we have tests to prove it! + // this piece should be kept in sync with the traversal in $broadcast + if (!(next = ((current.$$watchersCount && current.$$childHead) || + (current !== target && current.$$nextSibling)))) { + while (current !== target && !(next = current.$$nextSibling)) { + current = current.$parent; + } + } + } while ((current = next)); + + // `break traverseScopesLoop;` takes us to here + + if ((dirty || asyncQueue.length) && !(ttl--)) { + clearPhase(); + throw $rootScopeMinErr('infdig', + '{0} $digest() iterations reached. Aborting!\n' + + 'Watchers fired in the last 5 iterations: {1}', + TTL, watchLog); + } + + } while (dirty || asyncQueue.length); + + clearPhase(); + + while (postDigestQueue.length) { + try { + postDigestQueue.shift()(); + } catch (e) { + $exceptionHandler(e); + } + } + }, + + + /** + * @ngdoc event + * @name $rootScope.Scope#$destroy + * @eventType broadcast on scope being destroyed + * + * @description + * Broadcasted when a scope and its children are being destroyed. + * + * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to + * clean up DOM bindings before an element is removed from the DOM. + */ + + /** + * @ngdoc method + * @name $rootScope.Scope#$destroy + * @kind function + * + * @description + * Removes the current scope (and all of its children) from the parent scope. Removal implies + * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer + * propagate to the current scope and its children. Removal also implies that the current + * scope is eligible for garbage collection. + * + * The `$destroy()` is usually used by directives such as + * {@link ng.directive:ngRepeat ngRepeat} for managing the + * unrolling of the loop. + * + * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. + * Application code can register a `$destroy` event handler that will give it a chance to + * perform any necessary cleanup. + * + * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to + * clean up DOM bindings before an element is removed from the DOM. + */ + $destroy: function() { + // We can't destroy a scope that has been already destroyed. + if (this.$$destroyed) return; + var parent = this.$parent; + + this.$broadcast('$destroy'); + this.$$destroyed = true; + + if (this === $rootScope) { + //Remove handlers attached to window when $rootScope is removed + $browser.$$applicationDestroyed(); + } + + incrementWatchersCount(this, -this.$$watchersCount); + for (var eventName in this.$$listenerCount) { + decrementListenerCount(this, this.$$listenerCount[eventName], eventName); + } + + // sever all the references to parent scopes (after this cleanup, the current scope should + // not be retained by any of our references and should be eligible for garbage collection) + if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling; + if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling; + if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; + if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; + + // Disable listeners, watchers and apply/digest methods + this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop; + this.$on = this.$watch = this.$watchGroup = function() { return noop; }; + this.$$listeners = {}; + + // All of the code below is bogus code that works around V8's memory leak via optimized code + // and inline caches. + // + // see: + // - https://code.google.com/p/v8/issues/detail?id=2073#c26 + // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909 + // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451 + + this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead = + this.$$childTail = this.$root = this.$$watchers = null; + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$eval + * @kind function + * + * @description + * Executes the `expression` on the current scope and returns the result. Any exceptions in + * the expression are propagated (uncaught). This is useful when evaluating Angular + * expressions. + * + * # Example + * ```js + var scope = ng.$rootScope.Scope(); + scope.a = 1; + scope.b = 2; + + expect(scope.$eval('a+b')).toEqual(3); + expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); + * ``` + * + * @param {(string|function())=} expression An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with the current `scope` parameter. + * + * @param {(object)=} locals Local variables object, useful for overriding values in scope. + * @returns {*} The result of evaluating the expression. + */ + $eval: function(expr, locals) { + return $parse(expr)(this, locals); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$evalAsync + * @kind function + * + * @description + * Executes the expression on the current scope at a later point in time. + * + * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only + * that: + * + * - it will execute after the function that scheduled the evaluation (preferably before DOM + * rendering). + * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after + * `expression` execution. + * + * Any exceptions from the execution of the expression are forwarded to the + * {@link ng.$exceptionHandler $exceptionHandler} service. + * + * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle + * will be scheduled. However, it is encouraged to always call code that changes the model + * from within an `$apply` call. That includes code evaluated via `$evalAsync`. + * + * @param {(string|function())=} expression An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with the current `scope` parameter. + * + * @param {(object)=} locals Local variables object, useful for overriding values in scope. + */ + $evalAsync: function(expr, locals) { + // if we are outside of an $digest loop and this is the first time we are scheduling async + // task also schedule async auto-flush + if (!$rootScope.$$phase && !asyncQueue.length) { + $browser.defer(function() { + if (asyncQueue.length) { + $rootScope.$digest(); + } + }); + } + + asyncQueue.push({scope: this, expression: expr, locals: locals}); + }, + + $$postDigest: function(fn) { + postDigestQueue.push(fn); + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$apply + * @kind function + * + * @description + * `$apply()` is used to execute an expression in angular from outside of the angular + * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). + * Because we are calling into the angular framework we need to perform proper scope life + * cycle of {@link ng.$exceptionHandler exception handling}, + * {@link ng.$rootScope.Scope#$digest executing watches}. + * + * ## Life cycle + * + * # Pseudo-Code of `$apply()` + * ```js + function $apply(expr) { + try { + return $eval(expr); + } catch (e) { + $exceptionHandler(e); + } finally { + $root.$digest(); + } + } + * ``` + * + * + * Scope's `$apply()` method transitions through the following stages: + * + * 1. The {@link guide/expression expression} is executed using the + * {@link ng.$rootScope.Scope#$eval $eval()} method. + * 2. Any exceptions from the execution of the expression are forwarded to the + * {@link ng.$exceptionHandler $exceptionHandler} service. + * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the + * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method. + * + * + * @param {(string|function())=} exp An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with current `scope` parameter. + * + * @returns {*} The result of evaluating the expression. + */ + $apply: function(expr) { + try { + beginPhase('$apply'); + return this.$eval(expr); + } catch (e) { + $exceptionHandler(e); + } finally { + clearPhase(); + try { + $rootScope.$digest(); + } catch (e) { + $exceptionHandler(e); + throw e; + } + } + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$applyAsync + * @kind function + * + * @description + * Schedule the invocation of $apply to occur at a later time. The actual time difference + * varies across browsers, but is typically around ~10 milliseconds. + * + * This can be used to queue up multiple expressions which need to be evaluated in the same + * digest. + * + * @param {(string|function())=} exp An angular expression to be executed. + * + * - `string`: execute using the rules as defined in {@link guide/expression expression}. + * - `function(scope)`: execute the function with current `scope` parameter. + */ + $applyAsync: function(expr) { + var scope = this; + expr && applyAsyncQueue.push($applyAsyncExpression); + scheduleApplyAsync(); + + function $applyAsyncExpression() { + scope.$eval(expr); + } + }, + + /** + * @ngdoc method + * @name $rootScope.Scope#$on + * @kind function + * + * @description + * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for + * discussion of event life cycle. + * + * The event listener function format is: `function(event, args...)`. The `event` object + * passed into the listener has the following attributes: + * + * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or + * `$broadcast`-ed. + * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the + * event propagates through the scope hierarchy, this property is set to null. + * - `name` - `{string}`: name of the event. + * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel + * further event propagation (available only for events that were `$emit`-ed). + * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag + * to true. + * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called. + * + * @param {string} name Event name to listen on. + * @param {function(event, ...args)} listener Function to call when the event is emitted. + * @returns {function()} Returns a deregistration function for this listener. + */ + $on: function(name, listener) { + var namedListeners = this.$$listeners[name]; + if (!namedListeners) { + this.$$listeners[name] = namedListeners = []; + } + namedListeners.push(listener); + + var current = this; + do { + if (!current.$$listenerCount[name]) { + current.$$listenerCount[name] = 0; + } + current.$$listenerCount[name]++; + } while ((current = current.$parent)); + + var self = this; + return function() { + var indexOfListener = namedListeners.indexOf(listener); + if (indexOfListener !== -1) { + namedListeners[indexOfListener] = null; + decrementListenerCount(self, 1, name); + } + }; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$emit + * @kind function + * + * @description + * Dispatches an event `name` upwards through the scope hierarchy notifying the + * registered {@link ng.$rootScope.Scope#$on} listeners. + * + * The event life cycle starts at the scope on which `$emit` was called. All + * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get + * notified. Afterwards, the event traverses upwards toward the root scope and calls all + * registered listeners along the way. The event will stop propagating if one of the listeners + * cancels it. + * + * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed + * onto the {@link ng.$exceptionHandler $exceptionHandler} service. + * + * @param {string} name Event name to emit. + * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. + * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}). + */ + $emit: function(name, args) { + var empty = [], + namedListeners, + scope = this, + stopPropagation = false, + event = { + name: name, + targetScope: scope, + stopPropagation: function() {stopPropagation = true;}, + preventDefault: function() { + event.defaultPrevented = true; + }, + defaultPrevented: false + }, + listenerArgs = concat([event], arguments, 1), + i, length; + + do { + namedListeners = scope.$$listeners[name] || empty; + event.currentScope = scope; + for (i = 0, length = namedListeners.length; i < length; i++) { + + // if listeners were deregistered, defragment the array + if (!namedListeners[i]) { + namedListeners.splice(i, 1); + i--; + length--; + continue; + } + try { + //allow all listeners attached to the current scope to run + namedListeners[i].apply(null, listenerArgs); + } catch (e) { + $exceptionHandler(e); + } + } + //if any listener on the current scope stops propagation, prevent bubbling + if (stopPropagation) { + event.currentScope = null; + return event; + } + //traverse upwards + scope = scope.$parent; + } while (scope); + + event.currentScope = null; + + return event; + }, + + + /** + * @ngdoc method + * @name $rootScope.Scope#$broadcast + * @kind function + * + * @description + * Dispatches an event `name` downwards to all child scopes (and their children) notifying the + * registered {@link ng.$rootScope.Scope#$on} listeners. + * + * The event life cycle starts at the scope on which `$broadcast` was called. All + * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get + * notified. Afterwards, the event propagates to all direct and indirect scopes of the current + * scope and calls all registered listeners along the way. The event cannot be canceled. + * + * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed + * onto the {@link ng.$exceptionHandler $exceptionHandler} service. + * + * @param {string} name Event name to broadcast. + * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. + * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on} + */ + $broadcast: function(name, args) { + var target = this, + current = target, + next = target, + event = { + name: name, + targetScope: target, + preventDefault: function() { + event.defaultPrevented = true; + }, + defaultPrevented: false + }; + + if (!target.$$listenerCount[name]) return event; + + var listenerArgs = concat([event], arguments, 1), + listeners, i, length; + + //down while you can, then up and next sibling or up and next sibling until back at root + while ((current = next)) { + event.currentScope = current; + listeners = current.$$listeners[name] || []; + for (i = 0, length = listeners.length; i < length; i++) { + // if listeners were deregistered, defragment the array + if (!listeners[i]) { + listeners.splice(i, 1); + i--; + length--; + continue; + } + + try { + listeners[i].apply(null, listenerArgs); + } catch (e) { + $exceptionHandler(e); + } + } + + // Insanity Warning: scope depth-first traversal + // yes, this code is a bit crazy, but it works and we have tests to prove it! + // this piece should be kept in sync with the traversal in $digest + // (though it differs due to having the extra check for $$listenerCount) + if (!(next = ((current.$$listenerCount[name] && current.$$childHead) || + (current !== target && current.$$nextSibling)))) { + while (current !== target && !(next = current.$$nextSibling)) { + current = current.$parent; + } + } + } + + event.currentScope = null; + return event; + } + }; + + var $rootScope = new Scope(); + + //The internal queues. Expose them on the $rootScope for debugging/testing purposes. + var asyncQueue = $rootScope.$$asyncQueue = []; + var postDigestQueue = $rootScope.$$postDigestQueue = []; + var applyAsyncQueue = $rootScope.$$applyAsyncQueue = []; + + return $rootScope; + + + function beginPhase(phase) { + if ($rootScope.$$phase) { + throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase); + } + + $rootScope.$$phase = phase; + } + + function clearPhase() { + $rootScope.$$phase = null; + } + + function incrementWatchersCount(current, count) { + do { + current.$$watchersCount += count; + } while ((current = current.$parent)); + } + + function decrementListenerCount(current, count, name) { + do { + current.$$listenerCount[name] -= count; + + if (current.$$listenerCount[name] === 0) { + delete current.$$listenerCount[name]; + } + } while ((current = current.$parent)); + } + + /** + * function used as an initial value for watchers. + * because it's unique we can easily tell it apart from other values + */ + function initWatchVal() {} + + function flushApplyAsync() { + while (applyAsyncQueue.length) { + try { + applyAsyncQueue.shift()(); + } catch (e) { + $exceptionHandler(e); + } + } + applyAsyncId = null; + } + + function scheduleApplyAsync() { + if (applyAsyncId === null) { + applyAsyncId = $browser.defer(function() { + $rootScope.$apply(flushApplyAsync); + }); + } + } + }]; +} + +/** + * @description + * Private service to sanitize uris for links and images. Used by $compile and $sanitize. + */ +function $$SanitizeUriProvider() { + var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/, + imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/; + + /** + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during a[href] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to a[href] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.aHrefSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + aHrefSanitizationWhitelist = regexp; + return this; + } + return aHrefSanitizationWhitelist; + }; + + + /** + * @description + * Retrieves or overrides the default regular expression that is used for whitelisting of safe + * urls during img[src] sanitization. + * + * The sanitization is a security measure aimed at prevent XSS attacks via html links. + * + * Any url about to be assigned to img[src] via data-binding is first normalized and turned into + * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` + * regular expression. If a match is found, the original url is written into the dom. Otherwise, + * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. + * + * @param {RegExp=} regexp New regexp to whitelist urls with. + * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for + * chaining otherwise. + */ + this.imgSrcSanitizationWhitelist = function(regexp) { + if (isDefined(regexp)) { + imgSrcSanitizationWhitelist = regexp; + return this; + } + return imgSrcSanitizationWhitelist; + }; + + this.$get = function() { + return function sanitizeUri(uri, isImage) { + var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist; + var normalizedVal; + normalizedVal = urlResolve(uri).href; + if (normalizedVal !== '' && !normalizedVal.match(regex)) { + return 'unsafe:' + normalizedVal; + } + return uri; + }; + }; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Any commits to this file should be reviewed with security in mind. * + * Changes to this file can potentially create security vulnerabilities. * + * An approval from 2 Core members with history of modifying * + * this file is required. * + * * + * Does the change somehow allow for arbitrary javascript to be executed? * + * Or allows for someone to change the prototype of built-in objects? * + * Or gives undesired access to variables likes document or window? * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +var $sceMinErr = minErr('$sce'); + +var SCE_CONTEXTS = { + HTML: 'html', + CSS: 'css', + URL: 'url', + // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a + // url. (e.g. ng-include, script src, templateUrl) + RESOURCE_URL: 'resourceUrl', + JS: 'js' +}; + +// Helper functions follow. + +function adjustMatcher(matcher) { + if (matcher === 'self') { + return matcher; + } else if (isString(matcher)) { + // Strings match exactly except for 2 wildcards - '*' and '**'. + // '*' matches any character except those from the set ':/.?&'. + // '**' matches any character (like .* in a RegExp). + // More than 2 *'s raises an error as it's ill defined. + if (matcher.indexOf('***') > -1) { + throw $sceMinErr('iwcard', + 'Illegal sequence *** in string matcher. String: {0}', matcher); + } + matcher = escapeForRegexp(matcher). + replace('\\*\\*', '.*'). + replace('\\*', '[^:/.?&;]*'); + return new RegExp('^' + matcher + '$'); + } else if (isRegExp(matcher)) { + // The only other type of matcher allowed is a Regexp. + // Match entire URL / disallow partial matches. + // Flags are reset (i.e. no global, ignoreCase or multiline) + return new RegExp('^' + matcher.source + '$'); + } else { + throw $sceMinErr('imatcher', + 'Matchers may only be "self", string patterns or RegExp objects'); + } +} + + +function adjustMatchers(matchers) { + var adjustedMatchers = []; + if (isDefined(matchers)) { + forEach(matchers, function(matcher) { + adjustedMatchers.push(adjustMatcher(matcher)); + }); + } + return adjustedMatchers; +} + + +/** + * @ngdoc service + * @name $sceDelegate + * @kind function + * + * @description + * + * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict + * Contextual Escaping (SCE)} services to AngularJS. + * + * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of + * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is + * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to + * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things + * work because `$sce` delegates to `$sceDelegate` for these operations. + * + * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service. + * + * The default instance of `$sceDelegate` should work out of the box with little pain. While you + * can override it completely to change the behavior of `$sce`, the common case would + * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting + * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as + * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist + * $sceDelegateProvider.resourceUrlWhitelist} and {@link + * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} + */ + +/** + * @ngdoc provider + * @name $sceDelegateProvider + * @description + * + * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate + * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure + * that the URLs used for sourcing Angular templates are safe. Refer {@link + * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and + * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} + * + * For the general details about this service in Angular, read the main page for {@link ng.$sce + * Strict Contextual Escaping (SCE)}. + * + * **Example**: Consider the following case. + * + * - your app is hosted at url `http://myapp.example.com/` + * - but some of your templates are hosted on other domains you control such as + * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc. + * - and you have an open redirect at `http://myapp.example.com/clickThru?...`. + * + * Here is what a secure configuration for this scenario might look like: + * + * ``` + * angular.module('myApp', []).config(function($sceDelegateProvider) { + * $sceDelegateProvider.resourceUrlWhitelist([ + * // Allow same origin resource loads. + * 'self', + * // Allow loading from our assets domain. Notice the difference between * and **. + * 'http://srv*.assets.example.com/**' + * ]); + * + * // The blacklist overrides the whitelist so the open redirect here is blocked. + * $sceDelegateProvider.resourceUrlBlacklist([ + * 'http://myapp.example.com/clickThru**' + * ]); + * }); + * ``` + */ + +function $SceDelegateProvider() { + this.SCE_CONTEXTS = SCE_CONTEXTS; + + // Resource URLs can also be trusted by policy. + var resourceUrlWhitelist = ['self'], + resourceUrlBlacklist = []; + + /** + * @ngdoc method + * @name $sceDelegateProvider#resourceUrlWhitelist + * @kind function + * + * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value + * provided. This must be an array or null. A snapshot of this array is used so further + * changes to the array are ignored. + * + * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items + * allowed in this array. + * + * Note: **an empty whitelist array will block all URLs**! + * + * @return {Array} the currently set whitelist array. + * + * The **default value** when no whitelist has been explicitly set is `['self']` allowing only + * same origin resource requests. + * + * @description + * Sets/Gets the whitelist of trusted resource URLs. + */ + this.resourceUrlWhitelist = function(value) { + if (arguments.length) { + resourceUrlWhitelist = adjustMatchers(value); + } + return resourceUrlWhitelist; + }; + + /** + * @ngdoc method + * @name $sceDelegateProvider#resourceUrlBlacklist + * @kind function + * + * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value + * provided. This must be an array or null. A snapshot of this array is used so further + * changes to the array are ignored. + * + * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items + * allowed in this array. + * + * The typical usage for the blacklist is to **block + * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as + * these would otherwise be trusted but actually return content from the redirected domain. + * + * Finally, **the blacklist overrides the whitelist** and has the final say. + * + * @return {Array} the currently set blacklist array. + * + * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there + * is no blacklist.) + * + * @description + * Sets/Gets the blacklist of trusted resource URLs. + */ + + this.resourceUrlBlacklist = function(value) { + if (arguments.length) { + resourceUrlBlacklist = adjustMatchers(value); + } + return resourceUrlBlacklist; + }; + + this.$get = ['$injector', function($injector) { + + var htmlSanitizer = function htmlSanitizer(html) { + throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); + }; + + if ($injector.has('$sanitize')) { + htmlSanitizer = $injector.get('$sanitize'); + } + + + function matchUrl(matcher, parsedUrl) { + if (matcher === 'self') { + return urlIsSameOrigin(parsedUrl); + } else { + // definitely a regex. See adjustMatchers() + return !!matcher.exec(parsedUrl.href); + } + } + + function isResourceUrlAllowedByPolicy(url) { + var parsedUrl = urlResolve(url.toString()); + var i, n, allowed = false; + // Ensure that at least one item from the whitelist allows this url. + for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { + if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { + allowed = true; + break; + } + } + if (allowed) { + // Ensure that no item from the blacklist blocked this url. + for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { + if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { + allowed = false; + break; + } + } + } + return allowed; + } + + function generateHolderType(Base) { + var holderType = function TrustedValueHolderType(trustedValue) { + this.$$unwrapTrustedValue = function() { + return trustedValue; + }; + }; + if (Base) { + holderType.prototype = new Base(); + } + holderType.prototype.valueOf = function sceValueOf() { + return this.$$unwrapTrustedValue(); + }; + holderType.prototype.toString = function sceToString() { + return this.$$unwrapTrustedValue().toString(); + }; + return holderType; + } + + var trustedValueHolderBase = generateHolderType(), + byType = {}; + + byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase); + byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]); + + /** + * @ngdoc method + * @name $sceDelegate#trustAs + * + * @description + * Returns an object that is trusted by angular for use in specified strict + * contextual escaping contexts (such as ng-bind-html, ng-include, any src + * attribute interpolation, any dom event binding attribute interpolation + * such as for onclick, etc.) that uses the provided value. + * See {@link ng.$sce $sce} for enabling strict contextual escaping. + * + * @param {string} type The kind of context in which this value is safe for use. e.g. url, + * resourceUrl, html, js and css. + * @param {*} value The value that that should be considered trusted/safe. + * @returns {*} A value that can be used to stand in for the provided `value` in places + * where Angular expects a $sce.trustAs() return value. + */ + function trustAs(type, trustedValue) { + var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null); + if (!Constructor) { + throw $sceMinErr('icontext', + 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}', + type, trustedValue); + } + if (trustedValue === null || trustedValue === undefined || trustedValue === '') { + return trustedValue; + } + // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting + // mutable objects, we ensure here that the value passed in is actually a string. + if (typeof trustedValue !== 'string') { + throw $sceMinErr('itype', + 'Attempted to trust a non-string value in a content requiring a string: Context: {0}', + type); + } + return new Constructor(trustedValue); + } + + /** + * @ngdoc method + * @name $sceDelegate#valueOf + * + * @description + * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link + * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. + * + * If the passed parameter is not a value that had been returned by {@link + * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is. + * + * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} + * call or anything else. + * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns + * `value` unchanged. + */ + function valueOf(maybeTrusted) { + if (maybeTrusted instanceof trustedValueHolderBase) { + return maybeTrusted.$$unwrapTrustedValue(); + } else { + return maybeTrusted; + } + } + + /** + * @ngdoc method + * @name $sceDelegate#getTrusted + * + * @description + * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and + * returns the originally supplied value if the queried context type is a supertype of the + * created type. If this condition isn't satisfied, throws an exception. + * + * @param {string} type The kind of context in which this value is to be used. + * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`} call. + * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs + * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception. + */ + function getTrusted(type, maybeTrusted) { + if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') { + return maybeTrusted; + } + var constructor = (byType.hasOwnProperty(type) ? byType[type] : null); + if (constructor && maybeTrusted instanceof constructor) { + return maybeTrusted.$$unwrapTrustedValue(); + } + // If we get here, then we may only take one of two actions. + // 1. sanitize the value for the requested type, or + // 2. throw an exception. + if (type === SCE_CONTEXTS.RESOURCE_URL) { + if (isResourceUrlAllowedByPolicy(maybeTrusted)) { + return maybeTrusted; + } else { + throw $sceMinErr('insecurl', + 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}', + maybeTrusted.toString()); + } + } else if (type === SCE_CONTEXTS.HTML) { + return htmlSanitizer(maybeTrusted); + } + throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); + } + + return { trustAs: trustAs, + getTrusted: getTrusted, + valueOf: valueOf }; + }]; +} + + +/** + * @ngdoc provider + * @name $sceProvider + * @description + * + * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service. + * - enable/disable Strict Contextual Escaping (SCE) in a module + * - override the default implementation with a custom delegate + * + * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}. + */ + +/* jshint maxlen: false*/ + +/** + * @ngdoc service + * @name $sce + * @kind function + * + * @description + * + * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS. + * + * # Strict Contextual Escaping + * + * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain + * contexts to result in a value that is marked as safe to use for that context. One example of + * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer + * to these contexts as privileged or SCE contexts. + * + * As of version 1.2, Angular ships with SCE enabled by default. + * + * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow + * one to execute arbitrary javascript by the use of the expression() syntax. Refer + * to learn more about them. + * You can ensure your document is in standards mode and not quirks mode by adding `` + * to the top of your HTML document. + * + * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for + * security vulnerabilities such as XSS, clickjacking, etc. a lot easier. + * + * Here's an example of a binding in a privileged context: + * + * ``` + * + *
+ * ``` + * + * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE + * disabled, this application allows the user to render arbitrary HTML into the DIV. + * In a more realistic example, one may be rendering user comments, blog articles, etc. via + * bindings. (HTML is just one example of a context where rendering user controlled input creates + * security vulnerabilities.) + * + * For the case of HTML, you might use a library, either on the client side, or on the server side, + * to sanitize unsafe HTML before binding to the value and rendering it in the document. + * + * How would you ensure that every place that used these types of bindings was bound to a value that + * was sanitized by your library (or returned as safe for rendering by your server?) How can you + * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some + * properties/fields and forgot to update the binding to the sanitized value? + * + * To be secure by default, you want to ensure that any such bindings are disallowed unless you can + * determine that something explicitly says it's safe to use a value for binding in that + * context. You can then audit your code (a simple grep would do) to ensure that this is only done + * for those values that you can easily tell are safe - because they were received from your server, + * sanitized by your library, etc. You can organize your codebase to help with this - perhaps + * allowing only the files in a specific directory to do this. Ensuring that the internal API + * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task. + * + * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs} + * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to + * obtain values that will be accepted by SCE / privileged contexts. + * + * + * ## How does it work? + * + * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted + * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link + * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the + * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals. + * + * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link + * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly + * simplified): + * + * ``` + * var ngBindHtmlDirective = ['$sce', function($sce) { + * return function(scope, element, attr) { + * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) { + * element.html(value || ''); + * }); + * }; + * }]; + * ``` + * + * ## Impact on loading templates + * + * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as + * `templateUrl`'s specified by {@link guide/directive directives}. + * + * By default, Angular only loads templates from the same domain and protocol as the application + * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl + * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or + * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist + * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value. + * + * *Please note*: + * The browser's + * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) + * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) + * policy apply in addition to this and may further restrict whether the template is successfully + * loaded. This means that without the right CORS policy, loading templates from a different domain + * won't work on all browsers. Also, loading templates from `file://` URL does not work on some + * browsers. + * + * ## This feels like too much overhead + * + * It's important to remember that SCE only applies to interpolation expressions. + * + * If your expressions are constant literals, they're automatically trusted and you don't need to + * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g. + * `
`) just works. + * + * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them + * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here. + * + * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load + * templates in `ng-include` from your application's domain without having to even know about SCE. + * It blocks loading templates from other domains or loading templates over http from an https + * served document. You can change these by setting your own custom {@link + * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link + * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs. + * + * This significantly reduces the overhead. It is far easier to pay the small overhead and have an + * application that's secure and can be audited to verify that with much more ease than bolting + * security onto an application later. + * + * + * ## What trusted context types are supported? + * + * | Context | Notes | + * |---------------------|----------------| + * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. | + * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. | + * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`
Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. | + * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. | + * + * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist}
+ * + * Each element in these arrays must be one of the following: + * + * - **'self'** + * - The special **string**, `'self'`, can be used to match against all URLs of the **same + * domain** as the application document using the **same protocol**. + * - **String** (except the special value `'self'`) + * - The string is matched against the full *normalized / absolute URL* of the resource + * being tested (substring matches are not good enough.) + * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters + * match themselves. + * - `*`: matches zero or more occurrences of any character other than one of the following 6 + * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use + * in a whitelist. + * - `**`: matches zero or more occurrences of *any* character. As such, it's not + * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g. + * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might + * not have been the intention.) Its usage at the very end of the path is ok. (e.g. + * http://foo.example.com/templates/**). + * - **RegExp** (*see caveat below*) + * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax + * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to + * accidentally introduce a bug when one updates a complex expression (imho, all regexes should + * have good test coverage.). For instance, the use of `.` in the regex is correct only in a + * small number of cases. A `.` character in the regex used when matching the scheme or a + * subdomain could be matched against a `:` or literal `.` that was likely not intended. It + * is highly recommended to use the string patterns and only fall back to regular expressions + * if they as a last resort. + * - The regular expression must be an instance of RegExp (i.e. not a string.) It is + * matched against the **entire** *normalized / absolute URL* of the resource being tested + * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags + * present on the RegExp (such as multiline, global, ignoreCase) are ignored. + * - If you are generating your JavaScript from some other templating engine (not + * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)), + * remember to escape your regular expression (and be aware that you might need more than + * one level of escaping depending on your templating engine and the way you interpolated + * the value.) Do make use of your platform's escaping mechanism as it might be good + * enough before coding your own. e.g. Ruby has + * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape) + * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape). + * Javascript lacks a similar built in function for escaping. Take a look at Google + * Closure library's [goog.string.regExpEscape(s)]( + * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962). + * + * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example. + * + * ## Show me an example using SCE. + * + * + * + *
+ *

+ * User comments
+ * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when + * $sanitize is available. If $sanitize isn't available, this results in an error instead of an + * exploit. + *
+ *
+ * {{userComment.name}}: + * + *
+ *
+ *
+ *
+ *
+ * + * + * angular.module('mySceApp', ['ngSanitize']) + * .controller('AppController', ['$http', '$templateCache', '$sce', + * function($http, $templateCache, $sce) { + * var self = this; + * $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) { + * self.userComments = userComments; + * }); + * self.explicitlyTrustedHtml = $sce.trustAsHtml( + * 'Hover over this text.'); + * }]); + * + * + * + * [ + * { "name": "Alice", + * "htmlComment": + * "Is anyone reading this?" + * }, + * { "name": "Bob", + * "htmlComment": "Yes! Am I the only other one?" + * } + * ] + * + * + * + * describe('SCE doc demo', function() { + * it('should sanitize untrusted values', function() { + * expect(element.all(by.css('.htmlComment')).first().getInnerHtml()) + * .toBe('Is anyone reading this?'); + * }); + * + * it('should NOT sanitize explicitly trusted values', function() { + * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe( + * 'Hover over this text.'); + * }); + * }); + * + *
+ * + * + * + * ## Can I disable SCE completely? + * + * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits + * for little coding overhead. It will be much harder to take an SCE disabled application and + * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE + * for cases where you have a lot of existing code that was written before SCE was introduced and + * you're migrating them a module at a time. + * + * That said, here's how you can completely disable SCE: + * + * ``` + * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) { + * // Completely disable SCE. For demonstration purposes only! + * // Do not use in new projects. + * $sceProvider.enabled(false); + * }); + * ``` + * + */ +/* jshint maxlen: 100 */ + +function $SceProvider() { + var enabled = true; + + /** + * @ngdoc method + * @name $sceProvider#enabled + * @kind function + * + * @param {boolean=} value If provided, then enables/disables SCE. + * @return {boolean} true if SCE is enabled, false otherwise. + * + * @description + * Enables/disables SCE and returns the current value. + */ + this.enabled = function(value) { + if (arguments.length) { + enabled = !!value; + } + return enabled; + }; + + + /* Design notes on the default implementation for SCE. + * + * The API contract for the SCE delegate + * ------------------------------------- + * The SCE delegate object must provide the following 3 methods: + * + * - trustAs(contextEnum, value) + * This method is used to tell the SCE service that the provided value is OK to use in the + * contexts specified by contextEnum. It must return an object that will be accepted by + * getTrusted() for a compatible contextEnum and return this value. + * + * - valueOf(value) + * For values that were not produced by trustAs(), return them as is. For values that were + * produced by trustAs(), return the corresponding input value to trustAs. Basically, if + * trustAs is wrapping the given values into some type, this operation unwraps it when given + * such a value. + * + * - getTrusted(contextEnum, value) + * This function should return the a value that is safe to use in the context specified by + * contextEnum or throw and exception otherwise. + * + * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be + * opaque or wrapped in some holder object. That happens to be an implementation detail. For + * instance, an implementation could maintain a registry of all trusted objects by context. In + * such a case, trustAs() would return the same object that was passed in. getTrusted() would + * return the same object passed in if it was found in the registry under a compatible context or + * throw an exception otherwise. An implementation might only wrap values some of the time based + * on some criteria. getTrusted() might return a value and not throw an exception for special + * constants or objects even if not wrapped. All such implementations fulfill this contract. + * + * + * A note on the inheritance model for SCE contexts + * ------------------------------------------------ + * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This + * is purely an implementation details. + * + * The contract is simply this: + * + * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value) + * will also succeed. + * + * Inheritance happens to capture this in a natural way. In some future, we + * may not use inheritance anymore. That is OK because no code outside of + * sce.js and sceSpecs.js would need to be aware of this detail. + */ + + this.$get = ['$parse', '$sceDelegate', function( + $parse, $sceDelegate) { + // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow + // the "expression(javascript expression)" syntax which is insecure. + if (enabled && msie < 8) { + throw $sceMinErr('iequirks', + 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' + + 'mode. You can fix this by adding the text to the top of your HTML ' + + 'document. See http://docs.angularjs.org/api/ng.$sce for more information.'); + } + + var sce = shallowCopy(SCE_CONTEXTS); + + /** + * @ngdoc method + * @name $sce#isEnabled + * @kind function + * + * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you + * have to do it at module config time on {@link ng.$sceProvider $sceProvider}. + * + * @description + * Returns a boolean indicating if SCE is enabled. + */ + sce.isEnabled = function() { + return enabled; + }; + sce.trustAs = $sceDelegate.trustAs; + sce.getTrusted = $sceDelegate.getTrusted; + sce.valueOf = $sceDelegate.valueOf; + + if (!enabled) { + sce.trustAs = sce.getTrusted = function(type, value) { return value; }; + sce.valueOf = identity; + } + + /** + * @ngdoc method + * @name $sce#parseAs + * + * @description + * Converts Angular {@link guide/expression expression} into a function. This is like {@link + * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it + * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*, + * *result*)} + * + * @param {string} type The kind of SCE context in which this result will be used. + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + sce.parseAs = function sceParseAs(type, expr) { + var parsed = $parse(expr); + if (parsed.literal && parsed.constant) { + return parsed; + } else { + return $parse(expr, function(value) { + return sce.getTrusted(type, value); + }); + } + }; + + /** + * @ngdoc method + * @name $sce#trustAs + * + * @description + * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, + * returns an object that is trusted by angular for use in specified strict contextual + * escaping contexts (such as ng-bind-html, ng-include, any src attribute + * interpolation, any dom event binding attribute interpolation such as for onclick, etc.) + * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual + * escaping. + * + * @param {string} type The kind of context in which this value is safe for use. e.g. url, + * resourceUrl, html, js and css. + * @param {*} value The value that that should be considered trusted/safe. + * @returns {*} A value that can be used to stand in for the provided `value` in places + * where Angular expects a $sce.trustAs() return value. + */ + + /** + * @ngdoc method + * @name $sce#trustAsHtml + * + * @description + * Shorthand method. `$sce.trustAsHtml(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`} + * + * @param {*} value The value to trustAs. + * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml + * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives + * only accept expressions that are either literal constants or are the + * return value of {@link ng.$sce#trustAs $sce.trustAs}.) + */ + + /** + * @ngdoc method + * @name $sce#trustAsUrl + * + * @description + * Shorthand method. `$sce.trustAsUrl(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`} + * + * @param {*} value The value to trustAs. + * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl + * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives + * only accept expressions that are either literal constants or are the + * return value of {@link ng.$sce#trustAs $sce.trustAs}.) + */ + + /** + * @ngdoc method + * @name $sce#trustAsResourceUrl + * + * @description + * Shorthand method. `$sce.trustAsResourceUrl(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`} + * + * @param {*} value The value to trustAs. + * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl + * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives + * only accept expressions that are either literal constants or are the return + * value of {@link ng.$sce#trustAs $sce.trustAs}.) + */ + + /** + * @ngdoc method + * @name $sce#trustAsJs + * + * @description + * Shorthand method. `$sce.trustAsJs(value)` → + * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`} + * + * @param {*} value The value to trustAs. + * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs + * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives + * only accept expressions that are either literal constants or are the + * return value of {@link ng.$sce#trustAs $sce.trustAs}.) + */ + + /** + * @ngdoc method + * @name $sce#getTrusted + * + * @description + * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such, + * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the + * originally supplied value if the queried context type is a supertype of the created type. + * If this condition isn't satisfied, throws an exception. + * + * @param {string} type The kind of context in which this value is to be used. + * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`} + * call. + * @returns {*} The value the was originally provided to + * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context. + * Otherwise, throws an exception. + */ + + /** + * @ngdoc method + * @name $sce#getTrustedHtml + * + * @description + * Shorthand method. `$sce.getTrustedHtml(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedCss + * + * @description + * Shorthand method. `$sce.getTrustedCss(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedUrl + * + * @description + * Shorthand method. `$sce.getTrustedUrl(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedResourceUrl + * + * @description + * Shorthand method. `$sce.getTrustedResourceUrl(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`} + * + * @param {*} value The value to pass to `$sceDelegate.getTrusted`. + * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)` + */ + + /** + * @ngdoc method + * @name $sce#getTrustedJs + * + * @description + * Shorthand method. `$sce.getTrustedJs(value)` → + * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`} + * + * @param {*} value The value to pass to `$sce.getTrusted`. + * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)` + */ + + /** + * @ngdoc method + * @name $sce#parseAsHtml + * + * @description + * Shorthand method. `$sce.parseAsHtml(expression string)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`} + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsCss + * + * @description + * Shorthand method. `$sce.parseAsCss(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`} + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsUrl + * + * @description + * Shorthand method. `$sce.parseAsUrl(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`} + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsResourceUrl + * + * @description + * Shorthand method. `$sce.parseAsResourceUrl(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`} + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + + /** + * @ngdoc method + * @name $sce#parseAsJs + * + * @description + * Shorthand method. `$sce.parseAsJs(value)` → + * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`} + * + * @param {string} expression String expression to compile. + * @returns {function(context, locals)} a function which represents the compiled expression: + * + * * `context` – `{object}` – an object against which any expressions embedded in the strings + * are evaluated against (typically a scope object). + * * `locals` – `{object=}` – local variables context object, useful for overriding values in + * `context`. + */ + + // Shorthand delegations. + var parse = sce.parseAs, + getTrusted = sce.getTrusted, + trustAs = sce.trustAs; + + forEach(SCE_CONTEXTS, function(enumValue, name) { + var lName = lowercase(name); + sce[camelCase("parse_as_" + lName)] = function(expr) { + return parse(enumValue, expr); + }; + sce[camelCase("get_trusted_" + lName)] = function(value) { + return getTrusted(enumValue, value); + }; + sce[camelCase("trust_as_" + lName)] = function(value) { + return trustAs(enumValue, value); + }; + }); + + return sce; + }]; +} + +/** + * !!! This is an undocumented "private" service !!! + * + * @name $sniffer + * @requires $window + * @requires $document + * + * @property {boolean} history Does the browser support html5 history api ? + * @property {boolean} transitions Does the browser support CSS transition events ? + * @property {boolean} animations Does the browser support CSS animation events ? + * + * @description + * This is very simple implementation of testing browser's features. + */ +function $SnifferProvider() { + this.$get = ['$window', '$document', function($window, $document) { + var eventSupport = {}, + android = + toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]), + boxee = /Boxee/i.test(($window.navigator || {}).userAgent), + document = $document[0] || {}, + vendorPrefix, + vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/, + bodyStyle = document.body && document.body.style, + transitions = false, + animations = false, + match; + + if (bodyStyle) { + for (var prop in bodyStyle) { + if (match = vendorRegex.exec(prop)) { + vendorPrefix = match[0]; + vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1); + break; + } + } + + if (!vendorPrefix) { + vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit'; + } + + transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle)); + animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle)); + + if (android && (!transitions || !animations)) { + transitions = isString(bodyStyle.webkitTransition); + animations = isString(bodyStyle.webkitAnimation); + } + } + + + return { + // Android has history.pushState, but it does not update location correctly + // so let's not use the history API at all. + // http://code.google.com/p/android/issues/detail?id=17471 + // https://github.com/angular/angular.js/issues/904 + + // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has + // so let's not use the history API also + // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined + // jshint -W018 + history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee), + // jshint +W018 + hasEvent: function(event) { + // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have + // it. In particular the event is not fired when backspace or delete key are pressed or + // when cut operation is performed. + // IE10+ implements 'input' event but it erroneously fires under various situations, + // e.g. when placeholder changes, or a form is focused. + if (event === 'input' && msie <= 11) return false; + + if (isUndefined(eventSupport[event])) { + var divElm = document.createElement('div'); + eventSupport[event] = 'on' + event in divElm; + } + + return eventSupport[event]; + }, + csp: csp(), + vendorPrefix: vendorPrefix, + transitions: transitions, + animations: animations, + android: android + }; + }]; +} + +var $compileMinErr = minErr('$compile'); + +/** + * @ngdoc service + * @name $templateRequest + * + * @description + * The `$templateRequest` service runs security checks then downloads the provided template using + * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request + * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the + * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the + * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted + * when `tpl` is of type string and `$templateCache` has the matching entry. + * + * @param {string|TrustedResourceUrl} tpl The HTTP request template URL + * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty + * + * @return {Promise} a promise for the HTTP response data of the given URL. + * + * @property {number} totalPendingRequests total amount of pending template requests being downloaded. + */ +function $TemplateRequestProvider() { + this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) { + function handleRequestFn(tpl, ignoreRequestError) { + handleRequestFn.totalPendingRequests++; + + // We consider the template cache holds only trusted templates, so + // there's no need to go through whitelisting again for keys that already + // are included in there. This also makes Angular accept any script + // directive, no matter its name. However, we still need to unwrap trusted + // types. + if (!isString(tpl) || !$templateCache.get(tpl)) { + tpl = $sce.getTrustedResourceUrl(tpl); + } + + var transformResponse = $http.defaults && $http.defaults.transformResponse; + + if (isArray(transformResponse)) { + transformResponse = transformResponse.filter(function(transformer) { + return transformer !== defaultHttpResponseTransform; + }); + } else if (transformResponse === defaultHttpResponseTransform) { + transformResponse = null; + } + + var httpOptions = { + cache: $templateCache, + transformResponse: transformResponse + }; + + return $http.get(tpl, httpOptions) + ['finally'](function() { + handleRequestFn.totalPendingRequests--; + }) + .then(function(response) { + $templateCache.put(tpl, response.data); + return response.data; + }, handleError); + + function handleError(resp) { + if (!ignoreRequestError) { + throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})', + tpl, resp.status, resp.statusText); + } + return $q.reject(resp); + } + } + + handleRequestFn.totalPendingRequests = 0; + + return handleRequestFn; + }]; +} + +function $$TestabilityProvider() { + this.$get = ['$rootScope', '$browser', '$location', + function($rootScope, $browser, $location) { + + /** + * @name $testability + * + * @description + * The private $$testability service provides a collection of methods for use when debugging + * or by automated test and debugging tools. + */ + var testability = {}; + + /** + * @name $$testability#findBindings + * + * @description + * Returns an array of elements that are bound (via ng-bind or {{}}) + * to expressions matching the input. + * + * @param {Element} element The element root to search from. + * @param {string} expression The binding expression to match. + * @param {boolean} opt_exactMatch If true, only returns exact matches + * for the expression. Filters and whitespace are ignored. + */ + testability.findBindings = function(element, expression, opt_exactMatch) { + var bindings = element.getElementsByClassName('ng-binding'); + var matches = []; + forEach(bindings, function(binding) { + var dataBinding = angular.element(binding).data('$binding'); + if (dataBinding) { + forEach(dataBinding, function(bindingName) { + if (opt_exactMatch) { + var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)'); + if (matcher.test(bindingName)) { + matches.push(binding); + } + } else { + if (bindingName.indexOf(expression) != -1) { + matches.push(binding); + } + } + }); + } + }); + return matches; + }; + + /** + * @name $$testability#findModels + * + * @description + * Returns an array of elements that are two-way found via ng-model to + * expressions matching the input. + * + * @param {Element} element The element root to search from. + * @param {string} expression The model expression to match. + * @param {boolean} opt_exactMatch If true, only returns exact matches + * for the expression. + */ + testability.findModels = function(element, expression, opt_exactMatch) { + var prefixes = ['ng-', 'data-ng-', 'ng\\:']; + for (var p = 0; p < prefixes.length; ++p) { + var attributeEquals = opt_exactMatch ? '=' : '*='; + var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]'; + var elements = element.querySelectorAll(selector); + if (elements.length) { + return elements; + } + } + }; + + /** + * @name $$testability#getLocation + * + * @description + * Shortcut for getting the location in a browser agnostic way. Returns + * the path, search, and hash. (e.g. /path?a=b#hash) + */ + testability.getLocation = function() { + return $location.url(); + }; + + /** + * @name $$testability#setLocation + * + * @description + * Shortcut for navigating to a location without doing a full page reload. + * + * @param {string} url The location url (path, search and hash, + * e.g. /path?a=b#hash) to go to. + */ + testability.setLocation = function(url) { + if (url !== $location.url()) { + $location.url(url); + $rootScope.$digest(); + } + }; + + /** + * @name $$testability#whenStable + * + * @description + * Calls the callback when $timeout and $http requests are completed. + * + * @param {function} callback + */ + testability.whenStable = function(callback) { + $browser.notifyWhenNoOutstandingRequests(callback); + }; + + return testability; + }]; +} + +function $TimeoutProvider() { + this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler', + function($rootScope, $browser, $q, $$q, $exceptionHandler) { + + var deferreds = {}; + + + /** + * @ngdoc service + * @name $timeout + * + * @description + * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch + * block and delegates any exceptions to + * {@link ng.$exceptionHandler $exceptionHandler} service. + * + * The return value of calling `$timeout` is a promise, which will be resolved when + * the delay has passed and the timeout function, if provided, is executed. + * + * To cancel a timeout request, call `$timeout.cancel(promise)`. + * + * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to + * synchronously flush the queue of deferred functions. + * + * If you only want a promise that will be resolved after some specified delay + * then you can call `$timeout` without the `fn` function. + * + * @param {function()=} fn A function, whose execution should be delayed. + * @param {number=} [delay=0] Delay in milliseconds. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. + * @param {...*=} Pass additional parameters to the executed function. + * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this + * promise will be resolved with is the return value of the `fn` function. + * + */ + function timeout(fn, delay, invokeApply) { + if (!isFunction(fn)) { + invokeApply = delay; + delay = fn; + fn = noop; + } + + var args = sliceArgs(arguments, 3), + skipApply = (isDefined(invokeApply) && !invokeApply), + deferred = (skipApply ? $$q : $q).defer(), + promise = deferred.promise, + timeoutId; + + timeoutId = $browser.defer(function() { + try { + deferred.resolve(fn.apply(null, args)); + } catch (e) { + deferred.reject(e); + $exceptionHandler(e); + } + finally { + delete deferreds[promise.$$timeoutId]; + } + + if (!skipApply) $rootScope.$apply(); + }, delay); + + promise.$$timeoutId = timeoutId; + deferreds[timeoutId] = deferred; + + return promise; + } + + + /** + * @ngdoc method + * @name $timeout#cancel + * + * @description + * Cancels a task associated with the `promise`. As a result of this, the promise will be + * resolved with a rejection. + * + * @param {Promise=} promise Promise returned by the `$timeout` function. + * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully + * canceled. + */ + timeout.cancel = function(promise) { + if (promise && promise.$$timeoutId in deferreds) { + deferreds[promise.$$timeoutId].reject('canceled'); + delete deferreds[promise.$$timeoutId]; + return $browser.defer.cancel(promise.$$timeoutId); + } + return false; + }; + + return timeout; + }]; +} + +// NOTE: The usage of window and document instead of $window and $document here is +// deliberate. This service depends on the specific behavior of anchor nodes created by the +// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and +// cause us to break tests. In addition, when the browser resolves a URL for XHR, it +// doesn't know about mocked locations and resolves URLs to the real document - which is +// exactly the behavior needed here. There is little value is mocking these out for this +// service. +var urlParsingNode = document.createElement("a"); +var originUrl = urlResolve(window.location.href); + + +/** + * + * Implementation Notes for non-IE browsers + * ---------------------------------------- + * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM, + * results both in the normalizing and parsing of the URL. Normalizing means that a relative + * URL will be resolved into an absolute URL in the context of the application document. + * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related + * properties are all populated to reflect the normalized URL. This approach has wide + * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See + * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html + * + * Implementation Notes for IE + * --------------------------- + * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other + * browsers. However, the parsed components will not be set if the URL assigned did not specify + * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We + * work around that by performing the parsing in a 2nd step by taking a previously normalized + * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the + * properties such as protocol, hostname, port, etc. + * + * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one + * uses the inner HTML approach to assign the URL as part of an HTML snippet - + * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL. + * Unfortunately, setting img[src] to something like "javascript:foo" on IE throws an exception. + * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that + * method and IE < 8 is unsupported. + * + * References: + * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement + * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html + * http://url.spec.whatwg.org/#urlutils + * https://github.com/angular/angular.js/pull/2902 + * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ + * + * @kind function + * @param {string} url The URL to be parsed. + * @description Normalizes and parses a URL. + * @returns {object} Returns the normalized URL as a dictionary. + * + * | member name | Description | + * |---------------|----------------| + * | href | A normalized version of the provided URL if it was not an absolute URL | + * | protocol | The protocol including the trailing colon | + * | host | The host and port (if the port is non-default) of the normalizedUrl | + * | search | The search params, minus the question mark | + * | hash | The hash string, minus the hash symbol + * | hostname | The hostname + * | port | The port, without ":" + * | pathname | The pathname, beginning with "/" + * + */ +function urlResolve(url) { + var href = url; + + if (msie) { + // Normalize before parse. Refer Implementation Notes on why this is + // done in two steps on IE. + urlParsingNode.setAttribute("href", href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname + }; +} + +/** + * Parse a request URL and determine whether this is a same-origin request as the application document. + * + * @param {string|object} requestUrl The url of the request as a string that will be resolved + * or a parsed URL object. + * @returns {boolean} Whether the request is for the same origin as the application document. + */ +function urlIsSameOrigin(requestUrl) { + var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; + return (parsed.protocol === originUrl.protocol && + parsed.host === originUrl.host); +} + +/** + * @ngdoc service + * @name $window + * + * @description + * A reference to the browser's `window` object. While `window` + * is globally available in JavaScript, it causes testability problems, because + * it is a global variable. In angular we always refer to it through the + * `$window` service, so it may be overridden, removed or mocked for testing. + * + * Expressions, like the one defined for the `ngClick` directive in the example + * below, are evaluated with respect to the current scope. Therefore, there is + * no risk of inadvertently coding in a dependency on a global value in such an + * expression. + * + * @example + + + +
+ + +
+
+ + it('should display the greeting in the input box', function() { + element(by.model('greeting')).sendKeys('Hello, E2E Tests'); + // If we click the button it will block the test runner + // element(':button').click(); + }); + +
+ */ +function $WindowProvider() { + this.$get = valueFn(window); +} + +/** + * @name $$cookieReader + * @requires $document + * + * @description + * This is a private service for reading cookies used by $http and ngCookies + * + * @return {Object} a key/value map of the current cookies + */ +function $$CookieReader($document) { + var rawDocument = $document[0] || {}; + var lastCookies = {}; + var lastCookieString = ''; + + function safeDecodeURIComponent(str) { + try { + return decodeURIComponent(str); + } catch (e) { + return str; + } + } + + return function() { + var cookieArray, cookie, i, index, name; + var currentCookieString = rawDocument.cookie || ''; + + if (currentCookieString !== lastCookieString) { + lastCookieString = currentCookieString; + cookieArray = lastCookieString.split('; '); + lastCookies = {}; + + for (i = 0; i < cookieArray.length; i++) { + cookie = cookieArray[i]; + index = cookie.indexOf('='); + if (index > 0) { //ignore nameless cookies + name = safeDecodeURIComponent(cookie.substring(0, index)); + // the first value that is seen for a cookie is the most + // specific one. values for the same cookie name that + // follow are for less specific paths. + if (lastCookies[name] === undefined) { + lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1)); + } + } + } + } + return lastCookies; + }; +} + +$$CookieReader.$inject = ['$document']; + +function $$CookieReaderProvider() { + this.$get = $$CookieReader; +} + +/* global currencyFilter: true, + dateFilter: true, + filterFilter: true, + jsonFilter: true, + limitToFilter: true, + lowercaseFilter: true, + numberFilter: true, + orderByFilter: true, + uppercaseFilter: true, + */ + +/** + * @ngdoc provider + * @name $filterProvider + * @description + * + * Filters are just functions which transform input to an output. However filters need to be + * Dependency Injected. To achieve this a filter definition consists of a factory function which is + * annotated with dependencies and is responsible for creating a filter function. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ * + * ```js + * // Filter registration + * function MyModule($provide, $filterProvider) { + * // create a service to demonstrate injection (not always needed) + * $provide.value('greet', function(name){ + * return 'Hello ' + name + '!'; + * }); + * + * // register a filter factory which uses the + * // greet service to demonstrate DI. + * $filterProvider.register('greet', function(greet){ + * // return the filter function which uses the greet service + * // to generate salutation + * return function(text) { + * // filters need to be forgiving so check input validity + * return text && greet(text) || text; + * }; + * }); + * } + * ``` + * + * The filter function is registered with the `$injector` under the filter name suffix with + * `Filter`. + * + * ```js + * it('should be the same instance', inject( + * function($filterProvider) { + * $filterProvider.register('reverse', function(){ + * return ...; + * }); + * }, + * function($filter, reverseFilter) { + * expect($filter('reverse')).toBe(reverseFilter); + * }); + * ``` + * + * + * For more information about how angular filters work, and how to create your own filters, see + * {@link guide/filter Filters} in the Angular Developer Guide. + */ + +/** + * @ngdoc service + * @name $filter + * @kind function + * @description + * Filters are used for formatting data displayed to the user. + * + * The general syntax in templates is as follows: + * + * {{ expression [| filter_name[:parameter_value] ... ] }} + * + * @param {String} name Name of the filter function to retrieve + * @return {Function} the filter function + * @example + + +
+

{{ originalText }}

+

{{ filteredText }}

+
+
+ + + angular.module('filterExample', []) + .controller('MainCtrl', function($scope, $filter) { + $scope.originalText = 'hello'; + $scope.filteredText = $filter('uppercase')($scope.originalText); + }); + +
+ */ +$FilterProvider.$inject = ['$provide']; +function $FilterProvider($provide) { + var suffix = 'Filter'; + + /** + * @ngdoc method + * @name $filterProvider#register + * @param {string|Object} name Name of the filter function, or an object map of filters where + * the keys are the filter names and the values are the filter factories. + * + *
+ * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`. + * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace + * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores + * (`myapp_subsection_filterx`). + *
+ * @returns {Object} Registered filter instance, or if a map of filters was provided then a map + * of the registered filter instances. + */ + function register(name, factory) { + if (isObject(name)) { + var filters = {}; + forEach(name, function(filter, key) { + filters[key] = register(key, filter); + }); + return filters; + } else { + return $provide.factory(name + suffix, factory); + } + } + this.register = register; + + this.$get = ['$injector', function($injector) { + return function(name) { + return $injector.get(name + suffix); + }; + }]; + + //////////////////////////////////////// + + /* global + currencyFilter: false, + dateFilter: false, + filterFilter: false, + jsonFilter: false, + limitToFilter: false, + lowercaseFilter: false, + numberFilter: false, + orderByFilter: false, + uppercaseFilter: false, + */ + + register('currency', currencyFilter); + register('date', dateFilter); + register('filter', filterFilter); + register('json', jsonFilter); + register('limitTo', limitToFilter); + register('lowercase', lowercaseFilter); + register('number', numberFilter); + register('orderBy', orderByFilter); + register('uppercase', uppercaseFilter); +} + +/** + * @ngdoc filter + * @name filter + * @kind function + * + * @description + * Selects a subset of items from `array` and returns it as a new array. + * + * @param {Array} array The source array. + * @param {string|Object|function()} expression The predicate to be used for selecting items from + * `array`. + * + * Can be one of: + * + * - `string`: The string is used for matching against the contents of the `array`. All strings or + * objects with string properties in `array` that match this string will be returned. This also + * applies to nested object properties. + * The predicate can be negated by prefixing the string with `!`. + * + * - `Object`: A pattern object can be used to filter specific properties on objects contained + * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items + * which have property `name` containing "M" and property `phone` containing "1". A special + * property name `$` can be used (as in `{$:"text"}`) to accept a match against any + * property of the object or its nested object properties. That's equivalent to the simple + * substring match with a `string` as described above. The predicate can be negated by prefixing + * the string with `!`. + * For example `{name: "!M"}` predicate will return an array of items which have property `name` + * not containing "M". + * + * Note that a named property will match properties on the same level only, while the special + * `$` property will match properties on the same level or deeper. E.g. an array item like + * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but + * **will** be matched by `{$: 'John'}`. + * + * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters. + * The function is called for each element of the array, with the element, its index, and + * the entire array itself as arguments. + * + * The final result is an array of those elements that the predicate returned true for. + * + * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in + * determining if the expected value (from the filter expression) and actual value (from + * the object in the array) should be considered a match. + * + * Can be one of: + * + * - `function(actual, expected)`: + * The function will be given the object value and the predicate value to compare and + * should return true if both values should be considered equal. + * + * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`. + * This is essentially strict comparison of expected and actual. + * + * - `false|undefined`: A short hand for a function which will look for a substring match in case + * insensitive way. + * + * Primitive values are converted to strings. Objects are not compared against primitives, + * unless they have a custom `toString` method (e.g. `Date` objects). + * + * @example + + +
+ + + + + + + + +
NamePhone
{{friend.name}}{{friend.phone}}
+
+
+
+
+
+ + + + + + +
NamePhone
{{friendObj.name}}{{friendObj.phone}}
+
+ + var expectFriendNames = function(expectedNames, key) { + element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { + arr.forEach(function(wd, i) { + expect(wd.getText()).toMatch(expectedNames[i]); + }); + }); + }; + + it('should search across all fields when filtering with a string', function() { + var searchText = element(by.model('searchText')); + searchText.clear(); + searchText.sendKeys('m'); + expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); + + searchText.clear(); + searchText.sendKeys('76'); + expectFriendNames(['John', 'Julie'], 'friend'); + }); + + it('should search in specific fields when filtering with a predicate object', function() { + var searchAny = element(by.model('search.$')); + searchAny.clear(); + searchAny.sendKeys('i'); + expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); + }); + it('should use a equal comparison when comparator is true', function() { + var searchName = element(by.model('search.name')); + var strict = element(by.model('strict')); + searchName.clear(); + searchName.sendKeys('Julie'); + strict.click(); + expectFriendNames(['Julie'], 'friendObj'); + }); + +
+ */ +function filterFilter() { + return function(array, expression, comparator) { + if (!isArrayLike(array)) { + if (array == null) { + return array; + } else { + throw minErr('filter')('notarray', 'Expected array but received: {0}', array); + } + } + + var expressionType = getTypeForFilter(expression); + var predicateFn; + var matchAgainstAnyProp; + + switch (expressionType) { + case 'function': + predicateFn = expression; + break; + case 'boolean': + case 'null': + case 'number': + case 'string': + matchAgainstAnyProp = true; + //jshint -W086 + case 'object': + //jshint +W086 + predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp); + break; + default: + return array; + } + + return Array.prototype.filter.call(array, predicateFn); + }; +} + +// Helper functions for `filterFilter` +function createPredicateFn(expression, comparator, matchAgainstAnyProp) { + var shouldMatchPrimitives = isObject(expression) && ('$' in expression); + var predicateFn; + + if (comparator === true) { + comparator = equals; + } else if (!isFunction(comparator)) { + comparator = function(actual, expected) { + if (isUndefined(actual)) { + // No substring matching against `undefined` + return false; + } + if ((actual === null) || (expected === null)) { + // No substring matching against `null`; only match against `null` + return actual === expected; + } + if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) { + // Should not compare primitives against objects, unless they have custom `toString` method + return false; + } + + actual = lowercase('' + actual); + expected = lowercase('' + expected); + return actual.indexOf(expected) !== -1; + }; + } + + predicateFn = function(item) { + if (shouldMatchPrimitives && !isObject(item)) { + return deepCompare(item, expression.$, comparator, false); + } + return deepCompare(item, expression, comparator, matchAgainstAnyProp); + }; + + return predicateFn; +} + +function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) { + var actualType = getTypeForFilter(actual); + var expectedType = getTypeForFilter(expected); + + if ((expectedType === 'string') && (expected.charAt(0) === '!')) { + return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp); + } else if (isArray(actual)) { + // In case `actual` is an array, consider it a match + // if ANY of it's items matches `expected` + return actual.some(function(item) { + return deepCompare(item, expected, comparator, matchAgainstAnyProp); + }); + } + + switch (actualType) { + case 'object': + var key; + if (matchAgainstAnyProp) { + for (key in actual) { + if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) { + return true; + } + } + return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false); + } else if (expectedType === 'object') { + for (key in expected) { + var expectedVal = expected[key]; + if (isFunction(expectedVal) || isUndefined(expectedVal)) { + continue; + } + + var matchAnyProperty = key === '$'; + var actualVal = matchAnyProperty ? actual : actual[key]; + if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) { + return false; + } + } + return true; + } else { + return comparator(actual, expected); + } + break; + case 'function': + return false; + default: + return comparator(actual, expected); + } +} + +// Used for easily differentiating between `null` and actual `object` +function getTypeForFilter(val) { + return (val === null) ? 'null' : typeof val; +} + +/** + * @ngdoc filter + * @name currency + * @kind function + * + * @description + * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default + * symbol for current locale is used. + * + * @param {number} amount Input to filter. + * @param {string=} symbol Currency symbol or identifier to be displayed. + * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale + * @returns {string} Formatted number. + * + * + * @example + + + +
+
+ default currency symbol ($): {{amount | currency}}
+ custom currency identifier (USD$): {{amount | currency:"USD$"}} + no fractions (0): {{amount | currency:"USD$":0}} +
+
+ + it('should init with 1234.56', function() { + expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); + expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235'); + }); + it('should update', function() { + if (browser.params.browser == 'safari') { + // Safari does not understand the minus key. See + // https://github.com/angular/protractor/issues/481 + return; + } + element(by.model('amount')).clear(); + element(by.model('amount')).sendKeys('-1234'); + expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)'); + expect(element(by.id('currency-custom')).getText()).toBe('(USD$1,234.00)'); + expect(element(by.id('currency-no-fractions')).getText()).toBe('(USD$1,234)'); + }); + +
+ */ +currencyFilter.$inject = ['$locale']; +function currencyFilter($locale) { + var formats = $locale.NUMBER_FORMATS; + return function(amount, currencySymbol, fractionSize) { + if (isUndefined(currencySymbol)) { + currencySymbol = formats.CURRENCY_SYM; + } + + if (isUndefined(fractionSize)) { + fractionSize = formats.PATTERNS[1].maxFrac; + } + + // if null or undefined pass it through + return (amount == null) + ? amount + : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize). + replace(/\u00A4/g, currencySymbol); + }; +} + +/** + * @ngdoc filter + * @name number + * @kind function + * + * @description + * Formats a number as text. + * + * If the input is null or undefined, it will just be returned. + * If the input is infinite (Infinity/-Infinity) the Infinity symbol '∞' is returned. + * If the input is not a number an empty string is returned. + * + * + * @param {number|string} number Number to format. + * @param {(number|string)=} fractionSize Number of decimal places to round the number to. + * If this is not provided then the fraction size is computed from the current locale's number + * formatting pattern. In the case of the default locale, it will be 3. + * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit. + * + * @example + + + +
+
+ Default formatting: {{val | number}}
+ No fractions: {{val | number:0}}
+ Negative number: {{-val | number:4}} +
+
+ + it('should format numbers', function() { + expect(element(by.id('number-default')).getText()).toBe('1,234.568'); + expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); + }); + + it('should update', function() { + element(by.model('val')).clear(); + element(by.model('val')).sendKeys('3374.333'); + expect(element(by.id('number-default')).getText()).toBe('3,374.333'); + expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); + expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); + }); + +
+ */ + + +numberFilter.$inject = ['$locale']; +function numberFilter($locale) { + var formats = $locale.NUMBER_FORMATS; + return function(number, fractionSize) { + + // if null or undefined pass it through + return (number == null) + ? number + : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP, + fractionSize); + }; +} + +var DECIMAL_SEP = '.'; +function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { + if (isObject(number)) return ''; + + var isNegative = number < 0; + number = Math.abs(number); + + var isInfinity = number === Infinity; + if (!isInfinity && !isFinite(number)) return ''; + + var numStr = number + '', + formatedText = '', + hasExponent = false, + parts = []; + + if (isInfinity) formatedText = '\u221e'; + + if (!isInfinity && numStr.indexOf('e') !== -1) { + var match = numStr.match(/([\d\.]+)e(-?)(\d+)/); + if (match && match[2] == '-' && match[3] > fractionSize + 1) { + number = 0; + } else { + formatedText = numStr; + hasExponent = true; + } + } + + if (!isInfinity && !hasExponent) { + var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length; + + // determine fractionSize if it is not specified + if (isUndefined(fractionSize)) { + fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac); + } + + // safely round numbers in JS without hitting imprecisions of floating-point arithmetics + // inspired by: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round + number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize); + + var fraction = ('' + number).split(DECIMAL_SEP); + var whole = fraction[0]; + fraction = fraction[1] || ''; + + var i, pos = 0, + lgroup = pattern.lgSize, + group = pattern.gSize; + + if (whole.length >= (lgroup + group)) { + pos = whole.length - lgroup; + for (i = 0; i < pos; i++) { + if ((pos - i) % group === 0 && i !== 0) { + formatedText += groupSep; + } + formatedText += whole.charAt(i); + } + } + + for (i = pos; i < whole.length; i++) { + if ((whole.length - i) % lgroup === 0 && i !== 0) { + formatedText += groupSep; + } + formatedText += whole.charAt(i); + } + + // format fraction part. + while (fraction.length < fractionSize) { + fraction += '0'; + } + + if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize); + } else { + if (fractionSize > 0 && number < 1) { + formatedText = number.toFixed(fractionSize); + number = parseFloat(formatedText); + } + } + + if (number === 0) { + isNegative = false; + } + + parts.push(isNegative ? pattern.negPre : pattern.posPre, + formatedText, + isNegative ? pattern.negSuf : pattern.posSuf); + return parts.join(''); +} + +function padNumber(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while (num.length < digits) num = '0' + num; + if (trim) { + num = num.substr(num.length - digits); + } + return neg + num; +} + + +function dateGetter(name, size, offset, trim) { + offset = offset || 0; + return function(date) { + var value = date['get' + name](); + if (offset > 0 || value > -offset) { + value += offset; + } + if (value === 0 && offset == -12) value = 12; + return padNumber(value, size, trim); + }; +} + +function dateStrGetter(name, shortForm) { + return function(date, formats) { + var value = date['get' + name](); + var get = uppercase(shortForm ? ('SHORT' + name) : name); + + return formats[get][value]; + }; +} + +function timeZoneGetter(date, formats, offset) { + var zone = -1 * offset; + var paddedZone = (zone >= 0) ? "+" : ""; + + paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) + + padNumber(Math.abs(zone % 60), 2); + + return paddedZone; +} + +function getFirstThursdayOfYear(year) { + // 0 = index of January + var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); + // 4 = index of Thursday (+1 to account for 1st = 5) + // 11 = index of *next* Thursday (+1 account for 1st = 12) + return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); +} + +function getThursdayThisWeek(datetime) { + return new Date(datetime.getFullYear(), datetime.getMonth(), + // 4 = index of Thursday + datetime.getDate() + (4 - datetime.getDay())); +} + +function weekGetter(size) { + return function(date) { + var firstThurs = getFirstThursdayOfYear(date.getFullYear()), + thisThurs = getThursdayThisWeek(date); + + var diff = +thisThurs - +firstThurs, + result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week + + return padNumber(result, size); + }; +} + +function ampmGetter(date, formats) { + return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]; +} + +function eraGetter(date, formats) { + return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1]; +} + +function longEraGetter(date, formats) { + return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1]; +} + +var DATE_FORMATS = { + yyyy: dateGetter('FullYear', 4), + yy: dateGetter('FullYear', 2, 0, true), + y: dateGetter('FullYear', 1), + MMMM: dateStrGetter('Month'), + MMM: dateStrGetter('Month', true), + MM: dateGetter('Month', 2, 1), + M: dateGetter('Month', 1, 1), + dd: dateGetter('Date', 2), + d: dateGetter('Date', 1), + HH: dateGetter('Hours', 2), + H: dateGetter('Hours', 1), + hh: dateGetter('Hours', 2, -12), + h: dateGetter('Hours', 1, -12), + mm: dateGetter('Minutes', 2), + m: dateGetter('Minutes', 1), + ss: dateGetter('Seconds', 2), + s: dateGetter('Seconds', 1), + // while ISO 8601 requires fractions to be prefixed with `.` or `,` + // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions + sss: dateGetter('Milliseconds', 3), + EEEE: dateStrGetter('Day'), + EEE: dateStrGetter('Day', true), + a: ampmGetter, + Z: timeZoneGetter, + ww: weekGetter(2), + w: weekGetter(1), + G: eraGetter, + GG: eraGetter, + GGG: eraGetter, + GGGG: longEraGetter +}; + +var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, + NUMBER_STRING = /^\-?\d+$/; + +/** + * @ngdoc filter + * @name date + * @kind function + * + * @description + * Formats `date` to a string based on the requested `format`. + * + * `format` string can be composed of the following elements: + * + * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010) + * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) + * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199) + * * `'MMMM'`: Month in year (January-December) + * * `'MMM'`: Month in year (Jan-Dec) + * * `'MM'`: Month in year, padded (01-12) + * * `'M'`: Month in year (1-12) + * * `'dd'`: Day in month, padded (01-31) + * * `'d'`: Day in month (1-31) + * * `'EEEE'`: Day in Week,(Sunday-Saturday) + * * `'EEE'`: Day in Week, (Sun-Sat) + * * `'HH'`: Hour in day, padded (00-23) + * * `'H'`: Hour in day (0-23) + * * `'hh'`: Hour in AM/PM, padded (01-12) + * * `'h'`: Hour in AM/PM, (1-12) + * * `'mm'`: Minute in hour, padded (00-59) + * * `'m'`: Minute in hour (0-59) + * * `'ss'`: Second in minute, padded (00-59) + * * `'s'`: Second in minute (0-59) + * * `'sss'`: Millisecond in second, padded (000-999) + * * `'a'`: AM/PM marker + * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200) + * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year + * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year + * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD') + * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini') + * + * `format` string can also be one of the following predefined + * {@link guide/i18n localizable formats}: + * + * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale + * (e.g. Sep 3, 2010 12:05:08 PM) + * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM) + * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale + * (e.g. Friday, September 3, 2010) + * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010) + * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010) + * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10) + * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM) + * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM) + * + * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g. + * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence + * (e.g. `"h 'o''clock'"`). + * + * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or + * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its + * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is + * specified in the string input, the time is considered to be in the local timezone. + * @param {string=} format Formatting rules (see Description). If not specified, + * `mediumDate` is used. + * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the + * continental US time zone abbreviations, but for general use, use a time zone offset, for + * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian) + * If not specified, the timezone of the browser will be used. + * @returns {string} Formatted string or the input if input is not recognized as date/millis. + * + * @example + + + {{1288323623006 | date:'medium'}}: + {{1288323623006 | date:'medium'}}
+ {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: + {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
+ {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: + {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
+ {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: + {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
+
+ + it('should format date', function() { + expect(element(by.binding("1288323623006 | date:'medium'")).getText()). + toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); + expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). + toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/); + expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). + toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); + expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). + toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); + }); + +
+ */ +dateFilter.$inject = ['$locale']; +function dateFilter($locale) { + + + var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; + // 1 2 3 4 5 6 7 8 9 10 11 + function jsonStringToDate(string) { + var match; + if (match = string.match(R_ISO8601_STR)) { + var date = new Date(0), + tzHour = 0, + tzMin = 0, + dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear, + timeSetter = match[8] ? date.setUTCHours : date.setHours; + + if (match[9]) { + tzHour = toInt(match[9] + match[10]); + tzMin = toInt(match[9] + match[11]); + } + dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3])); + var h = toInt(match[4] || 0) - tzHour; + var m = toInt(match[5] || 0) - tzMin; + var s = toInt(match[6] || 0); + var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000); + timeSetter.call(date, h, m, s, ms); + return date; + } + return string; + } + + + return function(date, format, timezone) { + var text = '', + parts = [], + fn, match; + + format = format || 'mediumDate'; + format = $locale.DATETIME_FORMATS[format] || format; + if (isString(date)) { + date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date); + } + + if (isNumber(date)) { + date = new Date(date); + } + + if (!isDate(date) || !isFinite(date.getTime())) { + return date; + } + + while (format) { + match = DATE_FORMATS_SPLIT.exec(format); + if (match) { + parts = concat(parts, match, 1); + format = parts.pop(); + } else { + parts.push(format); + format = null; + } + } + + var dateTimezoneOffset = date.getTimezoneOffset(); + if (timezone) { + dateTimezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset()); + date = convertTimezoneToLocal(date, timezone, true); + } + forEach(parts, function(value) { + fn = DATE_FORMATS[value]; + text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset) + : value.replace(/(^'|'$)/g, '').replace(/''/g, "'"); + }); + + return text; + }; +} + + +/** + * @ngdoc filter + * @name json + * @kind function + * + * @description + * Allows you to convert a JavaScript object into JSON string. + * + * This filter is mostly useful for debugging. When using the double curly {{value}} notation + * the binding is automatically converted to JSON. + * + * @param {*} object Any JavaScript object (including arrays and primitive types) to filter. + * @param {number=} spacing The number of spaces to use per indentation, defaults to 2. + * @returns {string} JSON string. + * + * + * @example + + +
{{ {'name':'value'} | json }}
+
{{ {'name':'value'} | json:4 }}
+
+ + it('should jsonify filtered objects', function() { + expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/); + expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/); + }); + +
+ * + */ +function jsonFilter() { + return function(object, spacing) { + if (isUndefined(spacing)) { + spacing = 2; + } + return toJson(object, spacing); + }; +} + + +/** + * @ngdoc filter + * @name lowercase + * @kind function + * @description + * Converts string to lowercase. + * @see angular.lowercase + */ +var lowercaseFilter = valueFn(lowercase); + + +/** + * @ngdoc filter + * @name uppercase + * @kind function + * @description + * Converts string to uppercase. + * @see angular.uppercase + */ +var uppercaseFilter = valueFn(uppercase); + +/** + * @ngdoc filter + * @name limitTo + * @kind function + * + * @description + * Creates a new array or string containing only a specified number of elements. The elements + * are taken from either the beginning or the end of the source array, string or number, as specified by + * the value and sign (positive or negative) of `limit`. If a number is used as input, it is + * converted to a string. + * + * @param {Array|string|number} input Source array, string or number to be limited. + * @param {string|number} limit The length of the returned array or string. If the `limit` number + * is positive, `limit` number of items from the beginning of the source array/string are copied. + * If the number is negative, `limit` number of items from the end of the source array/string + * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined, + * the input will be returned unchanged. + * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin` + * indicates an offset from the end of `input`. Defaults to `0`. + * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array + * had less than `limit` elements. + * + * @example + + + +
+ +

Output numbers: {{ numbers | limitTo:numLimit }}

+ +

Output letters: {{ letters | limitTo:letterLimit }}

+ +

Output long number: {{ longNumber | limitTo:longNumberLimit }}

+
+
+ + var numLimitInput = element(by.model('numLimit')); + var letterLimitInput = element(by.model('letterLimit')); + var longNumberLimitInput = element(by.model('longNumberLimit')); + var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); + var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); + var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); + + it('should limit the number array to first three items', function() { + expect(numLimitInput.getAttribute('value')).toBe('3'); + expect(letterLimitInput.getAttribute('value')).toBe('3'); + expect(longNumberLimitInput.getAttribute('value')).toBe('3'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); + expect(limitedLetters.getText()).toEqual('Output letters: abc'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); + }); + + // There is a bug in safari and protractor that doesn't like the minus key + // it('should update the output when -3 is entered', function() { + // numLimitInput.clear(); + // numLimitInput.sendKeys('-3'); + // letterLimitInput.clear(); + // letterLimitInput.sendKeys('-3'); + // longNumberLimitInput.clear(); + // longNumberLimitInput.sendKeys('-3'); + // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); + // expect(limitedLetters.getText()).toEqual('Output letters: ghi'); + // expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); + // }); + + it('should not exceed the maximum size of input array', function() { + numLimitInput.clear(); + numLimitInput.sendKeys('100'); + letterLimitInput.clear(); + letterLimitInput.sendKeys('100'); + longNumberLimitInput.clear(); + longNumberLimitInput.sendKeys('100'); + expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); + expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); + expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); + }); + +
+*/ +function limitToFilter() { + return function(input, limit, begin) { + if (Math.abs(Number(limit)) === Infinity) { + limit = Number(limit); + } else { + limit = toInt(limit); + } + if (isNaN(limit)) return input; + + if (isNumber(input)) input = input.toString(); + if (!isArray(input) && !isString(input)) return input; + + begin = (!begin || isNaN(begin)) ? 0 : toInt(begin); + begin = (begin < 0 && begin >= -input.length) ? input.length + begin : begin; + + if (limit >= 0) { + return input.slice(begin, begin + limit); + } else { + if (begin === 0) { + return input.slice(limit, input.length); + } else { + return input.slice(Math.max(0, begin + limit), begin); + } + } + }; +} + +/** + * @ngdoc filter + * @name orderBy + * @kind function + * + * @description + * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically + * for strings and numerically for numbers. Note: if you notice numbers are not being sorted + * as expected, make sure they are actually being saved as numbers and not strings. + * + * @param {Array} array The array to sort. + * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be + * used by the comparator to determine the order of elements. + * + * Can be one of: + * + * - `function`: Getter function. The result of this function will be sorted using the + * `<`, `===`, `>` operator. + * - `string`: An Angular expression. The result of this expression is used to compare elements + * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by + * 3 first characters of a property called `name`). The result of a constant expression + * is interpreted as a property name to be used in comparisons (for example `"special name"` + * to sort object by the value of their `special name` property). An expression can be + * optionally prefixed with `+` or `-` to control ascending or descending sort order + * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array + * element itself is used to compare where sorting. + * - `Array`: An array of function or string predicates. The first predicate in the array + * is used for sorting, but when two items are equivalent, the next predicate is used. + * + * If the predicate is missing or empty then it defaults to `'+'`. + * + * @param {boolean=} reverse Reverse the order of the array. + * @returns {Array} Sorted copy of the source array. + * + * + * @example + * The example below demonstrates a simple ngRepeat, where the data is sorted + * by age in descending order (predicate is set to `'-age'`). + * `reverse` is not set, which means it defaults to `false`. + + + +
+ + + + + + + + + + + +
NamePhone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+
+ * + * The predicate and reverse parameters can be controlled dynamically through scope properties, + * as shown in the next example. + * @example + + + + +
+
Sorting predicate = {{predicate}}; reverse = {{reverse}}
+
+ [ unsorted ] + + + + + + + + + + + +
+ Name + + + Phone Number + + + Age + +
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+
+ * + * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the + * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the + * desired parameters. + * + * Example: + * + * @example + + +
+ + + + + + + + + + + +
Name + (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
+
+
+ + + angular.module('orderByExample', []) + .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) { + var orderBy = $filter('orderBy'); + $scope.friends = [ + { name: 'John', phone: '555-1212', age: 10 }, + { name: 'Mary', phone: '555-9876', age: 19 }, + { name: 'Mike', phone: '555-4321', age: 21 }, + { name: 'Adam', phone: '555-5678', age: 35 }, + { name: 'Julie', phone: '555-8765', age: 29 } + ]; + $scope.order = function(predicate, reverse) { + $scope.friends = orderBy($scope.friends, predicate, reverse); + }; + $scope.order('-age',false); + }]); + +
+ */ +orderByFilter.$inject = ['$parse']; +function orderByFilter($parse) { + return function(array, sortPredicate, reverseOrder) { + + if (!(isArrayLike(array))) return array; + + if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; } + if (sortPredicate.length === 0) { sortPredicate = ['+']; } + + var predicates = processPredicates(sortPredicate, reverseOrder); + + // The next three lines are a version of a Swartzian Transform idiom from Perl + // (sometimes called the Decorate-Sort-Undecorate idiom) + // See https://en.wikipedia.org/wiki/Schwartzian_transform + var compareValues = Array.prototype.map.call(array, getComparisonObject); + compareValues.sort(doComparison); + array = compareValues.map(function(item) { return item.value; }); + + return array; + + function getComparisonObject(value, index) { + return { + value: value, + predicateValues: predicates.map(function(predicate) { + return getPredicateValue(predicate.get(value), index); + }) + }; + } + + function doComparison(v1, v2) { + var result = 0; + for (var index=0, length = predicates.length; index < length; ++index) { + result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending; + if (result) break; + } + return result; + } + }; + + function processPredicates(sortPredicate, reverseOrder) { + reverseOrder = reverseOrder ? -1 : 1; + return sortPredicate.map(function(predicate) { + var descending = 1, get = identity; + + if (isFunction(predicate)) { + get = predicate; + } else if (isString(predicate)) { + if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) { + descending = predicate.charAt(0) == '-' ? -1 : 1; + predicate = predicate.substring(1); + } + if (predicate !== '') { + get = $parse(predicate); + if (get.constant) { + var key = get(); + get = function(value) { return value[key]; }; + } + } + } + return { get: get, descending: descending * reverseOrder }; + }); + } + + function isPrimitive(value) { + switch (typeof value) { + case 'number': /* falls through */ + case 'boolean': /* falls through */ + case 'string': + return true; + default: + return false; + } + } + + function objectValue(value, index) { + // If `valueOf` is a valid function use that + if (typeof value.valueOf === 'function') { + value = value.valueOf(); + if (isPrimitive(value)) return value; + } + // If `toString` is a valid function and not the one from `Object.prototype` use that + if (hasCustomToString(value)) { + value = value.toString(); + if (isPrimitive(value)) return value; + } + // We have a basic object so we use the position of the object in the collection + return index; + } + + function getPredicateValue(value, index) { + var type = typeof value; + if (value === null) { + type = 'string'; + value = 'null'; + } else if (type === 'string') { + value = value.toLowerCase(); + } else if (type === 'object') { + value = objectValue(value, index); + } + return { value: value, type: type }; + } + + function compare(v1, v2) { + var result = 0; + if (v1.type === v2.type) { + if (v1.value !== v2.value) { + result = v1.value < v2.value ? -1 : 1; + } + } else { + result = v1.type < v2.type ? -1 : 1; + } + return result; + } +} + +function ngDirective(directive) { + if (isFunction(directive)) { + directive = { + link: directive + }; + } + directive.restrict = directive.restrict || 'AC'; + return valueFn(directive); +} + +/** + * @ngdoc directive + * @name a + * @restrict E + * + * @description + * Modifies the default behavior of the html A tag so that the default action is prevented when + * the href attribute is empty. + * + * This change permits the easy creation of action links with the `ngClick` directive + * without changing the location or causing page reloads, e.g.: + * `Add Item` + */ +var htmlAnchorDirective = valueFn({ + restrict: 'E', + compile: function(element, attr) { + if (!attr.href && !attr.xlinkHref) { + return function(scope, element) { + // If the linked element is not an anchor tag anymore, do nothing + if (element[0].nodeName.toLowerCase() !== 'a') return; + + // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. + var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ? + 'xlink:href' : 'href'; + element.on('click', function(event) { + // if we have no href url, then don't navigate anywhere. + if (!element.attr(href)) { + event.preventDefault(); + } + }); + }; + } + } +}); + +/** + * @ngdoc directive + * @name ngHref + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in an href attribute will + * make the link go to the wrong URL if the user clicks it before + * Angular has a chance to replace the `{{hash}}` markup with its + * value. Until Angular replaces the markup the link will be broken + * and will most likely return a 404 error. The `ngHref` directive + * solves this problem. + * + * The wrong way to write it: + * ```html + * link1 + * ``` + * + * The correct way to write it: + * ```html + * link1 + * ``` + * + * @element A + * @param {template} ngHref any string which can contain `{{}}` markup. + * + * @example + * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes + * in links and their different behaviors: + + +
+ link 1 (link, don't reload)
+ link 2 (link, don't reload)
+ link 3 (link, reload!)
+ anchor (link, don't reload)
+ anchor (no link)
+ link (link, change location) +
+ + it('should execute ng-click but not reload when href without value', function() { + element(by.id('link-1')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('1'); + expect(element(by.id('link-1')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when href empty string', function() { + element(by.id('link-2')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('2'); + expect(element(by.id('link-2')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click and change url when ng-href specified', function() { + expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); + + element(by.id('link-3')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/123$/); + }); + }, 5000, 'page should navigate to /123'); + }); + + it('should execute ng-click but not reload when href empty string and name specified', function() { + element(by.id('link-4')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('4'); + expect(element(by.id('link-4')).getAttribute('href')).toBe(''); + }); + + it('should execute ng-click but not reload when no href but name specified', function() { + element(by.id('link-5')).click(); + expect(element(by.model('value')).getAttribute('value')).toEqual('5'); + expect(element(by.id('link-5')).getAttribute('href')).toBe(null); + }); + + it('should only change url when only ng-href', function() { + element(by.model('value')).clear(); + element(by.model('value')).sendKeys('6'); + expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); + + element(by.id('link-6')).click(); + + // At this point, we navigate away from an Angular page, so we need + // to use browser.driver to get the base webdriver. + browser.wait(function() { + return browser.driver.getCurrentUrl().then(function(url) { + return url.match(/\/6$/); + }); + }, 5000, 'page should navigate to /6'); + }); + +
+ */ + +/** + * @ngdoc directive + * @name ngSrc + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in a `src` attribute doesn't + * work right: The browser will fetch from the URL with the literal + * text `{{hash}}` until Angular replaces the expression inside + * `{{hash}}`. The `ngSrc` directive solves this problem. + * + * The buggy way to write it: + * ```html + * Description + * ``` + * + * The correct way to write it: + * ```html + * Description + * ``` + * + * @element IMG + * @param {template} ngSrc any string which can contain `{{}}` markup. + */ + +/** + * @ngdoc directive + * @name ngSrcset + * @restrict A + * @priority 99 + * + * @description + * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't + * work right: The browser will fetch from the URL with the literal + * text `{{hash}}` until Angular replaces the expression inside + * `{{hash}}`. The `ngSrcset` directive solves this problem. + * + * The buggy way to write it: + * ```html + * Description + * ``` + * + * The correct way to write it: + * ```html + * Description + * ``` + * + * @element IMG + * @param {template} ngSrcset any string which can contain `{{}}` markup. + */ + +/** + * @ngdoc directive + * @name ngDisabled + * @restrict A + * @priority 100 + * + * @description + * + * This directive sets the `disabled` attribute on the element if the + * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy. + * + * A special directive is necessary because we cannot use interpolation inside the `disabled` + * attribute. The following example would make the button enabled on Chrome/Firefox + * but not on older IEs: + * + * ```html + * + *
+ * + *
+ * ``` + * + * This is because the HTML specification does not require browsers to preserve the values of + * boolean attributes such as `disabled` (Their presence means true and their absence means false.) + * If we put an Angular interpolation expression into such an attribute then the + * binding information would be lost when the browser removes the attribute. + * + * @example + + +
+ +
+ + it('should toggle button', function() { + expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy, + * then the `disabled` attribute will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngChecked + * @restrict A + * @priority 100 + * + * @description + * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy. + * + * Note that this directive should not be used together with {@link ngModel `ngModel`}, + * as this can lead to unexpected behavior. + * + * ### Why do we need `ngChecked`? + * + * The HTML specification does not require browsers to preserve the values of boolean attributes + * such as checked. (Their presence means true and their absence means false.) + * If we put an Angular interpolation expression into such an attribute then the + * binding information would be lost when the browser removes the attribute. + * The `ngChecked` directive solves this problem for the `checked` attribute. + * This complementary directive is not removed by the browser and so provides + * a permanent reliable place to store the binding information. + * @example + + +
+ +
+ + it('should check both checkBoxes', function() { + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy(); + element(by.model('master')).click(); + expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngChecked If the {@link guide/expression expression} is truthy, + * then the `checked` attribute will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngReadonly + * @restrict A + * @priority 100 + * + * @description + * The HTML specification does not require browsers to preserve the values of boolean attributes + * such as readonly. (Their presence means true and their absence means false.) + * If we put an Angular interpolation expression into such an attribute then the + * binding information would be lost when the browser removes the attribute. + * The `ngReadonly` directive solves this problem for the `readonly` attribute. + * This complementary directive is not removed by the browser and so provides + * a permanent reliable place to store the binding information. + * @example + + +
+ +
+ + it('should toggle readonly attr', function() { + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); + element(by.model('checked')).click(); + expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); + }); + +
+ * + * @element INPUT + * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy, + * then special attribute "readonly" will be set on the element + */ + + +/** + * @ngdoc directive + * @name ngSelected + * @restrict A + * @priority 100 + * + * @description + * The HTML specification does not require browsers to preserve the values of boolean attributes + * such as selected. (Their presence means true and their absence means false.) + * If we put an Angular interpolation expression into such an attribute then the + * binding information would be lost when the browser removes the attribute. + * The `ngSelected` directive solves this problem for the `selected` attribute. + * This complementary directive is not removed by the browser and so provides + * a permanent reliable place to store the binding information. + * + * @example + + +
+ +
+ + it('should select Greetings!', function() { + expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); + element(by.model('selected')).click(); + expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); + }); + +
+ * + * @element OPTION + * @param {expression} ngSelected If the {@link guide/expression expression} is truthy, + * then special attribute "selected" will be set on the element + */ + +/** + * @ngdoc directive + * @name ngOpen + * @restrict A + * @priority 100 + * + * @description + * The HTML specification does not require browsers to preserve the values of boolean attributes + * such as open. (Their presence means true and their absence means false.) + * If we put an Angular interpolation expression into such an attribute then the + * binding information would be lost when the browser removes the attribute. + * The `ngOpen` directive solves this problem for the `open` attribute. + * This complementary directive is not removed by the browser and so provides + * a permanent reliable place to store the binding information. + * @example + + +
+
+ Show/Hide me +
+
+ + it('should toggle open', function() { + expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); + element(by.model('open')).click(); + expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); + }); + +
+ * + * @element DETAILS + * @param {expression} ngOpen If the {@link guide/expression expression} is truthy, + * then special attribute "open" will be set on the element + */ + +var ngAttributeAliasDirectives = {}; + +// boolean attrs are evaluated +forEach(BOOLEAN_ATTR, function(propName, attrName) { + // binding to multiple is not supported + if (propName == "multiple") return; + + function defaultLinkFn(scope, element, attr) { + scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) { + attr.$set(attrName, !!value); + }); + } + + var normalized = directiveNormalize('ng-' + attrName); + var linkFn = defaultLinkFn; + + if (propName === 'checked') { + linkFn = function(scope, element, attr) { + // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input + if (attr.ngModel !== attr[normalized]) { + defaultLinkFn(scope, element, attr); + } + }; + } + + ngAttributeAliasDirectives[normalized] = function() { + return { + restrict: 'A', + priority: 100, + link: linkFn + }; + }; +}); + +// aliased input attrs are evaluated +forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) { + ngAttributeAliasDirectives[ngAttr] = function() { + return { + priority: 100, + link: function(scope, element, attr) { + //special case ngPattern when a literal regular expression value + //is used as the expression (this way we don't have to watch anything). + if (ngAttr === "ngPattern" && attr.ngPattern.charAt(0) == "/") { + var match = attr.ngPattern.match(REGEX_STRING_REGEXP); + if (match) { + attr.$set("ngPattern", new RegExp(match[1], match[2])); + return; + } + } + + scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) { + attr.$set(ngAttr, value); + }); + } + }; + }; +}); + +// ng-src, ng-srcset, ng-href are interpolated +forEach(['src', 'srcset', 'href'], function(attrName) { + var normalized = directiveNormalize('ng-' + attrName); + ngAttributeAliasDirectives[normalized] = function() { + return { + priority: 99, // it needs to run after the attributes are interpolated + link: function(scope, element, attr) { + var propName = attrName, + name = attrName; + + if (attrName === 'href' && + toString.call(element.prop('href')) === '[object SVGAnimatedString]') { + name = 'xlinkHref'; + attr.$attr[name] = 'xlink:href'; + propName = null; + } + + attr.$observe(normalized, function(value) { + if (!value) { + if (attrName === 'href') { + attr.$set(name, null); + } + return; + } + + attr.$set(name, value); + + // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist + // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need + // to set the property as well to achieve the desired effect. + // we use attr[attrName] value since $set can sanitize the url. + if (msie && propName) element.prop(propName, attr[name]); + }); + } + }; + }; +}); + +/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true + */ +var nullFormCtrl = { + $addControl: noop, + $$renameControl: nullFormRenameControl, + $removeControl: noop, + $setValidity: noop, + $setDirty: noop, + $setPristine: noop, + $setSubmitted: noop +}, +SUBMITTED_CLASS = 'ng-submitted'; + +function nullFormRenameControl(control, name) { + control.$name = name; +} + +/** + * @ngdoc type + * @name form.FormController + * + * @property {boolean} $pristine True if user has not interacted with the form yet. + * @property {boolean} $dirty True if user has already interacted with the form. + * @property {boolean} $valid True if all of the containing forms and controls are valid. + * @property {boolean} $invalid True if at least one containing control or form is invalid. + * @property {boolean} $submitted True if user has submitted the form even if its invalid. + * + * @property {Object} $error Is an object hash, containing references to controls or + * forms with failing validators, where: + * + * - keys are validation tokens (error names), + * - values are arrays of controls or forms that have a failing validator for given error name. + * + * Built-in validation tokens: + * + * - `email` + * - `max` + * - `maxlength` + * - `min` + * - `minlength` + * - `number` + * - `pattern` + * - `required` + * - `url` + * - `date` + * - `datetimelocal` + * - `time` + * - `week` + * - `month` + * + * @description + * `FormController` keeps track of all its controls and nested forms as well as the state of them, + * such as being valid/invalid or dirty/pristine. + * + * Each {@link ng.directive:form form} directive creates an instance + * of `FormController`. + * + */ +//asks for $scope to fool the BC controller module +FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate']; +function FormController(element, attrs, $scope, $animate, $interpolate) { + var form = this, + controls = []; + + var parentForm = form.$$parentForm = element.parent().controller('form') || nullFormCtrl; + + // init state + form.$error = {}; + form.$$success = {}; + form.$pending = undefined; + form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope); + form.$dirty = false; + form.$pristine = true; + form.$valid = true; + form.$invalid = false; + form.$submitted = false; + + parentForm.$addControl(form); + + /** + * @ngdoc method + * @name form.FormController#$rollbackViewValue + * + * @description + * Rollback all form controls pending updates to the `$modelValue`. + * + * Updates may be pending by a debounced event or because the input is waiting for a some future + * event defined in `ng-model-options`. This method is typically needed by the reset button of + * a form that uses `ng-model-options` to pend updates. + */ + form.$rollbackViewValue = function() { + forEach(controls, function(control) { + control.$rollbackViewValue(); + }); + }; + + /** + * @ngdoc method + * @name form.FormController#$commitViewValue + * + * @description + * Commit all form controls pending updates to the `$modelValue`. + * + * Updates may be pending by a debounced event or because the input is waiting for a some future + * event defined in `ng-model-options`. This method is rarely needed as `NgModelController` + * usually handles calling this in response to input events. + */ + form.$commitViewValue = function() { + forEach(controls, function(control) { + control.$commitViewValue(); + }); + }; + + /** + * @ngdoc method + * @name form.FormController#$addControl + * + * @description + * Register a control with the form. + * + * Input elements using ngModelController do this automatically when they are linked. + */ + form.$addControl = function(control) { + // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored + // and not added to the scope. Now we throw an error. + assertNotHasOwnProperty(control.$name, 'input'); + controls.push(control); + + if (control.$name) { + form[control.$name] = control; + } + }; + + // Private API: rename a form control + form.$$renameControl = function(control, newName) { + var oldName = control.$name; + + if (form[oldName] === control) { + delete form[oldName]; + } + form[newName] = control; + control.$name = newName; + }; + + /** + * @ngdoc method + * @name form.FormController#$removeControl + * + * @description + * Deregister a control from the form. + * + * Input elements using ngModelController do this automatically when they are destroyed. + */ + form.$removeControl = function(control) { + if (control.$name && form[control.$name] === control) { + delete form[control.$name]; + } + forEach(form.$pending, function(value, name) { + form.$setValidity(name, null, control); + }); + forEach(form.$error, function(value, name) { + form.$setValidity(name, null, control); + }); + forEach(form.$$success, function(value, name) { + form.$setValidity(name, null, control); + }); + + arrayRemove(controls, control); + }; + + + /** + * @ngdoc method + * @name form.FormController#$setValidity + * + * @description + * Sets the validity of a form control. + * + * This method will also propagate to parent forms. + */ + addSetValidityMethod({ + ctrl: this, + $element: element, + set: function(object, property, controller) { + var list = object[property]; + if (!list) { + object[property] = [controller]; + } else { + var index = list.indexOf(controller); + if (index === -1) { + list.push(controller); + } + } + }, + unset: function(object, property, controller) { + var list = object[property]; + if (!list) { + return; + } + arrayRemove(list, controller); + if (list.length === 0) { + delete object[property]; + } + }, + parentForm: parentForm, + $animate: $animate + }); + + /** + * @ngdoc method + * @name form.FormController#$setDirty + * + * @description + * Sets the form to a dirty state. + * + * This method can be called to add the 'ng-dirty' class and set the form to a dirty + * state (ng-dirty class). This method will also propagate to parent forms. + */ + form.$setDirty = function() { + $animate.removeClass(element, PRISTINE_CLASS); + $animate.addClass(element, DIRTY_CLASS); + form.$dirty = true; + form.$pristine = false; + parentForm.$setDirty(); + }; + + /** + * @ngdoc method + * @name form.FormController#$setPristine + * + * @description + * Sets the form to its pristine state. + * + * This method can be called to remove the 'ng-dirty' class and set the form to its pristine + * state (ng-pristine class). This method will also propagate to all the controls contained + * in this form. + * + * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after + * saving or resetting it. + */ + form.$setPristine = function() { + $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS); + form.$dirty = false; + form.$pristine = true; + form.$submitted = false; + forEach(controls, function(control) { + control.$setPristine(); + }); + }; + + /** + * @ngdoc method + * @name form.FormController#$setUntouched + * + * @description + * Sets the form to its untouched state. + * + * This method can be called to remove the 'ng-touched' class and set the form controls to their + * untouched state (ng-untouched class). + * + * Setting a form controls back to their untouched state is often useful when setting the form + * back to its pristine state. + */ + form.$setUntouched = function() { + forEach(controls, function(control) { + control.$setUntouched(); + }); + }; + + /** + * @ngdoc method + * @name form.FormController#$setSubmitted + * + * @description + * Sets the form to its submitted state. + */ + form.$setSubmitted = function() { + $animate.addClass(element, SUBMITTED_CLASS); + form.$submitted = true; + parentForm.$setSubmitted(); + }; +} + +/** + * @ngdoc directive + * @name ngForm + * @restrict EAC + * + * @description + * Nestable alias of {@link ng.directive:form `form`} directive. HTML + * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a + * sub-group of controls needs to be determined. + * + * Note: the purpose of `ngForm` is to group controls, + * but not to be a replacement for the `
` tag with all of its capabilities + * (e.g. posting to the server, ...). + * + * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into + * related scope, under this name. + * + */ + + /** + * @ngdoc directive + * @name form + * @restrict E + * + * @description + * Directive that instantiates + * {@link form.FormController FormController}. + * + * If the `name` attribute is specified, the form controller is published onto the current scope under + * this name. + * + * # Alias: {@link ng.directive:ngForm `ngForm`} + * + * In Angular, forms can be nested. This means that the outer form is valid when all of the child + * forms are valid as well. However, browsers do not allow nesting of `` elements, so + * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to + * `` but can be nested. This allows you to have nested forms, which is very useful when + * using Angular validation directives in forms that are dynamically generated using the + * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name` + * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an + * `ngForm` directive and nest these in an outer `form` element. + * + * + * # CSS classes + * - `ng-valid` is set if the form is valid. + * - `ng-invalid` is set if the form is invalid. + * - `ng-pristine` is set if the form is pristine. + * - `ng-dirty` is set if the form is dirty. + * - `ng-submitted` is set if the form was submitted. + * + * Keep in mind that ngAnimate can detect each of these classes when added and removed. + * + * + * # Submitting a form and preventing the default action + * + * Since the role of forms in client-side Angular applications is different than in classical + * roundtrip apps, it is desirable for the browser not to translate the form submission into a full + * page reload that sends the data to the server. Instead some javascript logic should be triggered + * to handle the form submission in an application-specific way. + * + * For this reason, Angular prevents the default action (form submission to the server) unless the + * `` element has an `action` attribute specified. + * + * You can use one of the following two ways to specify what javascript method should be called when + * a form is submitted: + * + * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element + * - {@link ng.directive:ngClick ngClick} directive on the first + * button or input field of type submit (input[type=submit]) + * + * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit} + * or {@link ng.directive:ngClick ngClick} directives. + * This is because of the following form submission rules in the HTML specification: + * + * - If a form has only one input field then hitting enter in this field triggers form submit + * (`ngSubmit`) + * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter + * doesn't trigger submit + * - if a form has one or more input fields and one or more buttons or input[type=submit] then + * hitting enter in any of the input fields will trigger the click handler on the *first* button or + * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`) + * + * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is + * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` + * to have access to the updated model. + * + * ## Animation Hooks + * + * Animations in ngForm are triggered when any of the associated CSS classes are added and removed. + * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any + * other validations that are performed within the form. Animations in ngForm are similar to how + * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well + * as JS animations. + * + * The following example shows a simple way to utilize CSS transitions to style a form element + * that has been rendered as invalid after it has been validated: + * + *
+ * //be sure to include ngAnimate as a module to hook into more
+ * //advanced animations
+ * .my-form {
+ *   transition:0.5s linear all;
+ *   background: white;
+ * }
+ * .my-form.ng-invalid {
+ *   background: red;
+ *   color:white;
+ * }
+ * 
+ * + * @example + + + + + + userType: + Required!
+ userType = {{userType}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ +
+ + it('should initialize to model', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); + }); + +
+ * + * @param {string=} name Name of the form. If specified, the form controller will be published into + * related scope, under this name. + */ +var formDirectiveFactory = function(isNgForm) { + return ['$timeout', function($timeout) { + var formDirective = { + name: 'form', + restrict: isNgForm ? 'EAC' : 'E', + controller: FormController, + compile: function ngFormCompile(formElement, attr) { + // Setup initial state of the control + formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS); + + var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false); + + return { + pre: function ngFormPreLink(scope, formElement, attr, controller) { + // if `action` attr is not present on the form, prevent the default action (submission) + if (!('action' in attr)) { + // we can't use jq events because if a form is destroyed during submission the default + // action is not prevented. see #1238 + // + // IE 9 is not affected because it doesn't fire a submit event and try to do a full + // page reload if the form was destroyed by submission of the form via a click handler + // on a button in the form. Looks like an IE9 specific bug. + var handleFormSubmission = function(event) { + scope.$apply(function() { + controller.$commitViewValue(); + controller.$setSubmitted(); + }); + + event.preventDefault(); + }; + + addEventListenerFn(formElement[0], 'submit', handleFormSubmission); + + // unregister the preventDefault listener so that we don't not leak memory but in a + // way that will achieve the prevention of the default action. + formElement.on('$destroy', function() { + $timeout(function() { + removeEventListenerFn(formElement[0], 'submit', handleFormSubmission); + }, 0, false); + }); + } + + var parentFormCtrl = controller.$$parentForm; + + if (nameAttr) { + setter(scope, controller.$name, controller, controller.$name); + attr.$observe(nameAttr, function(newValue) { + if (controller.$name === newValue) return; + setter(scope, controller.$name, undefined, controller.$name); + parentFormCtrl.$$renameControl(controller, newValue); + setter(scope, controller.$name, controller, controller.$name); + }); + } + formElement.on('$destroy', function() { + parentFormCtrl.$removeControl(controller); + if (nameAttr) { + setter(scope, attr[nameAttr], undefined, controller.$name); + } + extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards + }); + } + }; + } + }; + + return formDirective; + }]; +}; + +var formDirective = formDirectiveFactory(); +var ngFormDirective = formDirectiveFactory(true); + +/* global VALID_CLASS: false, + INVALID_CLASS: false, + PRISTINE_CLASS: false, + DIRTY_CLASS: false, + UNTOUCHED_CLASS: false, + TOUCHED_CLASS: false, + $ngModelMinErr: false, +*/ + +// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231 +var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/; +var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/; +var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i; +var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/; +var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/; +var DATETIMELOCAL_REGEXP = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; +var WEEK_REGEXP = /^(\d{4})-W(\d\d)$/; +var MONTH_REGEXP = /^(\d{4})-(\d\d)$/; +var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; + +var inputType = { + + /** + * @ngdoc input + * @name input[text] + * + * @description + * Standard HTML text input with angular data binding, inherited by most of the `input` elements. + * + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Adds `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. + * This parameter is ignored for input[type=password] controls, which will never trim the + * input. + * + * @example + + + +
+ +
+ + Required! + + Single word only! +
+ text = {{example.text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var text = element(by.binding('example.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if multi word', function() { + input.clear(); + input.sendKeys('hello world'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'text': textInputType, + + /** + * @ngdoc input + * @name input[date] + * + * @description + * Input with date validation and transformation. In browsers that do not yet support + * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601 + * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many + * modern browsers do not yet support this input type, it is important to provide cues to users on the + * expected input format via a placeholder or label. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a + * valid ISO date string (yyyy-MM-dd). + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be + * a valid ISO date string (yyyy-MM-dd). + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-MM-dd"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (see https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10-22'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'date': createDateInputType('date', DATE_REGEXP, + createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']), + 'yyyy-MM-dd'), + + /** + * @ngdoc input + * @name input[datetime-local] + * + * @description + * Input with datetime validation and transformation. In browsers that do not yet support + * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a + * valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be + * a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2010-12-28T14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01-01T23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP, + createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']), + 'yyyy-MM-ddTHH:mm:ss.sss'), + + /** + * @ngdoc input + * @name input[time] + * + * @description + * Input with time validation and transformation. In browsers that do not yet support + * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a + * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a + * valid ISO time format (HH:mm:ss). + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a + * valid ISO time format (HH:mm:ss). + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "HH:mm:ss"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "HH:mm:ss"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('14:57:00'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('23:59:00'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'time': createDateInputType('time', TIME_REGEXP, + createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']), + 'HH:mm:ss.sss'), + + /** + * @ngdoc input + * @name input[week] + * + * @description + * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support + * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * week format (yyyy-W##), for example: `2013-W02`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a + * valid ISO week format (yyyy-W##). + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be + * a valid ISO week format (yyyy-W##). + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not a valid date! +
+ value = {{example.value | date: "yyyy-Www"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-Www"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-W01'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-W01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'), + + /** + * @ngdoc input + * @name input[month] + * + * @description + * Input with month validation and transformation. In browsers that do not yet support + * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 + * month format (yyyy-MM), for example: `2009-01`. + * + * The model must always be a Date object, otherwise Angular will throw an error. + * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. + * If the model is not set to the first of the month, the next view to model update will set it + * to the first of the month. + * + * The timezone to be used to read/write the `Date` instance in the model can be defined using + * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be + * a valid ISO month format (yyyy-MM). + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must + * be a valid ISO month format (yyyy-MM). + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ + +
+ + Required! + + Not a valid month! +
+ value = {{example.value | date: "yyyy-MM"}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value | date: "yyyy-MM"')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + // currently protractor/webdriver does not support + // sending keys to all known HTML5 input controls + // for various browsers (https://github.com/angular/protractor/issues/562). + function setInput(val) { + // set the value of the element and force validation. + var scr = "var ipt = document.getElementById('exampleInput'); " + + "ipt.value = '" + val + "';" + + "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; + browser.executeScript(scr); + } + + it('should initialize to model', function() { + expect(value.getText()).toContain('2013-10'); + expect(valid.getText()).toContain('myForm.input.$valid = true'); + }); + + it('should be invalid if empty', function() { + setInput(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + + it('should be invalid if over max', function() { + setInput('2015-01'); + expect(value.getText()).toContain(''); + expect(valid.getText()).toContain('myForm.input.$valid = false'); + }); + +
+ */ + 'month': createDateInputType('month', MONTH_REGEXP, + createDateParser(MONTH_REGEXP, ['yyyy', 'MM']), + 'yyyy-MM'), + + /** + * @ngdoc input + * @name input[number] + * + * @description + * Text input with number validation and transformation. Sets the `number` validation + * error if not a valid number. + * + *
+ * The model must always be of type `number` otherwise Angular will throw an error. + * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt} + * error docs for more information and an example of how to convert your model if necessary. + *
+ * + * ## Issues with HTML5 constraint validation + * + * In browsers that follow the + * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29), + * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}. + * If a non-number is entered in the input, the browser will report the value as an empty string, + * which means the view / model values in `ngModel` and subsequently the scope value + * will also be an empty string. + * + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. + * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not valid number! +
+ value = {{example.value}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+
+ + var value = element(by.binding('example.value')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('example.value')); + + it('should initialize to model', function() { + expect(value.getText()).toContain('12'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if over max', function() { + input.clear(); + input.sendKeys('123'); + expect(value.getText()).toEqual('value ='); + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'number': numberInputType, + + + /** + * @ngdoc input + * @name input[url] + * + * @description + * Text input with URL validation. Sets the `url` validation error key if the content is not a + * valid URL. + * + *
+ * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex + * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify + * the built-in validators (see the {@link guide/forms Forms guide}) + *
+ * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+
+ + var text = element(by.binding('url.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('url.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('http://google.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not url', function() { + input.clear(); + input.sendKeys('box'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'url': urlInputType, + + + /** + * @ngdoc input + * @name input[email] + * + * @description + * Text input with email validation. Sets the `email` validation error key if not a valid email + * address. + * + *
+ * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex + * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can + * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide}) + *
+ * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of + * any length. + * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string + * that contains the regular expression body that will be converted to a regular expression + * as in the ngPattern directive. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+ +
+ + Required! + + Not valid email! +
+ text = {{email.text}}
+ myForm.input.$valid = {{myForm.input.$valid}}
+ myForm.input.$error = {{myForm.input.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.email = {{!!myForm.$error.email}}
+
+
+ + var text = element(by.binding('email.text')); + var valid = element(by.binding('myForm.input.$valid')); + var input = element(by.model('email.text')); + + it('should initialize to model', function() { + expect(text.getText()).toContain('me@example.com'); + expect(valid.getText()).toContain('true'); + }); + + it('should be invalid if empty', function() { + input.clear(); + input.sendKeys(''); + expect(text.getText()).toEqual('text ='); + expect(valid.getText()).toContain('false'); + }); + + it('should be invalid if not email', function() { + input.clear(); + input.sendKeys('xxx'); + + expect(valid.getText()).toContain('false'); + }); + +
+ */ + 'email': emailInputType, + + + /** + * @ngdoc input + * @name input[radio] + * + * @description + * HTML radio button. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string} value The value to which the `ngModel` expression should be set when selected. + * Note that `value` only supports `string` values, i.e. the scope model needs to be a string, + * too. Use `ngValue` if you need complex models (`number`, `object`, ...). + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio + * is selected. Should be used instead of the `value` attribute if you need + * a non-string `ngModel` (`boolean`, `array`, ...). + * + * @example + + + +
+
+
+
+ color = {{color.name | json}}
+
+ Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. +
+ + it('should change state', function() { + var color = element(by.binding('color.name')); + + expect(color.getText()).toContain('blue'); + + element.all(by.model('color.name')).get(0).click(); + + expect(color.getText()).toContain('red'); + }); + +
+ */ + 'radio': radioInputType, + + + /** + * @ngdoc input + * @name input[checkbox] + * + * @description + * HTML checkbox. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {expression=} ngTrueValue The value to which the expression should be set when selected. + * @param {expression=} ngFalseValue The value to which the expression should be set when not selected. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * + * @example + + + +
+
+
+ value1 = {{checkboxModel.value1}}
+ value2 = {{checkboxModel.value2}}
+
+
+ + it('should change state', function() { + var value1 = element(by.binding('checkboxModel.value1')); + var value2 = element(by.binding('checkboxModel.value2')); + + expect(value1.getText()).toContain('true'); + expect(value2.getText()).toContain('YES'); + + element(by.model('checkboxModel.value1')).click(); + element(by.model('checkboxModel.value2')).click(); + + expect(value1.getText()).toContain('false'); + expect(value2.getText()).toContain('NO'); + }); + +
+ */ + 'checkbox': checkboxInputType, + + 'hidden': noop, + 'button': noop, + 'submit': noop, + 'reset': noop, + 'file': noop +}; + +function stringBasedInputType(ctrl) { + ctrl.$formatters.push(function(value) { + return ctrl.$isEmpty(value) ? value : value.toString(); + }); +} + +function textInputType(scope, element, attr, ctrl, $sniffer, $browser) { + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); +} + +function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) { + var type = lowercase(element[0].type); + + // In composition mode, users are still inputing intermediate text buffer, + // hold the listener until composition is done. + // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent + if (!$sniffer.android) { + var composing = false; + + element.on('compositionstart', function(data) { + composing = true; + }); + + element.on('compositionend', function() { + composing = false; + listener(); + }); + } + + var listener = function(ev) { + if (timeout) { + $browser.defer.cancel(timeout); + timeout = null; + } + if (composing) return; + var value = element.val(), + event = ev && ev.type; + + // By default we will trim the value + // If the attribute ng-trim exists we will avoid trimming + // If input type is 'password', the value is never trimmed + if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) { + value = trim(value); + } + + // If a control is suffering from bad input (due to native validators), browsers discard its + // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the + // control's value is the same empty value twice in a row. + if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) { + ctrl.$setViewValue(value, event); + } + }; + + // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the + // input event on backspace, delete or cut + if ($sniffer.hasEvent('input')) { + element.on('input', listener); + } else { + var timeout; + + var deferListener = function(ev, input, origValue) { + if (!timeout) { + timeout = $browser.defer(function() { + timeout = null; + if (!input || input.value !== origValue) { + listener(ev); + } + }); + } + }; + + element.on('keydown', function(event) { + var key = event.keyCode; + + // ignore + // command modifiers arrows + if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return; + + deferListener(event, this, this.value); + }); + + // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it + if ($sniffer.hasEvent('paste')) { + element.on('paste cut', deferListener); + } + } + + // if user paste into input using mouse on older browser + // or form autocomplete on newer browser, we need "change" event to catch it + element.on('change', listener); + + ctrl.$render = function() { + element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue); + }; +} + +function weekParser(isoWeek, existingDate) { + if (isDate(isoWeek)) { + return isoWeek; + } + + if (isString(isoWeek)) { + WEEK_REGEXP.lastIndex = 0; + var parts = WEEK_REGEXP.exec(isoWeek); + if (parts) { + var year = +parts[1], + week = +parts[2], + hours = 0, + minutes = 0, + seconds = 0, + milliseconds = 0, + firstThurs = getFirstThursdayOfYear(year), + addDays = (week - 1) * 7; + + if (existingDate) { + hours = existingDate.getHours(); + minutes = existingDate.getMinutes(); + seconds = existingDate.getSeconds(); + milliseconds = existingDate.getMilliseconds(); + } + + return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds); + } + } + + return NaN; +} + +function createDateParser(regexp, mapping) { + return function(iso, date) { + var parts, map; + + if (isDate(iso)) { + return iso; + } + + if (isString(iso)) { + // When a date is JSON'ified to wraps itself inside of an extra + // set of double quotes. This makes the date parsing code unable + // to match the date string and parse it as a date. + if (iso.charAt(0) == '"' && iso.charAt(iso.length - 1) == '"') { + iso = iso.substring(1, iso.length - 1); + } + if (ISO_DATE_REGEXP.test(iso)) { + return new Date(iso); + } + regexp.lastIndex = 0; + parts = regexp.exec(iso); + + if (parts) { + parts.shift(); + if (date) { + map = { + yyyy: date.getFullYear(), + MM: date.getMonth() + 1, + dd: date.getDate(), + HH: date.getHours(), + mm: date.getMinutes(), + ss: date.getSeconds(), + sss: date.getMilliseconds() / 1000 + }; + } else { + map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }; + } + + forEach(parts, function(part, index) { + if (index < mapping.length) { + map[mapping[index]] = +part; + } + }); + return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0); + } + } + + return NaN; + }; +} + +function createDateInputType(type, regexp, parseDate, format) { + return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) { + badInputChecker(scope, element, attr, ctrl); + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + var timezone = ctrl && ctrl.$options && ctrl.$options.timezone; + var previousDate; + + ctrl.$$parserName = type; + ctrl.$parsers.push(function(value) { + if (ctrl.$isEmpty(value)) return null; + if (regexp.test(value)) { + // Note: We cannot read ctrl.$modelValue, as there might be a different + // parser/formatter in the processing chain so that the model + // contains some different data format! + var parsedDate = parseDate(value, previousDate); + if (timezone) { + parsedDate = convertTimezoneToLocal(parsedDate, timezone); + } + return parsedDate; + } + return undefined; + }); + + ctrl.$formatters.push(function(value) { + if (value && !isDate(value)) { + throw $ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value); + } + if (isValidDate(value)) { + previousDate = value; + if (previousDate && timezone) { + previousDate = convertTimezoneToLocal(previousDate, timezone, true); + } + return $filter('date')(value, format, timezone); + } else { + previousDate = null; + return ''; + } + }); + + if (isDefined(attr.min) || attr.ngMin) { + var minVal; + ctrl.$validators.min = function(value) { + return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal; + }; + attr.$observe('min', function(val) { + minVal = parseObservedDateValue(val); + ctrl.$validate(); + }); + } + + if (isDefined(attr.max) || attr.ngMax) { + var maxVal; + ctrl.$validators.max = function(value) { + return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal; + }; + attr.$observe('max', function(val) { + maxVal = parseObservedDateValue(val); + ctrl.$validate(); + }); + } + + function isValidDate(value) { + // Invalid Date: getTime() returns NaN + return value && !(value.getTime && value.getTime() !== value.getTime()); + } + + function parseObservedDateValue(val) { + return isDefined(val) ? (isDate(val) ? val : parseDate(val)) : undefined; + } + }; +} + +function badInputChecker(scope, element, attr, ctrl) { + var node = element[0]; + var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity); + if (nativeValidation) { + ctrl.$parsers.push(function(value) { + var validity = element.prop(VALIDITY_STATE_PROPERTY) || {}; + // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430): + // - also sets validity.badInput (should only be validity.typeMismatch). + // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email) + // - can ignore this case as we can still read out the erroneous email... + return validity.badInput && !validity.typeMismatch ? undefined : value; + }); + } +} + +function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { + badInputChecker(scope, element, attr, ctrl); + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + + ctrl.$$parserName = 'number'; + ctrl.$parsers.push(function(value) { + if (ctrl.$isEmpty(value)) return null; + if (NUMBER_REGEXP.test(value)) return parseFloat(value); + return undefined; + }); + + ctrl.$formatters.push(function(value) { + if (!ctrl.$isEmpty(value)) { + if (!isNumber(value)) { + throw $ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value); + } + value = value.toString(); + } + return value; + }); + + if (isDefined(attr.min) || attr.ngMin) { + var minVal; + ctrl.$validators.min = function(value) { + return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal; + }; + + attr.$observe('min', function(val) { + if (isDefined(val) && !isNumber(val)) { + val = parseFloat(val, 10); + } + minVal = isNumber(val) && !isNaN(val) ? val : undefined; + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + }); + } + + if (isDefined(attr.max) || attr.ngMax) { + var maxVal; + ctrl.$validators.max = function(value) { + return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal; + }; + + attr.$observe('max', function(val) { + if (isDefined(val) && !isNumber(val)) { + val = parseFloat(val, 10); + } + maxVal = isNumber(val) && !isNaN(val) ? val : undefined; + // TODO(matsko): implement validateLater to reduce number of validations + ctrl.$validate(); + }); + } +} + +function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) { + // Note: no badInputChecker here by purpose as `url` is only a validation + // in browsers, i.e. we can always read out input.value even if it is not valid! + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); + + ctrl.$$parserName = 'url'; + ctrl.$validators.url = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return ctrl.$isEmpty(value) || URL_REGEXP.test(value); + }; +} + +function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { + // Note: no badInputChecker here by purpose as `url` is only a validation + // in browsers, i.e. we can always read out input.value even if it is not valid! + baseInputType(scope, element, attr, ctrl, $sniffer, $browser); + stringBasedInputType(ctrl); + + ctrl.$$parserName = 'email'; + ctrl.$validators.email = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value); + }; +} + +function radioInputType(scope, element, attr, ctrl) { + // make the name unique, if not defined + if (isUndefined(attr.name)) { + element.attr('name', nextUid()); + } + + var listener = function(ev) { + if (element[0].checked) { + ctrl.$setViewValue(attr.value, ev && ev.type); + } + }; + + element.on('click', listener); + + ctrl.$render = function() { + var value = attr.value; + element[0].checked = (value == ctrl.$viewValue); + }; + + attr.$observe('value', ctrl.$render); +} + +function parseConstantExpr($parse, context, name, expression, fallback) { + var parseFn; + if (isDefined(expression)) { + parseFn = $parse(expression); + if (!parseFn.constant) { + throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' + + '`{1}`.', name, expression); + } + return parseFn(context); + } + return fallback; +} + +function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { + var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); + var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false); + + var listener = function(ev) { + ctrl.$setViewValue(element[0].checked, ev && ev.type); + }; + + element.on('click', listener); + + ctrl.$render = function() { + element[0].checked = ctrl.$viewValue; + }; + + // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false` + // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert + // it to a boolean. + ctrl.$isEmpty = function(value) { + return value === false; + }; + + ctrl.$formatters.push(function(value) { + return equals(value, trueValue); + }); + + ctrl.$parsers.push(function(value) { + return value ? trueValue : falseValue; + }); +} + + +/** + * @ngdoc directive + * @name textarea + * @restrict E + * + * @description + * HTML textarea element control with angular data-binding. The data-binding and validation + * properties of this element are exactly the same as those of the + * {@link ng.directive:input input element}. + * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to + * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of + * `required` when you want to data-bind to the `required` attribute. + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any + * length. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. + */ + + +/** + * @ngdoc directive + * @name input + * @restrict E + * + * @description + * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding, + * input state control, and validation. + * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers. + * + *
+ * **Note:** Not every feature offered is available for all input types. + * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`. + *
+ * + * @param {string} ngModel Assignable angular expression to data-bind to. + * @param {string=} name Property name of the form under which the control is published. + * @param {string=} required Sets `required` validation error key if the value is not entered. + * @param {boolean=} ngRequired Sets `required` attribute if set to true + * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than + * minlength. + * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than + * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any + * length. + * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match + * a RegExp found by evaluating the Angular expression given in the attribute value. + * If the expression evaluates to a RegExp object, then this is used directly. + * If the expression evaluates to a string, then it will be converted to a RegExp + * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to + * `new RegExp('^abc$')`.
+ * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to + * start at the index of the last search's match, thus not taking the whole input value into + * account. + * @param {string=} ngChange Angular expression to be executed when input changes due to user + * interaction with the input element. + * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. + * This parameter is ignored for input[type=password] controls, which will never trim the + * input. + * + * @example + + + +
+
+ +
+ + Required! +
+ +
+ + Too short! + + Too long! +
+
+
+ user = {{user}}
+ myForm.userName.$valid = {{myForm.userName.$valid}}
+ myForm.userName.$error = {{myForm.userName.$error}}
+ myForm.lastName.$valid = {{myForm.lastName.$valid}}
+ myForm.lastName.$error = {{myForm.lastName.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+ myForm.$error.minlength = {{!!myForm.$error.minlength}}
+ myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
+
+
+ + var user = element(by.exactBinding('user')); + var userNameValid = element(by.binding('myForm.userName.$valid')); + var lastNameValid = element(by.binding('myForm.lastName.$valid')); + var lastNameError = element(by.binding('myForm.lastName.$error')); + var formValid = element(by.binding('myForm.$valid')); + var userNameInput = element(by.model('user.name')); + var userLastInput = element(by.model('user.last')); + + it('should initialize to model', function() { + expect(user.getText()).toContain('{"name":"guest","last":"visitor"}'); + expect(userNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if empty when required', function() { + userNameInput.clear(); + userNameInput.sendKeys(''); + + expect(user.getText()).toContain('{"last":"visitor"}'); + expect(userNameValid.getText()).toContain('false'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be valid if empty when min length is set', function() { + userLastInput.clear(); + userLastInput.sendKeys(''); + + expect(user.getText()).toContain('{"name":"guest","last":""}'); + expect(lastNameValid.getText()).toContain('true'); + expect(formValid.getText()).toContain('true'); + }); + + it('should be invalid if less than required min length', function() { + userLastInput.clear(); + userLastInput.sendKeys('xx'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('minlength'); + expect(formValid.getText()).toContain('false'); + }); + + it('should be invalid if longer than max length', function() { + userLastInput.clear(); + userLastInput.sendKeys('some ridiculously long name'); + + expect(user.getText()).toContain('{"name":"guest"}'); + expect(lastNameValid.getText()).toContain('false'); + expect(lastNameError.getText()).toContain('maxlength'); + expect(formValid.getText()).toContain('false'); + }); + +
+ */ +var inputDirective = ['$browser', '$sniffer', '$filter', '$parse', + function($browser, $sniffer, $filter, $parse) { + return { + restrict: 'E', + require: ['?ngModel'], + link: { + pre: function(scope, element, attr, ctrls) { + if (ctrls[0]) { + (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer, + $browser, $filter, $parse); + } + } + } + }; +}]; + + + +var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/; +/** + * @ngdoc directive + * @name ngValue + * + * @description + * Binds the given expression to the value of `
+ + it('should check ng-options', function() { + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red'); + element.all(by.model('myColor')).first().click(); + element.all(by.css('select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black'); + element(by.css('.nullable select[ng-model="myColor"]')).click(); + element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click(); + expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null'); + }); + + + */ + +// jshint maxlen: false +// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999 +var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/; + // 1: value expression (valueFn) + // 2: label expression (displayFn) + // 3: group by expression (groupByFn) + // 4: disable when expression (disableWhenFn) + // 5: array item variable name + // 6: object item key variable name + // 7: object item value variable name + // 8: collection expression + // 9: track by expression +// jshint maxlen: 100 + + +var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) { + + function parseOptionsExpression(optionsExp, selectElement, scope) { + + var match = optionsExp.match(NG_OPTIONS_REGEXP); + if (!(match)) { + throw ngOptionsMinErr('iexp', + "Expected expression in form of " + + "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" + + " but got '{0}'. Element: {1}", + optionsExp, startingTag(selectElement)); + } + + // Extract the parts from the ngOptions expression + + // The variable name for the value of the item in the collection + var valueName = match[5] || match[7]; + // The variable name for the key of the item in the collection + var keyName = match[6]; + + // An expression that generates the viewValue for an option if there is a label expression + var selectAs = / as /.test(match[0]) && match[1]; + // An expression that is used to track the id of each object in the options collection + var trackBy = match[9]; + // An expression that generates the viewValue for an option if there is no label expression + var valueFn = $parse(match[2] ? match[1] : valueName); + var selectAsFn = selectAs && $parse(selectAs); + var viewValueFn = selectAsFn || valueFn; + var trackByFn = trackBy && $parse(trackBy); + + // Get the value by which we are going to track the option + // if we have a trackFn then use that (passing scope and locals) + // otherwise just hash the given viewValue + var getTrackByValueFn = trackBy ? + function(value, locals) { return trackByFn(scope, locals); } : + function getHashOfValue(value) { return hashKey(value); }; + var getTrackByValue = function(value, key) { + return getTrackByValueFn(value, getLocals(value, key)); + }; + + var displayFn = $parse(match[2] || match[1]); + var groupByFn = $parse(match[3] || ''); + var disableWhenFn = $parse(match[4] || ''); + var valuesFn = $parse(match[8]); + + var locals = {}; + var getLocals = keyName ? function(value, key) { + locals[keyName] = key; + locals[valueName] = value; + return locals; + } : function(value) { + locals[valueName] = value; + return locals; + }; + + + function Option(selectValue, viewValue, label, group, disabled) { + this.selectValue = selectValue; + this.viewValue = viewValue; + this.label = label; + this.group = group; + this.disabled = disabled; + } + + function getOptionValuesKeys(optionValues) { + var optionValuesKeys; + + if (!keyName && isArrayLike(optionValues)) { + optionValuesKeys = optionValues; + } else { + // if object, extract keys, in enumeration order, unsorted + optionValuesKeys = []; + for (var itemKey in optionValues) { + if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') { + optionValuesKeys.push(itemKey); + } + } + } + return optionValuesKeys; + } + + return { + trackBy: trackBy, + getTrackByValue: getTrackByValue, + getWatchables: $parse(valuesFn, function(optionValues) { + // Create a collection of things that we would like to watch (watchedArray) + // so that they can all be watched using a single $watchCollection + // that only runs the handler once if anything changes + var watchedArray = []; + optionValues = optionValues || []; + + var optionValuesKeys = getOptionValuesKeys(optionValues); + var optionValuesLength = optionValuesKeys.length; + for (var index = 0; index < optionValuesLength; index++) { + var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index]; + var value = optionValues[key]; + + var locals = getLocals(optionValues[key], key); + var selectValue = getTrackByValueFn(optionValues[key], locals); + watchedArray.push(selectValue); + + // Only need to watch the displayFn if there is a specific label expression + if (match[2] || match[1]) { + var label = displayFn(scope, locals); + watchedArray.push(label); + } + + // Only need to watch the disableWhenFn if there is a specific disable expression + if (match[4]) { + var disableWhen = disableWhenFn(scope, locals); + watchedArray.push(disableWhen); + } + } + return watchedArray; + }), + + getOptions: function() { + + var optionItems = []; + var selectValueMap = {}; + + // The option values were already computed in the `getWatchables` fn, + // which must have been called to trigger `getOptions` + var optionValues = valuesFn(scope) || []; + var optionValuesKeys = getOptionValuesKeys(optionValues); + var optionValuesLength = optionValuesKeys.length; + + for (var index = 0; index < optionValuesLength; index++) { + var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index]; + var value = optionValues[key]; + var locals = getLocals(value, key); + var viewValue = viewValueFn(scope, locals); + var selectValue = getTrackByValueFn(viewValue, locals); + var label = displayFn(scope, locals); + var group = groupByFn(scope, locals); + var disabled = disableWhenFn(scope, locals); + var optionItem = new Option(selectValue, viewValue, label, group, disabled); + + optionItems.push(optionItem); + selectValueMap[selectValue] = optionItem; + } + + return { + items: optionItems, + selectValueMap: selectValueMap, + getOptionFromViewValue: function(value) { + return selectValueMap[getTrackByValue(value)]; + }, + getViewValueFromOption: function(option) { + // If the viewValue could be an object that may be mutated by the application, + // we need to make a copy and not return the reference to the value on the option. + return trackBy ? angular.copy(option.viewValue) : option.viewValue; + } + }; + } + }; + } + + + // we can't just jqLite(' + * + * + * + * {{ model }} + * + * + * angular.module('nonStringSelect', []) + * .run(function($rootScope) { + * $rootScope.model = { id: 2 }; + * }) + * .directive('convertToNumber', function() { + * return { + * require: 'ngModel', + * link: function(scope, element, attrs, ngModel) { + * ngModel.$parsers.push(function(val) { + * return parseInt(val, 10); + * }); + * ngModel.$formatters.push(function(val) { + * return '' + val; + * }); + * } + * }; + * }); + * + * + * it('should initialize to model', function() { + * var select = element(by.css('select')); + * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two'); + * }); + * + * + * + */ +var selectDirective = function() { + + return { + restrict: 'E', + require: ['select', '?ngModel'], + controller: SelectController, + link: function(scope, element, attr, ctrls) { + + // if ngModel is not defined, we don't need to do anything + var ngModelCtrl = ctrls[1]; + if (!ngModelCtrl) return; + + var selectCtrl = ctrls[0]; + + selectCtrl.ngModelCtrl = ngModelCtrl; + + // We delegate rendering to the `writeValue` method, which can be changed + // if the select can have multiple selected values or if the options are being + // generated by `ngOptions` + ngModelCtrl.$render = function() { + selectCtrl.writeValue(ngModelCtrl.$viewValue); + }; + + // When the selected item(s) changes we delegate getting the value of the select control + // to the `readValue` method, which can be changed if the select can have multiple + // selected values or if the options are being generated by `ngOptions` + element.on('change', function() { + scope.$apply(function() { + ngModelCtrl.$setViewValue(selectCtrl.readValue()); + }); + }); + + // If the select allows multiple values then we need to modify how we read and write + // values from and to the control; also what it means for the value to be empty and + // we have to add an extra watch since ngModel doesn't work well with arrays - it + // doesn't trigger rendering if only an item in the array changes. + if (attr.multiple) { + + // Read value now needs to check each option to see if it is selected + selectCtrl.readValue = function readMultipleValue() { + var array = []; + forEach(element.find('option'), function(option) { + if (option.selected) { + array.push(option.value); + } + }); + return array; + }; + + // Write value now needs to set the selected property of each matching option + selectCtrl.writeValue = function writeMultipleValue(value) { + var items = new HashMap(value); + forEach(element.find('option'), function(option) { + option.selected = isDefined(items.get(option.value)); + }); + }; + + // we have to do it on each watch since ngModel watches reference, but + // we need to work of an array, so we need to see if anything was inserted/removed + var lastView, lastViewRef = NaN; + scope.$watch(function selectMultipleWatch() { + if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) { + lastView = shallowCopy(ngModelCtrl.$viewValue); + ngModelCtrl.$render(); + } + lastViewRef = ngModelCtrl.$viewValue; + }); + + // If we are a multiple select then value is now a collection + // so the meaning of $isEmpty changes + ngModelCtrl.$isEmpty = function(value) { + return !value || value.length === 0; + }; + + } + } + }; +}; + + +// The option directive is purely designed to communicate the existence (or lack of) +// of dynamically created (and destroyed) option elements to their containing select +// directive via its controller. +var optionDirective = ['$interpolate', function($interpolate) { + + function chromeHack(optionElement) { + // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459 + // Adding an