diff --git a/client/package-lock.json b/client/package-lock.json index 9f0ff211053..03ed5b8ef7e 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4004,20 +4004,24 @@ } }, "gulp-uglify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-2.1.2.tgz", - "integrity": "sha1-bbhbHQ7mPRgFhZK2WGSdZcLsRUE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.0.tgz", + "integrity": "sha1-DfAzHXKg0wLj434QlIXd3zPG0co=", "requires": { "gulplog": "1.0.0", "has-gulplog": "0.1.0", "lodash": "4.17.4", "make-error-cause": "1.2.2", "through2": "2.0.3", - "uglify-js": "2.8.29", - "uglify-save-license": "0.4.1", + "uglify-js": "3.0.27", "vinyl-sourcemaps-apply": "0.2.1" }, "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, "through2": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", @@ -4028,13 +4032,12 @@ } }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "version": "3.0.27", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.27.tgz", + "integrity": "sha512-HD8CmxPXUI62v5tweiulMcP/apAtx1DXGcNZkhKQZyC+MTrTsoCBb8yPAwVrbvpgw3EpRU76bRe6axjIiCYcQg==", "requires": { - "source-map": "0.5.6", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "commander": "2.11.0", + "source-map": "0.5.6" } } } @@ -6903,11 +6906,6 @@ } } }, - "uglify-save-license": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/uglify-save-license/-/uglify-save-license-0.4.1.tgz", - "integrity": "sha1-lXJsF8xv0XHDYX479NjYKqjEzOE=" - }, "uglify-to-browserify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", diff --git a/client/package.json b/client/package.json index 2ad1de12a45..e703ae1fd20 100644 --- a/client/package.json +++ b/client/package.json @@ -33,7 +33,7 @@ "gulp-babel": "^7.0.0", "gulp-cached": "^1.1.1", "gulp-sourcemaps": "^2.5.1", - "gulp-uglify": "^2.1.2", + "gulp-uglify": "^3.0.0", "gulp-watch": "^4.3.11", "jshint": "^2.9.4", "webpack": "^3.5.4" diff --git a/static/maps/admin.toolshed.js.map b/static/maps/admin.toolshed.js.map index e65e077620e..fd57fc11d9c 100644 --- a/static/maps/admin.toolshed.js.map +++ b/static/maps/admin.toolshed.js.map @@ -1 +1 @@ -{"version":3,"sources":["admin.toolshed.js"],"names":["define","AdminToolshedRouter","initialize","routesHit","mod_categories_view","Backbone","mod_repository_view","mod_repoqueue_view","bind","mod_workflows_view","routes","Router","extend","this","history","on","trackPageview","","sheds","queue","workflows","status/r/:repositories","status","categories/s/:tool_shed","category/s/:tool_shed/c/:cateory_id","back","GalaxyAdminToolshedApp","window","known_views","trigger","replace","GalaxyApp","View","app_config","Galaxy","admintoolshedapp","adminRepoQueueView","admin_toolshed_router","adminShedListView","reDraw","RepoQueueView","adminShedCategoriesView","adminShedCategoryView","mod_shed_list_view","ShedListView","tool_shed","adminRepositoryView","repository_id","category_id","repositories","mod_repositories_view","Category","adminWorkflowsView","Workflows","pushState","adminRepoStatusView","split","mod_repo_status_view","RepoStatus","start"],"mappings":"YAAAA,SAAQ,8BACA,+BADA,iCAGA,+BAYAC,qCAVA,gCAYAC,+BACI,SAAKC,EACLC,EACAC,EAA2CC,EAAqBC,EAC3DC,EANoCC,GAS7CC,GAAAA,GAAQL,SAAAM,OAAAC,QAEJV,WAAA,WACAW,KAAAV,UAHI,EAKJE,SAAAS,QAAAC,GAAA,QAA+C,WAL3CF,KAAAV,aAAAU,MAMJA,KAAAL,KAA+C,QAN3CK,KAAAG,gBASJN,QAlByCO,GAAA,YAWzCC,MAA+C,YAUnDC,MAAA,QARIC,UAA+C,YAC/CC,yBAA+C,SAC/CC,OAA+C,SAC/CC,0BAA+C,aAC/CC,sCAA+C,eAUnDC,2CAAiB,cAAjBA,KAAM,WAUNC,KAAAA,UAAyBrB,EARjBsB,OAAOb,QAAQW,OAWnBG,KAAAA,SAAc,KAADC,SAAA,EAAuBC,SAAU,MAoEtD,QACIC,UAxEyB1B,SAAS2B,KAAKpB,QAW/BqB,YACIC,aAAAA,YAAOC,QAAiBC,SAAAA,aAAxB,eAAA,gBAIHlC,WAAA,WACJgC,OAPDC,iBAAAtB,KAQAA,KAAKwB,sBAAL,GAA8BpC,GAEtBiC,KAAAA,sBAAOC,GAAAA,cAAiBG,WAD5BJ,OAGKC,iBAAAC,mBACDF,OAAOC,iBAAiBG,mBAAxBC,SAGHF,OAAAA,iBAAyBD,mBAAoB,GAAA7B,GAAoBiC,gBAGjE3B,KAFDwB,sBAGKtB,GAAA,kBAAA,WACDmB,OAAOC,iBAAiBM,kBAC3BP,OAAAC,iBAAAG,kBAAAC,SAGGL,OAAOC,iBAAiBO,kBAAAA,GAAuBC,GAAAC,eAI/CV,KAAAA,sBAAOC,GAAAA,mBAAiBO,SAAwBG,GACnDX,OAAAC,iBAAAM,wBANLP,OAAAC,iBAAAM,wBAAAF,QAAAM,UAAAA,EAAAf,QAAA,MAAA,SAUQI,OAAOC,iBAAiBW,wBAAxB,GAAoDD,GAAqBf,cAAVe,UAAiCE,EAAAA,QAAeA,MAAAA,WAIlHlC,KAAAwB,sBAAAtB,GAAA,qBAAA,SAAA8B,EAAAG,GANLd,OAAAC,iBAAAO,sBAQKL,OAAAA,iBAAyBK,sBAAgBH,QAASU,UAAcJ,EAAAf,QAAA,MAAA,OAAAkB,YAAAA,IACjEd,OAGKC,iBAAAO,sBAAA,GAAAQ,GAAAC,UAAAN,UAAAA,EAAAf,QAAA,MAAA,OAAAkB,YAAAA,MAGRnC,KAPDwB,sBAAAtB,GAAA,mBAAA,SAAA8B,EAAAE,GAQKV,OAAAA,iBAAyBS,oBACtBZ,OAAOC,iBAAiBiB,oBAAoBb,QAAAM,UAAAA,EAAAf,QAAA,MAAA,OAAAiB,cAAAA,IAI5Cb,OAAOC,iBAAiBiB,oBAAqB,GAAI3C,GAAmB4C,aAApER,UAAAA,EAAAf,QAAA,MAAA,OAAAiB,cAAAA,MAbRlC,KAAKwB,sBAAsBtB,GAAG,eAAgB,SAASkC,GAiBvD5C,OAASS,iBAAewC,oBAC3BpB,OAAAC,iBAAAoB,oBAAAhB,QAAAU,aAAAA,EAAAO,MAAA,OAGEtB,OAAAC,iBAAAoB,oBAAA,GAAAE,GAAAC,YAAAT,aAAAA,EAAAO,MAAA,SA3HX3C,KAAAwB,sBAAAtB,GAAA,kBAAA,WA+GoBmB,OAAOC,iBAAiBiB,mBACxBlB,OAAOC,iBAAiBiB,mBAAmBb,SAG3CL,OAAOC,iBAAiBiB,mBAAqB,GAAI3C,GAAmB4C,YAI5EhD,SAASS,QAAQ6C,OAAOL,WAAW","file":"../scripts/admin.toolshed.js","sourcesContent":["define([\"mvc/toolshed/shed-list-view\",\n \"mvc/toolshed/categories-view\",\n \"mvc/toolshed/repositories-view\",\n \"mvc/toolshed/repository-view\",\n \"mvc/toolshed/repository-queue-view\",\n \"mvc/toolshed/repo-status-view\",\n \"mvc/toolshed/workflows-view\"],\n function(mod_shed_list_view,\n mod_categories_view,\n mod_repositories_view,\n mod_repository_view,\n mod_repoqueue_view,\n mod_repo_status_view,\n mod_workflows_view) {\n\n var AdminToolshedRouter = Backbone.Router.extend({\n\n initialize: function() {\n this.routesHit = 0;\n // keep count of number of routes handled by the application\n Backbone.history.on( 'route', function() { this.routesHit++; }, this );\n this.bind( 'route', this.trackPageview );\n },\n\n routes: {\n \"\" : \"toolsheds\",\n \"sheds\" : \"toolsheds\",\n \"queue\" : \"queue\",\n \"workflows\" : \"workflows\",\n \"status/r/:repositories\" : \"status\",\n \"status\" : \"status\",\n \"categories/s/:tool_shed\" : \"categories\",\n \"category/s/:tool_shed/c/:cateory_id\" : \"repositories\",\n \"repository/s/:tool_shed/r/:repository_id\" : \"repository\",\n },\n\n /**\n * If more than one route has been hit the user did not land on current\n * page directly so we can go back safely. Otherwise go to the home page.\n * Use replaceState if available so the navigation doesn't create an\n * extra history entry\n */\n back: function() {\n if( this.routesHit > 1 ) {\n window.history.back();\n } else {\n this.navigate( '#', { trigger:true, replace:true } );\n }\n }\n\n });\n\n var GalaxyAdminToolshedApp = Backbone.View.extend({\n\n app_config: {\n known_views: ['toolsheds', 'queue', 'status', 'categories', 'repositories', 'repoository']\n },\n\n initialize: function() {\n Galaxy.admintoolshedapp = this;\n this.admin_toolshed_router = new AdminToolshedRouter();\n\n this.admin_toolshed_router.on('route:queue', function() {\n if (Galaxy.admintoolshedapp.adminRepoQueueView) {\n Galaxy.admintoolshedapp.adminRepoQueueView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminRepoQueueView = new mod_repoqueue_view.RepoQueueView();\n }\n });\n this.admin_toolshed_router.on('route:toolsheds', function() {\n if (Galaxy.admintoolshedapp.adminShedListView) {\n Galaxy.admintoolshedapp.adminShedListView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminShedListView = new mod_shed_list_view.ShedListView();\n }\n });\n this.admin_toolshed_router.on('route:categories', function(tool_shed) {\n if (Galaxy.admintoolshedapp.adminShedCategoriesView) {\n Galaxy.admintoolshedapp.adminShedCategoriesView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f')});\n }\n else {\n Galaxy.admintoolshedapp.adminShedCategoriesView = new mod_categories_view.CategoryView({tool_shed: tool_shed.replace(/\\//g, '%2f')});\n }\n });\n this.admin_toolshed_router.on('route:repositories', function(tool_shed, category_id) {\n if (Galaxy.admintoolshedapp.adminShedCategoryView) {\n Galaxy.admintoolshedapp.adminShedCategoryView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f'), category_id: category_id});\n }\n else {\n Galaxy.admintoolshedapp.adminShedCategoryView = new mod_repositories_view.Category({tool_shed: tool_shed.replace(/\\//g, '%2f'), category_id: category_id});\n }\n });\n this.admin_toolshed_router.on('route:repository', function(tool_shed, repository_id) {\n if (Galaxy.admintoolshedapp.adminRepositoryView) {\n Galaxy.admintoolshedapp.adminRepositoryView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f'), repository_id: repository_id});\n }\n else {\n Galaxy.admintoolshedapp.adminRepositoryView = new mod_repository_view.RepoDetails({tool_shed: tool_shed.replace(/\\//g, '%2f'), repository_id: repository_id});\n }\n });\n this.admin_toolshed_router.on('route:status', function(repositories) {\n if (Galaxy.admintoolshedapp.adminRepoStatusView) {\n Galaxy.admintoolshedapp.adminRepoStatusView.reDraw({repositories: repositories.split('|')});\n }\n else {\n Galaxy.admintoolshedapp.adminRepoStatusView = new mod_repo_status_view.RepoStatus({repositories: repositories.split('|')});\n }\n });\n this.admin_toolshed_router.on('route:workflows', function() {\n if (Galaxy.admintoolshedapp.adminWorkflowsView) {\n Galaxy.admintoolshedapp.adminWorkflowsView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminWorkflowsView = new mod_workflows_view.Workflows();\n }\n });\n\n Backbone.history.start({pushState: false});\n },\n });\n\n return {\n GalaxyApp: GalaxyAdminToolshedApp\n };\n\n});"]} \ No newline at end of file +{"version":3,"sources":["admin.toolshed.js"],"names":["define","AdminToolshedRouter","initialize","routesHit","mod_categories_view","Backbone","mod_repository_view","mod_repoqueue_view","bind","mod_workflows_view","routes","Router","extend","this","history","on","trackPageview","","sheds","queue","workflows","status/r/:repositories","status","categories/s/:tool_shed","category/s/:tool_shed/c/:cateory_id","back","GalaxyAdminToolshedApp","window","known_views","trigger","replace","GalaxyApp","View","app_config","Galaxy","admintoolshedapp","adminRepoQueueView","admin_toolshed_router","adminShedListView","reDraw","RepoQueueView","adminShedCategoriesView","adminShedCategoryView","mod_shed_list_view","ShedListView","tool_shed","adminRepositoryView","repository_id","category_id","repositories","mod_repositories_view","Category","adminWorkflowsView","Workflows","pushState","adminRepoStatusView","split","mod_repo_status_view","RepoStatus","start"],"mappings":"aAAAA,QAAQ,8BACA,+BADA,iCAGA,+BAYAC,qCAVA,gCAYAC,+BACI,SAAKC,EACLC,EACAC,EAA2CC,EAAqBC,EAC3DC,EANoCC,GAS7CC,IAAAA,EAAQL,SAAAM,OAAAC,QAEJV,WAAA,WACAW,KAAAV,UAHI,EAKJE,SAAAS,QAAAC,GAAA,QAA+C,WAL3CF,KAAAV,aAAAU,MAMJA,KAAAL,KAA+C,QAN3CK,KAAAG,gBASJN,QAlByCO,GAAA,YAWzCC,MAA+C,YAUnDC,MAAA,QARIC,UAA+C,YAC/CC,yBAA+C,SAC/CC,OAA+C,SAC/CC,0BAA+C,aAC/CC,sCAA+C,eAUnDC,2CAAiB,cAAjBA,KAAM,WAUNC,KAAAA,UAAyBrB,EARjBsB,OAAOb,QAAQW,OAWnBG,KAAAA,SAAc,KAADC,SAAA,EAAuBC,SAAU,OAoEtD,OACIC,UAxEyB1B,SAAS2B,KAAKpB,QAW/BqB,YACIC,aAAAA,YAAOC,QAAiBC,SAAAA,aAAxB,eAAA,gBAIHlC,WAAA,WACJgC,OAPDC,iBAAAtB,KAQAA,KAAKwB,sBAAL,IAA8BpC,EAEtBiC,KAAAA,sBAAOC,GAAAA,cAAiBG,WAD5BJ,OAGKC,iBAAAC,mBACDF,OAAOC,iBAAiBG,mBAAxBC,SAGHF,OAAAA,iBAAyBD,mBAAoB,IAAA7B,EAAoBiC,gBAGjE3B,KAFDwB,sBAGKtB,GAAA,kBAAA,WACDmB,OAAOC,iBAAiBM,kBAC3BP,OAAAC,iBAAAG,kBAAAC,SAGGL,OAAOC,iBAAiBO,kBAAAA,IAAuBC,EAAAC,eAI/CV,KAAAA,sBAAOC,GAAAA,mBAAiBO,SAAwBG,GACnDX,OAAAC,iBAAAM,wBANLP,OAAAC,iBAAAM,wBAAAF,QAAAM,UAAAA,EAAAf,QAAA,MAAA,SAUQI,OAAOC,iBAAiBW,wBAAxB,IAAoDD,EAAqBf,cAAVe,UAAiCE,EAAAA,QAAeA,MAAAA,WAIlHlC,KAAAwB,sBAAAtB,GAAA,qBAAA,SAAA8B,EAAAG,GANLd,OAAAC,iBAAAO,sBAQKL,OAAAA,iBAAyBK,sBAAgBH,QAASU,UAAcJ,EAAAf,QAAA,MAAA,OAAAkB,YAAAA,IACjEd,OAGKC,iBAAAO,sBAAA,IAAAQ,EAAAC,UAAAN,UAAAA,EAAAf,QAAA,MAAA,OAAAkB,YAAAA,MAGRnC,KAPDwB,sBAAAtB,GAAA,mBAAA,SAAA8B,EAAAE,GAQKV,OAAAA,iBAAyBS,oBACtBZ,OAAOC,iBAAiBiB,oBAAoBb,QAAAM,UAAAA,EAAAf,QAAA,MAAA,OAAAiB,cAAAA,IAI5Cb,OAAOC,iBAAiBiB,oBAAqB,IAAI3C,EAAmB4C,aAApER,UAAAA,EAAAf,QAAA,MAAA,OAAAiB,cAAAA,MAbRlC,KAAKwB,sBAAsBtB,GAAG,eAAgB,SAASkC,GAiBvD5C,OAASS,iBAAewC,oBAC3BpB,OAAAC,iBAAAoB,oBAAAhB,QAAAU,aAAAA,EAAAO,MAAA,OAGEtB,OAAAC,iBAAAoB,oBAAA,IAAAE,EAAAC,YAAAT,aAAAA,EAAAO,MAAA,SA3HX3C,KAAAwB,sBAAAtB,GAAA,kBAAA,WA+GoBmB,OAAOC,iBAAiBiB,mBACxBlB,OAAOC,iBAAiBiB,mBAAmBb,SAG3CL,OAAOC,iBAAiBiB,mBAAqB,IAAI3C,EAAmB4C,YAI5EhD,SAASS,QAAQ6C,OAAOL,WAAW","file":"../scripts/admin.toolshed.js","sourcesContent":["define([\"mvc/toolshed/shed-list-view\",\n \"mvc/toolshed/categories-view\",\n \"mvc/toolshed/repositories-view\",\n \"mvc/toolshed/repository-view\",\n \"mvc/toolshed/repository-queue-view\",\n \"mvc/toolshed/repo-status-view\",\n \"mvc/toolshed/workflows-view\"],\n function(mod_shed_list_view,\n mod_categories_view,\n mod_repositories_view,\n mod_repository_view,\n mod_repoqueue_view,\n mod_repo_status_view,\n mod_workflows_view) {\n\n var AdminToolshedRouter = Backbone.Router.extend({\n\n initialize: function() {\n this.routesHit = 0;\n // keep count of number of routes handled by the application\n Backbone.history.on( 'route', function() { this.routesHit++; }, this );\n this.bind( 'route', this.trackPageview );\n },\n\n routes: {\n \"\" : \"toolsheds\",\n \"sheds\" : \"toolsheds\",\n \"queue\" : \"queue\",\n \"workflows\" : \"workflows\",\n \"status/r/:repositories\" : \"status\",\n \"status\" : \"status\",\n \"categories/s/:tool_shed\" : \"categories\",\n \"category/s/:tool_shed/c/:cateory_id\" : \"repositories\",\n \"repository/s/:tool_shed/r/:repository_id\" : \"repository\",\n },\n\n /**\n * If more than one route has been hit the user did not land on current\n * page directly so we can go back safely. Otherwise go to the home page.\n * Use replaceState if available so the navigation doesn't create an\n * extra history entry\n */\n back: function() {\n if( this.routesHit > 1 ) {\n window.history.back();\n } else {\n this.navigate( '#', { trigger:true, replace:true } );\n }\n }\n\n });\n\n var GalaxyAdminToolshedApp = Backbone.View.extend({\n\n app_config: {\n known_views: ['toolsheds', 'queue', 'status', 'categories', 'repositories', 'repoository']\n },\n\n initialize: function() {\n Galaxy.admintoolshedapp = this;\n this.admin_toolshed_router = new AdminToolshedRouter();\n\n this.admin_toolshed_router.on('route:queue', function() {\n if (Galaxy.admintoolshedapp.adminRepoQueueView) {\n Galaxy.admintoolshedapp.adminRepoQueueView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminRepoQueueView = new mod_repoqueue_view.RepoQueueView();\n }\n });\n this.admin_toolshed_router.on('route:toolsheds', function() {\n if (Galaxy.admintoolshedapp.adminShedListView) {\n Galaxy.admintoolshedapp.adminShedListView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminShedListView = new mod_shed_list_view.ShedListView();\n }\n });\n this.admin_toolshed_router.on('route:categories', function(tool_shed) {\n if (Galaxy.admintoolshedapp.adminShedCategoriesView) {\n Galaxy.admintoolshedapp.adminShedCategoriesView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f')});\n }\n else {\n Galaxy.admintoolshedapp.adminShedCategoriesView = new mod_categories_view.CategoryView({tool_shed: tool_shed.replace(/\\//g, '%2f')});\n }\n });\n this.admin_toolshed_router.on('route:repositories', function(tool_shed, category_id) {\n if (Galaxy.admintoolshedapp.adminShedCategoryView) {\n Galaxy.admintoolshedapp.adminShedCategoryView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f'), category_id: category_id});\n }\n else {\n Galaxy.admintoolshedapp.adminShedCategoryView = new mod_repositories_view.Category({tool_shed: tool_shed.replace(/\\//g, '%2f'), category_id: category_id});\n }\n });\n this.admin_toolshed_router.on('route:repository', function(tool_shed, repository_id) {\n if (Galaxy.admintoolshedapp.adminRepositoryView) {\n Galaxy.admintoolshedapp.adminRepositoryView.reDraw({tool_shed: tool_shed.replace(/\\//g, '%2f'), repository_id: repository_id});\n }\n else {\n Galaxy.admintoolshedapp.adminRepositoryView = new mod_repository_view.RepoDetails({tool_shed: tool_shed.replace(/\\//g, '%2f'), repository_id: repository_id});\n }\n });\n this.admin_toolshed_router.on('route:status', function(repositories) {\n if (Galaxy.admintoolshedapp.adminRepoStatusView) {\n Galaxy.admintoolshedapp.adminRepoStatusView.reDraw({repositories: repositories.split('|')});\n }\n else {\n Galaxy.admintoolshedapp.adminRepoStatusView = new mod_repo_status_view.RepoStatus({repositories: repositories.split('|')});\n }\n });\n this.admin_toolshed_router.on('route:workflows', function() {\n if (Galaxy.admintoolshedapp.adminWorkflowsView) {\n Galaxy.admintoolshedapp.adminWorkflowsView.reDraw();\n }\n else {\n Galaxy.admintoolshedapp.adminWorkflowsView = new mod_workflows_view.Workflows();\n }\n });\n\n Backbone.history.start({pushState: false});\n },\n });\n\n return {\n GalaxyApp: GalaxyAdminToolshedApp\n };\n\n});"]} \ No newline at end of file diff --git a/static/maps/galaxy.interactive_environments.js.map b/static/maps/galaxy.interactive_environments.js.map index bb36e05c0d1..bd849a59900 100644 --- a/static/maps/galaxy.interactive_environments.js.map +++ b/static/maps/galaxy.interactive_environments.js.map @@ -1 +1 @@ -{"version":3,"sources":["galaxy.interactive_environments.js"],"names":["append_notebook","url","clear_main_area","$","children","remove","display_spinner","galaxy_root","not_ready","timeout","timeout_values","timeout_time_max","timeout_time_step","toastr","closeButton","tapToDismiss","time","console","log","count","window","setTimeout","ajax_timeout_max","success_callback","ajax_timeout_step","xhrFields","withCredentials","type","dataType","success","ajax_timeout","data","clear","error","textStatus","jqXHR","errorThrown","test_ie_availability","clearInterval","interval","setInterval","request_count","jqxhr","status","timeOut"],"mappings":"YAIA,SAASA,iBAAgBC,GACrBC,kBADJC,EAAA,SAASH,OAAAA,uHAAoBC,EAAA,eAM7B,QAASC,mBAATC,EAAA,YAASD,SACLC,EAAE,SAAAC,WAAFC,SAIJ,QAASC,mBAATH,EAASG,SAAAA,OAAT,0BAA0BC,YAAA,wGAI1B,QAASC,WAAUC,EAASC,EAAgBC,EAAkBC,GAAlCF,GAA5BA,EAAmBD,QACZC,kBACCJ,OAAAA,KACAO,gGAIHC,aAAA,EAAAC,cAAA,KAGGL,EAAAA,QACHA,EAAAM,KAAAL,IACDM,EAAYD,MAAAJ,GAEfK,QAAAC,IAAA,qBAAAR,EAAAS,MAAA,aAAAT,EAAAM,KAAA,IAAA,KADGI,OAAOC,WAAWZ,EAASC,EAAeM,MAQ1C,QAAIM,iBAAAA,EAAmBC,GACvB,GAAIC,GAAAA,IAGAZ,GAAAA,KAAJ,IAAAO,MAAA,GAGQlB,EAAKA,QAALA,KACAwB,EAAAA,MACIC,IAAAA,EADOD,WAGXE,iBALG,GAOHC,KAAAA,MACAC,QAASC,EACLF,SAAGG,OACCd,QAAAA,SAAQC,GACRhB,GAAAA,GACAW,QAAOmB,IAAP,gDACAT,kBAJJV,OAKSkB,QACLvB,KACC,GAAAuB,EACD7B,UAAAA,EAAAA,EAlBZO,KACO,MAmBKI,kBAKHA,OAAAmB,QAxBFnB,OAAAoB,MA0BI,gHACAC,SACIJ,aAAeR,EAAAA,cAAiB,MAItCW,MALD,SAKKE,EAAAD,EAAAE,GACDlC,WAAAA,GACAW,EAtCOG,MAuCPH,GAtCO,KA4CdL,UAAAC,EAAAC,EA1CLD,KACO,OADXP,kBA6COmB,OAAWZ,QACrBI,OAAAoB,MATuB,uIAaxB,SAXyBnB,aAAe,EAAMC,cAAgB,QAkB9DK,QAASiB,WAAAA,EAAqBpC,EAAKsB,MAYnBN,QAAAA,sBAAYhB,EAAAsB,GACZe,GAAAA,GAAAA,CACAf,mBACHgB,SAXEC,YAAA,WAYHP,EAAAA,MACIQ,IAAAA,EACAxB,WACAS,iBAAGe,GAECvC,KAAAA,MACAW,QAAAA,IAKHgB,QAAA,WACJZ,QAAAC,IAAA,8BAxBLoB,cAAAC,UADJhB,KAaQU,MAAO,SAASS,EAAOC,EAAQV,GAC3BQ,IACAxB,QAAQC,IAAI,wBAA0BuB,GACnCA,EAAgB,KACfH,cAAcC,UACdrC,kBACAW,OAAOoB,MACH,sDACA,SACCnB,aAAe,EAAM8B,QAAW,IAAO7B,cAAgB,SAKzE","file":"../scripts/galaxy.interactive_environments.js","sourcesContent":["/**\n * Internal function to remove content from the main area and add the notebook.\n * Not idempotent\n */\nfunction append_notebook(url){\n clear_main_area();\n $('#main').append(''\n );\n}\n\nfunction clear_main_area(){\n $('#spinner').remove();\n $('#main').children().remove();\n}\n\nfunction display_spinner(){\n $('#main').append('');\n}\n\nfunction not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step) {\n if(timeout_values.count == 0){\n display_spinner();\n toastr.info(\n \"Galaxy is launching a container in which to run this interactive environment. Please wait...\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n timeout_values.count++;\n if(timeout_values.time < timeout_time_max){\n timeout_values.time += timeout_time_step;\n }\n console.log(\"Readiness request \" + timeout_values.count + \" sleeping \" + timeout_values.time / 1000 + \"s\");\n window.setTimeout(timeout, timeout_values.time)\n}\n\n/**\n * Check a URL for a boolean true/false and call a callback when done.\n */\nfunction load_when_ready(url, success_callback){\n var ajax_timeout = 500;\n var ajax_timeout_max = 10000;\n var ajax_timeout_step = 250;\n var timeout_values = { time: 1000, count: 0 };\n var timeout_time_max = 15000;\n var timeout_time_step = 1000;\n var timeout = function(){\n $.ajax({\n url: url,\n xhrFields: {\n withCredentials: true\n },\n type: \"GET\",\n timeout: ajax_timeout,\n dataType: \"json\",\n success: function(data){\n if(data == true){\n console.log(\"Galaxy reports IE container ready, returning\");\n clear_main_area();\n toastr.clear();\n success_callback();\n }else if(data == false){\n not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step);\n }else{\n clear_main_area();\n toastr.clear();\n toastr.error(\n \"Galaxy failed to launch a container in which to run this interactive environment, contact your administrator.\",\n \"Error\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n },\n error: function(jqXHR, textStatus, errorThrown){\n if(textStatus == \"timeout\"){\n if(ajax_timeout < ajax_timeout_max){\n ajax_timeout += ajax_timeout_step;\n }\n not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step);\n }else{\n clear_main_area();\n toastr.clear();\n toastr.error(\n \"Galaxy encountered an error while attempting to determine the readiness of this interactive environment, contact your administrator.\",\n \"Error\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n }\n });\n }\n window.setTimeout(timeout, timeout_values.time);\n}\n\n\n\n/**\n * Test availability of a URL, and call a callback when done.\n * http://stackoverflow.com/q/25390206/347368\n * @param {String} url: URL to test availability of. Must return a 200 (302->200 is OK).\n * @param {String} callback: function to call once successfully connected.\n *\n */\nfunction test_ie_availability(url, success_callback){\n var request_count = 0;\n display_spinner();\n interval = setInterval(function(){\n $.ajax({\n url: url,\n xhrFields: {\n withCredentials: true\n },\n type: \"GET\",\n timeout: 500,\n success: function(){\n console.log(\"Connected to IE, returning\");\n clearInterval(interval);\n success_callback();\n },\n error: function(jqxhr, status, error){\n request_count++;\n console.log(\"Availability request \" + request_count);\n if(request_count > 30){\n clearInterval(interval);\n clear_main_area();\n toastr.error(\n \"Could not connect to IE, contact your administrator\",\n \"Error\",\n {'closeButton': true, 'timeOut': 20000, 'tapToDismiss': false}\n );\n }\n }\n });\n }, 1000);\n}\n"]} \ No newline at end of file +{"version":3,"sources":["galaxy.interactive_environments.js"],"names":["append_notebook","url","clear_main_area","$","children","remove","display_spinner","galaxy_root","not_ready","timeout","timeout_values","timeout_time_max","timeout_time_step","toastr","closeButton","tapToDismiss","time","console","log","count","window","setTimeout","ajax_timeout_max","success_callback","ajax_timeout_step","test_ie_availability","xhrFields","withCredentials","type","dataType","success","ajax_timeout","data","clear","error","textStatus","jqXHR","errorThrown","clearInterval","interval","setInterval","request_count","jqxhr","status","timeOut"],"mappings":"aAIA,SAASA,gBAAgBC,GACrBC,kBADJC,EAAA,SAASH,OAAAA,uHAAoBC,EAAA,eAM7B,SAASC,kBAATC,EAAA,YAASD,SACLC,EAAE,SAAAC,WAAFC,SAIJ,SAASC,kBAATH,EAASG,SAAAA,OAAT,0BAA0BC,YAAA,wGAI1B,SAASC,UAAUC,EAASC,EAAgBC,EAAkBC,GAAlCF,GAA5BA,EAAmBD,QACZC,kBACCJ,OAAAA,KACAO,gGAIHC,aAAA,EAAAC,cAAA,KAGGL,EAAAA,QACHA,EAAAM,KAAAL,IACDM,EAAYD,MAAAJ,GAEfK,QAAAC,IAAA,qBAAAR,EAAAS,MAAA,aAAAT,EAAAM,KAAA,IAAA,KADGI,OAAOC,WAAWZ,EAASC,EAAeM,MAQ1C,SAAIM,gBAAAA,EAAmBC,GACvB,IAAIC,EAAAA,IAGAZ,GAAAA,KAAJ,IAAAO,MAAA,GA0DJC,OAASK,WAvDQxB,SAALA,IACAyB,EAAAA,MACIC,IAAAA,EADOD,WAGXE,iBALG,GAOHC,KAAAA,MACAC,QAASC,EACLF,SAAGG,OACCf,QAAAA,SAAQC,GACRhB,GAAAA,GACAW,QAAOoB,IAAP,gDACAV,kBAJJV,OAKSmB,QACLxB,KACC,GAAAwB,EACD9B,UAAAA,EAAAA,EAlBZO,KACO,MAmBKI,kBAKHA,OAAAoB,QAxBFpB,OAAAqB,MA0BI,gHACAC,SACIJ,aAAeT,EAAAA,cAAiB,MAItCY,MALD,SAKKE,EAAAD,EAAAE,GACDnC,WAAAA,GACAW,EAtCOG,MAuCPH,GAtCO,KA4CdL,UAAAC,EAAAC,EA1CLD,KACO,OADXP,kBA6COmB,OAAWZ,QACrBI,OAAAqB,MATuB,uIAaxB,SAXyBpB,aAAe,EAAMC,cAAgB,SAkBhCd,EAAKsB,MAYnBN,SAAAA,qBAAYhB,EAAAsB,GACZe,IAAAA,EAAAA,EACAf,kBACHgB,SAXEC,YAAA,WAYHN,EAAAA,MACIO,IAAAA,EACAxB,WACAU,iBAAGc,GAECvC,KAAAA,MACAW,QAAAA,IAKHiB,QAAA,WACJb,QAAAC,IAAA,8BAxBLoB,cAAAC,UADJhB,KAaQW,MAAO,SAASQ,EAAOC,EAAQT,GAC3BO,IACAxB,QAAQC,IAAI,wBAA0BuB,GACnCA,EAAgB,KACfH,cAAcC,UACdrC,kBACAW,OAAOqB,MACH,sDACA,SACCpB,aAAe,EAAM8B,QAAW,IAAO7B,cAAgB,SAKzE","file":"../scripts/galaxy.interactive_environments.js","sourcesContent":["/**\n * Internal function to remove content from the main area and add the notebook.\n * Not idempotent\n */\nfunction append_notebook(url){\n clear_main_area();\n $('#main').append(''\n );\n}\n\nfunction clear_main_area(){\n $('#spinner').remove();\n $('#main').children().remove();\n}\n\nfunction display_spinner(){\n $('#main').append('');\n}\n\nfunction not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step) {\n if(timeout_values.count == 0){\n display_spinner();\n toastr.info(\n \"Galaxy is launching a container in which to run this interactive environment. Please wait...\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n timeout_values.count++;\n if(timeout_values.time < timeout_time_max){\n timeout_values.time += timeout_time_step;\n }\n console.log(\"Readiness request \" + timeout_values.count + \" sleeping \" + timeout_values.time / 1000 + \"s\");\n window.setTimeout(timeout, timeout_values.time)\n}\n\n/**\n * Check a URL for a boolean true/false and call a callback when done.\n */\nfunction load_when_ready(url, success_callback){\n var ajax_timeout = 500;\n var ajax_timeout_max = 10000;\n var ajax_timeout_step = 250;\n var timeout_values = { time: 1000, count: 0 };\n var timeout_time_max = 15000;\n var timeout_time_step = 1000;\n var timeout = function(){\n $.ajax({\n url: url,\n xhrFields: {\n withCredentials: true\n },\n type: \"GET\",\n timeout: ajax_timeout,\n dataType: \"json\",\n success: function(data){\n if(data == true){\n console.log(\"Galaxy reports IE container ready, returning\");\n clear_main_area();\n toastr.clear();\n success_callback();\n }else if(data == false){\n not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step);\n }else{\n clear_main_area();\n toastr.clear();\n toastr.error(\n \"Galaxy failed to launch a container in which to run this interactive environment, contact your administrator.\",\n \"Error\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n },\n error: function(jqXHR, textStatus, errorThrown){\n if(textStatus == \"timeout\"){\n if(ajax_timeout < ajax_timeout_max){\n ajax_timeout += ajax_timeout_step;\n }\n not_ready(timeout, timeout_values, timeout_time_max, timeout_time_step);\n }else{\n clear_main_area();\n toastr.clear();\n toastr.error(\n \"Galaxy encountered an error while attempting to determine the readiness of this interactive environment, contact your administrator.\",\n \"Error\",\n {'closeButton': true, 'tapToDismiss': false}\n );\n }\n }\n });\n }\n window.setTimeout(timeout, timeout_values.time);\n}\n\n\n\n/**\n * Test availability of a URL, and call a callback when done.\n * http://stackoverflow.com/q/25390206/347368\n * @param {String} url: URL to test availability of. Must return a 200 (302->200 is OK).\n * @param {String} callback: function to call once successfully connected.\n *\n */\nfunction test_ie_availability(url, success_callback){\n var request_count = 0;\n display_spinner();\n interval = setInterval(function(){\n $.ajax({\n url: url,\n xhrFields: {\n withCredentials: true\n },\n type: \"GET\",\n timeout: 500,\n success: function(){\n console.log(\"Connected to IE, returning\");\n clearInterval(interval);\n success_callback();\n },\n error: function(jqxhr, status, error){\n request_count++;\n console.log(\"Availability request \" + request_count);\n if(request_count > 30){\n clearInterval(interval);\n clear_main_area();\n toastr.error(\n \"Could not connect to IE, contact your administrator\",\n \"Error\",\n {'closeButton': true, 'timeOut': 20000, 'tapToDismiss': false}\n );\n }\n }\n });\n }, 1000);\n}\n"]} \ No newline at end of file diff --git a/static/maps/galaxy.js.map b/static/maps/galaxy.js.map index 4413d256881..bd0126171e5 100644 --- a/static/maps/galaxy.js.map +++ b/static/maps/galaxy.js.map @@ -1 +1 @@ -{"version":3,"sources":["galaxy.js"],"names":["define","_","Backbone","BASE_MVC","userModel","metricsLogger","addLogging","localize","GalaxyApp","bootstrapped","this","_init","options","console","NAMESPACE_KEY","DEBUGGING_KEY","localDebugging","prototype","getItem","storageErr","extend","self","patchExisting","_processOptions","logger","root","_initLogger","session_csrf_token","config","window","Galaxy","_initLocale","loggerOptions","debug","user","_setUpListeners","trigger","_initUser","defaultOptions","defaults","hasOwnProperty","k","_initConfig","_patchGalaxy","patchWith","consoleLevel","consoleLogger","MetricsLogger","ALL","consoleNamespaceWhitelist","localStorage","split","emit","map","i","data","LoggableMixin","slice","call","arguments","_l","userJSON","$","document","bind","lastAjax","ev","xhr","url","location","JSON","parse","err","href","setting","undefined","debuggingNamespaces","removeItem","log","namespaces","newSettings","csv","userEmail","get"],"mappings":"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","file":"../scripts/galaxy.js","sourcesContent":["define([\n 'libs/underscore',\n 'libs/backbone',\n 'mvc/base-mvc',\n 'mvc/user/user-model',\n 'utils/metrics-logger',\n 'utils/add-logging',\n 'utils/localization'\n], function( _, Backbone, BASE_MVC, userModel, metricsLogger, addLogging, localize ){\n\n// TODO: move into a singleton pattern and have dependents import Galaxy\n// ============================================================================\n/** Base galaxy client-side application.\n * Iniitializes:\n * logger : the logger/metrics-logger\n * localize : the string localizer\n * config : the current configuration (any k/v in\n * galaxy.ini available from the configuration API)\n * user : the current user (as a mvc/user/user-model)\n */\nfunction GalaxyApp( options, bootstrapped ){\n var self = this;\n return self._init( options || {}, bootstrapped || {} );\n}\n\n// add logging shortcuts for this object\naddLogging( GalaxyApp, 'GalaxyApp' );\n\n// a debug flag can be set via local storage and made available during script/page loading\nvar DEBUGGING_KEY = 'galaxy:debug',\n NAMESPACE_KEY = DEBUGGING_KEY + ':namespaces',\n localDebugging = false;\ntry {\n localDebugging = localStorage.getItem( DEBUGGING_KEY ) == 'true';\n} catch( storageErr ){\n console.log( localize( 'localStorage not available for debug flag retrieval' ) );\n}\n\n/** initalize options and sub-components */\nGalaxyApp.prototype._init = function __init( options, bootstrapped ){\n var self = this;\n _.extend( self, Backbone.Events );\n if( localDebugging ){\n self.logger = console;\n console.debug( 'debugging galaxy:', 'options:', options, 'bootstrapped:', bootstrapped );\n }\n\n self._processOptions( options );\n\n // add root and url parameters\n self.root = options.root || '/';\n self.params = options.params || {};\n self.session_csrf_token = options.session_csrf_token || null;\n\n self._initConfig( options.config || {} );\n self._patchGalaxy( window.Galaxy );\n\n self._initLogger( self.options.loggerOptions || {} );\n // at this point, either logging or not and namespaces are enabled - chat it up\n self.debug( 'GalaxyApp.options: ', self.options );\n self.debug( 'GalaxyApp.config: ', self.config );\n self.debug( 'GalaxyApp.logger: ', self.logger );\n\n self._initLocale();\n self.debug( 'GalaxyApp.localize: ', self.localize );\n\n self.config = options.config || {};\n self.debug( 'GalaxyApp.config: ', self.config );\n\n self._initUser( options.user || {} );\n self.debug( 'GalaxyApp.user: ', self.user );\n\n self._setUpListeners();\n self.trigger( 'ready', self );\n\n return self;\n};\n\n/** default options */\nGalaxyApp.prototype.defaultOptions = {\n /** monkey patch attributes from existing window.Galaxy object? */\n patchExisting : true,\n /** root url of this app */\n root : '/',\n session_csrf_token : null,\n};\n\n/** filter to options present in defaultOptions (and default to them) */\nGalaxyApp.prototype._processOptions = function _processOptions( options ){\n var self = this,\n defaults = self.defaultOptions;\n\n self.options = {};\n for( var k in defaults ){\n if( defaults.hasOwnProperty( k ) ){\n self.options[ k ] = ( options.hasOwnProperty( k ) )?( options[ k ] ):( defaults[ k ] );\n }\n }\n return self;\n};\n\n/** parse the config and any extra info derived from it */\nGalaxyApp.prototype._initConfig = function _initConfig( config ){\n var self = this;\n self.config = config;\n\n // give precendence to localdebugging for this setting\n self.config.debug = localDebugging || self.config.debug;\n\n return self;\n};\n\n/** add an option from options if the key matches an option in defaultOptions */\nGalaxyApp.prototype._patchGalaxy = function _patchGalaxy( patchWith ){\n var self = this;\n // in case req or plain script tag order has created a prev. version of the Galaxy obj...\n if( self.options.patchExisting && patchWith ){\n // self.debug( 'found existing Galaxy object:', patchWith );\n // ...(for now) monkey patch any added attributes that the previous Galaxy may have had\n //TODO: move those attributes to more formal assignment in GalaxyApp\n for( var k in patchWith ){\n if( patchWith.hasOwnProperty( k ) ){\n // self.debug( '\\t patching in ' + k + ' to Galaxy:', self[ k ] );\n self[ k ] = patchWith[ k ];\n }\n }\n }\n};\n\n/** set up the metrics logger (utils/metrics-logger) and pass loggerOptions */\nGalaxyApp.prototype._initLogger = function _initLogger( loggerOptions ){\n var self = this;\n\n // default to console logging at the debug level if the debug flag is set\n if( self.config.debug ){\n loggerOptions.consoleLogger = loggerOptions.consoleLogger || console;\n loggerOptions.consoleLevel = loggerOptions.consoleLevel || metricsLogger.MetricsLogger.ALL;\n // load any logging namespaces from localStorage if we can\n try {\n loggerOptions.consoleNamespaceWhitelist = localStorage.getItem( NAMESPACE_KEY ).split( ',' );\n } catch( storageErr ){}\n }\n\n self.logger = new metricsLogger.MetricsLogger( loggerOptions );\n self.emit = {};\n [ 'log', 'debug', 'info', 'warn', 'error', 'metric' ].map(function( i ) {\n self.emit[ i ] = function( data ){\n self.logger.emit( i, arguments[ 0 ], Array.prototype.slice.call( arguments, 1 ) );\n };\n });\n\n if( self.config.debug ){\n // add this logger to mvc's loggable mixin so that all models can use the logger\n BASE_MVC.LoggableMixin.logger = self.logger;\n }\n return self;\n};\n\n/** add the localize fn to this object and the window namespace (as '_l') */\nGalaxyApp.prototype._initLocale = function _initLocale( options ){\n var self = this;\n self.debug( '_initLocale:', options );\n self.localize = localize;\n // add to window as global shortened alias\n // TODO: temporary - remove when can require for plugins\n window._l = self.localize;\n return self;\n};\n\n/** set up the current user as a Backbone model (mvc/user/user-model) */\nGalaxyApp.prototype._initUser = function _initUser( userJSON ){\n var self = this;\n self.debug( '_initUser:', userJSON );\n self.user = new userModel.User( userJSON );\n self.user.logger = self.logger;\n return self;\n};\n\n/** Set up DOM/jQuery/Backbone event listeners enabled for all pages */\nGalaxyApp.prototype._setUpListeners = function _setUpListeners(){\n var self = this;\n\n // hook to jq beforeSend to record the most recent ajax call and cache some data about it\n /** cached info about the last ajax call made through jQuery */\n self.lastAjax = {};\n $( document ).bind( 'ajaxSend', function( ev, xhr, options ){\n var data = options.data;\n try {\n data = JSON.parse( data );\n } catch( err ){}\n\n self.lastAjax = {\n url : location.href.slice( 0, -1 ) + options.url,\n data : data\n };\n //TODO:?? we might somehow manage to *retry* ajax using either this hook or Backbone.sync\n });\n return self;\n};\n\n/** Turn debugging/console-output on/off by passing boolean. Pass nothing to get current setting. */\nGalaxyApp.prototype.debugging = function _debugging( setting ){\n var self = this;\n try {\n if( setting === undefined ){\n return localStorage.getItem( DEBUGGING_KEY ) === 'true';\n }\n if( setting ){\n localStorage.setItem( DEBUGGING_KEY, true );\n return true;\n }\n\n localStorage.removeItem( DEBUGGING_KEY );\n // also remove all namespaces\n self.debuggingNamespaces( null );\n\n } catch( storageErr ){\n console.log( localize( 'localStorage not available for debug flag retrieval' ) );\n }\n return false;\n};\n\n/** Add, remove, or clear namespaces from the debugging filters\n * Pass no arguments to retrieve the existing namespaces as an array.\n * Pass in null to clear all namespaces (all logging messages will show now).\n * Pass in an array of strings or single string of the namespaces to filter to.\n * Returns the new/current namespaces as an array;\n */\nGalaxyApp.prototype.debuggingNamespaces = function _debuggingNamespaces( namespaces ){\n var self = this;\n try {\n if( namespaces === undefined ){\n var csv = localStorage.getItem( NAMESPACE_KEY );\n return typeof( csv ) === 'string'? csv.split( ',' ) : [];\n } else if( namespaces === null ) {\n localStorage.removeItem( NAMESPACE_KEY );\n } else {\n localStorage.setItem( NAMESPACE_KEY, namespaces );\n }\n var newSettings = self.debuggingNamespaces();\n if( self.logger ){\n self.logger.options.consoleNamespaceWhitelist = newSettings;\n }\n return newSettings;\n } catch( storageErr ){\n console.log( localize( 'localStorage not available for debug namespace retrieval' ) );\n }\n};\n\n/** string rep */\nGalaxyApp.prototype.toString = function toString(){\n var userEmail = this.user? ( this.user.get( 'email' ) || '(anonymous)' ) : 'uninitialized';\n return 'GalaxyApp(' + userEmail + ')';\n};\n\n// ============================================================================\n return {\n GalaxyApp : GalaxyApp\n };\n});\n"]} \ No newline at end of file +{"version":3,"sources":["galaxy.js"],"names":["define","_","Backbone","BASE_MVC","userModel","metricsLogger","addLogging","localize","GalaxyApp","bootstrapped","this","_init","options","console","NAMESPACE_KEY","DEBUGGING_KEY","localDebugging","prototype","getItem","storageErr","extend","self","patchExisting","_processOptions","logger","root","_initLogger","session_csrf_token","config","window","Galaxy","_initLocale","loggerOptions","debug","user","_setUpListeners","trigger","_initUser","defaultOptions","defaults","hasOwnProperty","k","_initConfig","_patchGalaxy","patchWith","consoleLevel","consoleLogger","MetricsLogger","ALL","consoleNamespaceWhitelist","localStorage","split","emit","map","i","data","LoggableMixin","slice","call","arguments","_l","userJSON","$","document","bind","lastAjax","ev","xhr","url","location","JSON","parse","err","href","setting","undefined","debuggingNamespaces","removeItem","log","namespaces","newSettings","csv","userEmail","get"],"mappings":"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","file":"../scripts/galaxy.js","sourcesContent":["define([\n 'libs/underscore',\n 'libs/backbone',\n 'mvc/base-mvc',\n 'mvc/user/user-model',\n 'utils/metrics-logger',\n 'utils/add-logging',\n 'utils/localization'\n], function( _, Backbone, BASE_MVC, userModel, metricsLogger, addLogging, localize ){\n\n// TODO: move into a singleton pattern and have dependents import Galaxy\n// ============================================================================\n/** Base galaxy client-side application.\n * Iniitializes:\n * logger : the logger/metrics-logger\n * localize : the string localizer\n * config : the current configuration (any k/v in\n * galaxy.ini available from the configuration API)\n * user : the current user (as a mvc/user/user-model)\n */\nfunction GalaxyApp( options, bootstrapped ){\n var self = this;\n return self._init( options || {}, bootstrapped || {} );\n}\n\n// add logging shortcuts for this object\naddLogging( GalaxyApp, 'GalaxyApp' );\n\n// a debug flag can be set via local storage and made available during script/page loading\nvar DEBUGGING_KEY = 'galaxy:debug',\n NAMESPACE_KEY = DEBUGGING_KEY + ':namespaces',\n localDebugging = false;\ntry {\n localDebugging = localStorage.getItem( DEBUGGING_KEY ) == 'true';\n} catch( storageErr ){\n console.log( localize( 'localStorage not available for debug flag retrieval' ) );\n}\n\n/** initalize options and sub-components */\nGalaxyApp.prototype._init = function __init( options, bootstrapped ){\n var self = this;\n _.extend( self, Backbone.Events );\n if( localDebugging ){\n self.logger = console;\n console.debug( 'debugging galaxy:', 'options:', options, 'bootstrapped:', bootstrapped );\n }\n\n self._processOptions( options );\n\n // add root and url parameters\n self.root = options.root || '/';\n self.params = options.params || {};\n self.session_csrf_token = options.session_csrf_token || null;\n\n self._initConfig( options.config || {} );\n self._patchGalaxy( window.Galaxy );\n\n self._initLogger( self.options.loggerOptions || {} );\n // at this point, either logging or not and namespaces are enabled - chat it up\n self.debug( 'GalaxyApp.options: ', self.options );\n self.debug( 'GalaxyApp.config: ', self.config );\n self.debug( 'GalaxyApp.logger: ', self.logger );\n\n self._initLocale();\n self.debug( 'GalaxyApp.localize: ', self.localize );\n\n self.config = options.config || {};\n self.debug( 'GalaxyApp.config: ', self.config );\n\n self._initUser( options.user || {} );\n self.debug( 'GalaxyApp.user: ', self.user );\n\n self._setUpListeners();\n self.trigger( 'ready', self );\n\n return self;\n};\n\n/** default options */\nGalaxyApp.prototype.defaultOptions = {\n /** monkey patch attributes from existing window.Galaxy object? */\n patchExisting : true,\n /** root url of this app */\n root : '/',\n session_csrf_token : null,\n};\n\n/** filter to options present in defaultOptions (and default to them) */\nGalaxyApp.prototype._processOptions = function _processOptions( options ){\n var self = this,\n defaults = self.defaultOptions;\n\n self.options = {};\n for( var k in defaults ){\n if( defaults.hasOwnProperty( k ) ){\n self.options[ k ] = ( options.hasOwnProperty( k ) )?( options[ k ] ):( defaults[ k ] );\n }\n }\n return self;\n};\n\n/** parse the config and any extra info derived from it */\nGalaxyApp.prototype._initConfig = function _initConfig( config ){\n var self = this;\n self.config = config;\n\n // give precendence to localdebugging for this setting\n self.config.debug = localDebugging || self.config.debug;\n\n return self;\n};\n\n/** add an option from options if the key matches an option in defaultOptions */\nGalaxyApp.prototype._patchGalaxy = function _patchGalaxy( patchWith ){\n var self = this;\n // in case req or plain script tag order has created a prev. version of the Galaxy obj...\n if( self.options.patchExisting && patchWith ){\n // self.debug( 'found existing Galaxy object:', patchWith );\n // ...(for now) monkey patch any added attributes that the previous Galaxy may have had\n //TODO: move those attributes to more formal assignment in GalaxyApp\n for( var k in patchWith ){\n if( patchWith.hasOwnProperty( k ) ){\n // self.debug( '\\t patching in ' + k + ' to Galaxy:', self[ k ] );\n self[ k ] = patchWith[ k ];\n }\n }\n }\n};\n\n/** set up the metrics logger (utils/metrics-logger) and pass loggerOptions */\nGalaxyApp.prototype._initLogger = function _initLogger( loggerOptions ){\n var self = this;\n\n // default to console logging at the debug level if the debug flag is set\n if( self.config.debug ){\n loggerOptions.consoleLogger = loggerOptions.consoleLogger || console;\n loggerOptions.consoleLevel = loggerOptions.consoleLevel || metricsLogger.MetricsLogger.ALL;\n // load any logging namespaces from localStorage if we can\n try {\n loggerOptions.consoleNamespaceWhitelist = localStorage.getItem( NAMESPACE_KEY ).split( ',' );\n } catch( storageErr ){}\n }\n\n self.logger = new metricsLogger.MetricsLogger( loggerOptions );\n self.emit = {};\n [ 'log', 'debug', 'info', 'warn', 'error', 'metric' ].map(function( i ) {\n self.emit[ i ] = function( data ){\n self.logger.emit( i, arguments[ 0 ], Array.prototype.slice.call( arguments, 1 ) );\n };\n });\n\n if( self.config.debug ){\n // add this logger to mvc's loggable mixin so that all models can use the logger\n BASE_MVC.LoggableMixin.logger = self.logger;\n }\n return self;\n};\n\n/** add the localize fn to this object and the window namespace (as '_l') */\nGalaxyApp.prototype._initLocale = function _initLocale( options ){\n var self = this;\n self.debug( '_initLocale:', options );\n self.localize = localize;\n // add to window as global shortened alias\n // TODO: temporary - remove when can require for plugins\n window._l = self.localize;\n return self;\n};\n\n/** set up the current user as a Backbone model (mvc/user/user-model) */\nGalaxyApp.prototype._initUser = function _initUser( userJSON ){\n var self = this;\n self.debug( '_initUser:', userJSON );\n self.user = new userModel.User( userJSON );\n self.user.logger = self.logger;\n return self;\n};\n\n/** Set up DOM/jQuery/Backbone event listeners enabled for all pages */\nGalaxyApp.prototype._setUpListeners = function _setUpListeners(){\n var self = this;\n\n // hook to jq beforeSend to record the most recent ajax call and cache some data about it\n /** cached info about the last ajax call made through jQuery */\n self.lastAjax = {};\n $( document ).bind( 'ajaxSend', function( ev, xhr, options ){\n var data = options.data;\n try {\n data = JSON.parse( data );\n } catch( err ){}\n\n self.lastAjax = {\n url : location.href.slice( 0, -1 ) + options.url,\n data : data\n };\n //TODO:?? we might somehow manage to *retry* ajax using either this hook or Backbone.sync\n });\n return self;\n};\n\n/** Turn debugging/console-output on/off by passing boolean. Pass nothing to get current setting. */\nGalaxyApp.prototype.debugging = function _debugging( setting ){\n var self = this;\n try {\n if( setting === undefined ){\n return localStorage.getItem( DEBUGGING_KEY ) === 'true';\n }\n if( setting ){\n localStorage.setItem( DEBUGGING_KEY, true );\n return true;\n }\n\n localStorage.removeItem( DEBUGGING_KEY );\n // also remove all namespaces\n self.debuggingNamespaces( null );\n\n } catch( storageErr ){\n console.log( localize( 'localStorage not available for debug flag retrieval' ) );\n }\n return false;\n};\n\n/** Add, remove, or clear namespaces from the debugging filters\n * Pass no arguments to retrieve the existing namespaces as an array.\n * Pass in null to clear all namespaces (all logging messages will show now).\n * Pass in an array of strings or single string of the namespaces to filter to.\n * Returns the new/current namespaces as an array;\n */\nGalaxyApp.prototype.debuggingNamespaces = function _debuggingNamespaces( namespaces ){\n var self = this;\n try {\n if( namespaces === undefined ){\n var csv = localStorage.getItem( NAMESPACE_KEY );\n return typeof( csv ) === 'string'? csv.split( ',' ) : [];\n } else if( namespaces === null ) {\n localStorage.removeItem( NAMESPACE_KEY );\n } else {\n localStorage.setItem( NAMESPACE_KEY, namespaces );\n }\n var newSettings = self.debuggingNamespaces();\n if( self.logger ){\n self.logger.options.consoleNamespaceWhitelist = newSettings;\n }\n return newSettings;\n } catch( storageErr ){\n console.log( localize( 'localStorage not available for debug namespace retrieval' ) );\n }\n};\n\n/** string rep */\nGalaxyApp.prototype.toString = function toString(){\n var userEmail = this.user? ( this.user.get( 'email' ) || '(anonymous)' ) : 'uninitialized';\n return 'GalaxyApp(' + userEmail + ')';\n};\n\n// ============================================================================\n return {\n GalaxyApp : GalaxyApp\n };\n});\n"]} \ No newline at end of file diff --git a/static/maps/galaxy.library.js.map b/static/maps/galaxy.library.js.map index 9dbdee1876e..f91e9be42db 100644 --- a/static/maps/galaxy.library.js.map +++ b/static/maps/galaxy.library.js.map @@ -1 +1 @@ -{"version":3,"sources":["galaxy.library.js"],"names":["define","initialize","Backbone","mod_utils","mod_toastr","mod_baseMVC","mod_library_model","mod_folderlist_view","mod_librarylist_view","routes","mod_foldertoolbar_view","mod_library_dataset_view","mod_library_library_view","mod_library_folder_view","LibraryRouter","Router","extend","this","routesHit","history","on","bind","trackPageview","window","","page/:show_page","library/:library_id/permissions","folders/:folder_id/permissions","folders/:id","folders/:id/page/:show_page","folders/:folder_id/datasets/:dataset_id","folders/:folder_id/datasets/:dataset_id/permissions","folders/:folder_id/download/:format","folders/:folder_id/import/:source","back","defaults","trigger","replace","url","getFragment","test","ga","Galaxy","root","folderToolbarView","SessionStorageModel","folderListView","datasetView","without_restricted","sort_by","library_page_size","folder_page_size","GalaxyApp","View","libraryToolbarView","libraryListView","preferences","library_router","libraryView","config","ga_code","i","s","o","g","r","a","m","arguments","l","Date","show_page","getElementsByTagName","src","parentNode","insertBefore","libraries","mod_librarytoolbar_view","LibraryPrefs","id","$el","unbind","LibraryListView","render","LibraryToolbarView","folder_id","navigate","FolderToolbarView","FolderListView","LibraryDatasetView","dataset_id","$","find","length","info","format","library_id","show_permissions","ldda_id","folderView","show_version","source","showImportModal","LibraryView","GalaxyLibrary","FolderView","start","pushState"],"mappings":"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","file":"../scripts/galaxy.library.js","sourcesContent":["// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n// === MAIN GALAXY LIBRARY MODULE ====\n// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n\ndefine([\n \"layout/masthead\",\n \"utils/utils\",\n \"libs/toastr\",\n \"mvc/base-mvc\",\n \"mvc/library/library-model\",\n \"mvc/library/library-folderlist-view\",\n \"mvc/library/library-librarylist-view\",\n \"mvc/library/library-librarytoolbar-view\",\n \"mvc/library/library-foldertoolbar-view\",\n \"mvc/library/library-dataset-view\",\n \"mvc/library/library-library-view\",\n \"mvc/library/library-folder-view\"\n ],\n function(mod_masthead,\n mod_utils,\n mod_toastr,\n mod_baseMVC,\n mod_library_model,\n mod_folderlist_view,\n mod_librarylist_view,\n mod_librarytoolbar_view,\n mod_foldertoolbar_view,\n mod_library_dataset_view,\n mod_library_library_view,\n mod_library_folder_view\n ) {\n\n// ============================================================================\n/**\n * The Data Libraries router. Takes care about triggering routes\n * and sends users to proper pieces of the application.\n */\nvar LibraryRouter = Backbone.Router.extend({\n\n initialize: function() {\n this.routesHit = 0;\n // keep count of number of routes handled by the application\n Backbone.history.on( 'route', function() { this.routesHit++; }, this );\n\n this.bind( 'route', this.trackPageview );\n },\n\n routes: {\n \"\" : \"libraries\",\n \"page/:show_page\" : \"libraries_page\",\n \"library/:library_id/permissions\" : \"library_permissions\",\n \"folders/:folder_id/permissions\" : \"folder_permissions\",\n \"folders/:id\" : \"folder_content\",\n \"folders/:id/page/:show_page\" : \"folder_page\",\n \"folders/:folder_id/datasets/:dataset_id\" : \"dataset_detail\",\n \"folders/:folder_id/datasets/:dataset_id/permissions\" : \"dataset_permissions\",\n \"folders/:folder_id/datasets/:dataset_id/versions/:ldda_id\" : \"dataset_version\",\n \"folders/:folder_id/download/:format\" : \"download\",\n \"folders/:folder_id/import/:source\" : \"import_datasets\"\n },\n\n /**\n * If more than one route has been hit the user did not land on current\n * page directly so we can go back safely. Otherwise go to the home page.\n * Use replaceState if available so the navigation doesn't create an\n * extra history entry\n */\n back: function() {\n if( this.routesHit > 1 ) {\n window.history.back();\n } else {\n this.navigate( '#', { trigger:true, replace:true } );\n }\n },\n\n /**\n * Track every route change as a page view in Google Analytics.\n */\n trackPageview: function () {\n var url = Backbone.history.getFragment();\n //prepend slash\n if (!/^\\//.test(url) && url != \"\") {\n url = \"/\" + url;\n }\n if ( typeof ga !== 'undefined' ) {\n ga( 'send', 'pageview', Galaxy.root + 'library/list' + url );\n }\n }\n});\n\n// ============================================================================\n/** session storage for library preferences */\nvar LibraryPrefs = mod_baseMVC.SessionStorageModel.extend({\n defaults : {\n with_deleted : false,\n without_restricted: false,\n sort_order : 'asc',\n sort_by : 'name',\n library_page_size : 20,\n folder_page_size : 15\n }\n});\n\n// ============================================================================\n/**\n * Main view of the Galaxy Data Libraries. Stores pointers to other subviews\n * and defines what router should do on the route triggers.\n */\nvar GalaxyLibrary = Backbone.View.extend({\n\n libraryToolbarView: null,\n libraryListView: null,\n library_router: null,\n libraryView: null,\n folderToolbarView: null,\n folderListView: null,\n datasetView: null,\n\n initialize : function(){\n\n // This should go upstream in the js app once available\n if ( window.Galaxy.config.ga_code ){\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n ga('create', window.Galaxy.config.ga_code, 'auto');\n ga('send', 'pageview');\n }\n\n Galaxy.libraries = this;\n\n this.preferences = new LibraryPrefs( { id: 'global-lib-prefs' } );\n\n this.library_router = new LibraryRouter();\n\n this.library_router.on( 'route:libraries', function() {\n if ( Galaxy.libraries.libraryToolbarView){\n Galaxy.libraries.libraryToolbarView.$el.unbind('click');\n }\n Galaxy.libraries.libraryToolbarView = new mod_librarytoolbar_view.LibraryToolbarView();\n Galaxy.libraries.libraryListView = new mod_librarylist_view.LibraryListView();\n });\n\n this.library_router.on('route:libraries_page', function( show_page ) {\n if ( Galaxy.libraries.libraryToolbarView === null ){\n Galaxy.libraries.libraryToolbarView = new mod_librarytoolbar_view.LibraryToolbarView();\n Galaxy.libraries.libraryListView = new mod_librarylist_view.LibraryListView( { show_page: show_page } );\n } else {\n Galaxy.libraries.libraryListView.render( { show_page: show_page } );\n }\n });\n\n this.library_router.on( 'route:folder_content', function( id ) {\n if (Galaxy.libraries.folderToolbarView){\n Galaxy.libraries.folderToolbarView.$el.unbind( 'click' );\n }\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( { id: id } );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: id } );\n });\n\n this.library_router.on( 'route:folder_page', function( id, show_page ) {\n if ( Galaxy.libraries.folderToolbarView === null ){\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( {id: id} );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: id, show_page: show_page } );\n } else {\n Galaxy.libraries.folderListView.render( { id: id, show_page: parseInt( show_page ) } );\n }\n });\n\n this.library_router.on( 'route:download', function( folder_id, format ) {\n if ( $( '#folder_list_body' ).find( ':checked' ).length === 0 ) {\n mod_toastr.info( 'You must select at least one dataset to download' );\n Galaxy.libraries.library_router.navigate( 'folders/' + folder_id, { trigger: true, replace: true } );\n } else {\n Galaxy.libraries.folderToolbarView.download( folder_id, format );\n Galaxy.libraries.library_router.navigate( 'folders/' + folder_id, { trigger: false, replace: true } );\n }\n });\n\n this.library_router.on( 'route:dataset_detail', function(folder_id, dataset_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, show_version: false, show_permissions: false});\n });\n\n this.library_router.on( 'route:dataset_version', function(folder_id, dataset_id, ldda_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, ldda_id: ldda_id, show_version: true});\n });\n\n this.library_router.on( 'route:dataset_permissions', function(folder_id, dataset_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:library_permissions', function(library_id){\n if (Galaxy.libraries.libraryView){\n Galaxy.libraries.libraryView.$el.unbind('click');\n }\n Galaxy.libraries.libraryView = new mod_library_library_view.LibraryView({id: library_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:folder_permissions', function(folder_id){\n if (Galaxy.libraries.folderView){\n Galaxy.libraries.folderView.$el.unbind('click');\n }\n Galaxy.libraries.folderView = new mod_library_folder_view.FolderView({id: folder_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:import_datasets', function( folder_id, source ){\n if ( Galaxy.libraries.folderToolbarView && Galaxy.libraries.folderListView ){\n Galaxy.libraries.folderToolbarView.showImportModal( { source:source } );\n } else {\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( { id: folder_id } );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: folder_id } );\n Galaxy.libraries.folderToolbarView.showImportModal( { source: source } );\n }\n });\n\n Backbone.history.start({pushState: false});\n }\n});\n\nreturn {\n GalaxyApp: GalaxyLibrary\n};\n\n});\n"]} \ No newline at end of file +{"version":3,"sources":["galaxy.library.js"],"names":["define","initialize","Backbone","mod_utils","mod_toastr","mod_baseMVC","mod_library_model","mod_folderlist_view","mod_librarylist_view","routes","mod_foldertoolbar_view","mod_library_dataset_view","mod_library_library_view","mod_library_folder_view","LibraryRouter","Router","extend","this","routesHit","history","on","bind","trackPageview","window","","page/:show_page","library/:library_id/permissions","folders/:folder_id/permissions","folders/:id","folders/:id/page/:show_page","folders/:folder_id/datasets/:dataset_id","folders/:folder_id/datasets/:dataset_id/permissions","folders/:folder_id/download/:format","folders/:folder_id/import/:source","back","defaults","trigger","replace","url","getFragment","test","ga","Galaxy","root","folderToolbarView","SessionStorageModel","folderListView","datasetView","without_restricted","sort_by","library_page_size","folder_page_size","GalaxyApp","View","libraryToolbarView","libraryListView","preferences","library_router","libraryView","config","ga_code","i","s","o","g","r","a","m","arguments","l","Date","show_page","getElementsByTagName","src","parentNode","insertBefore","libraries","mod_librarytoolbar_view","LibraryPrefs","id","$el","unbind","LibraryListView","render","LibraryToolbarView","folder_id","navigate","FolderToolbarView","FolderListView","LibraryDatasetView","dataset_id","$","find","length","info","format","library_id","show_permissions","ldda_id","folderView","show_version","source","showImportModal","LibraryView","GalaxyLibrary","FolderView","start","pushState"],"mappings":"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","file":"../scripts/galaxy.library.js","sourcesContent":["// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n// === MAIN GALAXY LIBRARY MODULE ====\n// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n\ndefine([\n \"layout/masthead\",\n \"utils/utils\",\n \"libs/toastr\",\n \"mvc/base-mvc\",\n \"mvc/library/library-model\",\n \"mvc/library/library-folderlist-view\",\n \"mvc/library/library-librarylist-view\",\n \"mvc/library/library-librarytoolbar-view\",\n \"mvc/library/library-foldertoolbar-view\",\n \"mvc/library/library-dataset-view\",\n \"mvc/library/library-library-view\",\n \"mvc/library/library-folder-view\"\n ],\n function(mod_masthead,\n mod_utils,\n mod_toastr,\n mod_baseMVC,\n mod_library_model,\n mod_folderlist_view,\n mod_librarylist_view,\n mod_librarytoolbar_view,\n mod_foldertoolbar_view,\n mod_library_dataset_view,\n mod_library_library_view,\n mod_library_folder_view\n ) {\n\n// ============================================================================\n/**\n * The Data Libraries router. Takes care about triggering routes\n * and sends users to proper pieces of the application.\n */\nvar LibraryRouter = Backbone.Router.extend({\n\n initialize: function() {\n this.routesHit = 0;\n // keep count of number of routes handled by the application\n Backbone.history.on( 'route', function() { this.routesHit++; }, this );\n\n this.bind( 'route', this.trackPageview );\n },\n\n routes: {\n \"\" : \"libraries\",\n \"page/:show_page\" : \"libraries_page\",\n \"library/:library_id/permissions\" : \"library_permissions\",\n \"folders/:folder_id/permissions\" : \"folder_permissions\",\n \"folders/:id\" : \"folder_content\",\n \"folders/:id/page/:show_page\" : \"folder_page\",\n \"folders/:folder_id/datasets/:dataset_id\" : \"dataset_detail\",\n \"folders/:folder_id/datasets/:dataset_id/permissions\" : \"dataset_permissions\",\n \"folders/:folder_id/datasets/:dataset_id/versions/:ldda_id\" : \"dataset_version\",\n \"folders/:folder_id/download/:format\" : \"download\",\n \"folders/:folder_id/import/:source\" : \"import_datasets\"\n },\n\n /**\n * If more than one route has been hit the user did not land on current\n * page directly so we can go back safely. Otherwise go to the home page.\n * Use replaceState if available so the navigation doesn't create an\n * extra history entry\n */\n back: function() {\n if( this.routesHit > 1 ) {\n window.history.back();\n } else {\n this.navigate( '#', { trigger:true, replace:true } );\n }\n },\n\n /**\n * Track every route change as a page view in Google Analytics.\n */\n trackPageview: function () {\n var url = Backbone.history.getFragment();\n //prepend slash\n if (!/^\\//.test(url) && url != \"\") {\n url = \"/\" + url;\n }\n if ( typeof ga !== 'undefined' ) {\n ga( 'send', 'pageview', Galaxy.root + 'library/list' + url );\n }\n }\n});\n\n// ============================================================================\n/** session storage for library preferences */\nvar LibraryPrefs = mod_baseMVC.SessionStorageModel.extend({\n defaults : {\n with_deleted : false,\n without_restricted: false,\n sort_order : 'asc',\n sort_by : 'name',\n library_page_size : 20,\n folder_page_size : 15\n }\n});\n\n// ============================================================================\n/**\n * Main view of the Galaxy Data Libraries. Stores pointers to other subviews\n * and defines what router should do on the route triggers.\n */\nvar GalaxyLibrary = Backbone.View.extend({\n\n libraryToolbarView: null,\n libraryListView: null,\n library_router: null,\n libraryView: null,\n folderToolbarView: null,\n folderListView: null,\n datasetView: null,\n\n initialize : function(){\n\n // This should go upstream in the js app once available\n if ( window.Galaxy.config.ga_code ){\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n ga('create', window.Galaxy.config.ga_code, 'auto');\n ga('send', 'pageview');\n }\n\n Galaxy.libraries = this;\n\n this.preferences = new LibraryPrefs( { id: 'global-lib-prefs' } );\n\n this.library_router = new LibraryRouter();\n\n this.library_router.on( 'route:libraries', function() {\n if ( Galaxy.libraries.libraryToolbarView){\n Galaxy.libraries.libraryToolbarView.$el.unbind('click');\n }\n Galaxy.libraries.libraryToolbarView = new mod_librarytoolbar_view.LibraryToolbarView();\n Galaxy.libraries.libraryListView = new mod_librarylist_view.LibraryListView();\n });\n\n this.library_router.on('route:libraries_page', function( show_page ) {\n if ( Galaxy.libraries.libraryToolbarView === null ){\n Galaxy.libraries.libraryToolbarView = new mod_librarytoolbar_view.LibraryToolbarView();\n Galaxy.libraries.libraryListView = new mod_librarylist_view.LibraryListView( { show_page: show_page } );\n } else {\n Galaxy.libraries.libraryListView.render( { show_page: show_page } );\n }\n });\n\n this.library_router.on( 'route:folder_content', function( id ) {\n if (Galaxy.libraries.folderToolbarView){\n Galaxy.libraries.folderToolbarView.$el.unbind( 'click' );\n }\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( { id: id } );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: id } );\n });\n\n this.library_router.on( 'route:folder_page', function( id, show_page ) {\n if ( Galaxy.libraries.folderToolbarView === null ){\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( {id: id} );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: id, show_page: show_page } );\n } else {\n Galaxy.libraries.folderListView.render( { id: id, show_page: parseInt( show_page ) } );\n }\n });\n\n this.library_router.on( 'route:download', function( folder_id, format ) {\n if ( $( '#folder_list_body' ).find( ':checked' ).length === 0 ) {\n mod_toastr.info( 'You must select at least one dataset to download' );\n Galaxy.libraries.library_router.navigate( 'folders/' + folder_id, { trigger: true, replace: true } );\n } else {\n Galaxy.libraries.folderToolbarView.download( folder_id, format );\n Galaxy.libraries.library_router.navigate( 'folders/' + folder_id, { trigger: false, replace: true } );\n }\n });\n\n this.library_router.on( 'route:dataset_detail', function(folder_id, dataset_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, show_version: false, show_permissions: false});\n });\n\n this.library_router.on( 'route:dataset_version', function(folder_id, dataset_id, ldda_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, ldda_id: ldda_id, show_version: true});\n });\n\n this.library_router.on( 'route:dataset_permissions', function(folder_id, dataset_id){\n if (Galaxy.libraries.datasetView){\n Galaxy.libraries.datasetView.$el.unbind('click');\n }\n Galaxy.libraries.datasetView = new mod_library_dataset_view.LibraryDatasetView({id: dataset_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:library_permissions', function(library_id){\n if (Galaxy.libraries.libraryView){\n Galaxy.libraries.libraryView.$el.unbind('click');\n }\n Galaxy.libraries.libraryView = new mod_library_library_view.LibraryView({id: library_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:folder_permissions', function(folder_id){\n if (Galaxy.libraries.folderView){\n Galaxy.libraries.folderView.$el.unbind('click');\n }\n Galaxy.libraries.folderView = new mod_library_folder_view.FolderView({id: folder_id, show_permissions: true});\n });\n\n this.library_router.on( 'route:import_datasets', function( folder_id, source ){\n if ( Galaxy.libraries.folderToolbarView && Galaxy.libraries.folderListView ){\n Galaxy.libraries.folderToolbarView.showImportModal( { source:source } );\n } else {\n Galaxy.libraries.folderToolbarView = new mod_foldertoolbar_view.FolderToolbarView( { id: folder_id } );\n Galaxy.libraries.folderListView = new mod_folderlist_view.FolderListView( { id: folder_id } );\n Galaxy.libraries.folderToolbarView.showImportModal( { source: source } );\n }\n });\n\n Backbone.history.start({pushState: false});\n }\n});\n\nreturn {\n GalaxyApp: GalaxyLibrary\n};\n\n});\n"]} \ No newline at end of file diff --git a/static/maps/galaxy.pages.js.map b/static/maps/galaxy.pages.js.map index 72ea837e113..ac97d33aab4 100644 --- a/static/maps/galaxy.pages.js.map +++ b/static/maps/galaxy.pages.js.map @@ -1 +1 @@ -{"version":3,"sources":["galaxy.pages.js"],"names":["init_galaxy_elts","wym","$","_doc","body","each","this","range","selection","window","addRange","getSelection","removeAllRanges","get_item_info","ITEM_HISTORY","item_plural","item_controller","item_class","dialog_type","item_singular","CONTROLS","ITEM_VISUALIZATION","item_list_action","ajax_url","list_objects_url","controller","toLowerCase","iclass","replace","singular","plural","make_item_importable","set_accessible_url","ajax","alert","item_type","item_id","type","url","WYMeditor","editor","prototype","dialog","error","ITEM_DATASET","ITEM_WORKFLOW","ITEM_PAGE","DIALOG_HISTORY_LINK","DIALOG_DATASET_LINK","DIALOG_WORKFLOW_LINK","DIALOG_PAGE_LINK","DIALOG_VISUALIZATION_LINK","DIALOG_EMBED_HISTORY","DIALOG_EMBED_DATASET","DIALOG_EMBED_WORKFLOW","DIALOG_EMBED_PAGE","DIALOG_EMBED_VISUALIZATION","dialogType","dialogFeatures","bodyHtml","set_link_id","attribute_input","text","addClass","removeClass","selected","val","attr","_options","uniqueStamp","DIALOG_LINK","curURL","undefined","HREF","curTitle","SRC","TITLE","altSelector","ALT","sName","sUrl","_exec","show_modal","link","hrefSelector","hide_modal","titleSelector","CREATE_LINK","sStamp","DIALOG_IMAGE","_selected_image","dialogImageSelector","indexOf","srcSelector","iRows","rowsSelector","iCols","colsSelector","newRow","length","INSERT_IMAGE","item_info","Insert","GridView","url_base","list_ajax_url","title","closing_events","createElement","TABLE","make_importable","captionSelector","newCaption","table","createCaption","item_ids","innerHTML","sCaption","x","insertRow","y","getJSON","returned_item_info","node","link_text","container","MAIN_CONTAINERS","get","parentNode","after","append","Galaxy","modal","require","grid","dict_format","embedded","$el","Array","item_name","url_template","get_name_and_link_url","item_elt_id","item_embed_html","insert","name","hide","Close","toolsItems","wymeditors","save_url","data","id","page_id","content","annotations","show","buttons","Embed","do_close","document","location","page_list_url","join","containersItems","tagname","insert_link_menu_button","e","message","responseText","statusText","make_popupmenu","Ignore error","wymeditor","skin","iframeBasePath","iframe_base_path","boxHtml","TOOLS","STATUS","css","embed_object_button","xhtml","JSON","stringify","Object","_","success","callback","click","save","containers_menu","items","k","v","Insert History Link","Insert Dataset Link","Insert Workflow Link","Insert Page Link","Insert Visualization Link","Embed History","Embed Dataset","Embed Workflow","Embed Visualization"],"mappings":"YA0BA,SAASA,kBAAiBC,GAKjBC,EAAAA,cAAAD,EAAeE,KAAAC,MAAWC,KAAA,WAEtBH,EAAAI,MAAIC,MAAQN,WAEZ,GAAIO,GAAAA,EAAYC,KAAAA,aAChBD,GAAAA,mBAAAF,KACAE,IAAAA,GAAUE,OAAVC,cACAH,GAAAI,kBAPJJ,EAAAE,SAAAH,OAqBD,QAAAM,eAAeC,GAEXC,GACAC,GACAC,EACAD,CACJ,QAAAE,GACIC,IAAAA,UAAAA,aACAJ,EAAc,UACdC,EAAAA,YACAC,EAAa,UACbA,WAAA,SACJ,MACIE,KAAAA,UAAAA,aACAJ,EAAc,UACdC,EAAAA,WACAC,EAAa,UACbA,WAAA,2BACJ,MACIE,KAAAA,UAAAA,cACAJ,EAAc,WACdC,EAAAA,YACAC,EAAa,WACbA,WAAA,gBACJ,MACIE,KAAAA,UAAAA,UACAJ,EAAc,OACdC,EAAAA,QACAC,EAAa,OACbA,WAAA,MA9BR,MAyBI,KAAMG,UAASC,mBAQnBF,EAAA,gBACIG,EAAAA,iBACAC,EAAWC,gBANPP,WAAa,gBAYjBQ,GAAAA,GAAaT,QAHVD,EAAAW,cAAA,iBAIHC,EAASV,iBAJNW,QAAA,cAAAN,EAOV,QANOO,SAAWV,EAQnBW,OAAAf,EACAU,WAASM,EAELR,OAAWS,WACTC,cAAKV,GAIeW,QAAAA,sBAAkBC,EAAYC,EAAAD,GAJ7CZ,SAAPS,mBAAAJ,QAAA,kBAAAZ,GAMHd,EAAA+B,MALKI,KAAM,OAOZC,IAAAf,SACAgB,MAAUC,GAAOC,EAAUC,WAAS,QAL9BC,MAAO,WAAaT,MAAM,UAAYC,EAAY,yBAzGxD,GAAIf,WAGAN,aAAe,eACf8B,aAAe,eACfC,cAAgB,gBAChBC,UAAY,YACZzB,mBAAqB,qBAGrB0B,oBAAsB,eACtBC,oBAAsB,eACtBC,qBAAuB,gBACvBC,iBAAmB,YACnBC,0BAA4B,qBAG5BC,qBAAuB,gBACvBC,qBAAuB,gBACvBC,sBAAwB,iBACxBC,kBAAoB,aACpBC,2BAA6B,sBA+F7BjB,WAAAC,OAAAC,UAAAC,OAAA,SAAAe,EAAAC,EAAAC,GASQ,QAAAC,KAGA1D,EAAA,gBACI2D,MAAAA,WAGJ3D,EAAE,yBAAF4D,KAAA,UANA,IAAID,GAAkB3D,EAAE,YAUhC2D,GAAAE,SAAA,UAAAC,YAAA,YACKP,GACEQ,EAAUC,IAAAhE,EAAA+D,GAAAE,KAAA,OAGTjE,EAAED,MAAImE,WAtBV,GAAAnE,GAAAK,KACAJ,EAAED,EAAAoE,cAEEJ,EAAAhE,EAAAgE,UAwBJ,IAAAR,GACAlB,UAAA+B,YAAA,CACIC,IACArE,EAAAD,EAAIsE,SAAUC,cACVD,IAAAA,EAASN,GAATE,KAAA5B,UAAAkC,OACJC,EAAAA,EAAAA,SAAaT,aAAeC,IAAAhE,EAAA+D,GAA5BE,KAAA5B,UAAAoC,MACAzE,EAAAD,EAAIyE,SAAAA,eACAA,IAAAA,EAAAA,GAAAP,KAAA5B,UAAAqC,QACP1E,EAAAD,EAAAmE,SAAAS,aAAAX,IAAAhE,EAAA+D,GAAAE,KAAA5B,UAAAuC,MAOW,IAAAP,GAAAG,CACAT,KAAAM,EAEIQ,EAAAA,GAAU9E,KAAImE,YAfZI,IAAVD,IAiBIA,EAAIS,QAEIC,KADJP,EAAAxE,EAAA+D,GAAAE,KAAA,YAdRO,EAAW,KAkBHQ,WACAC,cAfZ,iNAAmNZ,EAAS,gGAmBhNG,EAAA,6BAEIS,YAAKrB,WAEZ,GAAAkB,GAAA9E,EAAAD,EAAAmE,SAAAgB,cAAAlB,OAAA,GACDmB,EAAAA,EAAAA,WAAAA,OAAAA,GAtBRN,EAAA7E,EAAAD,EAAAmE,SAAAkB,eAAApB,OAAA,EAyBQmB,IAAAA,GAAAA,EAAAA,CAIRzB,EAjCJqB,MAAA1C,UAAAgD,YAAAC,EAqCJ,IAAAL,GAAAjF,EAAA,UAAAsF,EAAA,IAAAvF,EAAAE,KAAAC,KACmBmC,GAAAA,KAAUkD,UAA7BhB,KAA4CO,GACjCU,KAAiBnD,UAAAqC,MAAAG,GACLY,KAAAA,KAAAA,GAMlB,IAAAR,EAAArB,OAAA8B,QAAA,SAGGT,EAAArB,KAAAiB,GAeWC,cAED9E,OAAE,WAIHmF,kBAIDA,GApChB,GAAK5B,GAAclB,UAAUkD,aA+DrB,MApBRxF,GAAAyF,kBACKjC,EAAAA,EAAAA,SAAclB,oBAAyB,IAAAtC,EAAAmE,SAAAyB,aACxCX,IACIhF,EAAAD,EAAAyF,iBACAvB,KAAA5B,UACMoC,MAgBFzE,EAAAD,EAAAmE,SAAUuB,oBAAW,IAAA1F,EAAAmE,SAAAkB,eACjBpB,IAAAhE,EAAI4F,EAAAA,iBAAU3B,KAAa4B,UAAc7B,QACzChE,EAAAD,EAAAmE,SAAI4B,oBAAuBC,IAAfhG,EAA6BiE,SAAzCW,aA3DLX,IAAIhE,EAAED,EAAIyF,iBAAiBvB,KAAK5B,UAAUuC,WAEjDI,YA6Dc,QACA,4TAYwCgB,OAAAA,WAAsB,GAAAlB,GAAA9E,EAAAD,EAAAmE,SAAAyB,aAAA3B,KACrDc,GAAAmB,OAAA,IAzDTlG,EAAIgF,MAAM1C,UAAU6D,aAAcZ,GA2DlCtF,EAAA,YAAAsF,EAAA,IAAAvF,EAAAE,KAAAC,MACA+D,KAASA,UAAKQ,IACR1E,GA1DDkE,KAAK5B,UAAUqC,MAAO1E,EAAED,EAAImE,SAASkB,eAAepB,OA4DzDC,KAAA5B,UAAAuC,IAAA5E,EAAAD,EAAAmE,SAAAS,aAAAX,QAGAmB,cAGFA,OAAAA,WAjCRA,eAsHS,IA3EZ5B,GAAcrC,UAAS2B,cAGxBmC,WACImB,QACJ,gcA/CQC,OAAU,WAkEP,GAAAR,GAAA5F,EAAAD,EAAXmE,SAAmC2B,cAAqB7B,MACzC8B,EAAIO,EAAAA,EAAYC,SAAAA,cAAoBC,KAE3CC,IAAkBZ,EAAA,GAAAE,EAAoBK,EAAAA,CAItCM,GAAAA,GAAkB1G,EALJE,KAAAyG,cAAArE,UAAAsE,OAMIX,EAAA,KAGNY,EAAAA,EAAkB7G,EAAtBmE,SAAA2C,iBAAA7C,MAIA8C,EAAAC,EAAAC,eAhEM,KAiEFC,EAAWC,UAAfC,EAjEUC,EAAE,EAAGA,EAAExB,EAAOwB,IAsEhBR,IADJZ,EAAAe,EAAAM,UAAAD,GACIR,EAAAA,EAAJU,EACIzF,EAAAA,IAAAA,EAAAA,WAA+BN,EAInCF,GAAAA,GAAAA,KAAAA,UACArB,EAAAA,EAAEuH,SAASlG,iBAAoBmG,MAG3B,IAAAC,GAAAzH,EAAAD,EAAI2H,OAAAA,EAAcC,YApE1BtF,UAAUuF,kBAAkBC,IAAI,EAsExBJ,IAAAA,EAAAK,WACA9H,EAAAyH,GAAAM,MACIL,GAFJ1H,EAAAD,EAAAE,KAAAC,MAAA8H,OAAAjB,GACA5B,cAOIpF,OAAAA,WACHoF,gBAUZ5B,GA3CarC,SAAA2B,qBAAAU,GAAArC,SAAA4B,qBA4CdS,GAAArC,SAAU6B,sBAAWQ,GAAArC,SAAA8B,kBACjBiF,GAAAA,SAAOC,0BAAP,CA7CU,GAAA/B,EANJ,QAAlB5C,GAwDP,IAAArC,UAAA2B,oBACDsD,EAAAxF,cAAAO,SAAAN,aACK2C,MACD,KAAArC,UAAA4B,oBACIqD,EAAJxF,cAAAO,SAAAwB,aACOa,MAEH,KAAKrC,UAASgC,qBACViD,EAAYxF,cAAcO,SAASN,cACnC,MACJ,KAAKM,UAASiC,iBACVgD,EAAYxF,cAAcO,SAASwB,UACnC,MACJ,KAAKxB,UAASkC,0BACV+C,EAAYxF,cAAcO,SAASyB,oBAInCwF,SAAA,sBAAA,SAAA9B,GACJ,GAAA+B,GAAKlH,GAASoC,IAAAA,SAAAA,EAAdiD,cAAA8B,aAAA,EAAAC,UAAA,GACInC,QAAAA,MAAAA,MACAK,MAAA,kBAAAL,EAAAxE,SAhBRzB,KAAAF,EAAA,UAAAgI,OAAAI,EAAAG,KA1DwCP,OAAQhI,EAAG,UAAWgI,OAAQ,yDA6EdA,OAAA,qBAAA7B,EAAAvE,OAAAJ,cAAA,qDAChD4G,gBAAW/B,EACf4B,SACIzB,OAAkB,WAIlBC,GAAAA,IALc,CAMI,OAAAzG,EAAA,4BAAAgE,QACd4C,GAAoB,EAGT,IAAA4B,MA7EPJ,GAAKpI,EAAE,0BAA0BG,KAAK,WAgFtCiI,GAAOlG,GAAAlC,EAAAI,MAAA4D,KAGH4C,IACI6B,qBAActC,EAAgBjE,WAAUA,EAAY0B,EAAxDjC,UA5EA+G,aAAeC,sBAAwBzG,EAiFvCb,SAAAqH,aAAAhH,QAAA,kBAAAyE,EAAA5E,YACAvB,EAAAuH,QAAAlG,SAAA,SAAAmG,GAEIoB,EAAAA,MAAAA,UAAczC,YAAmBb,EACjCuD,IAAAA,GAAAA,EAAkB,UAAAvD,EACLsD,IADK7I,EACQE,KAAAC,MAAA0D,MAdlC,KAAA8D,GAPUA,GAAApC,EAAAvF,EAAA+I,OAAA,YAAAtB,EAAAvC,KAAA,KAAAkB,EAAAxE,SAAA,KAAA6F,EAAAuB,KAAA,SA7CE/I,EAAE,UAAYsF,EAAS,IAAKvF,EAAIE,KAAKC,MAAM+D,KAAK5B,UAAUkC,KAAMiD,EAAmBvC,MAAMhB,KAAK5B,UAAUqC,MAAOyB,EAAUxE,SAAWO,OA8FhK+F,OAAAC,MAAAc,QAGAC,MAAA,WAJJhB,OAAAC,MAAAc,aAiBgB,GAAAzF,GAAArC,SAAAgC,sBAAAK,GAAArC,SAAAiC,sBAAAI,GAAArC,SAAAkC,uBAAAG,GAAArC,SAAAmC,mBAAAE,GAAArC,SAAAoC,2BAAA,CAMZ4F,GAAAA,EAhBJ,QAAA3F,GAkCIjB,IAAStC,UAAEmJ,qBACJhD,EAAAxF,cAAsBO,SAAAN,aAC7BoE,MAjHI,KAAK9D,UAASiC,qBAmHlBgD,EAAAxF,cAAAO,SAAAwB,aACQ,MACJN,KAAKgH,UADDhG,sBAEJjB,EAFIxB,cAAAO,SAAAyB,cAGJ0G,MACIC,KAAAA,UAAIC,kBACJC,EAASlH,cAFPpB,SAAA0B,UAGF6G,MACA,KAAAvI,UAAAoC,2BACA6C,EAAKxF,cAAAO,SAAAC,oBAIRgH,SAAA,sBAAA,SAAA9B,GAZL,GAAA+B,GAAA,GAAA/B,IAAAC,SAAAH,EAAAI,cAAA8B,aAAA,EAAAC,UAAA,GAJJL,QAAAC,MAAAwB,MAmBAlD,MAAA,kBAAAL,EAAAxE,SACEzB,KAAuBF,EAAA,UAAWgI,OAAAI,EAAAG,KACfP,OAAAhI,EAAA,UAAAgI,OAAA,yDAAE7C,OAAAA,qBAAAA,EAAAA,OAAAA,cAAAA,qDAAnBsB,gBAAA,EADJkD,SAGAC,MAAA,WAEI,GAAAhD,IAAA,CACA,OAAA5G,EAAA,4BAAAgE,QACA4C,GAAA,GAEQiD,EAAW7J,EAAA,0BAAWG,KAAA,WAEf2J,GAASC,GAAhB/J,EAA2BgK,MAAAA,MAEnBvB,EACAzI,EAAA,cAAAkC,EAAA,YAAA0B,MAGqBgD,IACPiD,qBAAN1D,EAAA5E,WAAAW,EAAAiE,EAAAxE,SAKjB,IAAAiH,GAAAzC,EAAA1E,OAAA,IAAAS,EACa6H,GACnB,YAAAnB,EAAA,0BArBLzC,EAAAxE,SAAAH,cAAA,iBA3FgC,oBAmHhC,mBAAA2E,EAAAxE,SAAA,KAAA8G,EAAA,IACA,OAjHgC,sBAmHhC,sEACAtC,EAAAxE,SAAAH,cAAA,0BACA,OACwB,UAAAyI,KAAA,GAGxBlK,GAAA+I,OAAAD,KAEe3E,OAASgG,MAAAA,QAEX1D,MAAe,WAAmCmB,OAAWwC,MAAlBnB,eAzG5DhJ,EAAE,WAkHEA,EAAA8J,UAAIM,UAAAA,SAA4BC,EAAAjD,GA9G5B,GAAIkD,GAAUlD,EAAEmD,cAAgBnD,EAAEoD,YAAc,6BAkHpDC,OADAzF,YAAA,eAAAsF,GAAAI,eAAAvF,cACAsF,IAGKzK,EAAA,uBAHoC2K,WAIrCC,KAAA,SACItI,SAAAA,iBACHuI,eANoCC,iBAOrCC,QAAA,uFAPqC1I,UAAA2I,MAUrC,0FAIWxI,UAAOtB,OACjBmB,UAAA4I,OAfL,iCAmBA/B,aACAH,KAAA,OAAAvC,MAAA,SAAA0E,IAAA,qBA/GSnC,KAAQ,SAAUvC,MAAS,WAAY0E,IAAO,uBAiHvDnC,KAAA,cAAAvC,MAAA,cAAA0E,IAAA,0BACIC,KAAAA,YAAwB3E,MAAA,YAAA0E,IAAA,wBAC1BnC,KAAF,oBAA0BoC,MAA1B,eAAAD,IAAA,2BA/GSnC,KAAQ,sBAAuBvC,MAAS,iBAAkB0E,IAAO,6BAiH1EnC,KAAA,SAAAvC,MAAA,SAAA0E,IAAA,qBACAT,KAAgBU,UAAAA,MAAqB,UAAAD,IAAA,sBACjCnC,KAAA,OAAiBvC,MAAA,OAAA0E,IAAW,mBACxB5I,KAAOE,OAAOtB,MAASgC,OAAAA,IAAAA,mBAFM6F,KAAA,aAAAvC,MAAA,OAAA0E,IAAA,mBAIjCnC,KAAA,SAAiBvC,MAAA,SAAW0E,IAAA,qBACxB5I,KAAOE,cAAgBW,MAAAA,QAAAA,IAAvB,oBAL6B4F,KAAA,cAAAvC,MAAA,QAAA0E,IAAA,qBAUjC,IAAA5I,GAAAtC,EAAAmJ,WAAA,GACI7G,EAAAA,SAAcpB,GACjB8D,WAAA,cAAA,YAGDhF,EAAA+B,MAfJK,IAAAgH,SAjJJjH,KAAA,OAmDYkH,MACIC,GAAIC,QACJC,QAASlH,EAAO8I,QAChB3B,YAAa4B,KAAKC,UAAU,GAAIC,SAEhCC,EAAK,QAETC,QAAS,WACLC,OAKZ1L,GAAE,gBAAgB2L,MAAO,WACrBC,EAAM,WAAazG,iBAGvBnF,EAAE,iBAAiB2L,MAAM,WAoBjBpL,OAAOuJ,SAASC,SAAWC,eAUnC,IAAI6B,GAAkB7L,EAAE,kIACxBA,GAAE,iBAAiBgI,OAAQ6D,EAG3B,IAAIC,KACJ9L,GAAEG,KAAMmC,EAAO4B,SAASgG,gBAAiB,SAAU6B,EAAGC,GAClD,GAAI7B,GAAU6B,EAAEjD,IAChB+C,GAAOE,EAAExF,MAAM9E,QAAS,IAAK,MAAU,WAAaY,EAAOqF,UAAWwC,MAE1EM,eAAgBoB,EAAiBC,EAOjC,IAAI1B,GAA0BpK,EAAE,+GAA+G6D,SAAS,4BACxJ7D,GAAE,iBAAiBgI,OAAOoC,GAG1BK,eAAgBL,GACZ6B,sBAAuB,WACnB3J,EAAOE,OAAOtB,SAAS2B,sBAE3BqJ,sBAAuB,WACnB5J,EAAOE,OAAOtB,SAAS4B,sBAE3BqJ,uBAAwB,WACpB7J,EAAOE,OAAOtB,SAAS6B,uBAE3BqJ,mBAAoB,WAChB9J,EAAOE,OAAOtB,SAAS8B,mBAE3BqJ,4BAA6B,WACzB/J,EAAOE,OAAOtB,SAAS+B,6BAS/B,IAAIkI,GAAsBnL,EAAE,uGAAuG6D,SAAS,4BAC5I7D,GAAE,iBAAiBgI,OAAOmD,GAG1BV,eAAgBU,GACZmB,gBAAiB,WACbhK,EAAOE,OAAOtB,SAASgC,uBAE3BqJ,gBAAiB,WACbjK,EAAOE,OAAOtB,SAASiC,uBAE3BqJ,iBAAkB,WACdlK,EAAOE,OAAOtB,SAASkC,wBAE3BqJ,sBAAuB,WACnBnK,EAAOE,OAAOtB,SAASoC","file":"../scripts/galaxy.pages.js","sourcesContent":["\nvar CONTROLS =\n{\n // Item types.\n ITEM_HISTORY : \"item_history\",\n ITEM_DATASET : \"item_dataset\",\n ITEM_WORKFLOW : \"item_workflow\",\n ITEM_PAGE : \"item_page\",\n ITEM_VISUALIZATION : \"item_visualization\",\n\n // Link dialogs.\n DIALOG_HISTORY_LINK : \"link_history\",\n DIALOG_DATASET_LINK : \"link_dataset\",\n DIALOG_WORKFLOW_LINK : \"link_workflow\",\n DIALOG_PAGE_LINK : \"link_page\",\n DIALOG_VISUALIZATION_LINK : \"link_visualization\",\n\n // Embed dialogs.\n DIALOG_EMBED_HISTORY : \"embed_history\",\n DIALOG_EMBED_DATASET : \"embed_dataset\",\n DIALOG_EMBED_WORKFLOW : \"embed_workflow\",\n DIALOG_EMBED_PAGE : \"embed_page\",\n DIALOG_EMBED_VISUALIZATION : \"embed_visualization\"\n};\n\n// Initialize Galaxy elements.\nfunction init_galaxy_elts(wym)\n{\n // Set up events to make annotation easy.\n $('.annotation', wym._doc.body).each( function()\n {\n $(this).click( function() {\n // Works in Safari, not in Firefox.\n var range = wym._doc.createRange();\n range.selectNodeContents( this );\n var selection = window.getSelection();\n selection.removeAllRanges();\n selection.addRange(range);\n var t = \"\";\n });\n });\n\n};\n\n// Based on the dialog type, return a dictionary of information about an item\nfunction get_item_info( dialog_type )\n{\n var\n item_singular,\n item_plural,\n item_controller;\n switch( dialog_type ) {\n case( CONTROLS.ITEM_HISTORY ):\n item_singular = \"History\";\n item_plural = \"Histories\";\n item_controller = \"history\";\n item_class = \"History\";\n break;\n case( CONTROLS.ITEM_DATASET ):\n item_singular = \"Dataset\";\n item_plural = \"Datasets\";\n item_controller = \"dataset\";\n item_class = \"HistoryDatasetAssociation\";\n break;\n case( CONTROLS.ITEM_WORKFLOW ):\n item_singular = \"Workflow\";\n item_plural = \"Workflows\";\n item_controller = \"workflow\";\n item_class = \"StoredWorkflow\";\n break;\n case( CONTROLS.ITEM_PAGE ):\n item_singular = \"Page\";\n item_plural = \"Pages\";\n item_controller = \"page\";\n item_class = \"Page\";\n break;\n case( CONTROLS.ITEM_VISUALIZATION ):\n item_singular = \"Visualization\";\n item_plural = \"Visualizations\";\n item_controller = \"visualization\";\n item_class = \"Visualization\";\n break;\n }\n\n // Build ajax URL that lists items for selection.\n var item_list_action = \"list_\" + item_plural.toLowerCase() + \"_for_selection\";\n var ajax_url = list_objects_url.replace( \"LIST_ACTION\", item_list_action );\n\n // Set up and return dict.\n return {\n singular : item_singular,\n plural : item_plural,\n controller : item_controller,\n iclass : item_class,\n list_ajax_url : ajax_url\n };\n};\n\n// Make an item importable.\nfunction make_item_importable( item_controller, item_id, item_type )\n{\n ajax_url = set_accessible_url.replace( \"ITEM_CONTROLLER\", item_controller );\n $.ajax({\n type: \"POST\",\n url: ajax_url,\n data: { id: item_id, accessible: 'True' },\n error: function() { alert(\"Making \" + item_type + \" accessible failed\"); }\n });\n};\n\n// Completely replace WYM's dialog handling\nWYMeditor.editor.prototype.dialog = function( dialogType, dialogFeatures, bodyHtml ) {\n\n var wym = this;\n var sStamp = wym.uniqueStamp();\n var selected = wym.selected();\n\n // Swap out URL attribute for id/name attribute in link creation to enable anchor creation in page.\n function set_link_id()\n {\n // When \"set link id\" link clicked, update UI.\n $('#set_link_id').click( function()\n {\n // Set label.\n $(\"#link_attribute_label\").text(\"ID/Name\");\n\n // Set input elt class, value.\n var attribute_input = $(\".wym_href\");\n attribute_input.addClass(\"wym_id\").removeClass(\"wym_href\");\n if (selected)\n attribute_input.val( $(selected).attr('id') );\n\n // Remove link.\n $(this).remove();\n });\n }\n\n // LINK DIALOG\n if ( dialogType == WYMeditor.DIALOG_LINK ) {\n if(selected) {\n $(wym._options.hrefSelector).val($(selected).attr(WYMeditor.HREF));\n $(wym._options.srcSelector).val($(selected).attr(WYMeditor.SRC));\n $(wym._options.titleSelector).val($(selected).attr(WYMeditor.TITLE));\n $(wym._options.altSelector).val($(selected).attr(WYMeditor.ALT));\n }\n // Get current URL, title.\n var curURL, curTitle;\n if (selected)\n {\n curURL = $(selected).attr(\"href\");\n if (curURL == undefined)\n curURL = \"\";\n curTitle = $(selected).attr(\"title\");\n if (curTitle == undefined)\n curTitle = \"\";\n }\n show_modal(\n \"Create Link\",\n \"

\"\n + \"

\",\n {\n \"Make link\": function() {\n // Get URL, name/title.\n var sUrl = $(wym._options.hrefSelector).val() || '',\n sId = $(\".wym_id\").val() || '',\n sName = $(wym._options.titleSelector).val() || '';\n\n if (sUrl || sId) {\n // Create link.\n wym._exec(WYMeditor.CREATE_LINK, sStamp);\n\n // Set link attributes.\n var link = $(\"a[href=\" + sStamp + \"]\", wym._doc.body);\n link.attr(WYMeditor.HREF, sUrl)\n .attr(WYMeditor.TITLE, sName)\n .attr(\"id\", sId);\n\n // If link's text is default (wym-...), change it to the title.\n if (link.text().indexOf('wym-') === 0) {\n link.text(sName);\n }\n }\n hide_modal();\n },\n \"Cancel\": function() {\n hide_modal();\n }\n },\n {},\n set_link_id\n );\n }\n\n // IMAGE DIALOG\n if ( dialogType == WYMeditor.DIALOG_IMAGE ) {\n if(wym._selected_image) {\n $(wym._options.dialogImageSelector + \" \" + wym._options.srcSelector)\n .val($(wym._selected_image).attr(WYMeditor.SRC));\n $(wym._options.dialogImageSelector + \" \" + wym._options.titleSelector)\n .val($(wym._selected_image).attr(WYMeditor.TITLE));\n $(wym._options.dialogImageSelector + \" \" + wym._options.altSelector)\n .val($(wym._selected_image).attr(WYMeditor.ALT));\n }\n show_modal(\n \"Image\",\n \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\",\n {\n \"Insert\": function() {\n var sUrl = $(wym._options.srcSelector).val();\n if(sUrl.length > 0) {\n wym._exec(WYMeditor.INSERT_IMAGE, sStamp);\n $(\"img[src$=\" + sStamp + \"]\", wym._doc.body)\n .attr(WYMeditor.SRC, sUrl)\n .attr(WYMeditor.TITLE, $(wym._options.titleSelector).val())\n .attr(WYMeditor.ALT, $(wym._options.altSelector).val());\n }\n hide_modal();\n },\n \"Cancel\": function() {\n hide_modal();\n }\n }\n );\n return;\n }\n\n // TABLE DIALOG\n if ( dialogType == WYMeditor.DIALOG_TABLE ) {\n show_modal(\n \"Table\",\n \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"\"\n + \"
\",\n {\n \"Insert\": function() {\n var iRows = $(wym._options.rowsSelector).val();\n var iCols = $(wym._options.colsSelector).val();\n\n if(iRows > 0 && iCols > 0) {\n\n var table = wym._doc.createElement(WYMeditor.TABLE);\n var newRow = null;\n var newCol = null;\n\n var sCaption = $(wym._options.captionSelector).val();\n\n //we create the caption\n var newCaption = table.createCaption();\n newCaption.innerHTML = sCaption;\n\n //we create the rows and cells\n for(x=0; x' ).append( grid.$el )\n .append( $( '
' ).append( '' )\n .append( 'Make the selected ' + item_info.plural.toLowerCase() + ' accessible so that they can viewed by everyone.' ) ),\n closing_events : true,\n buttons : {\n 'Insert': function() {\n // Make selected items accessible (importable) ?\n var make_importable = false;\n if ( $('#make-importable:checked').val() != null )\n make_importable = true;\n\n // Insert links to history for each checked item.\n var item_ids = new Array();\n grid.$('input[name=id]:checked').each(function() {\n var item_id = $(this).val();\n\n // Make item importable?\n if (make_importable)\n make_item_importable(item_info.controller, item_id, item_info.singular);\n\n // Insert link(s) to item(s). This is done by getting item info and then manipulating wym.\n url_template = get_name_and_link_url + item_id;\n ajax_url = url_template.replace( \"ITEM_CONTROLLER\", item_info.controller);\n $.getJSON( ajax_url, function( returned_item_info ) {\n // Get link text.\n wym._exec(WYMeditor.CREATE_LINK, sStamp);\n var link_text = $(\"a[href=\" + sStamp + \"]\", wym._doc.body).text();\n\n // Insert link: need to do different actions depending on link text.\n if (\n link_text == \"\" // Firefox.\n ||\n link_text == sStamp // Safari\n )\n {\n // User selected no text; create link from scratch and use default text.\n wym.insert(\"\" + item_info.singular + \" '\" + returned_item_info.name + \"'\");\n }\n else\n {\n // Link created from selected text; add href and title.\n $(\"a[href=\" + sStamp + \"]\", wym._doc.body).attr(WYMeditor.HREF, returned_item_info.link).attr(WYMeditor.TITLE, item_info.singular + item_id);\n }\n });\n });\n Galaxy.modal.hide();\n\n },\n 'Close' : function() {\n Galaxy.modal.hide();\n }\n }\n });\n });\n }\n // EMBED GALAXY OBJECT DIALOGS\n if ( dialogType == CONTROLS.DIALOG_EMBED_HISTORY || dialogType == CONTROLS.DIALOG_EMBED_DATASET || dialogType == CONTROLS.DIALOG_EMBED_WORKFLOW || dialogType == CONTROLS.DIALOG_EMBED_PAGE || dialogType == CONTROLS.DIALOG_EMBED_VISUALIZATION ) {\n // Based on item type, set useful vars.\n var item_info;\n switch(dialogType)\n {\n case(CONTROLS.DIALOG_EMBED_HISTORY):\n item_info = get_item_info(CONTROLS.ITEM_HISTORY);\n break;\n case(CONTROLS.DIALOG_EMBED_DATASET):\n item_info = get_item_info(CONTROLS.ITEM_DATASET);\n break;\n case(CONTROLS.DIALOG_EMBED_WORKFLOW):\n item_info = get_item_info(CONTROLS.ITEM_WORKFLOW);\n break;\n case(CONTROLS.DIALOG_EMBED_PAGE):\n item_info = get_item_info(CONTROLS.ITEM_PAGE);\n break;\n case(CONTROLS.DIALOG_EMBED_VISUALIZATION):\n item_info = get_item_info(CONTROLS.ITEM_VISUALIZATION);\n break;\n }\n\n require( [ 'mvc/grid/grid-view' ], function( GridView ) {\n var grid = new GridView( { url_base: item_info.list_ajax_url, dict_format: true, embedded: true } );\n Galaxy.modal.show({\n title : 'Insert Link to ' + item_info.singular,\n body : $( '
' ).append( grid.$el )\n .append( $( '
' ).append( '' )\n .append( 'Make the selected ' + item_info.plural.toLowerCase() + ' accessible so that they can viewed by everyone.' ) ),\n closing_events : true,\n buttons : {\n 'Embed': function() {\n // Make selected items accessible (importable) ?\n var make_importable = false;\n if ( $('#make-importable:checked').val() != null )\n make_importable = true;\n\n grid.$('input[name=id]:checked').each(function() {\n // Get item ID and name.\n var item_id = $(this).val();\n // Use ':first' because there are many labels in table; the first one is the item name.\n var item_name = $(\"label[for='\" + item_id + \"']:first\").text();\n\n if (make_importable)\n make_item_importable(item_info.controller, item_id, item_info.singular);\n\n // Embedded item HTML; item class is embedded in div container classes; this is necessary because the editor strips\n // all non-standard attributes when it returns its content (e.g. it will not return an element attribute of the form\n // item_class='History').\n var item_elt_id = item_info.iclass + \"-\" + item_id;\n var item_embed_html = [\n \"
\",\n \"

\",\n \"Embedded Galaxy \", item_info.singular, \" '\", item_name, \"'\",\n \"

\",\n \"

\",\n \"[Do not edit this block; Galaxy will fill it in with the annotated \",\n item_info.singular.toLowerCase(), \" when it is displayed.]\",\n \"

\",\n \"
\" ].join( '' );\n\n // Insert embedded item into document.\n wym.insert(item_embed_html);\n });\n Galaxy.modal.hide();\n },\n 'Close' : function() {\n Galaxy.modal.hide();\n }\n }\n });\n });\n }\n};\n\n$(function(){\n // Generic error handling\n $(document).ajaxError( function ( e, x ) {\n // console.log( e, x );\n var message = x.responseText || x.statusText || \"Could not connect to server\";\n show_modal( \"Server error\", message, { \"Ignore error\" : hide_modal } );\n return false;\n });\n // Create editor\n $(\"[name=page_content]\").wymeditor( {\n skin: 'galaxy',\n basePath: editor_base_path,\n iframeBasePath: iframe_base_path,\n boxHtml: \"\"\n + \"\"\n + \"
\"\n + WYMeditor.TOOLS\n + \"
\"\n + \"
\"\n // + WYMeditor.HTML\n + WYMeditor.IFRAME\n + WYMeditor.STATUS\n + \"
\"\n + \"\"\n + \"
\",\n toolsItems: [\n {'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},\n {'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},\n {'name': 'Superscript', 'title': 'Superscript', 'css': 'wym_tools_superscript'},\n {'name': 'Subscript', 'title': 'Subscript', 'css': 'wym_tools_subscript'},\n {'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},\n {'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},\n {'name': 'Indent', 'title': 'Indent', 'css': 'wym_tools_indent'},\n {'name': 'Outdent', 'title': 'Outdent', 'css': 'wym_tools_outdent'},\n {'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},\n {'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'},\n {'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},\n {'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'},\n {'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'},\n {'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'},\n ]\n });\n // Get the editor object\n var editor = $.wymeditors(0);\n var save = function ( callback ) {\n show_modal( \"Saving page\", \"progress\" );\n\n // Do save.\n $.ajax( {\n url: save_url,\n type: \"POST\",\n data: {\n id: page_id,\n content: editor.xhtml(),\n annotations: JSON.stringify(new Object()),\n // annotations: JSON.stringify(annotations),\n \"_\": \"true\"\n },\n success: function() {\n callback();\n }\n });\n }\n // Save button\n $(\"#save-button\").click( function() {\n save( function() { hide_modal(); } )\n });\n // Close button\n $(\"#close-button\").click(function() {\n // var new_content = editor.xhtml();\n // var changed = ( initial_content != new_content );\n var changed = false;\n if ( changed ) {\n var do_close = function() {\n window.onbeforeunload = undefined;\n window.document.location = page_list_url;\n };\n show_modal( \"Close editor\",\n \"There are unsaved changes to your page which will be lost.\",\n {\n \"Cancel\" : hide_modal,\n \"Save Changes\" : function() {\n save( do_close );\n }\n }, {\n \"Don't Save\": do_close\n } );\n } else {\n window.document.location = page_list_url;\n }\n });\n\n // Initialize galaxy elements.\n //init_galaxy_elts(editor);\n\n //\n // Containers, Galaxy style\n //\n var containers_menu = $(\"\");\n $(\".wym_area_top\").append( containers_menu );\n\n // Add menu options.\n var items = {}\n $.each( editor._options.containersItems, function( k, v ) {\n var tagname = v.name;\n items[ v.title.replace( '_', ' ' ) ] = function() { editor.container( tagname ) }\n });\n make_popupmenu( containers_menu, items);\n\n //\n // Create 'Insert Link to Galaxy Object' menu.\n //\n\n // Add menu button.\n var insert_link_menu_button = $(\"\").addClass('galaxy-page-editor-button');\n $(\".wym_area_top\").append(insert_link_menu_button);\n\n // Add menu options.\n make_popupmenu( insert_link_menu_button, {\n \"Insert History Link\": function() {\n editor.dialog(CONTROLS.DIALOG_HISTORY_LINK);\n },\n \"Insert Dataset Link\": function() {\n editor.dialog(CONTROLS.DIALOG_DATASET_LINK);\n },\n \"Insert Workflow Link\": function() {\n editor.dialog(CONTROLS.DIALOG_WORKFLOW_LINK);\n },\n \"Insert Page Link\": function() {\n editor.dialog(CONTROLS.DIALOG_PAGE_LINK);\n },\n \"Insert Visualization Link\": function() {\n editor.dialog(CONTROLS.DIALOG_VISUALIZATION_LINK);\n },\n });\n\n //\n // Create 'Embed Galaxy Object' menu.\n //\n\n // Add menu button.\n var embed_object_button = $(\"\").addClass('galaxy-page-editor-button');\n $(\".wym_area_top\").append(embed_object_button);\n\n // Add menu options.\n make_popupmenu( embed_object_button, {\n \"Embed History\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_HISTORY);\n },\n \"Embed Dataset\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_DATASET);\n },\n \"Embed Workflow\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_WORKFLOW);\n },\n \"Embed Visualization\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_VISUALIZATION);\n },\n //\"Embed Page\": function() {\n // editor.dialog(CONTROLS.DIALOG_EMBED_PAGE);\n //}\n });\n});\n"]} \ No newline at end of file +{"version":3,"sources":["galaxy.pages.js"],"names":["init_galaxy_elts","wym","$","_doc","body","each","this","range","selection","window","addRange","getSelection","removeAllRanges","get_item_info","ITEM_HISTORY","item_plural","item_controller","item_class","dialog_type","item_singular","CONTROLS","ITEM_VISUALIZATION","item_list_action","ajax_url","list_objects_url","controller","toLowerCase","iclass","replace","singular","plural","make_item_importable","set_accessible_url","ajax","alert","item_type","item_id","type","url","WYMeditor","editor","prototype","dialog","error","ITEM_DATASET","ITEM_WORKFLOW","ITEM_PAGE","DIALOG_HISTORY_LINK","DIALOG_DATASET_LINK","DIALOG_WORKFLOW_LINK","DIALOG_PAGE_LINK","DIALOG_VISUALIZATION_LINK","DIALOG_EMBED_HISTORY","DIALOG_EMBED_DATASET","DIALOG_EMBED_WORKFLOW","DIALOG_EMBED_PAGE","DIALOG_EMBED_VISUALIZATION","dialogType","dialogFeatures","bodyHtml","uniqueStamp","selected","DIALOG_LINK","curURL","undefined","attr","HREF","curTitle","val","SRC","TITLE","_options","altSelector","ALT","sName","sUrl","_exec","show_modal","link","text","hrefSelector","hide_modal","titleSelector","set_link_id","CREATE_LINK","sStamp","DIALOG_IMAGE","_selected_image","dialogImageSelector","indexOf","attribute_input","addClass","removeClass","srcSelector","iRows","rowsSelector","iCols","colsSelector","newRow","length","INSERT_IMAGE","item_info","Insert","GridView","url_base","list_ajax_url","title","closing_events","createElement","TABLE","make_importable","captionSelector","table","createCaption","innerHTML","sCaption","x","insertRow","y","getJSON","returned_item_info","node","link_text","container","MAIN_CONTAINERS","get","parentNode","after","append","Galaxy","modal","require","grid","dict_format","embedded","$el","Array","item_name","url_template","get_name_and_link_url","item_elt_id","item_embed_html","insert","name","hide","Close","toolsItems","wymeditors","save_url","data","id","page_id","content","annotations","show","buttons","Embed","do_close","document","location","page_list_url","join","containersItems","tagname","insert_link_menu_button","e","message","responseText","statusText","make_popupmenu","Ignore error","wymeditor","skin","iframeBasePath","iframe_base_path","boxHtml","TOOLS","STATUS","css","embed_object_button","xhtml","JSON","stringify","Object","_","success","callback","click","save","containers_menu","items","k","v","Insert History Link","Insert Dataset Link","Insert Workflow Link","Insert Page Link","Insert Visualization Link","Embed History","Embed Dataset","Embed Workflow","Embed Visualization"],"mappings":"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","file":"../scripts/galaxy.pages.js","sourcesContent":["\nvar CONTROLS =\n{\n // Item types.\n ITEM_HISTORY : \"item_history\",\n ITEM_DATASET : \"item_dataset\",\n ITEM_WORKFLOW : \"item_workflow\",\n ITEM_PAGE : \"item_page\",\n ITEM_VISUALIZATION : \"item_visualization\",\n\n // Link dialogs.\n DIALOG_HISTORY_LINK : \"link_history\",\n DIALOG_DATASET_LINK : \"link_dataset\",\n DIALOG_WORKFLOW_LINK : \"link_workflow\",\n DIALOG_PAGE_LINK : \"link_page\",\n DIALOG_VISUALIZATION_LINK : \"link_visualization\",\n\n // Embed dialogs.\n DIALOG_EMBED_HISTORY : \"embed_history\",\n DIALOG_EMBED_DATASET : \"embed_dataset\",\n DIALOG_EMBED_WORKFLOW : \"embed_workflow\",\n DIALOG_EMBED_PAGE : \"embed_page\",\n DIALOG_EMBED_VISUALIZATION : \"embed_visualization\"\n};\n\n// Initialize Galaxy elements.\nfunction init_galaxy_elts(wym)\n{\n // Set up events to make annotation easy.\n $('.annotation', wym._doc.body).each( function()\n {\n $(this).click( function() {\n // Works in Safari, not in Firefox.\n var range = wym._doc.createRange();\n range.selectNodeContents( this );\n var selection = window.getSelection();\n selection.removeAllRanges();\n selection.addRange(range);\n var t = \"\";\n });\n });\n\n};\n\n// Based on the dialog type, return a dictionary of information about an item\nfunction get_item_info( dialog_type )\n{\n var\n item_singular,\n item_plural,\n item_controller;\n switch( dialog_type ) {\n case( CONTROLS.ITEM_HISTORY ):\n item_singular = \"History\";\n item_plural = \"Histories\";\n item_controller = \"history\";\n item_class = \"History\";\n break;\n case( CONTROLS.ITEM_DATASET ):\n item_singular = \"Dataset\";\n item_plural = \"Datasets\";\n item_controller = \"dataset\";\n item_class = \"HistoryDatasetAssociation\";\n break;\n case( CONTROLS.ITEM_WORKFLOW ):\n item_singular = \"Workflow\";\n item_plural = \"Workflows\";\n item_controller = \"workflow\";\n item_class = \"StoredWorkflow\";\n break;\n case( CONTROLS.ITEM_PAGE ):\n item_singular = \"Page\";\n item_plural = \"Pages\";\n item_controller = \"page\";\n item_class = \"Page\";\n break;\n case( CONTROLS.ITEM_VISUALIZATION ):\n item_singular = \"Visualization\";\n item_plural = \"Visualizations\";\n item_controller = \"visualization\";\n item_class = \"Visualization\";\n break;\n }\n\n // Build ajax URL that lists items for selection.\n var item_list_action = \"list_\" + item_plural.toLowerCase() + \"_for_selection\";\n var ajax_url = list_objects_url.replace( \"LIST_ACTION\", item_list_action );\n\n // Set up and return dict.\n return {\n singular : item_singular,\n plural : item_plural,\n controller : item_controller,\n iclass : item_class,\n list_ajax_url : ajax_url\n };\n};\n\n// Make an item importable.\nfunction make_item_importable( item_controller, item_id, item_type )\n{\n ajax_url = set_accessible_url.replace( \"ITEM_CONTROLLER\", item_controller );\n $.ajax({\n type: \"POST\",\n url: ajax_url,\n data: { id: item_id, accessible: 'True' },\n error: function() { alert(\"Making \" + item_type + \" accessible failed\"); }\n });\n};\n\n// Completely replace WYM's dialog handling\nWYMeditor.editor.prototype.dialog = function( dialogType, dialogFeatures, bodyHtml ) {\n\n var wym = this;\n var sStamp = wym.uniqueStamp();\n var selected = wym.selected();\n\n // Swap out URL attribute for id/name attribute in link creation to enable anchor creation in page.\n function set_link_id()\n {\n // When \"set link id\" link clicked, update UI.\n $('#set_link_id').click( function()\n {\n // Set label.\n $(\"#link_attribute_label\").text(\"ID/Name\");\n\n // Set input elt class, value.\n var attribute_input = $(\".wym_href\");\n attribute_input.addClass(\"wym_id\").removeClass(\"wym_href\");\n if (selected)\n attribute_input.val( $(selected).attr('id') );\n\n // Remove link.\n $(this).remove();\n });\n }\n\n // LINK DIALOG\n if ( dialogType == WYMeditor.DIALOG_LINK ) {\n if(selected) {\n $(wym._options.hrefSelector).val($(selected).attr(WYMeditor.HREF));\n $(wym._options.srcSelector).val($(selected).attr(WYMeditor.SRC));\n $(wym._options.titleSelector).val($(selected).attr(WYMeditor.TITLE));\n $(wym._options.altSelector).val($(selected).attr(WYMeditor.ALT));\n }\n // Get current URL, title.\n var curURL, curTitle;\n if (selected)\n {\n curURL = $(selected).attr(\"href\");\n if (curURL == undefined)\n curURL = \"\";\n curTitle = $(selected).attr(\"title\");\n if (curTitle == undefined)\n curTitle = \"\";\n }\n show_modal(\n \"Create Link\",\n \"
\"\n + \"

\",\n {\n \"Make link\": function() {\n // Get URL, name/title.\n var sUrl = $(wym._options.hrefSelector).val() || '',\n sId = $(\".wym_id\").val() || '',\n sName = $(wym._options.titleSelector).val() || '';\n\n if (sUrl || sId) {\n // Create link.\n wym._exec(WYMeditor.CREATE_LINK, sStamp);\n\n // Set link attributes.\n var link = $(\"a[href=\" + sStamp + \"]\", wym._doc.body);\n link.attr(WYMeditor.HREF, sUrl)\n .attr(WYMeditor.TITLE, sName)\n .attr(\"id\", sId);\n\n // If link's text is default (wym-...), change it to the title.\n if (link.text().indexOf('wym-') === 0) {\n link.text(sName);\n }\n }\n hide_modal();\n },\n \"Cancel\": function() {\n hide_modal();\n }\n },\n {},\n set_link_id\n );\n }\n\n // IMAGE DIALOG\n if ( dialogType == WYMeditor.DIALOG_IMAGE ) {\n if(wym._selected_image) {\n $(wym._options.dialogImageSelector + \" \" + wym._options.srcSelector)\n .val($(wym._selected_image).attr(WYMeditor.SRC));\n $(wym._options.dialogImageSelector + \" \" + wym._options.titleSelector)\n .val($(wym._selected_image).attr(WYMeditor.TITLE));\n $(wym._options.dialogImageSelector + \" \" + wym._options.altSelector)\n .val($(wym._selected_image).attr(WYMeditor.ALT));\n }\n show_modal(\n \"Image\",\n \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\",\n {\n \"Insert\": function() {\n var sUrl = $(wym._options.srcSelector).val();\n if(sUrl.length > 0) {\n wym._exec(WYMeditor.INSERT_IMAGE, sStamp);\n $(\"img[src$=\" + sStamp + \"]\", wym._doc.body)\n .attr(WYMeditor.SRC, sUrl)\n .attr(WYMeditor.TITLE, $(wym._options.titleSelector).val())\n .attr(WYMeditor.ALT, $(wym._options.altSelector).val());\n }\n hide_modal();\n },\n \"Cancel\": function() {\n hide_modal();\n }\n }\n );\n return;\n }\n\n // TABLE DIALOG\n if ( dialogType == WYMeditor.DIALOG_TABLE ) {\n show_modal(\n \"Table\",\n \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"\"\n + \"
\"\n + \"
\"\n + \"\"\n + \"\"\n + \"
\",\n {\n \"Insert\": function() {\n var iRows = $(wym._options.rowsSelector).val();\n var iCols = $(wym._options.colsSelector).val();\n\n if(iRows > 0 && iCols > 0) {\n\n var table = wym._doc.createElement(WYMeditor.TABLE);\n var newRow = null;\n var newCol = null;\n\n var sCaption = $(wym._options.captionSelector).val();\n\n //we create the caption\n var newCaption = table.createCaption();\n newCaption.innerHTML = sCaption;\n\n //we create the rows and cells\n for(x=0; x' ).append( grid.$el )\n .append( $( '
' ).append( '' )\n .append( 'Make the selected ' + item_info.plural.toLowerCase() + ' accessible so that they can viewed by everyone.' ) ),\n closing_events : true,\n buttons : {\n 'Insert': function() {\n // Make selected items accessible (importable) ?\n var make_importable = false;\n if ( $('#make-importable:checked').val() != null )\n make_importable = true;\n\n // Insert links to history for each checked item.\n var item_ids = new Array();\n grid.$('input[name=id]:checked').each(function() {\n var item_id = $(this).val();\n\n // Make item importable?\n if (make_importable)\n make_item_importable(item_info.controller, item_id, item_info.singular);\n\n // Insert link(s) to item(s). This is done by getting item info and then manipulating wym.\n url_template = get_name_and_link_url + item_id;\n ajax_url = url_template.replace( \"ITEM_CONTROLLER\", item_info.controller);\n $.getJSON( ajax_url, function( returned_item_info ) {\n // Get link text.\n wym._exec(WYMeditor.CREATE_LINK, sStamp);\n var link_text = $(\"a[href=\" + sStamp + \"]\", wym._doc.body).text();\n\n // Insert link: need to do different actions depending on link text.\n if (\n link_text == \"\" // Firefox.\n ||\n link_text == sStamp // Safari\n )\n {\n // User selected no text; create link from scratch and use default text.\n wym.insert(\"\" + item_info.singular + \" '\" + returned_item_info.name + \"'\");\n }\n else\n {\n // Link created from selected text; add href and title.\n $(\"a[href=\" + sStamp + \"]\", wym._doc.body).attr(WYMeditor.HREF, returned_item_info.link).attr(WYMeditor.TITLE, item_info.singular + item_id);\n }\n });\n });\n Galaxy.modal.hide();\n\n },\n 'Close' : function() {\n Galaxy.modal.hide();\n }\n }\n });\n });\n }\n // EMBED GALAXY OBJECT DIALOGS\n if ( dialogType == CONTROLS.DIALOG_EMBED_HISTORY || dialogType == CONTROLS.DIALOG_EMBED_DATASET || dialogType == CONTROLS.DIALOG_EMBED_WORKFLOW || dialogType == CONTROLS.DIALOG_EMBED_PAGE || dialogType == CONTROLS.DIALOG_EMBED_VISUALIZATION ) {\n // Based on item type, set useful vars.\n var item_info;\n switch(dialogType)\n {\n case(CONTROLS.DIALOG_EMBED_HISTORY):\n item_info = get_item_info(CONTROLS.ITEM_HISTORY);\n break;\n case(CONTROLS.DIALOG_EMBED_DATASET):\n item_info = get_item_info(CONTROLS.ITEM_DATASET);\n break;\n case(CONTROLS.DIALOG_EMBED_WORKFLOW):\n item_info = get_item_info(CONTROLS.ITEM_WORKFLOW);\n break;\n case(CONTROLS.DIALOG_EMBED_PAGE):\n item_info = get_item_info(CONTROLS.ITEM_PAGE);\n break;\n case(CONTROLS.DIALOG_EMBED_VISUALIZATION):\n item_info = get_item_info(CONTROLS.ITEM_VISUALIZATION);\n break;\n }\n\n require( [ 'mvc/grid/grid-view' ], function( GridView ) {\n var grid = new GridView( { url_base: item_info.list_ajax_url, dict_format: true, embedded: true } );\n Galaxy.modal.show({\n title : 'Insert Link to ' + item_info.singular,\n body : $( '
' ).append( grid.$el )\n .append( $( '
' ).append( '' )\n .append( 'Make the selected ' + item_info.plural.toLowerCase() + ' accessible so that they can viewed by everyone.' ) ),\n closing_events : true,\n buttons : {\n 'Embed': function() {\n // Make selected items accessible (importable) ?\n var make_importable = false;\n if ( $('#make-importable:checked').val() != null )\n make_importable = true;\n\n grid.$('input[name=id]:checked').each(function() {\n // Get item ID and name.\n var item_id = $(this).val();\n // Use ':first' because there are many labels in table; the first one is the item name.\n var item_name = $(\"label[for='\" + item_id + \"']:first\").text();\n\n if (make_importable)\n make_item_importable(item_info.controller, item_id, item_info.singular);\n\n // Embedded item HTML; item class is embedded in div container classes; this is necessary because the editor strips\n // all non-standard attributes when it returns its content (e.g. it will not return an element attribute of the form\n // item_class='History').\n var item_elt_id = item_info.iclass + \"-\" + item_id;\n var item_embed_html = [\n \"
\",\n \"

\",\n \"Embedded Galaxy \", item_info.singular, \" '\", item_name, \"'\",\n \"

\",\n \"

\",\n \"[Do not edit this block; Galaxy will fill it in with the annotated \",\n item_info.singular.toLowerCase(), \" when it is displayed.]\",\n \"

\",\n \"
\" ].join( '' );\n\n // Insert embedded item into document.\n wym.insert(item_embed_html);\n });\n Galaxy.modal.hide();\n },\n 'Close' : function() {\n Galaxy.modal.hide();\n }\n }\n });\n });\n }\n};\n\n$(function(){\n // Generic error handling\n $(document).ajaxError( function ( e, x ) {\n // console.log( e, x );\n var message = x.responseText || x.statusText || \"Could not connect to server\";\n show_modal( \"Server error\", message, { \"Ignore error\" : hide_modal } );\n return false;\n });\n // Create editor\n $(\"[name=page_content]\").wymeditor( {\n skin: 'galaxy',\n basePath: editor_base_path,\n iframeBasePath: iframe_base_path,\n boxHtml: \"\"\n + \"\"\n + \"
\"\n + WYMeditor.TOOLS\n + \"
\"\n + \"
\"\n // + WYMeditor.HTML\n + WYMeditor.IFRAME\n + WYMeditor.STATUS\n + \"
\"\n + \"\"\n + \"
\",\n toolsItems: [\n {'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},\n {'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},\n {'name': 'Superscript', 'title': 'Superscript', 'css': 'wym_tools_superscript'},\n {'name': 'Subscript', 'title': 'Subscript', 'css': 'wym_tools_subscript'},\n {'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},\n {'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},\n {'name': 'Indent', 'title': 'Indent', 'css': 'wym_tools_indent'},\n {'name': 'Outdent', 'title': 'Outdent', 'css': 'wym_tools_outdent'},\n {'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},\n {'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'},\n {'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},\n {'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'},\n {'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'},\n {'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'},\n ]\n });\n // Get the editor object\n var editor = $.wymeditors(0);\n var save = function ( callback ) {\n show_modal( \"Saving page\", \"progress\" );\n\n // Do save.\n $.ajax( {\n url: save_url,\n type: \"POST\",\n data: {\n id: page_id,\n content: editor.xhtml(),\n annotations: JSON.stringify(new Object()),\n // annotations: JSON.stringify(annotations),\n \"_\": \"true\"\n },\n success: function() {\n callback();\n }\n });\n }\n // Save button\n $(\"#save-button\").click( function() {\n save( function() { hide_modal(); } )\n });\n // Close button\n $(\"#close-button\").click(function() {\n // var new_content = editor.xhtml();\n // var changed = ( initial_content != new_content );\n var changed = false;\n if ( changed ) {\n var do_close = function() {\n window.onbeforeunload = undefined;\n window.document.location = page_list_url;\n };\n show_modal( \"Close editor\",\n \"There are unsaved changes to your page which will be lost.\",\n {\n \"Cancel\" : hide_modal,\n \"Save Changes\" : function() {\n save( do_close );\n }\n }, {\n \"Don't Save\": do_close\n } );\n } else {\n window.document.location = page_list_url;\n }\n });\n\n // Initialize galaxy elements.\n //init_galaxy_elts(editor);\n\n //\n // Containers, Galaxy style\n //\n var containers_menu = $(\"\");\n $(\".wym_area_top\").append( containers_menu );\n\n // Add menu options.\n var items = {}\n $.each( editor._options.containersItems, function( k, v ) {\n var tagname = v.name;\n items[ v.title.replace( '_', ' ' ) ] = function() { editor.container( tagname ) }\n });\n make_popupmenu( containers_menu, items);\n\n //\n // Create 'Insert Link to Galaxy Object' menu.\n //\n\n // Add menu button.\n var insert_link_menu_button = $(\"\").addClass('galaxy-page-editor-button');\n $(\".wym_area_top\").append(insert_link_menu_button);\n\n // Add menu options.\n make_popupmenu( insert_link_menu_button, {\n \"Insert History Link\": function() {\n editor.dialog(CONTROLS.DIALOG_HISTORY_LINK);\n },\n \"Insert Dataset Link\": function() {\n editor.dialog(CONTROLS.DIALOG_DATASET_LINK);\n },\n \"Insert Workflow Link\": function() {\n editor.dialog(CONTROLS.DIALOG_WORKFLOW_LINK);\n },\n \"Insert Page Link\": function() {\n editor.dialog(CONTROLS.DIALOG_PAGE_LINK);\n },\n \"Insert Visualization Link\": function() {\n editor.dialog(CONTROLS.DIALOG_VISUALIZATION_LINK);\n },\n });\n\n //\n // Create 'Embed Galaxy Object' menu.\n //\n\n // Add menu button.\n var embed_object_button = $(\"\").addClass('galaxy-page-editor-button');\n $(\".wym_area_top\").append(embed_object_button);\n\n // Add menu options.\n make_popupmenu( embed_object_button, {\n \"Embed History\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_HISTORY);\n },\n \"Embed Dataset\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_DATASET);\n },\n \"Embed Workflow\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_WORKFLOW);\n },\n \"Embed Visualization\": function() {\n editor.dialog(CONTROLS.DIALOG_EMBED_VISUALIZATION);\n },\n //\"Embed Page\": function() {\n // editor.dialog(CONTROLS.DIALOG_EMBED_PAGE);\n //}\n });\n});\n"]} \ No newline at end of file diff --git a/static/maps/i18n.js.map b/static/maps/i18n.js.map index 393aecd6ba7..20281c2ff3b 100644 --- a/static/maps/i18n.js.map +++ b/static/maps/i18n.js.map @@ -1 +1 @@ -{"version":3,"sources":["i18n.js"],"names":["nlsRegExp","locale","master","needed","toLoad","prefix","suffix","push","fullName","require","_fileExists","req","toUrl","mixin","target","source","force","prop","hasOwnProperty","module","masterConfig","config","version","load","name","onLoad","masterName","exec","match","split","i","current","navigator","language","userLanguage","toLowerCase","isBuild","parts","length","part","addIfExists","addPart","partBundle"],"mappings":"oOAoCC,WASG,QAAIA,GAAYC,EAAAC,EAAAC,EAAAC,EAAAC,EAAhBC,GAMQJ,EAAOD,KAJfE,EAAAI,KAAAN,IACA,IAAAC,EAAAD,IAAA,IAAAC,EAAAD,IACAG,EAAAG,KAAAF,EAAAJ,EAAA,IAAAK,IAKYF,QAAAA,GAAOG,EAAKF,EAASJ,EAASI,EAAMC,GACvC,GAAAE,GAAAH,EAAAJ,EAAA,IAAAK,CACJG,SAAAC,YAAAC,EAAAC,MAAAJ,EAAA,SACJJ,EAAAG,KAAAC,GAgBD,QAASK,GAAMC,EAAQC,EAAQC,GAC3B,GAAIC,EACJ,KAAKA,IAAQF,IACLA,EAAOG,eAAeD,IAAWH,EAAOI,eAAeD,KAASD,EAHtC,WAAvBF,QAAQC,EAAQC,OAC3BF,EAAAG,IAAAF,EAAAE,KACAH,EAAAG,OAEQH,EAAAA,EAAAG,GAAeF,EAAfE,GAAAD,IAAAF,EAAOG,GAAQF,EAAOE,GApClC,GAAAjB,GAAA,yCAyCYa,SAAAA,UAAMC,SAAAK,GACT,GAAAC,GAAAD,EAAAE,OAAAF,EAAAE,WAER,QAMOC,QAAS,QADbC,KAAO,SAAAC,EAAAb,EAAAc,EAAAJ,GACHC,EAASD,MAODA,EAAOpB,SACPmB,EAAanB,OAASoB,EAAOpB,OAGjC,IAAIyB,GAGAzB,EAAAA,EAPAoB,EAAOpB,EAAQ0B,KAAAH,GACfJ,EAAAA,EAAanB,GAChBA,EAAA2B,EAAA,GAMGtB,EAASsB,EAAM,GAJfF,EAAAA,EAAJG,MAAA,KACID,KACAvB,KACSuB,EAHb,EA2BK,IAnBDE,EARJ,IAQaC,EAAAA,EARb,GAgBIL,EAAarB,EAASC,IAJ1BoB,EAAAF,EACII,EAAJA,EAAc,GACV3B,EAAAmB,EAAAnB,OACAI,IACAqB,EAAarB,EAASC,OACnB,mBAAA0B,WAAA,QACHA,UAAAC,UACAP,UAAAQ,cAAA,QAAAC,eAEAlC,EAAAA,EAASmB,MAAAA,MAMRC,EAAAe,QAAA,CAKD,IAEAhC,EAAOG,KAAKmB,GAHZL,EAAOe,EAAS,OAAAhC,EAAAC,EAAAC,GAChBwB,EAAA,EAAAA,EAAAO,EAAAC,OAAAR,IACAS,EAAAF,EAAAP,GACA1B,IAAYsB,EAAZ,IAAA,IAAAa,EACAC,EAAA7B,EAAiBoB,EAAQ3B,EAAQC,EAAQC,EAGrCyB,GAAAA,EAAAA,WACAS,UAIAf,IAAAA,GAAAA,SAAAA,GAED,GACHc,GADGpC,IAIC,KAAAsC,EAAItC,OAAJD,EAAAC,EAAAC,EAAAC,EAAAC,GACIiC,EADJ,EAAAT,EAAAO,EAAAC,OAAAR,IAMIS,EAAOF,EAAMP,GAHjBC,IAAAA,EAAA,IAAA,IAAAQ,EACAE,EAAQV,EAAQ7B,EAAQC,EAAQC,EAAQC,EAAQC,EAI5CmC,GAAAA,EAAQV,WACX,GAAAD,GAAAY,EAAAH,CAKG,KAAKT,EAAI3B,EAAOmC,OAAS,EAAGR,GAAK,GAAK3B,EAAO2B,GAAIA,IAHrDS,EAAApC,EAAA2B,GACI1B,EAAQF,EAAYqC,IACpB,IAAOG,GAAP,IAAAA,IACKZ,EAAWQ,EAASjC,EAAGkC,EAAUpC,IAAtCG,IAEIoC,EAAAA,EAAaxC,EAIbW,GAAAA","file":"../scripts/i18n.js","sourcesContent":["/**\n * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/i18n for details\n */\n/*jslint regexp: true */\n/*global require: false, navigator: false, define: false */\n\n/**\n * This plugin handles i18n! prefixed modules. It does the following:\n *\n * 1) A regular module can have a dependency on an i18n bundle, but the regular\n * module does not want to specify what locale to load. So it just specifies\n * the top-level bundle, like \"i18n!nls/colors\".\n *\n * This plugin will load the i18n bundle at nls/colors, see that it is a root/master\n * bundle since it does not have a locale in its name. It will then try to find\n * the best match locale available in that master bundle, then request all the\n * locale pieces for that best match locale. For instance, if the locale is \"en-us\",\n * then the plugin will ask for the \"en-us\", \"en\" and \"root\" bundles to be loaded\n * (but only if they are specified on the master bundle).\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/colors bundle to be that mixed in locale.\n *\n * 2) A regular module specifies a specific locale to load. For instance,\n * i18n!nls/fr-fr/colors. In this case, the plugin needs to load the master bundle\n * first, at nls/colors, then figure out what the best match locale is for fr-fr,\n * since maybe only fr or just root is defined for that locale. Once that best\n * fit is found, all of its locale pieces need to have their bundles loaded.\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/fr-fr/colors bundle to be that mixed in locale.\n */\n(function () {\n 'use strict';\n\n //regexp for reconstructing the master bundle name from parts of the regexp match\n //nlsRegExp.exec(\"foo/bar/baz/nls/en-ca/foo\") gives:\n //[\"foo/bar/baz/nls/en-ca/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"en-ca\", \"foo\"]\n //nlsRegExp.exec(\"foo/bar/baz/nls/foo\") gives:\n //[\"foo/bar/baz/nls/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"foo\", \"\"]\n //so, if match[5] is blank, it means this is the top bundle definition.\n var nlsRegExp = /(^.*(^|\\/)nls(\\/|$))([^\\/]*)\\/?([^\\/]*)/;\n\n //Helper function to avoid repeating code. Lots of arguments in the\n //desire to stay functional and support RequireJS contexts without having\n //to know about the RequireJS contexts.\n function addPart(locale, master, needed, toLoad, prefix, suffix) {\n if (master[locale]) {\n needed.push(locale);\n if (master[locale] === true || master[locale] === 1) {\n toLoad.push(prefix + locale + '/' + suffix);\n }\n }\n }\n\n function addIfExists(req, locale, toLoad, prefix, suffix) {\n var fullName = prefix + locale + '/' + suffix;\n if (require._fileExists(req.toUrl(fullName + '.js'))) {\n toLoad.push(fullName);\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n * This is not robust in IE for transferring methods that match\n * Object.prototype names, but the uses of mixin here seem unlikely to\n * trigger a problem related to that.\n */\n function mixin(target, source, force) {\n var prop;\n for (prop in source) {\n if (source.hasOwnProperty(prop) && (!target.hasOwnProperty(prop) || force)) {\n target[prop] = source[prop];\n } else if (typeof source[prop] === 'object') {\n if (!target[prop] && source[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], source[prop], force);\n }\n }\n }\n\n define(['module'], function (module) {\n var masterConfig = module.config ? module.config() : {};\n\n return {\n version: '2.0.4',\n /**\n * Called when a dependency needs to be loaded.\n */\n load: function (name, req, onLoad, config) {\n config = config || {};\n\n if (config.locale) {\n masterConfig.locale = config.locale;\n }\n\n var masterName,\n match = nlsRegExp.exec(name),\n prefix = match[1],\n locale = match[4],\n suffix = match[5],\n parts = locale.split(\"-\"),\n toLoad = [],\n value = {},\n i, part, current = \"\";\n\n //If match[5] is blank, it means this is the top bundle definition,\n //so it does not have to be handled. Locale-specific requests\n //will have a match[4] value but no match[5]\n if (match[5]) {\n //locale-specific bundle\n prefix = match[1];\n masterName = prefix + suffix;\n } else {\n //Top-level bundle.\n masterName = name;\n suffix = match[4];\n locale = masterConfig.locale;\n if (!locale) {\n locale = masterConfig.locale =\n typeof navigator === \"undefined\" ? \"root\" :\n (navigator.language ||\n navigator.userLanguage || \"root\").toLowerCase();\n }\n parts = locale.split(\"-\");\n }\n\n if (config.isBuild) {\n //Check for existence of all locale possible files and\n //require them if exist.\n toLoad.push(masterName);\n addIfExists(req, \"root\", toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addIfExists(req, current, toLoad, prefix, suffix);\n }\n\n req(toLoad, function () {\n onLoad();\n });\n } else {\n //First, fetch the master bundle, it knows what locales are available.\n req([masterName], function (master) {\n //Figure out the best fit\n var needed = [],\n part;\n\n //Always allow for root, then do the rest of the locale parts.\n addPart(\"root\", master, needed, toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addPart(current, master, needed, toLoad, prefix, suffix);\n }\n\n //Load all the parts missing.\n req(toLoad, function () {\n var i, partBundle, part;\n for (i = needed.length - 1; i > -1 && needed[i]; i--) {\n part = needed[i];\n partBundle = master[part];\n if (partBundle === true || partBundle === 1) {\n partBundle = req(prefix + part + '/' + suffix);\n }\n mixin(value, partBundle);\n }\n\n //All done, notify the loader.\n onLoad(value);\n });\n });\n }\n }\n };\n });\n}());\n"]} \ No newline at end of file +{"version":3,"sources":["i18n.js"],"names":["nlsRegExp","locale","master","needed","toLoad","prefix","suffix","push","fullName","require","_fileExists","req","toUrl","mixin","target","source","force","prop","hasOwnProperty","module","masterConfig","config","version","load","name","onLoad","masterName","exec","match","split","i","current","navigator","language","userLanguage","toLowerCase","isBuild","parts","length","part","addIfExists","addPart","partBundle"],"mappings":"oOAoCC,WASG,SAAIA,EAAYC,EAAAC,EAAAC,EAAAC,EAAAC,EAAhBC,GAMQJ,EAAOD,KAJfE,EAAAI,KAAAN,IACA,IAAAC,EAAAD,IAAA,IAAAC,EAAAD,IACAG,EAAAG,KAAAF,EAAAJ,EAAA,IAAAK,IAKYF,SAAAA,EAAOG,EAAKF,EAASJ,EAASI,EAAMC,GACvC,IAAAE,EAAAH,EAAAJ,EAAA,IAAAK,EACJG,QAAAC,YAAAC,EAAAC,MAAAJ,EAAA,SACJJ,EAAAG,KAAAC,GAgBD,SAASK,EAAMC,EAAQC,EAAQC,GAC3B,IAAIC,EACJ,IAAKA,KAAQF,GACLA,EAAOG,eAAeD,IAAWH,EAAOI,eAAeD,KAASD,EAHtC,WAAvBF,QAAQC,EAAQC,OAC3BF,EAAAG,IAAAF,EAAAE,KACAH,EAAAG,OAEQH,EAAAA,EAAAG,GAAeF,EAAfE,GAAAD,IAAAF,EAAOG,GAAQF,EAAOE,GApClC,IAAAjB,EAAA,0CAyCYa,QAAAA,UAAMC,SAAAK,GACT,IAAAC,EAAAD,EAAAE,OAAAF,EAAAE,YAER,OAMOC,QAAS,QADbC,KAAO,SAAAC,EAAAb,EAAAc,EAAAJ,IACHC,EAASD,OAOMpB,SACPmB,EAAanB,OAASoB,EAAOpB,QAGjC,IAAIyB,EAGAzB,EAAAA,EAPAoB,EAAOpB,EAAQ0B,KAAAH,GACfJ,EAAAA,EAAanB,GAChBA,EAAA2B,EAAA,GAMGtB,EAASsB,EAAM,GAJfF,EAAAA,EAAJG,MAAA,KACID,KACAvB,KACSuB,EAHb,GA2BK,GAnBDE,EARJ,GAgBIJ,GARSK,EAAAA,EARb,IAgB0BzB,GAJ1BoB,EAAAF,EACII,EAAJA,EAAc,IACV3B,EAAAmB,EAAAnB,UAEAyB,EAAarB,EAASC,OACnB,oBAAA0B,UAAA,QACHA,UAAAC,UACAP,UAAAQ,cAAA,QAAAC,eAEAlC,EAAAA,EAASmB,MAAAA,MAMRC,EAAAe,QAAA,CAKD,IAEAhC,EAAOG,KAAKmB,GAHZL,EAAOe,EAAS,OAAAhC,EAAAC,EAAAC,GAChBwB,EAAA,EAAAA,EAAAO,EAAAC,OAAAR,IACAS,EAAAF,EAAAP,GAEAU,EAAA7B,EADAP,IAAYsB,EAAZ,IAAA,IAAAa,EACyBnC,EAAQC,EAAQC,GAGrCyB,EAAAA,EAAAA,WACAS,WAIAf,GAAAA,GAAAA,SAAAA,GAED,IACHc,EADGpC,KAIC,IAAAsC,EAAItC,OAAJD,EAAAC,EAAAC,EAAAC,EAAAC,GACIiC,EADJ,EAAAT,EAAAO,EAAAC,OAAAR,IAMIS,EAAOF,EAAMP,GAFjBW,EADAV,IAAAA,EAAA,IAAA,IAAAQ,EACgBrC,EAAQC,EAAQC,EAAQC,EAAQC,GAI5CmC,EAAAA,EAAQV,WACX,IAAAD,EAAAY,EAAAH,EAKG,IAAKT,EAAI3B,EAAOmC,OAAS,EAAGR,GAAK,GAAK3B,EAAO2B,GAAIA,KADjD,KADA1B,EAAQF,EADZqC,EAAApC,EAAA2B,MAEI,IAAAY,IACKZ,EAAWQ,EAASjC,EAAGkC,EAAUpC,IAAtCG,IAEIoC,EAAAA,EAAaxC,GAIbW,EAAAA,WAvI/B","file":"../scripts/i18n.js","sourcesContent":["/**\n * @license RequireJS i18n 2.0.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/i18n for details\n */\n/*jslint regexp: true */\n/*global require: false, navigator: false, define: false */\n\n/**\n * This plugin handles i18n! prefixed modules. It does the following:\n *\n * 1) A regular module can have a dependency on an i18n bundle, but the regular\n * module does not want to specify what locale to load. So it just specifies\n * the top-level bundle, like \"i18n!nls/colors\".\n *\n * This plugin will load the i18n bundle at nls/colors, see that it is a root/master\n * bundle since it does not have a locale in its name. It will then try to find\n * the best match locale available in that master bundle, then request all the\n * locale pieces for that best match locale. For instance, if the locale is \"en-us\",\n * then the plugin will ask for the \"en-us\", \"en\" and \"root\" bundles to be loaded\n * (but only if they are specified on the master bundle).\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/colors bundle to be that mixed in locale.\n *\n * 2) A regular module specifies a specific locale to load. For instance,\n * i18n!nls/fr-fr/colors. In this case, the plugin needs to load the master bundle\n * first, at nls/colors, then figure out what the best match locale is for fr-fr,\n * since maybe only fr or just root is defined for that locale. Once that best\n * fit is found, all of its locale pieces need to have their bundles loaded.\n *\n * Once all the bundles for the locale pieces load, then it mixes in all those\n * locale pieces into each other, then finally sets the context.defined value\n * for the nls/fr-fr/colors bundle to be that mixed in locale.\n */\n(function () {\n 'use strict';\n\n //regexp for reconstructing the master bundle name from parts of the regexp match\n //nlsRegExp.exec(\"foo/bar/baz/nls/en-ca/foo\") gives:\n //[\"foo/bar/baz/nls/en-ca/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"en-ca\", \"foo\"]\n //nlsRegExp.exec(\"foo/bar/baz/nls/foo\") gives:\n //[\"foo/bar/baz/nls/foo\", \"foo/bar/baz/nls/\", \"/\", \"/\", \"foo\", \"\"]\n //so, if match[5] is blank, it means this is the top bundle definition.\n var nlsRegExp = /(^.*(^|\\/)nls(\\/|$))([^\\/]*)\\/?([^\\/]*)/;\n\n //Helper function to avoid repeating code. Lots of arguments in the\n //desire to stay functional and support RequireJS contexts without having\n //to know about the RequireJS contexts.\n function addPart(locale, master, needed, toLoad, prefix, suffix) {\n if (master[locale]) {\n needed.push(locale);\n if (master[locale] === true || master[locale] === 1) {\n toLoad.push(prefix + locale + '/' + suffix);\n }\n }\n }\n\n function addIfExists(req, locale, toLoad, prefix, suffix) {\n var fullName = prefix + locale + '/' + suffix;\n if (require._fileExists(req.toUrl(fullName + '.js'))) {\n toLoad.push(fullName);\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n * This is not robust in IE for transferring methods that match\n * Object.prototype names, but the uses of mixin here seem unlikely to\n * trigger a problem related to that.\n */\n function mixin(target, source, force) {\n var prop;\n for (prop in source) {\n if (source.hasOwnProperty(prop) && (!target.hasOwnProperty(prop) || force)) {\n target[prop] = source[prop];\n } else if (typeof source[prop] === 'object') {\n if (!target[prop] && source[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], source[prop], force);\n }\n }\n }\n\n define(['module'], function (module) {\n var masterConfig = module.config ? module.config() : {};\n\n return {\n version: '2.0.4',\n /**\n * Called when a dependency needs to be loaded.\n */\n load: function (name, req, onLoad, config) {\n config = config || {};\n\n if (config.locale) {\n masterConfig.locale = config.locale;\n }\n\n var masterName,\n match = nlsRegExp.exec(name),\n prefix = match[1],\n locale = match[4],\n suffix = match[5],\n parts = locale.split(\"-\"),\n toLoad = [],\n value = {},\n i, part, current = \"\";\n\n //If match[5] is blank, it means this is the top bundle definition,\n //so it does not have to be handled. Locale-specific requests\n //will have a match[4] value but no match[5]\n if (match[5]) {\n //locale-specific bundle\n prefix = match[1];\n masterName = prefix + suffix;\n } else {\n //Top-level bundle.\n masterName = name;\n suffix = match[4];\n locale = masterConfig.locale;\n if (!locale) {\n locale = masterConfig.locale =\n typeof navigator === \"undefined\" ? \"root\" :\n (navigator.language ||\n navigator.userLanguage || \"root\").toLowerCase();\n }\n parts = locale.split(\"-\");\n }\n\n if (config.isBuild) {\n //Check for existence of all locale possible files and\n //require them if exist.\n toLoad.push(masterName);\n addIfExists(req, \"root\", toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addIfExists(req, current, toLoad, prefix, suffix);\n }\n\n req(toLoad, function () {\n onLoad();\n });\n } else {\n //First, fetch the master bundle, it knows what locales are available.\n req([masterName], function (master) {\n //Figure out the best fit\n var needed = [],\n part;\n\n //Always allow for root, then do the rest of the locale parts.\n addPart(\"root\", master, needed, toLoad, prefix, suffix);\n for (i = 0; i < parts.length; i++) {\n part = parts[i];\n current += (current ? \"-\" : \"\") + part;\n addPart(current, master, needed, toLoad, prefix, suffix);\n }\n\n //Load all the parts missing.\n req(toLoad, function () {\n var i, partBundle, part;\n for (i = needed.length - 1; i > -1 && needed[i]; i--) {\n part = needed[i];\n partBundle = master[part];\n if (partBundle === true || partBundle === 1) {\n partBundle = req(prefix + part + '/' + suffix);\n }\n mixin(value, partBundle);\n }\n\n //All done, notify the loader.\n onLoad(value);\n });\n });\n }\n }\n };\n });\n}());\n"]} \ No newline at end of file diff --git a/static/maps/layout/generic-nav-view.js.map b/static/maps/layout/generic-nav-view.js.map index 67e7796bc05..ed2ad1d4730 100644 --- a/static/maps/layout/generic-nav-view.js.map +++ b/static/maps/layout/generic-nav-view.js.map @@ -1 +1 @@ -{"version":3,"sources":["layout/generic-nav-view.js"],"names":["define","Modal","Backbone","View","extend","initialize","GenericNavView","this","modal","makeModalIframe","e","config","communication_server_host","port","window","Galaxy","communication_server_port","username","host","attributes","persistent_communication_rooms","query_string","src","$el_chat_modal_header","$el_chat_modal_body","iframe_template","$","length","remove","body","height","frame_height","width","frame_width","closing_events","title_separator","cls","class_names","addClass","find","removeAttr","click","css","hasClass","removeClass","attr","render","navItem","tooltip","visible","onclick","self"],"mappings":"YACAA,SAAQ,mBAAoB,SAAUC,GAAtCD,GAAAA,GAAQE,SAAoBC,KAAAC,QAE5BC,WAAIC,WAGIC,KAAKC,MAAQ,MAIjBC,gBAAiB,SAAUC,GAA3BD,GAAAA,GAAAA,OAAAA,OAAiBE,OAAAC,0BACpBC,EAAAC,OAAAC,OAAAJ,OAAAK,0BACAC,EAAIC,OAAQJ,OAAOC,OAAOJ,KAAdQ,WAAqBP,UAAjCQ,EACyBT,OAAOK,OAAAA,OAAAA,OAAAA,gCADhCK,EAEIJ,aAAmBH,EAAOC,mCAF9BK,EAAAE,EAAAJ,EAGIE,IAAAA,EAAAA,EAHJG,EAIIF,KAJJG,EAKUN,KALVO,EAMIF,8DANJD,EAAA,cA8DO,OA7CAI,GAAA,eAAIC,OAAA,GACAD,EAAAA,eAAAE,SAGXtB,EAAAA,MAAAA,GAAeE,GAAfL,MACI0B,KAAkBJ,EAClBK,OAXOC,IAYPC,MAXOC,IAYPC,gBAAAA,EACAC,iBAAAA,EACOC,IAbAC,wBAiBX/B,EAAAA,MAAAA,OACOiB,EAAAA,EAAAA,6BACAC,EAAAA,EAAAA,2BAEAD,EAAAA,SAAsBe,qBACtBd,EAAAA,SAAoBc,qBAC3Bf,EAAAA,KAAAA,MAAsBgB,SACfhB,EAAAA,WAAsBiB,6BAC7BjB,EAAAA,OAhCIC,uPAkCJE,EAAAA,gBAAGe,MAAA,SAAuB/B,GACtBgB,EAAAA,eAAGgB,IAAA,UAAqB,UAGrBhB,EAAAA,0BAAAe,MAA8BA,SAAM/B,GAChCgB,EAAA,0BAAIiB,SAAA,cACAjB,EAAAA,6BAAAM,MAAA,UACAN,EAAAA,2BAAAI,OAAA,SACAJ,EAAAA,0BAAAkB,YAAA,aAAyDN,SAAU,eACnEZ,EAAAA,0BAAAmB,KAA8BA,QAA9B,YACAnB,EAAAA,0BAAAgB,IAA8BA,cAA9B,WAIAhB,EAAAA,6BAA+BI,MAAQC,SACvCL,EAAAA,2BAAAI,OAA8Bc,SAC9BlB,EAAAA,0BAAAkB,YAAmC,eAAnCN,SAAA,aACAZ,EAAAA,0BAAAmB,KAAA,QAAkC,YACrCnB,EAAA,0BAAAgB,IAAA,cAAA,YAGEnC,MAKPuC,OAAA,WAEAC,GAAAA,GAAAA,IA9ER,QAiFYC,GAAkB,mBAClBC,KAJM,eAKNC,QAAuBzC,cALjBwC,SAAV,EAOAC,QAAAC,EAAA1C,mBAID,QA3FPH,eAAAA","file":"../../scripts/layout/generic-nav-view.js","sourcesContent":["/** Real-time Communication feature **/\ndefine(['mvc/ui/ui-modal'], function( Modal ) {\n\nvar GenericNavView = Backbone.View.extend({\n\n initialize: function ( ) {\n this.modal = null;\n },\n\n /** makes bootstrap modal and iframe inside it */\n makeModalIframe: function( e ) {\n\t// make modal\n\tvar host = window.Galaxy.config.communication_server_host,\n\t port = window.Galaxy.config.communication_server_port,\n\t username = escape( window.Galaxy.user.attributes.username ),\n\t persistent_communication_rooms = escape( window.Galaxy.config.persistent_communication_rooms ),\n\t query_string = \"?username=\" + username + \"&persistent_communication_rooms=\" + persistent_communication_rooms,\n\t src = host + \":\" + port + query_string,\n\t $el_chat_modal_header = null,\n\t $el_chat_modal_body = null,\n iframe_template = '',\n header_template = '' +\n '' + \n\t '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n \n\t// deletes the chat modal if already present and create one\n if( $( '.chat-modal' ).length > 0 ) {\n $( '.chat-modal' ).remove();\n\t}\n // creates a modal\n\tGenericNavView.modal = new Modal.View({\n\t body : iframe_template,\n\t height : frame_height,\n\t width : frame_width,\n\t closing_events : true,\n\t title_separator : false,\n cls : class_names\n\t});\n\n\t// shows modal\n\tGenericNavView.modal.show();\n $el_chat_modal_header = $( '.chat-modal .modal-header' );\n $el_chat_modal_body = $( '.chat-modal .modal-body' );\n\t// adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n\t$el_chat_modal_header.find( 'h4' ).remove();\n $el_chat_modal_header.removeAttr( 'min-height padding border' );\n\t$el_chat_modal_header.append( header_template );\n\t// click event of the close button for chat\n\t$( '.close-modal' ).click(function( e ) {\n\t $( '.chat-modal' ).css( 'display', 'none' );\n\t});\n // click event of expand and compress icon\n $( '.expand-compress-modal' ).click(function( e ) {\n if( $( '.expand-compress-modal' ).hasClass( 'fa-expand' ) ) {\n $( '.chat-modal .modal-dialog' ).width( '1000px' );\n $( '.chat-modal .modal-body' ).height( '575px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-expand' ).addClass( 'fa-compress' );\n $( '.expand-compress-modal' ).attr('title', 'Minimize');\n $( '.expand-compress-modal' ).css('margin-left', '96.2%');\n }\n else {\n $( '.chat-modal .modal-dialog' ).width( frame_width + 'px' );\n $( '.chat-modal .modal-body' ).height( frame_height + 'px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-compress' ).addClass( 'fa-expand' );\n $( '.expand-compress-modal' ).attr('title', 'Maximize');\n $( '.expand-compress-modal' ).css('margin-left', '93.2%');\n }\n\t \n\t});\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function() {\n var self = this,\n navItem = {};\n navItem = {\n id : 'show-chat-online',\n icon : 'fa-comment-o',\n tooltip : 'Chat online',\n visible : false,\n onclick : self.makeModalIframe\n }\n return navItem;\n }\n});\n\nreturn {\n GenericNavView : GenericNavView\n};\n\n});\n\n"]} \ No newline at end of file +{"version":3,"sources":["layout/generic-nav-view.js"],"names":["define","Modal","Backbone","View","extend","initialize","GenericNavView","this","modal","makeModalIframe","e","$el_chat_modal_header","query_string","$el_chat_modal_body","host","iframe_template","config","communication_server_host","persistent_communication_rooms","window","Galaxy","communication_server_port","username","attributes","$","length","remove","body","height","frame_height","width","frame_width","closing_events","title_separator","cls","class_names","addClass","find","removeAttr","click","css","hasClass","removeClass","attr","render","tooltip","visible","onclick","navItem"],"mappings":"aACAA,QAAQ,mBAAoB,SAAUC,GAAtCD,IAAAA,EAAQE,SAAoBC,KAAAC,QAE5BC,WAAIC,WAGIC,KAAKC,MAAQ,MAIjBC,gBAAiB,SAAUC,GAA3BD,IAEHE,EAIIC,KAJJC,EAKUC,KALVC,EAMIJ,+DARDF,OAAAA,OAAiBO,OAAAC,0BAKhBC,IAJJC,OAAAC,OAAAJ,OAAAK,2BAGIC,aAFAR,OAAQK,OAAOC,OAAOJ,KAAdO,WAAqBN,UAEHG,mCADLJ,OAAOK,OAAAA,OAAAA,OAAAA,kCADhC,eA8DO,OA7CAG,EAAA,eAAIC,OAAA,GACAD,EAAAA,eAAAE,SAGXpB,EAAAA,MAAAA,IAAeE,EAAfL,MACIwB,KAAkBZ,EAClBa,OAXOC,IAYPC,MAXOC,IAYPC,gBAAAA,EACAC,iBAAAA,EACOC,IAbAC,wBAiBX7B,EAAAA,MAAAA,OACOK,EAAAA,EAAAA,6BACAE,EAAAA,EAAAA,2BAEAF,EAAAA,SAAsByB,qBACtBvB,EAAAA,SAAoBuB,qBAC3BzB,EAAAA,KAAAA,MAAsB0B,SACf1B,EAAAA,WAAsB2B,6BAC7B3B,EAAAA,OAhCIE,uPAkCJW,EAAAA,gBAAGe,MAAA,SAAuB7B,GACtBc,EAAAA,eAAGgB,IAAA,UAAqB,UAGrBhB,EAAAA,0BAAAe,MAA8BA,SAAM7B,GAChCc,EAAA,0BAAIiB,SAAA,cACAjB,EAAAA,6BAAAM,MAAA,UACAN,EAAAA,2BAAAI,OAAA,SACAJ,EAAAA,0BAAAkB,YAAA,aAAyDN,SAAU,eACnEZ,EAAAA,0BAAAmB,KAA8BA,QAA9B,YACAnB,EAAAA,0BAAAgB,IAA8BA,cAA9B,WAIAhB,EAAAA,6BAA+BI,MAAQC,SACvCL,EAAAA,2BAAAI,OAA8Bc,SAC9BlB,EAAAA,0BAAAkB,YAAmC,eAAnCN,SAAA,aACAZ,EAAAA,0BAAAmB,KAAA,QAAkC,YACrCnB,EAAA,0BAAAgB,IAAA,cAAA,YAGEjC,MAKPqC,OAAA,WA5ER,OAiFYC,GAAkB,mBAClBC,KAJM,eAKNC,QAAuBtC,cALjBqC,SAAV,EAOAC,QAPAC,KAOAvC,oBAID,OA3FPH,eAAAA","file":"../../scripts/layout/generic-nav-view.js","sourcesContent":["/** Real-time Communication feature **/\ndefine(['mvc/ui/ui-modal'], function( Modal ) {\n\nvar GenericNavView = Backbone.View.extend({\n\n initialize: function ( ) {\n this.modal = null;\n },\n\n /** makes bootstrap modal and iframe inside it */\n makeModalIframe: function( e ) {\n\t// make modal\n\tvar host = window.Galaxy.config.communication_server_host,\n\t port = window.Galaxy.config.communication_server_port,\n\t username = escape( window.Galaxy.user.attributes.username ),\n\t persistent_communication_rooms = escape( window.Galaxy.config.persistent_communication_rooms ),\n\t query_string = \"?username=\" + username + \"&persistent_communication_rooms=\" + persistent_communication_rooms,\n\t src = host + \":\" + port + query_string,\n\t $el_chat_modal_header = null,\n\t $el_chat_modal_body = null,\n iframe_template = '',\n header_template = '' +\n '' + \n\t '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n \n\t// deletes the chat modal if already present and create one\n if( $( '.chat-modal' ).length > 0 ) {\n $( '.chat-modal' ).remove();\n\t}\n // creates a modal\n\tGenericNavView.modal = new Modal.View({\n\t body : iframe_template,\n\t height : frame_height,\n\t width : frame_width,\n\t closing_events : true,\n\t title_separator : false,\n cls : class_names\n\t});\n\n\t// shows modal\n\tGenericNavView.modal.show();\n $el_chat_modal_header = $( '.chat-modal .modal-header' );\n $el_chat_modal_body = $( '.chat-modal .modal-body' );\n\t// adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n\t$el_chat_modal_header.find( 'h4' ).remove();\n $el_chat_modal_header.removeAttr( 'min-height padding border' );\n\t$el_chat_modal_header.append( header_template );\n\t// click event of the close button for chat\n\t$( '.close-modal' ).click(function( e ) {\n\t $( '.chat-modal' ).css( 'display', 'none' );\n\t});\n // click event of expand and compress icon\n $( '.expand-compress-modal' ).click(function( e ) {\n if( $( '.expand-compress-modal' ).hasClass( 'fa-expand' ) ) {\n $( '.chat-modal .modal-dialog' ).width( '1000px' );\n $( '.chat-modal .modal-body' ).height( '575px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-expand' ).addClass( 'fa-compress' );\n $( '.expand-compress-modal' ).attr('title', 'Minimize');\n $( '.expand-compress-modal' ).css('margin-left', '96.2%');\n }\n else {\n $( '.chat-modal .modal-dialog' ).width( frame_width + 'px' );\n $( '.chat-modal .modal-body' ).height( frame_height + 'px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-compress' ).addClass( 'fa-expand' );\n $( '.expand-compress-modal' ).attr('title', 'Maximize');\n $( '.expand-compress-modal' ).css('margin-left', '93.2%');\n }\n\t \n\t});\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function() {\n var self = this,\n navItem = {};\n navItem = {\n id : 'show-chat-online',\n icon : 'fa-comment-o',\n tooltip : 'Chat online',\n visible : false,\n onclick : self.makeModalIframe\n }\n return navItem;\n }\n});\n\nreturn {\n GenericNavView : GenericNavView\n};\n\n});\n\n"]} \ No newline at end of file diff --git a/static/maps/layout/masthead.js.map b/static/maps/layout/masthead.js.map index a1749e47964..0ec7886c6da 100644 --- a/static/maps/layout/masthead.js.map +++ b/static/maps/layout/masthead.js.map @@ -1 +1 @@ -{"version":3,"sources":["layout/masthead.js"],"names":["define","View","Backbone","QuotaMeter","options","extend","initialize","setElement","self","$navbarBrandLink","this","$navbarBrandImage","$navbarBrandTitle","$","$navbarTabs","$quoteMeter","Menu","Collection","collection","empty","model","append","callback","render","$el","m","on","fetch","Galaxy","frame","Scratchbook","user","UserQuotaMeter","el","window","$download_link","target","length","closest","attr","hide","e","preventDefault","get","q","text","logo_url","brand","logo_src","quotaMeter","_template"],"mappings":"YAAAA,SACI,cADJA,cAGI,qBAIJ,4BACA,SAAIC,EAAOC,EAASD,EAAYE,GA+EhC,OACIF,KA7EIC,SAAKE,KAALC,QACAC,WAAKC,SAALH,GACA,GAAAI,GAAKC,IACLC,MAAAN,QAAKO,EACLD,KAAAH,WAAKK,KAAAA,aACLF,KAAAD,iBAA0BC,KAAQG,EAAA,sBAClCH,KAAAC,kBAA0BD,KAAQG,EAAA,uBAFlCH,KAAKE,kBAAqBF,KAAKG,EAAG,uBAIlCH,KAAAI,YAAAJ,KAAAG,EAAA,gBACAH,KAAAK,YAAsBC,KAAKC,EAAAA,0BAG1BP,KAFDQ,WAAA,GAEgBF,GAAAC,WACZT,KAAAA,WAAKM,GAAAA,MAAYK,SAAjBC,GACHZ,EAJDM,YAAAO,OAImB,GAAUC,GAAAA,KAAWF,MAAAA,IAAAG,SAAAC,OACpChB,GAAAA,QAAKU,WAAkCI,EAAAA,YAAUG,UAAKC,GAAA,WAAtD,SAAAJ,GACHd,EAAEmB,WAAYvB,KANf,SAAAqB,GAAAH,EAAAG,OAMGE,MAAOjB,KAAKN,SAGfwB,OAAOC,MAAQnB,KAAKmB,MAAQ,GAAIC,IAAeZ,WAAYR,KAAKQ,aAK5DE,OAAAA,WAAUQ,KAAOG,WAD+C,GAAA5B,GAAA6B,gBAEhEC,MAAUL,OAAKb,KAFiDkB,GAApEvB,KAAAK,cAOIF,EAAAqB,QAAIC,GAAAA,QAAAA,SAAsBC,GAC1B,GAAAD,GAAKA,EAAeE,EAAAA,QAApBC,QAAkC,cACvB,IAAPH,EAAOE,SACkCE,IAArC1B,EAAAA,uBAAuBwB,QAC1BxB,EAAA,QAAAQ,OAAAR,EAAA,aAAA0B,KAAA,KAAA,YAAAC,QAEDC,EAAAA,uBAAAF,KAAA,MAAAJ,EAAAI,KAAA,SACHE,EAAAC,oBAEDhB,GAAA,eAAA,WACAlB,GAAAA,GAAKU,EAKD,IAJAV,EAAAU,WAAQE,KAAMuB,SAAKvB,GACnBwB,GAAAA,GAAAA,EAAOC,IAAQD,mBAAfxB,EAAAuB,IAAA,mBACHC,KAHDC,GAAAD,EAAA,OAKI,KAAAC,EACH,MAAAA,MAKLtB,OAAA,WAKH,MAJGb,MAAAE,kBAAKH,KAAiB8B,WAAc7B,KAAKN,QAAQ0C,OAAjD,KAAApC,KAAAN,QAAA2C,OAAA,KACArC,KAAAD,iBAAKE,KAAkB4B,OAAM7B,KAAON,QAAKA,UACzCM,KAAAC,kBAAgBY,KAAhB,MAAAb,KAAAN,QAAA4C,UACAtC,KAAAuC,WAAA1B,SA1DwBb,MA+DxBwC,UAAA,WAaH,MAAA","file":"../../scripts/layout/masthead.js","sourcesContent":["define([\n 'utils/utils',\n 'layout/menu',\n 'layout/scratchbook',\n 'mvc/user/user-quotameter',\n], function( Utils, Menu, Scratchbook, QuotaMeter ) {\n\n/** Masthead **/\nvar View = Backbone.View.extend({\n initialize : function( options ) {\n var self = this;\n this.options = options;\n this.setElement( this._template() );\n this.$navbarBrandLink = this.$( '.navbar-brand-link' );\n this.$navbarBrandImage = this.$( '.navbar-brand-image' );\n this.$navbarBrandTitle = this.$( '.navbar-brand-title' );\n this.$navbarTabs = this.$( '.navbar-tabs' );\n this.$quoteMeter = this.$( '.quota-meter-container' );\n\n // build tabs\n this.collection = new Menu.Collection();\n this.collection.on( 'add', function( model ) {\n self.$navbarTabs.append( new Menu.Tab( { model : model } ).render().$el );\n }).on( 'reset', function() {\n self.$navbarTabs.empty();\n }).on( 'dispatch', function( callback ) {\n self.collection.each( function ( m ) { callback( m ) });\n }).fetch( this.options );\n\n // scratchbook\n Galaxy.frame = this.frame = new Scratchbook( { collection: this.collection } );\n\n // set up the quota meter (And fetch the current user data from trans)\n // add quota meter to masthead\n Galaxy.quotaMeter = this.quotaMeter = new QuotaMeter.UserQuotaMeter({\n model : Galaxy.user,\n el : this.$quoteMeter\n });\n\n // loop through beforeunload functions if the user attempts to unload the page\n $( window ).on( 'click', function( e ) {\n var $download_link = $( e.target ).closest( 'a[download]' );\n if ( $download_link.length == 1 ) {\n if( $( 'iframe[id=download]' ).length === 0 ) {\n $( 'body' ).append( $( '
\"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n"]} \ No newline at end of file +{"version":3,"sources":["layout/modal.js"],"names":["define","jQuery","modal","$","Modal","options","this","$dialog","$overlay","$header","dialog","$body","find","$footer","$backdrop","on","proxy","hide","extend","prototype","setContent","title","html","closeButton","show","$buttons","each","buttons","name","value","click","append","$extraButtons","extra_buttons","body","callback","backdrop","removeClass","css","width","window","height","outerHeight","parseInt","children","remove","undefined","overlay","hide_modal","show_modal","show_message","init_fn","show_in_overlay","scroll","bind","unbind","url"],"mappings":"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","file":"../../scripts/layout/modal.js","sourcesContent":["define([\n 'jquery',\n], function (jQuery){\n\n\"use strict\";\n// ============================================================================\n//TODO: (the older version) unify with ui-modal (the newer version)\nvar $ = jQuery;\n\n// Modal dialog boxes\nvar Modal = function( options ) {\n this.$overlay = options.overlay;\n this.$dialog = options.dialog;\n this.$header = this.$dialog.find( \".modal-header\" );\n this.$body = this.$dialog.find( \".modal-body\" );\n this.$footer = this.$dialog.find( \".modal-footer\" );\n this.$backdrop = options.backdrop;\n // Close button\n this.$header.find( \".close\" ).on( \"click\", $.proxy( this.hide, this ) );\n};\n\n$.extend( Modal.prototype, {\n setContent: function( options ) {\n this.$header.hide();\n // Title\n if ( options.title ) {\n this.$header.find( \".title\" ).html( options.title );\n this.$header.show();\n }\n if ( options.closeButton ) {\n this.$header.find( \".close\" ).show();\n this.$header.show();\n } else {\n this.$header.find( \".close\" ).hide();\n }\n // Buttons\n this.$footer.hide();\n var $buttons = this.$footer.find( \".buttons\" ).html( \"\" );\n if ( options.buttons ) {\n $.each( options.buttons, function( name, value ) {\n $buttons.append( $( ' ' ).text( name ).click( value ) ).append( \" \" );\n });\n this.$footer.show();\n }\n var $extraButtons = this.$footer.find( \".extra_buttons\" ).html( \"\" );\n if ( options.extra_buttons ) {\n $.each( options.extra_buttons, function( name, value ) {\n $extraButtons.append( $( '' ).text( name ).click( value ) ).append( \" \" );\n });\n this.$footer.show();\n }\n // Body\n var body = options.body;\n if ( body == \"progress\" ) {\n body = $(\"
\");\n }\n this.$body.html( body );\n },\n show: function( options, callback ) {\n if ( ! this.$dialog.is( \":visible\" ) ) {\n if ( options.backdrop) {\n this.$backdrop.addClass( \"in\" );\n } else {\n this.$backdrop.removeClass( \"in\" );\n }\n this.$overlay.show();\n this.$dialog.show();\n this.$overlay.addClass(\"in\");\n // Fix min-width so that modal cannot shrink considerably if new content is loaded.\n this.$body.css( \"min-width\", this.$body.width() );\n // Set max-height so that modal does not exceed window size and is in middle of page.\n // TODO: this could perhaps be handled better using CSS.\n this.$body.css( \"max-height\",\n $(window).height() -\n this.$footer.outerHeight() -\n this.$header.outerHeight() -\n parseInt( this.$dialog.css( \"padding-top\" ), 10 ) -\n parseInt( this.$dialog.css( \"padding-bottom\" ), 10 )\n );\n }\n // Callback on init\n if ( callback ) {\n callback();\n }\n },\n hide: function() {\n var modal = this;\n modal.$dialog.fadeOut( function() {\n modal.$overlay.hide();\n modal.$backdrop.removeClass( \"in\" );\n modal.$body.children().remove();\n // Clear min-width to allow for modal to take size of new body.\n modal.$body.css( \"min-width\", undefined );\n });\n }\n});\n\nvar modal;\n\n$(function(){\n modal = new Modal( { overlay: $(\"#top-modal\"), dialog: $(\"#top-modal-dialog\"), backdrop: $(\"#top-modal-backdrop\") } );\n});\n\n// Backward compatibility\nfunction hide_modal() {\n modal.hide();\n}\n\nfunction show_modal( title, body, buttons, extra_buttons, init_fn ) {\n modal.setContent( { title: title, body: body, buttons: buttons, extra_buttons: extra_buttons } );\n modal.show( { backdrop: true }, init_fn );\n}\n\nfunction show_message( title, body, buttons, extra_buttons, init_fn ) {\n modal.setContent( { title: title, body: body, buttons: buttons, extra_buttons: extra_buttons } );\n modal.show( { backdrop: false }, init_fn );\n}\n\nfunction show_in_overlay( options ) {\n var width = options.width || '600';\n var height = options.height || '400';\n var scroll = options.scroll || 'auto';\n $(\"#overlay-background\").bind( \"click.overlay\", function() {\n hide_modal();\n $(\"#overlay-background\").unbind( \"click.overlay\" );\n });\n modal.setContent({\n closeButton: true,\n title: \" \",\n body: $(\n \"
\"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n"]} \ No newline at end of file diff --git a/static/maps/layout/page.js.map b/static/maps/layout/page.js.map index 12b0990767e..a46c92a5de2 100644 --- a/static/maps/layout/page.js.map +++ b/static/maps/layout/page.js.map @@ -1 +1 @@ -{"version":3,"sources":["layout/page.js"],"names":["define","Masthead","Panel","Modal","View","Backbone","extend","el","_panelids","options","self","this","initialize","_","defaults","message_box_content","message_box_visible","message_box_class","Galaxy","modal","display","view","center","Router","config","masthead","$","replaceWith","$el","append","attr","frame","html","_template","$messagebox","each","$inactivebox","panel_id","panel_class_name","charAt","toUpperCase","slice","panel_class","panels","panel_instance","router","history","start","root","pushState","remove","render","renderMessageBox","renderInactivityBox","renderPanels","content","level","addClass","removeClass","hide","show_inactivity_warning","inactivity_box_content","verificationLink","text","show","panel","css","toString","_checkCommunicationServerOnline","host","port","preferences","$chat_icon_element","join","success","data","window","communication_server_port","user","attributes","indexOf","communication_server","ajax","id","error"],"mappings":"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","file":"../../scripts/layout/page.js","sourcesContent":["define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Masthead, Panel, Modal ) {\n var View = Backbone.View.extend({\n el : 'body',\n className : 'full-content',\n _panelids : [ 'left', 'right' ],\n\n initialize : function( options ) {\n var self = this;\n this.config = _.defaults( options.config || {}, {\n message_box_visible : false,\n message_box_content : '',\n message_box_class : 'info',\n show_inactivity_warning : false,\n inactivity_box_content : ''\n });\n\n // attach global objects, build mastheads\n Galaxy.modal = this.modal = new Modal.View();\n Galaxy.display = this.display = function( view ) { self.center.display( view ) };\n Galaxy.router = this.router = options.Router && new options.Router( self, options );\n this.masthead = new Masthead.View( this.config );\n this.center = new Panel.CenterPanel();\n\n // build page template\n this.$el.attr( 'scroll', 'no' );\n this.$el.html( this._template() );\n this.$( '#masthead' ).replaceWith( this.masthead.$el );\n this.$( '#center' ).append( this.center.$el );\n this.$el.append( this.masthead.frame.$el );\n this.$el.append( this.modal.$el );\n this.$messagebox = this.$( '#messagebox' );\n this.$inactivebox = this.$( '#inactivebox' );\n\n // build panels\n this.panels = {};\n _.each( this._panelids, function( panel_id ) {\n var panel_class_name = panel_id.charAt( 0 ).toUpperCase() + panel_id.slice( 1 );\n var panel_class = options[ panel_class_name ];\n if ( panel_class ) {\n var panel_instance = new panel_class( self, options );\n self[ panel_instance.toString() ] = panel_instance;\n self.panels[ panel_id ] = new Panel.SidePanel({\n id : panel_id,\n el : self.$( '#' + panel_id ),\n view : panel_instance\n });\n }\n });\n this.render();\n\n // start the router\n this.router && Backbone.history.start({\n root : Galaxy.root,\n pushState : true,\n });\n },\n\n render : function() {\n // TODO: Remove this line after select2 update\n $( '.select2-hidden-accessible' ).remove();\n this.masthead.render();\n this.renderMessageBox();\n this.renderInactivityBox();\n this.renderPanels();\n this._checkCommunicationServerOnline();\n return this;\n },\n\n /** Render message box */\n renderMessageBox : function() {\n if ( this.config.message_box_visible ){\n var content = this.config.message_box_content || '';\n var level = this.config.message_box_class || 'info';\n this.$el.addClass( 'has-message-box' );\n this.$messagebox\n .attr( 'class', 'panel-' + level + '-message' )\n .html( content )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-message-box' );\n this.$messagebox.hide();\n }\n return this;\n },\n\n /** Render inactivity warning */\n renderInactivityBox : function() {\n if( this.config.show_inactivity_warning ){\n var content = this.config.inactivity_box_content || '';\n var verificationLink = $( '' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n this.$el.addClass( 'has-inactivity-box' );\n this.$inactivebox\n .html( content + ' ' )\n .append( verificationLink )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-inactivity-box' );\n this.$inactivebox.hide();\n }\n return this;\n },\n\n /** Render panels */\n renderPanels : function() {\n var self = this;\n _.each( this._panelids, function( panel_id ) {\n var panel = self.panels[ panel_id ];\n if ( panel ) {\n panel.render();\n } else {\n self.$( '#center' ).css( panel_id, 0 );\n self.$( '#' + panel_id ).hide();\n }\n });\n return this;\n },\n\n /** body template */\n _template: function() {\n return [\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n ].join('');\n },\n\n toString : function() { return 'PageLayoutView' },\n\n /** Check if the communication server is online and show the icon otherwise hide the icon */\n _checkCommunicationServerOnline: function(){\n var host = window.Galaxy.config.communication_server_host,\n port = window.Galaxy.config.communication_server_port,\n preferences = window.Galaxy.user.attributes.preferences,\n $chat_icon_element = $( \"#show-chat-online\" );\n /** Check if the user has deactivated the communication in it's personal settings */\n if ( preferences && [ '1', 'true' ].indexOf( preferences.communication_server ) != -1 ) {\n // See if the configured communication server is available\n $.ajax({\n url: host + \":\" + port,\n })\n .success( function( data ) {\n // enable communication only when a user is logged in\n if( window.Galaxy.user.id !== null ) {\n if( $chat_icon_element.css( \"visibility\") === \"hidden\" ) {\n $chat_icon_element.css( \"visibility\", \"visible\" ); \n }\n }\n })\n .error( function( data ) { \n // hide the communication icon if the communication server is not available\n $chat_icon_element.css( \"visibility\", \"hidden\" ); \n });\n } else {\n $chat_icon_element.css( \"visibility\", \"hidden\" ); \n }\n },\n });\n\n return { View: View }\n});"]} \ No newline at end of file +{"version":3,"sources":["layout/page.js"],"names":["define","Masthead","Panel","Modal","View","Backbone","extend","el","_panelids","options","self","this","initialize","_","defaults","message_box_content","message_box_visible","message_box_class","Galaxy","modal","display","view","center","Router","config","masthead","$","replaceWith","$el","append","attr","frame","html","_template","$messagebox","each","$inactivebox","panel_id","panel_class_name","charAt","toUpperCase","slice","panel_class","panels","panel_instance","router","history","start","root","pushState","remove","render","renderMessageBox","renderInactivityBox","renderPanels","content","level","addClass","removeClass","hide","show_inactivity_warning","inactivity_box_content","verificationLink","text","show","panel","css","toString","_checkCommunicationServerOnline","host","port","preferences","$chat_icon_element","join","success","data","window","communication_server_port","user","attributes","indexOf","communication_server","ajax","id","error"],"mappings":"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","file":"../../scripts/layout/page.js","sourcesContent":["define( [ 'layout/masthead', 'layout/panel', 'mvc/ui/ui-modal' ], function( Masthead, Panel, Modal ) {\n var View = Backbone.View.extend({\n el : 'body',\n className : 'full-content',\n _panelids : [ 'left', 'right' ],\n\n initialize : function( options ) {\n var self = this;\n this.config = _.defaults( options.config || {}, {\n message_box_visible : false,\n message_box_content : '',\n message_box_class : 'info',\n show_inactivity_warning : false,\n inactivity_box_content : ''\n });\n\n // attach global objects, build mastheads\n Galaxy.modal = this.modal = new Modal.View();\n Galaxy.display = this.display = function( view ) { self.center.display( view ) };\n Galaxy.router = this.router = options.Router && new options.Router( self, options );\n this.masthead = new Masthead.View( this.config );\n this.center = new Panel.CenterPanel();\n\n // build page template\n this.$el.attr( 'scroll', 'no' );\n this.$el.html( this._template() );\n this.$( '#masthead' ).replaceWith( this.masthead.$el );\n this.$( '#center' ).append( this.center.$el );\n this.$el.append( this.masthead.frame.$el );\n this.$el.append( this.modal.$el );\n this.$messagebox = this.$( '#messagebox' );\n this.$inactivebox = this.$( '#inactivebox' );\n\n // build panels\n this.panels = {};\n _.each( this._panelids, function( panel_id ) {\n var panel_class_name = panel_id.charAt( 0 ).toUpperCase() + panel_id.slice( 1 );\n var panel_class = options[ panel_class_name ];\n if ( panel_class ) {\n var panel_instance = new panel_class( self, options );\n self[ panel_instance.toString() ] = panel_instance;\n self.panels[ panel_id ] = new Panel.SidePanel({\n id : panel_id,\n el : self.$( '#' + panel_id ),\n view : panel_instance\n });\n }\n });\n this.render();\n\n // start the router\n this.router && Backbone.history.start({\n root : Galaxy.root,\n pushState : true,\n });\n },\n\n render : function() {\n // TODO: Remove this line after select2 update\n $( '.select2-hidden-accessible' ).remove();\n this.masthead.render();\n this.renderMessageBox();\n this.renderInactivityBox();\n this.renderPanels();\n this._checkCommunicationServerOnline();\n return this;\n },\n\n /** Render message box */\n renderMessageBox : function() {\n if ( this.config.message_box_visible ){\n var content = this.config.message_box_content || '';\n var level = this.config.message_box_class || 'info';\n this.$el.addClass( 'has-message-box' );\n this.$messagebox\n .attr( 'class', 'panel-' + level + '-message' )\n .html( content )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-message-box' );\n this.$messagebox.hide();\n }\n return this;\n },\n\n /** Render inactivity warning */\n renderInactivityBox : function() {\n if( this.config.show_inactivity_warning ){\n var content = this.config.inactivity_box_content || '';\n var verificationLink = $( '' ).attr( 'href', Galaxy.root + 'user/resend_verification' ).text( 'Resend verification' );\n this.$el.addClass( 'has-inactivity-box' );\n this.$inactivebox\n .html( content + ' ' )\n .append( verificationLink )\n .toggle( !!content )\n .show();\n } else {\n this.$el.removeClass( 'has-inactivity-box' );\n this.$inactivebox.hide();\n }\n return this;\n },\n\n /** Render panels */\n renderPanels : function() {\n var self = this;\n _.each( this._panelids, function( panel_id ) {\n var panel = self.panels[ panel_id ];\n if ( panel ) {\n panel.render();\n } else {\n self.$( '#center' ).css( panel_id, 0 );\n self.$( '#' + panel_id ).hide();\n }\n });\n return this;\n },\n\n /** body template */\n _template: function() {\n return [\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n ].join('');\n },\n\n toString : function() { return 'PageLayoutView' },\n\n /** Check if the communication server is online and show the icon otherwise hide the icon */\n _checkCommunicationServerOnline: function(){\n var host = window.Galaxy.config.communication_server_host,\n port = window.Galaxy.config.communication_server_port,\n preferences = window.Galaxy.user.attributes.preferences,\n $chat_icon_element = $( \"#show-chat-online\" );\n /** Check if the user has deactivated the communication in it's personal settings */\n if ( preferences && [ '1', 'true' ].indexOf( preferences.communication_server ) != -1 ) {\n // See if the configured communication server is available\n $.ajax({\n url: host + \":\" + port,\n })\n .success( function( data ) {\n // enable communication only when a user is logged in\n if( window.Galaxy.user.id !== null ) {\n if( $chat_icon_element.css( \"visibility\") === \"hidden\" ) {\n $chat_icon_element.css( \"visibility\", \"visible\" ); \n }\n }\n })\n .error( function( data ) { \n // hide the communication icon if the communication server is not available\n $chat_icon_element.css( \"visibility\", \"hidden\" ); \n });\n } else {\n $chat_icon_element.css( \"visibility\", \"hidden\" ); \n }\n },\n });\n\n return { View: View }\n});"]} \ No newline at end of file diff --git a/static/maps/layout/panel.js.map b/static/maps/layout/panel.js.map index 934831aeccc..45ebdb9153d 100644 --- a/static/maps/layout/panel.js.map +++ b/static/maps/layout/panel.js.map @@ -1 +1 @@ -{"version":3,"sources":["layout/panel.js"],"names":["define","$","_","Backbone","MIN_PANEL_WIDTH","MAX_PANEL_WIDTH","SidePanel","View","extend","this","view","options","initialize","hidden","$center","$el","siblings","$toggleButton","render","self","panel","model","attributes","id","each","components","buttons","html","append","button","cls","escape","title","_templatePanel","_templateBody","_templateFooter","join","_templateHeader","data","events","_mousedownDragHandler","draggingLeft","prevX","mousedown .unified-panel-footer > .drag","newWidth","ev","move","e","delta","pageX","oldWidth","width","Math","min","newSize","max","css","show","on","animation","hide","off","removeClass","whichSide","toggle","saved_size","animate","addClass","handle_minwidth_hint","space","hint","hiddenByTool","op","force_panel","LeftPanel","RightPanel","$panel","CenterPanel","_iframeChangeHandler","location","iframe","host","empty","Galaxy","trigger","bind","hash","currentTarget","contentWindow","display","$frame","message","confirm","onbeforeunload","template","undefined","toString","attr","scrollTop"],"mappings":"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","file":"../../scripts/layout/panel.js","sourcesContent":["define( [ 'jquery', 'libs/underscore', 'libs/backbone' ], function( $, _, Backbone ) {\n \"use strict\";\n\n var MIN_PANEL_WIDTH = 160,\n MAX_PANEL_WIDTH = 800;\n\n /** View for left/right panels used by Page view */\n var SidePanel = Backbone.View.extend({\n\n initialize: function( options ){\n this.view = options.view;\n this.hidden = false;\n this.saved_size = null;\n this.hiddenByTool = false;\n },\n\n $center : function() {\n return this.$el.siblings( '#center' );\n },\n\n $toggleButton : function() {\n return this.$( '.unified-panel-footer > .panel-collapse' );\n },\n\n render: function() {\n var self = this;\n var panel = this.view;\n var components = this.view.model.attributes || {};\n this.$el.html( this._templatePanel( this.id ) );\n _.each( components.buttons, function( button ) {\n self.$( '.panel-header-buttons' ).append( button.$el );\n });\n this.$el.addClass( components.cls );\n this.$( '.panel-header-text' ).html( _.escape( components.title ) );\n this.$( '.unified-panel-body' ).append( panel.$el );\n panel.render();\n },\n\n /** panel dom template. id is 'right' or 'left' */\n _templatePanel: function() {\n return [\n this._templateHeader(),\n this._templateBody(),\n this._templateFooter(),\n ].join('');\n },\n\n /** panel dom template. id is 'right' or 'left' */\n _templateHeader: function( data ) {\n return [\n '
',\n '
',\n '
',\n '
',\n '
',\n '
',\n ].join('');\n },\n\n /** panel dom template. id is 'right' or 'left' */\n _templateBody: function( data ) {\n return '
';\n },\n\n /** panel dom template. id is 'right' or 'left' */\n _templateFooter: function( data ) {\n return [\n '
',\n '
',\n '
',\n '
',\n ].join('');\n },\n\n events : {\n 'mousedown .unified-panel-footer > .drag' : '_mousedownDragHandler',\n 'click .unified-panel-footer > .panel-collapse' : 'toggle'\n },\n\n _mousedownDragHandler : function( ev ) {\n var self = this,\n draggingLeft = this.id === 'left',\n prevX = ev.pageX;\n\n function move( e ){\n var delta = e.pageX - prevX;\n prevX = e.pageX;\n var oldWidth = self.$el.width(),\n newWidth = draggingLeft?( oldWidth + delta ):( oldWidth - delta );\n // Limit range\n newWidth = Math.min( MAX_PANEL_WIDTH, Math.max( MIN_PANEL_WIDTH, newWidth ) );\n self.resize( newWidth );\n }\n\n // this is a page wide overlay that assists in capturing the move and release of the mouse\n // if not provided, progress and end wouldn't fire if the mouse moved out of the drag button area\n $( '#dd-helper' )\n .show()\n .on( 'mousemove', move )\n .one( 'mouseup', function( e ){\n $( this ).hide().off( 'mousemove', move );\n });\n },\n\n // TODO: the following three could be simplified I think\n // if panel is 'right' (this.id), move center right newSize number of pixels\n resize : function( newSize ) {\n this.$el.css( 'width', newSize );\n this.$center().css( this.id, newSize );\n return this;\n },\n\n show : function(){\n if( !this.hidden ) { return }\n var self = this,\n animation = {},\n whichSide = this.id;\n animation[ whichSide ] = 0;\n self.$el\n .css( whichSide, -this.saved_size )\n .show()\n .animate( animation, \"fast\", function(){\n self.resize( self.saved_size );\n });\n self.hidden = false;\n self.$toggleButton().removeClass( \"hidden\" );\n return this;\n },\n\n hide : function(){\n if( this.hidden ) { return }\n var animation = {},\n whichSide = this.id;\n this.saved_size = this.$el.width();\n animation[ whichSide ] = -this.saved_size;\n this.$el.animate( animation, \"fast\" );\n this.$center().css( whichSide, 0 );\n this.hidden = true;\n this.$toggleButton().addClass( \"hidden\" );\n return this;\n },\n\n toggle: function( ev ) {\n this.hidden ? this.show() : this.hide();\n this.hiddenByTool = false;\n return this;\n },\n\n // ..............................................................\n //TODO: only used in message.mako?\n /** */\n handle_minwidth_hint: function( hint ){\n var space = this.$center().width() - ( this.hidden ? this.saved_size : 0 );\n if( space < hint ){\n if( !this.hidden ){\n this.toggle();\n this.hiddenByTool = true;\n }\n } else {\n if( this.hiddenByTool ){\n this.toggle();\n this.hiddenByTool = false;\n }\n }\n return self;\n },\n\n /** */\n force_panel : function( op ){\n if( op == 'show' ){ return this.show(); }\n if( op == 'hide' ){ return this.hide(); }\n return self;\n },\n\n toString : function(){ return 'SidePanel(' + this.id + ')' }\n });\n\n // ----------------------------------------------------------------------------\n // TODO: side should be defined by page - not here\n var LeftPanel = SidePanel.extend({\n id : 'left',\n });\n\n var RightPanel = SidePanel.extend({\n id : 'right',\n });\n\n /** Center panel with the ability to switch between iframe and view */\n var CenterPanel = Backbone.View.extend({\n\n initialize : function( options ){\n this.setElement( $( this.template() ) );\n this.$frame = this.$( '.center-frame' );\n this.$panel = this.$( '.center-panel' );\n this.$frame.on( 'load', _.bind( this._iframeChangeHandler, this ) );\n },\n\n /** Display iframe if its target url changes, hide center panel */\n _iframeChangeHandler : function( ev ) {\n var iframe = ev.currentTarget;\n var location = iframe.contentWindow && iframe.contentWindow.location;\n if( location && location.host ) {\n $( iframe ).show();\n this.$panel.empty().hide();\n Galaxy.trigger( 'center-frame:load', {\n fullpath: location.pathname + location.search + location.hash,\n pathname: location.pathname,\n search : location.search,\n hash : location.hash\n });\n }\n },\n\n /** Display a view in the center panel, hide iframe */\n display: function( view ) {\n var contentWindow = this.$frame[ 0 ].contentWindow || {};\n var message = contentWindow.onbeforeunload && contentWindow.onbeforeunload();\n if ( !message || confirm( message ) ) {\n contentWindow.onbeforeunload = undefined;\n this.$frame.attr( 'src', 'about:blank' ).hide();\n this.$panel.empty().scrollTop( 0 ).append( view.$el ).show();\n Galaxy.trigger( 'center-panel:load', view );\n }\n },\n\n template: function() {\n return '
' +\n '')}function clear_main_area(){$("#spinner").remove(),$("#main").children().remove()}function display_spinner(){$("#main").append('')}function not_ready(e,t,n,r){0==t.count&&(display_spinner(),toastr.info("Galaxy is launching a container in which to run this interactive environment. Please wait...",{closeButton:!0,tapToDismiss:!1})),t.count++,t.time30&&(clearInterval(interval),clear_main_area(),toastr.error("Could not connect to IE, contact your administrator","Error",{closeButton:!0,timeOut:2e4,tapToDismiss:!1}))}})},1e3)} +"use strict";function append_notebook(e){clear_main_area(),$("#main").append('')}function clear_main_area(){$("#spinner").remove(),$("#main").children().remove()}function display_spinner(){$("#main").append('')}function not_ready(e,t,n,r){0==t.count&&(display_spinner(),toastr.info("Galaxy is launching a container in which to run this interactive environment. Please wait...",{closeButton:!0,tapToDismiss:!1})),t.count++,t.time30&&(clearInterval(interval),clear_main_area(),toastr.error("Could not connect to IE, contact your administrator","Error",{closeButton:!0,timeOut:2e4,tapToDismiss:!1}))}})},1e3)} //# sourceMappingURL=../maps/galaxy.interactive_environments.js.map diff --git a/static/scripts/galaxy.pages.js b/static/scripts/galaxy.pages.js index dd1bf1eefa8..97ee9202558 100644 --- a/static/scripts/galaxy.pages.js +++ b/static/scripts/galaxy.pages.js @@ -1,2 +1,2 @@ -"use strict";function init_galaxy_elts(e){$(".annotation",e._doc.body).each(function(){$(this).click(function(){var t=e._doc.createRange();t.selectNodeContents(this);var a=window.getSelection();a.removeAllRanges(),a.addRange(t)})})}function get_item_info(e){var t,a,i;switch(e){case CONTROLS.ITEM_HISTORY:t="History",a="Histories",i="history",item_class="History";break;case CONTROLS.ITEM_DATASET:t="Dataset",a="Datasets",i="dataset",item_class="HistoryDatasetAssociation";break;case CONTROLS.ITEM_WORKFLOW:t="Workflow",a="Workflows",i="workflow",item_class="StoredWorkflow";break;case CONTROLS.ITEM_PAGE:t="Page",a="Pages",i="page",item_class="Page";break;case CONTROLS.ITEM_VISUALIZATION:t="Visualization",a="Visualizations",i="visualization",item_class="Visualization"}var o="list_"+a.toLowerCase()+"_for_selection",l=list_objects_url.replace("LIST_ACTION",o);return{singular:t,plural:a,controller:i,iclass:item_class,list_ajax_url:l}}function make_item_importable(e,t,a){ajax_url=set_accessible_url.replace("ITEM_CONTROLLER",e),$.ajax({type:"POST",url:ajax_url,data:{id:t,accessible:"True"},error:function(){alert("Making "+a+" accessible failed")}})}var CONTROLS={ITEM_HISTORY:"item_history",ITEM_DATASET:"item_dataset",ITEM_WORKFLOW:"item_workflow",ITEM_PAGE:"item_page",ITEM_VISUALIZATION:"item_visualization",DIALOG_HISTORY_LINK:"link_history",DIALOG_DATASET_LINK:"link_dataset",DIALOG_WORKFLOW_LINK:"link_workflow",DIALOG_PAGE_LINK:"link_page",DIALOG_VISUALIZATION_LINK:"link_visualization",DIALOG_EMBED_HISTORY:"embed_history",DIALOG_EMBED_DATASET:"embed_dataset",DIALOG_EMBED_WORKFLOW:"embed_workflow",DIALOG_EMBED_PAGE:"embed_page",DIALOG_EMBED_VISUALIZATION:"embed_visualization"};WYMeditor.editor.prototype.dialog=function(e,t,a){function i(){$("#set_link_id").click(function(){$("#link_attribute_label").text("ID/Name");var e=$(".wym_href");e.addClass("wym_id").removeClass("wym_href"),s&&e.val($(s).attr("id")),$(this).remove()})}var o=this,l=o.uniqueStamp(),s=o.selected();if(e==WYMeditor.DIALOG_LINK){s&&($(o._options.hrefSelector).val($(s).attr(WYMeditor.HREF)),$(o._options.srcSelector).val($(s).attr(WYMeditor.SRC)),$(o._options.titleSelector).val($(s).attr(WYMeditor.TITLE)),$(o._options.altSelector).val($(s).attr(WYMeditor.ALT)));var r,n;s&&(r=$(s).attr("href"),void 0==r&&(r=""),void 0==(n=$(s).attr("title"))&&(n="")),show_modal("Create Link","

",{"Make link":function(){var e=$(o._options.hrefSelector).val()||"",t=$(".wym_id").val()||"",a=$(o._options.titleSelector).val()||"";if(e||t){o._exec(WYMeditor.CREATE_LINK,l);var i=$("a[href="+l+"]",o._doc.body);i.attr(WYMeditor.HREF,e).attr(WYMeditor.TITLE,a).attr("id",t),0===i.text().indexOf("wym-")&&i.text(a)}hide_modal()},Cancel:function(){hide_modal()}},{},i)}if(e==WYMeditor.DIALOG_IMAGE)return o._selected_image&&($(o._options.dialogImageSelector+" "+o._options.srcSelector).val($(o._selected_image).attr(WYMeditor.SRC)),$(o._options.dialogImageSelector+" "+o._options.titleSelector).val($(o._selected_image).attr(WYMeditor.TITLE)),$(o._options.dialogImageSelector+" "+o._options.altSelector).val($(o._selected_image).attr(WYMeditor.ALT))),void show_modal("Image","



",{Insert:function(){var e=$(o._options.srcSelector).val();e.length>0&&(o._exec(WYMeditor.INSERT_IMAGE,l),$("img[src$="+l+"]",o._doc.body).attr(WYMeditor.SRC,e).attr(WYMeditor.TITLE,$(o._options.titleSelector).val()).attr(WYMeditor.ALT,$(o._options.altSelector).val())),hide_modal()},Cancel:function(){hide_modal()}});if(e==WYMeditor.DIALOG_TABLE&&show_modal("Table","


",{Insert:function(){var e=$(o._options.rowsSelector).val(),t=$(o._options.colsSelector).val();if(e>0&&t>0){var a=o._doc.createElement(WYMeditor.TABLE),i=null,l=$(o._options.captionSelector).val(),s=a.createCaption();for(s.innerHTML=l,x=0;x").append(t.$el).append($("
").append('').append("Make the selected "+_.plural.toLowerCase()+" accessible so that they can viewed by everyone.")),closing_events:!0,buttons:{Insert:function(){var e=!1;null!=$("#make-importable:checked").val()&&(e=!0);new Array;t.$("input[name=id]:checked").each(function(){var t=$(this).val();e&&make_item_importable(_.controller,t,_.singular),url_template=get_name_and_link_url+t,ajax_url=url_template.replace("ITEM_CONTROLLER",_.controller),$.getJSON(ajax_url,function(e){o._exec(WYMeditor.CREATE_LINK,l);var a=$("a[href="+l+"]",o._doc.body).text();""==a||a==l?o.insert(""+_.singular+" '"+e.name+"'"):$("a[href="+l+"]",o._doc.body).attr(WYMeditor.HREF,e.link).attr(WYMeditor.TITLE,_.singular+t)})}),Galaxy.modal.hide()},Close:function(){Galaxy.modal.hide()}}})})}if(e==CONTROLS.DIALOG_EMBED_HISTORY||e==CONTROLS.DIALOG_EMBED_DATASET||e==CONTROLS.DIALOG_EMBED_WORKFLOW||e==CONTROLS.DIALOG_EMBED_PAGE||e==CONTROLS.DIALOG_EMBED_VISUALIZATION){var _;switch(e){case CONTROLS.DIALOG_EMBED_HISTORY:_=get_item_info(CONTROLS.ITEM_HISTORY);break;case CONTROLS.DIALOG_EMBED_DATASET:_=get_item_info(CONTROLS.ITEM_DATASET);break;case CONTROLS.DIALOG_EMBED_WORKFLOW:_=get_item_info(CONTROLS.ITEM_WORKFLOW);break;case CONTROLS.DIALOG_EMBED_PAGE:_=get_item_info(CONTROLS.ITEM_PAGE);break;case CONTROLS.DIALOG_EMBED_VISUALIZATION:_=get_item_info(CONTROLS.ITEM_VISUALIZATION)}require(["mvc/grid/grid-view"],function(e){var t=new e({url_base:_.list_ajax_url,dict_format:!0,embedded:!0});Galaxy.modal.show({title:"Insert Link to "+_.singular,body:$("
").append(t.$el).append($("
").append('').append("Make the selected "+_.plural.toLowerCase()+" accessible so that they can viewed by everyone.")),closing_events:!0,buttons:{Embed:function(){var e=!1;null!=$("#make-importable:checked").val()&&(e=!0),t.$("input[name=id]:checked").each(function(){var t=$(this).val(),a=$("label[for='"+t+"']:first").text();e&&make_item_importable(_.controller,t,_.singular);var i=_.iclass+"-"+t,l=["
","

","Embedded Galaxy ",_.singular," '",a,"'","

","

","[Do not edit this block; Galaxy will fill it in with the annotated ",_.singular.toLowerCase()," when it is displayed.]","

","
"].join("");o.insert(l)}),Galaxy.modal.hide()},Close:function(){Galaxy.modal.hide()}}})})}},$(function(){$(document).ajaxError(function(e,t){var a=t.responseText||t.statusText||"Could not connect to server";return show_modal("Server error",a,{"Ignore error":hide_modal}),!1}),$("[name=page_content]").wymeditor({skin:"galaxy",basePath:editor_base_path,iframeBasePath:iframe_base_path,boxHtml:"
"+WYMeditor.TOOLS+"
"+WYMeditor.IFRAME+WYMeditor.STATUS+"
",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:"Superscript",css:"wym_tools_superscript"},{name:"Subscript",title:"Subscript",css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"}]});var e=$.wymeditors(0),t=function(t){show_modal("Saving page","progress"),$.ajax({url:save_url,type:"POST",data:{id:page_id,content:e.xhtml(),annotations:JSON.stringify(new Object),_:"true"},success:function(){t()}})};$("#save-button").click(function(){t(function(){hide_modal()})}),$("#close-button").click(function(){window.document.location=page_list_url});var a=$("
");$(".wym_area_top").append(a);var i={};$.each(e._options.containersItems,function(t,a){var o=a.name;i[a.title.replace("_"," ")]=function(){e.container(o)}}),make_popupmenu(a,i);var o=$("").addClass("galaxy-page-editor-button");$(".wym_area_top").append(o),make_popupmenu(o,{"Insert History Link":function(){e.dialog(CONTROLS.DIALOG_HISTORY_LINK)},"Insert Dataset Link":function(){e.dialog(CONTROLS.DIALOG_DATASET_LINK)},"Insert Workflow Link":function(){e.dialog(CONTROLS.DIALOG_WORKFLOW_LINK)},"Insert Page Link":function(){e.dialog(CONTROLS.DIALOG_PAGE_LINK)},"Insert Visualization Link":function(){e.dialog(CONTROLS.DIALOG_VISUALIZATION_LINK)}});var l=$("").addClass("galaxy-page-editor-button");$(".wym_area_top").append(l),make_popupmenu(l,{"Embed History":function(){e.dialog(CONTROLS.DIALOG_EMBED_HISTORY)},"Embed Dataset":function(){e.dialog(CONTROLS.DIALOG_EMBED_DATASET)},"Embed Workflow":function(){e.dialog(CONTROLS.DIALOG_EMBED_WORKFLOW)},"Embed Visualization":function(){e.dialog(CONTROLS.DIALOG_EMBED_VISUALIZATION)}})}); +"use strict";function init_galaxy_elts(e){$(".annotation",e._doc.body).each(function(){$(this).click(function(){var t=e._doc.createRange();t.selectNodeContents(this);var a=window.getSelection();a.removeAllRanges(),a.addRange(t)})})}function get_item_info(e){var t,a,i;switch(e){case CONTROLS.ITEM_HISTORY:t="History",a="Histories",i="history",item_class="History";break;case CONTROLS.ITEM_DATASET:t="Dataset",a="Datasets",i="dataset",item_class="HistoryDatasetAssociation";break;case CONTROLS.ITEM_WORKFLOW:t="Workflow",a="Workflows",i="workflow",item_class="StoredWorkflow";break;case CONTROLS.ITEM_PAGE:t="Page",a="Pages",i="page",item_class="Page";break;case CONTROLS.ITEM_VISUALIZATION:t="Visualization",a="Visualizations",i="visualization",item_class="Visualization"}var o="list_"+a.toLowerCase()+"_for_selection",l=list_objects_url.replace("LIST_ACTION",o);return{singular:t,plural:a,controller:i,iclass:item_class,list_ajax_url:l}}function make_item_importable(e,t,a){ajax_url=set_accessible_url.replace("ITEM_CONTROLLER",e),$.ajax({type:"POST",url:ajax_url,data:{id:t,accessible:"True"},error:function(){alert("Making "+a+" accessible failed")}})}var CONTROLS={ITEM_HISTORY:"item_history",ITEM_DATASET:"item_dataset",ITEM_WORKFLOW:"item_workflow",ITEM_PAGE:"item_page",ITEM_VISUALIZATION:"item_visualization",DIALOG_HISTORY_LINK:"link_history",DIALOG_DATASET_LINK:"link_dataset",DIALOG_WORKFLOW_LINK:"link_workflow",DIALOG_PAGE_LINK:"link_page",DIALOG_VISUALIZATION_LINK:"link_visualization",DIALOG_EMBED_HISTORY:"embed_history",DIALOG_EMBED_DATASET:"embed_dataset",DIALOG_EMBED_WORKFLOW:"embed_workflow",DIALOG_EMBED_PAGE:"embed_page",DIALOG_EMBED_VISUALIZATION:"embed_visualization"};WYMeditor.editor.prototype.dialog=function(e,t,a){var i=this,o=i.uniqueStamp(),l=i.selected();if(e==WYMeditor.DIALOG_LINK){l&&($(i._options.hrefSelector).val($(l).attr(WYMeditor.HREF)),$(i._options.srcSelector).val($(l).attr(WYMeditor.SRC)),$(i._options.titleSelector).val($(l).attr(WYMeditor.TITLE)),$(i._options.altSelector).val($(l).attr(WYMeditor.ALT)));var s,r;l&&(void 0==(s=$(l).attr("href"))&&(s=""),void 0==(r=$(l).attr("title"))&&(r="")),show_modal("Create Link","

",{"Make link":function(){var e=$(i._options.hrefSelector).val()||"",t=$(".wym_id").val()||"",a=$(i._options.titleSelector).val()||"";if(e||t){i._exec(WYMeditor.CREATE_LINK,o);var l=$("a[href="+o+"]",i._doc.body);l.attr(WYMeditor.HREF,e).attr(WYMeditor.TITLE,a).attr("id",t),0===l.text().indexOf("wym-")&&l.text(a)}hide_modal()},Cancel:function(){hide_modal()}},{},function(){$("#set_link_id").click(function(){$("#link_attribute_label").text("ID/Name");var e=$(".wym_href");e.addClass("wym_id").removeClass("wym_href"),l&&e.val($(l).attr("id")),$(this).remove()})})}if(e==WYMeditor.DIALOG_IMAGE)return i._selected_image&&($(i._options.dialogImageSelector+" "+i._options.srcSelector).val($(i._selected_image).attr(WYMeditor.SRC)),$(i._options.dialogImageSelector+" "+i._options.titleSelector).val($(i._selected_image).attr(WYMeditor.TITLE)),$(i._options.dialogImageSelector+" "+i._options.altSelector).val($(i._selected_image).attr(WYMeditor.ALT))),void show_modal("Image","



",{Insert:function(){var e=$(i._options.srcSelector).val();e.length>0&&(i._exec(WYMeditor.INSERT_IMAGE,o),$("img[src$="+o+"]",i._doc.body).attr(WYMeditor.SRC,e).attr(WYMeditor.TITLE,$(i._options.titleSelector).val()).attr(WYMeditor.ALT,$(i._options.altSelector).val())),hide_modal()},Cancel:function(){hide_modal()}});if(e==WYMeditor.DIALOG_TABLE&&show_modal("Table","


",{Insert:function(){var e=$(i._options.rowsSelector).val(),t=$(i._options.colsSelector).val();if(e>0&&t>0){var a=i._doc.createElement(WYMeditor.TABLE),o=null,l=$(i._options.captionSelector).val();for(a.createCaption().innerHTML=l,x=0;x").append(t.$el).append($("
").append('').append("Make the selected "+n.plural.toLowerCase()+" accessible so that they can viewed by everyone.")),closing_events:!0,buttons:{Insert:function(){var e=!1;null!=$("#make-importable:checked").val()&&(e=!0);new Array;t.$("input[name=id]:checked").each(function(){var t=$(this).val();e&&make_item_importable(n.controller,t,n.singular),url_template=get_name_and_link_url+t,ajax_url=url_template.replace("ITEM_CONTROLLER",n.controller),$.getJSON(ajax_url,function(e){i._exec(WYMeditor.CREATE_LINK,o);var a=$("a[href="+o+"]",i._doc.body).text();""==a||a==o?i.insert(""+n.singular+" '"+e.name+"'"):$("a[href="+o+"]",i._doc.body).attr(WYMeditor.HREF,e.link).attr(WYMeditor.TITLE,n.singular+t)})}),Galaxy.modal.hide()},Close:function(){Galaxy.modal.hide()}}})})}if(e==CONTROLS.DIALOG_EMBED_HISTORY||e==CONTROLS.DIALOG_EMBED_DATASET||e==CONTROLS.DIALOG_EMBED_WORKFLOW||e==CONTROLS.DIALOG_EMBED_PAGE||e==CONTROLS.DIALOG_EMBED_VISUALIZATION){var n;switch(e){case CONTROLS.DIALOG_EMBED_HISTORY:n=get_item_info(CONTROLS.ITEM_HISTORY);break;case CONTROLS.DIALOG_EMBED_DATASET:n=get_item_info(CONTROLS.ITEM_DATASET);break;case CONTROLS.DIALOG_EMBED_WORKFLOW:n=get_item_info(CONTROLS.ITEM_WORKFLOW);break;case CONTROLS.DIALOG_EMBED_PAGE:n=get_item_info(CONTROLS.ITEM_PAGE);break;case CONTROLS.DIALOG_EMBED_VISUALIZATION:n=get_item_info(CONTROLS.ITEM_VISUALIZATION)}require(["mvc/grid/grid-view"],function(e){var t=new e({url_base:n.list_ajax_url,dict_format:!0,embedded:!0});Galaxy.modal.show({title:"Insert Link to "+n.singular,body:$("
").append(t.$el).append($("
").append('').append("Make the selected "+n.plural.toLowerCase()+" accessible so that they can viewed by everyone.")),closing_events:!0,buttons:{Embed:function(){var e=!1;null!=$("#make-importable:checked").val()&&(e=!0),t.$("input[name=id]:checked").each(function(){var t=$(this).val(),a=$("label[for='"+t+"']:first").text();e&&make_item_importable(n.controller,t,n.singular);var o=["
","

","Embedded Galaxy ",n.singular," '",a,"'","

","

","[Do not edit this block; Galaxy will fill it in with the annotated ",n.singular.toLowerCase()," when it is displayed.]","

","
"].join("");i.insert(o)}),Galaxy.modal.hide()},Close:function(){Galaxy.modal.hide()}}})})}},$(function(){$(document).ajaxError(function(e,t){var a=t.responseText||t.statusText||"Could not connect to server";return show_modal("Server error",a,{"Ignore error":hide_modal}),!1}),$("[name=page_content]").wymeditor({skin:"galaxy",basePath:editor_base_path,iframeBasePath:iframe_base_path,boxHtml:"
"+WYMeditor.TOOLS+"
"+WYMeditor.IFRAME+WYMeditor.STATUS+"
",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:"Superscript",css:"wym_tools_superscript"},{name:"Subscript",title:"Subscript",css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"}]});var e=$.wymeditors(0),t=function(t){show_modal("Saving page","progress"),$.ajax({url:save_url,type:"POST",data:{id:page_id,content:e.xhtml(),annotations:JSON.stringify(new Object),_:"true"},success:function(){t()}})};$("#save-button").click(function(){t(function(){hide_modal()})}),$("#close-button").click(function(){window.document.location=page_list_url});var a=$("");$(".wym_area_top").append(a);var i={};$.each(e._options.containersItems,function(t,a){var o=a.name;i[a.title.replace("_"," ")]=function(){e.container(o)}}),make_popupmenu(a,i);var o=$("").addClass("galaxy-page-editor-button");$(".wym_area_top").append(o),make_popupmenu(o,{"Insert History Link":function(){e.dialog(CONTROLS.DIALOG_HISTORY_LINK)},"Insert Dataset Link":function(){e.dialog(CONTROLS.DIALOG_DATASET_LINK)},"Insert Workflow Link":function(){e.dialog(CONTROLS.DIALOG_WORKFLOW_LINK)},"Insert Page Link":function(){e.dialog(CONTROLS.DIALOG_PAGE_LINK)},"Insert Visualization Link":function(){e.dialog(CONTROLS.DIALOG_VISUALIZATION_LINK)}});var l=$("").addClass("galaxy-page-editor-button");$(".wym_area_top").append(l),make_popupmenu(l,{"Embed History":function(){e.dialog(CONTROLS.DIALOG_EMBED_HISTORY)},"Embed Dataset":function(){e.dialog(CONTROLS.DIALOG_EMBED_DATASET)},"Embed Workflow":function(){e.dialog(CONTROLS.DIALOG_EMBED_WORKFLOW)},"Embed Visualization":function(){e.dialog(CONTROLS.DIALOG_EMBED_VISUALIZATION)}})}); //# sourceMappingURL=../maps/galaxy.pages.js.map diff --git a/static/scripts/i18n.js b/static/scripts/i18n.js index f58e8a4279d..2ae8c1e8624 100644 --- a/static/scripts/i18n.js +++ b/static/scripts/i18n.js @@ -1,2 +1,2 @@ -"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(o,t,n,e,r,i){t[o]&&(n.push(o),!0!==t[o]&&1!==t[o]||e.push(r+o+"/"+i))}function t(o,t,n,e,r){var i=e+t+"/"+r;require._fileExists(o.toUrl(i+".js"))&&n.push(i)}function n(o,t,e){var r;for(r in t)!t.hasOwnProperty(r)||o.hasOwnProperty(r)&&!e?"object"===_typeof(t[r])&&(!o[r]&&t[r]&&(o[r]={}),n(o[r],t[r],e)):o[r]=t[r]}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define(["module"],function(r){var i=r.config?r.config():{};return{version:"2.0.4",load:function(r,f,l,u){u=u||{},u.locale&&(i.locale=u.locale);var a,c,s,p=e.exec(r),y=p[1],g=p[4],v=p[5],h=g.split("-"),b=[],m={},d="";if(p[5]?(y=p[1],a=y+v):(a=r,v=p[4],g=i.locale,g||(g=i.locale="undefined"==typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),h=g.split("-")),u.isBuild){for(b.push(a),t(f,"root",b,y,v),c=0;c-1&&r[o];o--)i=r[o],e=t[i],!0!==e&&1!==e||(e=f(y+i+"/"+v)),n(m,e);l(m)})})}}})}(); +"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(o,t,n,e,r,i){t[o]&&(n.push(o),!0!==t[o]&&1!==t[o]||e.push(r+o+"/"+i))}function t(o,t,n,e,r){var i=e+t+"/"+r;require._fileExists(o.toUrl(i+".js"))&&n.push(i)}function n(o,t,e){var r;for(r in t)!t.hasOwnProperty(r)||o.hasOwnProperty(r)&&!e?"object"===_typeof(t[r])&&(!o[r]&&t[r]&&(o[r]={}),n(o[r],t[r],e)):o[r]=t[r]}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define(["module"],function(r){var i=r.config?r.config():{};return{version:"2.0.4",load:function(r,f,l,u){(u=u||{}).locale&&(i.locale=u.locale);var a,c,s,p=e.exec(r),y=p[1],g=p[4],v=p[5],h=g.split("-"),b=[],m={},d="";if(p[5]?a=(y=p[1])+v:(a=r,v=p[4],(g=i.locale)||(g=i.locale="undefined"==typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),h=g.split("-")),u.isBuild){for(b.push(a),t(f,"root",b,y,v),c=0;c-1&&r[o];o--)!0!==(e=t[i=r[o]])&&1!==e||(e=f(y+i+"/"+v)),n(m,e);l(m)})})}}})}(); //# sourceMappingURL=../maps/i18n.js.map diff --git a/static/scripts/layout/generic-nav-view.js b/static/scripts/layout/generic-nav-view.js index 1cf47620871..46d84492f7a 100644 --- a/static/scripts/layout/generic-nav-view.js +++ b/static/scripts/layout/generic-nav-view.js @@ -1,2 +1,2 @@ -"use strict";define(["mvc/ui/ui-modal"],function(a){var e=Backbone.View.extend({initialize:function(){this.modal=null},makeModalIframe:function(o){var i=window.Galaxy.config.communication_server_host,d=window.Galaxy.config.communication_server_port,m=escape(window.Galaxy.user.attributes.username),s=escape(window.Galaxy.config.persistent_communication_rooms),n="?username="+m+"&persistent_communication_rooms="+s,t=i+":"+d+n,l=null,c=null,r='';return $(".chat-modal").length>0&&$(".chat-modal").remove(),e.modal=new a.View({body:r,height:350,width:600,closing_events:!0,title_separator:!1,cls:"ui-modal chat-modal"}),e.modal.show(),l=$(".chat-modal .modal-header"),c=$(".chat-modal .modal-body"),l.addClass("modal-header-body"),c.addClass("modal-header-body"),l.find("h4").remove(),l.removeAttr("min-height padding border"),l.append(''),$(".close-modal").click(function(a){$(".chat-modal").css("display","none")}),$(".expand-compress-modal").click(function(a){$(".expand-compress-modal").hasClass("fa-expand")?($(".chat-modal .modal-dialog").width("1000px"),$(".chat-modal .modal-body").height("575px"),$(".expand-compress-modal").removeClass("fa-expand").addClass("fa-compress"),$(".expand-compress-modal").attr("title","Minimize"),$(".expand-compress-modal").css("margin-left","96.2%")):($(".chat-modal .modal-dialog").width("600px"),$(".chat-modal .modal-body").height("350px"),$(".expand-compress-modal").removeClass("fa-compress").addClass("fa-expand"),$(".expand-compress-modal").attr("title","Maximize"),$(".expand-compress-modal").css("margin-left","93.2%"))}),this},render:function(){var a=this;return{id:"show-chat-online",icon:"fa-comment-o",tooltip:"Chat online",visible:!1,onclick:a.makeModalIframe}}});return{GenericNavView:e}}); +"use strict";define(["mvc/ui/ui-modal"],function(a){var e=Backbone.View.extend({initialize:function(){this.modal=null},makeModalIframe:function(o){var i=null,d=null,m='';return $(".chat-modal").length>0&&$(".chat-modal").remove(),e.modal=new a.View({body:m,height:350,width:600,closing_events:!0,title_separator:!1,cls:"ui-modal chat-modal"}),e.modal.show(),i=$(".chat-modal .modal-header"),d=$(".chat-modal .modal-body"),i.addClass("modal-header-body"),d.addClass("modal-header-body"),i.find("h4").remove(),i.removeAttr("min-height padding border"),i.append(''),$(".close-modal").click(function(a){$(".chat-modal").css("display","none")}),$(".expand-compress-modal").click(function(a){$(".expand-compress-modal").hasClass("fa-expand")?($(".chat-modal .modal-dialog").width("1000px"),$(".chat-modal .modal-body").height("575px"),$(".expand-compress-modal").removeClass("fa-expand").addClass("fa-compress"),$(".expand-compress-modal").attr("title","Minimize"),$(".expand-compress-modal").css("margin-left","96.2%")):($(".chat-modal .modal-dialog").width("600px"),$(".chat-modal .modal-body").height("350px"),$(".expand-compress-modal").removeClass("fa-compress").addClass("fa-expand"),$(".expand-compress-modal").attr("title","Maximize"),$(".expand-compress-modal").css("margin-left","93.2%"))}),this},render:function(){return{id:"show-chat-online",icon:"fa-comment-o",tooltip:"Chat online",visible:!1,onclick:this.makeModalIframe}}});return{GenericNavView:e}}); //# sourceMappingURL=../../maps/layout/generic-nav-view.js.map diff --git a/static/scripts/layout/modal.js b/static/scripts/layout/modal.js index 8412da39012..eb63774bcb6 100644 --- a/static/scripts/layout/modal.js +++ b/static/scripts/layout/modal.js @@ -1,2 +1,2 @@ -"use strict";define(["jquery"],function(t){function o(){h.hide()}function i(t,o,i,e,s){h.setContent({title:t,body:o,buttons:i,extra_buttons:e}),h.show({backdrop:!0},s)}function e(t,o,i,e,s){h.setContent({title:t,body:o,buttons:i,extra_buttons:e}),h.show({backdrop:!1},s)}function s(t){var i=t.width||"600",e=t.height||"400",s=t.scroll||"auto";d("#overlay-background").bind("click.overlay",function(){o(),d("#overlay-background").unbind("click.overlay")}),h.setContent({closeButton:!0,title:" ",body:d("
")}),h.show({backdrop:!0})}var d=t,a=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",d.proxy(this.hide,this))};d.extend(a.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var o=this.$footer.find(".buttons").html("");t.buttons&&(d.each(t.buttons,function(t,i){o.append(d(" ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(d.each(t.extra_buttons,function(t,o){i.append(d("").text(t).click(o)).append(" ")}),this.$footer.show());var e=t.body;"progress"==e&&(e=d("
")),this.$body.html(e)},show:function(t,o){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",d(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),o&&o()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var h;return d(function(){h=new a({overlay:d("#top-modal"),dialog:d("#top-modal-dialog"),backdrop:d("#top-modal-backdrop")})}),{Modal:a,hide_modal:o,show_modal:i,show_message:e,show_in_overlay:s}}); +"use strict";define(["jquery"],function(t){function o(){s.hide()}var i=t,e=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",i.proxy(this.hide,this))};i.extend(e.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var o=this.$footer.find(".buttons").html("");t.buttons&&(i.each(t.buttons,function(t,e){o.append(i(" ").text(t).click(e)).append(" ")}),this.$footer.show());var e=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(i.each(t.extra_buttons,function(t,o){e.append(i("").text(t).click(o)).append(" ")}),this.$footer.show());var s=t.body;"progress"==s&&(s=i("
")),this.$body.html(s)},show:function(t,o){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",i(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),o&&o()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var s;return i(function(){s=new e({overlay:i("#top-modal"),dialog:i("#top-modal-dialog"),backdrop:i("#top-modal-backdrop")})}),{Modal:e,hide_modal:o,show_modal:function(t,o,i,e,d){s.setContent({title:t,body:o,buttons:i,extra_buttons:e}),s.show({backdrop:!0},d)},show_message:function(t,o,i,e,d){s.setContent({title:t,body:o,buttons:i,extra_buttons:e}),s.show({backdrop:!1},d)},show_in_overlay:function(t){var e=t.width||"600",d=t.height||"400",a=t.scroll||"auto";i("#overlay-background").bind("click.overlay",function(){o(),i("#overlay-background").unbind("click.overlay")}),s.setContent({closeButton:!0,title:" ",body:i("
")}),s.show({backdrop:!0})}}}); //# sourceMappingURL=../../maps/layout/modal.js.map diff --git a/static/scripts/layout/router.js b/static/scripts/layout/router.js index 0966e9a5085..272f8d6ee86 100644 --- a/static/scripts/layout/router.js +++ b/static/scripts/layout/router.js @@ -1,2 +1,2 @@ -"use strict";var jQuery=require("jquery"),$=jQuery,QUERY_STRING=require("utils/query-string-parsing"),Ui=require("mvc/ui/ui-misc"),Router=Backbone.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){t=t||{},t.__identifer=Math.random().toString(36).substr(2),$.isEmptyObject(t)||(e+=-1==e.indexOf("?")?"?":"&",e+=$.param(t,!0)),Galaxy.params={},this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var s=QUERY_STRING.parse(t.pop());t.push(s),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new Ui.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});module.exports=Router; +"use strict";var jQuery=require("jquery"),$=jQuery,QUERY_STRING=require("utils/query-string-parsing"),Ui=require("mvc/ui/ui-misc"),Router=Backbone.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){(t=t||{}).__identifer=Math.random().toString(36).substr(2),$.isEmptyObject(t)||(e+=-1==e.indexOf("?")?"?":"&",e+=$.param(t,!0)),Galaxy.params={},this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var s=QUERY_STRING.parse(t.pop());t.push(s),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new Ui.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});module.exports=Router; //# sourceMappingURL=../../maps/layout/router.js.map diff --git a/static/scripts/libs/backbone.js b/static/scripts/libs/backbone.js index 408d4005908..96cd1e48904 100644 --- a/static/scripts/libs/backbone.js +++ b/static/scripts/libs/backbone.js @@ -1 +1 @@ -!function(t){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(t){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],h(t,this),s)};case 4:return function(t,s,r){return i[e](this[n],h(t,this),s,r)};default:return function(){var t=r.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},o=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=a(e,s,n))})},h=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?u(t):i.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},l=/\s+/,d=function(t,e,n,s,r){var a,o=0;if(n&&"object"==typeof n){void 0!==s&&"context"in r&&void 0===r.context&&(r.context=s);for(a=i.keys(n);othis.length&&(s=this.length),s<0&&(s+=this.length+1);var r,a,o=[],h=[],u=[],c=[],l={},d=e.add,f=e.merge,g=e.remove,p=!1,v=this.comparator&&null==s&&!1!==e.sort,m=i.isString(this.comparator)?this.comparator:null;for(a=0;a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(N,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!R.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(M,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new R;var O=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};y.extend=b.extend=P.extend=I.extend=R.extend=O;var U=function(){throw new Error('A "url" property or function must be specified')},q=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}); \ No newline at end of file +!function(t){var e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(t){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],h(t,this),s)};case 4:return function(t,s,r){return i[e](this[n],h(t,this),s,r)};default:return function(){var t=r.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},o=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=a(e,s,n))})},h=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?u(t):i.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},l=/\s+/,d=function(t,e,n,s,r){var a,o=0;if(n&&"object"==typeof n){void 0!==s&&"context"in r&&void 0===r.context&&(r.context=s);for(a=i.keys(n);othis.length&&(s=this.length),s<0&&(s+=this.length+1);var r,a,o=[],h=[],u=[],c=[],l={},d=e.add,f=e.merge,g=e.remove,p=!1,v=this.comparator&&null==s&&!1!==e.sort,m=i.isString(this.comparator)?this.comparator:null;for(a=0;a7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(N,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),R.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!R.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(M,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new R;y.extend=b.extend=P.extend=I.extend=R.extend=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};var O=function(){throw new Error('A "url" property or function must be specified')},U=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}); \ No newline at end of file diff --git a/static/scripts/libs/bbi/bigwig.js b/static/scripts/libs/bbi/bigwig.js index 8b6f70d5eed..6eee4109736 100644 --- a/static/scripts/libs/bbi/bigwig.js +++ b/static/scripts/libs/bbi/bigwig.js @@ -1 +1 @@ -define(["libs/bbi/spans","libs/bbi/jszlib","libs/bbi/jquery-ajax-native"],function(e,r){"use strict";function t(){}function n(e){e&&(this.id=e)}function i(e,r){return e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]}function o(e,r,t){Math.pow(10,6);return $.ajax({type:"GET",dataType:"native",url:e,timeout:5e3,beforeSend:function(e){e.setRequestHeader("Range","bytes="+r+"-"+(r+(t-1)))},xhrFields:{responseType:"arraybuffer"}})}function a(e,r){return e[r]+e[r+1]*b+e[r+2]*x+e[r+3]*I+e[r+4]*z}function s(){}function f(e,r,t,n){this.bwg=e,this.cirTreeOffset=r,this.cirTreeLength=t,this.isSummary=n}function h(e){var r=$.Deferred(),t=new s;return t.url=e,$.when(o(t.url,0,512)).then(function(e){if(!e)return r.resolve(null,"Couldn't fetch file");var n=e,i=new Uint8Array(n),o=new Int16Array(n),s=new Int32Array(n),f=i[0]+b*i[1]+x*i[2]+I*i[3];if(f==g)t.type="bigwig";else{if(f!=y)return f==w||f==p?r.resolve(null,"Currently don't support big-endian BBI files"):r.resolve(null,"Not a supported format, magic=0x"+f.toString(16));t.type="bigbed"}t.version=o[2],t.numZoomLevels=o[3],t.chromTreeOffset=a(i,8),t.unzoomedDataOffset=a(i,16),t.unzoomedIndexOffset=a(i,24),t.fieldCount=o[16],t.definedFieldCount=o[17],t.asOffset=a(i,36),t.totalSummaryOffset=a(i,44),t.uncompressBufSize=s[13],t.extHeaderOffset=a(i,56),t.zoomLevels=[];for(var h=0;h=r}),u=function(e,r){if(n.bwg.instrument&&console.log("level="+r+"; offset="+e+"; time="+(0|Date.now())),f+=e.length,1==e.length&&e[0]-n.cirTreeOffset==48&&n.cachedCirRoot)return v(n.cachedCirRoot,0,r),void(0===--f&&$.when(n.fetchFeatures(h,s)).then(function(e){i.resolve(e)}));for(var t,o=4+32*n.cirBlockSize,a=0;ae||y==e&&p>=r)&&s.push({offset:b,size:x}),i+=32}else{for(var I=[],v=0;ve||y==e&&p>=r)&&I.push(b),i+=24}I.length>0&&u(I,o+1)}};return u([n.cirTreeOffset+48],1),i},f.prototype.fetchFeatures=function(e,r){var n=this,i=$.Deferred();if(r.sort(function(e,r){return(0|e.offset)-(0|r.offset)}),0===r.length)return[];var a=[],s=function(e,r,i,o){o||(o={});var s=new t;s._chromId=e,s.segment=n.bwg.idsToChroms[e],s.min=r,s.max=i,s.type=n.bwg.type;for(var f in o)s[f]=o[f];a.push(s)},f=function(){if(0===r.length){Date.now();return i.resolve(a)}var t=r[0];if(t.data)n.parseFeatures(t.data,s,e),r.splice(0,1),f();else{for(var h=t.offset,u=t.size,c=1;c0)o=v(e,t+2,a.size-2);else{var s=new Uint8Array(a.size);d(new Uint8Array(e,t,a.size),0,s,0,a.size),o=s.buffer}a.data=o,t+=a.size,++i}f()})}};return f(),i},f.prototype.parseFeatures=function(e,r,t){var i=new Uint8Array(e);if(this.isSummary)for(var o=new Int16Array(e),a=new Int32Array(e),s=new Float32Array(e),f=e.byteLength/32,h=0;hd&&(v=d),t(u,v,d)&&r(u,v,d,{score:O})}else console.log("Currently not handling bwgType="+z)}else{if("bigbed"!=this.bwg.type)throw Error("Don't know what to do with "+this.bwg.type);for(var T=0,F=this.bwg.definedFieldCount,S=this.bwg.schema;T0?L.split("\t"):[],U.length>0&&F>3&&(R.label=U[0]),U.length>1&&F>4){var O=parseInt(U[1]);isNaN(O)||(R.score=O)}if(U.length>2&&F>5&&(R.orientation=U[2]),U.length>5&&F>8){var V=U[5];A.test(V)&&(R.itemRgb="rgb("+V+")")}if(U.length>F-3&&S)for(var j=F-3;j9){var M=R.geneName||U[9],Q=M;U.length>10&&(Q=U[10]),R.geneName2&&(Q=R.geneName2);var G=$.extend({},E);G.id=M,G.label=Q,G.type="gene",R.groups.push(G)}for(var J=[],K=0;KH){var ie="+"==R.orientation?new c(H,k+3):new c(H-3,k),oe=m(ee,ie);if(oe){R.type="translation";for(var ae=oe.ranges(),se=0,fe=0;ae[0].min()>re[fe].max();)fe++;for(var te=0;te=0&&ue<=2&&(R.readframe=ue,R.readframeExplicit=!0)}var ce=ne.max()-ne.min();se=(se+ce)%3,r(u,ne.min()+1,ne.max(),R)}}}}}}},f.prototype.getFirstAdjacent=function(e,r,t,n){var i=this.bwg.chromsToIDs[e];if(void 0===i)return n([]);this.getFirstAdjacentById(i,r,t,n)},f.prototype.getFirstAdjacentById=function(e,r,t,n){var i=this;if(!this.cirHeader)return void this.bwg.data.slice(this.cirTreeOffset,48).fetch(function(o){i.cirHeader=o;var a=new Int32Array(i.cirHeader);i.cirBlockSize=a[1],i.getFirstAdjacentById(e,r,t,n)});var o=null,s=-1,f=-1,h=0,u=(Date.now(),function(e,r){h+=e.length;for(var t,n=4+32*i.cirBlockSize,o=0;o0&&(0!=e||r>0)?i.getFirstAdjacentById(0,0,t,n):t<0&&(e!=i.bwg.maxID||r<1e9)?i.getFirstAdjacentById(i.bwg.maxID,1e9,t,n):n([]);i.fetchFeatures(function(n,i,o,a){return t<0&&(n0&&(n>e||i>r)},[o],function(e){for(var r=null,i=-1,o=-1,a=0;ai||u>o)||t>0&&(f0&&(x>e||x==e&&I>=r))&&(/_random/.exec(i.bwg.idsToChroms[p])||(null==o||t<0&&(x>s||x==s&&I>f)||t>0&&(p=e||t>0&&(x>e||x==e&&I>=r)&&p<=e)&&(O<0||I>C)&&(O=z,C=t<0?I:b,t<0?x:p),h+=24}O>=0&&u([O],c+1)}};u([i.cirTreeOffset+48],1)},s.prototype.readWigData=function(e,r,t){var n,i=t-r;if(i<=25e3||0===this.zoomLevels.length)n=this.getUnzoomedView();else for(var o=0;o=this.zoomLevels.length-1)){var a;return a=e<0?this.getUnzoomedView():this.getZoomedView(e),a.readWigDataById(r,t,n,i)}if(this.topLevelReductionCache){for(var s=[],f=this.topLevelReductionCache,h=0;h0?0:3e8;e.fromRef&&(s=r);for(var h=0;h0){if(u>n)if(e.zoom<0){if(c.min>s)return i(c)}else c.max>s&&f.push({chr:e.chr,chrOrd:e.chrOrd,zoom:e.zoom-2,min:c.min,max:c.max,fromRef:e.fromRef})}else if(u>n)if(e.zoom<0){if(c.maxt.field-3)return o[t.field-3]==e},[{offset:y,size:p}],r)}m+=c}return r([])}for(var b=null,v=0;v=r}),l=function(e,r){if(n.bwg.instrument&&console.log("level="+r+"; offset="+e+"; time="+(0|Date.now())),f+=e.length,1==e.length&&e[0]-n.cirTreeOffset==48&&n.cachedCirRoot)return d(n.cachedCirRoot,0,r),void(0===--f&&$.when(n.fetchFeatures(h,s)).then(function(e){i.resolve(e)}));for(var t,o=4+32*n.cirBlockSize,a=0;ae||g==e&&w>=r)&&s.push({offset:y,size:p}),i+=32}else{for(var b=[],x=0;xe||g==e&&w>=r)&&b.push(y),i+=24}b.length>0&&l(b,o+1)}};return l([n.cirTreeOffset+48],1),i},f.prototype.fetchFeatures=function(e,r){var n=this,i=$.Deferred();if(r.sort(function(e,r){return(0|e.offset)-(0|r.offset)}),0===r.length)return[];var a=[],s=function(e,r,i,o){o||(o={});var s=new t;s._chromId=e,s.segment=n.bwg.idsToChroms[e],s.min=r,s.max=i,s.type=n.bwg.type;for(var f in o)s[f]=o[f];a.push(s)},f=function(){if(0===r.length){Date.now();return i.resolve(a)}var t=r[0];if(t.data)n.parseFeatures(t.data,s,e),r.splice(0,1),f();else{for(var h=t.offset,u=t.size,c=1;c0)o=m(e,t+2,a.size-2);else{var s=new Uint8Array(a.size);d(new Uint8Array(e,t,a.size),0,s,0,a.size),o=s.buffer}a.data=o,t+=a.size,++i}f()})}};return f(),i},f.prototype.parseFeatures=function(e,r,t){var i=new Uint8Array(e);if(this.isSummary)for(var o=new Int16Array(e),a=new Int32Array(e),s=new Float32Array(e),f=e.byteLength/32,h=0;hv&&(d=v),t(m,d,v)&&r(m,d,v,{score:O})}else console.log("Currently not handling bwgType="+A)}else{if("bigbed"!=this.bwg.type)throw Error("Don't know what to do with "+this.bwg.type);for(var T=0,F=this.bwg.definedFieldCount,S=this.bwg.schema;T0?L.split("\t"):[]).length>0&&F>3&&(R.label=U[0]),U.length>1&&F>4){O=parseInt(U[1]);isNaN(O)||(R.score=O)}if(U.length>2&&F>5&&(R.orientation=U[2]),U.length>5&&F>8){var V=U[5];z.test(V)&&(R.itemRgb="rgb("+V+")")}if(U.length>F-3&&S)for(var j=F-3;j9){var M=R.geneName||U[9],Q=M;U.length>10&&(Q=U[10]),R.geneName2&&(Q=R.geneName2);var G=$.extend({},E);G.id=M,G.label=Q,G.type="gene",R.groups.push(G)}for(var J=[],K=0;KH){var ne="+"==R.orientation?new u(H,k+3):new u(H-3,k),ie=l(ee,ne);if(ie){R.type="translation";for(var oe=ie.ranges(),ae=0,se=0;oe[0].min()>re[se].max();)se++;for(te=0;te=0&&ue<=2&&(R.readframe=ue,R.readframeExplicit=!0)}ae=(ae+(he.max()-he.min()))%3,r(m,he.min()+1,he.max(),R)}}}}}}},f.prototype.getFirstAdjacent=function(e,r,t,n){var i=this.bwg.chromsToIDs[e];if(void 0===i)return n([]);this.getFirstAdjacentById(i,r,t,n)},f.prototype.getFirstAdjacentById=function(e,r,t,n){var i=this;if(this.cirHeader){var o=null,s=-1,f=-1,h=0,l=(Date.now(),function(e,r){h+=e.length;for(var t,n=4+32*i.cirBlockSize,o=0;o0&&(0!=e||r>0)?i.getFirstAdjacentById(0,0,t,n):t<0&&(e!=i.bwg.maxID||r<1e9)?i.getFirstAdjacentById(i.bwg.maxID,1e9,t,n):n([]);i.fetchFeatures(function(n,i,o,a){return t<0&&(n0&&(n>e||i>r)},[o],function(e){for(var r=null,i=-1,o=-1,a=0;ai||u>o)||t>0&&(f0&&(p>e||p==e&&b>=r))&&(/_random/.exec(i.bwg.idsToChroms[w])||(null==o||t<0&&(p>s||p==s&&b>f)||t>0&&(w=e||t>0&&(p>e||p==e&&b>=r)&&w<=e)&&(z<0||b>A)&&(z=x,A=t<0?b:y,t<0?p:w),h+=24}z>=0&&l([z],u+1)}};l([i.cirTreeOffset+48],1)}else this.bwg.data.slice(this.cirTreeOffset,48).fetch(function(o){i.cirHeader=o;var a=new Int32Array(i.cirHeader);i.cirBlockSize=a[1],i.getFirstAdjacentById(e,r,t,n)})},s.prototype.readWigData=function(e,r,t){var n,i=t-r;if(i<=25e3||0===this.zoomLevels.length)n=this.getUnzoomedView();else for(var o=0;o=this.zoomLevels.length-1)){return(e<0?this.getUnzoomedView():this.getZoomedView(e)).readWigDataById(r,t,n,i)}if(this.topLevelReductionCache){for(var a=[],s=this.topLevelReductionCache,f=0;f0?0:3e8;e.fromRef&&(s=r);for(var h=0;h0){if(u>n)if(e.zoom<0){if(c.min>s)return i(c)}else c.max>s&&f.push({chr:e.chr,chrOrd:e.chrOrd,zoom:e.zoom-2,min:c.min,max:c.max,fromRef:e.fromRef})}else if(u>n)if(e.zoom<0){if(c.maxt.field-3)return o[t.field-3]==e},[{offset:w,size:y}],r)}m+=c}return r([])}for(var p=null,b=0;b100?l(new Uint8Array(t.buffer,t.byteOffset+i,s),e,n):h(t,i,e,n,s)}}function h(t,i,e,n,s){for(var a=0;a15?(this.inflateEnd(t),-2):(this.wbits=i,t.istate.blocks=new e(t,0!=t.istate.nowrap?null:this,1<>4)>t.istate.wbits){t.istate.mode=13,t.msg="invalid window size",t.istate.marker=5;break}t.istate.mode=1;case 1:if(0==t.avail_in)return e;if(e=i,t.avail_in--,t.total_in++,n=255&t.next_in[t.next_in_index++],((t.istate.method<<8)+n)%31!=0){t.istate.mode=13,t.msg="incorrect header check",t.istate.marker=5;break}if(0==(32&n)){t.istate.mode=7;break}t.istate.mode=2;case 2:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need=(255&t.next_in[t.next_in_index++])<<24&4278190080,t.istate.mode=3;case 3:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<16&16711680,t.istate.mode=4;case 4:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<8&65280,t.istate.mode=5;case 5:return 0==t.avail_in?e:(e=i,t.avail_in--,t.total_in++,t.istate.need+=255&t.next_in[t.next_in_index++],t.adler=t.istate.need,t.istate.mode=6,2);case 6:return t.istate.mode=13,t.msg="need dictionary",t.istate.marker=0,-2;case 7:if(-3==(e=t.istate.blocks.proc(t,e))){t.istate.mode=13,t.istate.marker=0;break}if(e==x&&(e=i),e!=u)return e;if(e=i,t.istate.blocks.reset(t,t.istate.was),0!=t.istate.nowrap){t.istate.mode=12;break}t.istate.mode=8;case 8:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need=(255&t.next_in[t.next_in_index++])<<24&4278190080,t.istate.mode=9;case 9:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<16&16711680,t.istate.mode=10;case 10:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<8&65280,t.istate.mode=11;case 11:if(0==t.avail_in)return e;if(e=i,t.avail_in--,t.total_in++,t.istate.need+=255&t.next_in[t.next_in_index++],t.istate.was[0]!=t.istate.need){t.istate.mode=13,t.msg="incorrect data check",t.istate.marker=5;break}t.istate.mode=12;case 12:return u;case 13:return-3;default:return-2}},i.prototype.inflateSetDictionary=function(t,i,e){var n=0,s=e;return null==t||null==t.istate||6!=t.istate.mode?-2:t._adler.adler32(1,i,0,e)!=t.adler?-3:(t.adler=t._adler.adler32(0,null,0,0),s>=1<>>1){case 0:n>>>=3,s-=3,e=7&s,n>>>=e,s-=e,this.mode=1;break;case 1:var o=new Int32Array(1),f=new Int32Array(1),b=[],v=[];a(o,f,b,v,t),this.codes.init(o[0],f[0],b[0],0,v[0],0,t),n>>>=3,s-=3,this.mode=6;break;case 2:n>>>=3,s-=3,this.mode=3;break;case 3:return n>>>=3,s-=3,this.mode=13,t.msg="invalid block type",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i)}break;case 1:for(;s<32;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=x,l--,n|=(255&t.next_in[h++])<>>16&65535)!=(65535&n))return this.mode=13,t.msg="invalid stored block lengths",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);this.left=65535&n,n=s=0,this.mode=0!=this.left?2:0!=this.last?7:w;break;case 2:if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,write=_,this.inflate_flush(t,i);if(0==d&&(_==end&&0!=read&&(_=0,d=_l&&(e=l),e>d&&(e=d),r(t.next_in,h,this.window,_,e),h+=e,l-=e,_+=e,d-=e,0!=(this.left-=e))break;this.mode=0!=this.last?7:w;break;case 3:for(;s<14;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=x,l--,n|=(255&t.next_in[h++])<29||(e>>5&31)>29)return this.mode=9,t.msg="too many length or distance symbols",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);if(e=258+(31&e)+(e>>5&31),null==this.blens||this.blens.length>>=14,s-=14,this.index=0,mode=4;case 4:for(;this.index<4+(this.table>>>10);){for(;s<3;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=x,l--,n|=(255&t.next_in[h++])<>>=3,s-=3}for(;this.index<19;)this.blens[E[this.index++]]=0;if(this.bb[0]=7,(e=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,t))!=x)return i=e,-3==i&&(this.blens=null,this.mode=9),this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,write=_,this.inflate_flush(t,i);this.index=0,this.mode=5;case 5:for(;;){if(e=this.table,!(this.index<258+(31&e)+(e>>5&31)))break;var k,m,y;for(e=this.bb[0];s>>=e,s-=e,this.blens[this.index++]=y;else{for(k=18==y?7:y-14,m=18==y?11:3;s>>=e,s-=e,m+=n&c[k],n>>>=k,s-=k,k=this.index,e=this.table,k+m>258+(31&e)+(e>>5&31)||16==y&&k<1)return this.blens=null,this.mode=9,t.msg="invalid bit length repeat",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);y=16==y?this.blens[k-1]:0;do{this.blens[k++]=y}while(0!=--m);this.index=k}}this.tb[0]=-1;var o=new Int32Array(1),f=new Int32Array(1),b=new Int32Array(1),v=new Int32Array(1);if(o[0]=9,f[0]=6,e=this.table,(e=this.inftree.inflate_trees_dynamic(257+(31&e),1+(e>>5&31),this.blens,o,f,b,v,this.hufts,t))!=x)return-3==e&&(this.blens=null,this.mode=13),i=e,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);this.codes.init(o[0],f[0],this.hufts,b[0],this.hufts,v[0],t),this.mode=6;case 6:if(this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,(i=this.codes.proc(this,t,i))!=u)return this.inflate_flush(t,i);if(i=x,this.codes.free(t),h=t.next_in_index,l=t.avail_in,n=this.bitb,s=this.bitk,_=this.write,d=_t.avail_out&&(e=t.avail_out),0!=e&&i==b&&(i=x),t.avail_out-=e,t.total_out+=e,null!=this.checkfn&&(t.adler=this.check=t._adler.adler32(this.check,this.window,s,e)),r(this.window,s,t.next_out,n,e),n+=e,s+=e,s==this.end&&(s=0,this.write==this.end&&(this.write=0),e=this.write-s,e>t.avail_out&&(e=t.avail_out),0!=e&&i==b&&(i=x),t.avail_out-=e,t.total_out+=e,null!=this.checkfn&&(t.adler=this.check=t._adler.adler32(this.check,this.window,s,e)),r(this.window,s,t.next_out,n,e),n+=e,s+=e),t.next_out_index=n,this.read=s,i};n.prototype.init=function(t,i,e,n,s,a,r){this.mode=0,this.lbits=t,this.dbits=i,this.ltree=e,this.ltree_index=n,this.dtree=s,this.dtree_index=a,this.tree=null},n.prototype.proc=function(t,i,e){var n,s,a,r,h,l,_,d=0,o=0,f=0;for(f=i.next_in_index,r=i.avail_in,d=t.bitb,o=t.bitk,h=t.write,l=h=258&&r>=10&&(t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=f-i.next_in_index,i.next_in_index=f,t.write=h,e=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,t,i),f=i.next_in_index,r=i.avail_in,d=t.bitb,o=t.bitk,h=t.write,l=h>>=this.tree[s+1],o-=this.tree[s+1],0==(a=this.tree[s])){this.lit=this.tree[s+2],this.mode=6;break}if(0!=(16&a)){this.get=15&a,this.len=this.tree[s+2],this.mode=2;break}if(0==(64&a)){this.need=a,this.tree_index=s/3+this.tree[s+2];break}if(0!=(32&a)){this.mode=7;break}return this.mode=9,i.msg="invalid literal/length code",e=-3,t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=f-i.next_in_index,i.next_in_index=f,t.write=h,t.inflate_flush(i,e);case 2:for(n=this.get;o>=n,o-=n,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=3;case 3:for(n=this.need;o>=this.tree[s+1],o-=this.tree[s+1],0!=(16&(a=this.tree[s]))){this.get=15&a,this.dist=this.tree[s+2],this.mode=4;break}if(0==(64&a)){this.need=a,this.tree_index=s/3+this.tree[s+2];break}return this.mode=9,i.msg="invalid distance code",e=-3,t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=f-i.next_in_index,i.next_in_index=f,t.write=h,t.inflate_flush(i,e);case 4:for(n=this.get;o>=n,o-=n,this.mode=5;case 5:for(_=h-this.dist;_<0;)_+=t.end;for(;0!=this.len;){if(0==l&&(h==t.end&&0!=t.read&&(h=0,l=h7&&(o-=8,r++,f--),t.write=h,e=t.inflate_flush(i,e),h=t.write,l=h>=d[E+1],w-=d[E+1],0!=(16&f)){for(f&=15,A=d[E+2]+(b&c[f]),b>>=f,w-=f;w<15;)k--,b|=(255&l.next_in[v++])<>=d[E+1],w-=d[E+1],0!=(16&f)){for(f&=15;w>=f,w-=f,y-=A,m>=I)U=m-I,h.window[m++]=h.window[U++],h.window[m++]=h.window[U++],A-=2;else{U=m-I;do{U+=h.end}while(U<0);if(f=h.end-U,A>f){if(A-=f,m-U>0&&f>m-U)do{h.window[m++]=h.window[U++]}while(0!=--f);else r(h.window,U,h.window,m,f),m+=f,U+=f,f=0;U=0}}do{h.window[m++]=h.window[U++]}while(0!=--A);break}if(0!=(64&f))return l.msg="invalid distance code",A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=b,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,-3;_+=d[E+2],_+=b&c[f],E=3*(o+_),f=d[E]}break}if(0!=(64&f))return 0!=(32&f)?(A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=b,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,u):(l.msg="invalid literal/length code",A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=b,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,-3);if(_+=d[E+2],_+=b&c[f],E=3*(o+_),0==(f=d[E])){b>>=d[E+1],w-=d[E+1],h.window[m++]=d[E+2],y--;break}}else b>>=d[E+1],w-=d[E+1],h.window[m++]=d[E+2],y--}while(y>=258&&k>=10);return A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=b,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,x},s.prototype.huft_build=function(t,i,e,n,s,a,h,l,_,d,f){var u,c,w,v,k,m,y,p,g,A,I,U,E,S,R;A=0,k=e;do{this.c[t[i+A]]++,A++,k--}while(0!=k);if(this.c[0]==e)return h[0]=-1,l[0]=0,x;for(p=l[0],m=1;m<=15&&0==this.c[m];m++);for(y=m,pk&&(p=k),l[0]=p,S=1<U+p;){if(v++,U+=p,R=w-U,R=R>p?p:R,(c=1<<(m=y-U))>u+1&&(c-=u+1,E=y,mo)return-3;this.u[v]=I=this.hn[0],this.hn[0]+=R,0!=v?(this.x[v]=k,this.r[0]=m,this.r[1]=p,m=k>>>U-p,this.r[2]=I-this.u[v-1]-m,r(this.r,0,_,3*(this.u[v-1]+m),3)):h[0]=I}for(this.r[1]=y-U,A>=e?this.r[0]=192:f[A]>>U;m>>=1)k^=m;for(k^=m,g=(1<257?(-3==_?l.msg="oversubscribed distance tree":_==b?(l.msg="incomplete distance tree",_=-3):-4!=_&&(l.msg="empty distance tree with lengths",_=-3),_):x)},s.prototype.initWorkArea=function(t){null==this.hn&&(this.hn=new Int32Array(1),this.v=new Int32Array(t),this.c=new Int32Array(16),this.r=new Int32Array(3),this.u=new Int32Array(15),this.x=new Int32Array(16)),this.v.length100?l(new Uint8Array(t.buffer,t.byteOffset+i,s),e,n):h(t,i,e,n,s)}}function h(t,i,e,n,s){for(var a=0;a15?(this.inflateEnd(t),-2):(this.wbits=i,t.istate.blocks=new e(t,0!=t.istate.nowrap?null:this,1<>4)>t.istate.wbits){t.istate.mode=13,t.msg="invalid window size",t.istate.marker=5;break}t.istate.mode=1;case 1:if(0==t.avail_in)return e;if(e=i,t.avail_in--,t.total_in++,n=255&t.next_in[t.next_in_index++],((t.istate.method<<8)+n)%31!=0){t.istate.mode=13,t.msg="incorrect header check",t.istate.marker=5;break}if(0==(32&n)){t.istate.mode=7;break}t.istate.mode=2;case 2:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need=(255&t.next_in[t.next_in_index++])<<24&4278190080,t.istate.mode=3;case 3:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<16&16711680,t.istate.mode=4;case 4:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<8&65280,t.istate.mode=5;case 5:return 0==t.avail_in?e:(e=i,t.avail_in--,t.total_in++,t.istate.need+=255&t.next_in[t.next_in_index++],t.adler=t.istate.need,t.istate.mode=6,2);case 6:return t.istate.mode=13,t.msg="need dictionary",t.istate.marker=0,-2;case 7:if(-3==(e=t.istate.blocks.proc(t,e))){t.istate.mode=13,t.istate.marker=0;break}if(e==f&&(e=i),e!=x)return e;if(e=i,t.istate.blocks.reset(t,t.istate.was),0!=t.istate.nowrap){t.istate.mode=12;break}t.istate.mode=8;case 8:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need=(255&t.next_in[t.next_in_index++])<<24&4278190080,t.istate.mode=9;case 9:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<16&16711680,t.istate.mode=10;case 10:if(0==t.avail_in)return e;e=i,t.avail_in--,t.total_in++,t.istate.need+=(255&t.next_in[t.next_in_index++])<<8&65280,t.istate.mode=11;case 11:if(0==t.avail_in)return e;if(e=i,t.avail_in--,t.total_in++,t.istate.need+=255&t.next_in[t.next_in_index++],t.istate.was[0]!=t.istate.need){t.istate.mode=13,t.msg="incorrect data check",t.istate.marker=5;break}t.istate.mode=12;case 12:return x;case 13:return-3;default:return-2}},i.prototype.inflateSetDictionary=function(t,i,e){var n=0,s=e;return null==t||null==t.istate||6!=t.istate.mode?-2:t._adler.adler32(1,i,0,e)!=t.adler?-3:(t.adler=t._adler.adler32(0,null,0,0),s>=1<>>1){case 0:n>>>=3,n>>>=e=7&(s-=3),s-=e,this.mode=1;break;case 1:a(v=new Int32Array(1),k=new Int32Array(1),m=[],y=[]),this.codes.init(v[0],k[0],m[0],0,y[0],0,t),n>>>=3,s-=3,this.mode=6;break;case 2:n>>>=3,s-=3,this.mode=3;break;case 3:return n>>>=3,s-=3,this.mode=13,t.msg="invalid block type",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i)}break;case 1:for(;s<32;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=f,l--,n|=(255&t.next_in[h++])<>>16&65535)!=(65535&n))return this.mode=13,t.msg="invalid stored block lengths",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);this.left=65535&n,n=s=0,this.mode=0!=this.left?2:0!=this.last?7:c;break;case 2:if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,write=_,this.inflate_flush(t,i);if(0==d&&(_==end&&0!=read&&(d=(_=0)l&&(e=l),e>d&&(e=d),r(t.next_in,h,this.window,_,e),h+=e,l-=e,_+=e,d-=e,0!=(this.left-=e))break;this.mode=0!=this.last?7:c;break;case 3:for(;s<14;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=f,l--,n|=(255&t.next_in[h++])<29||(e>>5&31)>29)return this.mode=9,t.msg="too many length or distance symbols",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);if(e=258+(31&e)+(e>>5&31),null==this.blens||this.blens.length>>=14,s-=14,this.index=0,mode=4;case 4:for(;this.index<4+(this.table>>>10);){for(;s<3;){if(0==l)return this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);i=f,l--,n|=(255&t.next_in[h++])<>>=3,s-=3}for(;this.index<19;)this.blens[U[this.index++]]=0;if(this.bb[0]=7,(e=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,t))!=f)return-3==(i=e)&&(this.blens=null,this.mode=9),this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,write=_,this.inflate_flush(t,i);this.index=0,this.mode=5;case 5:for(;;){if(e=this.table,!(this.index<258+(31&e)+(e>>5&31)))break;var o,u,w;for(e=this.bb[0];s>>=e,s-=e,this.blens[this.index++]=w;else{for(o=18==w?7:w-14,u=18==w?11:3;s>>=e,s-=e,u+=n&b[o],n>>>=o,s-=o,o=this.index,e=this.table,o+u>258+(31&e)+(e>>5&31)||16==w&&o<1)return this.blens=null,this.mode=9,t.msg="invalid bit length repeat",i=-3,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);w=16==w?this.blens[o-1]:0;do{this.blens[o++]=w}while(0!=--u);this.index=o}}this.tb[0]=-1;var v=new Int32Array(1),k=new Int32Array(1),m=new Int32Array(1),y=new Int32Array(1);if(v[0]=9,k[0]=6,e=this.table,(e=this.inftree.inflate_trees_dynamic(257+(31&e),1+(e>>5&31),this.blens,v,k,m,y,this.hufts,t))!=f)return-3==e&&(this.blens=null,this.mode=13),i=e,this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,this.inflate_flush(t,i);this.codes.init(v[0],k[0],this.hufts,m[0],this.hufts,y[0],t),this.mode=6;case 6:if(this.bitb=n,this.bitk=s,t.avail_in=l,t.total_in+=h-t.next_in_index,t.next_in_index=h,this.write=_,(i=this.codes.proc(this,t,i))!=x)return this.inflate_flush(t,i);if(i=f,this.codes.free(t),h=t.next_in_index,l=t.avail_in,n=this.bitb,s=this.bitk,_=this.write,d=_t.avail_out&&(e=t.avail_out),0!=e&&i==u&&(i=f),t.avail_out-=e,t.total_out+=e,null!=this.checkfn&&(t.adler=this.check=t._adler.adler32(this.check,this.window,s,e)),r(this.window,s,t.next_out,n,e),n+=e,(s+=e)==this.end&&(s=0,this.write==this.end&&(this.write=0),(e=this.write-s)>t.avail_out&&(e=t.avail_out),0!=e&&i==u&&(i=f),t.avail_out-=e,t.total_out+=e,null!=this.checkfn&&(t.adler=this.check=t._adler.adler32(this.check,this.window,s,e)),r(this.window,s,t.next_out,n,e),n+=e,s+=e),t.next_out_index=n,this.read=s,i};n.prototype.init=function(t,i,e,n,s,a,r){this.mode=0,this.lbits=t,this.dbits=i,this.ltree=e,this.ltree_index=n,this.dtree=s,this.dtree_index=a,this.tree=null},n.prototype.proc=function(t,i,e){var n,s,a,r,h,l,_,d=0,o=0,u=0;for(u=i.next_in_index,r=i.avail_in,d=t.bitb,o=t.bitk,l=(h=t.write)=258&&r>=10&&(t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=u-i.next_in_index,i.next_in_index=u,t.write=h,e=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,t,i),u=i.next_in_index,r=i.avail_in,d=t.bitb,o=t.bitk,h=t.write,l=h>>=this.tree[s+1],o-=this.tree[s+1],0==(a=this.tree[s])){this.lit=this.tree[s+2],this.mode=6;break}if(0!=(16&a)){this.get=15&a,this.len=this.tree[s+2],this.mode=2;break}if(0==(64&a)){this.need=a,this.tree_index=s/3+this.tree[s+2];break}if(0!=(32&a)){this.mode=7;break}return this.mode=9,i.msg="invalid literal/length code",e=-3,t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=u-i.next_in_index,i.next_in_index=u,t.write=h,t.inflate_flush(i,e);case 2:for(n=this.get;o>=n,o-=n,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=3;case 3:for(n=this.need;o>=this.tree[s+1],o-=this.tree[s+1],0!=(16&(a=this.tree[s]))){this.get=15&a,this.dist=this.tree[s+2],this.mode=4;break}if(0==(64&a)){this.need=a,this.tree_index=s/3+this.tree[s+2];break}return this.mode=9,i.msg="invalid distance code",e=-3,t.bitb=d,t.bitk=o,i.avail_in=r,i.total_in+=u-i.next_in_index,i.next_in_index=u,t.write=h,t.inflate_flush(i,e);case 4:for(n=this.get;o>=n,o-=n,this.mode=5;case 5:for(_=h-this.dist;_<0;)_+=t.end;for(;0!=this.len;){if(0==l&&(h==t.end&&0!=t.read&&(l=(h=0)7&&(o-=8,r++,u--),t.write=h,e=t.inflate_flush(i,e),h=t.write,l=h>=d[E+1],w-=d[E+1],0!=(16&u)){for(u&=15,A=d[E+2]+(c&b[u]),c>>=u,w-=u;w<15;)k--,c|=(255&l.next_in[v++])<>=d[E+1],w-=d[E+1],0!=(16&u)){for(u&=15;w>=u,w-=u,y-=A,m>=I)U=m-I,h.window[m++]=h.window[U++],h.window[m++]=h.window[U++],A-=2;else{U=m-I;do{U+=h.end}while(U<0);if(u=h.end-U,A>u){if(A-=u,m-U>0&&u>m-U)do{h.window[m++]=h.window[U++]}while(0!=--u);else r(h.window,U,h.window,m,u),m+=u,U+=u,u=0;U=0}}do{h.window[m++]=h.window[U++]}while(0!=--A);break}if(0!=(64&u))return l.msg="invalid distance code",A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=c,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,-3;_+=d[E+2],u=d[E=3*(o+(_+=c&b[u]))]}break}if(0!=(64&u))return 0!=(32&u)?(A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=c,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,x):(l.msg="invalid literal/length code",A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=c,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,-3);if(_+=d[E+2],_+=c&b[u],E=3*(o+_),0==(u=d[E])){c>>=d[E+1],w-=d[E+1],h.window[m++]=d[E+2],y--;break}}else c>>=d[E+1],w-=d[E+1],h.window[m++]=d[E+2],y--}while(y>=258&&k>=10);return A=l.avail_in-k,A=w>>3>3:A,k+=A,v-=A,w-=A<<3,h.bitb=c,h.bitk=w,l.avail_in=k,l.total_in+=v-l.next_in_index,l.next_in_index=v,h.write=m,f},s.prototype.huft_build=function(t,i,e,n,s,a,h,l,_,o,x){var b,c,w,v,k,m,y,p,g,A,I,U,E,S,R;A=0,k=e;do{this.c[t[i+A]]++,A++,k--}while(0!=k);if(this.c[0]==e)return h[0]=-1,l[0]=0,f;for(p=l[0],m=1;m<=15&&0==this.c[m];m++);for(y=m,pk&&(p=k),l[0]=p,S=1<U+p;){if(v++,U+=p,R=w-U,R=R>p?p:R,(c=1<<(m=y-U))>b+1&&(c-=b+1,E=y,md)return-3;this.u[v]=I=this.hn[0],this.hn[0]+=R,0!=v?(this.x[v]=k,this.r[0]=m,this.r[1]=p,m=k>>>U-p,this.r[2]=I-this.u[v-1]-m,r(this.r,0,_,3*(this.u[v-1]+m),3)):h[0]=I}for(this.r[1]=y-U,A>=e?this.r[0]=192:x[A]>>U;m>>=1)k^=m;for(k^=m,g=(1<257?(-3==_?l.msg="oversubscribed distance tree":_==u?(l.msg="incomplete distance tree",_=-3):-4!=_&&(l.msg="empty distance tree with lengths",_=-3),_):f)},s.prototype.initWorkArea=function(t){null==this.hn&&(this.hn=new Int32Array(1),this.v=new Int32Array(t),this.c=new Int32Array(16),this.r=new Int32Array(3),this.u=new Int32Array(15),this.x=new Int32Array(16)),this.v.lengthi._max&&(i._max=n._max):(r.push(i),i=n)}),r.push(i),this._ranges=r}function r(n,r){return n instanceof t||(n instanceof Array||(n=[n]),n=new t(n)),r&&n.insertRange(r),n}function i(r,i){for(var e=r.ranges(),o=i.ranges(),a=e.length,s=o.length,u=0,m=0,h=[];u=_&&h.push(new n(_,g)),r.max()>i.max()?++m:++u}return 0==h.length?null:1==h.length?h[0]:new t(h)}function e(n){for(var t=0,r=n.ranges(),i=0;it.min()?1:n.max()n.max()?1:0}function a(n,t){return n._mint._min?1:n._maxn._max?1:0}return n.prototype.min=function(){return this._min},n.prototype.max=function(){return this._max},n.prototype.contains=function(n){return n>=this._min&&n<=this._max},n.prototype.isContiguous=function(){return!0},n.prototype.ranges=function(){return[this]},n.prototype._pushRanges=function(n){n.push(this)},n.prototype.toString=function(){return"["+this._min+"-"+this._max+"]"},t.prototype.min=function(){return this._ranges[0].min()},t.prototype.max=function(){return this._ranges[this._ranges.length-1].max()},t.prototype.lower_bound=function(n){var t=this.ranges();if(n>this.max())return t.length;if(nt[e]._max)r=e+1;else{if(!(nn._max&&(n._max=r[i]._max),this._ranges.splice(t,i-t+1,n)},t.prototype.isContiguous=function(){return this._ranges.length>1},t.prototype.ranges=function(){return this._ranges},t.prototype._pushRanges=function(n){for(var t=0;t0&&(n+=","),n+=this._ranges[t].toString();return n},{Range:n,union:r,intersection:i,coverage:e,rangeOver:o,_rangeOrder:a}}); \ No newline at end of file +define([],function(){"use strict";function n(n,t){if("number"!=typeof n||"number"!=typeof t)throw"Bad range "+n+","+t;this._min=n,this._max=t}function t(n){var t=n.sort(r),i=[],e=t.shift();t.forEach(function(n){n._min<=e._max?n._max>e._max&&(e._max=n._max):(i.push(e),e=n)}),i.push(e),this._ranges=i}function r(n,t){return n._mint._min?1:n._maxn._max?1:0}return n.prototype.min=function(){return this._min},n.prototype.max=function(){return this._max},n.prototype.contains=function(n){return n>=this._min&&n<=this._max},n.prototype.isContiguous=function(){return!0},n.prototype.ranges=function(){return[this]},n.prototype._pushRanges=function(n){n.push(this)},n.prototype.toString=function(){return"["+this._min+"-"+this._max+"]"},t.prototype.min=function(){return this._ranges[0].min()},t.prototype.max=function(){return this._ranges[this._ranges.length-1].max()},t.prototype.lower_bound=function(n){var t=this.ranges();if(n>this.max())return t.length;if(nt[e]._max)r=e+1;else{if(!(nn._max&&(n._max=r[i]._max),this._ranges.splice(t,i-t+1,n)}}else this._ranges.push(n)},t.prototype.isContiguous=function(){return this._ranges.length>1},t.prototype.ranges=function(){return this._ranges},t.prototype._pushRanges=function(n){for(var t=0;t0&&(n+=","),n+=this._ranges[t].toString();return n},{Range:n,union:function(n,r){return n instanceof t||(n instanceof Array||(n=[n]),n=new t(n)),r&&n.insertRange(r),n},intersection:function(r,i){for(var e=r.ranges(),a=i.ranges(),o=e.length,s=a.length,u=0,m=0,h=[];u=_&&h.push(new n(_,g)),r.max()>i.max()?++m:++u}return 0==h.length?null:1==h.length?h[0]:new t(h)},coverage:function(n){for(var t=0,r=n.ranges(),i=0;it.min()?1:n.max()n.max()?1:0},_rangeOrder:r}}); \ No newline at end of file diff --git a/static/scripts/libs/bibtex.js b/static/scripts/libs/bibtex.js index d75714a102c..3eebb0c5684 100644 --- a/static/scripts/libs/bibtex.js +++ b/static/scripts/libs/bibtex.js @@ -1,2 +1 @@ -function BibtexParser(g){function r(g){t.push(g)}if("string"==typeof g){var e={},t=[],c=BibtexParser.call(e,r);return c.parse(g),{entries:t,errors:c.getErrors()}}if("function"!=typeof g)throw"Invalid parser construction.";return this.STATES_={ENTRY_OR_JUNK:0,OBJECT_TYPE:1,ENTRY_KEY:2,KV_KEY:3,EQUALS:4,KV_VALUE:5},this.DATA_={},this.CALLBACK_=g,this.CHAR_=0,this.LINE_=1,this.CHAR_IN_LINE_=0,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={},this.SKIPTILLEOL_=!1,this.VALBRACES_=null,this.BRACETYPE_=null,this.BRACECOUNT_=0,this.STATE_=this.STATES_.ENTRY_OR_JUNK,this.ERRORS_=[],this.ENTRY_TYPES_={inproceedings:1,proceedings:2,article:3,techreport:4,misc:5,mastersthesis:6,book:7,phdthesis:8,incollection:9,unpublished:10,inbook:11,manual:12,periodical:13,booklet:14,masterthesis:15,conference:16,online:998,data:999},this.MACROS_={jan:"January",feb:"February",mar:"March",apr:"April",may:"May",jun:"June",jul:"July",aug:"August",sep:"September",oct:"October",nov:"November",dec:"December",Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"},this.getErrors=function(){return this.ERRORS_},this.parse=function(g){for(var r=0;r0&&(t["{"].splice(t["{"].length-1,1),0==t["{"].length+t['"'].length&&(i=!0))}i?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_KEY,this.DATA_.Fields[this.PARSETMP_.Key]=this.PARSETMP_.Value,this.PARSETMP_={Key:""},this.VALBRACES_=null):this.PARSETMP_.Value+=g}}}, -this.CHARCONV_=[[/\\space /g," "],[/\\textdollar /g,"$"],[/\\textquotesingle /g,"'"],[/\\ast /g,"*"],[/\\textbackslash /g,"\\"],[/\\\^\{\}/g,"^"],[/\\textasciigrave /g,"`"],[/\\lbrace /g,"{"],[/\\vert /g,"|"],[/\\rbrace /g,"}"],[/\\textasciitilde /g,"~"],[/\\textexclamdown /g,"¡"],[/\\textcent /g,"¢"],[/\\textsterling /g,"£"],[/\\textcurrency /g,"¤"],[/\\textyen /g,"¥"],[/\\textbrokenbar /g,"¦"],[/\\textsection /g,"§"],[/\\textasciidieresis /g,"¨"],[/\\textcopyright /g,"©"],[/\\textordfeminine /g,"ª"],[/\\guillemotleft /g,"«"],[/\\lnot /g,"¬"],[/\\textregistered /g,"®"],[/\\textasciimacron /g,"¯"],[/\\textdegree /g,"°"],[/\\pm /g,"±"],[/\\textasciiacute /g,"´"],[/\\mathrm\{\\mu\}/g,"µ"],[/\\textparagraph /g,"¶"],[/\\cdot /g,"·"],[/\\c\{\}/g,"¸"],[/\\textordmasculine /g,"º"],[/\\guillemotright /g,"»"],[/\\textonequarter /g,"¼"],[/\\textonehalf /g,"½"],[/\\textthreequarters /g,"¾"],[/\\textquestiondown /g,"¿"],[/\\`\{A\}/g,"À"],[/\\'\{A\}/g,"Á"],[/\\\^\{A\}/g,"Â"],[/\\~\{A\}/g,"Ã"],[/\\"\{A\}/g,"Ä"],[/\\AA /g,"Å"],[/\\AE /g,"Æ"],[/\\c\{C\}/g,"Ç"],[/\\`\{E\}/g,"È"],[/\\'\{E\}/g,"É"],[/\\\^\{E\}/g,"Ê"],[/\\"\{E\}/g,"Ë"],[/\\`\{I\}/g,"Ì"],[/\\'\{I\}/g,"Í"],[/\\\^\{I\}/g,"Î"],[/\\"\{I\}/g,"Ï"],[/\\DH /g,"Ð"],[/\\~\{N\}/g,"Ñ"],[/\\`\{O\}/g,"Ò"],[/\\'\{O\}/g,"Ó"],[/\\\^\{O\}/g,"Ô"],[/\\~\{O\}/g,"Õ"],[/\\"\{O\}/g,"Ö"],[/\\texttimes /g,"×"],[/\\O /g,"Ø"],[/\\`\{U\}/g,"Ù"],[/\\'\{U\}/g,"Ú"],[/\\\^\{U\}/g,"Û"],[/\\"\{U\}/g,"Ü"],[/\\'\{Y\}/g,"Ý"],[/\\TH /g,"Þ"],[/\\ss /g,"ß"],[/\\`\{a\}/g,"à"],[/\\'\{a\}/g,"á"],[/\\\^\{a\}/g,"â"],[/\\~\{a\}/g,"ã"],[/\\"\{a\}/g,"ä"],[/\\aa /g,"å"],[/\\ae /g,"æ"],[/\\c\{c\}/g,"ç"],[/\\`\{e\}/g,"è"],[/\\'\{e\}/g,"é"],[/\\\^\{e\}/g,"ê"],[/\\"\{e\}/g,"ë"],[/\\`\{\\i\}/g,"ì"],[/\\'\{\\i\}/g,"í"],[/\\\^\{\\i\}/g,"î"],[/\\"\{\\i\}/g,"ï"],[/\\dh /g,"ð"],[/\\~\{n\}/g,"ñ"],[/\\`\{o\}/g,"ò"],[/\\'\{o\}/g,"ó"],[/\\\^\{o\}/g,"ô"],[/\\~\{o\}/g,"õ"],[/\\"\{o\}/g,"ö"],[/\\div /g,"÷"],[/\\o /g,"ø"],[/\\`\{u\}/g,"ù"],[/\\'\{u\}/g,"ú"],[/\\\^\{u\}/g,"û"],[/\\"\{u\}/g,"ü"],[/\\'\{y\}/g,"ý"],[/\\th /g,"þ"],[/\\"\{y\}/g,"ÿ"],[/\\=\{A\}/g,"Ā"],[/\\=\{a\}/g,"ā"],[/\\u\{A\}/g,"Ă"],[/\\u\{a\}/g,"ă"],[/\\k\{A\}/g,"Ą"],[/\\k\{a\}/g,"ą"],[/\\'\{C\}/g,"Ć"],[/\\'\{c\}/g,"ć"],[/\\\^\{C\}/g,"Ĉ"],[/\\\^\{c\}/g,"ĉ"],[/\\.\{C\}/g,"Ċ"],[/\\.\{c\}/g,"ċ"],[/\\v\{C\}/g,"Č"],[/\\v\{c\}/g,"č"],[/\\v\{D\}/g,"Ď"],[/\\v\{d\}/g,"ď"],[/\\DJ /g,"Đ"],[/\\dj /g,"đ"],[/\\=\{E\}/g,"Ē"],[/\\=\{e\}/g,"ē"],[/\\u\{E\}/g,"Ĕ"],[/\\u\{e\}/g,"ĕ"],[/\\.\{E\}/g,"Ė"],[/\\.\{e\}/g,"ė"],[/\\k\{E\}/g,"Ę"],[/\\k\{e\}/g,"ę"],[/\\v\{E\}/g,"Ě"],[/\\v\{e\}/g,"ě"],[/\\\^\{G\}/g,"Ĝ"],[/\\\^\{g\}/g,"ĝ"],[/\\u\{G\}/g,"Ğ"],[/\\u\{g\}/g,"ğ"],[/\\.\{G\}/g,"Ġ"],[/\\.\{g\}/g,"ġ"],[/\\c\{G\}/g,"Ģ"],[/\\c\{g\}/g,"ģ"],[/\\\^\{H\}/g,"Ĥ"],[/\\\^\{h\}/g,"ĥ"],[/\\Elzxh /g,"ħ"],[/\\~\{I\}/g,"Ĩ"],[/\\~\{\\i\}/g,"ĩ"],[/\\=\{I\}/g,"Ī"],[/\\=\{\\i\}/g,"ī"],[/\\u\{I\}/g,"Ĭ"],[/\\u\{\\i\}/g,"ĭ"],[/\\k\{I\}/g,"Į"],[/\\k\{i\}/g,"į"],[/\\.\{I\}/g,"İ"],[/\\i /g,"ı"],[/\\\^\{J\}/g,"Ĵ"],[/\\\^\{\\j\}/g,"ĵ"],[/\\c\{K\}/g,"Ķ"],[/\\c\{k\}/g,"ķ"],[/\\'\{L\}/g,"Ĺ"],[/\\'\{l\}/g,"ĺ"],[/\\c\{L\}/g,"Ļ"],[/\\c\{l\}/g,"ļ"],[/\\v\{L\}/g,"Ľ"],[/\\v\{l\}/g,"ľ"],[/\\L /g,"Ł"],[/\\l /g,"ł"],[/\\'\{N\}/g,"Ń"],[/\\'\{n\}/g,"ń"],[/\\c\{N\}/g,"Ņ"],[/\\c\{n\}/g,"ņ"],[/\\v\{N\}/g,"Ň"],[/\\v\{n\}/g,"ň"],[/\\NG /g,"Ŋ"],[/\\ng /g,"ŋ"],[/\\=\{O\}/g,"Ō"],[/\\=\{o\}/g,"ō"],[/\\u\{O\}/g,"Ŏ"],[/\\u\{o\}/g,"ŏ"],[/\\H\{O\}/g,"Ő"],[/\\H\{o\}/g,"ő"],[/\\OE /g,"Œ"],[/\\oe /g,"œ"],[/\\'\{R\}/g,"Ŕ"],[/\\'\{r\}/g,"ŕ"],[/\\c\{R\}/g,"Ŗ"],[/\\c\{r\}/g,"ŗ"],[/\\v\{R\}/g,"Ř"],[/\\v\{r\}/g,"ř"],[/\\'\{S\}/g,"Ś"],[/\\'\{s\}/g,"ś"],[/\\\^\{S\}/g,"Ŝ"],[/\\\^\{s\}/g,"ŝ"],[/\\c\{S\}/g,"Ş"],[/\\c\{s\}/g,"ş"],[/\\v\{S\}/g,"Š"],[/\\v\{s\}/g,"š"],[/\\c\{T\}/g,"Ţ"],[/\\c\{t\}/g,"ţ"],[/\\v\{T\}/g,"Ť"],[/\\v\{t\}/g,"ť"],[/\\~\{U\}/g,"Ũ"],[/\\~\{u\}/g,"ũ"],[/\\=\{U\}/g,"Ū"],[/\\=\{u\}/g,"ū"],[/\\u\{U\}/g,"Ŭ"],[/\\u\{u\}/g,"ŭ"],[/\\r\{U\}/g,"Ů"],[/\\r\{u\}/g,"ů"],[/\\H\{U\}/g,"Ű"],[/\\H\{u\}/g,"ű"],[/\\k\{U\}/g,"Ų"],[/\\k\{u\}/g,"ų"],[/\\\^\{W\}/g,"Ŵ"],[/\\\^\{w\}/g,"ŵ"],[/\\\^\{Y\}/g,"Ŷ"],[/\\\^\{y\}/g,"ŷ"],[/\\"\{Y\}/g,"Ÿ"],[/\\'\{Z\}/g,"Ź"],[/\\'\{z\}/g,"ź"],[/\\.\{Z\}/g,"Ż"],[/\\.\{z\}/g,"ż"],[/\\v\{Z\}/g,"Ž"],[/\\v\{z\}/g,"ž"],[/\\texthvlig /g,"ƕ"],[/\\textnrleg /g,"ƞ"],[/\\eth /g,"ƪ"],[/\\textdoublepipe /g,"ǂ"],[/\\'\{g\}/g,"ǵ"],[/\\Elztrna /g,"ɐ"],[/\\Elztrnsa /g,"ɒ"],[/\\Elzopeno /g,"ɔ"],[/\\Elzrtld /g,"ɖ"],[/\\Elzschwa /g,"ə"],[/\\varepsilon /g,"ɛ"],[/\\Elzpgamma /g,"ɣ"],[/\\Elzpbgam /g,"ɤ"],[/\\Elztrnh /g,"ɥ"],[/\\Elzbtdl /g,"ɬ"],[/\\Elzrtll /g,"ɭ"],[/\\Elztrnm /g,"ɯ"],[/\\Elztrnmlr /g,"ɰ"],[/\\Elzltlmr /g,"ɱ"],[/\\Elzltln /g,"ɲ"],[/\\Elzrtln /g,"ɳ"],[/\\Elzclomeg /g,"ɷ"],[/\\textphi /g,"ɸ"],[/\\Elztrnr /g,"ɹ"],[/\\Elztrnrl /g,"ɺ"],[/\\Elzrttrnr /g,"ɻ"],[/\\Elzrl /g,"ɼ"],[/\\Elzrtlr /g,"ɽ"],[/\\Elzfhr /g,"ɾ"],[/\\Elzrtls /g,"ʂ"],[/\\Elzesh /g,"ʃ"],[/\\Elztrnt /g,"ʇ"],[/\\Elzrtlt /g,"ʈ"],[/\\Elzpupsil /g,"ʊ"],[/\\Elzpscrv /g,"ʋ"],[/\\Elzinvv /g,"ʌ"],[/\\Elzinvw /g,"ʍ"],[/\\Elztrny /g,"ʎ"],[/\\Elzrtlz /g,"ʐ"],[/\\Elzyogh /g,"ʒ"],[/\\Elzglst /g,"ʔ"],[/\\Elzreglst /g,"ʕ"],[/\\Elzinglst /g,"ʖ"],[/\\textturnk /g,"ʞ"],[/\\Elzdyogh /g,"ʤ"],[/\\Elztesh /g,"ʧ"],[/\\textasciicaron /g,"ˇ"],[/\\Elzverts /g,"ˈ"],[/\\Elzverti /g,"ˌ"],[/\\Elzlmrk /g,"ː"],[/\\Elzhlmrk /g,"ˑ"],[/\\Elzsbrhr /g,"˒"],[/\\Elzsblhr /g,"˓"],[/\\Elzrais /g,"˔"],[/\\Elzlow /g,"˕"],[/\\textasciibreve /g,"˘"],[/\\textperiodcentered /g,"˙"],[/\\r\{\}/g,"˚"],[/\\k\{\}/g,"˛"],[/\\texttildelow /g,"˜"],[/\\H\{\}/g,"˝"],[/\\tone\{55\}/g,"˥"],[/\\tone\{44\}/g,"˦"],[/\\tone\{33\}/g,"˧"],[/\\tone\{22\}/g,"˨"],[/\\tone\{11\}/g,"˩"],[/\\cyrchar\\C/g,"̏"],[/\\Elzpalh /g,"̡"],[/\\Elzrh /g,"̢"],[/\\Elzsbbrg /g,"̪"],[/\\Elzxl /g,"̵"],[/\\Elzbar /g,"̶"],[/\\'\{A\}/g,"Ά"],[/\\'\{E\}/g,"Έ"],[/\\'\{H\}/g,"Ή"],[/\\'\{\}\{I\}/g,"Ί"],[/\\'\{\}O/g,"Ό"],[/\\mathrm\{'Y\}/g,"Ύ"],[/\\mathrm\{'\\Omega\}/g,"Ώ"],[/\\acute\{\\ddot\{\\iota\}\}/g,"ΐ"],[/\\Alpha /g,"Α"],[/\\Beta /g,"Β"],[/\\Gamma /g,"Γ"],[/\\Delta /g,"Δ"],[/\\Epsilon /g,"Ε"],[/\\Zeta /g,"Ζ"],[/\\Eta /g,"Η"],[/\\Theta /g,"Θ"],[/\\Iota /g,"Ι"],[/\\Kappa /g,"Κ"],[/\\Lambda /g,"Λ"],[/\\Xi /g,"Ξ"],[/\\Pi /g,"Π"],[/\\Rho /g,"Ρ"],[/\\Sigma /g,"Σ"],[/\\Tau /g,"Τ"],[/\\Upsilon /g,"Υ"],[/\\Phi /g,"Φ"],[/\\Chi /g,"Χ"],[/\\Psi /g,"Ψ"],[/\\Omega /g,"Ω"],[/\\mathrm\{\\ddot\{I\}\}/g,"Ϊ"],[/\\mathrm\{\\ddot\{Y\}\}/g,"Ϋ"],[/\\'\{\$\\alpha\$\}/g,"ά"],[/\\acute\{\\epsilon\}/g,"έ"],[/\\acute\{\\eta\}/g,"ή"],[/\\acute\{\\iota\}/g,"ί"],[/\\acute\{\\ddot\{\\upsilon\}\}/g,"ΰ"],[/\\alpha /g,"α"],[/\\beta /g,"β"],[/\\gamma /g,"γ"],[/\\delta /g,"δ"],[/\\epsilon /g,"ε"],[/\\zeta /g,"ζ"],[/\\eta /g,"η"],[/\\texttheta /g,"θ"],[/\\iota /g,"ι"],[/\\kappa /g,"κ"],[/\\lambda /g,"λ"],[/\\mu /g,"μ"],[/\\nu /g,"ν"],[/\\xi /g,"ξ"],[/\\pi /g,"π"],[/\\rho /g,"ρ"],[/\\varsigma /g,"ς"],[/\\sigma /g,"σ"],[/\\tau /g,"τ"],[/\\upsilon /g,"υ"],[/\\varphi /g,"φ"],[/\\chi /g,"χ"],[/\\psi /g,"ψ"],[/\\omega /g,"ω"],[/\\ddot\{\\iota\}/g,"ϊ"],[/\\ddot\{\\upsilon\}/g,"ϋ"],[/\\'\{o\}/g,"ό"],[/\\acute\{\\upsilon\}/g,"ύ"],[/\\acute\{\\omega\}/g,"ώ"],[/\\Pisymbol\{ppi022\}\{87\}/g,"ϐ"],[/\\textvartheta /g,"ϑ"],[/\\Upsilon /g,"ϒ"],[/\\phi /g,"ϕ"],[/\\varpi /g,"ϖ"],[/\\Stigma /g,"Ϛ"],[/\\Digamma /g,"Ϝ"],[/\\digamma /g,"ϝ"],[/\\Koppa /g,"Ϟ"],[/\\Sampi /g,"Ϡ"],[/\\varkappa /g,"ϰ"],[/\\varrho /g,"ϱ"],[/\\textTheta /g,"ϴ"],[/\\backepsilon /g,"϶"],[/\\cyrchar\\CYRYO /g,"Ё"],[/\\cyrchar\\CYRDJE /g,"Ђ"],[/\\cyrchar\{\\'\\CYRG\}/g,"Ѓ"],[/\\cyrchar\\CYRIE /g,"Є"],[/\\cyrchar\\CYRDZE /g,"Ѕ"],[/\\cyrchar\\CYRII /g,"І"],[/\\cyrchar\\CYRYI /g,"Ї"],[/\\cyrchar\\CYRJE /g,"Ј"],[/\\cyrchar\\CYRLJE /g,"Љ"],[/\\cyrchar\\CYRNJE /g,"Њ"],[/\\cyrchar\\CYRTSHE /g,"Ћ"],[/\\cyrchar\{\\'\\CYRK\}/g,"Ќ"],[/\\cyrchar\\CYRUSHRT /g,"Ў"],[/\\cyrchar\\CYRDZHE /g,"Џ"],[/\\cyrchar\\CYRA /g,"А"],[/\\cyrchar\\CYRB /g,"Б"],[/\\cyrchar\\CYRV /g,"В"],[/\\cyrchar\\CYRG /g,"Г"],[/\\cyrchar\\CYRD /g,"Д"],[/\\cyrchar\\CYRE /g,"Е"],[/\\cyrchar\\CYRZH /g,"Ж"],[/\\cyrchar\\CYRZ /g,"З"],[/\\cyrchar\\CYRI /g,"И"],[/\\cyrchar\\CYRISHRT /g,"Й"],[/\\cyrchar\\CYRK /g,"К"],[/\\cyrchar\\CYRL /g,"Л"],[/\\cyrchar\\CYRM /g,"М"],[/\\cyrchar\\CYRN /g,"Н"],[/\\cyrchar\\CYRO /g,"О"],[/\\cyrchar\\CYRP /g,"П"],[/\\cyrchar\\CYRR /g,"Р"],[/\\cyrchar\\CYRS /g,"С"],[/\\cyrchar\\CYRT /g,"Т"],[/\\cyrchar\\CYRU /g,"У"],[/\\cyrchar\\CYRF /g,"Ф"],[/\\cyrchar\\CYRH /g,"Х"],[/\\cyrchar\\CYRC /g,"Ц"],[/\\cyrchar\\CYRCH /g,"Ч"],[/\\cyrchar\\CYRSH /g,"Ш"],[/\\cyrchar\\CYRSHCH /g,"Щ"],[/\\cyrchar\\CYRHRDSN /g,"Ъ"],[/\\cyrchar\\CYRERY /g,"Ы"],[/\\cyrchar\\CYRSFTSN /g,"Ь"],[/\\cyrchar\\CYREREV /g,"Э"],[/\\cyrchar\\CYRYU /g,"Ю"],[/\\cyrchar\\CYRYA /g,"Я"],[/\\cyrchar\\cyra /g,"а"],[/\\cyrchar\\cyrb /g,"б"],[/\\cyrchar\\cyrv /g,"в"],[/\\cyrchar\\cyrg /g,"г"],[/\\cyrchar\\cyrd /g,"д"],[/\\cyrchar\\cyre /g,"е"],[/\\cyrchar\\cyrzh /g,"ж"],[/\\cyrchar\\cyrz /g,"з"],[/\\cyrchar\\cyri /g,"и"],[/\\cyrchar\\cyrishrt /g,"й"],[/\\cyrchar\\cyrk /g,"к"],[/\\cyrchar\\cyrl /g,"л"],[/\\cyrchar\\cyrm /g,"м"],[/\\cyrchar\\cyrn /g,"н"],[/\\cyrchar\\cyro /g,"о"],[/\\cyrchar\\cyrp /g,"п"],[/\\cyrchar\\cyrr /g,"р"],[/\\cyrchar\\cyrs /g,"с"],[/\\cyrchar\\cyrt /g,"т"],[/\\cyrchar\\cyru /g,"у"],[/\\cyrchar\\cyrf /g,"ф"],[/\\cyrchar\\cyrh /g,"х"],[/\\cyrchar\\cyrc /g,"ц"],[/\\cyrchar\\cyrch /g,"ч"],[/\\cyrchar\\cyrsh /g,"ш"],[/\\cyrchar\\cyrshch /g,"щ"],[/\\cyrchar\\cyrhrdsn /g,"ъ"],[/\\cyrchar\\cyrery /g,"ы"],[/\\cyrchar\\cyrsftsn /g,"ь"],[/\\cyrchar\\cyrerev /g,"э"],[/\\cyrchar\\cyryu /g,"ю"],[/\\cyrchar\\cyrya /g,"я"],[/\\cyrchar\\cyryo /g,"ё"],[/\\cyrchar\\cyrdje /g,"ђ"],[/\\cyrchar\{\\'\\cyrg\}/g,"ѓ"],[/\\cyrchar\\cyrie /g,"є"],[/\\cyrchar\\cyrdze /g,"ѕ"],[/\\cyrchar\\cyrii /g,"і"],[/\\cyrchar\\cyryi /g,"ї"],[/\\cyrchar\\cyrje /g,"ј"],[/\\cyrchar\\cyrlje /g,"љ"],[/\\cyrchar\\cyrnje /g,"њ"],[/\\cyrchar\\cyrtshe /g,"ћ"],[/\\cyrchar\{\\'\\cyrk\}/g,"ќ"],[/\\cyrchar\\cyrushrt /g,"ў"],[/\\cyrchar\\cyrdzhe /g,"џ"],[/\\cyrchar\\CYROMEGA /g,"Ѡ"],[/\\cyrchar\\cyromega /g,"ѡ"],[/\\cyrchar\\CYRYAT /g,"Ѣ"],[/\\cyrchar\\CYRIOTE /g,"Ѥ"],[/\\cyrchar\\cyriote /g,"ѥ"],[/\\cyrchar\\CYRLYUS /g,"Ѧ"],[/\\cyrchar\\cyrlyus /g,"ѧ"],[/\\cyrchar\\CYRIOTLYUS /g,"Ѩ"],[/\\cyrchar\\cyriotlyus /g,"ѩ"],[/\\cyrchar\\CYRBYUS /g,"Ѫ"],[/\\cyrchar\\CYRIOTBYUS /g,"Ѭ"],[/\\cyrchar\\cyriotbyus /g,"ѭ"],[/\\cyrchar\\CYRKSI /g,"Ѯ"],[/\\cyrchar\\cyrksi /g,"ѯ"],[/\\cyrchar\\CYRPSI /g,"Ѱ"],[/\\cyrchar\\cyrpsi /g,"ѱ"],[/\\cyrchar\\CYRFITA /g,"Ѳ"],[/\\cyrchar\\CYRIZH /g,"Ѵ"],[/\\cyrchar\\CYRUK /g,"Ѹ"],[/\\cyrchar\\cyruk /g,"ѹ"],[/\\cyrchar\\CYROMEGARND /g,"Ѻ"],[/\\cyrchar\\cyromegarnd /g,"ѻ"],[/\\cyrchar\\CYROMEGATITLO /g,"Ѽ"],[/\\cyrchar\\cyromegatitlo /g,"ѽ"],[/\\cyrchar\\CYROT /g,"Ѿ"],[/\\cyrchar\\cyrot /g,"ѿ"],[/\\cyrchar\\CYRKOPPA /g,"Ҁ"],[/\\cyrchar\\cyrkoppa /g,"ҁ"],[/\\cyrchar\\cyrthousands /g,"҂"],[/\\cyrchar\\cyrhundredthousands /g,"҈"],[/\\cyrchar\\cyrmillions /g,"҉"],[/\\cyrchar\\CYRSEMISFTSN /g,"Ҍ"],[/\\cyrchar\\cyrsemisftsn /g,"ҍ"],[/\\cyrchar\\CYRRTICK /g,"Ҏ"],[/\\cyrchar\\cyrrtick /g,"ҏ"],[/\\cyrchar\\CYRGUP /g,"Ґ"],[/\\cyrchar\\cyrgup /g,"ґ"],[/\\cyrchar\\CYRGHCRS /g,"Ғ"],[/\\cyrchar\\cyrghcrs /g,"ғ"],[/\\cyrchar\\CYRGHK /g,"Ҕ"],[/\\cyrchar\\cyrghk /g,"ҕ"],[/\\cyrchar\\CYRZHDSC /g,"Җ"],[/\\cyrchar\\cyrzhdsc /g,"җ"],[/\\cyrchar\\CYRZDSC /g,"Ҙ"],[/\\cyrchar\\cyrzdsc /g,"ҙ"],[/\\cyrchar\\CYRKDSC /g,"Қ"],[/\\cyrchar\\cyrkdsc /g,"қ"],[/\\cyrchar\\CYRKVCRS /g,"Ҝ"],[/\\cyrchar\\cyrkvcrs /g,"ҝ"],[/\\cyrchar\\CYRKHCRS /g,"Ҟ"],[/\\cyrchar\\cyrkhcrs /g,"ҟ"],[/\\cyrchar\\CYRKBEAK /g,"Ҡ"],[/\\cyrchar\\cyrkbeak /g,"ҡ"],[/\\cyrchar\\CYRNDSC /g,"Ң"],[/\\cyrchar\\cyrndsc /g,"ң"],[/\\cyrchar\\CYRNG /g,"Ҥ"],[/\\cyrchar\\cyrng /g,"ҥ"],[/\\cyrchar\\CYRPHK /g,"Ҧ"],[/\\cyrchar\\cyrphk /g,"ҧ"],[/\\cyrchar\\CYRABHHA /g,"Ҩ"],[/\\cyrchar\\cyrabhha /g,"ҩ"],[/\\cyrchar\\CYRSDSC /g,"Ҫ"],[/\\cyrchar\\cyrsdsc /g,"ҫ"],[/\\cyrchar\\CYRTDSC /g,"Ҭ"],[/\\cyrchar\\cyrtdsc /g,"ҭ"],[/\\cyrchar\\CYRY /g,"Ү"],[/\\cyrchar\\cyry /g,"ү"],[/\\cyrchar\\CYRYHCRS /g,"Ұ"],[/\\cyrchar\\cyryhcrs /g,"ұ"],[/\\cyrchar\\CYRHDSC /g,"Ҳ"],[/\\cyrchar\\cyrhdsc /g,"ҳ"],[/\\cyrchar\\CYRTETSE /g,"Ҵ"],[/\\cyrchar\\cyrtetse /g,"ҵ"],[/\\cyrchar\\CYRCHRDSC /g,"Ҷ"],[/\\cyrchar\\cyrchrdsc /g,"ҷ"],[/\\cyrchar\\CYRCHVCRS /g,"Ҹ"],[/\\cyrchar\\cyrchvcrs /g,"ҹ"],[/\\cyrchar\\CYRSHHA /g,"Һ"],[/\\cyrchar\\cyrshha /g,"һ"],[/\\cyrchar\\CYRABHCH /g,"Ҽ"],[/\\cyrchar\\cyrabhch /g,"ҽ"],[/\\cyrchar\\CYRABHCHDSC /g,"Ҿ"],[/\\cyrchar\\cyrabhchdsc /g,"ҿ"],[/\\cyrchar\\CYRpalochka /g,"Ӏ"],[/\\cyrchar\\CYRKHK /g,"Ӄ"],[/\\cyrchar\\cyrkhk /g,"ӄ"],[/\\cyrchar\\CYRNHK /g,"Ӈ"],[/\\cyrchar\\cyrnhk /g,"ӈ"],[/\\cyrchar\\CYRCHLDSC /g,"Ӌ"],[/\\cyrchar\\cyrchldsc /g,"ӌ"],[/\\cyrchar\\CYRAE /g,"Ӕ"],[/\\cyrchar\\cyrae /g,"ӕ"],[/\\cyrchar\\CYRSCHWA /g,"Ә"],[/\\cyrchar\\cyrschwa /g,"ә"],[/\\cyrchar\\CYRABHDZE /g,"Ӡ"],[/\\cyrchar\\cyrabhdze /g,"ӡ"],[/\\cyrchar\\CYROTLD /g,"Ө"],[/\\cyrchar\\cyrotld /g,"ө"],[/\\hspace\{0.6em\}/g," "],[/\\hspace\{1em\}/g," "],[/\\hspace\{0.33em\}/g," "],[/\\hspace\{0.25em\}/g," "],[/\\hspace\{0.166em\}/g," "],[/\\hphantom\{0\}/g," "],[/\\hphantom\{,\}/g," "],[/\\hspace\{0.167em\}/g," "],[/\\mkern1mu /g," "],[/\\textendash /g,"–"],[/\\textemdash /g,"—"],[/\\rule\{1em\}\{1pt\}/g,"―"],[/\\Vert /g,"‖"],[/\\Elzreapos /g,"‛"],[/\\textquotedblleft /g,"“"],[/\\textquotedblright /g,"”"],[/\\textdagger /g,"†"],[/\\textdaggerdbl /g,"‡"],[/\\textbullet /g,"•"],[/\\ldots /g,"…"],[/\\textperthousand /g,"‰"],[/\\textpertenthousand /g,"‱"],[/\\backprime /g,"‵"],[/\\guilsinglleft /g,"‹"],[/\\guilsinglright /g,"›"],[/\\mkern4mu /g," "],[/\\nolinebreak /g,"⁠"],[/\\ensuremath\{\\Elzpes\}/g,"₧"],[/\\mbox\{\\texteuro\} /g,"€"],[/\\dddot /g,"⃛"],[/\\ddddot /g,"⃜"],[/\\mathbb\{C\}/g,"ℂ"],[/\\mathscr\{g\}/g,"ℊ"],[/\\mathscr\{H\}/g,"ℋ"],[/\\mathfrak\{H\}/g,"ℌ"],[/\\mathbb\{H\}/g,"ℍ"],[/\\hslash /g,"ℏ"],[/\\mathscr\{I\}/g,"ℐ"],[/\\mathfrak\{I\}/g,"ℑ"],[/\\mathscr\{L\}/g,"ℒ"],[/\\mathscr\{l\}/g,"ℓ"],[/\\mathbb\{N\}/g,"ℕ"],[/\\cyrchar\\textnumero /g,"№"],[/\\wp /g,"℘"],[/\\mathbb\{P\}/g,"ℙ"],[/\\mathbb\{Q\}/g,"ℚ"],[/\\mathscr\{R\}/g,"ℛ"],[/\\mathfrak\{R\}/g,"ℜ"],[/\\mathbb\{R\}/g,"ℝ"],[/\\Elzxrat /g,"℞"],[/\\texttrademark /g,"™"],[/\\mathbb\{Z\}/g,"ℤ"],[/\\Omega /g,"Ω"],[/\\mho /g,"℧"],[/\\mathfrak\{Z\}/g,"ℨ"],[/\\ElsevierGlyph\{2129\}/g,"℩"],[/\\AA /g,"Å"],[/\\mathscr\{B\}/g,"ℬ"],[/\\mathfrak\{C\}/g,"ℭ"],[/\\mathscr\{e\}/g,"ℯ"],[/\\mathscr\{E\}/g,"ℰ"],[/\\mathscr\{F\}/g,"ℱ"],[/\\mathscr\{M\}/g,"ℳ"],[/\\mathscr\{o\}/g,"ℴ"],[/\\aleph /g,"ℵ"],[/\\beth /g,"ℶ"],[/\\gimel /g,"ℷ"],[/\\daleth /g,"ℸ"],[/\\textfrac\{1\}\{3\}/g,"⅓"],[/\\textfrac\{2\}\{3\}/g,"⅔"],[/\\textfrac\{1\}\{5\}/g,"⅕"],[/\\textfrac\{2\}\{5\}/g,"⅖"],[/\\textfrac\{3\}\{5\}/g,"⅗"],[/\\textfrac\{4\}\{5\}/g,"⅘"],[/\\textfrac\{1\}\{6\}/g,"⅙"],[/\\textfrac\{5\}\{6\}/g,"⅚"],[/\\textfrac\{1\}\{8\}/g,"⅛"],[/\\textfrac\{3\}\{8\}/g,"⅜"],[/\\textfrac\{5\}\{8\}/g,"⅝"],[/\\textfrac\{7\}\{8\}/g,"⅞"],[/\\leftarrow /g,"←"],[/\\uparrow /g,"↑"],[/\\rightarrow /g,"→"],[/\\downarrow /g,"↓"],[/\\leftrightarrow /g,"↔"],[/\\updownarrow /g,"↕"],[/\\nwarrow /g,"↖"],[/\\nearrow /g,"↗"],[/\\searrow /g,"↘"],[/\\swarrow /g,"↙"],[/\\nleftarrow /g,"↚"],[/\\nrightarrow /g,"↛"],[/\\arrowwaveright /g,"↜"],[/\\arrowwaveright /g,"↝"],[/\\twoheadleftarrow /g,"↞"],[/\\twoheadrightarrow /g,"↠"],[/\\leftarrowtail /g,"↢"],[/\\rightarrowtail /g,"↣"],[/\\mapsto /g,"↦"],[/\\hookleftarrow /g,"↩"],[/\\hookrightarrow /g,"↪"],[/\\looparrowleft /g,"↫"],[/\\looparrowright /g,"↬"],[/\\leftrightsquigarrow /g,"↭"],[/\\nleftrightarrow /g,"↮"],[/\\Lsh /g,"↰"],[/\\Rsh /g,"↱"],[/\\ElsevierGlyph\{21B3\}/g,"↳"],[/\\curvearrowleft /g,"↶"],[/\\curvearrowright /g,"↷"],[/\\circlearrowleft /g,"↺"],[/\\circlearrowright /g,"↻"],[/\\leftharpoonup /g,"↼"],[/\\leftharpoondown /g,"↽"],[/\\upharpoonright /g,"↾"],[/\\upharpoonleft /g,"↿"],[/\\rightharpoonup /g,"⇀"],[/\\rightharpoondown /g,"⇁"],[/\\downharpoonright /g,"⇂"],[/\\downharpoonleft /g,"⇃"],[/\\rightleftarrows /g,"⇄"],[/\\dblarrowupdown /g,"⇅"],[/\\leftrightarrows /g,"⇆"],[/\\leftleftarrows /g,"⇇"],[/\\upuparrows /g,"⇈"],[/\\rightrightarrows /g,"⇉"],[/\\downdownarrows /g,"⇊"],[/\\leftrightharpoons /g,"⇋"],[/\\rightleftharpoons /g,"⇌"],[/\\nLeftarrow /g,"⇍"],[/\\nLeftrightarrow /g,"⇎"],[/\\nRightarrow /g,"⇏"],[/\\Leftarrow /g,"⇐"],[/\\Uparrow /g,"⇑"],[/\\Rightarrow /g,"⇒"],[/\\Downarrow /g,"⇓"],[/\\Leftrightarrow /g,"⇔"],[/\\Updownarrow /g,"⇕"],[/\\Lleftarrow /g,"⇚"],[/\\Rrightarrow /g,"⇛"],[/\\rightsquigarrow /g,"⇝"],[/\\DownArrowUpArrow /g,"⇵"],[/\\forall /g,"∀"],[/\\complement /g,"∁"],[/\\partial /g,"∂"],[/\\exists /g,"∃"],[/\\nexists /g,"∄"],[/\\varnothing /g,"∅"],[/\\nabla /g,"∇"],[/\\in /g,"∈"],[/\\not\\in /g,"∉"],[/\\ni /g,"∋"],[/\\not\\ni /g,"∌"],[/\\prod /g,"∏"],[/\\coprod /g,"∐"],[/\\sum /g,"∑"],[/\\mp /g,"∓"],[/\\dotplus /g,"∔"],[/\\setminus /g,"∖"],[/\\circ /g,"∘"],[/\\bullet /g,"∙"],[/\\surd /g,"√"],[/\\propto /g,"∝"],[/\\infty /g,"∞"],[/\\rightangle /g,"∟"],[/\\angle /g,"∠"],[/\\measuredangle /g,"∡"],[/\\sphericalangle /g,"∢"],[/\\mid /g,"∣"],[/\\nmid /g,"∤"],[/\\parallel /g,"∥"],[/\\nparallel /g,"∦"],[/\\wedge /g,"∧"],[/\\vee /g,"∨"],[/\\cap /g,"∩"],[/\\cup /g,"∪"],[/\\int /g,"∫"],[/\\int\\!\\int /g,"∬"],[/\\int\\!\\int\\!\\int /g,"∭"],[/\\oint /g,"∮"],[/\\surfintegral /g,"∯"],[/\\volintegral /g,"∰"],[/\\clwintegral /g,"∱"],[/\\ElsevierGlyph\{2232\}/g,"∲"],[/\\ElsevierGlyph\{2233\}/g,"∳"],[/\\therefore /g,"∴"],[/\\because /g,"∵"],[/\\Colon /g,"∷"],[/\\ElsevierGlyph\{2238\}/g,"∸"],[/\\mathbin\{\{:\}\\!\\!\{\-\}\\!\\!\{:\}\}/g,"∺"],[/\\homothetic /g,"∻"],[/\\sim /g,"∼"],[/\\backsim /g,"∽"],[/\\lazysinv /g,"∾"],[/\\wr /g,"≀"],[/\\not\\sim /g,"≁"],[/\\ElsevierGlyph\{2242\}/g,"≂"],[/\\NotEqualTilde /g,"≂-00338"],[/\\simeq /g,"≃"],[/\\not\\simeq /g,"≄"],[/\\cong /g,"≅"],[/\\approxnotequal /g,"≆"],[/\\not\\cong /g,"≇"],[/\\approx /g,"≈"],[/\\not\\approx /g,"≉"],[/\\approxeq /g,"≊"],[/\\tildetrpl /g,"≋"],[/\\not\\apid /g,"≋-00338"],[/\\allequal /g,"≌"],[/\\asymp /g,"≍"],[/\\Bumpeq /g,"≎"],[/\\NotHumpDownHump /g,"≎-00338"],[/\\bumpeq /g,"≏"],[/\\NotHumpEqual /g,"≏-00338"],[/\\doteq /g,"≐"],[/\\not\\doteq/g,"≐-00338"],[/\\doteqdot /g,"≑"],[/\\fallingdotseq /g,"≒"],[/\\risingdotseq /g,"≓"],[/\\eqcirc /g,"≖"],[/\\circeq /g,"≗"],[/\\estimates /g,"≙"],[/\\ElsevierGlyph\{225A\}/g,"≚"],[/\\starequal /g,"≛"],[/\\triangleq /g,"≜"],[/\\ElsevierGlyph\{225F\}/g,"≟"],[/\\not =/g,"≠"],[/\\equiv /g,"≡"],[/\\not\\equiv /g,"≢"],[/\\leq /g,"≤"],[/\\geq /g,"≥"],[/\\leqq /g,"≦"],[/\\geqq /g,"≧"],[/\\lneqq /g,"≨"],[/\\lvertneqq /g,"≨-0FE00"],[/\\gneqq /g,"≩"],[/\\gvertneqq /g,"≩-0FE00"],[/\\ll /g,"≪"],[/\\NotLessLess /g,"≪-00338"],[/\\gg /g,"≫"],[/\\NotGreaterGreater /g,"≫-00338"],[/\\between /g,"≬"],[/\\not\\kern\-0.3em\\times /g,"≭"],[/\\not/g,"≯"],[/\\not\\leq /g,"≰"],[/\\not\\geq /g,"≱"],[/\\lessequivlnt /g,"≲"],[/\\greaterequivlnt /g,"≳"],[/\\ElsevierGlyph\{2274\}/g,"≴"],[/\\ElsevierGlyph\{2275\}/g,"≵"],[/\\lessgtr /g,"≶"],[/\\gtrless /g,"≷"],[/\\notlessgreater /g,"≸"],[/\\notgreaterless /g,"≹"],[/\\prec /g,"≺"],[/\\succ /g,"≻"],[/\\preccurlyeq /g,"≼"],[/\\succcurlyeq /g,"≽"],[/\\precapprox /g,"≾"],[/\\NotPrecedesTilde /g,"≾-00338"],[/\\succapprox /g,"≿"],[/\\NotSucceedsTilde /g,"≿-00338"],[/\\not\\prec /g,"⊀"],[/\\not\\succ /g,"⊁"],[/\\subset /g,"⊂"],[/\\supset /g,"⊃"],[/\\not\\subset /g,"⊄"],[/\\not\\supset /g,"⊅"],[/\\subseteq /g,"⊆"],[/\\supseteq /g,"⊇"],[/\\not\\subseteq /g,"⊈"],[/\\not\\supseteq /g,"⊉"],[/\\subsetneq /g,"⊊"],[/\\varsubsetneqq /g,"⊊-0FE00"],[/\\supsetneq /g,"⊋"],[/\\varsupsetneq /g,"⊋-0FE00"],[/\\uplus /g,"⊎"],[/\\sqsubset /g,"⊏"],[/\\NotSquareSubset /g,"⊏-00338"],[/\\sqsupset /g,"⊐"],[/\\NotSquareSuperset /g,"⊐-00338"],[/\\sqsubseteq /g,"⊑"],[/\\sqsupseteq /g,"⊒"],[/\\sqcap /g,"⊓"],[/\\sqcup /g,"⊔"],[/\\oplus /g,"⊕"],[/\\ominus /g,"⊖"],[/\\otimes /g,"⊗"],[/\\oslash /g,"⊘"],[/\\odot /g,"⊙"],[/\\circledcirc /g,"⊚"],[/\\circledast /g,"⊛"],[/\\circleddash /g,"⊝"],[/\\boxplus /g,"⊞"],[/\\boxminus /g,"⊟"],[/\\boxtimes /g,"⊠"],[/\\boxdot /g,"⊡"],[/\\vdash /g,"⊢"],[/\\dashv /g,"⊣"],[/\\top /g,"⊤"],[/\\perp /g,"⊥"],[/\\truestate /g,"⊧"],[/\\forcesextra /g,"⊨"],[/\\Vdash /g,"⊩"],[/\\Vvdash /g,"⊪"],[/\\VDash /g,"⊫"],[/\\nvdash /g,"⊬"],[/\\nvDash /g,"⊭"],[/\\nVdash /g,"⊮"],[/\\nVDash /g,"⊯"],[/\\vartriangleleft /g,"⊲"],[/\\vartriangleright /g,"⊳"],[/\\trianglelefteq /g,"⊴"],[/\\trianglerighteq /g,"⊵"],[/\\original /g,"⊶"],[/\\image /g,"⊷"],[/\\multimap /g,"⊸"],[/\\hermitconjmatrix /g,"⊹"],[/\\intercal /g,"⊺"],[/\\veebar /g,"⊻"],[/\\rightanglearc /g,"⊾"],[/\\ElsevierGlyph\{22C0\}/g,"⋀"],[/\\ElsevierGlyph\{22C1\}/g,"⋁"],[/\\bigcap /g,"⋂"],[/\\bigcup /g,"⋃"],[/\\diamond /g,"⋄"],[/\\cdot /g,"⋅"],[/\\star /g,"⋆"],[/\\divideontimes /g,"⋇"],[/\\bowtie /g,"⋈"],[/\\ltimes /g,"⋉"],[/\\rtimes /g,"⋊"],[/\\leftthreetimes /g,"⋋"],[/\\rightthreetimes /g,"⋌"],[/\\backsimeq /g,"⋍"],[/\\curlyvee /g,"⋎"],[/\\curlywedge /g,"⋏"],[/\\Subset /g,"⋐"],[/\\Supset /g,"⋑"],[/\\Cap /g,"⋒"],[/\\Cup /g,"⋓"],[/\\pitchfork /g,"⋔"],[/\\lessdot /g,"⋖"],[/\\gtrdot /g,"⋗"],[/\\verymuchless /g,"⋘"],[/\\verymuchgreater /g,"⋙"],[/\\lesseqgtr /g,"⋚"],[/\\gtreqless /g,"⋛"],[/\\curlyeqprec /g,"⋞"],[/\\curlyeqsucc /g,"⋟"],[/\\not\\sqsubseteq /g,"⋢"],[/\\not\\sqsupseteq /g,"⋣"],[/\\Elzsqspne /g,"⋥"],[/\\lnsim /g,"⋦"],[/\\gnsim /g,"⋧"],[/\\precedesnotsimilar /g,"⋨"],[/\\succnsim /g,"⋩"],[/\\ntriangleleft /g,"⋪"],[/\\ntriangleright /g,"⋫"],[/\\ntrianglelefteq /g,"⋬"],[/\\ntrianglerighteq /g,"⋭"],[/\\vdots /g,"⋮"],[/\\cdots /g,"⋯"],[/\\upslopeellipsis /g,"⋰"],[/\\downslopeellipsis /g,"⋱"],[/\\barwedge /g,"⌅"],[/\\perspcorrespond /g,"⌆"],[/\\lceil /g,"⌈"],[/\\rceil /g,"⌉"],[/\\lfloor /g,"⌊"],[/\\rfloor /g,"⌋"],[/\\recorder /g,"⌕"],[/\\mathchar"2208/g,"⌖"],[/\\ulcorner /g,"⌜"],[/\\urcorner /g,"⌝"],[/\\llcorner /g,"⌞"],[/\\lrcorner /g,"⌟"],[/\\frown /g,"⌢"],[/\\smile /g,"⌣"],[/\\langle /g,"〈"],[/\\rangle /g,"〉"],[/\\ElsevierGlyph\{E838\}/g,"⌽"],[/\\Elzdlcorn /g,"⎣"],[/\\lmoustache /g,"⎰"],[/\\rmoustache /g,"⎱"],[/\\textvisiblespace /g,"␣"],[/\\ding\{172\}/g,"①"],[/\\ding\{173\}/g,"②"],[/\\ding\{174\}/g,"③"],[/\\ding\{175\}/g,"④"],[/\\ding\{176\}/g,"⑤"],[/\\ding\{177\}/g,"⑥"],[/\\ding\{178\}/g,"⑦"],[/\\ding\{179\}/g,"⑧"],[/\\ding\{180\}/g,"⑨"],[/\\ding\{181\}/g,"⑩"],[/\\circledS /g,"Ⓢ"],[/\\Elzdshfnc /g,"┆"],[/\\Elzsqfnw /g,"┙"],[/\\diagup /g,"╱"],[/\\ding\{110\}/g,"■"],[/\\square /g,"□"],[/\\blacksquare /g,"▪"],[/\\fbox\{~~\}/g,"▭"],[/\\Elzvrecto /g,"▯"],[/\\ElsevierGlyph\{E381\}/g,"▱"],[/\\ding\{115\}/g,"▲"],[/\\bigtriangleup /g,"△"],[/\\blacktriangle /g,"▴"],[/\\vartriangle /g,"▵"],[/\\blacktriangleright /g,"▸"],[/\\triangleright /g,"▹"],[/\\ding\{116\}/g,"▼"],[/\\bigtriangledown /g,"▽"],[/\\blacktriangledown /g,"▾"],[/\\triangledown /g,"▿"],[/\\blacktriangleleft /g,"◂"],[/\\triangleleft /g,"◃"],[/\\ding\{117\}/g,"◆"],[/\\lozenge /g,"◊"],[/\\bigcirc /g,"○"],[/\\ding\{108\}/g,"●"],[/\\Elzcirfl /g,"◐"],[/\\Elzcirfr /g,"◑"],[/\\Elzcirfb /g,"◒"],[/\\ding\{119\}/g,"◗"],[/\\Elzrvbull /g,"◘"],[/\\Elzsqfl /g,"◧"],[/\\Elzsqfr /g,"◨"],[/\\Elzsqfse /g,"◪"],[/\\bigcirc /g,"◯"],[/\\ding\{72\}/g,"★"],[/\\ding\{73\}/g,"☆"],[/\\ding\{37\}/g,"☎"],[/\\ding\{42\}/g,"☛"],[/\\ding\{43\}/g,"☞"],[/\\rightmoon /g,"☾"],[/\\mercury /g,"☿"],[/\\venus /g,"♀"],[/\\male /g,"♂"],[/\\jupiter /g,"♃"],[/\\saturn /g,"♄"],[/\\uranus /g,"♅"],[/\\neptune /g,"♆"],[/\\pluto /g,"♇"],[/\\aries /g,"♈"],[/\\taurus /g,"♉"],[/\\gemini /g,"♊"],[/\\cancer /g,"♋"],[/\\leo /g,"♌"],[/\\virgo /g,"♍"],[/\\libra /g,"♎"],[/\\scorpio /g,"♏"],[/\\sagittarius /g,"♐"],[/\\capricornus /g,"♑"],[/\\aquarius /g,"♒"],[/\\pisces /g,"♓"],[/\\ding\{171\}/g,"♠"],[/\\diamond /g,"♢"],[/\\ding\{168\}/g,"♣"],[/\\ding\{170\}/g,"♥"],[/\\ding\{169\}/g,"♦"],[/\\quarternote /g,"♩"],[/\\eighthnote /g,"♪"],[/\\flat /g,"♭"],[/\\natural /g,"♮"],[/\\sharp /g,"♯"],[/\\ding\{33\}/g,"✁"],[/\\ding\{34\}/g,"✂"],[/\\ding\{35\}/g,"✃"],[/\\ding\{36\}/g,"✄"],[/\\ding\{38\}/g,"✆"],[/\\ding\{39\}/g,"✇"],[/\\ding\{40\}/g,"✈"],[/\\ding\{41\}/g,"✉"],[/\\ding\{44\}/g,"✌"],[/\\ding\{45\}/g,"✍"],[/\\ding\{46\}/g,"✎"],[/\\ding\{47\}/g,"✏"],[/\\ding\{48\}/g,"✐"],[/\\ding\{49\}/g,"✑"],[/\\ding\{50\}/g,"✒"],[/\\ding\{51\}/g,"✓"],[/\\ding\{52\}/g,"✔"],[/\\ding\{53\}/g,"✕"],[/\\ding\{54\}/g,"✖"],[/\\ding\{55\}/g,"✗"],[/\\ding\{56\}/g,"✘"],[/\\ding\{57\}/g,"✙"],[/\\ding\{58\}/g,"✚"],[/\\ding\{59\}/g,"✛"],[/\\ding\{60\}/g,"✜"],[/\\ding\{61\}/g,"✝"],[/\\ding\{62\}/g,"✞"],[/\\ding\{63\}/g,"✟"],[/\\ding\{64\}/g,"✠"],[/\\ding\{65\}/g,"✡"],[/\\ding\{66\}/g,"✢"],[/\\ding\{67\}/g,"✣"],[/\\ding\{68\}/g,"✤"],[/\\ding\{69\}/g,"✥"],[/\\ding\{70\}/g,"✦"],[/\\ding\{71\}/g,"✧"],[/\\ding\{73\}/g,"✩"],[/\\ding\{74\}/g,"✪"],[/\\ding\{75\}/g,"✫"],[/\\ding\{76\}/g,"✬"],[/\\ding\{77\}/g,"✭"],[/\\ding\{78\}/g,"✮"],[/\\ding\{79\}/g,"✯"],[/\\ding\{80\}/g,"✰"],[/\\ding\{81\}/g,"✱"],[/\\ding\{82\}/g,"✲"],[/\\ding\{83\}/g,"✳"],[/\\ding\{84\}/g,"✴"],[/\\ding\{85\}/g,"✵"],[/\\ding\{86\}/g,"✶"],[/\\ding\{87\}/g,"✷"],[/\\ding\{88\}/g,"✸"],[/\\ding\{89\}/g,"✹"],[/\\ding\{90\}/g,"✺"],[/\\ding\{91\}/g,"✻"],[/\\ding\{92\}/g,"✼"],[/\\ding\{93\}/g,"✽"],[/\\ding\{94\}/g,"✾"],[/\\ding\{95\}/g,"✿"],[/\\ding\{96\}/g,"❀"],[/\\ding\{97\}/g,"❁"],[/\\ding\{98\}/g,"❂"],[/\\ding\{99\}/g,"❃"],[/\\ding\{100\}/g,"❄"],[/\\ding\{101\}/g,"❅"],[/\\ding\{102\}/g,"❆"],[/\\ding\{103\}/g,"❇"],[/\\ding\{104\}/g,"❈"],[/\\ding\{105\}/g,"❉"],[/\\ding\{106\}/g,"❊"],[/\\ding\{107\}/g,"❋"],[/\\ding\{109\}/g,"❍"],[/\\ding\{111\}/g,"❏"],[/\\ding\{112\}/g,"❐"],[/\\ding\{113\}/g,"❑"],[/\\ding\{114\}/g,"❒"],[/\\ding\{118\}/g,"❖"],[/\\ding\{120\}/g,"❘"],[/\\ding\{121\}/g,"❙"],[/\\ding\{122\}/g,"❚"],[/\\ding\{123\}/g,"❛"],[/\\ding\{124\}/g,"❜"],[/\\ding\{125\}/g,"❝"],[/\\ding\{126\}/g,"❞"],[/\\ding\{161\}/g,"❡"],[/\\ding\{162\}/g,"❢"],[/\\ding\{163\}/g,"❣"],[/\\ding\{164\}/g,"❤"],[/\\ding\{165\}/g,"❥"],[/\\ding\{166\}/g,"❦"],[/\\ding\{167\}/g,"❧"],[/\\ding\{182\}/g,"❶"],[/\\ding\{183\}/g,"❷"],[/\\ding\{184\}/g,"❸"],[/\\ding\{185\}/g,"❹"],[/\\ding\{186\}/g,"❺"],[/\\ding\{187\}/g,"❻"],[/\\ding\{188\}/g,"❼"],[/\\ding\{189\}/g,"❽"],[/\\ding\{190\}/g,"❾"],[/\\ding\{191\}/g,"❿"],[/\\ding\{192\}/g,"➀"],[/\\ding\{193\}/g,"➁"],[/\\ding\{194\}/g,"➂"],[/\\ding\{195\}/g,"➃"],[/\\ding\{196\}/g,"➄"],[/\\ding\{197\}/g,"➅"],[/\\ding\{198\}/g,"➆"],[/\\ding\{199\}/g,"➇"],[/\\ding\{200\}/g,"➈"],[/\\ding\{201\}/g,"➉"],[/\\ding\{202\}/g,"➊"],[/\\ding\{203\}/g,"➋"],[/\\ding\{204\}/g,"➌"],[/\\ding\{205\}/g,"➍"],[/\\ding\{206\}/g,"➎"],[/\\ding\{207\}/g,"➏"],[/\\ding\{208\}/g,"➐"],[/\\ding\{209\}/g,"➑"],[/\\ding\{210\}/g,"➒"],[/\\ding\{211\}/g,"➓"],[/\\ding\{212\}/g,"➔"],[/\\ding\{216\}/g,"➘"],[/\\ding\{217\}/g,"➙"],[/\\ding\{218\}/g,"➚"],[/\\ding\{219\}/g,"➛"],[/\\ding\{220\}/g,"➜"],[/\\ding\{221\}/g,"➝"],[/\\ding\{222\}/g,"➞"],[/\\ding\{223\}/g,"➟"],[/\\ding\{224\}/g,"➠"],[/\\ding\{225\}/g,"➡"],[/\\ding\{226\}/g,"➢"],[/\\ding\{227\}/g,"➣"],[/\\ding\{228\}/g,"➤"],[/\\ding\{229\}/g,"➥"],[/\\ding\{230\}/g,"➦"],[/\\ding\{231\}/g,"➧"],[/\\ding\{232\}/g,"➨"],[/\\ding\{233\}/g,"➩"],[/\\ding\{234\}/g,"➪"],[/\\ding\{235\}/g,"➫"],[/\\ding\{236\}/g,"➬"],[/\\ding\{237\}/g,"➭"],[/\\ding\{238\}/g,"➮"],[/\\ding\{239\}/g,"➯"],[/\\ding\{241\}/g,"➱"],[/\\ding\{242\}/g,"➲"],[/\\ding\{243\}/g,"➳"],[/\\ding\{244\}/g,"➴"],[/\\ding\{245\}/g,"➵"],[/\\ding\{246\}/g,"➶"],[/\\ding\{247\}/g,"➷"],[/\\ding\{248\}/g,"➸"],[/\\ding\{249\}/g,"➹"],[/\\ding\{250\}/g,"➺"],[/\\ding\{251\}/g,"➻"],[/\\ding\{252\}/g,"➼"],[/\\ding\{253\}/g,"➽"],[/\\ding\{254\}/g,"➾"],[/\\longleftarrow /g,"⟵"],[/\\longrightarrow /g,"⟶"],[/\\longleftrightarrow /g,"⟷"],[/\\Longleftarrow /g,"⟸"],[/\\Longrightarrow /g,"⟹"],[/\\Longleftrightarrow /g,"⟺"],[/\\longmapsto /g,"⟼"],[/\\sim\\joinrel\\leadsto/g,"⟿"],[/\\ElsevierGlyph\{E212\}/g,"⤅"],[/\\UpArrowBar /g,"⤒"],[/\\DownArrowBar /g,"⤓"],[/\\ElsevierGlyph\{E20C\}/g,"⤣"],[/\\ElsevierGlyph\{E20D\}/g,"⤤"],[/\\ElsevierGlyph\{E20B\}/g,"⤥"],[/\\ElsevierGlyph\{E20A\}/g,"⤦"],[/\\ElsevierGlyph\{E211\}/g,"⤧"],[/\\ElsevierGlyph\{E20E\}/g,"⤨"],[/\\ElsevierGlyph\{E20F\}/g,"⤩"],[/\\ElsevierGlyph\{E210\}/g,"⤪"],[/\\ElsevierGlyph\{E21C\}/g,"⤳"],[/\\ElsevierGlyph\{E21D\}/g,"⤳-00338"],[/\\ElsevierGlyph\{E21A\}/g,"⤶"],[/\\ElsevierGlyph\{E219\}/g,"⤷"],[/\\Elolarr /g,"⥀"],[/\\Elorarr /g,"⥁"],[/\\ElzRlarr /g,"⥂"],[/\\ElzrLarr /g,"⥄"],[/\\Elzrarrx /g,"⥇"],[/\\LeftRightVector /g,"⥎"],[/\\RightUpDownVector /g,"⥏"],[/\\DownLeftRightVector /g,"⥐"],[/\\LeftUpDownVector /g,"⥑"],[/\\LeftVectorBar /g,"⥒"],[/\\RightVectorBar /g,"⥓"],[/\\RightUpVectorBar /g,"⥔"],[/\\RightDownVectorBar /g,"⥕"],[/\\DownLeftVectorBar /g,"⥖"],[/\\DownRightVectorBar /g,"⥗"],[/\\LeftUpVectorBar /g,"⥘"],[/\\LeftDownVectorBar /g,"⥙"],[/\\LeftTeeVector /g,"⥚"],[/\\RightTeeVector /g,"⥛"],[/\\RightUpTeeVector /g,"⥜"],[/\\RightDownTeeVector /g,"⥝"],[/\\DownLeftTeeVector /g,"⥞"],[/\\DownRightTeeVector /g,"⥟"],[/\\LeftUpTeeVector /g,"⥠"],[/\\LeftDownTeeVector /g,"⥡"],[/\\UpEquilibrium /g,"⥮"],[/\\ReverseUpEquilibrium /g,"⥯"],[/\\RoundImplies /g,"⥰"],[/\\ElsevierGlyph\{E214\}/g,"⥼"],[/\\ElsevierGlyph\{E215\}/g,"⥽"],[/\\Elztfnc /g,"⦀"],[/\\ElsevierGlyph\{3018\}/g,"⦅"],[/\\Elroang /g,"⦆"],[/\\ElsevierGlyph\{E291\}/g,"⦔"],[/\\Elzddfnc /g,"⦙"],[/\\Angle /g,"⦜"],[/\\Elzlpargt /g,"⦠"],[/\\ElsevierGlyph\{E260\}/g,"⦵"],[/\\ElsevierGlyph\{E61B\}/g,"⦶"],[/\\ElzLap /g,"⧊"],[/\\Elzdefas /g,"⧋"],[/\\LeftTriangleBar /g,"⧏"],[/\\NotLeftTriangleBar /g,"⧏-00338"],[/\\RightTriangleBar /g,"⧐"],[/\\NotRightTriangleBar /g,"⧐-00338"],[/\\ElsevierGlyph\{E372\}/g,"⧜"],[/\\blacklozenge /g,"⧫"],[/\\RuleDelayed /g,"⧴"],[/\\Elxuplus /g,"⨄"],[/\\ElzThr /g,"⨅"],[/\\Elxsqcup /g,"⨆"],[/\\ElzInf /g,"⨇"],[/\\ElzSup /g,"⨈"],[/\\ElzCint /g,"⨍"],[/\\clockoint /g,"⨏"],[/\\ElsevierGlyph\{E395\}/g,"⨐"],[/\\sqrint /g,"⨖"],[/\\ElsevierGlyph\{E25A\}/g,"⨥"],[/\\ElsevierGlyph\{E25B\}/g,"⨪"],[/\\ElsevierGlyph\{E25C\}/g,"⨭"],[/\\ElsevierGlyph\{E25D\}/g,"⨮"],[/\\ElzTimes /g,"⨯"],[/\\ElsevierGlyph\{E25E\}/g,"⨴"],[/\\ElsevierGlyph\{E25E\}/g,"⨵"],[/\\ElsevierGlyph\{E259\}/g,"⨼"],[/\\amalg /g,"⨿"],[/\\ElzAnd /g,"⩓"],[/\\ElzOr /g,"⩔"],[/\\ElsevierGlyph\{E36E\}/g,"⩕"],[/\\ElOr /g,"⩖"],[/\\perspcorrespond /g,"⩞"],[/\\Elzminhat /g,"⩟"],[/\\ElsevierGlyph\{225A\}/g,"⩣"],[/\\stackrel\{*\}\{=\}/g,"⩮"],[/\\Equal /g,"⩵"],[/\\leqslant /g,"⩽"],[/\\nleqslant /g,"⩽-00338"],[/\\geqslant /g,"⩾"],[/\\ngeqslant /g,"⩾-00338"],[/\\lessapprox /g,"⪅"],[/\\gtrapprox /g,"⪆"],[/\\lneq /g,"⪇"],[/\\gneq /g,"⪈"],[/\\lnapprox /g,"⪉"],[/\\gnapprox /g,"⪊"],[/\\lesseqqgtr /g,"⪋"],[/\\gtreqqless /g,"⪌"],[/\\eqslantless /g,"⪕"],[/\\eqslantgtr /g,"⪖"],[/\\Pisymbol\{ppi020\}\{117\}/g,"⪝"],[/\\Pisymbol\{ppi020\}\{105\}/g,"⪞"],[/\\NestedLessLess /g,"⪡"],[/\\NotNestedLessLess /g,"⪡-00338"],[/\\NestedGreaterGreater /g,"⪢"],[/\\NotNestedGreaterGreater /g,"⪢-00338"],[/\\preceq /g,"⪯"],[/\\not\\preceq /g,"⪯-00338"],[/\\succeq /g,"⪰"],[/\\not\\succeq /g,"⪰-00338"],[/\\precneqq /g,"⪵"],[/\\succneqq /g,"⪶"],[/\\precapprox /g,"⪷"],[/\\succapprox /g,"⪸"],[/\\precnapprox /g,"⪹"],[/\\succnapprox /g,"⪺"],[/\\subseteqq /g,"⫅"],[/\\nsubseteqq /g,"⫅-00338"],[/\\supseteqq /g,"⫆"],[/\\nsupseteqq/g,"⫆-00338"],[/\\subsetneqq /g,"⫋"],[/\\supsetneqq /g,"⫌"],[/\\ElsevierGlyph\{E30D\}/g,"⫫"],[/\\Elztdcol /g,"⫶"],[/\\ElsevierGlyph\{300A\}/g,"《"],[/\\ElsevierGlyph\{300B\}/g,"》"],[/\\ElsevierGlyph\{3018\}/g,"〘"],[/\\ElsevierGlyph\{3019\}/g,"〙"],[/\\openbracketleft /g,"〚"],[/\\openbracketright /g,"〛"]],this}"undefined"!=typeof module&&module.exports&&(module.exports=BibtexParser); \ No newline at end of file +function BibtexParser(g){if("string"==typeof g){var r={},e=[],t=BibtexParser.call(r,function(g){e.push(g)});return t.parse(g),{entries:e,errors:t.getErrors()}}if("function"!=typeof g)throw"Invalid parser construction.";return this.STATES_={ENTRY_OR_JUNK:0,OBJECT_TYPE:1,ENTRY_KEY:2,KV_KEY:3,EQUALS:4,KV_VALUE:5},this.DATA_={},this.CALLBACK_=g,this.CHAR_=0,this.LINE_=1,this.CHAR_IN_LINE_=0,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={},this.SKIPTILLEOL_=!1,this.VALBRACES_=null,this.BRACETYPE_=null,this.BRACECOUNT_=0,this.STATE_=this.STATES_.ENTRY_OR_JUNK,this.ERRORS_=[],this.ENTRY_TYPES_={inproceedings:1,proceedings:2,article:3,techreport:4,misc:5,mastersthesis:6,book:7,phdthesis:8,incollection:9,unpublished:10,inbook:11,manual:12,periodical:13,booklet:14,masterthesis:15,conference:16,online:998,data:999},this.MACROS_={jan:"January",feb:"February",mar:"March",apr:"April",may:"May",jun:"June",jul:"July",aug:"August",sep:"September",oct:"October",nov:"November",dec:"December",Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"},this.getErrors=function(){return this.ERRORS_},this.parse=function(g){for(var r=0;r0&&(t["{"].splice(t["{"].length-1,1),0==t["{"].length+t['"'].length&&(i=!0))}i?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_KEY,this.DATA_.Fields[this.PARSETMP_.Key]=this.PARSETMP_.Value,this.PARSETMP_={Key:""},this.VALBRACES_=null):this.PARSETMP_.Value+=g}}},this.CHARCONV_=[[/\\space /g," "],[/\\textdollar /g,"$"],[/\\textquotesingle /g,"'"],[/\\ast /g,"*"],[/\\textbackslash /g,"\\"],[/\\\^\{\}/g,"^"],[/\\textasciigrave /g,"`"],[/\\lbrace /g,"{"],[/\\vert /g,"|"],[/\\rbrace /g,"}"],[/\\textasciitilde /g,"~"],[/\\textexclamdown /g,"¡"],[/\\textcent /g,"¢"],[/\\textsterling /g,"£"],[/\\textcurrency /g,"¤"],[/\\textyen /g,"¥"],[/\\textbrokenbar /g,"¦"],[/\\textsection /g,"§"],[/\\textasciidieresis /g,"¨"],[/\\textcopyright /g,"©"],[/\\textordfeminine /g,"ª"],[/\\guillemotleft /g,"«"],[/\\lnot /g,"¬"],[/\\textregistered /g,"®"],[/\\textasciimacron /g,"¯"],[/\\textdegree /g,"°"],[/\\pm /g,"±"],[/\\textasciiacute /g,"´"],[/\\mathrm\{\\mu\}/g,"µ"],[/\\textparagraph /g,"¶"],[/\\cdot /g,"·"],[/\\c\{\}/g,"¸"],[/\\textordmasculine /g,"º"],[/\\guillemotright /g,"»"],[/\\textonequarter /g,"¼"],[/\\textonehalf /g,"½"],[/\\textthreequarters /g,"¾"],[/\\textquestiondown /g,"¿"],[/\\`\{A\}/g,"À"],[/\\'\{A\}/g,"Á"],[/\\\^\{A\}/g,"Â"],[/\\~\{A\}/g,"Ã"],[/\\"\{A\}/g,"Ä"],[/\\AA /g,"Å"],[/\\AE /g,"Æ"],[/\\c\{C\}/g,"Ç"],[/\\`\{E\}/g,"È"],[/\\'\{E\}/g,"É"],[/\\\^\{E\}/g,"Ê"],[/\\"\{E\}/g,"Ë"],[/\\`\{I\}/g,"Ì"],[/\\'\{I\}/g,"Í"],[/\\\^\{I\}/g,"Î"],[/\\"\{I\}/g,"Ï"],[/\\DH /g,"Ð"],[/\\~\{N\}/g,"Ñ"],[/\\`\{O\}/g,"Ò"],[/\\'\{O\}/g,"Ó"],[/\\\^\{O\}/g,"Ô"],[/\\~\{O\}/g,"Õ"],[/\\"\{O\}/g,"Ö"],[/\\texttimes /g,"×"],[/\\O /g,"Ø"],[/\\`\{U\}/g,"Ù"],[/\\'\{U\}/g,"Ú"],[/\\\^\{U\}/g,"Û"],[/\\"\{U\}/g,"Ü"],[/\\'\{Y\}/g,"Ý"],[/\\TH /g,"Þ"],[/\\ss /g,"ß"],[/\\`\{a\}/g,"à"],[/\\'\{a\}/g,"á"],[/\\\^\{a\}/g,"â"],[/\\~\{a\}/g,"ã"],[/\\"\{a\}/g,"ä"],[/\\aa /g,"å"],[/\\ae /g,"æ"],[/\\c\{c\}/g,"ç"],[/\\`\{e\}/g,"è"],[/\\'\{e\}/g,"é"],[/\\\^\{e\}/g,"ê"],[/\\"\{e\}/g,"ë"],[/\\`\{\\i\}/g,"ì"],[/\\'\{\\i\}/g,"í"],[/\\\^\{\\i\}/g,"î"],[/\\"\{\\i\}/g,"ï"],[/\\dh /g,"ð"],[/\\~\{n\}/g,"ñ"],[/\\`\{o\}/g,"ò"],[/\\'\{o\}/g,"ó"],[/\\\^\{o\}/g,"ô"],[/\\~\{o\}/g,"õ"],[/\\"\{o\}/g,"ö"],[/\\div /g,"÷"],[/\\o /g,"ø"],[/\\`\{u\}/g,"ù"],[/\\'\{u\}/g,"ú"],[/\\\^\{u\}/g,"û"],[/\\"\{u\}/g,"ü"],[/\\'\{y\}/g,"ý"],[/\\th /g,"þ"],[/\\"\{y\}/g,"ÿ"],[/\\=\{A\}/g,"Ā"],[/\\=\{a\}/g,"ā"],[/\\u\{A\}/g,"Ă"],[/\\u\{a\}/g,"ă"],[/\\k\{A\}/g,"Ą"],[/\\k\{a\}/g,"ą"],[/\\'\{C\}/g,"Ć"],[/\\'\{c\}/g,"ć"],[/\\\^\{C\}/g,"Ĉ"],[/\\\^\{c\}/g,"ĉ"],[/\\.\{C\}/g,"Ċ"],[/\\.\{c\}/g,"ċ"],[/\\v\{C\}/g,"Č"],[/\\v\{c\}/g,"č"],[/\\v\{D\}/g,"Ď"],[/\\v\{d\}/g,"ď"],[/\\DJ /g,"Đ"],[/\\dj /g,"đ"],[/\\=\{E\}/g,"Ē"],[/\\=\{e\}/g,"ē"],[/\\u\{E\}/g,"Ĕ"],[/\\u\{e\}/g,"ĕ"],[/\\.\{E\}/g,"Ė"],[/\\.\{e\}/g,"ė"],[/\\k\{E\}/g,"Ę"],[/\\k\{e\}/g,"ę"],[/\\v\{E\}/g,"Ě"],[/\\v\{e\}/g,"ě"],[/\\\^\{G\}/g,"Ĝ"],[/\\\^\{g\}/g,"ĝ"],[/\\u\{G\}/g,"Ğ"],[/\\u\{g\}/g,"ğ"],[/\\.\{G\}/g,"Ġ"],[/\\.\{g\}/g,"ġ"],[/\\c\{G\}/g,"Ģ"],[/\\c\{g\}/g,"ģ"],[/\\\^\{H\}/g,"Ĥ"],[/\\\^\{h\}/g,"ĥ"],[/\\Elzxh /g,"ħ"],[/\\~\{I\}/g,"Ĩ"],[/\\~\{\\i\}/g,"ĩ"],[/\\=\{I\}/g,"Ī"],[/\\=\{\\i\}/g,"ī"],[/\\u\{I\}/g,"Ĭ"],[/\\u\{\\i\}/g,"ĭ"],[/\\k\{I\}/g,"Į"],[/\\k\{i\}/g,"į"],[/\\.\{I\}/g,"İ"],[/\\i /g,"ı"],[/\\\^\{J\}/g,"Ĵ"],[/\\\^\{\\j\}/g,"ĵ"],[/\\c\{K\}/g,"Ķ"],[/\\c\{k\}/g,"ķ"],[/\\'\{L\}/g,"Ĺ"],[/\\'\{l\}/g,"ĺ"],[/\\c\{L\}/g,"Ļ"],[/\\c\{l\}/g,"ļ"],[/\\v\{L\}/g,"Ľ"],[/\\v\{l\}/g,"ľ"],[/\\L /g,"Ł"],[/\\l /g,"ł"],[/\\'\{N\}/g,"Ń"],[/\\'\{n\}/g,"ń"],[/\\c\{N\}/g,"Ņ"],[/\\c\{n\}/g,"ņ"],[/\\v\{N\}/g,"Ň"],[/\\v\{n\}/g,"ň"],[/\\NG /g,"Ŋ"],[/\\ng /g,"ŋ"],[/\\=\{O\}/g,"Ō"],[/\\=\{o\}/g,"ō"],[/\\u\{O\}/g,"Ŏ"],[/\\u\{o\}/g,"ŏ"],[/\\H\{O\}/g,"Ő"],[/\\H\{o\}/g,"ő"],[/\\OE /g,"Œ"],[/\\oe /g,"œ"],[/\\'\{R\}/g,"Ŕ"],[/\\'\{r\}/g,"ŕ"],[/\\c\{R\}/g,"Ŗ"],[/\\c\{r\}/g,"ŗ"],[/\\v\{R\}/g,"Ř"],[/\\v\{r\}/g,"ř"],[/\\'\{S\}/g,"Ś"],[/\\'\{s\}/g,"ś"],[/\\\^\{S\}/g,"Ŝ"],[/\\\^\{s\}/g,"ŝ"],[/\\c\{S\}/g,"Ş"],[/\\c\{s\}/g,"ş"],[/\\v\{S\}/g,"Š"],[/\\v\{s\}/g,"š"],[/\\c\{T\}/g,"Ţ"],[/\\c\{t\}/g,"ţ"],[/\\v\{T\}/g,"Ť"],[/\\v\{t\}/g,"ť"],[/\\~\{U\}/g,"Ũ"],[/\\~\{u\}/g,"ũ"],[/\\=\{U\}/g,"Ū"],[/\\=\{u\}/g,"ū"],[/\\u\{U\}/g,"Ŭ"],[/\\u\{u\}/g,"ŭ"],[/\\r\{U\}/g,"Ů"],[/\\r\{u\}/g,"ů"],[/\\H\{U\}/g,"Ű"],[/\\H\{u\}/g,"ű"],[/\\k\{U\}/g,"Ų"],[/\\k\{u\}/g,"ų"],[/\\\^\{W\}/g,"Ŵ"],[/\\\^\{w\}/g,"ŵ"],[/\\\^\{Y\}/g,"Ŷ"],[/\\\^\{y\}/g,"ŷ"],[/\\"\{Y\}/g,"Ÿ"],[/\\'\{Z\}/g,"Ź"],[/\\'\{z\}/g,"ź"],[/\\.\{Z\}/g,"Ż"],[/\\.\{z\}/g,"ż"],[/\\v\{Z\}/g,"Ž"],[/\\v\{z\}/g,"ž"],[/\\texthvlig /g,"ƕ"],[/\\textnrleg /g,"ƞ"],[/\\eth /g,"ƪ"],[/\\textdoublepipe /g,"ǂ"],[/\\'\{g\}/g,"ǵ"],[/\\Elztrna /g,"ɐ"],[/\\Elztrnsa /g,"ɒ"],[/\\Elzopeno /g,"ɔ"],[/\\Elzrtld /g,"ɖ"],[/\\Elzschwa /g,"ə"],[/\\varepsilon /g,"ɛ"],[/\\Elzpgamma /g,"ɣ"],[/\\Elzpbgam /g,"ɤ"],[/\\Elztrnh /g,"ɥ"],[/\\Elzbtdl /g,"ɬ"],[/\\Elzrtll /g,"ɭ"],[/\\Elztrnm /g,"ɯ"],[/\\Elztrnmlr /g,"ɰ"],[/\\Elzltlmr /g,"ɱ"],[/\\Elzltln /g,"ɲ"],[/\\Elzrtln /g,"ɳ"],[/\\Elzclomeg /g,"ɷ"],[/\\textphi /g,"ɸ"],[/\\Elztrnr /g,"ɹ"],[/\\Elztrnrl /g,"ɺ"],[/\\Elzrttrnr /g,"ɻ"],[/\\Elzrl /g,"ɼ"],[/\\Elzrtlr /g,"ɽ"],[/\\Elzfhr /g,"ɾ"],[/\\Elzrtls /g,"ʂ"],[/\\Elzesh /g,"ʃ"],[/\\Elztrnt /g,"ʇ"],[/\\Elzrtlt /g,"ʈ"],[/\\Elzpupsil /g,"ʊ"],[/\\Elzpscrv /g,"ʋ"],[/\\Elzinvv /g,"ʌ"],[/\\Elzinvw /g,"ʍ"],[/\\Elztrny /g,"ʎ"],[/\\Elzrtlz /g,"ʐ"],[/\\Elzyogh /g,"ʒ"],[/\\Elzglst /g,"ʔ"],[/\\Elzreglst /g,"ʕ"],[/\\Elzinglst /g,"ʖ"],[/\\textturnk /g,"ʞ"],[/\\Elzdyogh /g,"ʤ"],[/\\Elztesh /g,"ʧ"],[/\\textasciicaron /g,"ˇ"],[/\\Elzverts /g,"ˈ"],[/\\Elzverti /g,"ˌ"],[/\\Elzlmrk /g,"ː"],[/\\Elzhlmrk /g,"ˑ"],[/\\Elzsbrhr /g,"˒"],[/\\Elzsblhr /g,"˓"],[/\\Elzrais /g,"˔"],[/\\Elzlow /g,"˕"],[/\\textasciibreve /g,"˘"],[/\\textperiodcentered /g,"˙"],[/\\r\{\}/g,"˚"],[/\\k\{\}/g,"˛"],[/\\texttildelow /g,"˜"],[/\\H\{\}/g,"˝"],[/\\tone\{55\}/g,"˥"],[/\\tone\{44\}/g,"˦"],[/\\tone\{33\}/g,"˧"],[/\\tone\{22\}/g,"˨"],[/\\tone\{11\}/g,"˩"],[/\\cyrchar\\C/g,"̏"],[/\\Elzpalh /g,"̡"],[/\\Elzrh /g,"̢"],[/\\Elzsbbrg /g,"̪"],[/\\Elzxl /g,"̵"],[/\\Elzbar /g,"̶"],[/\\'\{A\}/g,"Ά"],[/\\'\{E\}/g,"Έ"],[/\\'\{H\}/g,"Ή"],[/\\'\{\}\{I\}/g,"Ί"],[/\\'\{\}O/g,"Ό"],[/\\mathrm\{'Y\}/g,"Ύ"],[/\\mathrm\{'\\Omega\}/g,"Ώ"],[/\\acute\{\\ddot\{\\iota\}\}/g,"ΐ"],[/\\Alpha /g,"Α"],[/\\Beta /g,"Β"],[/\\Gamma /g,"Γ"],[/\\Delta /g,"Δ"],[/\\Epsilon /g,"Ε"],[/\\Zeta /g,"Ζ"],[/\\Eta /g,"Η"],[/\\Theta /g,"Θ"],[/\\Iota /g,"Ι"],[/\\Kappa /g,"Κ"],[/\\Lambda /g,"Λ"],[/\\Xi /g,"Ξ"],[/\\Pi /g,"Π"],[/\\Rho /g,"Ρ"],[/\\Sigma /g,"Σ"],[/\\Tau /g,"Τ"],[/\\Upsilon /g,"Υ"],[/\\Phi /g,"Φ"],[/\\Chi /g,"Χ"],[/\\Psi /g,"Ψ"],[/\\Omega /g,"Ω"],[/\\mathrm\{\\ddot\{I\}\}/g,"Ϊ"],[/\\mathrm\{\\ddot\{Y\}\}/g,"Ϋ"],[/\\'\{\$\\alpha\$\}/g,"ά"],[/\\acute\{\\epsilon\}/g,"έ"],[/\\acute\{\\eta\}/g,"ή"],[/\\acute\{\\iota\}/g,"ί"],[/\\acute\{\\ddot\{\\upsilon\}\}/g,"ΰ"],[/\\alpha /g,"α"],[/\\beta /g,"β"],[/\\gamma /g,"γ"],[/\\delta /g,"δ"],[/\\epsilon /g,"ε"],[/\\zeta /g,"ζ"],[/\\eta /g,"η"],[/\\texttheta /g,"θ"],[/\\iota /g,"ι"],[/\\kappa /g,"κ"],[/\\lambda /g,"λ"],[/\\mu /g,"μ"],[/\\nu /g,"ν"],[/\\xi /g,"ξ"],[/\\pi /g,"π"],[/\\rho /g,"ρ"],[/\\varsigma /g,"ς"],[/\\sigma /g,"σ"],[/\\tau /g,"τ"],[/\\upsilon /g,"υ"],[/\\varphi /g,"φ"],[/\\chi /g,"χ"],[/\\psi /g,"ψ"],[/\\omega /g,"ω"],[/\\ddot\{\\iota\}/g,"ϊ"],[/\\ddot\{\\upsilon\}/g,"ϋ"],[/\\'\{o\}/g,"ό"],[/\\acute\{\\upsilon\}/g,"ύ"],[/\\acute\{\\omega\}/g,"ώ"],[/\\Pisymbol\{ppi022\}\{87\}/g,"ϐ"],[/\\textvartheta /g,"ϑ"],[/\\Upsilon /g,"ϒ"],[/\\phi /g,"ϕ"],[/\\varpi /g,"ϖ"],[/\\Stigma /g,"Ϛ"],[/\\Digamma /g,"Ϝ"],[/\\digamma /g,"ϝ"],[/\\Koppa /g,"Ϟ"],[/\\Sampi /g,"Ϡ"],[/\\varkappa /g,"ϰ"],[/\\varrho /g,"ϱ"],[/\\textTheta /g,"ϴ"],[/\\backepsilon /g,"϶"],[/\\cyrchar\\CYRYO /g,"Ё"],[/\\cyrchar\\CYRDJE /g,"Ђ"],[/\\cyrchar\{\\'\\CYRG\}/g,"Ѓ"],[/\\cyrchar\\CYRIE /g,"Є"],[/\\cyrchar\\CYRDZE /g,"Ѕ"],[/\\cyrchar\\CYRII /g,"І"],[/\\cyrchar\\CYRYI /g,"Ї"],[/\\cyrchar\\CYRJE /g,"Ј"],[/\\cyrchar\\CYRLJE /g,"Љ"],[/\\cyrchar\\CYRNJE /g,"Њ"],[/\\cyrchar\\CYRTSHE /g,"Ћ"],[/\\cyrchar\{\\'\\CYRK\}/g,"Ќ"],[/\\cyrchar\\CYRUSHRT /g,"Ў"],[/\\cyrchar\\CYRDZHE /g,"Џ"],[/\\cyrchar\\CYRA /g,"А"],[/\\cyrchar\\CYRB /g,"Б"],[/\\cyrchar\\CYRV /g,"В"],[/\\cyrchar\\CYRG /g,"Г"],[/\\cyrchar\\CYRD /g,"Д"],[/\\cyrchar\\CYRE /g,"Е"],[/\\cyrchar\\CYRZH /g,"Ж"],[/\\cyrchar\\CYRZ /g,"З"],[/\\cyrchar\\CYRI /g,"И"],[/\\cyrchar\\CYRISHRT /g,"Й"],[/\\cyrchar\\CYRK /g,"К"],[/\\cyrchar\\CYRL /g,"Л"],[/\\cyrchar\\CYRM /g,"М"],[/\\cyrchar\\CYRN /g,"Н"],[/\\cyrchar\\CYRO /g,"О"],[/\\cyrchar\\CYRP /g,"П"],[/\\cyrchar\\CYRR /g,"Р"],[/\\cyrchar\\CYRS /g,"С"],[/\\cyrchar\\CYRT /g,"Т"],[/\\cyrchar\\CYRU /g,"У"],[/\\cyrchar\\CYRF /g,"Ф"],[/\\cyrchar\\CYRH /g,"Х"],[/\\cyrchar\\CYRC /g,"Ц"],[/\\cyrchar\\CYRCH /g,"Ч"],[/\\cyrchar\\CYRSH /g,"Ш"],[/\\cyrchar\\CYRSHCH /g,"Щ"],[/\\cyrchar\\CYRHRDSN /g,"Ъ"],[/\\cyrchar\\CYRERY /g,"Ы"],[/\\cyrchar\\CYRSFTSN /g,"Ь"],[/\\cyrchar\\CYREREV /g,"Э"],[/\\cyrchar\\CYRYU /g,"Ю"],[/\\cyrchar\\CYRYA /g,"Я"],[/\\cyrchar\\cyra /g,"а"],[/\\cyrchar\\cyrb /g,"б"],[/\\cyrchar\\cyrv /g,"в"],[/\\cyrchar\\cyrg /g,"г"],[/\\cyrchar\\cyrd /g,"д"],[/\\cyrchar\\cyre /g,"е"],[/\\cyrchar\\cyrzh /g,"ж"],[/\\cyrchar\\cyrz /g,"з"],[/\\cyrchar\\cyri /g,"и"],[/\\cyrchar\\cyrishrt /g,"й"],[/\\cyrchar\\cyrk /g,"к"],[/\\cyrchar\\cyrl /g,"л"],[/\\cyrchar\\cyrm /g,"м"],[/\\cyrchar\\cyrn /g,"н"],[/\\cyrchar\\cyro /g,"о"],[/\\cyrchar\\cyrp /g,"п"],[/\\cyrchar\\cyrr /g,"р"],[/\\cyrchar\\cyrs /g,"с"],[/\\cyrchar\\cyrt /g,"т"],[/\\cyrchar\\cyru /g,"у"],[/\\cyrchar\\cyrf /g,"ф"],[/\\cyrchar\\cyrh /g,"х"],[/\\cyrchar\\cyrc /g,"ц"],[/\\cyrchar\\cyrch /g,"ч"],[/\\cyrchar\\cyrsh /g,"ш"],[/\\cyrchar\\cyrshch /g,"щ"],[/\\cyrchar\\cyrhrdsn /g,"ъ"],[/\\cyrchar\\cyrery /g,"ы"],[/\\cyrchar\\cyrsftsn /g,"ь"],[/\\cyrchar\\cyrerev /g,"э"],[/\\cyrchar\\cyryu /g,"ю"],[/\\cyrchar\\cyrya /g,"я"],[/\\cyrchar\\cyryo /g,"ё"],[/\\cyrchar\\cyrdje /g,"ђ"],[/\\cyrchar\{\\'\\cyrg\}/g,"ѓ"],[/\\cyrchar\\cyrie /g,"є"],[/\\cyrchar\\cyrdze /g,"ѕ"],[/\\cyrchar\\cyrii /g,"і"],[/\\cyrchar\\cyryi /g,"ї"],[/\\cyrchar\\cyrje /g,"ј"],[/\\cyrchar\\cyrlje /g,"љ"],[/\\cyrchar\\cyrnje /g,"њ"],[/\\cyrchar\\cyrtshe /g,"ћ"],[/\\cyrchar\{\\'\\cyrk\}/g,"ќ"],[/\\cyrchar\\cyrushrt /g,"ў"],[/\\cyrchar\\cyrdzhe /g,"џ"],[/\\cyrchar\\CYROMEGA /g,"Ѡ"],[/\\cyrchar\\cyromega /g,"ѡ"],[/\\cyrchar\\CYRYAT /g,"Ѣ"],[/\\cyrchar\\CYRIOTE /g,"Ѥ"],[/\\cyrchar\\cyriote /g,"ѥ"],[/\\cyrchar\\CYRLYUS /g,"Ѧ"],[/\\cyrchar\\cyrlyus /g,"ѧ"],[/\\cyrchar\\CYRIOTLYUS /g,"Ѩ"],[/\\cyrchar\\cyriotlyus /g,"ѩ"],[/\\cyrchar\\CYRBYUS /g,"Ѫ"],[/\\cyrchar\\CYRIOTBYUS /g,"Ѭ"],[/\\cyrchar\\cyriotbyus /g,"ѭ"],[/\\cyrchar\\CYRKSI /g,"Ѯ"],[/\\cyrchar\\cyrksi /g,"ѯ"],[/\\cyrchar\\CYRPSI /g,"Ѱ"],[/\\cyrchar\\cyrpsi /g,"ѱ"],[/\\cyrchar\\CYRFITA /g,"Ѳ"],[/\\cyrchar\\CYRIZH /g,"Ѵ"],[/\\cyrchar\\CYRUK /g,"Ѹ"],[/\\cyrchar\\cyruk /g,"ѹ"],[/\\cyrchar\\CYROMEGARND /g,"Ѻ"],[/\\cyrchar\\cyromegarnd /g,"ѻ"],[/\\cyrchar\\CYROMEGATITLO /g,"Ѽ"],[/\\cyrchar\\cyromegatitlo /g,"ѽ"],[/\\cyrchar\\CYROT /g,"Ѿ"],[/\\cyrchar\\cyrot /g,"ѿ"],[/\\cyrchar\\CYRKOPPA /g,"Ҁ"],[/\\cyrchar\\cyrkoppa /g,"ҁ"],[/\\cyrchar\\cyrthousands /g,"҂"],[/\\cyrchar\\cyrhundredthousands /g,"҈"],[/\\cyrchar\\cyrmillions /g,"҉"],[/\\cyrchar\\CYRSEMISFTSN /g,"Ҍ"],[/\\cyrchar\\cyrsemisftsn /g,"ҍ"],[/\\cyrchar\\CYRRTICK /g,"Ҏ"],[/\\cyrchar\\cyrrtick /g,"ҏ"],[/\\cyrchar\\CYRGUP /g,"Ґ"],[/\\cyrchar\\cyrgup /g,"ґ"],[/\\cyrchar\\CYRGHCRS /g,"Ғ"],[/\\cyrchar\\cyrghcrs /g,"ғ"],[/\\cyrchar\\CYRGHK /g,"Ҕ"],[/\\cyrchar\\cyrghk /g,"ҕ"],[/\\cyrchar\\CYRZHDSC /g,"Җ"],[/\\cyrchar\\cyrzhdsc /g,"җ"],[/\\cyrchar\\CYRZDSC /g,"Ҙ"],[/\\cyrchar\\cyrzdsc /g,"ҙ"],[/\\cyrchar\\CYRKDSC /g,"Қ"],[/\\cyrchar\\cyrkdsc /g,"қ"],[/\\cyrchar\\CYRKVCRS /g,"Ҝ"],[/\\cyrchar\\cyrkvcrs /g,"ҝ"],[/\\cyrchar\\CYRKHCRS /g,"Ҟ"],[/\\cyrchar\\cyrkhcrs /g,"ҟ"],[/\\cyrchar\\CYRKBEAK /g,"Ҡ"],[/\\cyrchar\\cyrkbeak /g,"ҡ"],[/\\cyrchar\\CYRNDSC /g,"Ң"],[/\\cyrchar\\cyrndsc /g,"ң"],[/\\cyrchar\\CYRNG /g,"Ҥ"],[/\\cyrchar\\cyrng /g,"ҥ"],[/\\cyrchar\\CYRPHK /g,"Ҧ"],[/\\cyrchar\\cyrphk /g,"ҧ"],[/\\cyrchar\\CYRABHHA /g,"Ҩ"],[/\\cyrchar\\cyrabhha /g,"ҩ"],[/\\cyrchar\\CYRSDSC /g,"Ҫ"],[/\\cyrchar\\cyrsdsc /g,"ҫ"],[/\\cyrchar\\CYRTDSC /g,"Ҭ"],[/\\cyrchar\\cyrtdsc /g,"ҭ"],[/\\cyrchar\\CYRY /g,"Ү"],[/\\cyrchar\\cyry /g,"ү"],[/\\cyrchar\\CYRYHCRS /g,"Ұ"],[/\\cyrchar\\cyryhcrs /g,"ұ"],[/\\cyrchar\\CYRHDSC /g,"Ҳ"],[/\\cyrchar\\cyrhdsc /g,"ҳ"],[/\\cyrchar\\CYRTETSE /g,"Ҵ"],[/\\cyrchar\\cyrtetse /g,"ҵ"],[/\\cyrchar\\CYRCHRDSC /g,"Ҷ"],[/\\cyrchar\\cyrchrdsc /g,"ҷ"],[/\\cyrchar\\CYRCHVCRS /g,"Ҹ"],[/\\cyrchar\\cyrchvcrs /g,"ҹ"],[/\\cyrchar\\CYRSHHA /g,"Һ"],[/\\cyrchar\\cyrshha /g,"һ"],[/\\cyrchar\\CYRABHCH /g,"Ҽ"],[/\\cyrchar\\cyrabhch /g,"ҽ"],[/\\cyrchar\\CYRABHCHDSC /g,"Ҿ"],[/\\cyrchar\\cyrabhchdsc /g,"ҿ"],[/\\cyrchar\\CYRpalochka /g,"Ӏ"],[/\\cyrchar\\CYRKHK /g,"Ӄ"],[/\\cyrchar\\cyrkhk /g,"ӄ"],[/\\cyrchar\\CYRNHK /g,"Ӈ"],[/\\cyrchar\\cyrnhk /g,"ӈ"],[/\\cyrchar\\CYRCHLDSC /g,"Ӌ"],[/\\cyrchar\\cyrchldsc /g,"ӌ"],[/\\cyrchar\\CYRAE /g,"Ӕ"],[/\\cyrchar\\cyrae /g,"ӕ"],[/\\cyrchar\\CYRSCHWA /g,"Ә"],[/\\cyrchar\\cyrschwa /g,"ә"],[/\\cyrchar\\CYRABHDZE /g,"Ӡ"],[/\\cyrchar\\cyrabhdze /g,"ӡ"],[/\\cyrchar\\CYROTLD /g,"Ө"],[/\\cyrchar\\cyrotld /g,"ө"],[/\\hspace\{0.6em\}/g," "],[/\\hspace\{1em\}/g," "],[/\\hspace\{0.33em\}/g," "],[/\\hspace\{0.25em\}/g," "],[/\\hspace\{0.166em\}/g," "],[/\\hphantom\{0\}/g," "],[/\\hphantom\{,\}/g," "],[/\\hspace\{0.167em\}/g," "],[/\\mkern1mu /g," "],[/\\textendash /g,"–"],[/\\textemdash /g,"—"],[/\\rule\{1em\}\{1pt\}/g,"―"],[/\\Vert /g,"‖"],[/\\Elzreapos /g,"‛"],[/\\textquotedblleft /g,"“"],[/\\textquotedblright /g,"”"],[/\\textdagger /g,"†"],[/\\textdaggerdbl /g,"‡"],[/\\textbullet /g,"•"],[/\\ldots /g,"…"],[/\\textperthousand /g,"‰"],[/\\textpertenthousand /g,"‱"],[/\\backprime /g,"‵"],[/\\guilsinglleft /g,"‹"],[/\\guilsinglright /g,"›"],[/\\mkern4mu /g," "],[/\\nolinebreak /g,"⁠"],[/\\ensuremath\{\\Elzpes\}/g,"₧"],[/\\mbox\{\\texteuro\} /g,"€"],[/\\dddot /g,"⃛"],[/\\ddddot /g,"⃜"],[/\\mathbb\{C\}/g,"ℂ"],[/\\mathscr\{g\}/g,"ℊ"],[/\\mathscr\{H\}/g,"ℋ"],[/\\mathfrak\{H\}/g,"ℌ"],[/\\mathbb\{H\}/g,"ℍ"],[/\\hslash /g,"ℏ"],[/\\mathscr\{I\}/g,"ℐ"],[/\\mathfrak\{I\}/g,"ℑ"],[/\\mathscr\{L\}/g,"ℒ"],[/\\mathscr\{l\}/g,"ℓ"],[/\\mathbb\{N\}/g,"ℕ"],[/\\cyrchar\\textnumero /g,"№"],[/\\wp /g,"℘"],[/\\mathbb\{P\}/g,"ℙ"],[/\\mathbb\{Q\}/g,"ℚ"],[/\\mathscr\{R\}/g,"ℛ"],[/\\mathfrak\{R\}/g,"ℜ"],[/\\mathbb\{R\}/g,"ℝ"],[/\\Elzxrat /g,"℞"],[/\\texttrademark /g,"™"],[/\\mathbb\{Z\}/g,"ℤ"],[/\\Omega /g,"Ω"],[/\\mho /g,"℧"],[/\\mathfrak\{Z\}/g,"ℨ"],[/\\ElsevierGlyph\{2129\}/g,"℩"],[/\\AA /g,"Å"],[/\\mathscr\{B\}/g,"ℬ"],[/\\mathfrak\{C\}/g,"ℭ"],[/\\mathscr\{e\}/g,"ℯ"],[/\\mathscr\{E\}/g,"ℰ"],[/\\mathscr\{F\}/g,"ℱ"],[/\\mathscr\{M\}/g,"ℳ"],[/\\mathscr\{o\}/g,"ℴ"],[/\\aleph /g,"ℵ"],[/\\beth /g,"ℶ"],[/\\gimel /g,"ℷ"],[/\\daleth /g,"ℸ"],[/\\textfrac\{1\}\{3\}/g,"⅓"],[/\\textfrac\{2\}\{3\}/g,"⅔"],[/\\textfrac\{1\}\{5\}/g,"⅕"],[/\\textfrac\{2\}\{5\}/g,"⅖"],[/\\textfrac\{3\}\{5\}/g,"⅗"],[/\\textfrac\{4\}\{5\}/g,"⅘"],[/\\textfrac\{1\}\{6\}/g,"⅙"],[/\\textfrac\{5\}\{6\}/g,"⅚"],[/\\textfrac\{1\}\{8\}/g,"⅛"],[/\\textfrac\{3\}\{8\}/g,"⅜"],[/\\textfrac\{5\}\{8\}/g,"⅝"],[/\\textfrac\{7\}\{8\}/g,"⅞"],[/\\leftarrow /g,"←"],[/\\uparrow /g,"↑"],[/\\rightarrow /g,"→"],[/\\downarrow /g,"↓"],[/\\leftrightarrow /g,"↔"],[/\\updownarrow /g,"↕"],[/\\nwarrow /g,"↖"],[/\\nearrow /g,"↗"],[/\\searrow /g,"↘"],[/\\swarrow /g,"↙"],[/\\nleftarrow /g,"↚"],[/\\nrightarrow /g,"↛"],[/\\arrowwaveright /g,"↜"],[/\\arrowwaveright /g,"↝"],[/\\twoheadleftarrow /g,"↞"],[/\\twoheadrightarrow /g,"↠"],[/\\leftarrowtail /g,"↢"],[/\\rightarrowtail /g,"↣"],[/\\mapsto /g,"↦"],[/\\hookleftarrow /g,"↩"],[/\\hookrightarrow /g,"↪"],[/\\looparrowleft /g,"↫"],[/\\looparrowright /g,"↬"],[/\\leftrightsquigarrow /g,"↭"],[/\\nleftrightarrow /g,"↮"],[/\\Lsh /g,"↰"],[/\\Rsh /g,"↱"],[/\\ElsevierGlyph\{21B3\}/g,"↳"],[/\\curvearrowleft /g,"↶"],[/\\curvearrowright /g,"↷"],[/\\circlearrowleft /g,"↺"],[/\\circlearrowright /g,"↻"],[/\\leftharpoonup /g,"↼"],[/\\leftharpoondown /g,"↽"],[/\\upharpoonright /g,"↾"],[/\\upharpoonleft /g,"↿"],[/\\rightharpoonup /g,"⇀"],[/\\rightharpoondown /g,"⇁"],[/\\downharpoonright /g,"⇂"],[/\\downharpoonleft /g,"⇃"],[/\\rightleftarrows /g,"⇄"],[/\\dblarrowupdown /g,"⇅"],[/\\leftrightarrows /g,"⇆"],[/\\leftleftarrows /g,"⇇"],[/\\upuparrows /g,"⇈"],[/\\rightrightarrows /g,"⇉"],[/\\downdownarrows /g,"⇊"],[/\\leftrightharpoons /g,"⇋"],[/\\rightleftharpoons /g,"⇌"],[/\\nLeftarrow /g,"⇍"],[/\\nLeftrightarrow /g,"⇎"],[/\\nRightarrow /g,"⇏"],[/\\Leftarrow /g,"⇐"],[/\\Uparrow /g,"⇑"],[/\\Rightarrow /g,"⇒"],[/\\Downarrow /g,"⇓"],[/\\Leftrightarrow /g,"⇔"],[/\\Updownarrow /g,"⇕"],[/\\Lleftarrow /g,"⇚"],[/\\Rrightarrow /g,"⇛"],[/\\rightsquigarrow /g,"⇝"],[/\\DownArrowUpArrow /g,"⇵"],[/\\forall /g,"∀"],[/\\complement /g,"∁"],[/\\partial /g,"∂"],[/\\exists /g,"∃"],[/\\nexists /g,"∄"],[/\\varnothing /g,"∅"],[/\\nabla /g,"∇"],[/\\in /g,"∈"],[/\\not\\in /g,"∉"],[/\\ni /g,"∋"],[/\\not\\ni /g,"∌"],[/\\prod /g,"∏"],[/\\coprod /g,"∐"],[/\\sum /g,"∑"],[/\\mp /g,"∓"],[/\\dotplus /g,"∔"],[/\\setminus /g,"∖"],[/\\circ /g,"∘"],[/\\bullet /g,"∙"],[/\\surd /g,"√"],[/\\propto /g,"∝"],[/\\infty /g,"∞"],[/\\rightangle /g,"∟"],[/\\angle /g,"∠"],[/\\measuredangle /g,"∡"],[/\\sphericalangle /g,"∢"],[/\\mid /g,"∣"],[/\\nmid /g,"∤"],[/\\parallel /g,"∥"],[/\\nparallel /g,"∦"],[/\\wedge /g,"∧"],[/\\vee /g,"∨"],[/\\cap /g,"∩"],[/\\cup /g,"∪"],[/\\int /g,"∫"],[/\\int\\!\\int /g,"∬"],[/\\int\\!\\int\\!\\int /g,"∭"],[/\\oint /g,"∮"],[/\\surfintegral /g,"∯"],[/\\volintegral /g,"∰"],[/\\clwintegral /g,"∱"],[/\\ElsevierGlyph\{2232\}/g,"∲"],[/\\ElsevierGlyph\{2233\}/g,"∳"],[/\\therefore /g,"∴"],[/\\because /g,"∵"],[/\\Colon /g,"∷"],[/\\ElsevierGlyph\{2238\}/g,"∸"],[/\\mathbin\{\{:\}\\!\\!\{\-\}\\!\\!\{:\}\}/g,"∺"],[/\\homothetic /g,"∻"],[/\\sim /g,"∼"],[/\\backsim /g,"∽"],[/\\lazysinv /g,"∾"],[/\\wr /g,"≀"],[/\\not\\sim /g,"≁"],[/\\ElsevierGlyph\{2242\}/g,"≂"],[/\\NotEqualTilde /g,"≂-00338"],[/\\simeq /g,"≃"],[/\\not\\simeq /g,"≄"],[/\\cong /g,"≅"],[/\\approxnotequal /g,"≆"],[/\\not\\cong /g,"≇"],[/\\approx /g,"≈"],[/\\not\\approx /g,"≉"],[/\\approxeq /g,"≊"],[/\\tildetrpl /g,"≋"],[/\\not\\apid /g,"≋-00338"],[/\\allequal /g,"≌"],[/\\asymp /g,"≍"],[/\\Bumpeq /g,"≎"],[/\\NotHumpDownHump /g,"≎-00338"],[/\\bumpeq /g,"≏"],[/\\NotHumpEqual /g,"≏-00338"],[/\\doteq /g,"≐"],[/\\not\\doteq/g,"≐-00338"],[/\\doteqdot /g,"≑"],[/\\fallingdotseq /g,"≒"],[/\\risingdotseq /g,"≓"],[/\\eqcirc /g,"≖"],[/\\circeq /g,"≗"],[/\\estimates /g,"≙"],[/\\ElsevierGlyph\{225A\}/g,"≚"],[/\\starequal /g,"≛"],[/\\triangleq /g,"≜"],[/\\ElsevierGlyph\{225F\}/g,"≟"],[/\\not =/g,"≠"],[/\\equiv /g,"≡"],[/\\not\\equiv /g,"≢"],[/\\leq /g,"≤"],[/\\geq /g,"≥"],[/\\leqq /g,"≦"],[/\\geqq /g,"≧"],[/\\lneqq /g,"≨"],[/\\lvertneqq /g,"≨-0FE00"],[/\\gneqq /g,"≩"],[/\\gvertneqq /g,"≩-0FE00"],[/\\ll /g,"≪"],[/\\NotLessLess /g,"≪-00338"],[/\\gg /g,"≫"],[/\\NotGreaterGreater /g,"≫-00338"],[/\\between /g,"≬"],[/\\not\\kern\-0.3em\\times /g,"≭"],[/\\not/g,"≯"],[/\\not\\leq /g,"≰"],[/\\not\\geq /g,"≱"],[/\\lessequivlnt /g,"≲"],[/\\greaterequivlnt /g,"≳"],[/\\ElsevierGlyph\{2274\}/g,"≴"],[/\\ElsevierGlyph\{2275\}/g,"≵"],[/\\lessgtr /g,"≶"],[/\\gtrless /g,"≷"],[/\\notlessgreater /g,"≸"],[/\\notgreaterless /g,"≹"],[/\\prec /g,"≺"],[/\\succ /g,"≻"],[/\\preccurlyeq /g,"≼"],[/\\succcurlyeq /g,"≽"],[/\\precapprox /g,"≾"],[/\\NotPrecedesTilde /g,"≾-00338"],[/\\succapprox /g,"≿"],[/\\NotSucceedsTilde /g,"≿-00338"],[/\\not\\prec /g,"⊀"],[/\\not\\succ /g,"⊁"],[/\\subset /g,"⊂"],[/\\supset /g,"⊃"],[/\\not\\subset /g,"⊄"],[/\\not\\supset /g,"⊅"],[/\\subseteq /g,"⊆"],[/\\supseteq /g,"⊇"],[/\\not\\subseteq /g,"⊈"],[/\\not\\supseteq /g,"⊉"],[/\\subsetneq /g,"⊊"],[/\\varsubsetneqq /g,"⊊-0FE00"],[/\\supsetneq /g,"⊋"],[/\\varsupsetneq /g,"⊋-0FE00"],[/\\uplus /g,"⊎"],[/\\sqsubset /g,"⊏"],[/\\NotSquareSubset /g,"⊏-00338"],[/\\sqsupset /g,"⊐"],[/\\NotSquareSuperset /g,"⊐-00338"],[/\\sqsubseteq /g,"⊑"],[/\\sqsupseteq /g,"⊒"],[/\\sqcap /g,"⊓"],[/\\sqcup /g,"⊔"],[/\\oplus /g,"⊕"],[/\\ominus /g,"⊖"],[/\\otimes /g,"⊗"],[/\\oslash /g,"⊘"],[/\\odot /g,"⊙"],[/\\circledcirc /g,"⊚"],[/\\circledast /g,"⊛"],[/\\circleddash /g,"⊝"],[/\\boxplus /g,"⊞"],[/\\boxminus /g,"⊟"],[/\\boxtimes /g,"⊠"],[/\\boxdot /g,"⊡"],[/\\vdash /g,"⊢"],[/\\dashv /g,"⊣"],[/\\top /g,"⊤"],[/\\perp /g,"⊥"],[/\\truestate /g,"⊧"],[/\\forcesextra /g,"⊨"],[/\\Vdash /g,"⊩"],[/\\Vvdash /g,"⊪"],[/\\VDash /g,"⊫"],[/\\nvdash /g,"⊬"],[/\\nvDash /g,"⊭"],[/\\nVdash /g,"⊮"],[/\\nVDash /g,"⊯"],[/\\vartriangleleft /g,"⊲"],[/\\vartriangleright /g,"⊳"],[/\\trianglelefteq /g,"⊴"],[/\\trianglerighteq /g,"⊵"],[/\\original /g,"⊶"],[/\\image /g,"⊷"],[/\\multimap /g,"⊸"],[/\\hermitconjmatrix /g,"⊹"],[/\\intercal /g,"⊺"],[/\\veebar /g,"⊻"],[/\\rightanglearc /g,"⊾"],[/\\ElsevierGlyph\{22C0\}/g,"⋀"],[/\\ElsevierGlyph\{22C1\}/g,"⋁"],[/\\bigcap /g,"⋂"],[/\\bigcup /g,"⋃"],[/\\diamond /g,"⋄"],[/\\cdot /g,"⋅"],[/\\star /g,"⋆"],[/\\divideontimes /g,"⋇"],[/\\bowtie /g,"⋈"],[/\\ltimes /g,"⋉"],[/\\rtimes /g,"⋊"],[/\\leftthreetimes /g,"⋋"],[/\\rightthreetimes /g,"⋌"],[/\\backsimeq /g,"⋍"],[/\\curlyvee /g,"⋎"],[/\\curlywedge /g,"⋏"],[/\\Subset /g,"⋐"],[/\\Supset /g,"⋑"],[/\\Cap /g,"⋒"],[/\\Cup /g,"⋓"],[/\\pitchfork /g,"⋔"],[/\\lessdot /g,"⋖"],[/\\gtrdot /g,"⋗"],[/\\verymuchless /g,"⋘"],[/\\verymuchgreater /g,"⋙"],[/\\lesseqgtr /g,"⋚"],[/\\gtreqless /g,"⋛"],[/\\curlyeqprec /g,"⋞"],[/\\curlyeqsucc /g,"⋟"],[/\\not\\sqsubseteq /g,"⋢"],[/\\not\\sqsupseteq /g,"⋣"],[/\\Elzsqspne /g,"⋥"],[/\\lnsim /g,"⋦"],[/\\gnsim /g,"⋧"],[/\\precedesnotsimilar /g,"⋨"],[/\\succnsim /g,"⋩"],[/\\ntriangleleft /g,"⋪"],[/\\ntriangleright /g,"⋫"],[/\\ntrianglelefteq /g,"⋬"],[/\\ntrianglerighteq /g,"⋭"],[/\\vdots /g,"⋮"],[/\\cdots /g,"⋯"],[/\\upslopeellipsis /g,"⋰"],[/\\downslopeellipsis /g,"⋱"],[/\\barwedge /g,"⌅"],[/\\perspcorrespond /g,"⌆"],[/\\lceil /g,"⌈"],[/\\rceil /g,"⌉"],[/\\lfloor /g,"⌊"],[/\\rfloor /g,"⌋"],[/\\recorder /g,"⌕"],[/\\mathchar"2208/g,"⌖"],[/\\ulcorner /g,"⌜"],[/\\urcorner /g,"⌝"],[/\\llcorner /g,"⌞"],[/\\lrcorner /g,"⌟"],[/\\frown /g,"⌢"],[/\\smile /g,"⌣"],[/\\langle /g,"〈"],[/\\rangle /g,"〉"],[/\\ElsevierGlyph\{E838\}/g,"⌽"],[/\\Elzdlcorn /g,"⎣"],[/\\lmoustache /g,"⎰"],[/\\rmoustache /g,"⎱"],[/\\textvisiblespace /g,"␣"],[/\\ding\{172\}/g,"①"],[/\\ding\{173\}/g,"②"],[/\\ding\{174\}/g,"③"],[/\\ding\{175\}/g,"④"],[/\\ding\{176\}/g,"⑤"],[/\\ding\{177\}/g,"⑥"],[/\\ding\{178\}/g,"⑦"],[/\\ding\{179\}/g,"⑧"],[/\\ding\{180\}/g,"⑨"],[/\\ding\{181\}/g,"⑩"],[/\\circledS /g,"Ⓢ"],[/\\Elzdshfnc /g,"┆"],[/\\Elzsqfnw /g,"┙"],[/\\diagup /g,"╱"],[/\\ding\{110\}/g,"■"],[/\\square /g,"□"],[/\\blacksquare /g,"▪"],[/\\fbox\{~~\}/g,"▭"],[/\\Elzvrecto /g,"▯"],[/\\ElsevierGlyph\{E381\}/g,"▱"],[/\\ding\{115\}/g,"▲"],[/\\bigtriangleup /g,"△"],[/\\blacktriangle /g,"▴"],[/\\vartriangle /g,"▵"],[/\\blacktriangleright /g,"▸"],[/\\triangleright /g,"▹"],[/\\ding\{116\}/g,"▼"],[/\\bigtriangledown /g,"▽"],[/\\blacktriangledown /g,"▾"],[/\\triangledown /g,"▿"],[/\\blacktriangleleft /g,"◂"],[/\\triangleleft /g,"◃"],[/\\ding\{117\}/g,"◆"],[/\\lozenge /g,"◊"],[/\\bigcirc /g,"○"],[/\\ding\{108\}/g,"●"],[/\\Elzcirfl /g,"◐"],[/\\Elzcirfr /g,"◑"],[/\\Elzcirfb /g,"◒"],[/\\ding\{119\}/g,"◗"],[/\\Elzrvbull /g,"◘"],[/\\Elzsqfl /g,"◧"],[/\\Elzsqfr /g,"◨"],[/\\Elzsqfse /g,"◪"],[/\\bigcirc /g,"◯"],[/\\ding\{72\}/g,"★"],[/\\ding\{73\}/g,"☆"],[/\\ding\{37\}/g,"☎"],[/\\ding\{42\}/g,"☛"],[/\\ding\{43\}/g,"☞"],[/\\rightmoon /g,"☾"],[/\\mercury /g,"☿"],[/\\venus /g,"♀"],[/\\male /g,"♂"],[/\\jupiter /g,"♃"],[/\\saturn /g,"♄"],[/\\uranus /g,"♅"],[/\\neptune /g,"♆"],[/\\pluto /g,"♇"],[/\\aries /g,"♈"],[/\\taurus /g,"♉"],[/\\gemini /g,"♊"],[/\\cancer /g,"♋"],[/\\leo /g,"♌"],[/\\virgo /g,"♍"],[/\\libra /g,"♎"],[/\\scorpio /g,"♏"],[/\\sagittarius /g,"♐"],[/\\capricornus /g,"♑"],[/\\aquarius /g,"♒"],[/\\pisces /g,"♓"],[/\\ding\{171\}/g,"♠"],[/\\diamond /g,"♢"],[/\\ding\{168\}/g,"♣"],[/\\ding\{170\}/g,"♥"],[/\\ding\{169\}/g,"♦"],[/\\quarternote /g,"♩"],[/\\eighthnote /g,"♪"],[/\\flat /g,"♭"],[/\\natural /g,"♮"],[/\\sharp /g,"♯"],[/\\ding\{33\}/g,"✁"],[/\\ding\{34\}/g,"✂"],[/\\ding\{35\}/g,"✃"],[/\\ding\{36\}/g,"✄"],[/\\ding\{38\}/g,"✆"],[/\\ding\{39\}/g,"✇"],[/\\ding\{40\}/g,"✈"],[/\\ding\{41\}/g,"✉"],[/\\ding\{44\}/g,"✌"],[/\\ding\{45\}/g,"✍"],[/\\ding\{46\}/g,"✎"],[/\\ding\{47\}/g,"✏"],[/\\ding\{48\}/g,"✐"],[/\\ding\{49\}/g,"✑"],[/\\ding\{50\}/g,"✒"],[/\\ding\{51\}/g,"✓"],[/\\ding\{52\}/g,"✔"],[/\\ding\{53\}/g,"✕"],[/\\ding\{54\}/g,"✖"],[/\\ding\{55\}/g,"✗"],[/\\ding\{56\}/g,"✘"],[/\\ding\{57\}/g,"✙"],[/\\ding\{58\}/g,"✚"],[/\\ding\{59\}/g,"✛"],[/\\ding\{60\}/g,"✜"],[/\\ding\{61\}/g,"✝"],[/\\ding\{62\}/g,"✞"],[/\\ding\{63\}/g,"✟"],[/\\ding\{64\}/g,"✠"],[/\\ding\{65\}/g,"✡"],[/\\ding\{66\}/g,"✢"],[/\\ding\{67\}/g,"✣"],[/\\ding\{68\}/g,"✤"],[/\\ding\{69\}/g,"✥"],[/\\ding\{70\}/g,"✦"],[/\\ding\{71\}/g,"✧"],[/\\ding\{73\}/g,"✩"],[/\\ding\{74\}/g,"✪"],[/\\ding\{75\}/g,"✫"],[/\\ding\{76\}/g,"✬"],[/\\ding\{77\}/g,"✭"],[/\\ding\{78\}/g,"✮"],[/\\ding\{79\}/g,"✯"],[/\\ding\{80\}/g,"✰"],[/\\ding\{81\}/g,"✱"],[/\\ding\{82\}/g,"✲"],[/\\ding\{83\}/g,"✳"],[/\\ding\{84\}/g,"✴"],[/\\ding\{85\}/g,"✵"],[/\\ding\{86\}/g,"✶"],[/\\ding\{87\}/g,"✷"],[/\\ding\{88\}/g,"✸"],[/\\ding\{89\}/g,"✹"],[/\\ding\{90\}/g,"✺"],[/\\ding\{91\}/g,"✻"],[/\\ding\{92\}/g,"✼"],[/\\ding\{93\}/g,"✽"],[/\\ding\{94\}/g,"✾"],[/\\ding\{95\}/g,"✿"],[/\\ding\{96\}/g,"❀"],[/\\ding\{97\}/g,"❁"],[/\\ding\{98\}/g,"❂"],[/\\ding\{99\}/g,"❃"],[/\\ding\{100\}/g,"❄"],[/\\ding\{101\}/g,"❅"],[/\\ding\{102\}/g,"❆"],[/\\ding\{103\}/g,"❇"],[/\\ding\{104\}/g,"❈"],[/\\ding\{105\}/g,"❉"],[/\\ding\{106\}/g,"❊"],[/\\ding\{107\}/g,"❋"],[/\\ding\{109\}/g,"❍"],[/\\ding\{111\}/g,"❏"],[/\\ding\{112\}/g,"❐"],[/\\ding\{113\}/g,"❑"],[/\\ding\{114\}/g,"❒"],[/\\ding\{118\}/g,"❖"],[/\\ding\{120\}/g,"❘"],[/\\ding\{121\}/g,"❙"],[/\\ding\{122\}/g,"❚"],[/\\ding\{123\}/g,"❛"],[/\\ding\{124\}/g,"❜"],[/\\ding\{125\}/g,"❝"],[/\\ding\{126\}/g,"❞"],[/\\ding\{161\}/g,"❡"],[/\\ding\{162\}/g,"❢"],[/\\ding\{163\}/g,"❣"],[/\\ding\{164\}/g,"❤"],[/\\ding\{165\}/g,"❥"],[/\\ding\{166\}/g,"❦"],[/\\ding\{167\}/g,"❧"],[/\\ding\{182\}/g,"❶"],[/\\ding\{183\}/g,"❷"],[/\\ding\{184\}/g,"❸"],[/\\ding\{185\}/g,"❹"],[/\\ding\{186\}/g,"❺"],[/\\ding\{187\}/g,"❻"],[/\\ding\{188\}/g,"❼"],[/\\ding\{189\}/g,"❽"],[/\\ding\{190\}/g,"❾"],[/\\ding\{191\}/g,"❿"],[/\\ding\{192\}/g,"➀"],[/\\ding\{193\}/g,"➁"],[/\\ding\{194\}/g,"➂"],[/\\ding\{195\}/g,"➃"],[/\\ding\{196\}/g,"➄"],[/\\ding\{197\}/g,"➅"],[/\\ding\{198\}/g,"➆"],[/\\ding\{199\}/g,"➇"],[/\\ding\{200\}/g,"➈"],[/\\ding\{201\}/g,"➉"],[/\\ding\{202\}/g,"➊"],[/\\ding\{203\}/g,"➋"],[/\\ding\{204\}/g,"➌"],[/\\ding\{205\}/g,"➍"],[/\\ding\{206\}/g,"➎"],[/\\ding\{207\}/g,"➏"],[/\\ding\{208\}/g,"➐"],[/\\ding\{209\}/g,"➑"],[/\\ding\{210\}/g,"➒"],[/\\ding\{211\}/g,"➓"],[/\\ding\{212\}/g,"➔"],[/\\ding\{216\}/g,"➘"],[/\\ding\{217\}/g,"➙"],[/\\ding\{218\}/g,"➚"],[/\\ding\{219\}/g,"➛"],[/\\ding\{220\}/g,"➜"],[/\\ding\{221\}/g,"➝"],[/\\ding\{222\}/g,"➞"],[/\\ding\{223\}/g,"➟"],[/\\ding\{224\}/g,"➠"],[/\\ding\{225\}/g,"➡"],[/\\ding\{226\}/g,"➢"],[/\\ding\{227\}/g,"➣"],[/\\ding\{228\}/g,"➤"],[/\\ding\{229\}/g,"➥"],[/\\ding\{230\}/g,"➦"],[/\\ding\{231\}/g,"➧"],[/\\ding\{232\}/g,"➨"],[/\\ding\{233\}/g,"➩"],[/\\ding\{234\}/g,"➪"],[/\\ding\{235\}/g,"➫"],[/\\ding\{236\}/g,"➬"],[/\\ding\{237\}/g,"➭"],[/\\ding\{238\}/g,"➮"],[/\\ding\{239\}/g,"➯"],[/\\ding\{241\}/g,"➱"],[/\\ding\{242\}/g,"➲"],[/\\ding\{243\}/g,"➳"],[/\\ding\{244\}/g,"➴"],[/\\ding\{245\}/g,"➵"],[/\\ding\{246\}/g,"➶"],[/\\ding\{247\}/g,"➷"],[/\\ding\{248\}/g,"➸"],[/\\ding\{249\}/g,"➹"],[/\\ding\{250\}/g,"➺"],[/\\ding\{251\}/g,"➻"],[/\\ding\{252\}/g,"➼"],[/\\ding\{253\}/g,"➽"],[/\\ding\{254\}/g,"➾"],[/\\longleftarrow /g,"⟵"],[/\\longrightarrow /g,"⟶"],[/\\longleftrightarrow /g,"⟷"],[/\\Longleftarrow /g,"⟸"],[/\\Longrightarrow /g,"⟹"],[/\\Longleftrightarrow /g,"⟺"],[/\\longmapsto /g,"⟼"],[/\\sim\\joinrel\\leadsto/g,"⟿"],[/\\ElsevierGlyph\{E212\}/g,"⤅"],[/\\UpArrowBar /g,"⤒"],[/\\DownArrowBar /g,"⤓"],[/\\ElsevierGlyph\{E20C\}/g,"⤣"],[/\\ElsevierGlyph\{E20D\}/g,"⤤"],[/\\ElsevierGlyph\{E20B\}/g,"⤥"],[/\\ElsevierGlyph\{E20A\}/g,"⤦"],[/\\ElsevierGlyph\{E211\}/g,"⤧"],[/\\ElsevierGlyph\{E20E\}/g,"⤨"],[/\\ElsevierGlyph\{E20F\}/g,"⤩"],[/\\ElsevierGlyph\{E210\}/g,"⤪"],[/\\ElsevierGlyph\{E21C\}/g,"⤳"],[/\\ElsevierGlyph\{E21D\}/g,"⤳-00338"],[/\\ElsevierGlyph\{E21A\}/g,"⤶"],[/\\ElsevierGlyph\{E219\}/g,"⤷"],[/\\Elolarr /g,"⥀"],[/\\Elorarr /g,"⥁"],[/\\ElzRlarr /g,"⥂"],[/\\ElzrLarr /g,"⥄"],[/\\Elzrarrx /g,"⥇"],[/\\LeftRightVector /g,"⥎"],[/\\RightUpDownVector /g,"⥏"],[/\\DownLeftRightVector /g,"⥐"],[/\\LeftUpDownVector /g,"⥑"],[/\\LeftVectorBar /g,"⥒"],[/\\RightVectorBar /g,"⥓"],[/\\RightUpVectorBar /g,"⥔"],[/\\RightDownVectorBar /g,"⥕"],[/\\DownLeftVectorBar /g,"⥖"],[/\\DownRightVectorBar /g,"⥗"],[/\\LeftUpVectorBar /g,"⥘"],[/\\LeftDownVectorBar /g,"⥙"],[/\\LeftTeeVector /g,"⥚"],[/\\RightTeeVector /g,"⥛"],[/\\RightUpTeeVector /g,"⥜"],[/\\RightDownTeeVector /g,"⥝"],[/\\DownLeftTeeVector /g,"⥞"],[/\\DownRightTeeVector /g,"⥟"],[/\\LeftUpTeeVector /g,"⥠"],[/\\LeftDownTeeVector /g,"⥡"],[/\\UpEquilibrium /g,"⥮"],[/\\ReverseUpEquilibrium /g,"⥯"],[/\\RoundImplies /g,"⥰"],[/\\ElsevierGlyph\{E214\}/g,"⥼"],[/\\ElsevierGlyph\{E215\}/g,"⥽"],[/\\Elztfnc /g,"⦀"],[/\\ElsevierGlyph\{3018\}/g,"⦅"],[/\\Elroang /g,"⦆"],[/\\ElsevierGlyph\{E291\}/g,"⦔"],[/\\Elzddfnc /g,"⦙"],[/\\Angle /g,"⦜"],[/\\Elzlpargt /g,"⦠"],[/\\ElsevierGlyph\{E260\}/g,"⦵"],[/\\ElsevierGlyph\{E61B\}/g,"⦶"],[/\\ElzLap /g,"⧊"],[/\\Elzdefas /g,"⧋"],[/\\LeftTriangleBar /g,"⧏"],[/\\NotLeftTriangleBar /g,"⧏-00338"],[/\\RightTriangleBar /g,"⧐"],[/\\NotRightTriangleBar /g,"⧐-00338"],[/\\ElsevierGlyph\{E372\}/g,"⧜"],[/\\blacklozenge /g,"⧫"],[/\\RuleDelayed /g,"⧴"],[/\\Elxuplus /g,"⨄"],[/\\ElzThr /g,"⨅"],[/\\Elxsqcup /g,"⨆"],[/\\ElzInf /g,"⨇"],[/\\ElzSup /g,"⨈"],[/\\ElzCint /g,"⨍"],[/\\clockoint /g,"⨏"],[/\\ElsevierGlyph\{E395\}/g,"⨐"],[/\\sqrint /g,"⨖"],[/\\ElsevierGlyph\{E25A\}/g,"⨥"],[/\\ElsevierGlyph\{E25B\}/g,"⨪"],[/\\ElsevierGlyph\{E25C\}/g,"⨭"],[/\\ElsevierGlyph\{E25D\}/g,"⨮"],[/\\ElzTimes /g,"⨯"],[/\\ElsevierGlyph\{E25E\}/g,"⨴"],[/\\ElsevierGlyph\{E25E\}/g,"⨵"],[/\\ElsevierGlyph\{E259\}/g,"⨼"],[/\\amalg /g,"⨿"],[/\\ElzAnd /g,"⩓"],[/\\ElzOr /g,"⩔"],[/\\ElsevierGlyph\{E36E\}/g,"⩕"],[/\\ElOr /g,"⩖"],[/\\perspcorrespond /g,"⩞"],[/\\Elzminhat /g,"⩟"],[/\\ElsevierGlyph\{225A\}/g,"⩣"],[/\\stackrel\{*\}\{=\}/g,"⩮"],[/\\Equal /g,"⩵"],[/\\leqslant /g,"⩽"],[/\\nleqslant /g,"⩽-00338"],[/\\geqslant /g,"⩾"],[/\\ngeqslant /g,"⩾-00338"],[/\\lessapprox /g,"⪅"],[/\\gtrapprox /g,"⪆"],[/\\lneq /g,"⪇"],[/\\gneq /g,"⪈"],[/\\lnapprox /g,"⪉"],[/\\gnapprox /g,"⪊"],[/\\lesseqqgtr /g,"⪋"],[/\\gtreqqless /g,"⪌"],[/\\eqslantless /g,"⪕"],[/\\eqslantgtr /g,"⪖"],[/\\Pisymbol\{ppi020\}\{117\}/g,"⪝"],[/\\Pisymbol\{ppi020\}\{105\}/g,"⪞"],[/\\NestedLessLess /g,"⪡"],[/\\NotNestedLessLess /g,"⪡-00338"],[/\\NestedGreaterGreater /g,"⪢"],[/\\NotNestedGreaterGreater /g,"⪢-00338"],[/\\preceq /g,"⪯"],[/\\not\\preceq /g,"⪯-00338"],[/\\succeq /g,"⪰"],[/\\not\\succeq /g,"⪰-00338"],[/\\precneqq /g,"⪵"],[/\\succneqq /g,"⪶"],[/\\precapprox /g,"⪷"],[/\\succapprox /g,"⪸"],[/\\precnapprox /g,"⪹"],[/\\succnapprox /g,"⪺"],[/\\subseteqq /g,"⫅"],[/\\nsubseteqq /g,"⫅-00338"],[/\\supseteqq /g,"⫆"],[/\\nsupseteqq/g,"⫆-00338"],[/\\subsetneqq /g,"⫋"],[/\\supsetneqq /g,"⫌"],[/\\ElsevierGlyph\{E30D\}/g,"⫫"],[/\\Elztdcol /g,"⫶"],[/\\ElsevierGlyph\{300A\}/g,"《"],[/\\ElsevierGlyph\{300B\}/g,"》"],[/\\ElsevierGlyph\{3018\}/g,"〘"],[/\\ElsevierGlyph\{3019\}/g,"〙"],[/\\openbracketleft /g,"〚"],[/\\openbracketright /g,"〛"]],this}"undefined"!=typeof module&&module.exports&&(module.exports=BibtexParser); \ No newline at end of file diff --git a/static/scripts/libs/bootstrap-tour.js b/static/scripts/libs/bootstrap-tour.js index a87b4efb054..5f34403dd54 100644 --- a/static/scripts/libs/bootstrap-tour.js +++ b/static/scripts/libs/bootstrap-tour.js @@ -1 +1 @@ -!function(t,e){var o,n;n=e.document,o=function(){function o(o){var n;try{n=e.localStorage}catch(t){n=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:n,debug:!1,backdrop:!1,backdropContainer:"body",backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'',afterSetState:function(t,e){},afterGetState:function(t,e){},afterRemoveState:function(t){},onStart:function(t){},onEnd:function(t){},onShow:function(t){},onShown:function(t){},onHide:function(t){},onHidden:function(t){},onNext:function(t){},onPrev:function(t){},onPause:function(t,e){},onResume:function(t,e){},onRedirectError:function(t){}},o),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return o.prototype.addSteps=function(t){var e,o,n;for(o=0,n=t.length;o

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e])},o.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},o.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},o.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},o.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},o.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},o.prototype.end=function(){var o,r;return o=function(o){return function(r){if(t(n).off("click.tour-"+o._options.name),t(n).off("keyup.tour-"+o._options.name),t(e).off("resize.tour-"+o._options.name),o._setState("end","yes"),o._inited=!1,o._force=!1,o._clearTimer(),null!=o._options.onEnd)return o._options.onEnd(o)}}(this),r=this.hideStep(this._current),this._callOnPromiseDone(r,o)},o.prototype.ended=function(){return!this._force&&!!this._getState("end")},o.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},o.prototype.pause=function(){var t;return(t=this.getStep(this._current))&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},o.prototype.resume=function(){var t;return(t=this.getStep(this._current))&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},o.prototype.hideStep=function(e){var o,n,r;if(r=this.getStep(e))return this._clearTimer(),n=this._makePromise(null!=r.onHide?r.onHide(this,e):void 0),o=function(o){return function(n){var i;if(i=t(r.element),i.data("bs.popover")||i.data("popover")||(i=t("body")),i.popover("destroy").removeClass("tour-"+o._options.name+"-element tour-"+o._options.name+"-"+e+"-element"),i.removeData("bs.popover"),r.reflex&&t(r.reflexElement).removeClass("tour-step-element-reflex").off(o._reflexEvent(r.reflex)+".tour-"+o._options.name),r.backdrop&&o._hideBackdrop(),null!=r.onHidden)return r.onHidden(o)}}(this),this._callOnPromiseDone(n,o),n},o.prototype.showStep=function(t){var o,r,i,s;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(s=this.getStep(t))?(i=t").parent().html()},o.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},o.prototype._reposition=function(e,o){var r,i,s,a,p,u,h;if(a=e[0].offsetWidth,i=e[0].offsetHeight,h=e.offset(),p=h.left,u=h.top,r=t(n).outerHeight()-h.top-e.outerHeight(),r<0&&(h.top=h.top+r),s=t("html").outerWidth()-h.left-e.outerWidth(),s<0&&(h.left=h.left+s),h.top<0&&(h.top=0),h.left<0&&(h.left=0),e.offset(h),"bottom"===o.placement||"top"===o.placement){if(p!==h.left)return this._replaceArrow(e,2*(h.left-p),a,"left")}else if(u!==h.top)return this._replaceArrow(e,2*(h.top-u),i,"top")},o.prototype._center=function(o){return o.css("top",t(e).outerHeight()/2-o.outerHeight()/2)},o.prototype._replaceArrow=function(t,e,o,n){return t.find(".arrow").css(n,e?50*(1-e/o)+"%":"")},o.prototype._scrollIntoView=function(o,n){var r,i,s,a,p,u;return r=t(o),r.length?(i=t(e),a=r.offset().top,u=i.height(),p=Math.max(0,a-u/2),this._debug("Scroll into view. ScrollTop: "+p+". Element offset: "+a+". Window height: "+u+"."),s=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(p)},function(t){return function(){if(2==++s)return n(),t._debug("Scroll into view.\nAnimation end element offset: "+r.offset().top+".\nWindow height: "+i.height()+".")}}(this))):n()},o.prototype._onResize=function(o,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(o,100)})},o.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(o){var n;return o.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},o.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this))},o.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},o.prototype._callOnPromiseDone=function(t,e,o){return t?t.then(function(t){return function(n){return e.call(t,o)}}(this)):e.call(this,o)},o.prototype._showBackdrop=function(e){if(!this.backdrop.backgroundShown)return this.backdrop=t("
",{class:"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop)},o.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},o.prototype._hideBackground=function(){if(this.backdrop)return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},o.prototype._showOverlayElement=function(e,o){var n,r;if((n=t(e.element))&&0!==n.length&&(!this.backdrop.overlayElementShown||o))return this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{class:"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),r={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(r=this._applyBackdropPadding(e.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset)},o.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1},o.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},o.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},o.prototype._getProtocol=function(t){return t=t.split("://"),t.length>1?t[0]:"http"},o.prototype._getHost=function(t){return t=t.split("//"),t=t.length>1?t[1]:t[0],t.split("/")[0]},o.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},o.prototype._getQuery=function(t){return this._getParams(t,"?")},o.prototype._getHash=function(t){return this._getParams(t,"#")},o.prototype._getParams=function(t,e){var o,n,r,i,s;if(n=t.split(e),1===n.length)return{};for(n=n[1].split("&"),r={},i=0,s=n.length;i

',afterSetState:function(t,e){},afterGetState:function(t,e){},afterRemoveState:function(t){},onStart:function(t){},onEnd:function(t){},onShow:function(t){},onShown:function(t){},onHide:function(t){},onHidden:function(t){},onNext:function(t){},onPrev:function(t){},onPause:function(t,e){},onResume:function(t,e){},onRedirectError:function(t){}},o),this._force=!1,this._inited=!1,this._current=null,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return o.prototype.addSteps=function(t){var e,o,n;for(o=0,n=t.length;o

",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropContainer:this._options.backdropContainer,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,reflexElement:this._options.steps[e].element,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume,onRedirectError:this._options.onRedirectError},this._options.steps[e])},o.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},o.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},o.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},o.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},o.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},o.prototype.end=function(){var o,r;return o=function(o){return function(r){if(t(n).off("click.tour-"+o._options.name),t(n).off("keyup.tour-"+o._options.name),t(e).off("resize.tour-"+o._options.name),o._setState("end","yes"),o._inited=!1,o._force=!1,o._clearTimer(),null!=o._options.onEnd)return o._options.onEnd(o)}}(this),r=this.hideStep(this._current),this._callOnPromiseDone(r,o)},o.prototype.ended=function(){return!this._force&&!!this._getState("end")},o.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this._removeState("redirect_to"),this.start()},o.prototype.pause=function(){var t;return(t=this.getStep(this._current))&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},o.prototype.resume=function(){var t;return(t=this.getStep(this._current))&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},o.prototype.hideStep=function(e){var o,n,r;if(r=this.getStep(e))return this._clearTimer(),n=this._makePromise(null!=r.onHide?r.onHide(this,e):void 0),o=function(o){return function(n){var i;if((i=t(r.element)).data("bs.popover")||i.data("popover")||(i=t("body")),i.popover("destroy").removeClass("tour-"+o._options.name+"-element tour-"+o._options.name+"-"+e+"-element"),i.removeData("bs.popover"),r.reflex&&t(r.reflexElement).removeClass("tour-step-element-reflex").off(o._reflexEvent(r.reflex)+".tour-"+o._options.name),r.backdrop&&o._hideBackdrop(),null!=r.onHidden)return r.onHidden(o)}}(this),this._callOnPromiseDone(n,o),n},o.prototype.showStep=function(t){var o,r,i,s;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(s=this.getStep(t))?(i=t").parent().html()},o.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},o.prototype._reposition=function(e,o){var r,i,s,a,p,u,h;if(a=e[0].offsetWidth,i=e[0].offsetHeight,h=e.offset(),p=h.left,u=h.top,(r=t(n).outerHeight()-h.top-e.outerHeight())<0&&(h.top=h.top+r),(s=t("html").outerWidth()-h.left-e.outerWidth())<0&&(h.left=h.left+s),h.top<0&&(h.top=0),h.left<0&&(h.left=0),e.offset(h),"bottom"===o.placement||"top"===o.placement){if(p!==h.left)return this._replaceArrow(e,2*(h.left-p),a,"left")}else if(u!==h.top)return this._replaceArrow(e,2*(h.top-u),i,"top")},o.prototype._center=function(o){return o.css("top",t(e).outerHeight()/2-o.outerHeight()/2)},o.prototype._replaceArrow=function(t,e,o,n){return t.find(".arrow").css(n,e?50*(1-e/o)+"%":"")},o.prototype._scrollIntoView=function(o,n){var r,i,s,a,p,u;return(r=t(o)).length?(i=t(e),a=r.offset().top,u=i.height(),p=Math.max(0,a-u/2),this._debug("Scroll into view. ScrollTop: "+p+". Element offset: "+a+". Window height: "+u+"."),s=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(p)},function(t){return function(){if(2==++s)return n(),t._debug("Scroll into view.\nAnimation end element offset: "+r.offset().top+".\nWindow height: "+i.height()+".")}}(this))):n()},o.prototype._onResize=function(o,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(o,100)})},o.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(o){var n;return o.preventDefault(),(n=t(this)).text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},o.prototype._initKeyboardNavigation=function(){if(this._options.keyboard)return t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this))},o.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},o.prototype._callOnPromiseDone=function(t,e,o){return t?t.then(function(t){return function(n){return e.call(t,o)}}(this)):e.call(this,o)},o.prototype._showBackdrop=function(e){if(!this.backdrop.backgroundShown)return this.backdrop=t("
",{class:"tour-backdrop"}),this.backdrop.backgroundShown=!0,t(e.backdropContainer).append(this.backdrop)},o.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},o.prototype._hideBackground=function(){if(this.backdrop)return this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1},o.prototype._showOverlayElement=function(e,o){var n,r;if((n=t(e.element))&&0!==n.length&&(!this.backdrop.overlayElementShown||o))return this.backdrop.overlayElementShown||(this.backdrop.$element=n.addClass("tour-step-backdrop"),this.backdrop.$background=t("
",{class:"tour-step-background"}),this.backdrop.$background.appendTo(e.backdropContainer),this.backdrop.overlayElementShown=!0),r={width:n.innerWidth(),height:n.innerHeight(),offset:n.offset()},e.backdropPadding&&(r=this._applyBackdropPadding(e.backdropPadding,r)),this.backdrop.$background.width(r.width).height(r.height).offset(r.offset)},o.prototype._hideOverlayElement=function(){if(this.backdrop.overlayElementShown)return this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1},o.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},o.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},o.prototype._getProtocol=function(t){return(t=t.split("://")).length>1?t[0]:"http"},o.prototype._getHost=function(t){return t=t.split("//"),(t=t.length>1?t[1]:t[0]).split("/")[0]},o.prototype._getPath=function(t){return t.replace(/\/?$/,"").split("?")[0].split("#")[0]},o.prototype._getQuery=function(t){return this._getParams(t,"?")},o.prototype._getHash=function(t){return this._getParams(t,"#")},o.prototype._getParams=function(t,e){var o,n,r,i,s;if(1===(n=t.split(e)).length)return{};for(r={},i=0,s=(n=n[1].split("&")).length;i .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}var s=o.find("> .active"),r=i&&t.support.transition&&s.hasClass("fade");r?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),s.removeClass("in")};var o=t.fn.tab;t.fn.tab=function(o){return this.each(function(){var i=t(this),n=i.data("bs.tab");n||i.data("bs.tab",n=new e(this)),"string"==typeof o&&n[o]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=o,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:"body"},e.prototype.init=function(e,o,i){this.enabled=!0,this.type=e,this.$element=t(o),this.options=this.getOptions(i);for(var n=this.options.trigger.split(" "),s=n.length;s--;){var r=n[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focus",p="hover"==r?"mouseleave":"blur";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(p+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},o=this.getDefaults();return this._options&&t.each(this._options,function(t,i){o[t]!=i&&(e[t]=i)}),e},e.prototype.enter=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(o.timeout),o.hoverState="in",!o.options.delay||!o.options.delay.show)return o.show();o.timeout=setTimeout(function(){"in"==o.hoverState&&o.show()},o.options.delay.show)},e.prototype.leave=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(o.timeout),o.hoverState="out",!o.options.delay||!o.options.delay.hide)return o.hide();o.timeout=setTimeout(function(){"out"==o.hoverState&&o.hide()},o.options.delay.hide)},e.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;var o=this.tip();this.setContent(),this.options.animation&&o.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,s=n.test(i);s&&(i=i.replace(n,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var r=this.getPosition(),a=o[0].offsetWidth,p=o[0].offsetHeight;if(s){var l=this.$element.parent(),h=i,d=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:l.outerWidth(),c="body"==this.options.container?window.innerHeight:l.outerHeight(),u="body"==this.options.container?0:l.offset().left;i="bottom"==i&&r.top+r.height+p-d>c?"top":"top"==i&&r.top-d-p<0?"bottom":"right"==i&&r.right+a>f?"left":"left"==i&&r.left-a').insertAfter(t(this)).on("click",e),s.trigger(i=t.Event("show.bs.dropdown")),i.isDefaultPrevented())return;s.toggleClass("open").trigger("shown.bs.dropdown"),n.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var s=o(i),r=s.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&s.find(n).focus(),i.click();var a=t("[role=menu] li:not(.divider):visible a",s);if(a.length){var p=a.index(a.filter(":focus"));38==e.keyCode&&p>0&&p--,40==e.keyCode&&p

'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](o),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var o=t.fn.popover;t.fn.popover=function(o){return this.each(function(){var i=t(this),n=i.data("bs.popover"),s="object"==typeof o&&o;n||i.data("bs.popover",n=new e(this,s)),"string"==typeof o&&n[o]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery); \ No newline at end of file ++function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var o in e)if(void 0!==t.style[o])return{end:e[o]}}t.fn.emulateTransitionEnd=function(e){var o=!1,i=this;t(this).one(t.support.transition.end,function(){o=!0});return setTimeout(function(){o||t(i).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=e()})}(window.jQuery),function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype.show=function(){var e=this.element,o=e.closest("ul:not(.dropdown-menu)"),i=e.attr("data-target");if(i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=o.find(".active:last a")[0],s=t.Event("show.bs.tab",{relatedTarget:n});if(e.trigger(s),!s.isDefaultPrevented()){var r=t(i);this.activate(e.parent("li"),o),this.activate(r,r.parent(),function(){e.trigger({type:"shown.bs.tab",relatedTarget:n})})}}},e.prototype.activate=function(e,o,i){function n(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}var s=o.find("> .active"),r=i&&t.support.transition&&s.hasClass("fade");r?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),s.removeClass("in")};var o=t.fn.tab;t.fn.tab=function(o){return this.each(function(){var i=t(this),n=i.data("bs.tab");n||i.data("bs.tab",n=new e(this)),"string"==typeof o&&n[o]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=o,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:"body"},e.prototype.init=function(e,o,i){this.enabled=!0,this.type=e,this.$element=t(o),this.options=this.getOptions(i);for(var n=this.options.trigger.split(" "),s=n.length;s--;){var r=n[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focus",p="hover"==r?"mouseleave":"blur";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(p+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},o=this.getDefaults();return this._options&&t.each(this._options,function(t,i){o[t]!=i&&(e[t]=i)}),e},e.prototype.enter=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(o.timeout),o.hoverState="in",!o.options.delay||!o.options.delay.show)return o.show();o.timeout=setTimeout(function(){"in"==o.hoverState&&o.show()},o.options.delay.show)},e.prototype.leave=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(o.timeout),o.hoverState="out",!o.options.delay||!o.options.delay.hide)return o.hide();o.timeout=setTimeout(function(){"out"==o.hoverState&&o.hide()},o.options.delay.hide)},e.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;var o=this.tip();this.setContent(),this.options.animation&&o.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,s=n.test(i);s&&(i=i.replace(n,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var r=this.getPosition(),a=o[0].offsetWidth,p=o[0].offsetHeight;if(s){var l=this.$element.parent(),h=i,d=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:l.outerWidth(),c="body"==this.options.container?window.innerHeight:l.outerHeight(),u="body"==this.options.container?0:l.offset().left;i="bottom"==i&&r.top+r.height+p-d>c?"top":"top"==i&&r.top-d-p<0?"bottom":"right"==i&&r.right+a>f?"left":"left"==i&&r.left-a').insertAfter(t(this)).on("click",e),s.trigger(i=t.Event("show.bs.dropdown")),i.isDefaultPrevented())return;s.toggleClass("open").trigger("shown.bs.dropdown"),n.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var s=o(i),r=s.hasClass("open");if(!r||r&&27==e.keyCode)return 27==e.which&&s.find(n).focus(),i.click();var a=t("[role=menu] li:not(.divider):visible a",s);if(a.length){var p=a.index(a.filter(":focus"));38==e.keyCode&&p>0&&p--,40==e.keyCode&&p

'}),(e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype)).constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](o),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var o=t.fn.popover;t.fn.popover=function(o){return this.each(function(){var i=t(this),n=i.data("bs.popover"),s="object"==typeof o&&o;n||i.data("bs.popover",n=new e(this,s)),"string"==typeof o&&n[o]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/d3.js b/static/scripts/libs/d3.js index 26b17263206..1e743f9f973 100644 --- a/static/scripts/libs/d3.js +++ b/static/scripts/libs/d3.js @@ -1,5 +1 @@ -!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return nt?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===Mo||n[0]===xo?xo+n:n}function s(n){return(n+="")[0]===xo?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=bo.length;e=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var c=Lo.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++To,i="click"+r,u=ao.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==qo&&(qo=!("onselectstart"in e)&&x(e.style,"userSelect")),qo){var o=n(e).style,a=o[qo];o[qo]="none"}return function(n){if(u.on(r,null),qo&&(o[qo]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ro<0){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Ro=!(o.f||o.e),r.remove()}}return Ro?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:n<0?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:n<-1?Uo:Math.acos(n)}function tn(n){return n>1?Ho:n<-1?-Ho:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?u+(o-u)*n/60:n<180?o:n<240?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Oo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*Jo,r=vn(r)*Go,u=vn(u)*Ko,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Io,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ta.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t0&&l<1?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Jo),i=dn((.2126729*n+.7151522*t+.072175*e)/Go);return hn(116*i-16,500*(r-i),200*(i-dn((.0193339*n+.119192*t+.9503041*e)/Ko)))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&t<300||304===t){try{n=e.call(u,l)}catch(n){return void o.error.call(u,n)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return ra?ra.n=u:ea=u,ra=u,ia||(ua=clearTimeout(ua),ia=1,oa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ua),ua=setTimeout(Tn,t)),ia=0):(ia=1,oa(Tn))}function Rn(){for(var n=Date.now(),t=ea;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=ea,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=la.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=ca.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===a?"":a;if(g<0){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(".");if(_<0){var w=m?n.lastIndexOf("e"):-1;w<0?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=S"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e1)for(;o=c)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=C[o in pa?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{sa=Hn;var t=new sa;return t._=n,r(t)}finally{sa=Date}}var r=t(n);return e.parse=function(n){try{sa=Hn;var t=r.parse(n);return t&&t._}finally{sa=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+fa.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(fa.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(fa.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3)}function nt(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ga.lastIndex=0;var r=ga.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=mo(t)/60|0,i=mo(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){va.lastIndex=0;var r=va.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ba.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;_a.point=function(o,a){_a.point=n,r=(t=o)*Oo,i=Math.cos(a=(e=a)*Oo/2+Uo/4),u=Math.sin(a)},_a.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return mo(n[0]-t[0])=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Ho-Do:Ho-n[1])-((t=t.x)[0]<0?t[1]-Ho-Do:Ho-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Uo:-Uo,l=mo(u-e);mo(l-Uo)0?Ho:-Ho),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Uo&&(mo(e-i)Do?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Ho,r.point(-Uo,i),r.point(0,i),r.point(Uo,i),r.point(Uo,0),r.point(Uo,-i),r.point(0,-i),r.point(-Uo,-i),r.point(-Uo,0),r.point(-Uo,i);else if(mo(n[0]-t[0])>Do){var u=n[0]=0?1:-1,w=_*b,S=w>Uo,k=g*M;if(ba.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*jo:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(u<-Do||uu}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(s<0?Uo:-Uo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Do,g[1]+=Do,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s);Mt(g,xt(a,h));var v=p,d=yt(g,v),y=yt(v,v),m=d*d-y*(yt(g,g)-1);if(!(m<0)){var M=Math.sqrt(m),x=xt(v,(-d-M)/y);if(Mt(x,g),x=_t(x),!e)return x;var b,_=n[0],w=t[0],S=n[1],k=t[1];w<_&&(b=_,_=w,w=b);var N=w-_,E=mo(N-Uo)0^x[1]<(mo(x[0]-_)Uo^(_<=x[0]&&x[0]<=w)){var C=xt(v,(-d+M)/y);return Mt(C,g),[x,_t(C)]}}}function i(t,e){var r=o?n:Uo-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=mo(u)>Do;return Rt(t,e,ve(n,6*Oo),o?[0,-n]:[-Uo,n-Uo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,g<0){if(u0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(u<0)){if(u/=g,g<0){if(u>p)return;u>h&&(h=u)}else if(g>0){if(u0)){if(u/=v,v<0){if(u0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(u<0)){if(u/=v,v<0){if(u>p)return;u>h&&(h=u)}else if(v>0){if(u0&&(i.a={x:l+h*g,y:c+h*v}),p<1&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return mo(r[0]-n)0?0:3:mo(r[0]-e)0?2:1:mo(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;ir&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0)do{c.point(0===f||3===f?n:e,f>1?r:t)}while((f=(f+l+4)%4)!==s);else c.point(a[0],a[1])}function f(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Pa,Math.min(Pa,n)),t=Math.max(-Pa,Math.min(Pa,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Uo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Uo/180,e=n[1]*Uo/180):[t/Uo*180,e/Uo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){ja+=i*n-r*t,r=n,i=t}var t,e,r,i;Ya.point=function(u,o){Ya.point=n,t=r=u,e=i=o},Ya.lineEnd=function(){n(t,e)}}function Bt(n,t){nOa&&(Oa=n),tIa&&(Ia=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){ka+=n,Na+=t,++Ea}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);Aa+=o*(t+n)/2,Ca+=o*(e+r)/2,za+=o,Gt(t=n,e=r)}var t,e;Va.point=function(r,i){Va.point=n,Gt(t=r,e=i)}}function Qt(){Va.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);Aa+=o*(r+n)/2,Ca+=o*(i+t)/2,za+=o,o=i*n-r*t,La+=o*(r+n),qa+=o*(i+t),Ta+=3*o,Gt(r=n,i=t)}var t,e,r,i;Va.point=function(u,o){Va.point=n,Gt(t=r=u,e=i=o)},Va.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,jo)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){r(), -S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=mo(mo(w)-1)u||mo((m*z+M*L)/x-.5)>.3||a*p+l*g+c*v0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Io,e*Io])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Oo,n[1]*Oo),[n[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*Io,n[1]*Io]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Da,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Da):It((w=+n)*Oo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Oo,d=n[1]%360*Oo,r()):[v*Io,d*Io]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Oo,M=n[1]%360*Oo,x=n.length>2?n[2]%360*Oo:0,r()):[y*Io,M*Io,x*Io]},ao.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Oo,e*Oo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Uo?n-jo:n<-Uo?n+jo:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Uo?t-jo:t<-Uo?t+jo:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?iu)&&(i+=o*jo)):(i=n+o*jo,u=n-.5*l);for(var c,f=i;o>0?f>u:f0?t<-Ho+Do&&(t=-Ho+Do):t>Ho-Do&&(t=Ho-Do);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Uo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Ho]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return mo(i)1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=ul.pop()||new Pe;return t.site=n,t}function je(n){Be(n),el.remove(n),ul.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&mo(e-l.circle.x)Do)a=a.L;else{if(!((i=u-Ie(a,o))>Do)){r>-Do?(t=a.P,e=a):i>-Do?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(el.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),el.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=tl,d=v.length;d--;)if((u=v[d])&&u.prepare())for(a=u.edges,l=a.length,o=0;oDo||mo(i-e)>Do)&&(a.splice(o,0,new tr(Qe(u.site,f,mo(r-s)Do?{x:s,y:mo(t-s)Do?{x:mo(e-g)Do?{x:h,y:mo(t-h)Do?{x:mo(e-p)=-Po)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=ol.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=il._;M;)if(y.y=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||h=x,w=e>=b,S=w<<1|_,k=S+4;Su&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=cl.lastIndex;return u=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Ho)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/jo*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*jo/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:yr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:yr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oi&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-1/0,h=1/0,p=-1/0;if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;o=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),u<0&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return t2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=la.exec(e);if(i.shift(),"s"===i[8]){var u=ao.formatPrefix(Math.max(mo(r[0]),mo(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=ao.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in bl?Math.abs(e-tu(Math.max(mo(t[0]),mo(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:wl);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;c0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return _l;arguments.length<2?e=_l:"function"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return o*t0?a[e-1]:n[0],e0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(y<0?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i0;)p[--a].call(n,o);if(u>=1)return v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function to(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Bl,i);return u==Bl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Bl[u-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:"3.5.17"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(n){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var so=this.Element.prototype,ho=so.setAttribute,po=so.setAttributeNS,go=this.CSSStyleDeclaration.prototype,vo=go.setProperty;so.setAttribute=function(n,t){ho.call(this,n,t+"")},so.setAttributeNS=function(n,t,e){po.call(this,n,t,e+"")},go.setProperty=function(n,t,e){vo.call(this,n,t+"",e)}}ao.ascending=e,ao.descending=function(n,t){return tn?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),i=r){e=i=r;break}for(;++ur&&(e=r),i1)return l/(f-1)},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var yo=u(e);ao.bisectLeft=yo.left,ao.bisect=ao.bisectRight=yo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var mo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=a(mo(e)),o=-1;if(n*=u,t*=u,e*=u,e<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;e=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(_o,"\\$&")};var _o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,wo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},So=function(n,t){return t.querySelector(n)},ko=function(n,t){return t.querySelectorAll(n)},No=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(No=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(So=function(n,t){return Sizzle(n,t)[0]||null},ko=Sizzle,No=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Eo=ao.selection.prototype=[];Eo.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Co.hasOwnProperty(e)?{space:Co[e],local:n}:n}},Eo.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Eo.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Eo.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);jl.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;i1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);jl.call(g);for(var a=0,l=o.length;a=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ca=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),fa=ao.time={},sa=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ha.setUTCDate.apply(this._,arguments)},setDay:function(){ha.setUTCDay.apply(this._,arguments)},setFullYear:function(){ha.setUTCFullYear.apply(this._,arguments)},setHours:function(){ha.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ha.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ha.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ha.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ha.setUTCSeconds.apply(this._,arguments)},setTime:function(){ha.setTime.apply(this._,arguments)}};var ha=Date.prototype;fa.year=On(function(n){return n=fa.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fa.years=fa.year.range,fa.years.utc=fa.year.utc.range,fa.day=On(function(n){var t=new sa(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fa.days=fa.day.range,fa.days.utc=fa.day.utc.range,fa.dayOfYear=function(n){var t=fa.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fa[n]=On(function(n){return(n=fa.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fa.year(n).getDay();return Math.floor((fa.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fa[n+"s"]=e.range,fa[n+"s"].utc=e.utc.range,fa[n+"OfYear"]=function(n){var e=fa.year(n).getDay();return Math.floor((fa.dayOfYear(n)+(e+t)%7)/7)}}),fa.week=fa.sunday,fa.weeks=fa.sunday.range,fa.weeks.utc=fa.sunday.utc.range,fa.weekOfYear=fa.sundayOfYear;var pa={"-":"",_:" ",0:"0"},ga=/^\s*\d+/,va=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var da=ao.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y", -time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ao.format=da.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ya),st(ya.s,this.s,this),this.s?this.t+=ya.t:this.s=ya.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ya=new ft;ao.geo.stream=function(n,t){n&&ma.hasOwnProperty(n.type)?ma[n.type](n,t):ht(n,t)};var ma={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rp&&(p=t)}function t(t,e){var r=dt([t*Oo,e*Oo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Io*c,d=mo(l)>180;if(d^(c*gp&&(p=m)}else if(v=(v+360)%360-180,d^(c*gp&&(p=e);d?ta(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(th&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=mo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;_a.point(n,e),t(n,e)}function u(){_a.lineStart()}function o(){i(v,d),_a.lineEnd(),mo(m)>Do&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nDo?p=90:m<-Do&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];ra(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-1/0,t=u.length-1,r=0,i=u[t];r<=t;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){wa=Sa=ka=Na=Ea=Aa=Ca=za=La=qa=Ta=0,ao.geo.stream(n,Ra);var t=La,e=qa,r=Ta,i=t*t+e*e+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?o:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Do,s+.12*c+Do],[f-.214*c-Do,s+.234*c-Do]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Do,s+.166*c+Do],[f-.115*c-Do,s+.234*c-Do]]).stream(l).point,n},n.scale(1070)};var Ua,ja,Fa,Ha,Oa,Ia,Ya={point:b,lineStart:b,lineEnd:b,polygonStart:function(){ja=0,Ya.lineStart=$t},polygonEnd:function(){Ya.lineStart=Ya.lineEnd=Ya.point=b,Ua+=mo(ja/2)}},Za={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Va={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Va.lineStart=ne},polygonEnd:function(){Va.point=Gt,Va.lineStart=Kt,Va.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Ua=0,ao.geo.stream(n,i(Ya)),Ua},n.centroid=function(n){return ka=Na=Ea=Aa=Ca=za=La=qa=Ta=0,ao.geo.stream(n,i(Va)),Ta?[La/Ta,qa/Ta]:za?[Aa/za,Ca/za]:Ea?[ka/Ea,Na/Ea]:[NaN,NaN]},n.bounds=function(n){return Oa=Ia=-(Fa=Ha=1/0),ao.geo.stream(n,i(Za)),[[Fa,Ha],[Oa,Ia]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Oo,t[1]*Oo),t[0]*=Io,t[1]*=Io,t}return n=se(n[0]%360*Oo,n[1]*Oo,n.length>2?n[2]*Oo:0),t.invert=function(t){return t=n.invert(t[0]*Oo,t[1]*Oo),t[0]*=Io,t[1]*=Io,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Oo,-n[1]*Oo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Io,n[1]*=Io}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Oo,i*Oo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Oo,(i=+r)*Oo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Oo,i=n[1]*Oo,u=t[1]*Oo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return mo(n%d)>Do}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return mo(n%y)>Do}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Do],[180,90-Do]]).minorExtent([[-180,-80-Do],[180,80+Do]])},ao.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Oo,n[1]*Oo,t[0]*Oo,t[1]*Oo)},ao.geo.length=function(n){return Xa=0,ao.geo.stream(n,$a),Xa};var Xa,$a={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ba=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ba)}).raw=Ba;var Wa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Wa)}).raw=Wa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var Ja=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(Ja)}).raw=Ja,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ho]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var Ga=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(Ga)}).raw=Ga;var Ka=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(Ka)}).raw=Ka,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ho]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;t=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[]).point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Do)*Do,y:Math.round(o(n,t)/Do)*Do,i:t}})}var r=Ce,i=ze,u=r,o=i,a=al;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u=e.site,o=e.edges.sort(Ve),a=-1,l=o.length,c=o[l-1].edge,f=c.l===u?c.r:c.l;++a=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;py&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;py&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=sl.get(e)||fl,r=hl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,"g");return(ao.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:pl)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;l=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++ca&&(a=r),o.push(r)}for(e=0;e0)for(u=-1;++u=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;o0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){ -for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oi&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++u1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;es?0:1;if(c=Fo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===Al?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Uo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Uo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Do&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=nUo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Tl.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Tl=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Dl)),e=t*Dl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Rl),e=t*Rl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Rl),e=t*Rl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ao.svg.symbolTypes=Tl.keys();var Rl=Math.sqrt(3),Dl=Math.tan(30*Oo);Eo.transition=function(n){for(var t,e,r=Pl||++Hl,i=Ku(n),u=[],o=Ul||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++arect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===Ku||n[0]===Qu?Qu+n:n}function s(n){return(n+="")[0]===Qu?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=no.length;e=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,u));var a=fo.get(n);return a&&(n=a,o=B),u?t?function(){var u=o(t,Yu(arguments));r.call(this),this.addEventListener(n,this[i]=u,u.$=e),u._=t}:r:t?b:function(){var t,e=new RegExp("^__on([^.]+)"+Ou.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}function $(n,t){return function(e){var r=Ou.event;Ou.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Ou.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++ho,i="click"+r,u=Ou.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==so&&(so=!("onselectstart"in e)&&x(e.style,"userSelect")),so){var o=n(e).style,a=o[so];o[so]="none"}return function(n){if(u.on(r,null),so&&(o[so]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(po<0){var u=t(n);if(u.scrollX||u.scrollY){var o=(r=Ou.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();po=!(o.f||o.e),r.remove()}}return po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return Ou.event.changedTouches[0].identifier}function K(n){return n>0?1:n<0?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:n<-1?yo:Math.acos(n)}function tn(n){return n>1?xo:n<-1?-xo:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?u+(o-u)*n/60:n<180?o:n<240?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=Ou.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=bo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*zo,r=vn(r)*Lo,u=vn(u)*qo,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*_o,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=Do.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t0&&l<1?0:r),new ln(r,i,l)}function Sn(n,t,e){var r=dn((.4124564*(n=kn(n))+.3575761*(t=kn(t))+.1804375*(e=kn(e)))/zo),i=dn((.2126729*n+.7151522*t+.072175*e)/Lo);return hn(116*i-16,500*(r-i),200*(i-dn((.0193339*n+.119192*t+.9503041*e)/qo)))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&t<300||304===t){try{n=e.call(u,l)}catch(n){return void o.error.call(u,n)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=Ou.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=Ou.event;Ou.event=n;try{o.progress.call(u,l)}finally{Ou.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(Yu(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},Ou.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i={c:n,t:e+t,n:null};return Uo?Uo.n=i:Po=i,Uo=i,jo||(Fo=clearTimeout(Fo),jo=1,Ho(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(Fo),Fo=setTimeout(Tn,t)),jo=0):(jo=1,Ho(Tn))}function Rn(){for(var n=Date.now(),t=Po;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=Po,e=1/0;t;)t.c?(t.t0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=Io.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=Yo.get(p)||jn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===a?"":a;if(g<0){var l=Ou.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;var x,b,_=(n=p(n,h)).lastIndexOf(".");if(_<0){var w=m?n.lastIndexOf("e"):-1;w<0?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=S"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function jn(n){return n+""}function Fn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Hn(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e1)for(;o=c)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=b[o in $o?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}var r=n.dateTime,i=n.date,u=n.time,o=n.periods,a=n.days,l=n.shortDays,c=n.months,f=n.shortMonths;t.utc=function(n){function e(n){try{var t=new(Vo=Fn);return t._=n,r(t)}finally{Vo=Date}}var r=t(n);return e.parse=function(n){try{Vo=Fn;var t=r.parse(n);return t&&t._}finally{Vo=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=lt;var s=Ou.map(),h=Zn(a),p=Vn(a),g=Zn(l),v=Vn(l),d=Zn(c),y=Vn(c),m=Zn(f),M=Vn(f);o.forEach(function(n,t){s.set(n.toLowerCase(),t)});var x={a:function(n){return l[n.getDay()]},A:function(n){return a[n.getDay()]},b:function(n){return f[n.getMonth()]},B:function(n){return c[n.getMonth()]},c:t(r),d:function(n,t){return Yn(n.getDate(),t,2)},e:function(n,t){return Yn(n.getDate(),t,2)},H:function(n,t){return Yn(n.getHours(),t,2)},I:function(n,t){return Yn(n.getHours()%12||12,t,2)},j:function(n,t){return Yn(1+Zo.dayOfYear(n),t,3)},L:function(n,t){return Yn(n.getMilliseconds(),t,3)},m:function(n,t){return Yn(n.getMonth()+1,t,2)},M:function(n,t){return Yn(n.getMinutes(),t,2)},p:function(n){return o[+(n.getHours()>=12)]},S:function(n,t){return Yn(n.getSeconds(),t,2)},U:function(n,t){return Yn(Zo.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Yn(Zo.mondayOfYear(n),t,2)},x:t(i),X:t(u),y:function(n,t){return Yn(n.getFullYear()%100,t,2)},Y:function(n,t){return Yn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},b={a:function(n,t,e){g.lastIndex=0;var r=g.exec(t.slice(e));return r?(n.w=v.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(n,t,e){h.lastIndex=0;var r=h.exec(t.slice(e));return r?(n.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(n,t,e){m.lastIndex=0;var r=m.exec(t.slice(e));return r?(n.m=M.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(n,t,e){d.lastIndex=0;var r=d.exec(t.slice(e));return r?(n.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(n,t,r){return e(n,x.c.toString(),t,r)},d:nt,e:nt,H:et,I:et,j:tt,L:ut,m:Qn,M:rt,p:function(n,t,e){var r=s.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)},S:it,U:$n,w:Xn,W:Bn,x:function(n,t,r){return e(n,x.x.toString(),t,r)},X:function(n,t,r){return e(n,x.X.toString(),t,r)},y:Jn,Y:Wn,Z:Gn,"%":at};return t}function Yn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3)}function Qn(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function nt(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function tt(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function et(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function rt(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ut(n,t,e){Bo.lastIndex=0;var r=Bo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Gu(t)/60|0,i=Gu(t)%60;return e+Yn(r,"0",2)+Yn(i,"0",2)}function at(n,t,e){Wo.lastIndex=0;var r=Wo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function lt(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ta.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;ea.point=function(o,a){ea.point=n,r=(t=o)*bo,i=Math.cos(a=(e=a)*bo/2+yo/4),u=Math.sin(a)},ea.lineEnd=function(){n(t,e)}}function vt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function dt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function bt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function _t(n,t){return Gu(n[0]-t[0])=0;--a)i.point((s=f[a])[0],s[1]);else r(p.x,p.p.x,-1,i);p=p.p}f=(p=p.o).z,g=!g}while(!p.v);i.lineEnd()}}}function Lt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Rt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=Ou.merge(p);var n=jt(y,g);p.length?(b||(u.polygonStart(),b=!0),zt(p,Pt,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Dt(),x=t(M),b=!1;return m}}function Rt(n){return n.length>1}function Dt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pt(n,t){return((n=n.x)[0]<0?n[1]-xo-go:xo-n[1])-((t=t.x)[0]<0?t[1]-xo-go:xo-t[1])}function Ut(n,t,e,r){var i,u,o=Math.sin(n-e);return Gu(o)>go?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function jt(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;ta.reset();for(var a=0,l=t.length;a=0?1:-1,w=_*b,S=w>yo,k=g*M;if(ta.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*mo:b,S^h>=e^y>=e){var N=yt(vt(s),vt(n));xt(N);var E=yt(i,N);xt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(u<-go||ui}function e(n,t,e){var r=[1,0,0],u=yt(vt(n),vt(t)),o=dt(u,u),a=u[0],l=o-a*a;if(!l)return!e&&n;var c=i*o/l,f=-i*a/l,s=yt(r,u),h=Mt(r,c);mt(h,Mt(u,f));var p=s,g=dt(h,p),v=dt(p,p),d=g*g-v*(dt(h,h)-1);if(!(d<0)){var y=Math.sqrt(d),m=Mt(p,(-g-y)/v);if(mt(m,h),m=bt(m),!e)return m;var M,x=n[0],b=t[0],_=n[1],w=t[1];b0^m[1]<(Gu(m[0]-x)yo^(x<=m[0]&&m[0]<=b)){var E=Mt(p,(-g+y)/v);return mt(E,h),[m,bt(E)]}}}function r(t,e){var r=u?n:yo-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var i=Math.cos(n),u=i>0,o=Gu(i)>go;return Tt(t,function(n){var i,a,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=u?v?0:r(s,h):v?r(s+(s<0?yo:-yo),h):0;if(!i&&(c=l=v)&&n.lineStart(),v!==l&&(p=e(i,g),(_t(i,p)||_t(g,p))&&(g[0]+=go,g[1]+=go,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=e(g,i),n.point(p[0],p[1])):(p=e(i,g),n.point(p[0],p[1]),n.lineEnd()),i=p;else if(o&&i&&u^v){var y;d&a||!(y=e(g,i,!0))||(f=0,u?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||i&&_t(i,g)||n.point(g[0],g[1]),i=g,l=v,a=d},lineEnd:function(){l&&n.lineEnd(),i=null},clean:function(){return f|(c&&l)<<1}}},se(n,6*bo),u?[0,-n]:[-yo,n-yo])}function Ht(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=0,s=1,h=a.x-l,p=a.y-c;if(u=n-l,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=e-l,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0)){if(u/=p,p<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=r-c,p||!(u<0)){if(u/=p,p<0){if(u>s)return;u>f&&(f=u)}else if(p>0){if(u0&&(i.a={x:l+f*h,y:c+f*p}),s<1&&(i.b={x:l+s*h,y:c+s*p}),i}}}}}}function Ot(n,t,e,r){function i(r,i){return Gu(r[0]-n)0?0:3:Gu(r[0]-e)0?2:1:Gu(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=g.length,r=n[1],i=0;ir&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0)do{c.point(0===f||3===f?n:e,f>1?r:t)}while((f=(f+l+4)%4)!==s);else c.point(a[0],a[1])}function f(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function s(n,t){f(n,t)&&a.point(n,t)}function h(n,t){var e=f(n=Math.max(-da,Math.min(da,n)),t=Math.max(-da,Math.min(da,t)));if(g&&v.push([n,t]),_)d=n,y=t,m=e,_=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&b)a.point(n,t);else{var r={a:{x:M,y:x},b:{x:n,y:t}};N(r)?(b||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),w=!1):e&&(a.lineStart(),a.point(n,t),w=!1)}M=n,x=t,b=e}var p,g,v,d,y,m,M,x,b,_,w,S=a,k=Dt(),N=Ht(n,t,e,r),E={point:s,lineStart:function(){E.point=h,g&&g.push(v=[]),_=!0,b=!1,M=x=NaN},lineEnd:function(){p&&(h(d,y),m&&b&&k.rejoin(),p.push(k.buffer())),E.point=s,b&&a.lineEnd()},polygonStart:function(){a=k,p=[],g=[],w=!0},polygonEnd:function(){a=S,p=Ou.merge(p);var t=l([n,r]),e=w&&t,i=p.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&zt(p,u,t,c,a),a.polygonEnd()),p=g=v=null}};return E}}function It(n){var t=0,e=yo/3,r=re(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*yo/180,e=n[1]*yo/180):[t/yo*180,e/yo*180]},i}function Yt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function Zt(){function n(n,t){ma+=i*n-r*t,r=n,i=t}var t,e,r,i;wa.point=function(u,o){wa.point=n,t=r=u,e=i=o},wa.lineEnd=function(){n(t,e)}}function Vt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Xt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Xt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Xt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function $t(n,t){ua+=n,oa+=t,++aa}function Bt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);la+=o*(t+n)/2,ca+=o*(e+r)/2,fa+=o,$t(t=n,e=r)}var t,e;ka.point=function(r,i){ka.point=n,$t(t=r,e=i)}}function Wt(){ka.point=$t}function Jt(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);la+=o*(r+n)/2,ca+=o*(i+t)/2,fa+=o,sa+=(o=i*n-r*t)*(r+n),ha+=o*(i+t),pa+=3*o,$t(r=n,i=t)}var t,e,r,i;ka.point=function(u,o){ka.point=n,$t(t=r=u,e=i=o)},ka.lineEnd=function(){n(t,e)}}function Gt(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,mo)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function Kt(n){function t(n){return(a?r:e)(n)}function e(t){return te(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=vt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Gu(Gu(w)-1)u||Gu((m*z+M*L)/x-.5)>.3||a*p+l*g+c*v0&&16,t):Math.sqrt(u)},t}function Qt(n){var t=Kt(function(t,e){return n([t*_o,e*_o])});return function(n){return ie(t(n))}}function ne(n){this.stream=n}function te(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ee(n){return re(function(){return n})()}function re(n){function t(n){return n=a(n[0]*bo,n[1]*bo),[n[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*_o,n[1]*_o]}function r(){a=At(o=ae(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=Kt(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=va,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=ie(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,va):Ft((w=+n)*bo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Ot(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*bo,d=n[1]%360*bo,r()):[v*_o,d*_o]},t.rotate=function(n){return arguments.length?(y=n[0]%360*bo,M=n[1]%360*bo,x=n.length>2?n[2]%360*bo:0,r()):[y*_o,M*_o,x*_o]},Ou.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function ie(n){return te(n,function(t,e){n.point(t*bo,e*bo)})}function ue(n,t){return[n,t]}function oe(n,t){return[n>yo?n-mo:n<-yo?n+mo:n,t]}function ae(n,t,e){return n?t||e?At(ce(n),fe(t,e)):ce(n):t||e?fe(t,e):oe}function le(n){return function(t,e){return t+=n,[t>yo?t-mo:t<-yo?t+mo:t,e]}}function ce(n){var t=le(n);return t.invert=le(-n),t}function fe(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function se(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=he(e,i),u=he(e,u),(o>0?iu)&&(i+=o*mo)):(i=n+o*mo,u=n-.5*l);for(var c,f=i;o>0?f>u:f0?t<-xo+go&&(t=-xo+go):t>xo-go&&(t=xo-go);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(yo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-xo]},e):be}function xe(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return Gu(i)1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Ee(n,t){return n[0]-t[0]||n[1]-t[1]}function Ae(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ce(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function ze(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Le(){Ke(this),this.edge=this.site=this.circle=null}function qe(n){var t=Fa.pop()||new Le;return t.site=n,t}function Te(n){Ye(n),Pa.remove(n),Fa.push(n),Ke(n)}function Re(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];Te(n);for(var l=u;l.circle&&Gu(e-l.circle.x)go)a=a.L;else{if(!((i=u-Ue(a,o))>go)){r>-go?(t=a.P,e=a):i>-go?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=qe(n);if(Pa.insert(t,l),t||e){if(t===e)return Ye(t),e=qe(t.site),Pa.insert(l,e),l.edge=e.edge=$e(t.site,l.site),Ie(t),void Ie(e);if(e){Ye(t),Ye(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};We(e.edge,c,g,x),l.edge=$e(c,n,null,x),e.edge=$e(n,g,null,x),Ie(t),Ie(e)}else l.edge=$e(t.site,l.site)}}function Pe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site).x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ue(n,t){var e=n.N;if(e)return Pe(e,t);var r=n.site;return r.y===t?r.x:1/0}function je(n){this.site=n,this.edges=[]}function Fe(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=Da,d=v.length;d--;)if((u=v[d])&&u.prepare())for(l=(a=u.edges).length,o=0;ogo||Gu(i-e)>go)&&(a.splice(o,0,new Je(Be(u.site,f,Gu(r-s)go?{x:s,y:Gu(t-s)go?{x:Gu(e-g)go?{x:h,y:Gu(t-h)go?{x:Gu(e-p)=-vo)){var h=l*l+c*c,p=f*f+d*d,g=(d*h-c*p)/s,v=(l*p-f*h)/s,d=v+a,y=Ha.pop()||new Oe;y.arc=n,y.site=i,y.x=g+o,y.y=d+Math.sqrt(g*g+v*v),y.cy=d,n.circle=y;for(var m=null,M=ja._;M;)if(y.y=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||h=b)<<1|t>=x,w=_+4;_u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:sr(e,r)})),u=Ya.lastIndex;return u=0&&!(e=Ou.interpolators[r](n,t)););return e}function gr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e=1?1:n(t)}}function dr(n){return function(t){return 1-n(1-t)}}function yr(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function mr(n){return n*n}function Mr(n){return n*n*n}function xr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function br(n){return 1-Math.cos(n*xo)}function _r(n){return Math.pow(2,10*(n-1))}function wr(n){return 1-Math.sqrt(1-n*n)}function Sr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function kr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Nr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Ar(t),i=Er(t,e),u=Ar(Cr(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(zr(e)+"rotate(",null,")")-2,x:sr(n,t)})):t&&e.push(zr(e)+"rotate("+t+")")}function Tr(n,t,e,r){n!==t?r.push({i:e.push(zr(e)+"skewX(",null,")")-2,x:sr(n,t)}):t&&e.push(zr(e)+"skewX("+t+")")}function Rr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(zr(e)+"scale(",null,",",null,")");r.push({i:i-4,x:sr(n[0],t[0])},{i:i-2,x:sr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(zr(e)+"scale("+t+")")}function Dr(n,t){var e=[],r=[];return n=Ou.transform(n),t=Ou.transform(t),Lr(n.translate,t.translate,e,r),qr(n.rotate,t.rotate,e,r),Tr(n.skew,t.skew,e,r),Rr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function Br(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oi&&(r=e,i=t);return r}function ui(n){return n.reduce(oi,0)}function oi(n,t){return n+t[1]}function ai(n,t){return li(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function li(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function ci(n){return[Ou.min(n),Ou.max(n)]}function fi(n,t){return n.value-t.value}function si(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function hi(n,t){n._pack_next=t,t._pack_prev=n}function pi(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function gi(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-1/0,h=1/0,p=-1/0;if(e.forEach(vi),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(mi(r,i,u=e[2]),t(u),si(r,u),r._pack_prev=u,si(u,i),i=r._pack_next,o=3;o=0;)(t=i[u]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Si(n,t,e){return n.a.parent===t.parent?n.a:e}function ki(n){return 1+Ou.max(n,function(n){return n.y})}function Ni(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ei(n){var t=n.children;return t&&t.length?Ei(t[0]):n}function Ai(n){var t,e=n.children;return e&&(t=e.length)?Ai(e[t-1]):n}function Ci(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function zi(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),u<0&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Li(n){var t=n[0],e=n[n.length-1];return t2?Pi:Ti,l=r?Ur:Pr;return o=i(n,t,l,e),a=i(t,n,l,pr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(kr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Oi(n,t)},u.tickFormat=function(t,e){return Ii(n,t,e)},u.nice=function(t){return Fi(n,t),i()},u.copy=function(){return Ui(n,t,e,r)},i()}function ji(n,t){return Ou.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Fi(n,t){return Ri(n,Di(Hi(n,t)[2])),Ri(n,Di(Hi(n,t)[2])),n}function Hi(n,t){null==t&&(t=10);var e=Li(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Oi(n,t){return Ou.range.apply(Ou,Hi(n,t))}function Ii(n,t,e){var r=Hi(n,t);if(e){var i=Io.exec(e);if(i.shift(),"s"===i[8]){var u=Ou.formatPrefix(Math.max(Gu(r[0]),Gu(r[1])));return i[7]||(i[7]="."+Yi(u.scale(r[2]))),i[8]="f",e=Ou.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+Zi(i[8],r)),e=i.join("")}else e=",."+Yi(r[2])+"f";return Ou.format(e)}function Yi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Zi(n,t){var e=Yi(t[2]);return n in tl?Math.abs(e-Yi(Math.max(Gu(t[0]),Gu(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Vi(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Ri(r.map(i),e?Math:rl);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Li(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;c0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return el;arguments.length<2?e=el:"function"!=typeof e&&(e=Ou.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return o*t0?a[e-1]:n[0],e0?0:1}function ou(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(y<0?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function au(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function cu(n){return n.join("L")+"Z"}function fu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r);for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function xu(n){for(var t,e,r,i=-1,u=n.length;++i0;)h[--a].call(n,o);if(u>=1)return g.event&&g.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1}var a,l,f,s,h,p=n[e]||(n[e]={active:0,count:0}),g=p[r];g||(a=i.time,l=qn(function(n){var t=g.delay;if(l.t=t+a,t<=n)return u(n-t);l.c=u},0,a),g=p[r]={tween:new c,time:a,timer:l,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++p.count)}function Ru(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Du(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Pu(n){return n.toISOString()}function Uu(n,t,e){function r(t){return n(t)}function i(n,e){var r=(n[1]-n[0])/e,i=Ou.bisect(Al,r);return i==Al.length?[t.year,Hi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[r/Al[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=ju(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ju(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Li(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],ju(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Uu(n.copy(),t,e)},ji(r,n)}function ju(n){return new Date(n)}function Fu(n){return JSON.parse(n.responseText)}function Hu(n){var t=Zu.createRange();return t.selectNode(Zu.body),t.createContextualFragment(n.responseText)}var Ou={version:"3.5.17"},Iu=[].slice,Yu=function(n){return Iu.call(n)},Zu=this.document;if(Zu)try{Yu(Zu.documentElement.childNodes)[0].nodeType}catch(n){Yu=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),Zu)try{Zu.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var Vu=this.Element.prototype,Xu=Vu.setAttribute,$u=Vu.setAttributeNS,Bu=this.CSSStyleDeclaration.prototype,Wu=Bu.setProperty;Vu.setAttribute=function(n,t){Xu.call(this,n,t+"")},Vu.setAttributeNS=function(n,t,e){$u.call(this,n,t,e+"")},Bu.setProperty=function(n,t,e){Wu.call(this,n,t+"",e)}}Ou.ascending=e,Ou.descending=function(n,t){return tn?1:t>=n?0:NaN},Ou.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},Ou.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},Ou.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),i=r){e=i=r;break}for(;++ur&&(e=r),i1)return l/(f-1)},Ou.deviation=function(){var n=Ou.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Ju=u(e);Ou.bisectLeft=Ju.left,Ou.bisect=Ou.bisectRight=Ju.right,Ou.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},Ou.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},Ou.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Ou.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t=0;)for(t=(r=n[i]).length;--t>=0;)e[--o]=r[t];return e};var Gu=Math.abs;Ou.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=a(Gu(e)),o=-1;if(n*=u,t*=u,(e*=u)<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(Ou.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},Ou.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;e=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Ou.event=null,Ou.requote=function(n){return n.replace(to,"\\$&")};var to=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,eo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ro=function(n,t){return t.querySelector(n)},io=function(n,t){return t.querySelectorAll(n)},uo=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(uo=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ro=function(n,t){return Sizzle(n,t)[0]||null},io=Sizzle,uo=Sizzle.matchesSelector),Ou.selection=function(){return Ou.select(Zu.documentElement)};var oo=Ou.selection.prototype=[];oo.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),lo.hasOwnProperty(e)?{space:lo[e],local:n}:n}},oo.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return(n=Ou.ns.qualify(n)).local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},oo.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},oo.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){var n=this,r=D.of(n,arguments),i=0,o=Ou.select(t(n)).on(q,function(){i=1,u(Ou.mouse(n),a),c(r)}).on(T,function(){o.on(q,null).on(T,null),s(i),f(r)}),a=e(Ou.mouse(n)),s=W(n);ml.call(n),l(r)}function h(){function n(){var n=Ou.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=Ou.event.target;Ou.select(t).on(x,r).on(b,a),_.push(t);for(var e=Ou.event.changedTouches,i=0,u=e.length;i1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=Ou.touches(g);ml.call(g);for(var a=0,l=o.length;a=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++8?function(n){return n/e}:function(n){return n*e},symbol:n}});Ou.formatPrefix=function(n,t){var e=0;return(n=+n)&&(n<0&&(n*=-1),t&&(n=Ou.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Oo[8+e/3]};var Io=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Yo=Ou.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Ou.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),Zo=Ou.time={},Vo=Date;Fn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Xo.setUTCDate.apply(this._,arguments)},setDay:function(){Xo.setUTCDay.apply(this._,arguments)},setFullYear:function(){Xo.setUTCFullYear.apply(this._,arguments)},setHours:function(){Xo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Xo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Xo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Xo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Xo.setUTCSeconds.apply(this._,arguments)},setTime:function(){Xo.setTime.apply(this._,arguments)}};var Xo=Date.prototype;Zo.year=Hn(function(n){return(n=Zo.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),Zo.years=Zo.year.range,Zo.years.utc=Zo.year.utc.range,Zo.day=Hn(function(n){var t=new Vo(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),Zo.days=Zo.day.range,Zo.days.utc=Zo.day.utc.range,Zo.dayOfYear=function(n){var t=Zo.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=Zo[n]=Hn(function(n){return(n=Zo.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=Zo.year(n).getDay();return Math.floor((Zo.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});Zo[n+"s"]=e.range,Zo[n+"s"].utc=e.utc.range,Zo[n+"OfYear"]=function(n){var e=Zo.year(n).getDay();return Math.floor((Zo.dayOfYear(n)+(e+t)%7)/7)}}),Zo.week=Zo.sunday,Zo.weeks=Zo.sunday.range,Zo.weeks.utc=Zo.sunday.utc.range,Zo.weekOfYear=Zo.sundayOfYear;var $o={"-":"",_:" ",0:"0"},Bo=/^\s*\d+/,Wo=/^%/;Ou.locale=function(n){return{numberFormat:Un(n),timeFormat:In(n)}};var Jo=Ou.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Ou.format=Jo.numberFormat,Ou.geo={},ct.prototype={s:0,t:0,add:function(n){ft(n,this.t,Go),ft(Go.s,this.s,this),this.s?this.t+=Go.t:this.s=Go.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Go=new ct;Ou.geo.stream=function(n,t){n&&Ko.hasOwnProperty(n.type)?Ko[n.type](n,t):st(n,t)};var Ko={Feature:function(n,t){st(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rp&&(p=t)}function t(t,e){var r=vt([t*bo,e*bo]);if(y){var i=yt(y,r),u=yt([i[1],-i[0],0],i);xt(u),u=bt(u);var o=t-g,l=o>0?1:-1,c=u[0]*_o*l,v=Gu(o)>180;if(v^(l*gp&&(p=d);else if(c=(c+360)%360-180,v^(l*gp&&(p=e);v?ta(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(th&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=Gu(r)>180?r+(r>0?360:-360):r}else v=n,d=e;ea.point(n,e),t(n,e)}function u(){ea.lineStart()}function o(){i(v,d),ea.lineEnd(),Gu(m)>go&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:ngo?p=90:m<-go&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],Ou.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e=1,r=[g=M[0]];ea(g[0],g[1])&&(g[1]=u[1]),a(u[0],g[1])>a(g[0],g[1])&&(g[0]=u[0])):r.push(g=u);for(var i,u,o=-1/0,e=0,g=r[t=r.length-1];e<=t;g=u,++e)u=r[e],(i=a(g[1],u[0]))>o&&(o=i,f=u[0],h=g[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),Ou.geo.centroid=function(n){ra=ia=ua=oa=aa=la=ca=fa=sa=ha=pa=0,Ou.geo.stream(n,ga);var t=sa,e=ha,r=pa,i=t*t+e*e+r*r;return i0?yo:-yo,l=Gu(u-e);Gu(l-yo)0?xo:-xo),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=yo&&(Gu(e-i)go){var u=n[0]=.12&&i<.234&&r>=-.425&&r<-.214?o:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+go,s+.12*c+go],[f-.214*c-go,s+.234*c-go]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+go,s+.166*c+go],[f-.115*c-go,s+.234*c-go]]).stream(l).point,n},n.scale(1070)};var ya,ma,Ma,xa,ba,_a,wa={point:b,lineStart:b,lineEnd:b,polygonStart:function(){ma=0,wa.lineStart=Zt},polygonEnd:function(){wa.lineStart=wa.lineEnd=wa.point=b,ya+=Gu(ma/2)}},Sa={point:function(n,t){nba&&(ba=n),t_a&&(_a=t)},lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},ka={point:$t,lineStart:Bt,lineEnd:Wt,polygonStart:function(){ka.lineStart=Jt},polygonEnd:function(){ka.point=$t,ka.lineStart=Bt,ka.lineEnd=Wt}};Ou.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),Ou.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return ya=0,Ou.geo.stream(n,i(wa)),ya},n.centroid=function(n){return ua=oa=aa=la=ca=fa=sa=ha=pa=0,Ou.geo.stream(n,i(ka)),pa?[sa/pa,ha/pa]:fa?[la/fa,ca/fa]:aa?[ua/aa,oa/aa]:[NaN,NaN]},n.bounds=function(n){return ba=_a=-(Ma=xa=1/0),Ou.geo.stream(n,i(Sa)),[[Ma,xa],[ba,_a]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||Qt(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Vt:new Gt(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(Ou.geo.albersUsa()).context(null)},Ou.geo.transform=function(n){return{stream:function(t){var e=new ne(t);for(var r in n)e[r]=n[r];return e}}},ne.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Ou.geo.projection=ee,Ou.geo.projectionMutator=re,(Ou.geo.equirectangular=function(){return ee(ue)}).raw=ue.invert=ue,Ou.geo.rotation=function(n){function t(t){return t=n(t[0]*bo,t[1]*bo),t[0]*=_o,t[1]*=_o,t}return n=ae(n[0]%360*bo,n[1]*bo,n.length>2?n[2]*bo:0),t.invert=function(t){return t=n.invert(t[0]*bo,t[1]*bo),t[0]*=_o,t[1]*=_o,t},t},oe.invert=ue,Ou.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=ae(-n[0]*bo,-n[1]*bo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=_o,n[1]*=_o}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=se((t=+r)*bo,i*bo),n):t},n.precision=function(r){return arguments.length?(e=se(t*bo,(i=+r)*bo),n):i},n.angle(90)},Ou.geo.distance=function(n,t){var e,r=(t[0]-n[0])*bo,i=n[1]*bo,u=t[1]*bo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},Ou.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Ou.range(Math.ceil(u/d)*d,i,d).map(h).concat(Ou.range(Math.ceil(c/y)*y,l,y).map(p)).concat(Ou.range(Math.ceil(r/g)*g,e,g).filter(function(n){return Gu(n%d)>go}).map(f)).concat(Ou.range(Math.ceil(a/v)*v,o,v).filter(function(n){return Gu(n%y)>go}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=pe(a,o,90),s=ge(r,e,m),h=pe(c,l,90),p=ge(u,i,m),n):m},n.majorExtent([[-180,-90+go],[180,90-go]]).minorExtent([[-180,-80-go],[180,80+go]])},Ou.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=ve,i=de;return n.distance=function(){return Ou.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},Ou.geo.interpolate=function(n,t){return ye(n[0]*bo,n[1]*bo,t[0]*bo,t[1]*bo)},Ou.geo.length=function(n){return Na=0,Ou.geo.stream(n,Ea),Na};var Na,Ea={sphere:b,point:b,lineStart:function(){function n(n,i){var u=Math.sin(i*=bo),o=Math.cos(i),a=Gu((n*=bo)-t),l=Math.cos(a);Na+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ea.point=function(i,u){t=i*bo,e=Math.sin(u*=bo),r=Math.cos(u),Ea.point=n},Ea.lineEnd=function(){Ea.point=Ea.lineEnd=b}},lineEnd:b,polygonStart:b,polygonEnd:b},Aa=me(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Ou.geo.azimuthalEqualArea=function(){return ee(Aa)}).raw=Aa;var Ca=me(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(Ou.geo.azimuthalEquidistant=function(){return ee(Ca)}).raw=Ca,(Ou.geo.conicConformal=function(){return It(Me)}).raw=Me,(Ou.geo.conicEquidistant=function(){return It(xe)}).raw=xe;var za=me(function(n){return 1/n},Math.atan);(Ou.geo.gnomonic=function(){return ee(za)}).raw=za,be.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-xo]},(Ou.geo.mercator=function(){return _e(be)}).raw=be;var La=me(function(){return 1},Math.asin);(Ou.geo.orthographic=function(){return ee(La)}).raw=La;var qa=me(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Ou.geo.stereographic=function(){return ee(qa)}).raw=qa,we.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-xo]},(Ou.geo.transverseMercator=function(){var n=_e(we),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=we,Ou.geom={},Ou.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;t=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[]).point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/go)*go,y:Math.round(o(n,t)/go)*go,i:t}})}var r=Se,i=ke,u=r,o=i,a=Oa;return n?t(n):(t.links=function(n){return er(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return er(e(n)).cells.forEach(function(e,r){for(var i,u=e.site,o=e.edges.sort(He),a=-1,l=o.length,c=o[l-1].edge,f=c.l===u?c.r:c.l;++a=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;py&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;py&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k={leaf:!0,nodes:[],point:null,x:null,y:null};if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){ar(n,k,v,d,y,m)},k.find=function(n){return lr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=Va.get(e)||Za,r=Xa.get(r)||m,vr(r(e.apply(null,Iu.call(arguments,1))))},Ou.interpolateHcl=function(n,t){n=Ou.hcl(n),t=Ou.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}},Ou.interpolateHsl=function(n,t){n=Ou.hsl(n),t=Ou.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}},Ou.interpolateLab=function(n,t){n=Ou.lab(n),t=Ou.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}},Ou.interpolateRound=kr,Ou.transform=function(n){var t=Zu.createElementNS(Ou.ns.prefix.svg,"g");return(Ou.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Nr(e?e.matrix:$a)})(n)},Nr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var $a={a:1,b:0,c:0,d:1,e:0,f:0};Ou.interpolateTransform=Dr,Ou.layout={},Ou.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;l=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return Br(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=Gr,e=Wr,r=Jr;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&($r(t,function(n){n.children&&(n.value=0)}),Br(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},Ou.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++ca&&(a=r),o.push(r)}for(e=0;e0)for(u=-1;++u=f[0]&&a<=f[1]&&((o=l[Ou.bisect(s,a,1,p)-1]).y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=ci,i=ai;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return li(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},Ou.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Br(a,function(n){n.r=+f(n.value)}),Br(a,gi),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;Br(a,function(n){n.r+=s}),Br(a,gi),Br(a,function(n){n.r-=s})}return yi(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=Ou.layout.hierarchy().sort(fi),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Xr(n,e)},Ou.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(Br(h,e),h.parent.m=-h.z,$r(h,r),c)$r(s,u);else{var p=s,g=s,v=s;$r(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);$r(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;o0&&(_i(Si(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!bi(u)&&(u.t=o,u.m+=s-f),i&&!xi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=Ou.layout.hierarchy().sort(null).value(null),a=Mi,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},Xr(n,o)},Ou.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;Br(l,function(n){var t=n.children;t&&t.length?(n.x=Ni(t),n.y=ki(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Ei(l),s=Ai(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return Br(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=Ou.layout.hierarchy().sort(null).value(null),e=Mi,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},Xr(n,t)},Ou.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oi&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++u1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=Ou.random.normal.apply(Ou,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Ou.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;es?0:1;if(c=Mo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ll?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=yo?0:1;if(E&&uu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=yo?0:1;if(N&&uu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>go&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=n1&&i.push("H",r[0]),i.join("")},"step-before":fu,"step-after":su,basis:gu,"basis-open":function(n){if(n.length<4)return lu(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(vu(hl,u)+","+vu(hl,o)),--r;++ryo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=ve,o=de,a=_u,l=eu,c=ru;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},Ou.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=ve,e=de,r=wu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},Ou.svg.diagonal.radial=function(){var n=Ou.svg.diagonal(),t=wu,e=n.projection;return n.projection=function(n){return arguments.length?e(Su(t=n)):t},n},Ou.svg.symbol=function(){function n(n,r){return(pl.get(t.call(this,n,r))||Eu)(e.call(this,n,r))}var t=Nu,e=ku;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var pl=Ou.map({circle:Eu,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*vl)),e=t*vl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/gl),e=t*gl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/gl),e=t*gl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Ou.svg.symbolTypes=pl.keys();var gl=Math.sqrt(3),vl=Math.tan(30*bo);oo.transition=function(n){for(var t,e,r=dl||++xl,i=qu(n),u=[],o=yl||{time:Date.now(),ease:xr,delay:0,duration:250},a=-1,l=this.length;++arect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){var n=Ou.mouse(M),t=!1;m&&(n[0]+=m[0],n[1]+=m[1]),E||(Ou.event.altKey?(y||(y=[(s[0]+s[1])/2,(h[0]+h[1])/2]),C[0]=s[+(n[0]
').find("*").attr(o).css(o).end().find("div>*").css("position","absolute"),a.browser.msie,r.radius=(e.width-e.wheelWidth)/2-1,r.square=Math.floor(.7*(r.radius-e.wheelWidth/2))-1,r.mid=Math.floor(e.width/2),r.markerSize=.3*e.wheelWidth,r.solidFill=a(".farbtastic-solid",t).css({width:2*r.square-1,height:2*r.square-1,left:r.mid-r.square,top:r.mid-r.square}),r.cnvMask=a(".farbtastic-mask",t),r.ctxMask=r.cnvMask[0].getContext("2d"),r.cnvOverlay=a(".farbtastic-overlay",t),r.ctxOverlay=r.cnvOverlay[0].getContext("2d"),r.ctxMask.translate(r.mid,r.mid),r.ctxOverlay.translate(r.mid,r.mid),r.drawCircle(),r.drawMask()},r.drawCircle=function(){var t,o,i=(new Date,r.radius),c=e.wheelWidth,n=8/i/24*Math.PI,s=r.ctxMask,l=0;s.save(),s.lineWidth=c/i,s.scale(i,i);for(var u=0;u<=24;++u){var d=u/24,h=d*Math.PI*2,f=Math.sin(l),v=-Math.cos(l);if(x2=Math.sin(h),y2=-Math.cos(h),am=(l+h)/2,tan=1/Math.cos((h-l)/2),xm=Math.sin(am)*tan,ym=-Math.cos(am)*tan,color2=r.pack(r.HSLToRGB([d,1,.5])),u>0)if(a.browser.msie){var m=(1+Math.min(Math.abs(Math.tan(l)),Math.abs(Math.tan(Math.PI/2-l))))/24;t=r.pack(r.HSLToRGB([o-.15*m,1,.5])),color2=r.pack(r.HSLToRGB([d+.15*m,1,.5]));var b=s.createLinearGradient(f,v,x2,y2);b.addColorStop(0,t),b.addColorStop(1,color2),s.fillStyle=b;var k=(i+c/2)/i,M=(i-c/2)/i;s.beginPath(),s.moveTo(f*k,v*k),s.quadraticCurveTo(xm*k,ym*k,x2*k,y2*k),s.lineTo(x2*M,y2*M),s.quadraticCurveTo(xm*M,ym*M,f*M,v*M),s.fill()}else{var b=s.createLinearGradient(f,v,x2,y2);b.addColorStop(0,t),b.addColorStop(1,color2),s.strokeStyle=b,s.beginPath(),s.moveTo(f,v),s.quadraticCurveTo(xm,ym,x2,y2),s.stroke()}l=h-n,t=color2,o=d}s.restore()},r.drawMask=function(){function t(a,t,e){for(var r=1/a,o=1/t,i=0;i<=t;++i)for(var c=1-i*o,n=0;n<=a;++n){var s=1-n*r,l=1-2*Math.min(c*s,(1-c)*s),u=l>0?.5*(2*c-1+l)/l:0;e(n,i,u,l)}}var e=(new Date,2*r.square),o=r.square;if(r.ctxMask.getImageData){var i=Math.floor(e/2),c=document.createElement("canvas");c.width=c.height=i+1;var n=c.getContext("2d"),s=n.getImageData(0,0,i+1,i+1),l=0;t(i,i,function(a,t,e,r){s.data[l++]=s.data[l++]=s.data[l++]=255*e,s.data[l++]=255*r}),n.putImageData(s,0,0),r.ctxMask.drawImage(c,0,0,i+1,i+1,-o,-o,2*o,2*o)}else if(a.browser.msie){var u,d,h=Math.floor(e/6);t(h,6,function(t,e,i,c){if(0==t&&(u=d,d=[]),i=Math.round(255*i),c=Math.round(255*c),e>0){var n=u[t][0],s=u[t][1],l=r.packDX(n,s),f=r.packDX(i,c),v=Math.round(r.mid+(.333*(e-1)-1)*o),m=Math.round(r.mid+(.333*e-1)*o);a("
").css({position:"absolute",filter:"progid:DXImageTransform.Microsoft.Gradient(StartColorStr="+l+", EndColorStr="+f+", GradientType=0)",top:v,height:m-v,left:r.mid+(6*t-o-1),width:6-(t==h?Math.round(3):0)}).appendTo(r.cnvMask)}d.push([i,c])})}else{var i=Math.floor(e/2);t(i,i,function(a,t,e,i){e=Math.round(255*e),r.ctxMask.fillStyle="rgba("+e+", "+e+", "+e+", "+i+")",r.ctxMask.fillRect(2*a-o-1,2*t-o-1,2,2)})}},r.drawMarkers=function(){var a=e.width,t=Math.ceil(r.markerSize/4),o=r.markerSize-t+1,i=6.28*r.hsl[0],c=Math.sin(i)*r.radius,n=-Math.cos(i)*r.radius,s=2*r.square*(.5-r.hsl[1]),l=2*r.square*(.5-r.hsl[2]),u=r.invert?"#fff":"#000",d=r.invert?"#000":"#fff",h=[{x:c,y:n,r:o,c:"#000",lw:t+1},{x:c,y:n,r:r.markerSize,c:"#fff",lw:t},{x:s,y:l,r:o,c:d,lw:t+1},{x:s,y:l,r:r.markerSize,c:u,lw:t}];r.ctxOverlay.clearRect(-r.mid,-r.mid,a,a);for(var f=0;fr.square+2,r.mousemove(e),!1},r.mousemove=function(a){var t=r.widgetCoords(a);if(r.circleDrag){var e=Math.atan2(t.x,-t.y)/6.28;r.setHSL([(e+1)%1,r.hsl[1],r.hsl[2]])}else{var o=Math.max(0,Math.min(1,-t.x/r.square/2+.5)),i=Math.max(0,Math.min(1,-t.y/r.square/2+.5));r.setHSL([r.hsl[0],o,i])}return!1},r.mouseup=function(){a(document).unbind("mousemove",r.mousemove),a(document).unbind("mouseup",r.mouseup),a._farbtastic.dragging=!1},r.dec2hex=function(a){return(a<16?"0":"")+a.toString(16)},r.packDX=function(a,t){return"#"+r.dec2hex(t)+r.dec2hex(a)+r.dec2hex(a)+r.dec2hex(a)},r.pack=function(a){var t=Math.round(255*a[0]),e=Math.round(255*a[1]),o=Math.round(255*a[2]);return"#"+r.dec2hex(t)+r.dec2hex(e)+r.dec2hex(o)},r.unpack=function(a){function t(t){return parseInt(a.substring(t,t+2),16)/255}function t(t){return parseInt(a.substring(t,t+1),16)/15}return 7==a.length?[t(1),t(3),t(5)]:4==a.length?[t(1),t(2),t(3)]:void 0},r.HSLToRGB=function(a){var t,e,r=a[0],o=a[1],i=a[2];return e=i<=.5?i*(o+1):i+o-i*o,t=2*i-e,[this.hueToRGB(t,e,r+.33333),this.hueToRGB(t,e,r),this.hueToRGB(t,e,r-.33333)]},r.hueToRGB=function(a,t,e){return e=(e+1)%1,6*e<1?a+(t-a)*e*6:2*e<1?t:3*e<2?a+(t-a)*(.66666-e)*6:a},r.RGBToHSL=function(a){var t=a[0],e=a[1],r=a[2],o=Math.min(t,e,r),i=Math.max(t,e,r),c=i-o,n=0,s=0,l=(o+i)/2;return l>0&&l<1&&(s=c/(l<.5?2*l:2-2*l)),c>0&&(i==t&&i!=e&&(n+=(e-r)/c),i==e&&i!=r&&(n+=2+(r-t)/c),i==r&&i!=t&&(n+=4+(t-e)/c),n/=6),[n,s,l]},e.callback||(e={callback:e}),e=a.extend({width:300,wheelWidth:(e.width||300)/10,callback:null},e),r.initWidget(),a("canvas.farbtastic-overlay",t).mousedown(r.mousedown),e.callback&&r.linkTo(e.callback),r.color||r.setColor("#808080")}}(jQuery); \ No newline at end of file +!function(a){a.fn.farbtastic=function(t){return a.farbtastic(this,t),this},a.farbtastic=function(t,e){return(t=a(t)[0]).farbtastic||(t.farbtastic=new a._farbtastic(t,e))},a._farbtastic=function(t,e){var r=this;r.linkTo=function(t){return"object"==typeof r.callback&&a(r.callback).unbind("keyup",r.updateValue),r.color=null,"function"==typeof t?r.callback=t:"object"!=typeof t&&"string"!=typeof t||(r.callback=a(t),r.callback.bind("keyup",r.updateValue),r.callback[0].value&&r.setColor(r.callback[0].value)),this},r.updateValue=function(a){this.value&&this.value!=r.color&&r.setColor(this.value)},r.setColor=function(a){var t=r.unpack(a);return r.color!=a&&t&&(r.color=a,r.rgb=t,r.hsl=r.RGBToHSL(r.rgb),r.updateDisplay()),this},r.setHSL=function(a){return r.hsl=a,r.rgb=r.HSLToRGB(a),r.color=r.pack(r.rgb),r.updateDisplay(),this},r.initWidget=function(){var o={width:e.width,height:e.width};a(t).html('
').find("*").attr(o).css(o).end().find("div>*").css("position","absolute"),a.browser.msie,r.radius=(e.width-e.wheelWidth)/2-1,r.square=Math.floor(.7*(r.radius-e.wheelWidth/2))-1,r.mid=Math.floor(e.width/2),r.markerSize=.3*e.wheelWidth,r.solidFill=a(".farbtastic-solid",t).css({width:2*r.square-1,height:2*r.square-1,left:r.mid-r.square,top:r.mid-r.square}),r.cnvMask=a(".farbtastic-mask",t),r.ctxMask=r.cnvMask[0].getContext("2d"),r.cnvOverlay=a(".farbtastic-overlay",t),r.ctxOverlay=r.cnvOverlay[0].getContext("2d"),r.ctxMask.translate(r.mid,r.mid),r.ctxOverlay.translate(r.mid,r.mid),r.drawCircle(),r.drawMask()},r.drawCircle=function(){new Date;var t,o,i=r.radius,c=e.wheelWidth,n=8/i/24*Math.PI,s=r.ctxMask,l=0;s.save(),s.lineWidth=c/i,s.scale(i,i);for(var u=0;u<=24;++u){var d=u/24,h=d*Math.PI*2,f=Math.sin(l),v=-Math.cos(l);if(x2=Math.sin(h),y2=-Math.cos(h),am=(l+h)/2,tan=1/Math.cos((h-l)/2),xm=Math.sin(am)*tan,ym=-Math.cos(am)*tan,color2=r.pack(r.HSLToRGB([d,1,.5])),u>0)if(a.browser.msie){var m=(1+Math.min(Math.abs(Math.tan(l)),Math.abs(Math.tan(Math.PI/2-l))))/24;t=r.pack(r.HSLToRGB([o-.15*m,1,.5])),color2=r.pack(r.HSLToRGB([d+.15*m,1,.5])),(M=s.createLinearGradient(f,v,x2,y2)).addColorStop(0,t),M.addColorStop(1,color2),s.fillStyle=M;var b=(i+c/2)/i,k=(i-c/2)/i;s.beginPath(),s.moveTo(f*b,v*b),s.quadraticCurveTo(xm*b,ym*b,x2*b,y2*b),s.lineTo(x2*k,y2*k),s.quadraticCurveTo(xm*k,ym*k,f*k,v*k),s.fill()}else{var M=s.createLinearGradient(f,v,x2,y2);M.addColorStop(0,t),M.addColorStop(1,color2),s.strokeStyle=M,s.beginPath(),s.moveTo(f,v),s.quadraticCurveTo(xm,ym,x2,y2),s.stroke()}l=h-n,t=color2,o=d}s.restore()},r.drawMask=function(){function t(a,t,e){for(var r=1/a,o=1/t,i=0;i<=t;++i)for(var c=1-i*o,n=0;n<=a;++n){var s=1-n*r,l=1-2*Math.min(c*s,(1-c)*s);e(n,i,l>0?.5*(2*c-1+l)/l:0,l)}}new Date;var e=2*r.square,o=r.square;if(r.ctxMask.getImageData){var i=Math.floor(e/2),c=document.createElement("canvas");c.width=c.height=i+1;var n=c.getContext("2d"),s=n.getImageData(0,0,i+1,i+1),l=0;t(i,i,function(a,t,e,r){s.data[l++]=s.data[l++]=s.data[l++]=255*e,s.data[l++]=255*r}),n.putImageData(s,0,0),r.ctxMask.drawImage(c,0,0,i+1,i+1,-o,-o,2*o,2*o)}else if(a.browser.msie){var u,d,h=Math.floor(e/6);t(h,6,function(t,e,i,c){if(0==t&&(u=d,d=[]),i=Math.round(255*i),c=Math.round(255*c),e>0){var n=u[t][0],s=u[t][1],l=r.packDX(n,s),f=r.packDX(i,c),v=Math.round(r.mid+(.333*(e-1)-1)*o),m=Math.round(r.mid+(.333*e-1)*o);a("
").css({position:"absolute",filter:"progid:DXImageTransform.Microsoft.Gradient(StartColorStr="+l+", EndColorStr="+f+", GradientType=0)",top:v,height:m-v,left:r.mid+(6*t-o-1),width:6-(t==h?Math.round(3):0)}).appendTo(r.cnvMask)}d.push([i,c])})}else t(i=Math.floor(e/2),i,function(a,t,e,i){e=Math.round(255*e),r.ctxMask.fillStyle="rgba("+e+", "+e+", "+e+", "+i+")",r.ctxMask.fillRect(2*a-o-1,2*t-o-1,2,2)})},r.drawMarkers=function(){var a=e.width,t=Math.ceil(r.markerSize/4),o=r.markerSize-t+1,i=6.28*r.hsl[0],c=Math.sin(i)*r.radius,n=-Math.cos(i)*r.radius,s=2*r.square*(.5-r.hsl[1]),l=2*r.square*(.5-r.hsl[2]),u=r.invert?"#fff":"#000",d=r.invert?"#000":"#fff",h=[{x:c,y:n,r:o,c:"#000",lw:t+1},{x:c,y:n,r:r.markerSize,c:"#fff",lw:t},{x:s,y:l,r:o,c:d,lw:t+1},{x:s,y:l,r:r.markerSize,c:u,lw:t}];r.ctxOverlay.clearRect(-r.mid,-r.mid,a,a);for(var f=0;fr.square+2,r.mousemove(e),!1},r.mousemove=function(a){var t=r.widgetCoords(a);if(r.circleDrag){var e=Math.atan2(t.x,-t.y)/6.28;r.setHSL([(e+1)%1,r.hsl[1],r.hsl[2]])}else{var o=Math.max(0,Math.min(1,-t.x/r.square/2+.5)),i=Math.max(0,Math.min(1,-t.y/r.square/2+.5));r.setHSL([r.hsl[0],o,i])}return!1},r.mouseup=function(){a(document).unbind("mousemove",r.mousemove),a(document).unbind("mouseup",r.mouseup),a._farbtastic.dragging=!1},r.dec2hex=function(a){return(a<16?"0":"")+a.toString(16)},r.packDX=function(a,t){return"#"+r.dec2hex(t)+r.dec2hex(a)+r.dec2hex(a)+r.dec2hex(a)},r.pack=function(a){var t=Math.round(255*a[0]),e=Math.round(255*a[1]),o=Math.round(255*a[2]);return"#"+r.dec2hex(t)+r.dec2hex(e)+r.dec2hex(o)},r.unpack=function(a){function t(t){return parseInt(a.substring(t,t+2),16)/255}function t(t){return parseInt(a.substring(t,t+1),16)/15}return 7==a.length?[t(1),t(3),t(5)]:4==a.length?[t(1),t(2),t(3)]:void 0},r.HSLToRGB=function(a){var t,e,r=a[0],o=a[1],i=a[2];return e=i<=.5?i*(o+1):i+o-i*o,t=2*i-e,[this.hueToRGB(t,e,r+.33333),this.hueToRGB(t,e,r),this.hueToRGB(t,e,r-.33333)]},r.hueToRGB=function(a,t,e){return 6*(e=(e+1)%1)<1?a+(t-a)*e*6:2*e<1?t:3*e<2?a+(t-a)*(.66666-e)*6:a},r.RGBToHSL=function(a){var t=a[0],e=a[1],r=a[2],o=Math.min(t,e,r),i=Math.max(t,e,r),c=i-o,n=0,s=0,l=(o+i)/2;return l>0&&l<1&&(s=c/(l<.5?2*l:2-2*l)),c>0&&(i==t&&i!=e&&(n+=(e-r)/c),i==e&&i!=r&&(n+=2+(r-t)/c),i==r&&i!=t&&(n+=4+(t-e)/c),n/=6),[n,s,l]},e.callback||(e={callback:e}),e=a.extend({width:300,wheelWidth:(e.width||300)/10,callback:null},e),r.initWidget(),a("canvas.farbtastic-overlay",t).mousedown(r.mousedown),e.callback&&r.linkTo(e.callback),r.color||r.setColor("#808080")}}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery.complexify.js b/static/scripts/libs/jquery.complexify.js index bc589c69c27..92e64d7d539 100644 --- a/static/scripts/libs/jquery.complexify.js +++ b/static/scripts/libs/jquery.complexify.js @@ -1 +1 @@ -!function(n){n.fn.extend({complexify:function(t,e){function r(n,t){for(var e=n.length-1;e>=0;e--)if(t[0]<=n.charCodeAt(e)&&n.charCodeAt(e)<=t[1])return t[1]-t[0]+1;return 0}function a(e){if("strict"===t.banMode){for(var r=0;r-1}function i(){var i=n(this).val(),c=0,u=!1;if(a(i))c=1;else for(var f=h.length-1;f>=0;f--)c+=r(i,h[f]);c=Math.log(Math.pow(c,i.length))*(1/t.strengthScaleFactor),u=c>o&&i.length>=t.minimumChars,c=c/s*100,c=c>100?100:c,e.call(this,u,c)}var o=49,s=120,h=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],c={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return n.isFunction(t)&&!e&&(e=t,t={}),t=n.extend(c,t),this.each(function(){n(this).val()&&i.apply(this)}),this.each(function(){n(this).bind("keyup focus input propertychange mouseup",i)})}})}(jQuery); \ No newline at end of file +!function(n){n.fn.extend({complexify:function(t,e){function r(n,t){for(var e=n.length-1;e>=0;e--)if(t[0]<=n.charCodeAt(e)&&n.charCodeAt(e)<=t[1])return t[1]-t[0]+1;return 0}function a(e){if("strict"===t.banMode){for(var r=0;r-1}function i(){var i=n(this).val(),c=0,u=!1;if(a(i))c=1;else for(var f=h.length-1;f>=0;f--)c+=r(i,h[f]);u=(c=Math.log(Math.pow(c,i.length))*(1/t.strengthScaleFactor))>o&&i.length>=t.minimumChars,c=(c=c/s*100)>100?100:c,e.call(this,u,c)}var o=49,s=120,h=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],c={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return n.isFunction(t)&&!e&&(e=t,t={}),t=n.extend(c,t),this.each(function(){n(this).val()&&i.apply(this)}),this.each(function(){n(this).bind("keyup focus input propertychange mouseup",i)})}})}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery.sparklines.js b/static/scripts/libs/jquery.sparklines.js index dd16273ad60..a1bdcc245c7 100644 --- a/static/scripts/libs/jquery.sparklines.js +++ b/static/scripts/libs/jquery.sparklines.js @@ -1,2 +1 @@ -!function(t,i,e){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.sparkline&&t(jQuery)}(function(e){"use strict";var s,r,n,a,o,h,l,g,p,d,u,c,f,v,m,x,y,C,w,b,R,S,k,M,_,H,W,T,q,I,j,P={},L=0;s=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:void 0,normalRangeMax:void 0,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:void 0,chartRangeMax:void 0,chartRangeMinX:void 0,chartRangeMaxX:void 0,tooltipFormat:new n('● {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:void 0,nullColor:void 0,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,colorMap:void 0,tooltipFormat:new n('● {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new n('● {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:void 0,thresholdValue:0,chartRangeMax:void 0,chartRangeMin:void 0,chartRangeClip:!1,tooltipFormat:new n("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:void 0,tooltipFormat:new n("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new n('● {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:void 0,targetColor:"#4a2",chartRangeMax:void 0,chartRangeMin:void 0,tooltipFormat:new n("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},_='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',r=function(){var t,i;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=e.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(i=Array.prototype.slice.call(arguments,1,-1),i.unshift(t.prototype),e.extend.apply(e,i))):t.prototype=arguments[0],t.prototype.cls=t,t},e.SPFormatClass=n=r({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,i){this.format=t,this.fclass=i},render:function(t,i,e){var s,r,n,a,o,h=this,l=t;return this.format.replace(this.fre,function(){var t;return r=arguments[1],n=arguments[3],s=h.precre.exec(r),s?(o=s[2],r=s[1]):o=!1,void 0===(a=l[r])?"":n&&i&&i[n]?(t=i[n],t.get?i[n].get(a)||a:i[n][a]||a):(p(a)&&(a=e.get("numberFormatter")?e.get("numberFormatter")(a):f(a,o,e.get("numberDigitGroupCount"),e.get("numberDigitGroupSep"),e.get("numberDecimalMark"))),a)})}}),e.spformat=function(t,i){return new n(t,i)},a=function(t,i,e){return te?e:t},o=function(t,e){var s;return 2===e?(s=i.floor(t.length/2),t.length%2?t[s]:(t[s-1]+t[s])/2):t.length%2?(s=(t.length*e+e)/4,s%1?(t[i.floor(s)]+t[i.floor(s)-1])/2:t[s-1]):(s=(t.length*e+2)/4,s%1?(t[i.floor(s)]+t[i.floor(s)-1])/2:t[s-1])},h=function(t){var i;switch(t){case"undefined":t=void 0;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:i=parseFloat(t),t==i&&(t=i)}return t},l=function(t){var i,e=[];for(i=t.length;i--;)e[i]=h(t[i]);return e},g=function(t,i){var e,s,r=[];for(e=0,s=t.length;e0;o-=s)t.splice(o,0,r);return t.join("")},d=function(t,i,e){var s;for(s=i.length;s--;)if((!e||null!==i[s])&&i[s]!==t)return!1;return!0},c=function(t){return e.isArray(t)?t:[t]},u=function(i){var e;t.createStyleSheet?t.createStyleSheet().cssText=i:(e=t.createElement("style"),e.type="text/css",t.getElementsByTagName("head")[0].appendChild(e),e["string"==typeof t.body.style.WebkitAppearance?"innerText":"innerHTML"]=i)},e.fn.simpledraw=function(i,s,r,n){var a,o;if(r&&(a=this.data("_jqs_vcanvas")))return a;if(!1===e.fn.sparkline.canvas)return!1;if(void 0===e.fn.sparkline.canvas){var h=t.createElement("canvas");if(h.getContext&&h.getContext("2d"))e.fn.sparkline.canvas=function(t,i,e,s){return new q(t,i,e,s)};else{if(!t.namespaces||t.namespaces.v)return e.fn.sparkline.canvas=!1,!1;t.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),e.fn.sparkline.canvas=function(t,i,e,s){return new I(t,i,e)}}}return void 0===i&&(i=e(this).innerWidth()),void 0===s&&(s=e(this).innerHeight()),a=e.fn.sparkline.canvas(i,s,this,n),o=e(this).data("_jqs_mhandler"),o&&o.registerCanvas(a),a},e.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},e.RangeMapClass=v=r({init:function(t){var i,e,s=[];for(i in t)t.hasOwnProperty(i)&&"string"==typeof i&&i.indexOf(":")>-1&&(e=i.split(":"),e[0]=0===e[0].length?-1/0:parseFloat(e[0]),e[1]=0===e[1].length?1/0:parseFloat(e[1]),e[2]=t[i],s.push(e));this.map=t,this.rangelist=s||!1},get:function(t){var i,e,s,r=this.rangelist;if(void 0!==(s=this.map[t]))return s;if(r)for(i=r.length;i--;)if(e=r[i],e[0]<=t&&e[1]>=t)return e[2]}}),e.range_map=function(t){return new v(t)},m=r({init:function(t,i){var s=e(t);this.$el=s,this.options=i,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!i.get("disableTooltips"),this.highlightEnabled=!i.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(t){var i=e(t.canvas);this.canvas=t,this.$canvas=i,i.mouseenter(e.proxy(this.mouseenter,this)),i.mouseleave(e.proxy(this.mouseleave,this)),i.click(e.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=void 0)},mouseclick:function(t){var i=e.Event("sparklineClick");i.originalEvent=t,i.sparklines=this.splist,this.$el.trigger(i)},mouseenter:function(i){e(t.body).unbind("mousemove.jqs"),e(t.body).bind("mousemove.jqs",e.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=i.pageX,this.currentPageY=i.pageY,this.currentEl=i.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new x(this.options),this.tooltip.updatePosition(i.pageX,i.pageY)),this.updateDisplay()},mouseleave:function(){e(t.body).unbind("mousemove.jqs");var i,s,r=this.splist,n=r.length,a=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),s=0;s
").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===s.range||"max"===s.range?" ui-slider-range-"+s.range:""))),i=s.values&&s.values.length||1,e=n.length;e");this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).mouseenter(function(){s.disabled||t(this).addClass("ui-state-hover")}).mouseleave(function(){t(this).removeClass("ui-state-hover")}).focus(function(){s.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),t(this).addClass("ui-state-focus"))}).blur(function(){t(this).removeClass("ui-state-focus")}),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)}),this._on(this.handles,{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),i=this._start(e,a),!1===i))return}switch(o=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,u,l=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));n>i&&(n=i,o=t(this),a=e)}),!0===h.range&&this.values(1)===h.min&&(a+=1,o=t(this.handles[a])),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),r=o.offset(),u=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&!0===this.options.range&&(0===e&&i>s||1===e&&i1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;o=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,u=this,l=!this._animateOff&&r.animate,h={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=(u.values(s)-u._valueMin())/(u._valueMax()-u._valueMin())*100,h["horizontal"===u.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](h,r.animate),!0===u.options.range&&("horizontal"===u.orientation?(0===s&&u.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&u.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&u.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&u.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))}})}(jQuery); \ No newline at end of file +!function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,!(!e.href||!o||"map"!==n.nodeName.toLowerCase())&&(!!(a=t("img[usemap=#"+o+"]")[0])&&s(a))):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().andSelf().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.ui.version||(t.extend(t.ui,{version:"1.9.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({_focus:t.fn.focus,focus:function(e,i){return"number"==typeof e?this.each(function(){var s=this;setTimeout(function(){t(s).focus(),i&&i.call(s)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(("absolute"===(s=o.css("position"))||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t(function(){var e=document.body,i=e.appendChild(i=document.createElement("div"));i.offsetHeight,t.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),t.support.minHeight=100===i.offsetHeight,t.support.selectstart="onselectstart"in i,e.removeChild(i).style.display="none"}),function(){var e=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];t.ui.ie=!!e.length,t.ui.ie6=6===parseFloat(e[1],10)}(),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;s0||(e[s]=1,n=e[s]>0,e[s]=0,n)},isOverAxis:function(t,e,i){return t>e&&t",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetName,this),t.data(s,this.widgetFullName,this),this._on(this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;a=9||e.button?this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted):this._mouseUp(e)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(t){return this.mouseDelayMet},_mouseStart:function(t){},_mouseDrag:function(t){},_mouseStop:function(t){},_mouseCapture:function(t){return!0}})}(jQuery),function(t,e){function i(t,e,i){return[parseInt(t[0],10)*(d.test(t[0])?e/100:1),parseInt(t[1],10)*(d.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}t.ui=t.ui||{};var n,o=Math.max,a=Math.abs,r=Math.round,u=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+%?/,c=/^\w+/,d=/%$/,m=t.fn.position;t.position={scrollbarWidth:function(){if(n!==e)return n;var i,s,o=t("
"),a=o.children()[0];return t("body").append(o),i=a.offsetWidth,o.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=o[0].clientWidth),o.remove(),n=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width0?"right":"center",vertical:r<0?"top":n>0?"bottom":"middle"};do(a(n),a(r))?u.important="horizontal":u.important="vertical",e.using.call(this,t,u)}),h.offset(t.extend(M,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,u=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?u>0&&l<=0?(i=t.left+u+e.collisionWidth-a-n,t.left+=u-i):t.left=l>0&&u<=0?n:u>l?n+a-e.collisionWidth:n:u>0?t.left+=u:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,u=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?u>0&&l<=0?(i=t.top+u+e.collisionHeight-a-n,t.top+=u-i):t.top=l>0&&u<=0?n:u>l?n+a-e.collisionHeight:n:u>0?t.top+=u:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,u=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,h=l-u,c=l+e.collisionWidth-r-u,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,m="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];h<0?((i=t.left+d+m+f+e.collisionWidth-r-o)<0||i0&&((s=t.left-e.collisionPosition.marginLeft+d+m+f-u)>0||a(s)h&&(s<0||s0&&(i=t.top-e.collisionPosition.marginTop+d+m+f-u,t.top+d+m+f>c&&(i>0||a(i)10&&n<11,e.innerHTML="",i.removeChild(e)}(),!1!==t.uiBackCompat&&function(t){var i=t.fn.position;t.fn.position=function(s){if(!s||!s.offset)return i.call(this,s);var n=s.offset.split(" "),o=s.at.split(" ");return 1===n.length&&(n[1]=n[0]),/^\d/.test(n[0])&&(n[0]="+"+n[0]),/^\d/.test(n[1])&&(n[1]="+"+n[1]),1===o.length&&(/left|center|right/.test(o[0])?o[1]="center":(o[1]=o[0],o[0]="center")),i.call(this,t.extend(s,{at:o[0]+n[0]+" "+o[1]+n[1],offset:e}))}}(jQuery)}(jQuery),function(t,e){var i=0;t.widget("ui.autocomplete",{version:"1.9.1",defaultElement:"",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s;this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void s.preventDefault();if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){if(s)return s=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("
").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===s.range||"max"===s.range?" ui-slider-range-"+s.range:""))),i=s.values&&s.values.length||1,e=n.length;e");this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).mouseenter(function(){s.disabled||t(this).addClass("ui-state-hover")}).mouseleave(function(){t(this).removeClass("ui-state-hover")}).focus(function(){s.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),t(this).addClass("ui-state-focus"))}).blur(function(){t(this).removeClass("ui-state-focus")}),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)}),this._on(this.handles,{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this.options.values&&this.options.values.length?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,u,l=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));n>i&&(n=i,o=t(this),a=e)}),!0===h.range&&this.values(1)===h.min&&(a+=1,o=t(this.handles[a])),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),r=o.offset(),u=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&!0===this.options.range&&(0===e&&i>s||1===e&&i1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;o=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,u=this,l=!this._animateOff&&r.animate,h={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=(u.values(s)-u._valueMin())/(u._valueMax()-u._valueMin())*100,h["horizontal"===u.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](h,r.animate),!0===u.options.range&&("horizontal"===u.orientation?(0===s&&u.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&u.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&u.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&u.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))}})}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.autocomplete.js b/static/scripts/libs/jquery/jquery.autocomplete.js index cf7a13d471f..5799d967605 100644 --- a/static/scripts/libs/jquery/jquery.autocomplete.js +++ b/static/scripts/libs/jquery/jquery.autocomplete.js @@ -1 +1 @@ -!function(t){"use strict";t.fn.autocomplete_verheul=function(e){var s;arguments.length>1?(s=e,e=arguments[1],e.url=s):"string"==typeof e&&(s=e,e={url:s});var o=t.extend({},t.fn.autocomplete_verheul.defaults,e);return this.each(function(){var e=t(this);e.data("autocompleter",new t.Autocompleter(e,t.meta?t.extend({},o,e.data()):o))})},t.fn.autocomplete_verheul.defaults={inputClass:"acInput",loadingClass:"acLoading",resultsClass:"acResults",selectClass:"acSelect",queryParamName:"q",extraParams:{},remoteDataType:!1,lineSeparator:"\n",cellSeparator:"|",minChars:2,maxItemsToShow:10,delay:400,useCache:!0,maxCacheLength:10,matchSubset:!0,matchCase:!1,matchInside:!0,mustMatch:!1,selectFirst:!1,selectOnly:!1,showResult:null,preventDefaultReturn:1,preventDefaultTab:0,autoFill:!1,filterResults:!0,filter:!0,sortResults:!0,sortFunction:null,onItemSelect:null,onNoMatch:null,onFinish:null,matchStringConverter:null,beforeUseConverter:null,autoWidth:"min-width",useDelimiter:!1,delimiterChar:",",delimiterKeyCode:188,processData:null,onError:null,enabled:!0};var e=function(e){var s,o,i=typeof e;return"string"===i?(s=e,o={}):t.isArray(e)?(s=e[0],o=e.slice(1)):"object"===i&&(s=e.value,o=e.data),s=String(s),"object"!=typeof o&&(o={}),{value:s,data:o}},s=function(t,e,s){var o=parseInt(t,10);return s=s||{},(isNaN(o)||s.min&&oe?1:t
").hide().addClass(this.options.resultsClass).css({position:"absolute"}),t("body").append(this.dom.$results),e.keydown(function(t){switch(i.lastKeyPressed_=t.keyCode,i.lastKeyPressed_){case i.options.delimiterKeyCode:i.options.useDelimiter&&i.active_&&i.selectCurrent();break;case 35:case 36:case 16:case 17:case 18:case 37:case 39:break;case 38:return t.preventDefault(),i.active_?i.focusPrev():i.activate(),!1;case 40:return t.preventDefault(),i.active_?i.focusNext():i.activate(),!1;case 9:if(i.active_&&(i.selectCurrent(),i.options.preventDefaultTab))return t.preventDefault(),!1;if(2===i.options.preventDefaultTab)return t.preventDefault(),!1;break;case 13:if(i.active_&&(i.selectCurrent(),i.options.preventDefaultReturn))return t.preventDefault(),!1;if(2===i.options.preventDefaultReturn)return t.preventDefault(),!1;break;case 27:if(i.active_)return t.preventDefault(),i.deactivate(!0),!1;break;default:i.activate()}}),e.on("paste",function(){i.activate()});var a=function(){i.deactivate(!0)};e.blur(function(){i.finishOnBlur_&&(i.finishTimeout_=setTimeout(a,200))}),e.parents("form").on("submit",a)},t.Autocompleter.prototype.position=function(){var e=this.dom.$elem.offset(),s=this.dom.$results.outerHeight(),o=t(window).outerHeight(),i=e.top+this.dom.$elem.outerHeight(),a=i+s,r={top:i,left:e.left};if(a>o){var n=e.top-s;n>=0&&(r.top=n)}this.dom.$results.css(r)},t.Autocompleter.prototype.cacheRead=function(t){var e,s,o,i,a;if(this.options.useCache)for(t=String(t),e=t.length,s=this.options.matchSubset?1:e;s<=e;){for(i=this.options.matchInside?e-s:0,a=0;a<=i;){if(o=t.substr(0,s),void 0!==this.cacheData_[o])return this.cacheData_[o];a++}s++}return!1},t.Autocompleter.prototype.cacheWrite=function(t,e){return!!this.options.useCache&&(this.cacheLength_>=this.options.maxCacheLength&&this.cacheFlush(),t=String(t),void 0!==this.cacheData_[t]&&this.cacheLength_++,this.cacheData_[t]=e,this.cacheData_[t])},t.Autocompleter.prototype.cacheFlush=function(){this.cacheData_={},this.cacheLength_=0},t.Autocompleter.prototype.callHook=function(e,s){var o=this.options[e];return!(!o||!t.isFunction(o))&&o(s,this)},t.Autocompleter.prototype.activate=function(){if(this.options.enabled){var t=this;this.keyTimeout_&&clearTimeout(this.keyTimeout_),this.keyTimeout_=setTimeout(function(){t.activateNow()},this.options.delay)}},t.Autocompleter.prototype.activateNow=function(){var t=this.beforeUseConverter(this.dom.$elem.val());t!==this.lastProcessedValue_&&t!==this.lastSelectedValue_&&this.fetchData(t)},t.Autocompleter.prototype.fetchData=function(t){var e=this,s=function(t,s){e.options.processData&&(t=e.options.processData(t)),e.showResults(e.filterResults(t,s),s)};this.lastProcessedValue_=t,t.length-1:0===i}return!0},t.Autocompleter.prototype.filterResult=function(e,s){return!1===this.options.filter||(t.isFunction(this.options.filter)?this.options.filter(e,s):this.defaultFilter(e,s))},t.Autocompleter.prototype.filterResults=function(t,s){var o,i,a=[];for(o=0;o0&&this.options.maxItemsToShow");return o.html(this.showResult(e.value,e.data)),o.data({value:e.value,data:e.data}).click(function(){s.selectItem(o)}).mousedown(s.disableFinishOnBlur).mouseup(s.enableFinishOnBlur),o},t.Autocompleter.prototype.getItems=function(){return t(">ul>li",this.dom.$results)},t.Autocompleter.prototype.showResults=function(e,s){var o,i,a,r,n=e.length,l=this,u=t("
    "),h=!1,c=!1;if(n){for(o=0;o

    ").text(e).html()},t.Autocompleter.prototype.autoFill=function(t,e){var s,o,i,a;if(this.options.autoFill&&8!==this.lastKeyPressed_&&(s=String(t).toLowerCase(),o=String(e).toLowerCase(),i=t.length,a=e.length,s.substr(0,a)===o)){var r=this.getDelimiterOffsets(),n=r.start?" ":"";this.setValue(n+t);var l=a+r.start+n.length,u=i+r.start+n.length;return this.selectRange(l,u),!0}return!1},t.Autocompleter.prototype.focusNext=function(){this.focusMove(1)},t.Autocompleter.prototype.focusPrev=function(){this.focusMove(-1)},t.Autocompleter.prototype.focusMove=function(e){var o=this.getItems();if(e=s(e,0))for(var i=0;i=o.length&&(e=o.length-1),s=t(o[e])):s=t(e),s&&s.addClass(this.selectClass_).addClass(this.options.selectClass))},t.Autocompleter.prototype.selectCurrent=function(){var e=t("li."+this.selectClass_,this.dom.$results);1===e.length?this.selectItem(e):this.deactivate(!1)},t.Autocompleter.prototype.selectItem=function(t){var e=t.data("value"),s=t.data("data"),o=this.displayValue(e,s),i=this.beforeUseConverter(o);this.lastProcessedValue_=i,this.lastSelectedValue_=i;var a=this.getDelimiterOffsets(),r=this.options.delimiterChar,n=this.dom.$elem,l=0;this.options.useDelimiter&&(n.val().substring(a.start-1,a.start)==r&&" "!=r&&(o=" "+o),n.val().substring(a.end,a.end+1)!=r&&this.lastKeyPressed_!=this.options.delimiterKeyCode?o+=r:l=1),this.setValue(o),this.setCaret(a.start+o.length+l),this.callHook("onItemSelect",{value:e,data:s}),this.deactivate(!0),n.focus()},t.Autocompleter.prototype.displayValue=function(e,s){return t.isFunction(this.options.displayValue)?this.options.displayValue(e,s):e},t.Autocompleter.prototype.hideResults=function(){this.dom.$results.hide()},t.Autocompleter.prototype.deactivate=function(t){this.finishTimeout_&&clearTimeout(this.finishTimeout_),this.keyTimeout_&&clearTimeout(this.keyTimeout_),t&&(this.lastProcessedValue_!==this.lastSelectedValue_&&(this.options.mustMatch&&this.setValue(""),this.callHook("onNoMatch")),this.active_&&this.callHook("onFinish"),this.lastKeyPressed_=null,this.lastProcessedValue_=null,this.lastSelectedValue_=null,this.active_=!1),this.hideResults()},t.Autocompleter.prototype.selectRange=function(t,e){var s=this.dom.$elem.get(0);if(s.setSelectionRange)s.focus(),s.setSelectionRange(t,e);else if(s.createTextRange){var o=s.createTextRange();o.collapse(!0),o.moveEnd("character",e),o.moveStart("character",t),o.select()}},t.Autocompleter.prototype.setCaret=function(t){this.selectRange(t,t)},t.Autocompleter.prototype.getCaret=function(){var t,e,s,o,i,a,r=this.dom.$elem,n=r[0];return n.createTextRange?(e=document.selection,"textarea"!=n.tagName.toLowerCase()?(t=r.val(),s=e.createRange().duplicate(),s.moveEnd("character",t.length),o=""===s.text?t.length:t.lastIndexOf(s.text),s=e.createRange().duplicate(),s.moveStart("character",-t.length),i=s.text.length):(s=e.createRange(),a=s.duplicate(),a.moveToElementText(n),a.setEndPoint("EndToEnd",s),o=a.text.length-s.text.length,i=o+s.text.length)):(o=r[0].selectionStart,i=r[0].selectionEnd),{start:o,end:i}},t.Autocompleter.prototype.setValue=function(t){if(this.options.useDelimiter){var e=this.dom.$elem.val(),s=this.getDelimiterOffsets();t=e.substring(0,s.start)+t+e.substring(s.end)}this.dom.$elem.val(t)},t.Autocompleter.prototype.getValue=function(t){if(this.options.useDelimiter){var e=this.getDelimiterOffsets();return t.substring(e.start,e.end).trim()}return t},t.Autocompleter.prototype.getDelimiterOffsets=function(){var t=this.dom.$elem.val();if(this.options.useDelimiter){var e=t.substring(0,this.getCaret().start),s=e.lastIndexOf(this.options.delimiterChar)+1,o=t.substring(this.getCaret().start),i=o.indexOf(this.options.delimiterChar);-1==i&&(i=t.length),i+=this.getCaret().start}else s=0,i=t.length;return{start:s,end:i}}}(jQuery); \ No newline at end of file +!function(t){"use strict";t.fn.autocomplete_verheul=function(e){var s;arguments.length>1?(s=e,(e=arguments[1]).url=s):"string"==typeof e&&(e={url:s=e});var o=t.extend({},t.fn.autocomplete_verheul.defaults,e);return this.each(function(){var e=t(this);e.data("autocompleter",new t.Autocompleter(e,t.meta?t.extend({},o,e.data()):o))})},t.fn.autocomplete_verheul.defaults={inputClass:"acInput",loadingClass:"acLoading",resultsClass:"acResults",selectClass:"acSelect",queryParamName:"q",extraParams:{},remoteDataType:!1,lineSeparator:"\n",cellSeparator:"|",minChars:2,maxItemsToShow:10,delay:400,useCache:!0,maxCacheLength:10,matchSubset:!0,matchCase:!1,matchInside:!0,mustMatch:!1,selectFirst:!1,selectOnly:!1,showResult:null,preventDefaultReturn:1,preventDefaultTab:0,autoFill:!1,filterResults:!0,filter:!0,sortResults:!0,sortFunction:null,onItemSelect:null,onNoMatch:null,onFinish:null,matchStringConverter:null,beforeUseConverter:null,autoWidth:"min-width",useDelimiter:!1,delimiterChar:",",delimiterKeyCode:188,processData:null,onError:null,enabled:!0};var e=function(e){var s,o,i=typeof e;return"string"===i?(s=e,o={}):t.isArray(e)?(s=e[0],o=e.slice(1)):"object"===i&&(s=e.value,o=e.data),s=String(s),"object"!=typeof o&&(o={}),{value:s,data:o}},s=function(t,e,s){var o=parseInt(t,10);return s=s||{},(isNaN(o)||s.min&&oe?1:t
    ").hide().addClass(this.options.resultsClass).css({position:"absolute"}),t("body").append(this.dom.$results),e.keydown(function(t){switch(i.lastKeyPressed_=t.keyCode,i.lastKeyPressed_){case i.options.delimiterKeyCode:i.options.useDelimiter&&i.active_&&i.selectCurrent();break;case 35:case 36:case 16:case 17:case 18:case 37:case 39:break;case 38:return t.preventDefault(),i.active_?i.focusPrev():i.activate(),!1;case 40:return t.preventDefault(),i.active_?i.focusNext():i.activate(),!1;case 9:if(i.active_&&(i.selectCurrent(),i.options.preventDefaultTab))return t.preventDefault(),!1;if(2===i.options.preventDefaultTab)return t.preventDefault(),!1;break;case 13:if(i.active_&&(i.selectCurrent(),i.options.preventDefaultReturn))return t.preventDefault(),!1;if(2===i.options.preventDefaultReturn)return t.preventDefault(),!1;break;case 27:if(i.active_)return t.preventDefault(),i.deactivate(!0),!1;break;default:i.activate()}}),e.on("paste",function(){i.activate()});var a=function(){i.deactivate(!0)};e.blur(function(){i.finishOnBlur_&&(i.finishTimeout_=setTimeout(a,200))}),e.parents("form").on("submit",a)},t.Autocompleter.prototype.position=function(){var e=this.dom.$elem.offset(),s=this.dom.$results.outerHeight(),o=t(window).outerHeight(),i=e.top+this.dom.$elem.outerHeight(),a=i+s,r={top:i,left:e.left};if(a>o){var n=e.top-s;n>=0&&(r.top=n)}this.dom.$results.css(r)},t.Autocompleter.prototype.cacheRead=function(t){var e,s,o,i,a;if(this.options.useCache)for(e=(t=String(t)).length,s=this.options.matchSubset?1:e;s<=e;){for(i=this.options.matchInside?e-s:0,a=0;a<=i;){if(o=t.substr(0,s),void 0!==this.cacheData_[o])return this.cacheData_[o];a++}s++}return!1},t.Autocompleter.prototype.cacheWrite=function(t,e){return!!this.options.useCache&&(this.cacheLength_>=this.options.maxCacheLength&&this.cacheFlush(),t=String(t),void 0!==this.cacheData_[t]&&this.cacheLength_++,this.cacheData_[t]=e,this.cacheData_[t])},t.Autocompleter.prototype.cacheFlush=function(){this.cacheData_={},this.cacheLength_=0},t.Autocompleter.prototype.callHook=function(e,s){var o=this.options[e];return!(!o||!t.isFunction(o))&&o(s,this)},t.Autocompleter.prototype.activate=function(){if(this.options.enabled){var t=this;this.keyTimeout_&&clearTimeout(this.keyTimeout_),this.keyTimeout_=setTimeout(function(){t.activateNow()},this.options.delay)}},t.Autocompleter.prototype.activateNow=function(){var t=this.beforeUseConverter(this.dom.$elem.val());t!==this.lastProcessedValue_&&t!==this.lastSelectedValue_&&this.fetchData(t)},t.Autocompleter.prototype.fetchData=function(t){var e=this,s=function(t,s){e.options.processData&&(t=e.options.processData(t)),e.showResults(e.filterResults(t,s),s)};this.lastProcessedValue_=t,t.length-1:0===i}return!0},t.Autocompleter.prototype.filterResult=function(e,s){return!1===this.options.filter||(t.isFunction(this.options.filter)?this.options.filter(e,s):this.defaultFilter(e,s))},t.Autocompleter.prototype.filterResults=function(t,s){var o,i,a=[];for(o=0;o0&&this.options.maxItemsToShow");return o.html(this.showResult(e.value,e.data)),o.data({value:e.value,data:e.data}).click(function(){s.selectItem(o)}).mousedown(s.disableFinishOnBlur).mouseup(s.enableFinishOnBlur),o},t.Autocompleter.prototype.getItems=function(){return t(">ul>li",this.dom.$results)},t.Autocompleter.prototype.showResults=function(e,s){var o,i,a,r,n=e.length,l=this,u=t("
      "),h=!1,c=!1;if(n){for(o=0;o

      ").text(e).html()},t.Autocompleter.prototype.autoFill=function(t,e){var s,o,i,a;if(this.options.autoFill&&8!==this.lastKeyPressed_&&(s=String(t).toLowerCase(),o=String(e).toLowerCase(),i=t.length,a=e.length,s.substr(0,a)===o)){var r=this.getDelimiterOffsets(),n=r.start?" ":"";this.setValue(n+t);var l=a+r.start+n.length,u=i+r.start+n.length;return this.selectRange(l,u),!0}return!1},t.Autocompleter.prototype.focusNext=function(){this.focusMove(1)},t.Autocompleter.prototype.focusPrev=function(){this.focusMove(-1)},t.Autocompleter.prototype.focusMove=function(e){var o=this.getItems();if(e=s(e,0))for(var i=0;i=o.length&&(e=o.length-1),s=t(o[e])):s=t(e),s&&s.addClass(this.selectClass_).addClass(this.options.selectClass))},t.Autocompleter.prototype.selectCurrent=function(){var e=t("li."+this.selectClass_,this.dom.$results);1===e.length?this.selectItem(e):this.deactivate(!1)},t.Autocompleter.prototype.selectItem=function(t){var e=t.data("value"),s=t.data("data"),o=this.displayValue(e,s),i=this.beforeUseConverter(o);this.lastProcessedValue_=i,this.lastSelectedValue_=i;var a=this.getDelimiterOffsets(),r=this.options.delimiterChar,n=this.dom.$elem,l=0;this.options.useDelimiter&&(n.val().substring(a.start-1,a.start)==r&&" "!=r&&(o=" "+o),n.val().substring(a.end,a.end+1)!=r&&this.lastKeyPressed_!=this.options.delimiterKeyCode?o+=r:l=1),this.setValue(o),this.setCaret(a.start+o.length+l),this.callHook("onItemSelect",{value:e,data:s}),this.deactivate(!0),n.focus()},t.Autocompleter.prototype.displayValue=function(e,s){return t.isFunction(this.options.displayValue)?this.options.displayValue(e,s):e},t.Autocompleter.prototype.hideResults=function(){this.dom.$results.hide()},t.Autocompleter.prototype.deactivate=function(t){this.finishTimeout_&&clearTimeout(this.finishTimeout_),this.keyTimeout_&&clearTimeout(this.keyTimeout_),t&&(this.lastProcessedValue_!==this.lastSelectedValue_&&(this.options.mustMatch&&this.setValue(""),this.callHook("onNoMatch")),this.active_&&this.callHook("onFinish"),this.lastKeyPressed_=null,this.lastProcessedValue_=null,this.lastSelectedValue_=null,this.active_=!1),this.hideResults()},t.Autocompleter.prototype.selectRange=function(t,e){var s=this.dom.$elem.get(0);if(s.setSelectionRange)s.focus(),s.setSelectionRange(t,e);else if(s.createTextRange){var o=s.createTextRange();o.collapse(!0),o.moveEnd("character",e),o.moveStart("character",t),o.select()}},t.Autocompleter.prototype.setCaret=function(t){this.selectRange(t,t)},t.Autocompleter.prototype.getCaret=function(){var t,e,s,o,i,a,r=this.dom.$elem,n=r[0];return n.createTextRange?(e=document.selection,"textarea"!=n.tagName.toLowerCase()?(t=r.val(),(s=e.createRange().duplicate()).moveEnd("character",t.length),o=""===s.text?t.length:t.lastIndexOf(s.text),(s=e.createRange().duplicate()).moveStart("character",-t.length),i=s.text.length):((a=(s=e.createRange()).duplicate()).moveToElementText(n),a.setEndPoint("EndToEnd",s),i=(o=a.text.length-s.text.length)+s.text.length)):(o=r[0].selectionStart,i=r[0].selectionEnd),{start:o,end:i}},t.Autocompleter.prototype.setValue=function(t){if(this.options.useDelimiter){var e=this.dom.$elem.val(),s=this.getDelimiterOffsets();t=e.substring(0,s.start)+t+e.substring(s.end)}this.dom.$elem.val(t)},t.Autocompleter.prototype.getValue=function(t){if(this.options.useDelimiter){var e=this.getDelimiterOffsets();return t.substring(e.start,e.end).trim()}return t},t.Autocompleter.prototype.getDelimiterOffsets=function(){var t=this.dom.$elem.val();if(this.options.useDelimiter){var e=t.substring(0,this.getCaret().start).lastIndexOf(this.options.delimiterChar)+1,s=t.substring(this.getCaret().start).indexOf(this.options.delimiterChar);-1==s&&(s=t.length),s+=this.getCaret().start}else e=0,s=t.length;return{start:e,end:s}}}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.cookie.js b/static/scripts/libs/jquery/jquery.cookie.js index 3e0f4a5ae6f..5acc4687bda 100644 --- a/static/scripts/libs/jquery/jquery.cookie.js +++ b/static/scripts/libs/jquery/jquery.cookie.js @@ -1 +1 @@ -jQuery.cookie=function(e,i,o){if(void 0===i){var n=null;if(document.cookie&&""!=document.cookie)for(var r=document.cookie.split(";"),t=0;t0?"+"+e:""+e}function _checkBrowser(){var e,t;return e=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}(navigator.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),t}function versionCompare(e,t){var i,s,n,a=(""+e).split("."),r=(""+t).split("."),o=Math.min(a.length,r.length);for(n=0;ns?1:i
      "},start:function(e,t){return!!t.helper.data("dtSourceNode")}}),t&&t.onDrop&&e.$tree.droppable({addClasses:!1,tolerance:"pointer",greedy:!1})}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},BROWSER=_checkBrowser(),jquerySupports={positionMyOfs:versionCompare($.ui.version,"1.9")>=0},DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(e,t,i){this.parent=e,this.tree=t,"string"==typeof i&&(i={title:i}),null==i.key?i.key="_"+t._nodeCount++:i.key=""+i.key,this.data=$.extend({},$.ui.dynatree.nodedatadefaults,i),this.li=null,this.span=null,this.ul=null,this.childList=null,this._isLoading=!1,this.hasSubSel=!1,this.bExpanded=!1,this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(e,t){var i,s=$.extend({},this.data);if(s.activate=this.tree.activeNode===this,s.focus=this.tree.focusNode===this,s.expand=this.bExpanded,s.select=this.bSelected,t&&t(s),e&&this.childList){s.children=[];for(var n=0,a=this.childList.length;n1&&(r+=s.tagConnector):!1!==this.hasChildren()?r+=s.tagExpander:r+=s.tagConnector,i.checkbox&&!0!==a.hideCheckbox&&!a.isStatusNode&&(r+=s.tagCheckbox),a.icon?(e="/"===a.icon.charAt(0)?a.icon:i.imagePath+a.icon,r+=""):!1===a.icon||(a.iconClass?r+="":r+=s.tagNodeIcon);var o="";if(i.onCustomRender&&(o=i.onCustomRender.call(t,this)||""),!o){var d=a.tooltip?' title="'+a.tooltip.replace(/\"/g,""")+'"':"",l=a.href||"#";o=i.noLink||a.noLink?'"+a.title+"":'"+a.title+""}return r+=o},_fixOrder:function(){var e=this.childList;if(e&&this.ul)for(var t=this.ul.firstChild,i=0,s=e.length-1;i1?this.ul.className=r.container+" "+r.noConnector:this.ul.className=r.container;if((this.bExpanded||!0===t)&&this.childList){for(var h=0,c=this.childList.length;hs?1:-1},i.sort(e),t)for(var s=0,n=i.length;s0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0,$(this.span).addClass(this.tree.options.classNames.nodeLoading),this.parent||this._setStatusNode({title:this.tree.options.strings.loading+s,tooltip:i,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1,this._setStatusNode({title:this.tree.options.strings.loadError+s,tooltip:i,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+e+"'."}},_parentList:function(e,t){for(var i=[],s=t?this:this.parent;s;)(e||s.parent)&&i.unshift(s),s=s.parent;return i},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},_getTypeForOuterNodeEvent:function(e){var t=this.tree.options.classNames,i=e.target;if(i.className.indexOf(t.node)<0)return null;for(var s=e.pageX-i.offsetLeft,n=e.pageY-i.offsetTop,a=0,r=i.childNodes.length;a=d&&s<=d+h&&n>=l&&n<=l+c){if(o.className==t.title)return"title";if(o.className==t.expander)return"expander";if(o.className==t.checkbox||o.className==t.radio)return"checkbox";if(o.className==t.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(e){var t=e&&e.target?e.target.className:"",i=this.tree.options.classNames;return t.indexOf(i.title)>=0?"title":t.indexOf(i.expander)>=0?"expander":t.indexOf(i.checkbox)>=0||t.indexOf(i.radio)>=0?"checkbox":t.indexOf(i.nodeIcon)>=0?"icon":t.indexOf(i.empty)>=0||t.indexOf(i.vline)>=0||t.indexOf(i.connector)>=0?"prefix":t.indexOf(i.node)>=0?this._getTypeForOuterNodeEvent(e):null},isVisible:function(){for(var e=this._parentList(!0,!1),t=0,i=e.length;ta").focus()}catch(e){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(e,t){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",e,t,this);var i=this.tree.options;if(!this.data.isStatusNode)if(e){if(t&&i.onQueryActivate&&!1===i.onQueryActivate.call(this.tree,e,this))return;if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}i.activeVisible&&this.makeVisible(),this.tree.activeNode=this,i.persist&&$.cookie(i.cookieId+"-active",this.data.key,i.cookie),this.tree.persistence.activeKey=this.data.key,$(this.span).addClass(i.classNames.active),t&&i.onActivate&&i.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(i.onQueryActivate&&!1===i.onQueryActivate.call(this.tree,!1,this))return;$(this.span).removeClass(i.classNames.active),i.persist&&$.cookie(i.cookieId+"-active","",i.cookie),this.tree.persistence.activeKey=null,this.tree.activeNode=null,t&&i.onDeactivate&&i.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var e=!0,t=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:e=!1,t=!0;break;case 3:e=t=!0}null===this.parent&&(t=!1),t&&(this.toggleExpand(),this.focus()),e&&this.activate()},_setSubSel:function(e){e?(this.hasSubSel=!0,$(this.span).addClass(this.tree.options.classNames.partsel)):(this.hasSubSel=!1,$(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var e;if(!this.hasChildren())return e=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),e;var t,i,s=this.childList,n=!0,a=!0;for(t=0,i=s.length;t=0&&!(t=s[n].getNextSibling());n--);t&&t.focus();break;default:i=!1}i&&e.preventDefault()},_onKeypress:function(e){},_onFocus:function(e){var t=this.tree.options;"blur"==e.type||"focusout"==e.type?(t.onBlur&&t.onBlur.call(this.tree,this),this.tree.tnFocused&&$(this.tree.tnFocused.span).removeClass(t.classNames.focused),this.tree.tnFocused=null,t.persist&&$.cookie(t.cookieId+"-focus","",t.cookie)):"focus"!=e.type&&"focusin"!=e.type||(this.tree.tnFocused&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),$(this.tree.tnFocused.span).removeClass(t.classNames.focused)),this.tree.tnFocused=this,t.onFocus&&t.onFocus.call(this.tree,this),$(this.tree.tnFocused.span).addClass(t.classNames.focused),t.persist&&$.cookie(t.cookieId+"-focus",this.data.key,t.cookie))},visit:function(e,t){var i=!0;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(this.childList)for(var s=0,n=this.childList.length;s reloading %s...",this,e,o);var d=this;o.reloadChildren(function(n,a){a?(i.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",n,e,n),t.call(i,o,"loaded"),n._loadKeyPath(s.join(i.options.keyPathSeparator),t)):(i.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",d,e),t.call(i,o,"error"))})}return}}t.call(i,void 0,"notfound",n,0===s.length),i.logWarning("Node not found: "+n)},resetLazy:function(){if(null===this.parent)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1),this.removeChildren()},_addChildNode:function(e,t){var i=this.tree,s=i.options,n=i.persistence;if(e.parent=this,null===this.childList?this.childList=[]:t||this.childList.length>0&&$(this.childList[this.childList.length-1].span).removeClass(s.classNames.lastsib),t){var a=$.inArray(t,this.childList);if(a<0)throw" must be a child of ";this.childList.splice(a,0,e)}else this.childList.push(e);var r=i.isInitializing();if(s.persist&&n.cookiesFound&&r?(n.activeKey===e.data.key&&(i.activeNode=e),n.focusedKey===e.data.key&&(i.focusNode=e),e.bExpanded=$.inArray(e.data.key,n.expandedKeyList)>=0,e.bSelected=$.inArray(e.data.key,n.selectedKeyList)>=0):(e.data.activate&&(i.activeNode=e,s.persist&&(n.activeKey=e.data.key)),e.data.focus&&(i.focusNode=e,s.persist&&(n.focusedKey=e.data.key)),e.bExpanded=!0===e.data.expand,e.bExpanded&&s.persist&&n.addExpand(e.data.key),e.bSelected=!0===e.data.select,e.bSelected&&s.persist&&n.addSelect(e.data.key)),s.minExpandLevel>=e.getLevel()&&(this.bExpanded=!0),e.bSelected&&3==s.selectMode)for(var o=this;o;)o.hasSubSel||o._setSubSel(!0),o=o.parent;return i.bEnableUpdate&&this.render(),e},addChild:function(e,t){if("string"==typeof e)throw"Invalid data type for "+e;if(e&&0!==e.length){if(e instanceof DynaTreeNode)return this._addChildNode(e,t);e.length||(e=[e]);for(var i=this.tree.enableUpdate(!1),s=null,n=0,a=e.length;n=0&&(this.expandedKeyList.splice(t,1),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(e){$.inArray(e,this.selectedKeyList)<0&&(this.selectedKeyList.push(e),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(e){var t=$.inArray(e,this.selectedKeyList);t>=0&&(this.selectedKeyList.splice(t,1),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return!0===this.cookiesFound},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:void 0};var DynaTree=Class.create();DynaTree.version="@@Version",DynaTree.prototype={initialize:function(e){this.phase="init",this.$widget=e,this.options=e.options,this.$tree=e.element,this.timer=null,this.divTree=this.$tree.get(0),_initDragAndDrop(this)},_load:function(e){var t=(this.$widget,this.options),i=this;this.bEnableUpdate=!0,this._nodeCount=1,this.activeNode=null,this.focusNode=null,void 0!==t.rootVisible&&this.logWarning("Option 'rootVisible' is no longer supported."),t.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),t.minExpandLevel=1),t.classNames!==$.ui.dynatree.prototype.options.classNames&&(t.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,t.classNames)),t.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults&&(t.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,t.ajaxDefaults)),t.dnd!==$.ui.dynatree.prototype.options.dnd&&(t.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,t.dnd)),t.imagePath||$("script").each(function(){var e=/.*dynatree[^\/]*\.js$/i;if(this.src.search(e)>=0)return this.src.indexOf("/")>=0?t.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":t.imagePath="skin/",i.logDebug("Guessing imagePath from '%s': '%s'",this.src,t.imagePath),!1}),this.persistence=new DynaTreeStatus(t.cookieId,t.cookie),t.persist&&($.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read()),this.logDebug("DynaTree.persistence: %o",this.persistence.toDict()),this.cache={tagEmpty:"",tagVline:"",tagExpander:"",tagConnector:"",tagNodeIcon:"",tagCheckbox:"",lastentry:void 0},(t.children||t.initAjax&&t.initAjax.url||t.initId)&&$(this.divTree).empty();var s=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{}),this.tnRoot.bExpanded=!0,this.tnRoot.render(),this.divTree.appendChild(this.tnRoot.ul);var n=this.tnRoot,a=t.persist&&this.persistence.isReloading(),r=!1,o=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure..."),t.children?n.addChild(t.children):t.initAjax&&t.initAjax.url?(r=!0,n.data.isLazy=!0,this._reloadAjax(e)):t.initId?this._createFromTag(n,$("#"+t.initId)):(this._createFromTag(n,s),s.remove()),this._checkConsistency(),r||3!=t.selectMode||n._updatePartSelectionState(),this.logDebug("Dynatree._load(): render nodes..."),this.enableUpdate(o),this.logDebug("Dynatree._load(): bind events..."),this.$widget.bind(),this.logDebug("Dynatree._load(): postInit..."),this.phase="postInit",t.persist&&this.persistence.write(),this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus()),r||(t.onPostInit&&t.onPostInit.call(this,a,!1),e&&e.call(this,"ok")),this.phase="idle"},_reloadAjax:function(e){var t=this.options;if(!t.initAjax||!t.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";var i=this.persistence,s=$.extend({},t.initAjax);s.addActiveKey&&(s.data.activeKey=i.activeKey),s.addFocusedKey&&(s.data.focusedKey=i.focusedKey),s.addExpandedKeyList&&(s.data.expandedKeyList=i.expandedKeyList.join(",")),s.addSelectedKeyList&&(s.data.selectedKeyList=i.selectedKeyList.join(",")),s.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead."),s.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");var n=i.isReloading();s.success=function(i,s,a){3==t.selectMode&&i.tree.tnRoot._updatePartSelectionState(),t.onPostInit&&t.onPostInit.call(i.tree,n,!1),e&&e.call(i.tree,"ok")},s.error=function(i,s,a,r){t.onPostInit&&t.onPostInit.call(i.tree,n,!0,s,a,r),e&&e.call(i.tree,"error",s,a,r)},this.logDebug("Dynatree._init(): send Ajax request..."),this.tnRoot.appendAjax(s)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(e){var t=this.tnRoot.toDict(!0) -;return e?t:t.children},serializeArray:function(e){for(var t=this.getSelectedNodes(e),i=this.$tree.attr("name")||this.$tree.attr("id"),s=[],n=0,a=t.length;n=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(e){Array.prototype.unshift.apply(arguments,["warn"]),_log.apply(this,arguments)},isInitializing:function(){return"init"==this.phase||"postInit"==this.phase},isReloading:function(){return("init"==this.phase||"postInit"==this.phase)&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return"userEvent"==this.phase},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(e){this._load(e)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(e){var t=document.getElementById(this.options.idPrefix+e);if(t)return t.dtnode?t.dtnode:null;var i=null;return this.visit(function(t){if(t.data.key===e)return i=t,!1},!0),i},getActiveNode:function(){return this.activeNode},reactivate:function(e){var t=this.activeNode;t&&(this.activeNode=null,t.activate(),e&&t.focus())},getSelectedNodes:function(e){var t=[];return this.tnRoot.visit(function(i){if(i.bSelected&&(t.push(i),!0===e))return"skip"}),t},activateKey:function(e){var t=null===e?null:this.getNodeByKey(e);return t?(t.focus(),t.activate(),t):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(e,t){var i=e.split(this.options.keyPathSeparator);return""===i[0]&&i.shift(),i[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),i.shift()),e=i.join(this.options.keyPathSeparator),this.tnRoot._loadKeyPath(e,t)},selectKey:function(e,t){var i=this.getNodeByKey(e);return i?(i.select(t),i):null},enableUpdate:function(e){return this.bEnableUpdate==e?e:(this.bEnableUpdate=e,e&&this.redraw(),!e)},count:function(){return this.tnRoot.countChildren()},visit:function(e,t){return this.tnRoot.visit(e,t)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip;if($liSpan.length)title=$liSpan.html();else if($liA.length)title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title");else{title=$li.html();var iPos=title.search(/
        =0?$.trim(title.substring(0,iPos)):$.trim(title)}var data={title:title,tooltip:tooltip,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")};if(href&&(data.href=href,data.target=target),$li.attr("title")&&(data.tooltip=$li.attr("title")),$li.attr("id")&&(data.key=""+$li.attr("id")),$li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){"{"!=dataAttr.charAt(0)&&(dataAttr="{"+dataAttr+"}");try{$.extend(data,eval("("+dataAttr+")"))}catch(e){throw"Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'"}}}var childNode=parentTreeNode.addChild(data),$ul=$li.find(">ul:first");$ul.length&&self._createFromTag(childNode,$ul)})},_checkConsistency:function(){},_setDndStatus:function(e,t,i,s,n){var a,r=e?$(e.span):null,o=$(t.span),d=0,l="center";if(this.$dndMarker||(this.$dndMarker=$("
        ").hide().css({"z-index":1e3}).prependTo($(this.divTree).parent())),"after"===s||"before"===s||"over"===s){switch(s){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-before"),l="top";break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-after"),l="bottom";break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before"),this.$dndMarker.addClass("dynatree-drop-over"),o.addClass("dynatree-drop-target"),d=8}a=jquerySupports.positionMyOfs?{my:"left"+offsetString(d)+" center",at:"left "+l,of:o}:{my:"left center",at:"left "+l,of:o,offset:d+" 0"},this.$dndMarker.show().position(a)}else o.removeClass("dynatree-drop-target"),this.$dndMarker.hide();"after"===s?o.addClass("dynatree-drop-after"):o.removeClass("dynatree-drop-after"),"before"===s?o.addClass("dynatree-drop-before"):o.removeClass("dynatree-drop-before"),!0===n?(r&&r.addClass("dynatree-drop-accept"),o.addClass("dynatree-drop-accept"),i.addClass("dynatree-drop-accept")):(r&&r.removeClass("dynatree-drop-accept"),o.removeClass("dynatree-drop-accept"),i.removeClass("dynatree-drop-accept")),!1===n?(r&&r.addClass("dynatree-drop-reject"),o.addClass("dynatree-drop-reject"),i.addClass("dynatree-drop-reject")):(r&&r.removeClass("dynatree-drop-reject"),o.removeClass("dynatree-drop-reject"),i.removeClass("dynatree-drop-reject"))},_onDragEvent:function(e,t,i,s,n,a){var r,o,d,l=this.options.dnd,h=null,c=$(t.span);switch(e){case"helper":var u=$("
        ").append(c.find(".dynatree-title").clone());$("ul.dynatree-container",t.tree.divTree).append(u),u.data("dtSourceNode",t),h=u;break;case"start":t.isStatusNode()?h=!1:l.onDragStart&&(h=l.onDragStart(t)),!1===h?(this.logDebug("tree.onDragStart() cancelled"),n.helper.trigger("mouseup"),n.helper.hide()):c.addClass("dynatree-drag-source");break;case"enter":d=l.onDragEnter?l.onDragEnter(t,i,n,a):null,h=!!d&&($.isArray(d)?{over:$.inArray("over",d)>=0,before:$.inArray("before",d)>=0,after:$.inArray("after",d)>=0}:{over:!0===d||"over"===d,before:!0===d||"before"===d,after:!0===d||"after"===d}),n.helper.data("enterResponse",h);break;case"over":if(o=n.helper.data("enterResponse"),r=null,!1===o);else if("string"==typeof o)r=o;else{var p=c.offset(),f={x:s.pageX-p.left,y:s.pageY-p.top},y={x:f.x/c.width(),y:f.y/c.height()};o.after&&y.y>.75?r="after":!o.over&&o.after&&y.y>.5?r="after":o.before&&y.y<=.25?r="before":!o.over&&o.before&&y.y<=.5?r="before":o.over&&(r="over"),l.preventVoidMoves&&(t===i?r=null:"before"===r&&i&&t===i.getNextSibling()?r=null:"after"===r&&i&&t===i.getPrevSibling()?r=null:"over"===r&&i&&i.parent===t&&i.isLastSibling()&&(r=null)),n.helper.data("hitMode",r)}"over"===r&&l.autoExpandMS&&!1!==t.hasChildren()&&!t.bExpanded&&t.scheduleAction("expand",l.autoExpandMS),r&&l.onDragOver&&("over"!==(h=l.onDragOver(t,i,r,n,a))&&"before"!==h&&"after"!==h||(r=h)),this._setDndStatus(i,t,n.helper,r,!1!==h&&null!==r);break;case"drop":var g=n.helper.hasClass("dynatree-drop-reject");r=n.helper.data("hitMode"),r&&l.onDrop&&!g&&l.onDrop(t,i,r,n,a);break;case"leave":t.scheduleAction("cancel"),n.helper.data("enterResponse",null),n.helper.data("hitMode",null),this._setDndStatus(i,t,n.helper,"out",void 0),l.onDragLeave&&l.onDragLeave(t,i,n,a);break;case"stop":c.removeClass("dynatree-drag-source"),l.onDragStop&&l.onDragStop(t);break;default:throw"Unsupported drag event: "+e}return h},cancelDrag:function(){var e=$.ui.ddmanager.current;e&&e.cancel()},lastentry:void 0},$.widget("ui.dynatree",{_init:function(){if(versionCompare($.ui.version,"1.8")<0)return this.options.debugLevel>=0&&_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher."),this._create();this.options.debugLevel>=2&&_log("debug","ui.dynatree._init() was called; no current default functionality.")},_create:function(){this.options.debugLevel>=1&&logMsg("Dynatree._create(): version='%s', debugLevel=%o.",$.ui.dynatree.version,this.options.debugLevel),this.options.event+=".dynatree";this.element.get(0);this.tree=new DynaTree(this),this.tree._load(),this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function e(e){e=$.event.fix(e||window.event);var t=$.ui.dynatree.getNode(e.target);return!!t&&t._onFocus(e)}this.unbind();var t="click.dynatree dblclick.dynatree";this.options.keyboard&&(t+=" keypress.dynatree keydown.dynatree"),this.element.bind(t,function(e){var t=$.ui.dynatree.getNode(e.target);if(!t)return!0;var i=t.tree,s=i.options;i.logDebug("event(%s): dtnode: %s",e.type,t);var n=i.phase;i.phase="userEvent";try{switch(e.type){case"click":return(!s.onClick||!1!==s.onClick.call(i,t,e))&&t._onClick(e);case"dblclick":return(!s.onDblClick||!1!==s.onDblClick.call(i,t,e))&&t._onDblClick(e);case"keydown":return(!s.onKeydown||!1!==s.onKeydown.call(i,t,e))&&t._onKeydown(e);case"keypress":return(!s.onKeypress||!1!==s.onKeypress.call(i,t,e))&&t._onKeypress(e)}}catch(s){i.logWarning("bind(%o): dtnode: %o, error: %o",e,t,s)}finally{i.phase=n}});var i=this.tree.divTree;i.addEventListener?(i.addEventListener("focus",e,!0),i.addEventListener("blur",e,!0)):i.onfocusin=i.onfocusout=e},unbind:function(){this.element.unbind(".dynatree")},enable:function(){this.bind(),$.Widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind(),$.Widget.prototype.disable.apply(this,arguments)},getTree:function(){return this.tree},getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:void 0}),versionCompare($.ui.version,"1.8")<0&&($.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes"),$.extend($.ui.dynatree,{version:"1.2.8",buildType:"release",_DynaTreeClass:DynaTree,_DynaTreeNodeClass:DynaTreeNode,getNode:function(e){if(e instanceof DynaTreeNode)return e;for(void 0!==e.selector&&(e=e[0]);e;){if(e.dtnode)return e.dtnode;e=e.parentNode}return null},getPersistData:DynaTreeStatus._getTreePersistData}),$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:!0,keyboard:!0,persist:!1,autoCollapse:!1,clickFolderMode:3,activeVisible:!0,checkbox:!1,selectMode:2,fx:null,noLink:!1,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onCreate:null,onRender:null,postProcess:null,dnd:{onDragStart:null,onDragStop:null,revert:!1,autoExpandMS:1e3,preventVoidMoves:!0,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:!1,timeout:0,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:!1,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",radio:"dynatree-radio",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:1,lastentry:void 0},versionCompare($.ui.version,"1.8")<0&&($.ui.dynatree.defaults=$.ui.dynatree.prototype.options),$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:!1,isLazy:!1,tooltip:null,href:null,icon:null,addClass:null,noLink:!1,activate:!1,focus:!1,expand:!1,select:!1,hideCheckbox:!1,unselectable:!1,children:null,lastentry:void 0};var didRegisterDnd=!1,_registerDnd=function(){didRegisterDnd||($.ui.plugin.add("draggable","connectToDynatree",{start:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null;if(s)return i.offset.click.top=-2,i.offset.click.left=16,s.tree._onDragEvent("start",s,null,e,t,i)},drag:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null,n=t.helper.data("dtTargetNode")||null,a=$.ui.dynatree.getNode(e.target);if(e.target&&!a){if($(e.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0)return}t.helper.data("dtTargetNode",a),n&&n!==a&&n.tree._onDragEvent("leave",n,s,e,t,i),a&&a.tree.options.dnd.onDrop&&(a===n?a.tree._onDragEvent("over",a,s,e,t,i):a.tree._onDragEvent("enter",a,s,e,t,i))},stop:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null,n=t.helper.data("dtTargetNode")||null,a=e.type,r="mouseup"==a&&1==e.which;logMsg("draggable-connectToDynatree.stop: targetNode(from event): %s, dtTargetNode: %s",n,t.helper.data("dtTargetNode")),r||logMsg("Drag was cancelled"),n&&(r&&n.tree._onDragEvent("drop",n,s,e,t,i),n.tree._onDragEvent("leave",n,s,e,t,i)),s&&s.tree._onDragEvent("stop",s,null,e,t,i)}}),didRegisterDnd=!0)}}(jQuery); \ No newline at end of file +function _log(e,t){if(_canLog){var i=Array.prototype.slice.apply(arguments,[1]),s=new Date,n=s.getHours()+":"+s.getMinutes()+":"+s.getSeconds()+"."+s.getMilliseconds();i[0]=n+" - "+i[0];try{switch(e){case"info":window.console.info.apply(window.console,i);break;case"warn":window.console.warn.apply(window.console,i);break;default:window.console.log.apply(window.console,i)}}catch(e){window.console?-2146827850===e.number&&window.console.log(i.join(", ")):_canLog=!1}}}function logMsg(e){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)}var _canLog=!0,getDynaTreePersistData=null,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;!function($){function getDtNodeFromElement(e){return alert("getDtNodeFromElement is deprecated"),$.ui.dynatree.getNode(e)}function noop(){}function offsetString(e){return 0===e?"":e>0?"+"+e:""+e}function _checkBrowser(){var e,t;return e=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}(navigator.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),t}function versionCompare(e,t){var i,s,n,a=(""+e).split("."),r=(""+t).split("."),o=Math.min(a.length,r.length);for(n=0;ns?1:i
      "},start:function(e,t){return!!t.helper.data("dtSourceNode")}}),t&&t.onDrop&&e.$tree.droppable({addClasses:!1,tolerance:"pointer",greedy:!1})}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},BROWSER=_checkBrowser(),jquerySupports={positionMyOfs:versionCompare($.ui.version,"1.9")>=0},DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(e,t,i){this.parent=e,this.tree=t,"string"==typeof i&&(i={title:i}),null==i.key?i.key="_"+t._nodeCount++:i.key=""+i.key,this.data=$.extend({},$.ui.dynatree.nodedatadefaults,i),this.li=null,this.span=null,this.ul=null,this.childList=null,this._isLoading=!1,this.hasSubSel=!1,this.bExpanded=!1,this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(e,t){var i,s=$.extend({},this.data);if(s.activate=this.tree.activeNode===this,s.focus=this.tree.focusNode===this,s.expand=this.bExpanded,s.select=this.bSelected,t&&t(s),e&&this.childList){s.children=[];for(var n=0,a=this.childList.length;n1&&(a+=i.tagConnector):!1!==this.hasChildren()?a+=i.tagExpander:a+=i.tagConnector,t.checkbox&&!0!==n.hideCheckbox&&!n.isStatusNode&&(a+=i.tagCheckbox),n.icon?a+="":!1===n.icon||(n.iconClass?a+="":a+=i.tagNodeIcon);var r="";if(t.onCustomRender&&(r=t.onCustomRender.call(e,this)||""),!r){var o=n.tooltip?' title="'+n.tooltip.replace(/\"/g,""")+'"':"",d=n.href||"#";r=t.noLink||n.noLink?'"+n.title+"":'"+n.title+""}return a+=r},_fixOrder:function(){var e=this.childList;if(e&&this.ul)for(var t=this.ul.firstChild,i=0,s=e.length-1;i1?this.ul.className=r.container+" "+r.noConnector:this.ul.className=r.container;if((this.bExpanded||!0===t)&&this.childList){for(var h=0,c=this.childList.length;hs?1:-1},i.sort(e),t)for(var s=0,n=i.length;s0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0,$(this.span).addClass(this.tree.options.classNames.nodeLoading),this.parent||this._setStatusNode({title:this.tree.options.strings.loading+s,tooltip:i,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1,this._setStatusNode({title:this.tree.options.strings.loadError+s,tooltip:i,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+e+"'."}},_parentList:function(e,t){for(var i=[],s=t?this:this.parent;s;)(e||s.parent)&&i.unshift(s),s=s.parent;return i},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},_getTypeForOuterNodeEvent:function(e){var t=this.tree.options.classNames,i=e.target;if(i.className.indexOf(t.node)<0)return null;for(var s=e.pageX-i.offsetLeft,n=e.pageY-i.offsetTop,a=0,r=i.childNodes.length;a=d&&s<=d+h&&n>=l&&n<=l+c){if(o.className==t.title)return"title";if(o.className==t.expander)return"expander";if(o.className==t.checkbox||o.className==t.radio)return"checkbox";if(o.className==t.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(e){var t=e&&e.target?e.target.className:"",i=this.tree.options.classNames;return t.indexOf(i.title)>=0?"title":t.indexOf(i.expander)>=0?"expander":t.indexOf(i.checkbox)>=0||t.indexOf(i.radio)>=0?"checkbox":t.indexOf(i.nodeIcon)>=0?"icon":t.indexOf(i.empty)>=0||t.indexOf(i.vline)>=0||t.indexOf(i.connector)>=0?"prefix":t.indexOf(i.node)>=0?this._getTypeForOuterNodeEvent(e):null},isVisible:function(){for(var e=this._parentList(!0,!1),t=0,i=e.length;ta").focus()}catch(e){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(e,t){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",e,t,this);var i=this.tree.options;if(!this.data.isStatusNode)if(e){if(t&&i.onQueryActivate&&!1===i.onQueryActivate.call(this.tree,e,this))return;if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}i.activeVisible&&this.makeVisible(),this.tree.activeNode=this,i.persist&&$.cookie(i.cookieId+"-active",this.data.key,i.cookie),this.tree.persistence.activeKey=this.data.key,$(this.span).addClass(i.classNames.active),t&&i.onActivate&&i.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(i.onQueryActivate&&!1===i.onQueryActivate.call(this.tree,!1,this))return;$(this.span).removeClass(i.classNames.active),i.persist&&$.cookie(i.cookieId+"-active","",i.cookie),this.tree.persistence.activeKey=null,this.tree.activeNode=null,t&&i.onDeactivate&&i.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var e=!0,t=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:e=!1,t=!0;break;case 3:e=t=!0}null===this.parent&&(t=!1),t&&(this.toggleExpand(),this.focus()),e&&this.activate()},_setSubSel:function(e){e?(this.hasSubSel=!0,$(this.span).addClass(this.tree.options.classNames.partsel)):(this.hasSubSel=!1,$(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var e;if(!this.hasChildren())return e=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),e;var t,i,s=this.childList,n=!0,a=!0;for(t=0,i=s.length;t=0&&!(t=s[n].getNextSibling());n--);t&&t.focus();break;default:i=!1}i&&e.preventDefault()},_onKeypress:function(e){},_onFocus:function(e){var t=this.tree.options;"blur"==e.type||"focusout"==e.type?(t.onBlur&&t.onBlur.call(this.tree,this),this.tree.tnFocused&&$(this.tree.tnFocused.span).removeClass(t.classNames.focused),this.tree.tnFocused=null,t.persist&&$.cookie(t.cookieId+"-focus","",t.cookie)):"focus"!=e.type&&"focusin"!=e.type||(this.tree.tnFocused&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),$(this.tree.tnFocused.span).removeClass(t.classNames.focused)),this.tree.tnFocused=this,t.onFocus&&t.onFocus.call(this.tree,this),$(this.tree.tnFocused.span).addClass(t.classNames.focused),t.persist&&$.cookie(t.cookieId+"-focus",this.data.key,t.cookie))},visit:function(e,t){var i=!0;if(!0===t&&(!1===(i=e(this))||"skip"===i))return i;if(this.childList)for(var s=0,n=this.childList.length;s reloading %s...",this,e,o);var d=this;o.reloadChildren(function(n,a){a?(i.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",n,e,n),t.call(i,o,"loaded"),n._loadKeyPath(s.join(i.options.keyPathSeparator),t)):(i.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",d,e),t.call(i,o,"error"))})}return}}t.call(i,void 0,"notfound",n,0===s.length),i.logWarning("Node not found: "+n)},resetLazy:function(){if(null===this.parent)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1),this.removeChildren()},_addChildNode:function(e,t){var i=this.tree,s=i.options,n=i.persistence;if(e.parent=this,null===this.childList?this.childList=[]:t||this.childList.length>0&&$(this.childList[this.childList.length-1].span).removeClass(s.classNames.lastsib),t){var a=$.inArray(t,this.childList);if(a<0)throw" must be a child of ";this.childList.splice(a,0,e)}else this.childList.push(e);var r=i.isInitializing();if(s.persist&&n.cookiesFound&&r?(n.activeKey===e.data.key&&(i.activeNode=e),n.focusedKey===e.data.key&&(i.focusNode=e),e.bExpanded=$.inArray(e.data.key,n.expandedKeyList)>=0,e.bSelected=$.inArray(e.data.key,n.selectedKeyList)>=0):(e.data.activate&&(i.activeNode=e,s.persist&&(n.activeKey=e.data.key)),e.data.focus&&(i.focusNode=e,s.persist&&(n.focusedKey=e.data.key)),e.bExpanded=!0===e.data.expand,e.bExpanded&&s.persist&&n.addExpand(e.data.key),e.bSelected=!0===e.data.select,e.bSelected&&s.persist&&n.addSelect(e.data.key)),s.minExpandLevel>=e.getLevel()&&(this.bExpanded=!0),e.bSelected&&3==s.selectMode)for(var o=this;o;)o.hasSubSel||o._setSubSel(!0),o=o.parent;return i.bEnableUpdate&&this.render(),e},addChild:function(e,t){if("string"==typeof e)throw"Invalid data type for "+e;if(e&&0!==e.length){if(e instanceof DynaTreeNode)return this._addChildNode(e,t);e.length||(e=[e]);for(var i=this.tree.enableUpdate(!1),s=null,n=0,a=e.length;n=0&&(this.expandedKeyList.splice(t,1),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(e){$.inArray(e,this.selectedKeyList)<0&&(this.selectedKeyList.push(e),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(e){var t=$.inArray(e,this.selectedKeyList);t>=0&&(this.selectedKeyList.splice(t,1),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return!0===this.cookiesFound},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:void 0};var DynaTree=Class.create();DynaTree.version="@@Version",DynaTree.prototype={initialize:function(e){this.phase="init",this.$widget=e,this.options=e.options,this.$tree=e.element,this.timer=null,this.divTree=this.$tree.get(0),_initDragAndDrop(this)},_load:function(e){this.$widget;var t=this.options,i=this;this.bEnableUpdate=!0,this._nodeCount=1,this.activeNode=null,this.focusNode=null,void 0!==t.rootVisible&&this.logWarning("Option 'rootVisible' is no longer supported."),t.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),t.minExpandLevel=1),t.classNames!==$.ui.dynatree.prototype.options.classNames&&(t.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,t.classNames)),t.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults&&(t.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,t.ajaxDefaults)),t.dnd!==$.ui.dynatree.prototype.options.dnd&&(t.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,t.dnd)),t.imagePath||$("script").each(function(){var e=/.*dynatree[^\/]*\.js$/i;if(this.src.search(e)>=0)return this.src.indexOf("/")>=0?t.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":t.imagePath="skin/",i.logDebug("Guessing imagePath from '%s': '%s'",this.src,t.imagePath),!1}),this.persistence=new DynaTreeStatus(t.cookieId,t.cookie),t.persist&&($.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read()),this.logDebug("DynaTree.persistence: %o",this.persistence.toDict()),this.cache={tagEmpty:"",tagVline:"",tagExpander:"",tagConnector:"",tagNodeIcon:"",tagCheckbox:"",lastentry:void 0},(t.children||t.initAjax&&t.initAjax.url||t.initId)&&$(this.divTree).empty();var s=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{}),this.tnRoot.bExpanded=!0,this.tnRoot.render(),this.divTree.appendChild(this.tnRoot.ul);var n=this.tnRoot,a=t.persist&&this.persistence.isReloading(),r=!1,o=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure..."),t.children?n.addChild(t.children):t.initAjax&&t.initAjax.url?(r=!0,n.data.isLazy=!0,this._reloadAjax(e)):t.initId?this._createFromTag(n,$("#"+t.initId)):(this._createFromTag(n,s),s.remove()),this._checkConsistency(),r||3!=t.selectMode||n._updatePartSelectionState(),this.logDebug("Dynatree._load(): render nodes..."),this.enableUpdate(o),this.logDebug("Dynatree._load(): bind events..."),this.$widget.bind(),this.logDebug("Dynatree._load(): postInit..."),this.phase="postInit",t.persist&&this.persistence.write(),this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus()),r||(t.onPostInit&&t.onPostInit.call(this,a,!1),e&&e.call(this,"ok")),this.phase="idle"},_reloadAjax:function(e){var t=this.options;if(!t.initAjax||!t.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";var i=this.persistence,s=$.extend({},t.initAjax);s.addActiveKey&&(s.data.activeKey=i.activeKey),s.addFocusedKey&&(s.data.focusedKey=i.focusedKey),s.addExpandedKeyList&&(s.data.expandedKeyList=i.expandedKeyList.join(",")),s.addSelectedKeyList&&(s.data.selectedKeyList=i.selectedKeyList.join(",")),s.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead."),s.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");var n=i.isReloading();s.success=function(i,s,a){3==t.selectMode&&i.tree.tnRoot._updatePartSelectionState(),t.onPostInit&&t.onPostInit.call(i.tree,n,!1),e&&e.call(i.tree,"ok")},s.error=function(i,s,a,r){t.onPostInit&&t.onPostInit.call(i.tree,n,!0,s,a,r),e&&e.call(i.tree,"error",s,a,r)},this.logDebug("Dynatree._init(): send Ajax request..."),this.tnRoot.appendAjax(s)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(e){var t=this.tnRoot.toDict(!0);return e?t:t.children},serializeArray:function(e){for(var t=this.getSelectedNodes(e),i=this.$tree.attr("name")||this.$tree.attr("id"),s=[],n=0,a=t.length;n=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(e){Array.prototype.unshift.apply(arguments,["warn"]),_log.apply(this,arguments)},isInitializing:function(){return"init"==this.phase||"postInit"==this.phase},isReloading:function(){return("init"==this.phase||"postInit"==this.phase)&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return"userEvent"==this.phase},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(e){this._load(e)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(e){var t=document.getElementById(this.options.idPrefix+e);if(t)return t.dtnode?t.dtnode:null;var i=null;return this.visit(function(t){if(t.data.key===e)return i=t,!1},!0),i},getActiveNode:function(){return this.activeNode},reactivate:function(e){var t=this.activeNode;t&&(this.activeNode=null,t.activate(),e&&t.focus())},getSelectedNodes:function(e){var t=[];return this.tnRoot.visit(function(i){if(i.bSelected&&(t.push(i),!0===e))return"skip"}),t},activateKey:function(e){var t=null===e?null:this.getNodeByKey(e);return t?(t.focus(),t.activate(),t):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(e,t){var i=e.split(this.options.keyPathSeparator);return""===i[0]&&i.shift(),i[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),i.shift()),e=i.join(this.options.keyPathSeparator),this.tnRoot._loadKeyPath(e,t)},selectKey:function(e,t){var i=this.getNodeByKey(e);return i?(i.select(t),i):null},enableUpdate:function(e){return this.bEnableUpdate==e?e:(this.bEnableUpdate=e,e&&this.redraw(),!e)},count:function(){return this.tnRoot.countChildren()},visit:function(e,t){return this.tnRoot.visit(e,t)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip;if($liSpan.length)title=$liSpan.html();else if($liA.length)title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title");else{title=$li.html();var iPos=title.search(/
        =0?$.trim(title.substring(0,iPos)):$.trim(title)}var data={title:title,tooltip:tooltip,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")};if(href&&(data.href=href,data.target=target),$li.attr("title")&&(data.tooltip=$li.attr("title")),$li.attr("id")&&(data.key=""+$li.attr("id")),$li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){"{"!=dataAttr.charAt(0)&&(dataAttr="{"+dataAttr+"}");try{$.extend(data,eval("("+dataAttr+")"))}catch(e){throw"Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'"}}}var childNode=parentTreeNode.addChild(data),$ul=$li.find(">ul:first");$ul.length&&self._createFromTag(childNode,$ul)})},_checkConsistency:function(){},_setDndStatus:function(e,t,i,s,n){var a,r=e?$(e.span):null,o=$(t.span),d=0,l="center";if(this.$dndMarker||(this.$dndMarker=$("
        ").hide().css({"z-index":1e3}).prependTo($(this.divTree).parent())),"after"===s||"before"===s||"over"===s){switch(s){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-before"),l="top";break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-after"),l="bottom";break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before"),this.$dndMarker.addClass("dynatree-drop-over"),o.addClass("dynatree-drop-target"),d=8}a=jquerySupports.positionMyOfs?{my:"left"+offsetString(d)+" center",at:"left "+l,of:o}:{my:"left center",at:"left "+l,of:o,offset:d+" 0"},this.$dndMarker.show().position(a)}else o.removeClass("dynatree-drop-target"),this.$dndMarker.hide();"after"===s?o.addClass("dynatree-drop-after"):o.removeClass("dynatree-drop-after"),"before"===s?o.addClass("dynatree-drop-before"):o.removeClass("dynatree-drop-before"),!0===n?(r&&r.addClass("dynatree-drop-accept"),o.addClass("dynatree-drop-accept"),i.addClass("dynatree-drop-accept")):(r&&r.removeClass("dynatree-drop-accept"),o.removeClass("dynatree-drop-accept"),i.removeClass("dynatree-drop-accept")),!1===n?(r&&r.addClass("dynatree-drop-reject"),o.addClass("dynatree-drop-reject"),i.addClass("dynatree-drop-reject")):(r&&r.removeClass("dynatree-drop-reject"),o.removeClass("dynatree-drop-reject"),i.removeClass("dynatree-drop-reject"))},_onDragEvent:function(e,t,i,s,n,a){var r,o,d,l=this.options.dnd,h=null,c=$(t.span);switch(e){case"helper":var u=$("
        ").append(c.find(".dynatree-title").clone());$("ul.dynatree-container",t.tree.divTree).append(u),u.data("dtSourceNode",t),h=u;break;case"start":t.isStatusNode()?h=!1:l.onDragStart&&(h=l.onDragStart(t)),!1===h?(this.logDebug("tree.onDragStart() cancelled"),n.helper.trigger("mouseup"),n.helper.hide()):c.addClass("dynatree-drag-source");break;case"enter":h=!!(d=l.onDragEnter?l.onDragEnter(t,i,n,a):null)&&($.isArray(d)?{over:$.inArray("over",d)>=0,before:$.inArray("before",d)>=0,after:$.inArray("after",d)>=0}:{over:!0===d||"over"===d,before:!0===d||"before"===d,after:!0===d||"after"===d}),n.helper.data("enterResponse",h);break;case"over":if(o=n.helper.data("enterResponse"),r=null,!1===o);else if("string"==typeof o)r=o;else{var p=c.offset(),f={x:s.pageX-p.left,y:s.pageY-p.top},y={x:f.x/c.width(),y:f.y/c.height()};o.after&&y.y>.75?r="after":!o.over&&o.after&&y.y>.5?r="after":o.before&&y.y<=.25?r="before":!o.over&&o.before&&y.y<=.5?r="before":o.over&&(r="over"),l.preventVoidMoves&&(t===i?r=null:"before"===r&&i&&t===i.getNextSibling()?r=null:"after"===r&&i&&t===i.getPrevSibling()?r=null:"over"===r&&i&&i.parent===t&&i.isLastSibling()&&(r=null)),n.helper.data("hitMode",r)}"over"===r&&l.autoExpandMS&&!1!==t.hasChildren()&&!t.bExpanded&&t.scheduleAction("expand",l.autoExpandMS),r&&l.onDragOver&&("over"!==(h=l.onDragOver(t,i,r,n,a))&&"before"!==h&&"after"!==h||(r=h)),this._setDndStatus(i,t,n.helper,r,!1!==h&&null!==r);break;case"drop":var g=n.helper.hasClass("dynatree-drop-reject");(r=n.helper.data("hitMode"))&&l.onDrop&&!g&&l.onDrop(t,i,r,n,a);break;case"leave":t.scheduleAction("cancel"),n.helper.data("enterResponse",null),n.helper.data("hitMode",null),this._setDndStatus(i,t,n.helper,"out",void 0),l.onDragLeave&&l.onDragLeave(t,i,n,a);break;case"stop":c.removeClass("dynatree-drag-source"),l.onDragStop&&l.onDragStop(t);break;default:throw"Unsupported drag event: "+e}return h},cancelDrag:function(){var e=$.ui.ddmanager.current;e&&e.cancel()},lastentry:void 0},$.widget("ui.dynatree",{_init:function(){if(versionCompare($.ui.version,"1.8")<0)return this.options.debugLevel>=0&&_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher."),this._create();this.options.debugLevel>=2&&_log("debug","ui.dynatree._init() was called; no current default functionality.")},_create:function(){this.options.debugLevel>=1&&logMsg("Dynatree._create(): version='%s', debugLevel=%o.",$.ui.dynatree.version,this.options.debugLevel),this.options.event+=".dynatree";this.element.get(0);this.tree=new DynaTree(this),this.tree._load(),this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function e(e){e=$.event.fix(e||window.event);var t=$.ui.dynatree.getNode(e.target);return!!t&&t._onFocus(e)}this.unbind();var t="click.dynatree dblclick.dynatree";this.options.keyboard&&(t+=" keypress.dynatree keydown.dynatree"),this.element.bind(t,function(e){var t=$.ui.dynatree.getNode(e.target);if(!t)return!0;var i=t.tree,s=i.options;i.logDebug("event(%s): dtnode: %s",e.type,t);var n=i.phase;i.phase="userEvent";try{switch(e.type){case"click":return(!s.onClick||!1!==s.onClick.call(i,t,e))&&t._onClick(e);case"dblclick":return(!s.onDblClick||!1!==s.onDblClick.call(i,t,e))&&t._onDblClick(e);case"keydown":return(!s.onKeydown||!1!==s.onKeydown.call(i,t,e))&&t._onKeydown(e);case"keypress":return(!s.onKeypress||!1!==s.onKeypress.call(i,t,e))&&t._onKeypress(e)}}catch(s){i.logWarning("bind(%o): dtnode: %o, error: %o",e,t,s)}finally{i.phase=n}});var i=this.tree.divTree;i.addEventListener?(i.addEventListener("focus",e,!0),i.addEventListener("blur",e,!0)):i.onfocusin=i.onfocusout=e},unbind:function(){this.element.unbind(".dynatree")},enable:function(){this.bind(),$.Widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind(),$.Widget.prototype.disable.apply(this,arguments)},getTree:function(){return this.tree},getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:void 0}),versionCompare($.ui.version,"1.8")<0&&($.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes"),$.extend($.ui.dynatree,{version:"1.2.8",buildType:"release",_DynaTreeClass:DynaTree,_DynaTreeNodeClass:DynaTreeNode,getNode:function(e){if(e instanceof DynaTreeNode)return e;for(void 0!==e.selector&&(e=e[0]);e;){if(e.dtnode)return e.dtnode;e=e.parentNode}return null},getPersistData:DynaTreeStatus._getTreePersistData}),$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:!0,keyboard:!0,persist:!1,autoCollapse:!1,clickFolderMode:3,activeVisible:!0,checkbox:!1,selectMode:2,fx:null,noLink:!1,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onCreate:null,onRender:null,postProcess:null,dnd:{onDragStart:null,onDragStop:null,revert:!1,autoExpandMS:1e3,preventVoidMoves:!0,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:!1,timeout:0,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:!1,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",radio:"dynatree-radio",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:1,lastentry:void 0},versionCompare($.ui.version,"1.8")<0&&($.ui.dynatree.defaults=$.ui.dynatree.prototype.options),$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:!1,isLazy:!1,tooltip:null,href:null,icon:null,addClass:null,noLink:!1,activate:!1,focus:!1,expand:!1,select:!1,hideCheckbox:!1,unselectable:!1,children:null,lastentry:void 0};var didRegisterDnd=!1,_registerDnd=function(){didRegisterDnd||($.ui.plugin.add("draggable","connectToDynatree",{start:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null;if(s)return i.offset.click.top=-2,i.offset.click.left=16,s.tree._onDragEvent("start",s,null,e,t,i)},drag:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null,n=t.helper.data("dtTargetNode")||null,a=$.ui.dynatree.getNode(e.target);e.target&&!a&&$(e.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0||(t.helper.data("dtTargetNode",a),n&&n!==a&&n.tree._onDragEvent("leave",n,s,e,t,i),a&&a.tree.options.dnd.onDrop&&(a===n?a.tree._onDragEvent("over",a,s,e,t,i):a.tree._onDragEvent("enter",a,s,e,t,i)))},stop:function(e,t){var i=$(this).data("ui-draggable")||$(this).data("draggable"),s=t.helper.data("dtSourceNode")||null,n=t.helper.data("dtTargetNode")||null,a="mouseup"==e.type&&1==e.which;logMsg("draggable-connectToDynatree.stop: targetNode(from event): %s, dtTargetNode: %s",n,t.helper.data("dtTargetNode")),a||logMsg("Drag was cancelled"),n&&(a&&n.tree._onDragEvent("drop",n,s,e,t,i),n.tree._onDragEvent("leave",n,s,e,t,i)),s&&s.tree._onDragEvent("stop",s,null,e,t,i)}}),didRegisterDnd=!0)}}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.event.drag.js b/static/scripts/libs/jquery/jquery.event.drag.js index e8121456e20..2f00fe14f87 100644 --- a/static/scripts/libs/jquery/jquery.event.drag.js +++ b/static/scripts/libs/jquery/jquery.event.drag.js @@ -1 +1 @@ -!function(t){t.fn.drag=function(e,a,n){var r="string"==typeof e?e:"",o=t.isFunction(e)?e:t.isFunction(a)?a:null;return 0!==r.indexOf("drag")&&(r="drag"+r),n=(e==o?a:n)||{},o?this.bind(r,n,o):this.trigger(r)};var e=t.event,a=e.special,n=a.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(e){var a=t.data(this,n.datakey),r=e.data||{};a.related+=1,t.each(n.defaults,function(t,e){void 0!==r[t]&&(a[t]=r[t])})},remove:function(){t.data(this,n.datakey).related-=1},setup:function(){if(!t.data(this,n.datakey)){var a=t.extend({related:0},n.defaults);t.data(this,n.datakey,a),e.add(this,"touchstart mousedown",n.init,a),this.attachEvent&&this.attachEvent("ondragstart",n.dontstart)}},teardown:function(){(t.data(this,n.datakey)||{}).related||(t.removeData(this,n.datakey),e.remove(this,"touchstart mousedown",n.init),n.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",n.dontstart))},init:function(r){if(!n.touched){var o,i=r.data;if(!(0!=r.which&&i.which>0&&r.which!=i.which)&&!t(r.target).is(i.not)&&(!i.handle||t(r.target).closest(i.handle,r.currentTarget).length)&&(n.touched="touchstart"==r.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[n.interaction(this,i)],i.target=r.target,i.pageX=r.pageX,i.pageY=r.pageY,i.dragging=null,o=n.hijack(r,"draginit",i),i.propagates))return o=n.flatten(o),o&&o.length&&(i.interactions=[],t.each(o,function(){i.interactions.push(n.interaction(this,i))})),i.propagates=i.interactions.length,!1!==i.drop&&a.drop&&a.drop.handler(r,i),n.textselect(!1),n.touched?e.add(n.touched,"touchmove touchend",n.handler,i):e.add(document,"mousemove mouseup",n.handler,i),!(!n.touched||i.live)&&void 0}},interaction:function(e,a){var r=t(e)[a.relative?"position":"offset"]()||{top:0,left:0};return{drag:e,callback:new n.callback,droppable:[],offset:r}},handler:function(r){var o=r.data;switch(r.type){case!o.dragging&&"touchmove":r.preventDefault();case!o.dragging&&"mousemove":if(Math.pow(r.pageX-o.pageX,2)+Math.pow(r.pageY-o.pageY,2)0?void t.removeData(this,"suppress."+e.type):r.apply(this,arguments)};var o=e.fixHooks.touchstart=e.fixHooks.touchmove=e.fixHooks.touchend=e.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(e,a){if(a){var n=a.touches&&a.touches[0]||a.changedTouches&&a.changedTouches[0]||null;n&&t.each(o.props,function(t,a){e[a]=n[a]})}return e}};a.draginit=a.dragstart=a.dragend=n}(jQuery); \ No newline at end of file +!function(t){t.fn.drag=function(e,a,n){var r="string"==typeof e?e:"",o=t.isFunction(e)?e:t.isFunction(a)?a:null;return 0!==r.indexOf("drag")&&(r="drag"+r),n=(e==o?a:n)||{},o?this.bind(r,n,o):this.trigger(r)};var e=t.event,a=e.special,n=a.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(e){var a=t.data(this,n.datakey),r=e.data||{};a.related+=1,t.each(n.defaults,function(t,e){void 0!==r[t]&&(a[t]=r[t])})},remove:function(){t.data(this,n.datakey).related-=1},setup:function(){if(!t.data(this,n.datakey)){var a=t.extend({related:0},n.defaults);t.data(this,n.datakey,a),e.add(this,"touchstart mousedown",n.init,a),this.attachEvent&&this.attachEvent("ondragstart",n.dontstart)}},teardown:function(){(t.data(this,n.datakey)||{}).related||(t.removeData(this,n.datakey),e.remove(this,"touchstart mousedown",n.init),n.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",n.dontstart))},init:function(r){if(!n.touched){var o,i=r.data;if(!(0!=r.which&&i.which>0&&r.which!=i.which)&&!t(r.target).is(i.not)&&(!i.handle||t(r.target).closest(i.handle,r.currentTarget).length)&&(n.touched="touchstart"==r.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[n.interaction(this,i)],i.target=r.target,i.pageX=r.pageX,i.pageY=r.pageY,i.dragging=null,o=n.hijack(r,"draginit",i),i.propagates))return(o=n.flatten(o))&&o.length&&(i.interactions=[],t.each(o,function(){i.interactions.push(n.interaction(this,i))})),i.propagates=i.interactions.length,!1!==i.drop&&a.drop&&a.drop.handler(r,i),n.textselect(!1),n.touched?e.add(n.touched,"touchmove touchend",n.handler,i):e.add(document,"mousemove mouseup",n.handler,i),!(!n.touched||i.live)&&void 0}},interaction:function(e,a){var r=t(e)[a.relative?"position":"offset"]()||{top:0,left:0};return{drag:e,callback:new n.callback,droppable:[],offset:r}},handler:function(r){var o=r.data;switch(r.type){case!o.dragging&&"touchmove":r.preventDefault();case!o.dragging&&"mousemove":if(Math.pow(r.pageX-o.pageX,2)+Math.pow(r.pageY-o.pageY,2)0))return r.apply(this,arguments);t.removeData(this,"suppress."+e.type)};var o=e.fixHooks.touchstart=e.fixHooks.touchmove=e.fixHooks.touchend=e.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(e,a){if(a){var n=a.touches&&a.touches[0]||a.changedTouches&&a.changedTouches[0]||null;n&&t.each(o.props,function(t,a){e[a]=n[a]})}return e}};a.draginit=a.dragstart=a.dragend=n}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.event.drop.js b/static/scripts/libs/jquery/jquery.event.drop.js index 392d3e2592c..7190d21b0b4 100644 --- a/static/scripts/libs/jquery/jquery.event.drop.js +++ b/static/scripts/libs/jquery/jquery.event.drop.js @@ -1 +1 @@ -!function(t){t.fn.drop=function(e,a,i){var n="string"==typeof e?e:"",o=t.isFunction(e)?e:t.isFunction(a)?a:null;return 0!==n.indexOf("drop")&&(n="drop"+n),i=(e==o?a:i)||{},o?this.bind(n,i,o):this.trigger(n)},t.drop=function(e){e=e||{},i.multi=!0===e.multi?1/0:!1===e.multi?1:isNaN(e.multi)?i.multi:e.multi,i.delay=e.delay||i.delay,i.tolerance=t.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:i.tolerance,i.mode=e.mode||i.mode||"intersect"};var e=t.event,a=e.special,i=t.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(e){t.data(this,i.datakey).related+=1},remove:function(){t.data(this,i.datakey).related-=1},setup:function(){if(!t.data(this,i.datakey)){var e={related:0,active:[],anyactive:0,winner:0,location:{}};t.data(this,i.datakey,e),i.targets.push(this)}},teardown:function(){if(!(t.data(this,i.datakey)||{}).related){t.removeData(this,i.datakey);var e=this;i.targets=t.grep(i.targets,function(t){return t!==e})}},handler:function(e,n){var o;if(n)switch(e.type){case"mousedown":case"touchstart":o=t(i.targets),"string"==typeof n.drop&&(o=o.filter(n.drop)),o.each(function(){var e=t.data(this,i.datakey);e.active=[],e.anyactive=0,e.winner=0}),n.droppable=o,a.drag.hijack(e,"dropinit",n);break;case"mousemove":case"touchmove":i.event=e,i.timer||i.tolerate(n);break;case"mouseup":case"touchend":i.timer=clearTimeout(i.timer),n.propagates&&(a.drag.hijack(e,"drop",n),a.drag.hijack(e,"dropend",n))}},locate:function(e,a){var n=t.data(e,i.datakey),o=t(e),r=o.offset()||{},d=o.outerHeight(),l=o.outerWidth(),c={elem:e,width:l,height:d,top:r.top,left:r.left,right:r.left+l,bottom:r.top+d};return n&&(n.location=c,n.index=a,n.elem=e),c},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,a){return this.contains(a,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,a){return Math.max(0,Math.min(a.bottom,e.bottom)-Math.max(a.top,e.top))*Math.max(0,Math.min(a.right,e.right)-Math.max(a.left,e.left))},fit:function(t,e,a){return this.contains(a,e)?1:0},middle:function(t,e,a){return this.contains(a,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(e){var n,o,r,d,l,c,s,u,p=0,h=e.interactions.length,m=[i.event.pageX,i.event.pageY],f=i.tolerance||i.modes[i.mode];do{if(u=e.interactions[p]){if(!u)return;u.drop=[],l=[],c=u.droppable.length,f&&(r=i.locate(u.proxy)),n=0;do{if(s=u.droppable[n]){if(d=t.data(s,i.datakey),!(o=d.location))continue;d.winner=f?f.call(i,i.event,r,o):i.contains(o,m)?1:0,l.push(d)}}while(++n=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,a){return this.contains(a,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,a){return Math.max(0,Math.min(a.bottom,e.bottom)-Math.max(a.top,e.top))*Math.max(0,Math.min(a.right,e.right)-Math.max(a.left,e.left))},fit:function(t,e,a){return this.contains(a,e)?1:0},middle:function(t,e,a){return this.contains(a,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(i){var n,o,r,d,l,c,s,u,p=0,h=i.interactions.length,m=[a.event.pageX,a.event.pageY],f=a.tolerance||a.modes[a.mode];do{if(u=i.interactions[p]){if(!u)return;u.drop=[],l=[],c=u.droppable.length,f&&(r=a.locate(u.proxy)),n=0;do{if(s=u.droppable[n]){if(d=t.data(s,a.datakey),!(o=d.location))continue;d.winner=f?f.call(a,a.event,r,o):a.contains(o,m)?1:0,l.push(d)}}while(++n").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a').val(m.extraData[l].value).appendTo(w)[0]):o.push(e('').val(m.extraData[l]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",u):g.addEventListener("load",u,!1),setTimeout(t,15);try{w.submit()}catch(e){var f=document.createElement("form").submit;f.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):c.removeAttr("target"),e(o).remove()}}function u(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",u):g.removeEventListener("load",u,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(u,250);var s=M.body?M.body:M.documentElement;x.responseText=s?s.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":m.dataType}[e.toLowerCase()]},s&&(x.status=Number(s.getAttribute("status"))||x.status,x.statusText=s.getAttribute("statusText")||x.statusText);var l=(m.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(c){var d=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];d?x.responseText=d.textContent?d.textContent:d.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==l&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,l,m)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),p&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),p&&e.event.trigger("ajaxError",[x,m,r])),p&&e.event.trigger("ajaxComplete",[x,m]),p&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var l,f,m,p,h,v,g,x,b,y,T,j,w=c[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(f=0;f'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(e){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),p&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},p=m.global,p&&0==e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&!1===m.beforeSend.call(m.context,x,m))return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(b=w.clk)&&(y=b.name)&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var s,u,l,c=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),s=t.type||this.attr2("method"),u=t.url||this.attr2("action"),l="string"==typeof u?e.trim(u):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:s||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var f={};if(this.trigger("form-pre-serialize",[this,t,f]),f.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=t.traditional;void 0===m&&(m=e.ajaxSettings.traditional);var p,d=[],h=this.formToArray(t.semantic,d);if(t.data&&(t.extraData=t.data,p=e.param(t.data,m)),t.beforeSubmit&&!1===t.beforeSubmit(h,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[h,this,t,f]),f.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=e.param(h,m);p&&(v=v?v+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+v,t.data=null):t.data=v;var g=[];if(t.resetForm&&g.push(function(){c.resetForm()}),t.clearForm&&g.push(function(){c.clearForm(t.includeHidden)}),!t.dataType&&t.target){var x=t.success||function(){};g.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(x,arguments)})}else t.success&&g.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=g.length;i0,w="multipart/form-data",S=c.attr("enctype")==w||c.attr("encoding")==w,D=n.fileapi&&n.formdata;a("fileAPI :"+D);var k,A=(j||S)&&!D;!1!==t.iframe&&(t.iframe||A)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){k=o(h)}):k=o(h):k=(j||S)&&D?function(a){for(var n=new FormData,i=0;i").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a').val(m.extraData[l].value).appendTo(w)[0]):o.push(e('').val(m.extraData[l]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",u):g.addEventListener("load",u,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):c.removeAttr("target"),e(o).remove()}}function u(t){if(!x.aborted&&!F){if((M=n(g))||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",u):g.removeEventListener("load",u,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(u,250);var s=M.body?M.body:M.documentElement;x.responseText=s?s.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":m.dataType}[e.toLowerCase()]},s&&(x.status=Number(s.getAttribute("status"))||x.status,x.statusText=s.getAttribute("statusText")||x.statusText);var l=(m.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(c){var d=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];d?x.responseText=d.textContent?d.textContent:d.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==l&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,l,m)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),p&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),p&&e.event.trigger("ajaxError",[x,m,r])),p&&e.event.trigger("ajaxComplete",[x,m]),p&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var l,f,m,p,h,v,g,x,b,y,T,j,w=c[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(f=0;f')).css({position:"absolute",top:"-1000px",left:"-1000px"}),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(e){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),p&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},(p=m.global)&&0==e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&!1===m.beforeSend.call(m.context,x,m))return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(b=w.clk)&&(y=b.name)&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var s,u,l,c=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),s=t.type||this.attr2("method"),(l=(l="string"==typeof(u=t.url||this.attr2("action"))?e.trim(u):"")||window.location.href||"")&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:s||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var f={};if(this.trigger("form-pre-serialize",[this,t,f]),f.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=t.traditional;void 0===m&&(m=e.ajaxSettings.traditional);var p,d=[],h=this.formToArray(t.semantic,d);if(t.data&&(t.extraData=t.data,p=e.param(t.data,m)),t.beforeSubmit&&!1===t.beforeSubmit(h,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[h,this,t,f]),f.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=e.param(h,m);p&&(v=v?v+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+v,t.data=null):t.data=v;var g=[];if(t.resetForm&&g.push(function(){c.resetForm()}),t.clearForm&&g.push(function(){c.clearForm(t.includeHidden)}),!t.dataType&&t.target){var x=t.success||function(){};g.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(x,arguments)})}else t.success&&g.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=g.length;i0,j="multipart/form-data",w=c.attr("enctype")==j||c.attr("encoding")==j,S=n.fileapi&&n.formdata;a("fileAPI :"+S);var D,k=(T||w)&&!S;!1!==t.iframe&&(t.iframe||k)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){D=o(h)}):D=o(h):D=(T||w)&&S?function(a){for(var n=new FormData,i=0;i0&&t-1 in e)}function r(e,t,n){if(de.isFunction(t))return de.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return de.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return de.filter(t,e,n);t=de.filter(t,e)}return de.grep(e,function(e){return de.inArray(e,t)>-1!==n})}function i(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t={};return de.each(e.match(Se)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),de.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(He,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Le.test(n)?de.parseJSON(n):n)}catch(e){}de.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!de.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(je(e)){var i,o,a=de.expando,s=e.nodeType,u=s?de.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||de.guid++:a),u[l]||(u[l]=s?{}:{toJSON:de.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=de.extend(u[l],t):u[l].data=de.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[de.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[de.camelCase(t)]):i=o,i}}function f(e,t,n){if(je(e)){var r,i,o=e.nodeType,a=o?de.cache:e,s=o?e[de.expando]:de.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){de.isArray(t)?t=t.concat(de.map(t,de.camelCase)):t in r?t=[t]:(t=de.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!de.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?de.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return de.css(e,t,"")},u=s(),l=n&&n[3]||(de.cssNumber[t]?"":"px"),c=(de.cssNumber[t]||"px"!==l&&+u)&&_e.exec(de.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,de.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=Ie.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||de.nodeName(r,t)?o.push(r):de.merge(o,h(r,t));return void 0===t||t&&de.nodeName(e,t)?de.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)de._data(n,"globalEval",!t||de._data(t[r],"globalEval"))}function m(e){Re.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,v=p(t),y=[],x=0;x"!==f[1]||Xe.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)de.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(de.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=v.lastChild}else y.push(t.createTextNode(a));for(u&&v.removeChild(u),fe.appendChecked||de.grep(h(y,"input"),m),x=0;a=y[x++];)if(r&&de.inArray(a,r)>-1)i&&i.push(a);else if(s=de.contains(a.ownerDocument,a),u=h(v.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Be.test(a.type||"")&&n.push(a);return u=null,v}function y(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return de().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=de.guid++)),e.each(function(){de.event.add(this,t,i,r,n)})}function T(e,t){return de.nodeName(e,"table")&&de.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==de.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=nt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&de.hasData(e)){var n,r,i,o=de._data(e),a=de._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&tt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=v(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=de.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(at[0].contentWindow||at[0].contentDocument).document,t.write(),t.close(),n=D(e,t),at.detach()),st[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Tt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=wt.length;n--;)if((e=wt[n]+t)in Tt)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==de.type(e)||e.nodeType||de.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&de.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(he,"ms-").replace(ge,me)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;ib.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[O]=!0,e}function i(e){var t=j.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function l(){}function c(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function p(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=h(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):G.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=f(function(e){return e===t},a,!0),l=f(function(e){return K(t,e)>-1},a,!0),p=[function(e,n,r){var i=!o&&(r||n!==k)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&d(p),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,g="0",m=r&&[],v=[],y=k,x=r||o&&b.find.TAG("*",l),w=P+=null==y?1:Math.random()||.1,T=x.length;for(l&&(k=a===j||a||l);g!==T&&null!=(c=x[g]);g++){if(o&&c){for(f=0,a||c.ownerDocument===j||(D(c),s=!H);d=e[f++];)if(d(c,a||j,s)){u.push(c);break}l&&(P=w)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=g,i&&g!==p){for(f=0;d=n[f++];)d(m,v,a,s);if(r){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(u));v=h(v)}G.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(P=w,k=y),m};return i?r(a):a}var y,x,b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O="sizzle"+1*new Date,R=e.document,P=0,B=0,W=n(),I=n(),$=n(),z=function(e,t){return e===t&&(A=!0),0},X=1<<31,U={}.hasOwnProperty,V=[],Y=V.pop,J=V.push,G=V.push,Q=V.slice,K=function(e,t){for(var n=0,r=e.length;n+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},be=function(){D()};try{G.apply(V=Q.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){G={apply:V.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},D=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,L=j.documentElement,H=!T(j),(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",be,!1):n.attachEvent&&n.attachEvent("onunload",be)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(j.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=he.test(j.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=O,!j.getElementsByName||!j.getElementsByName(O).length}),x.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=x.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=x.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},_=[],q=[],(x.qsa=he.test(j.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+O+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+O+"+*").length||q.push(".#.+[+~]")}),i(function(e){var t=j.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(x.matchesSelector=he.test(F=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",re)}),q=q.length&&new RegExp(q.join("|")),_=_.length&&new RegExp(_.join("|")),t=he.test(L.compareDocumentPosition),M=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===j||e.ownerDocument===R&&M(R,e)?-1:t===j||t.ownerDocument===R&&M(R,t)?1:S?K(S,e)-K(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===j?-1:t===j?1:i?-1:o?1:S?K(S,e)-K(S,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},j):j},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==j&&D(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&H&&!$[n+" "]&&(!_||!_.test(n))&&(!q||!q.test(n)))try{var r=F.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,j,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==j&&D(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==j&&D(e);var n=b.attrHandle[t.toLowerCase()],r=n&&U.call(b.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:x.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(z),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},w=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=w(t);return n},b=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(d=m,f=d[O]||(d[O]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===P&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[P,p,x];break}}else if(y&&(d=t,f=d[O]||(d[O]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===P&&l[1],x=p), -!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&(f=d[O]||(d[O]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[P,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[O]?o(n):o.length>1?(i=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(oe,"$1"));return i[O]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ye,xe),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&H&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((l=b.find[s])&&(r=l(a.matches[0].replace(ye,xe),me.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&c(o)))return G.apply(n,r),n;break}}return(f||E(e,d))(r,t,!H,n,!t||me.test(e)&&u(t.parentNode)||t),n},x.sortStable=O.split("").sort(z).join("")===O,x.detectDuplicates=!!A,D(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(j.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);de.find=ve,de.expr=ve.selectors,de.expr[":"]=de.expr.pseudos,de.uniqueSort=de.unique=ve.uniqueSort,de.text=ve.getText,de.isXMLDoc=ve.isXML,de.contains=ve.contains;var ye=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&de(e).is(n))break;r.push(e)}return r},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=de.expr.match.needsContext,we=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Te=/^.[^:#\[\.,]*$/;de.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?de.find.matchesSelector(r,e)?[r]:[]:de.find.matches(e,de.grep(t,function(e){return 1===e.nodeType}))},de.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(de(e).filter(function(){for(t=0;t1?de.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&be.test(e)?de(e):e||[],!1).length}});var Ce,Ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(de.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ce,"string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ee.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof de?t[0]:t,de.merge(this,de.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),we.test(r[1])&&de.isPlainObject(t))for(r in t)de.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=re.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return Ce.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):de.isFunction(e)?void 0!==n.ready?n.ready(e):e(de):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),de.makeArray(e,this))}).prototype=de.fn,Ce=de(re);var Ne=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};de.fn.extend({has:function(e){var t,n=de(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&de.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?de.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.inArray(this[0],de(e)):de.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(de.uniqueSort(de.merge(this.get(),de(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),de.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ye(e,"parentNode")},parentsUntil:function(e,t,n){return ye(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ye(e,"nextSibling")},prevAll:function(e){return ye(e,"previousSibling")},nextUntil:function(e,t,n){return ye(e,"nextSibling",n)},prevUntil:function(e,t,n){return ye(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return de.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:de.merge([],e.childNodes)}},function(e,t){de.fn[e]=function(n,r){var i=de.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=de.filter(r,i)),this.length>1&&(ke[e]||(i=de.uniqueSort(i)),Ne.test(e)&&(i=i.reverse())),this.pushStack(i)}});var Se=/\S+/g;de.Callbacks=function(e){e="string"==typeof e?o(e):de.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?de.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},de.extend({Deferred:function(e){var t=[["resolve","done",de.Callbacks("once memory"),"resolved"],["reject","fail",de.Callbacks("once memory"),"rejected"],["notify","progress",de.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return de.Deferred(function(n){de.each(t,function(t,o){var a=de.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&de.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?de.extend(e,r):r}},i={};return r.pipe=r.then,de.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&de.isFunction(e.promise)?a:0,u=1===s?e:de.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(Ae.resolveWith(re,[de]),de.fn.triggerHandler&&(de(re).triggerHandler("ready"),de(re).off("ready"))))}}),de.ready.promise=function(t){if(!Ae)if(Ae=de.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(de.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(e){}n&&n.doScroll&&function t(){if(!de.isReady){try{n.doScroll("left")}catch(n){return e.setTimeout(t,50)}a(),de.ready()}}()}return Ae.promise(t)},de.ready.promise();var De;for(De in de(fe))break;fe.ownFirst="0"===De,fe.inlineBlockNeedsLayout=!1,de(function(){var e,t,n,r;(n=re.getElementsByTagName("body")[0])&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(e){fe.deleteExpando=!1}e=null}();var je=function(e){var t=de.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},Le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,He=/([A-Z])/g;de.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?de.cache[e[de.expando]]:e[de.expando])&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),de.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=de.data(o),1===o.nodeType&&!de._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=de.camelCase(r.slice(5)),u(o,r,i[r])));de._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){de.data(this,e)}):arguments.length>1?this.each(function(){de.data(this,e,t)}):o?u(o,e,de.data(o,e)):void 0},removeData:function(e){return this.each(function(){de.removeData(this,e)})}}),de.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=de._data(e,t),n&&(!r||de.isArray(n)?r=de._data(e,t,de.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=de.queue(e,t),r=n.length,i=n.shift(),o=de._queueHooks(e,t),a=function(){de.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return de._data(e,n)||de._data(e,n,{empty:de.Callbacks("once memory").add(function(){de._removeData(e,t+"queue"),de._removeData(e,n)})})}}),de.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
        a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[de.expando]=1,fe.attributes=!e.getAttribute(de.expando)}();var $e={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var ze=/<|&#?\w+;/,Xe=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[de.expando]?t:new de.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:de.makeArray(n,[t]),l=de.event.special[p]||{},i||!l.trigger||!1!==l.trigger.apply(r,n))){if(!i&&!l.noBubble&&!de.isWindow(r)){for(u=l.delegateType||p,Je.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(de._data(s,"events")||{})[t.type]&&de._data(s,"handle"),o&&o.apply(s,n),(o=a&&s[a])&&o.apply&&je(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(d.pop(),n))&&je(r)&&a&&r[p]&&!de.isWindow(r)){c=r[a],c&&(r[a]=null),de.event.triggered=p;try{r[p]()}catch(e){}de.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=de.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(de._data(this,"events")||{})[e.type]||[],l=de.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=de.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((de.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n-1:de.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),Ze=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,et=/\s*$/g,it=p(re),ot=it.appendChild(re.createElement("div"));de.extend({htmlPrefilter:function(e){return e.replace(Ze,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=de.contains(e.ownerDocument,e);if(fe.html5Clone||de.isXMLDoc(e)||!Ke.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ot.innerHTML=e.outerHTML,ot.removeChild(o=ot.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||de.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=de.expando,u=de.cache,l=fe.attributes,c=de.event.special;null!=(n=e[a]);a++)if((t||je(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?de.event.remove(n,r):de.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||void 0===n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),de.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Oe(this,function(e){return void 0===e?de.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){T(this,e).appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&de.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&de.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return de.clone(this,e,t)})},html:function(e){return Oe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Qe,""):void 0;if("string"==typeof e&&!et.test(e)&&(fe.htmlSerialize||!Ke.test(e))&&(fe.leadingWhitespace||!We.test(e))&&!$e[(Pe.exec(e)||["",""])[1].toLowerCase()]){e=de.htmlPrefilter(e);try{for(;nt",l.childNodes[0].style.borderCollapse="separate",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,de.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var dt,pt,ht=/^(top|right|bottom|left)$/;e.getComputedStyle?(dt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},pt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||dt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||de.contains(e.ownerDocument,e)||(a=de.style(e,t)),n&&!fe.pixelMarginRight()&<.test(a)&&ut.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):ft.currentStyle&&(dt=function(e){return e.currentStyle},pt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||dt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),lt.test(a)&&!ht.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var gt=/alpha\([^)]*\)/i,mt=/opacity\s*=\s*([^)]*)/i,vt=/^(none|table(?!-c[ea]).+)/,yt=new RegExp("^("+qe+")(.*)$","i"),xt={position:"absolute",visibility:"hidden",display:"block"},bt={letterSpacing:"0",fontWeight:"400"},wt=["Webkit","O","Moz","ms"],Tt=re.createElement("div").style;de.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=pt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=de.camelCase(t),u=e.style;if(t=de.cssProps[s]||(de.cssProps[s]=H(s)||s),a=de.cssHooks[t]||de.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=_e.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(de.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=de.camelCase(t);return t=de.cssProps[s]||(de.cssProps[s]=H(s)||s),a=de.cssHooks[t]||de.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=pt(e,t,r)),"normal"===o&&t in bt&&(o=bt[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),de.each(["height","width"],function(e,t){de.cssHooks[t]={get:function(e,n,r){if(n)return vt.test(de.css(e,"display"))&&0===e.offsetWidth?ct(e,xt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&dt(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===de.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(de.cssHooks.opacity={get:function(e,t){return mt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=de.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===de.trim(o.replace(gt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=gt.test(o)?o.replace(gt,i):o+" "+i)}}),de.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return ct(e,{display:"inline-block"},pt,[e,"marginRight"])}),de.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(pt(e,"marginLeft"))||(de.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ct(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),de.each({margin:"",padding:"",border:"Width"},function(e,t){de.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Fe[r]+t]=o[r]||o[r-2]||o[0];return i}},ut.test(e)||(de.cssHooks[e+t].set=_)}),de.fn.extend({css:function(e,t){return Oe(this,function(e,t,n){var r,i,o={},a=0;if(de.isArray(t)){for(r=dt(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Me(this)?de(this).show():de(this).hide()})}}),de.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||de.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(de.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=de.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=de.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){de.fx.step[e.prop]?de.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[de.cssProps[e.prop]]&&!de.cssHooks[e.prop]?e.elem[e.prop]=e.now:de.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},de.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},de.fx=O.prototype.init,de.fx.step={};var Ct,Et,Nt=/^(?:toggle|show|hide)$/,kt=/queueHooks$/;de.Animation=de.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,_e.exec(t),n),n}]},tweener:function(e,t){de.isFunction(e)?(t=e,e=["*"]):e=e.match(Se);for(var n,r=0,i=e.length;r
        a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var St=/\r/g,At=/[\x20\t\r\n\f]+/g;de.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=de.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,de(this).val()):e,null==i?i="":"number"==typeof i?i+="":de.isArray(i)&&(i=de.map(i,function(e){return null==e?"":e+""})),(t=de.valHooks[this.type]||de.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=de.valHooks[i.type]||de.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(St,""):null==n?"":n)}}}),de.extend({valHooks:{option:{get:function(e){var t=de.find.attr(e,"value");return null!=t?t:de.trim(de.text(e)).replace(At," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),de.each(["radio","checkbox"],function(){de.valHooks[this]={set:function(e,t){if(de.isArray(t))return e.checked=de.inArray(de(e).val(),t)>-1}},fe.checkOn||(de.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Dt,jt,Lt=de.expr.attrHandle,Ht=/^(?:checked|selected)$/i,qt=fe.getSetAttribute,_t=fe.input;de.fn.extend({attr:function(e,t){return Oe(this,de.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){de.removeAttr(this,e)})}}),de.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?de.prop(e,t,n):(1===o&&de.isXMLDoc(e)||(t=t.toLowerCase(),i=de.attrHooks[t]||(de.expr.match.bool.test(t)?jt:Dt)),void 0!==n?null===n?void de.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=de.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&de.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Se);if(o&&1===e.nodeType)for(;n=o[i++];)r=de.propFix[n]||n,de.expr.match.bool.test(n)?_t&&qt||!Ht.test(n)?e[r]=!1:e[de.camelCase("default-"+n)]=e[r]=!1:de.attr(e,n,""),e.removeAttribute(qt?n:r)}}),jt={set:function(e,t,n){return!1===t?de.removeAttr(e,n):_t&&qt||!Ht.test(n)?e.setAttribute(!qt&&de.propFix[n]||n,n):e[de.camelCase("default-"+n)]=e[n]=!0,n}},de.each(de.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Lt[t]||de.find.attr;_t&&qt||!Ht.test(t)?Lt[t]=function(e,t,r){var i,o;return r||(o=Lt[t],Lt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Lt[t]=o),i}:Lt[t]=function(e,t,n){if(!n)return e[de.camelCase("default-"+t)]?t.toLowerCase():null}}),_t&&qt||(de.attrHooks.value={set:function(e,t,n){if(!de.nodeName(e,"input"))return Dt&&Dt.set(e,t,n);e.defaultValue=t}}),qt||(Dt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},Lt.id=Lt.name=Lt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},de.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Dt.set},de.attrHooks.contenteditable={set:function(e,t,n){Dt.set(e,""!==t&&t,n)}},de.each(["width","height"],function(e,t){de.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(de.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ft=/^(?:input|select|textarea|button|object)$/i,Mt=/^(?:a|area)$/i;de.fn.extend({prop:function(e,t){return Oe(this,de.prop,e,t,arguments.length>1)},removeProp:function(e){return e=de.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),de.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&de.isXMLDoc(e)||(t=de.propFix[t]||t,i=de.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=de.find.attr(e,"tabindex");return t?parseInt(t,10):Ft.test(e.nodeName)||Mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),fe.hrefNormalized||de.each(["href","src"],function(e,t){de.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(de.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),de.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){de.propFix[this.toLowerCase()]=this}),fe.enctype||(de.propFix.enctype="encoding");var Ot=/[\t\r\n\f]/g;de.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(de.isFunction(e))return this.each(function(t){de(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(Se)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Ot," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=de.trim(r),i!==s&&de.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(de.isFunction(e))return this.each(function(t){de(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Se)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Ot," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=de.trim(r),i!==s&&de.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):de.isFunction(e)?this.each(function(n){de(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=de(this),o=e.match(Se)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&de._data(this,"__className__",t),de.attr(this,"class",t||!1===e?"":de._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Ot," ").indexOf(t)>-1)return!0;return!1}}),de.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){de.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),de.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Rt=e.location,Pt=de.now(),Bt=/\?/,Wt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;de.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=de.trim(t+"");return i&&!de.trim(i.replace(Wt,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():de.error("Invalid JSON: "+t)},de.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||de.error("Invalid XML: "+t),n};var It=/#.*$/,$t=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Xt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ut=/^(?:GET|HEAD)$/,Vt=/^\/\//,Yt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Jt={},Gt={},Qt="*/".concat("*"),Kt=Rt.href,Zt=Yt.exec(Kt.toLowerCase())||[];de.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Kt,type:"GET",isLocal:Xt.test(Zt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":de.parseJSON,"text xml":de.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,de.ajaxSettings),t):V(de.ajaxSettings,e)},ajaxPrefilter:X(Jt),ajaxTransport:X(Gt),ajax:function(t,n){function r(t,n,r,i){var o,f,y,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(de.lastModified[a]=w),(w=T.getResponseHeader("etag"))&&(de.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,y=x.error,o=!y)):(y=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,y]),T.statusCode(v),v=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:y]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--de.active||de.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=de.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?de(p):de.event,g=de.Deferred(),m=de.Callbacks("once memory"),v=d.statusCode||{},y={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=zt.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||Kt)+"").replace(It,"").replace(Vt,Zt[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=de.trim(d.dataType||"*").toLowerCase().match(Se)||[""],null==d.crossDomain&&(i=Yt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Zt[1]&&i[2]===Zt[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Zt[3]||("http:"===Zt[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=de.param(d.data,d.traditional)),U(Jt,d,n,T),2===b)return T;l=de.event&&d.global,l&&0==de.active++&&de.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ut.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(Bt.test(a)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=$t.test(a)?a.replace($t,"$1_="+Pt++):a+(Bt.test(a)?"&":"?")+"_="+Pt++)),d.ifModified&&(de.lastModified[a]&&T.setRequestHeader("If-Modified-Since",de.lastModified[a]),de.etag[a]&&T.setRequestHeader("If-None-Match",de.etag[a])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Qt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(p,T,d)||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Gt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(y,r)}catch(e){if(!(b<2))throw e;r(-1,e)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return de.get(e,t,n,"json")},getScript:function(e,t){return de.get(e,void 0,t,"script")}}),de.each(["get","post"],function(e,t){de[t]=function(e,n,r,i){return de.isFunction(n)&&(i=i||r,r=n,n=void 0),de.ajax(de.extend({url:e,type:t,dataType:i,data:n,success:r},de.isPlainObject(e)&&e))}}),de._evalUrl=function(e){return de.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},de.fn.extend({wrapAll:function(e){if(de.isFunction(e))return this.each(function(t){de(this).wrapAll(e.call(this,t))});if(this[0]){var t=de(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return de.isFunction(e)?this.each(function(t){de(this).wrapInner(e.call(this,t))}):this.each(function(){var t=de(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=de.isFunction(e);return this.each(function(n){de(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){de.nodeName(this,"body")||de(this).replaceWith(this.childNodes)}).end()}}),de.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Q(e)},de.expr.filters.visible=function(e){return!de.expr.filters.hidden(e)};var en=/%20/g,tn=/\[\]$/,nn=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,on=/^(?:input|select|textarea|keygen)/i;de.param=function(e,t){var n,r=[],i=function(e,t){t=de.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=de.ajaxSettings&&de.ajaxSettings.traditional),de.isArray(e)||e.jquery&&!de.isPlainObject(e))de.each(e,function(){i(this.name,this.value)});else for(n in e)K(n,e[n],t,i);return r.join("&").replace(en,"+")},de.fn.extend({serialize:function(){return de.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=de.prop(this,"elements");return e?de.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!de(this).is(":disabled")&&on.test(this.nodeName)&&!rn.test(e)&&(this.checked||!Re.test(e))}).map(function(e,t){var n=de(this).val();return null==n?null:de.isArray(n)?de.map(n,function(e){return{name:t.name,value:e.replace(nn,"\r\n")}}):{name:t.name,value:n.replace(nn,"\r\n")}}).get()}}),de.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var an=0,sn={},un=de.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in sn)sn[e](void 0,!0)}),fe.cors=!!un&&"withCredentials"in un,un=fe.ajax=!!un,un&&de.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++an;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete sn[s],n=void 0,a.onreadystatechange=de.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(e){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=sn[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),de.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return de.globalEval(e),e}}}),de.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),de.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||de("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ln=[],cn=/(=)\?(?=&|$)|\?\?/;de.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ln.pop()||de.expando+"_"+Pt++;return this[e]=!0,e}}),de.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(cn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&cn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=de.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(cn,"$1"+i):!1!==t.jsonp&&(t.url+=(Bt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||de.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?de(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,ln.push(i)),a&&de.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),de.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=we.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=v([e],t,i),i&&i.length&&de(i).remove(),de.merge([],r.childNodes))};var fn=de.fn.load;de.fn.load=function(e,t,n){if("string"!=typeof e&&fn)return fn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=de.trim(e.slice(s,e.length)),e=e.slice(0,s)),de.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&de.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?de("
        ").append(de.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},de.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){de.fn[t]=function(e){return this.on(t,e)}}),de.expr.filters.animated=function(e){return de.grep(de.timers,function(t){return e===t.elem}).length},de.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=de.css(e,"position"),f=de(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=de.css(e,"top"),u=de.css(e,"left"),l=("absolute"===c||"fixed"===c)&&de.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),de.isFunction(t)&&(t=t.call(e,n,de.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},de.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){de.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,de.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===de.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),de.nodeName(e[0],"html")||(n=e.offset()),n.top+=de.css(e[0],"borderTopWidth",!0),n.left+=de.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-de.css(r,"marginTop",!0),left:t.left-n.left-de.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!de.nodeName(e,"html")&&"static"===de.css(e,"position");)e=e.offsetParent;return e||ft})}}),de.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);de.fn[e]=function(r){return Oe(this,function(e,r,i){var o=te(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?de(o).scrollLeft():i,n?i:de(o).scrollTop()):e[r]=i},e,r,arguments.length,null)}}),de.each(["top","left"],function(e,t){de.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=pt(e,t),lt.test(n)?de(e).position()[t]+"px":n})}),de.each({Height:"height",Width:"width"},function(e,t){de.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){de.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Oe(this,function(t,n,r){var i;return de.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?de.css(t,n,a):de.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),de.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),de.fn.size=function(){return this.length},de.fn.andSelf=de.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return de});var dn=e.jQuery,pn=e.$;return de.noConflict=function(t){return e.$===de&&(e.$=pn),t&&e.jQuery===de&&(e.jQuery=dn),de},t||(e.jQuery=e.$=de),de}); \ No newline at end of file +!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=fe.type(e);return"function"!==n&&!fe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(fe.isFunction(t))return fe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return fe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(we.test(t))return fe.filter(t,e,n);t=fe.filter(t,e)}return fe.grep(e,function(e){return fe.inArray(e,t)>-1!==n})}function i(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t={};return fe.each(e.match(ke)||[],function(e,n){t[n]=!0}),t}function a(){ne.addEventListener?(ne.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ne.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ne.addEventListener||"load"===e.event.type||"complete"===ne.readyState)&&(a(),fe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Le,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:je.test(n)?fe.parseJSON(n):n)}catch(e){}fe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!fe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(De(e)){var i,o,a=fe.expando,s=e.nodeType,u=s?fe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=te.pop()||fe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:fe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=fe.extend(u[l],t):u[l].data=fe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[fe.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[fe.camelCase(t)]):i=o,i}}function f(e,t,n){if(De(e)){var r,i,o=e.nodeType,a=o?fe.cache:e,s=o?e[fe.expando]:fe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){i=(t=fe.isArray(t)?t.concat(fe.map(t,fe.camelCase)):t in r?[t]:(t=fe.camelCase(t))in r?[t]:t.split(" ")).length;for(;i--;)delete r[t[i]];if(n?!l(r):!fe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?fe.cleanData([e],!0):ce.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return fe.css(e,t,"")},u=s(),l=n&&n[3]||(fe.cssNumber[t]?"":"px"),c=(fe.cssNumber[t]||"px"!==l&&+u)&&qe.exec(fe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{c/=o=o||".5",fe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||fe.nodeName(r,t)?o.push(r):fe.merge(o,h(r,t));return void 0===t||t&&fe.nodeName(e,t)?fe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)fe._data(n,"globalEval",!t||fe._data(t[r],"globalEval"))}function m(e){Oe.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,v=p(t),y=[],x=0;x"!==f[1]||ze.test(a)?0:u:u.firstChild)&&a.childNodes.length;o--;)fe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(fe.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=v.lastChild}else y.push(t.createTextNode(a));for(u&&v.removeChild(u),ce.appendChecked||fe.grep(h(y,"input"),m),x=0;a=y[x++];)if(r&&fe.inArray(a,r)>-1)i&&i.push(a);else if(s=fe.contains(a.ownerDocument,a),u=h(v.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Pe.test(a.type||"")&&n.push(a);return u=null,v}function y(){return!0}function x(){return!1}function b(){try{return ne.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=x;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return fe().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=fe.guid++)),e.each(function(){fe.event.add(this,t,i,r,n)})}function T(e,t){return fe.nodeName(e,"table")&&fe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==fe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=tt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&fe.hasData(e)){var n,r,i,o=fe._data(e),a=fe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!ce.checkClone&&et.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=v(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(a=(s=fe.map(h(l,"script"),C)).length;c")).appendTo(t.documentElement))[0].contentWindow||it[0].contentDocument).document).write(),t.close(),n=D(e,t),it.detach()),ot[e]=n),n}function L(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function H(e){if(e in bt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=xt.length;n--;)if((e=xt[n]+t)in bt)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==fe.type(e)||e.nodeType||fe.isWindow(e))return!1;try{if(e.constructor&&!le.call(e,"constructor")&&!le.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!ce.ownFirst)for(t in e)return le.call(e,t);for(t in e);return void 0===t||le.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?se[ue.call(e)]||"object":typeof e},globalEval:function(t){t&&fe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(pe,"ms-").replace(he,ge)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;ib.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[O]=!0,e}function i(e){var t=j.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&void 0!==e.getElementsByTagName&&e}function l(){}function c(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function p(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=h(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):G.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=f(function(e){return e===t},a,!0),l=f(function(e){return K(t,e)>-1},a,!0),p=[function(e,n,r){var i=!o&&(r||n!==k)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&d(p),s>1&&c(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,g="0",m=r&&[],v=[],y=k,x=r||o&&b.find.TAG("*",l),w=P+=null==y?1:Math.random()||.1,T=x.length;for(l&&(k=a===j||a||l);g!==T&&null!=(c=x[g]);g++){if(o&&c){for(f=0,a||c.ownerDocument===j||(D(c),s=!H);d=e[f++];)if(d(c,a||j,s)){u.push(c);break}l&&(P=w)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=g,i&&g!==p){for(f=0;d=n[f++];)d(m,v,a,s);if(r){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=Y.call(u));v=h(v)}G.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(P=w,k=y),m};return i?r(a):a}var y,x,b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O="sizzle"+1*new Date,R=e.document,P=0,B=0,W=n(),I=n(),$=n(),z=function(e,t){return e===t&&(A=!0),0},X=1<<31,U={}.hasOwnProperty,V=[],Y=V.pop,J=V.push,G=V.push,Q=V.slice,K=function(e,t){for(var n=0,r=e.length;n+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},be=function(){D()};try{G.apply(V=Q.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){G={apply:V.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},T=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},D=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,L=j.documentElement,H=!T(j),(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",be,!1):n.attachEvent&&n.attachEvent("onunload",be)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(j.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=he.test(j.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=O,!j.getElementsByName||!j.getElementsByName(O).length}),x.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=x.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=x.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},_=[],q=[],(x.qsa=he.test(j.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+O+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+O+"+*").length||q.push(".#.+[+~]")}),i(function(e){var t=j.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(x.matchesSelector=he.test(F=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",re)}),q=q.length&&new RegExp(q.join("|")),_=_.length&&new RegExp(_.join("|")),t=he.test(L.compareDocumentPosition),M=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===j||e.ownerDocument===R&&M(R,e)?-1:t===j||t.ownerDocument===R&&M(R,t)?1:S?K(S,e)-K(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===j?-1:t===j?1:i?-1:o?1:S?K(S,e)-K(S,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},j):j},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==j&&D(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&H&&!$[n+" "]&&(!_||!_.test(n))&&(!q||!q.test(n)))try{var r=F.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,j,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==j&&D(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==j&&D(e);var n=b.attrHandle[t.toLowerCase()],r=n&&U.call(b.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:x.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(z),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},w=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=w(t);return n},(b=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(x=(p=(l=(c=(f=(d=m)[O]||(d[O]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===P&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[P,p,x];break}}else if(y&&(x=p=(l=(c=(f=(d=t)[O]||(d[O]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===P&&l[1]),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&((c=(f=d[O]||(d[O]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[P,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[O]?o(n):o.length>1?(i=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=K(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(oe,"$1"));return i[O]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ye,xe),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&H&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((l=b.find[s])&&(r=l(a.matches[0].replace(ye,xe),me.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&c(o)))return G.apply(n,r),n;break}}return(f||E(e,d))(r,t,!H,n,!t||me.test(e)&&u(t.parentNode)||t),n},x.sortStable=O.split("").sort(z).join("")===O,x.detectDuplicates=!!A,D(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(j.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);fe.find=me,fe.expr=me.selectors,fe.expr[":"]=fe.expr.pseudos,fe.uniqueSort=fe.unique=me.uniqueSort,fe.text=me.getText,fe.isXMLDoc=me.isXML,fe.contains=me.contains;var ve=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&fe(e).is(n))break;r.push(e)}return r},ye=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},xe=fe.expr.match.needsContext,be=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,we=/^.[^:#\[\.,]*$/;fe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?fe.find.matchesSelector(r,e)?[r]:[]:fe.find.matches(e,fe.grep(t,function(e){return 1===e.nodeType}))},fe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(fe(e).filter(function(){for(t=0;t1?fe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&xe.test(e)?fe(e):e||[],!1).length}});var Te,Ce=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(fe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Te,"string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ce.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof fe?t[0]:t,fe.merge(this,fe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),be.test(r[1])&&fe.isPlainObject(t))for(r in t)fe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=ne.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return Te.find(e);this.length=1,this[0]=i}return this.context=ne,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):fe.isFunction(e)?void 0!==n.ready?n.ready(e):e(fe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),fe.makeArray(e,this))}).prototype=fe.fn,Te=fe(ne);var Ee=/^(?:parents|prev(?:Until|All))/,Ne={children:!0,contents:!0,next:!0,prev:!0};fe.fn.extend({has:function(e){var t,n=fe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&fe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?fe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?fe.inArray(this[0],fe(e)):fe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(fe.uniqueSort(fe.merge(this.get(),fe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),fe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ve(e,"parentNode")},parentsUntil:function(e,t,n){return ve(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ve(e,"nextSibling")},prevAll:function(e){return ve(e,"previousSibling")},nextUntil:function(e,t,n){return ve(e,"nextSibling",n)},prevUntil:function(e,t,n){return ve(e,"previousSibling",n)},siblings:function(e){return ye((e.parentNode||{}).firstChild,e)},children:function(e){return ye(e.firstChild)},contents:function(e){return fe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:fe.merge([],e.childNodes)}},function(e,t){fe.fn[e]=function(n,r){var i=fe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=fe.filter(r,i)),this.length>1&&(Ne[e]||(i=fe.uniqueSort(i)),Ee.test(e)&&(i=i.reverse())),this.pushStack(i)}});var ke=/\S+/g;fe.Callbacks=function(e){e="string"==typeof e?o(e):fe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?fe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},fe.extend({Deferred:function(e){var t=[["resolve","done",fe.Callbacks("once memory"),"resolved"],["reject","fail",fe.Callbacks("once memory"),"rejected"],["notify","progress",fe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return fe.Deferred(function(n){fe.each(t,function(t,o){var a=fe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&fe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?fe.extend(e,r):r}},i={};return r.pipe=r.then,fe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=re.call(arguments),a=o.length,s=1!==a||e&&fe.isFunction(e.promise)?a:0,u=1===s?e:fe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?re.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(Se.resolveWith(ne,[fe]),fe.fn.triggerHandler&&(fe(ne).triggerHandler("ready"),fe(ne).off("ready"))))}}),fe.ready.promise=function(t){if(!Se)if(Se=fe.Deferred(),"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll)e.setTimeout(fe.ready);else if(ne.addEventListener)ne.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{ne.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&ne.documentElement}catch(e){}n&&n.doScroll&&function t(){if(!fe.isReady){try{n.doScroll("left")}catch(n){return e.setTimeout(t,50)}a(),fe.ready()}}()}return Se.promise(t)},fe.ready.promise();var Ae;for(Ae in fe(ce))break;ce.ownFirst="0"===Ae,ce.inlineBlockNeedsLayout=!1,fe(function(){var e,t,n,r;(n=ne.getElementsByTagName("body")[0])&&n.style&&(t=ne.createElement("div"),(r=ne.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ce.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=ne.createElement("div");ce.deleteExpando=!0;try{delete e.test}catch(e){ce.deleteExpando=!1}e=null}();var De=function(e){var t=fe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},je=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Le=/([A-Z])/g;fe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?fe.cache[e[fe.expando]]:e[fe.expando])&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),fe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=fe.data(o),1===o.nodeType&&!fe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&u(o,r=fe.camelCase(r.slice(5)),i[r]);fe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){fe.data(this,e)}):arguments.length>1?this.each(function(){fe.data(this,e,t)}):o?u(o,e,fe.data(o,e)):void 0},removeData:function(e){return this.each(function(){fe.removeData(this,e)})}}),fe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=fe._data(e,t),n&&(!r||fe.isArray(n)?r=fe._data(e,t,fe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=fe.queue(e,t),r=n.length,i=n.shift(),o=fe._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){fe.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return fe._data(e,n)||fe._data(e,n,{empty:fe.Callbacks("once memory").add(function(){fe._removeData(e,t+"queue"),fe._removeData(e,n)})})}}),fe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
        a",ce.leadingWhitespace=3===e.firstChild.nodeType,ce.tbody=!e.getElementsByTagName("tbody").length,ce.htmlSerialize=!!e.getElementsByTagName("link").length,ce.html5Clone="<:nav>"!==ne.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),ce.appendChecked=n.checked,e.innerHTML="",ce.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),(n=ne.createElement("input")).setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ce.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.noCloneEvent=!!e.addEventListener,e[fe.expando]=1,ce.attributes=!e.getAttribute(fe.expando)}();var Ie={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:ce.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};Ie.optgroup=Ie.option,Ie.tbody=Ie.tfoot=Ie.colgroup=Ie.caption=Ie.thead,Ie.th=Ie.td;var $e=/<|&#?\w+;/,ze=/-1&&(p=(h=p.split(".")).shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[fe.expando]?t:new fe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:fe.makeArray(n,[t]),l=fe.event.special[p]||{},i||!l.trigger||!1!==l.trigger.apply(r,n))){if(!i&&!l.noBubble&&!fe.isWindow(r)){for(u=l.delegateType||p,Ye.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||ne)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,(o=(fe._data(s,"events")||{})[t.type]&&fe._data(s,"handle"))&&o.apply(s,n),(o=a&&s[a])&&o.apply&&De(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(d.pop(),n))&&De(r)&&a&&r[p]&&!fe.isWindow(r)){(c=r[a])&&(r[a]=null),fe.event.triggered=p;try{r[p]()}catch(e){}fe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=fe.event.fix(e);var t,n,r,i,o,a=[],s=re.call(arguments),u=(fe._data(this,"events")||{})[e.type]||[],l=fe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=fe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((fe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n-1:fe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),Ke=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ze=/\s*$/g,rt=p(ne).appendChild(ne.createElement("div"));fe.extend({htmlPrefilter:function(e){return e.replace(Ke,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=fe.contains(e.ownerDocument,e);if(ce.html5Clone||fe.isXMLDoc(e)||!Qe.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(rt.innerHTML=e.outerHTML,rt.removeChild(o=rt.firstChild)),!(ce.noCloneEvent&&ce.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||fe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return(r=h(o,"script")).length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=fe.expando,u=fe.cache,l=ce.attributes,c=fe.event.special;null!=(n=e[a]);a++)if((t||De(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?fe.event.remove(n,r):fe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||void 0===n.removeAttribute?n[s]=void 0:n.removeAttribute(s),te.push(i))}}}),fe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Me(this,function(e){return void 0===e?fe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ne).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||T(this,e).appendChild(e)})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&fe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&fe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return fe.clone(this,e,t)})},html:function(e){return Me(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ge,""):void 0;if("string"==typeof e&&!Ze.test(e)&&(ce.htmlSerialize||!Qe.test(e))&&(ce.leadingWhitespace||!Be.test(e))&&!Ie[(Re.exec(e)||["",""])[1].toLowerCase()]){e=fe.htmlPrefilter(e);try{for(;nt",l.childNodes[0].style.borderCollapse="separate",(t=l.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=ne.createElement("div"),l=ne.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",ce.opacity="0.5"===l.style.opacity,ce.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",ce.clearCloneStyle="content-box"===l.style.backgroundClip,(u=ne.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),ce.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,fe.extend(ce,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ct,ft,dt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ct=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},ft=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ct(e),""!==(a=n?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==a||fe.contains(e.ownerDocument,e)||(a=fe.style(e,t)),n&&!ce.pixelMarginRight()&&st.test(a)&&at.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):lt.currentStyle&&(ct=function(e){return e.currentStyle},ft=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ct(e),null==(a=n?n[t]:void 0)&&s&&s[t]&&(a=s[t]),st.test(a)&&!dt.test(t)&&(r=s.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var pt=/alpha\([^)]*\)/i,ht=/opacity\s*=\s*([^)]*)/i,gt=/^(none|table(?!-c[ea]).+)/,mt=new RegExp("^("+He+")(.*)$","i"),vt={position:"absolute",visibility:"hidden",display:"block"},yt={letterSpacing:"0",fontWeight:"400"},xt=["Webkit","O","Moz","ms"],bt=ne.createElement("div").style;fe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ft(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:ce.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=fe.camelCase(t),u=e.style;if(t=fe.cssProps[s]||(fe.cssProps[s]=H(s)||s),a=fe.cssHooks[t]||fe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if("string"==(o=typeof n)&&(i=qe.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(fe.cssNumber[s]?"":"px")),ce.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=fe.camelCase(t);return t=fe.cssProps[s]||(fe.cssProps[s]=H(s)||s),(a=fe.cssHooks[t]||fe.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=ft(e,t,r)),"normal"===o&&t in yt&&(o=yt[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),fe.each(["height","width"],function(e,t){fe.cssHooks[t]={get:function(e,n,r){if(n)return gt.test(fe.css(e,"display"))&&0===e.offsetWidth?ut(e,vt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ct(e);return _(0,n,r?F(e,t,r,ce.boxSizing&&"border-box"===fe.css(e,"boxSizing",!1,i),i):0)}}}),ce.opacity||(fe.cssHooks.opacity={get:function(e,t){return ht.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=fe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===fe.trim(o.replace(pt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=pt.test(o)?o.replace(pt,i):o+" "+i)}}),fe.cssHooks.marginRight=L(ce.reliableMarginRight,function(e,t){if(t)return ut(e,{display:"inline-block"},ft,[e,"marginRight"])}),fe.cssHooks.marginLeft=L(ce.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ft(e,"marginLeft"))||(fe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ut(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),fe.each({margin:"",padding:"",border:"Width"},function(e,t){fe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+_e[r]+t]=o[r]||o[r-2]||o[0];return i}},at.test(e)||(fe.cssHooks[e+t].set=_)}),fe.fn.extend({css:function(e,t){return Me(this,function(e,t,n){var r,i,o={},a=0;if(fe.isArray(t)){for(r=ct(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Fe(this)?fe(this).show():fe(this).hide()})}}),fe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||fe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(fe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=fe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=fe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){fe.fx.step[e.prop]?fe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[fe.cssProps[e.prop]]&&!fe.cssHooks[e.prop]?e.elem[e.prop]=e.now:fe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},fe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},fe.fx=O.prototype.init,fe.fx.step={};var wt,Tt,Ct=/^(?:toggle|show|hide)$/,Et=/queueHooks$/;fe.Animation=fe.extend(I,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,qe.exec(t),n),n}]},tweener:function(e,t){fe.isFunction(e)?(t=e,e=["*"]):e=e.match(ke);for(var n,r=0,i=e.length;r
        a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),(e=n.getElementsByTagName("a")[0]).style.cssText="top:1px",ce.getSetAttribute="t"!==n.className,ce.style=/top/.test(e.getAttribute("style")),ce.hrefNormalized="/a"===e.getAttribute("href"),ce.checkOn=!!t.value,ce.optSelected=i.selected,ce.enctype=!!ne.createElement("form").enctype,r.disabled=!0,ce.optDisabled=!i.disabled,(t=ne.createElement("input")).setAttribute("value",""),ce.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ce.radioValue="t"===t.value}();var Nt=/\r/g,kt=/[\x20\t\r\n\f]+/g;fe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=fe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,fe(this).val()):e)?i="":"number"==typeof i?i+="":fe.isArray(i)&&(i=fe.map(i,function(e){return null==e?"":e+""})),(t=fe.valHooks[this.type]||fe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=fe.valHooks[i.type]||fe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Nt,""):null==n?"":n}}}),fe.extend({valHooks:{option:{get:function(e){var t=fe.find.attr(e,"value");return null!=t?t:fe.trim(fe.text(e)).replace(kt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),fe.each(["radio","checkbox"],function(){fe.valHooks[this]={set:function(e,t){if(fe.isArray(t))return e.checked=fe.inArray(fe(e).val(),t)>-1}},ce.checkOn||(fe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var St,At,Dt=fe.expr.attrHandle,jt=/^(?:checked|selected)$/i,Lt=ce.getSetAttribute,Ht=ce.input;fe.fn.extend({attr:function(e,t){return Me(this,fe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){fe.removeAttr(this,e)})}}),fe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?fe.prop(e,t,n):(1===o&&fe.isXMLDoc(e)||(t=t.toLowerCase(),i=fe.attrHooks[t]||(fe.expr.match.bool.test(t)?At:St)),void 0!==n?null===n?void fe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=fe.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!ce.radioValue&&"radio"===t&&fe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(ke);if(o&&1===e.nodeType)for(;n=o[i++];)r=fe.propFix[n]||n,fe.expr.match.bool.test(n)?Ht&&Lt||!jt.test(n)?e[r]=!1:e[fe.camelCase("default-"+n)]=e[r]=!1:fe.attr(e,n,""),e.removeAttribute(Lt?n:r)}}),At={set:function(e,t,n){return!1===t?fe.removeAttr(e,n):Ht&&Lt||!jt.test(n)?e.setAttribute(!Lt&&fe.propFix[n]||n,n):e[fe.camelCase("default-"+n)]=e[n]=!0,n}},fe.each(fe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Dt[t]||fe.find.attr;Ht&&Lt||!jt.test(t)?Dt[t]=function(e,t,r){var i,o;return r||(o=Dt[t],Dt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Dt[t]=o),i}:Dt[t]=function(e,t,n){if(!n)return e[fe.camelCase("default-"+t)]?t.toLowerCase():null}}),Ht&&Lt||(fe.attrHooks.value={set:function(e,t,n){if(!fe.nodeName(e,"input"))return St&&St.set(e,t,n);e.defaultValue=t}}),Lt||(St={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},Dt.id=Dt.name=Dt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},fe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:St.set},fe.attrHooks.contenteditable={set:function(e,t,n){St.set(e,""!==t&&t,n)}},fe.each(["width","height"],function(e,t){fe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ce.style||(fe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var qt=/^(?:input|select|textarea|button|object)$/i,_t=/^(?:a|area)$/i;fe.fn.extend({prop:function(e,t){return Me(this,fe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=fe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),fe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&fe.isXMLDoc(e)||(t=fe.propFix[t]||t,i=fe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=fe.find.attr(e,"tabindex");return t?parseInt(t,10):qt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ce.hrefNormalized||fe.each(["href","src"],function(e,t){fe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ce.optSelected||(fe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),fe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fe.propFix[this.toLowerCase()]=this}),ce.enctype||(fe.propFix.enctype="encoding");var Ft=/[\t\r\n\f]/g;fe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(fe.isFunction(e))return this.each(function(t){fe(this).addClass(e.call(this,t,$(this)))});if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[u++];)if(i=$(n),r=1===n.nodeType&&(" "+i+" ").replace(Ft," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=fe.trim(r))&&fe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(fe.isFunction(e))return this.each(function(t){fe(this).removeClass(e.call(this,t,$(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[u++];)if(i=$(n),r=1===n.nodeType&&(" "+i+" ").replace(Ft," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=fe.trim(r))&&fe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):fe.isFunction(e)?this.each(function(n){fe(this).toggleClass(e.call(this,n,$(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=fe(this),o=e.match(ke)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=$(this))&&fe._data(this,"__className__",t),fe.attr(this,"class",t||!1===e?"":fe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+$(n)+" ").replace(Ft," ").indexOf(t)>-1)return!0;return!1}}),fe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){fe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),fe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Mt=e.location,Ot=fe.now(),Rt=/\?/,Pt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;fe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=fe.trim(t+"");return i&&!fe.trim(i.replace(Pt,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():fe.error("Invalid JSON: "+t)},fe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):((n=new e.ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||fe.error("Invalid XML: "+t),n};var Bt=/#.*$/,Wt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,$t=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zt=/^(?:GET|HEAD)$/,Xt=/^\/\//,Ut=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Vt={},Yt={},Jt="*/".concat("*"),Gt=Mt.href,Qt=Ut.exec(Gt.toLowerCase())||[];fe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Gt,type:"GET",isLocal:$t.test(Qt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":fe.parseJSON,"text xml":fe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,fe.ajaxSettings),t):U(fe.ajaxSettings,e)},ajaxPrefilter:z(Vt),ajaxTransport:z(Yt),ajax:function(t,n){function r(t,n,r,i){var o,f,y,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=V(d,T,r)),x=Y(d,x,T,o),o?(d.ifModified&&((w=T.getResponseHeader("Last-Modified"))&&(fe.lastModified[a]=w),(w=T.getResponseHeader("etag"))&&(fe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,o=!(y=x.error))):(y=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,y]),T.statusCode(v),v=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:y]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--fe.active||fe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=fe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?fe(p):fe.event,g=fe.Deferred(),m=fe.Callbacks("once memory"),v=d.statusCode||{},y={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=It.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||Gt)+"").replace(Bt,"").replace(Xt,Qt[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=fe.trim(d.dataType||"*").toLowerCase().match(ke)||[""],null==d.crossDomain&&(i=Ut.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Qt[1]&&i[2]===Qt[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Qt[3]||("http:"===Qt[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=fe.param(d.data,d.traditional)),X(Vt,d,n,T),2===b)return T;(l=fe.event&&d.global)&&0==fe.active++&&fe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!zt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(Rt.test(a)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Wt.test(a)?a.replace(Wt,"$1_="+Ot++):a+(Rt.test(a)?"&":"?")+"_="+Ot++)),d.ifModified&&(fe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",fe.lastModified[a]),fe.etag[a]&&T.setRequestHeader("If-None-Match",fe.etag[a])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Jt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(p,T,d)||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=X(Yt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(y,r)}catch(e){if(!(b<2))throw e;r(-1,e)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return fe.get(e,t,n,"json")},getScript:function(e,t){return fe.get(e,void 0,t,"script")}}),fe.each(["get","post"],function(e,t){fe[t]=function(e,n,r,i){return fe.isFunction(n)&&(i=i||r,r=n,n=void 0),fe.ajax(fe.extend({url:e,type:t,dataType:i,data:n,success:r},fe.isPlainObject(e)&&e))}}),fe._evalUrl=function(e){return fe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},fe.fn.extend({wrapAll:function(e){if(fe.isFunction(e))return this.each(function(t){fe(this).wrapAll(e.call(this,t))});if(this[0]){var t=fe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return fe.isFunction(e)?this.each(function(t){fe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=fe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=fe.isFunction(e);return this.each(function(n){fe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){fe.nodeName(this,"body")||fe(this).replaceWith(this.childNodes)}).end()}}),fe.expr.filters.hidden=function(e){return ce.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:G(e)},fe.expr.filters.visible=function(e){return!fe.expr.filters.hidden(e)};var Kt=/%20/g,Zt=/\[\]$/,en=/\r?\n/g,tn=/^(?:submit|button|image|reset|file)$/i,nn=/^(?:input|select|textarea|keygen)/i;fe.param=function(e,t){var n,r=[],i=function(e,t){t=fe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=fe.ajaxSettings&&fe.ajaxSettings.traditional),fe.isArray(e)||e.jquery&&!fe.isPlainObject(e))fe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(Kt,"+")},fe.fn.extend({serialize:function(){return fe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=fe.prop(this,"elements");return e?fe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!fe(this).is(":disabled")&&nn.test(this.nodeName)&&!tn.test(e)&&(this.checked||!Oe.test(e))}).map(function(e,t){var n=fe(this).val();return null==n?null:fe.isArray(n)?fe.map(n,function(e){return{name:t.name,value:e.replace(en,"\r\n")}}):{name:t.name,value:n.replace(en,"\r\n")}}).get()}}),fe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?Z():ne.documentMode>8?K():/^(get|post|head|put|delete|options)$/i.test(this.type)&&K()||Z()}:K;var rn=0,on={},an=fe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in on)on[e](void 0,!0)}),ce.cors=!!an&&"withCredentials"in an,(an=ce.ajax=!!an)&&fe.ajaxTransport(function(t){if(!t.crossDomain||ce.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++rn;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete on[s],n=void 0,a.onreadystatechange=fe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(e){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=on[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),fe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return fe.globalEval(e),e}}}),fe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),fe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ne.head||fe("head")[0]||ne.documentElement;return{send:function(r,i){(t=ne.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var sn=[],un=/(=)\?(?=&|$)|\?\?/;fe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=sn.pop()||fe.expando+"_"+Ot++;return this[e]=!0,e}}),fe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(un.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&un.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=fe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(un,"$1"+i):!1!==t.jsonp&&(t.url+=(Rt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||fe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?fe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,sn.push(i)),a&&fe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),fe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ne;var r=be.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=v([e],t,i),i&&i.length&&fe(i).remove(),fe.merge([],r.childNodes))};var ln=fe.fn.load;fe.fn.load=function(e,t,n){if("string"!=typeof e&&ln)return ln.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=fe.trim(e.slice(s,e.length)),e=e.slice(0,s)),fe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&fe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?fe("
        ").append(fe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},fe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){fe.fn[t]=function(e){return this.on(t,e)}}),fe.expr.filters.animated=function(e){return fe.grep(fe.timers,function(t){return e===t.elem}).length},fe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=fe.css(e,"position"),c=fe(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=fe.css(e,"top"),u=fe.css(e,"left"),("absolute"===l||"fixed"===l)&&fe.inArray("auto",[o,u])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),fe.isFunction(t)&&(t=t.call(e,n,fe.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},fe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){fe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,fe.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=ee(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===fe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),fe.nodeName(e[0],"html")||(n=e.offset()),n.top+=fe.css(e[0],"borderTopWidth",!0),n.left+=fe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-fe.css(r,"marginTop",!0),left:t.left-n.left-fe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!fe.nodeName(e,"html")&&"static"===fe.css(e,"position");)e=e.offsetParent;return e||lt})}}),fe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);fe.fn[e]=function(r){return Me(this,function(e,r,i){var o=ee(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?fe(o).scrollLeft():i,n?i:fe(o).scrollTop()):e[r]=i},e,r,arguments.length,null)}}),fe.each(["top","left"],function(e,t){fe.cssHooks[t]=L(ce.pixelPosition,function(e,n){if(n)return n=ft(e,t),st.test(n)?fe(e).position()[t]+"px":n})}),fe.each({Height:"height",Width:"width"},function(e,t){fe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){fe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Me(this,function(t,n,r){var i;return fe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?fe.css(t,n,a):fe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),fe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),fe.fn.size=function(){return this.length},fe.fn.andSelf=fe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return fe});var cn=e.jQuery,fn=e.$;return fe.noConflict=function(t){return e.$===fe&&(e.$=fn),t&&e.jQuery===fe&&(e.jQuery=cn),fe},t||(e.jQuery=e.$=fe),fe}); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.migrate.js b/static/scripts/libs/jquery/jquery.migrate.js index 4bc837f86c2..474359a7c47 100644 --- a/static/scripts/libs/jquery/jquery.migrate.js +++ b/static/scripts/libs/jquery/jquery.migrate.js @@ -1 +1 @@ -!function(e,t,r){function n(r){var n=t.console;a[r]||(a[r]=!0,e.migrateWarnings.push(r),n&&n.warn&&!e.migrateMute&&(n.warn("JQMIGRATE: "+r),e.migrateTrace&&n.trace&&n.trace()))}function o(t,r,o,a){if(Object.defineProperty)try{return void Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get:function(){return n(a),o},set:function(e){n(a),o=e}})}catch(e){}e._definePropertyBroken=!0,t[r]=o}e.migrateVersion="1.4.0";var a={};e.migrateWarnings=[],t.console&&t.console.log&&t.console.log("JQMIGRATE: Migrate is installed"+(e.migrateMute?"":" with logging active")+", version "+e.migrateVersion),void 0===e.migrateTrace&&(e.migrateTrace=!0),e.migrateReset=function(){a={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&n("jQuery is not compatible with Quirks Mode");var i=e("",{size:1}).attr("size")&&e.attrFn,s=e.attr,c=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},u=e.attrHooks.value&&e.attrHooks.value.set||function(){},d=/^(?:input|button)$/i,l=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;o(e,"attrFn",i||{},"jQuery.attrFn is deprecated"),e.attr=function(t,r,o,a){var c=r.toLowerCase(),u=t&&t.nodeType;return a&&(s.length<4&&n("jQuery.fn.attr( props, pass ) is deprecated"),t&&!l.test(u)&&(i?r in i:e.isFunction(e.fn[r])))?e(t)[r](o):("type"===r&&void 0!==o&&d.test(t.nodeName)&&t.parentNode&&n("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var n,o=e.prop(t,r);return!0===o||"boolean"!=typeof o&&(n=t.getAttributeNode(r))&&!1!==n.nodeValue?r.toLowerCase():void 0},set:function(t,r,n){var o;return!1===r?e.removeAttr(t,n):(o=e.propFix[n]||n,o in t&&(t[o]=!0),t.setAttribute(n,n.toLowerCase())),n}},f.test(c)&&n("jQuery.fn.attr('"+c+"') might use property instead of attribute")),s.call(e,t,r,o))},e.attrHooks.value={get:function(e,t){var r=(e.nodeName||"").toLowerCase();return"button"===r?c.apply(this,arguments):("input"!==r&&"option"!==r&&n("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var r=(e.nodeName||"").toLowerCase();if("button"===r)return u.apply(this,arguments);"input"!==r&&"option"!==r&&n("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t}};var v,h,g=e.fn.init,m=e.parseJSON,y=/^\s*)([^>]*)$/;e.fn.init=function(t,r,o){var a,i;return t&&"string"==typeof t&&!e.isPlainObject(r)&&(a=j.exec(e.trim(t)))&&a[0]&&(y.test(t)||n("$(html) HTML strings must start with '<' character"),a[3]&&n("$(html) HTML text after last tag is ignored"),"#"===a[0].charAt(0)&&(n("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),r&&r.context&&(r=r.context),e.parseHTML)?g.call(this,e.parseHTML(a[2],r&&r.ownerDocument||r||document,!0),r,o):("#"===t?(n("jQuery( '#' ) is not a valid selector"),t=[]):b.test(t)&&n("Attribute selectors with '#' must be quoted: '"+t+"'"),i=g.apply(this,arguments),t&&void 0!==t.selector?(i.selector=t.selector,i.context=t.context):(i.selector="string"==typeof t?t:"",t&&(i.context=t.nodeType?t:r||document)),i)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e?m.apply(this,arguments):(n("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(v=e.uaMatch(navigator.userAgent),h={},v.browser&&(h[v.browser]=!0,h.version=v.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),o(e,"browser",e.browser,"jQuery.browser is deprecated"),e.boxModel=e.support.boxModel="CSS1Compat"===document.compatMode,o(e,"boxModel",e.boxModel,"jQuery.boxModel is deprecated"),o(e.support,"boxModel",e.support.boxModel,"jQuery.support.boxModel is deprecated"),e.sub=function(){function t(e,r){return new t.fn.init(e,r)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(n,o){var a=e.fn.init.call(this,n,o,r);return a instanceof t?a:t(a)},t.fn.init.prototype=t.fn;var r=t(document);return n("jQuery.sub() is deprecated"),t},e.fn.size=function(){return n("jQuery.fn.size() is deprecated; use the .length property"),this.length};var w=!1;e.swap&&e.each(["height","width","reliableMarginRight"],function(t,r){var n=e.cssHooks[r]&&e.cssHooks[r].get;n&&(e.cssHooks[r].get=function(){var e;return w=!0,e=n.apply(this,arguments),w=!1,e})}),e.swap=function(e,t,r,o){var a,i,s={};w||n("jQuery.swap() is undocumented and deprecated");for(i in t)s[i]=e.style[i],e.style[i]=t[i];a=r.apply(e,o||[]);for(i in t)e.style[i]=s[i];return a},e.ajaxSetup({converters:{"text json":e.parseJSON}});var x=e.fn.data;e.fn.data=function(t){var r,o,a=this[0];return!a||"events"!==t||1!==arguments.length||(r=e.data(a,t),o=e._data(a,t),void 0!==r&&r!==o||void 0===o)?x.apply(this,arguments):(n("Use of jQuery.fn.data('events') is deprecated"),o)};var k=/\/(java|ecma)script/i;e.clean||(e.clean=function(t,r,o,a){r=r||document,r=!r.nodeType&&r[0]||r,r=r.ownerDocument||r,n("jQuery.clean() is deprecated");var i,s,c,u,d=[];if(e.merge(d,e.buildFragment(t,r).childNodes),o)for(c=function(e){if(!e.type||k.test(e.type))return a?a.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e)},i=0;null!=(s=d[i]);i++)e.nodeName(s,"script")&&c(s)||(o.appendChild(s),void 0!==s.getElementsByTagName&&(u=e.grep(e.merge([],s.getElementsByTagName("script")),c),d.splice.apply(d,[i+1,0].concat(u)),i+=u.length));return d});var Q=e.event.add,M=e.event.remove,C=e.event.trigger,N=e.fn.toggle,S=e.fn.live,T=e.fn.die,H=e.fn.load,A="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",L=new RegExp("\\b(?:"+A+")\\b"),F=/(?:^|\s)hover(\.\S+|)\b/,R=function(t){return"string"!=typeof t||e.event.special.hover?t:(F.test(t)&&n("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(F,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&o(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,r,o,a){e!==document&&L.test(t)&&n("AJAX events should be attached to document: "+t),Q.call(this,e,R(t||""),r,o,a)},e.event.remove=function(e,t,r,n,o){M.call(this,e,R(t)||"",r,n,o)},e.each(["load","unload","error"],function(t,r){e.fn[r]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===r&&"string"==typeof e[0]?H.apply(this,e):(n("jQuery.fn."+r+"() is deprecated"),e.splice(0,0,r),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),e.fn.toggle=function(t,r){if(!e.isFunction(t)||!e.isFunction(r))return N.apply(this,arguments);n("jQuery.fn.toggle(handler, handler...) is deprecated");var o=arguments,a=t.guid||e.guid++,i=0,s=function(r){var n=(e._data(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,n+1),r.preventDefault(),o[n].apply(this,arguments)||!1};for(s.guid=a;i",{size:1}).attr("size")&&e.attrFn,s=e.attr,c=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},u=e.attrHooks.value&&e.attrHooks.value.set||function(){},d=/^(?:input|button)$/i,l=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;o(e,"attrFn",i||{},"jQuery.attrFn is deprecated"),e.attr=function(t,r,o,a){var c=r.toLowerCase(),u=t&&t.nodeType;return a&&(s.length<4&&n("jQuery.fn.attr( props, pass ) is deprecated"),t&&!l.test(u)&&(i?r in i:e.isFunction(e.fn[r])))?e(t)[r](o):("type"===r&&void 0!==o&&d.test(t.nodeName)&&t.parentNode&&n("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var n,o=e.prop(t,r);return!0===o||"boolean"!=typeof o&&(n=t.getAttributeNode(r))&&!1!==n.nodeValue?r.toLowerCase():void 0},set:function(t,r,n){var o;return!1===r?e.removeAttr(t,n):((o=e.propFix[n]||n)in t&&(t[o]=!0),t.setAttribute(n,n.toLowerCase())),n}},f.test(c)&&n("jQuery.fn.attr('"+c+"') might use property instead of attribute")),s.call(e,t,r,o))},e.attrHooks.value={get:function(e,t){var r=(e.nodeName||"").toLowerCase();return"button"===r?c.apply(this,arguments):("input"!==r&&"option"!==r&&n("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var r=(e.nodeName||"").toLowerCase();if("button"===r)return u.apply(this,arguments);"input"!==r&&"option"!==r&&n("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t}};var v,h,g=e.fn.init,m=e.parseJSON,y=/^\s*)([^>]*)$/;e.fn.init=function(t,r,o){var a,i;return t&&"string"==typeof t&&!e.isPlainObject(r)&&(a=j.exec(e.trim(t)))&&a[0]&&(y.test(t)||n("$(html) HTML strings must start with '<' character"),a[3]&&n("$(html) HTML text after last tag is ignored"),"#"===a[0].charAt(0)&&(n("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),r&&r.context&&(r=r.context),e.parseHTML)?g.call(this,e.parseHTML(a[2],r&&r.ownerDocument||r||document,!0),r,o):("#"===t?(n("jQuery( '#' ) is not a valid selector"),t=[]):b.test(t)&&n("Attribute selectors with '#' must be quoted: '"+t+"'"),i=g.apply(this,arguments),t&&void 0!==t.selector?(i.selector=t.selector,i.context=t.context):(i.selector="string"==typeof t?t:"",t&&(i.context=t.nodeType?t:r||document)),i)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e?m.apply(this,arguments):(n("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(h={},(v=e.uaMatch(navigator.userAgent)).browser&&(h[v.browser]=!0,h.version=v.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),o(e,"browser",e.browser,"jQuery.browser is deprecated"),e.boxModel=e.support.boxModel="CSS1Compat"===document.compatMode,o(e,"boxModel",e.boxModel,"jQuery.boxModel is deprecated"),o(e.support,"boxModel",e.support.boxModel,"jQuery.support.boxModel is deprecated"),e.sub=function(){function t(e,r){return new t.fn.init(e,r)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(n,o){var a=e.fn.init.call(this,n,o,r);return a instanceof t?a:t(a)},t.fn.init.prototype=t.fn;var r=t(document);return n("jQuery.sub() is deprecated"),t},e.fn.size=function(){return n("jQuery.fn.size() is deprecated; use the .length property"),this.length};var w=!1;e.swap&&e.each(["height","width","reliableMarginRight"],function(t,r){var n=e.cssHooks[r]&&e.cssHooks[r].get;n&&(e.cssHooks[r].get=function(){var e;return w=!0,e=n.apply(this,arguments),w=!1,e})}),e.swap=function(e,t,r,o){var a,i,s={};w||n("jQuery.swap() is undocumented and deprecated");for(i in t)s[i]=e.style[i],e.style[i]=t[i];a=r.apply(e,o||[]);for(i in t)e.style[i]=s[i];return a},e.ajaxSetup({converters:{"text json":e.parseJSON}});var x=e.fn.data;e.fn.data=function(t){var r,o,a=this[0];return!a||"events"!==t||1!==arguments.length||(r=e.data(a,t),o=e._data(a,t),void 0!==r&&r!==o||void 0===o)?x.apply(this,arguments):(n("Use of jQuery.fn.data('events') is deprecated"),o)};var k=/\/(java|ecma)script/i;e.clean||(e.clean=function(t,r,o,a){r=(r=!(r=r||document).nodeType&&r[0]||r).ownerDocument||r,n("jQuery.clean() is deprecated");var i,s,c,u,d=[];if(e.merge(d,e.buildFragment(t,r).childNodes),o)for(c=function(e){if(!e.type||k.test(e.type))return a?a.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e)},i=0;null!=(s=d[i]);i++)e.nodeName(s,"script")&&c(s)||(o.appendChild(s),void 0!==s.getElementsByTagName&&(u=e.grep(e.merge([],s.getElementsByTagName("script")),c),d.splice.apply(d,[i+1,0].concat(u)),i+=u.length));return d});var Q=e.event.add,M=e.event.remove,C=e.event.trigger,N=e.fn.toggle,S=e.fn.live,T=e.fn.die,H=e.fn.load,A="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",L=new RegExp("\\b(?:"+A+")\\b"),F=/(?:^|\s)hover(\.\S+|)\b/,R=function(t){return"string"!=typeof t||e.event.special.hover?t:(F.test(t)&&n("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(F,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&o(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,r,o,a){e!==document&&L.test(t)&&n("AJAX events should be attached to document: "+t),Q.call(this,e,R(t||""),r,o,a)},e.event.remove=function(e,t,r,n,o){M.call(this,e,R(t)||"",r,n,o)},e.each(["load","unload","error"],function(t,r){e.fn[r]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===r&&"string"==typeof e[0]?H.apply(this,e):(n("jQuery.fn."+r+"() is deprecated"),e.splice(0,0,r),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),e.fn.toggle=function(t,r){if(!e.isFunction(t)||!e.isFunction(r))return N.apply(this,arguments);n("jQuery.fn.toggle(handler, handler...) is deprecated");var o=arguments,a=t.guid||e.guid++,i=0,s=function(r){var n=(e._data(this,"lastToggle"+t.guid)||0)%i;return e._data(this,"lastToggle"+t.guid,n+1),r.preventDefault(),o[n].apply(this,arguments)||!1};for(s.guid=a;i0?"floor":"ceil",s=Math[o](s/l),a=Math[o](a/n),u=Math[o](u/n),i.unshift(t,s,a,u),(e.event.dispatch||e.event.handle).apply(this,i)}var l,n,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var i=o.length;i;)e.event.fixHooks[o[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=h.length;e;)this.addEventListener(h[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=h.length;e;)this.removeEventListener(h[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery)}(); \ No newline at end of file +!function(e){e(jQuery)}(function(e){function t(t){var o,h=t||window.event,i=[].slice.call(arguments,1),s=0,a=0,u=0,r=0,d=0;return t=e.event.fix(h),t.type="mousewheel",h.wheelDelta&&(s=h.wheelDelta),h.detail&&(s=-1*h.detail),h.deltaY&&(s=u=-1*h.deltaY),h.deltaX&&(s=-1*(a=h.deltaX)),void 0!==h.wheelDeltaY&&(u=h.wheelDeltaY),void 0!==h.wheelDeltaX&&(a=-1*h.wheelDeltaX),r=Math.abs(s),(!l||r0?"floor":"ceil",s=Math[o](s/l),a=Math[o](a/n),u=Math[o](u/n),i.unshift(t,s,a,u),(e.event.dispatch||e.event.handle).apply(this,i)}var l,n,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var i=o.length;i;)e.event.fixHooks[o[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=h.length;e;)this.addEventListener(h[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=h.length;e;)this.removeEventListener(h[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.rating.js b/static/scripts/libs/jquery/jquery.rating.js index abeb7733c9d..4ccbef85799 100644 --- a/static/scripts/libs/jquery/jquery.rating.js +++ b/static/scripts/libs/jquery/jquery.rating.js @@ -1 +1 @@ -window.jQuery&&function(t){if(!t.support.opacity&&!t.support.style)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(t){}t.fn.rating=function(a){if(0==this.length)return this;if("string"==typeof arguments[0]){if(this.length>1){var i=arguments;return this.each(function(){t.fn.rating.apply(t(this),i)})}return t.fn.rating[arguments[0]].apply(this,t.makeArray(arguments).slice(1)||[]),this}var a=t.extend({},t.fn.rating.options,a||{});return t.fn.rating.calls++,this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var i,r=t(this),n=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,""),s=t(this.form||document.body),e=s.data("rating");e&&e.call==t.fn.rating.calls||(e={count:0,call:t.fn.rating.calls});var l=e[n]||s.data("rating"+n);l&&(i=l.data("rating")),l&&i?i.count++:(i=t.extend({},a||{},(t.metadata?r.metadata():t.meta?r.data():null)||{},{count:0,stars:[],inputs:[]}),i.serial=e.count++,l=t(''),r.before(l),l.addClass("rating-to-be-drawn"),(r.attr("disabled")||r.hasClass("disabled"))&&(i.readOnly=!0),r.hasClass("required")&&(i.required=!0),l.append(i.cancel=t('").on("mouseover",function(){t(this).rating("drain"),t(this).addClass("star-rating-hover")}).on("mouseout",function(){t(this).rating("draw"),t(this).removeClass("star-rating-hover")}).on("click",function(){t(this).rating("select")}).data("rating",i)));var d=t('");if(l.append(d),this.id&&d.attr("id",this.id),this.className&&d.addClass(this.className),i.half&&(i.split=2),"number"==typeof i.split&&i.split>0){var c=(t.fn.width?d.width():0)||i.starWidth,h=i.count%i.split,u=Math.floor(c/i.split);d.width(u).find("a").css({"margin-left":"-"+h*u+"px"})}i.readOnly?d.addClass("star-rating-readonly"):d.addClass("star-rating-live").on("mouseover",function(){t(this).rating("fill"),t(this).rating("focus")}).on("mouseout",function(){t(this).rating("draw"),t(this).rating("blur")}).on("click",function(){t(this).rating("select")}),this.checked&&(i.current=d),"A"==this.nodeName&&t(this).hasClass("selected")&&(i.current=d),r.hide(),r.on("change.rating",function(a){if(a.selfTriggered)return!1;t(this).rating("select")}),d.data("rating.input",r.data("rating.star",d)),i.stars[i.stars.length]=d[0],i.inputs[i.inputs.length]=r[0],i.rater=e[n]=l,i.context=s,r.data("rating",i),l.data("rating",i),d.data("rating",i),s.data("rating",e),s.data("rating"+n,l)}),t(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"),this},t.extend(t.fn.rating,{calls:0,focus:function(){var a=this.data("rating");if(!a)return this;if(!a.focus)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);a.focus&&a.focus.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},blur:function(){var a=this.data("rating");if(!a)return this;if(!a.blur)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);a.blur&&a.blur.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},fill:function(){var t=this.data("rating");if(!t)return this;t.readOnly||(this.rating("drain"),this.prevAll().addBack().filter(".rater-"+t.serial).addClass("star-rating-hover"))},drain:function(){var t=this.data("rating");if(!t)return this;t.readOnly||t.rater.children().filter(".rater-"+t.serial).removeClass("star-rating-on").removeClass("star-rating-hover")},draw:function(){var a=this.data("rating");if(!a)return this;this.rating("drain");var i=t(a.current),r=i.length?i.prevAll().addBack().filter(".rater-"+a.serial):null;r&&r.addClass("star-rating-on"),a.cancel[a.readOnly||a.required?"hide":"show"](),this.siblings()[a.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(a,i){var r=this.data("rating");if(!r)return this;if(!r.readOnly){if(r.current=null,void 0!==a||this.length>1){if("number"==typeof a)return t(r.stars[a]).rating("select",void 0,i);if("string"==typeof a)return t.each(r.stars,function(){t(this).data("rating.input").val()==a&&t(this).rating("select",void 0,i)}),this}else r.current="INPUT"==this[0].tagName?this.data("rating.star"):this.is(".rater-"+r.serial)?this:null;this.data("rating",r),this.rating("draw");var n=t(r.current?r.current.data("rating.input"):null),s=t(r.inputs).filter(":checked");return t(r.inputs).not(n).prop("checked",!1),n.prop("checked",!0),t(n.length?n:s).trigger({type:"change",selfTriggered:!0}),(i||void 0==i)&&r.callback&&r.callback.apply(n[0],[n.val(),t("a",r.current)[0]]),this}},readOnly:function(a,i){var r=this.data("rating");if(!r)return this;r.readOnly=!(!a&&void 0!=a),i?t(r.inputs).attr("disabled","disabled"):t(r.inputs).removeAttr("disabled"),this.data("rating",r),this.rating("draw")},disable:function(){this.rating("readOnly",!0,!0)},enable:function(){this.rating("readOnly",!1,!1)}}),t.fn.rating.options={cancel:"Cancel Rating",cancelValue:"",split:0,starWidth:16},t(function(){t("input[type=radio].star").rating()})}(jQuery); \ No newline at end of file +window.jQuery&&function(t){if(!t.support.opacity&&!t.support.style)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(t){}t.fn.rating=function(a){if(0==this.length)return this;if("string"==typeof arguments[0]){if(this.length>1){var i=arguments;return this.each(function(){t.fn.rating.apply(t(this),i)})}return t.fn.rating[arguments[0]].apply(this,t.makeArray(arguments).slice(1)||[]),this}var a=t.extend({},t.fn.rating.options,a||{});return t.fn.rating.calls++,this.not(".star-rating-applied").addClass("star-rating-applied").each(function(){var i,r=t(this),n=(this.name||"unnamed-rating").replace(/\[|\]/g,"_").replace(/^\_+|\_+$/g,""),s=t(this.form||document.body),e=s.data("rating");e&&e.call==t.fn.rating.calls||(e={count:0,call:t.fn.rating.calls});var l=e[n]||s.data("rating"+n);l&&(i=l.data("rating")),l&&i?i.count++:((i=t.extend({},a||{},(t.metadata?r.metadata():t.meta?r.data():null)||{},{count:0,stars:[],inputs:[]})).serial=e.count++,l=t(''),r.before(l),l.addClass("rating-to-be-drawn"),(r.attr("disabled")||r.hasClass("disabled"))&&(i.readOnly=!0),r.hasClass("required")&&(i.required=!0),l.append(i.cancel=t('").on("mouseover",function(){t(this).rating("drain"),t(this).addClass("star-rating-hover")}).on("mouseout",function(){t(this).rating("draw"),t(this).removeClass("star-rating-hover")}).on("click",function(){t(this).rating("select")}).data("rating",i)));var d=t('");if(l.append(d),this.id&&d.attr("id",this.id),this.className&&d.addClass(this.className),i.half&&(i.split=2),"number"==typeof i.split&&i.split>0){var c=(t.fn.width?d.width():0)||i.starWidth,h=i.count%i.split,u=Math.floor(c/i.split);d.width(u).find("a").css({"margin-left":"-"+h*u+"px"})}i.readOnly?d.addClass("star-rating-readonly"):d.addClass("star-rating-live").on("mouseover",function(){t(this).rating("fill"),t(this).rating("focus")}).on("mouseout",function(){t(this).rating("draw"),t(this).rating("blur")}).on("click",function(){t(this).rating("select")}),this.checked&&(i.current=d),"A"==this.nodeName&&t(this).hasClass("selected")&&(i.current=d),r.hide(),r.on("change.rating",function(a){if(a.selfTriggered)return!1;t(this).rating("select")}),d.data("rating.input",r.data("rating.star",d)),i.stars[i.stars.length]=d[0],i.inputs[i.inputs.length]=r[0],i.rater=e[n]=l,i.context=s,r.data("rating",i),l.data("rating",i),d.data("rating",i),s.data("rating",e),s.data("rating"+n,l)}),t(".rating-to-be-drawn").rating("draw").removeClass("rating-to-be-drawn"),this},t.extend(t.fn.rating,{calls:0,focus:function(){var a=this.data("rating");if(!a)return this;if(!a.focus)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);a.focus&&a.focus.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},blur:function(){var a=this.data("rating");if(!a)return this;if(!a.blur)return this;var i=t(this).data("rating.input")||t("INPUT"==this.tagName?this:null);a.blur&&a.blur.apply(i[0],[i.val(),t("a",i.data("rating.star"))[0]])},fill:function(){var t=this.data("rating");if(!t)return this;t.readOnly||(this.rating("drain"),this.prevAll().addBack().filter(".rater-"+t.serial).addClass("star-rating-hover"))},drain:function(){var t=this.data("rating");if(!t)return this;t.readOnly||t.rater.children().filter(".rater-"+t.serial).removeClass("star-rating-on").removeClass("star-rating-hover")},draw:function(){var a=this.data("rating");if(!a)return this;this.rating("drain");var i=t(a.current),r=i.length?i.prevAll().addBack().filter(".rater-"+a.serial):null;r&&r.addClass("star-rating-on"),a.cancel[a.readOnly||a.required?"hide":"show"](),this.siblings()[a.readOnly?"addClass":"removeClass"]("star-rating-readonly")},select:function(a,i){var r=this.data("rating");if(!r)return this;if(!r.readOnly){if(r.current=null,void 0!==a||this.length>1){if("number"==typeof a)return t(r.stars[a]).rating("select",void 0,i);if("string"==typeof a)return t.each(r.stars,function(){t(this).data("rating.input").val()==a&&t(this).rating("select",void 0,i)}),this}else r.current="INPUT"==this[0].tagName?this.data("rating.star"):this.is(".rater-"+r.serial)?this:null;this.data("rating",r),this.rating("draw");var n=t(r.current?r.current.data("rating.input"):null),s=t(r.inputs).filter(":checked");return t(r.inputs).not(n).prop("checked",!1),n.prop("checked",!0),t(n.length?n:s).trigger({type:"change",selfTriggered:!0}),(i||void 0==i)&&r.callback&&r.callback.apply(n[0],[n.val(),t("a",r.current)[0]]),this}},readOnly:function(a,i){var r=this.data("rating");if(!r)return this;r.readOnly=!(!a&&void 0!=a),i?t(r.inputs).attr("disabled","disabled"):t(r.inputs).removeAttr("disabled"),this.data("rating",r),this.rating("draw")},disable:function(){this.rating("readOnly",!0,!0)},enable:function(){this.rating("readOnly",!1,!1)}}),t.fn.rating.options={cancel:"Cancel Rating",cancelValue:"",split:0,starWidth:16},t(function(){t("input[type=radio].star").rating()})}(jQuery); \ No newline at end of file diff --git a/static/scripts/libs/jquery/jquery.wymeditor.js b/static/scripts/libs/jquery/jquery.wymeditor.js index 2eda3b36c00..b8c682cff7c 100644 --- a/static/scripts/libs/jquery/jquery.wymeditor.js +++ b/static/scripts/libs/jquery/jquery.wymeditor.js @@ -1,3 +1 @@ -if(!WYMeditor)var WYMeditor={};!function(){if(window.console&&console.firebug)WYMeditor.console=window.console;else{var t=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];WYMeditor.console={};for(var e=0;e
        "+WYMeditor.TOOLS+"
        "+WYMeditor.CONTAINERS+WYMeditor.CLASSES+"
        "+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"
        "+WYMeditor.LOGO+"
        ",logoHtml:"WYMeditor",iframeHtml:"
        ",editorStyles:[],toolsHtml:"

        {Tools}

          "+WYMeditor.TOOLS_ITEMS+"
        ",toolsItemHtml:"
      • "+WYMeditor.TOOL_TITLE+"
      • ",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:"Superscript",css:"wym_tools_superscript"},{name:"Subscript",title:"Subscript",css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"},{name:"Paste",title:"Paste_From_Word",css:"wym_tools_paste"},{name:"ToggleHtml",title:"HTML",css:"wym_tools_html"},{name:"Preview",title:"Preview",css:"wym_tools_preview"}],containersHtml:"

        {Containers}

          "+WYMeditor.CONTAINERS_ITEMS+"
        ",containersItemHtml:"
      • "+WYMeditor.CONTAINER_TITLE+"
      • ",containersItems:[{name:"P",title:"Paragraph",css:"wym_containers_p"},{name:"H1",title:"Heading_1",css:"wym_containers_h1"},{name:"H2",title:"Heading_2",css:"wym_containers_h2"},{name:"H3",title:"Heading_3",css:"wym_containers_h3"},{name:"H4",title:"Heading_4",css:"wym_containers_h4"},{name:"H5",title:"Heading_5",css:"wym_containers_h5"},{name:"H6",title:"Heading_6",css:"wym_containers_h6"},{name:"PRE",title:"Preformatted",css:"wym_containers_pre"},{name:"BLOCKQUOTE",title:"Blockquote",css:"wym_containers_blockquote"},{name:"TH",title:"Table_Header",css:"wym_containers_th"}],classesHtml:"

        {Classes}

          "+WYMeditor.CLASSES_ITEMS+"
        ",classesItemHtml:"
      • "+WYMeditor.CLASS_TITLE+"
      • ",classesItems:[],statusHtml:"

        {Status}

        ",htmlHtml:"

        {Source_Code}

        ",boxSelector:".wym_box",toolsSelector:".wym_tools",toolsListSelector:" ul",containersSelector:".wym_containers",classesSelector:".wym_classes",htmlSelector:".wym_html",iframeSelector:".wym_iframe iframe",iframeBodySelector:".wym_iframe",statusSelector:".wym_status",toolSelector:".wym_tools a",containerSelector:".wym_containers a",classSelector:".wym_classes a",htmlValSelector:".wym_html_val",hrefSelector:".wym_href",srcSelector:".wym_src",titleSelector:".wym_title",altSelector:".wym_alt",textSelector:".wym_text",rowsSelector:".wym_rows",colsSelector:".wym_cols",captionSelector:".wym_caption",summarySelector:".wym_summary",submitSelector:".wym_submit",cancelSelector:".wym_cancel",previewSelector:"",dialogTypeSelector:".wym_dialog_type",dialogLinkSelector:".wym_dialog_link",dialogImageSelector:".wym_dialog_image",dialogTableSelector:".wym_dialog_table",dialogPasteSelector:".wym_dialog_paste",dialogPreviewSelector:".wym_dialog_preview",updateSelector:".wymupdate",updateEvent:"click",dialogFeatures:"menubar=no,titlebar=no,toolbar=no,resizable=no,width=560,height=300,top=0,left=0",dialogFeaturesPreview:"menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=yes,width=560,height=300,top=0,left=0",dialogHtml:""+WYMeditor.DIALOG_TITLE+"