├── img ├── mapicons │ ├── elevator.sketch │ │ ├── version │ │ ├── Data │ │ ├── QuickLook │ │ │ ├── Preview.png │ │ │ └── Thumbnail.png │ │ └── metadata │ ├── elevator_filled.sketch │ │ ├── version │ │ ├── Data │ │ ├── QuickLook │ │ │ ├── Preview.png │ │ │ └── Thumbnail.png │ │ └── metadata │ ├── elevator_filled_broken.sketch │ │ ├── version │ │ ├── Data │ │ ├── QuickLook │ │ │ ├── Preview.png │ │ │ └── Thumbnail.png │ │ └── metadata │ ├── bakery.png │ ├── coffee.png │ ├── shop.png │ ├── fastfood.png │ ├── restaurant.png │ ├── supermarket.png │ ├── elevator_green.png │ ├── elevator_green_filled.png │ └── elevator_red_filled.png └── ajax-loader.gif ├── ts ├── project.sublime-project ├── index.ts ├── tsconfig.json ├── dts │ └── osmtogeojson.d.ts ├── styleparser.ts ├── js │ ├── application.js.map │ └── application.js └── mapForm.ts ├── README.md ├── LICENSE ├── mapstyle ├── style.json └── wheelchairstyle.json ├── index.html ├── data └── unavailable_plattform.geojson ├── js ├── application.js.map └── application.js └── lib ├── osmtogeojson.js └── jquery-1.11.3.min.js /img/mapicons/elevator.sketch/version: -------------------------------------------------------------------------------- 1 | 18 -------------------------------------------------------------------------------- /img/mapicons/elevator_filled.sketch/version: -------------------------------------------------------------------------------- 1 | 18 -------------------------------------------------------------------------------- /img/mapicons/elevator_filled_broken.sketch/version: -------------------------------------------------------------------------------- 1 | 18 -------------------------------------------------------------------------------- /img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/ajax-loader.gif -------------------------------------------------------------------------------- /ts/project.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /img/mapicons/bakery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/bakery.png -------------------------------------------------------------------------------- /img/mapicons/coffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/coffee.png -------------------------------------------------------------------------------- /img/mapicons/shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/shop.png -------------------------------------------------------------------------------- /img/mapicons/fastfood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/fastfood.png -------------------------------------------------------------------------------- /img/mapicons/restaurant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/restaurant.png -------------------------------------------------------------------------------- /img/mapicons/supermarket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/supermarket.png -------------------------------------------------------------------------------- /img/mapicons/elevator.sketch/Data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator.sketch/Data -------------------------------------------------------------------------------- /img/mapicons/elevator_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_green.png -------------------------------------------------------------------------------- /img/mapicons/elevator_green_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_green_filled.png -------------------------------------------------------------------------------- /img/mapicons/elevator_red_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_red_filled.png -------------------------------------------------------------------------------- /img/mapicons/elevator_filled.sketch/Data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled.sketch/Data -------------------------------------------------------------------------------- /img/mapicons/elevator_filled_broken.sketch/Data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled_broken.sketch/Data -------------------------------------------------------------------------------- /img/mapicons/elevator.sketch/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator.sketch/QuickLook/Preview.png -------------------------------------------------------------------------------- /img/mapicons/elevator.sketch/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator.sketch/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /img/mapicons/elevator_filled.sketch/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled.sketch/QuickLook/Preview.png -------------------------------------------------------------------------------- /img/mapicons/elevator_filled.sketch/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled.sketch/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /img/mapicons/elevator_filled_broken.sketch/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled_broken.sketch/QuickLook/Preview.png -------------------------------------------------------------------------------- /ts/index.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | $(() => { 6 | new t.mapForm(); 7 | }); -------------------------------------------------------------------------------- /img/mapicons/elevator_filled_broken.sketch/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/indoorvator/master/img/mapicons/elevator_filled_broken.sketch/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "noImplicitAny": true, 5 | "removeComments": true, 6 | "preserveConstEnums": true, 7 | "out": "../js/application.js", 8 | "sourceMap": true 9 | }, 10 | "files": [ 11 | "index.ts", 12 | "mapForm.ts", 13 | "styleParser.ts" 14 | ] 15 | } -------------------------------------------------------------------------------- /ts/dts/osmtogeojson.d.ts: -------------------------------------------------------------------------------- 1 | // Typedefinitions for osmtogeojson 2 | // https://github.com/tyrasd/osmtogeojson 3 | // Version 2.2.5 4 | 5 | declare interface IosmtogeojsonOptions { 6 | flatProperties?: any, 7 | uninterestingTags?: any, 8 | polygonFeatures?: any 9 | } 10 | 11 | declare function osmtogeojson(data: any): any; 12 | declare function osmtogeojson(data: any, options: IosmtogeojsonOptions): any; -------------------------------------------------------------------------------- /img/mapicons/elevator.sketch/metadata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | app 6 | com.bohemiancoding.sketch 7 | build 8 | 5370 9 | commit 10 | 38aeabf36c76d40a8ed2d256f8f3b9492c3dac07 11 | fonts 12 | 13 | length 14 | 14264 15 | version 16 | 18 17 | 18 | 19 | -------------------------------------------------------------------------------- /img/mapicons/elevator_filled.sketch/metadata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | app 6 | com.bohemiancoding.sketch 7 | build 8 | 5370 9 | commit 10 | 38aeabf36c76d40a8ed2d256f8f3b9492c3dac07 11 | fonts 12 | 13 | length 14 | 17109 15 | version 16 | 18 17 | 18 | 19 | -------------------------------------------------------------------------------- /img/mapicons/elevator_filled_broken.sketch/metadata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | app 6 | com.bohemiancoding.sketch 7 | build 8 | 5370 9 | commit 10 | 38aeabf36c76d40a8ed2d256f8f3b9492c3dac07 11 | fonts 12 | 13 | length 14 | 19953 15 | version 16 | 18 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # indoorvator ⏬🚻⏫ 2 | 3 | Eine Karte die das Innenleben von Bahnhöfen darstellt, wenn diese Dinge in OpenStreetMap eingetragen sind. 4 | So kann man zwischen den einzelnen Etagen umschalten, wenn das `level`-Tag in OSM verwendet wurde. 5 | Neben den Aufzügen aus OpenStreetMap wernden auch die Aufzüge aus der [DB-Aufzugs-API](https://www.mindboxberlin.com/index.php/contest-en.html) dargestellt. - So kann angezeigt werden, welcher Aufzug wirklich funktioniert. Im Idialfall (gerade nur als Simulation), können bei einem Aufzugsausfall die Bereiche, die damit nicht mehr Barrierefrei sind auf der Karte gekennzeichnet werden. 6 | 7 | [Demo](http://blattspinat.com/maps/indoorvator/) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT-License 2 | 3 | Copyright (c) 2016 ubahnverleih Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /ts/styleparser.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | module t { 4 | export class styleParser { 5 | public static getSimpleStyleForFeature(feature: any, styleJson: any[]): any 6 | { 7 | let properties = feature.properties; 8 | let style: any = {}; 9 | if (properties) 10 | { 11 | styleJson.forEach((selection: any) => { 12 | let key = selection["key"]; 13 | if (properties[key]) 14 | { 15 | $.extend(style, selection["style"]); //merge new style parts in existing style (and overwrite existing properties with new ones) 16 | } 17 | 18 | if (selection["valueStyles"]) 19 | { 20 | selection["valueStyles"].forEach((valueStyle: any) => { 21 | if (properties[key] == valueStyle.value) 22 | { 23 | $.extend(style, valueStyle["style"]); //merge new style parts in existing style (and overwrite existing properties with new ones) 24 | } 25 | }) 26 | } 27 | }) 28 | } 29 | return style; 30 | } 31 | 32 | public static getLabelMarker(feature: any, styleJson: any[], zoom: number): L.Marker 33 | { 34 | if (feature.geometry.type === "Polygon") 35 | { 36 | let featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 37 | 38 | if (featureStyle.showText) { 39 | let coordinates: any[] = []; 40 | //flip coordinates (only get outer ring [0]) 41 | feature.geometry.coordinates[0].forEach((c: number[]) => { 42 | coordinates.push({ lat: c[1], lng: c[0] }) 43 | }); 44 | let polygon = new L.Polygon(coordinates); 45 | let point = polygon.getBounds().getCenter(); 46 | 47 | let icon = this.getIconForProperties(feature, styleJson, zoom); 48 | let marker = new L.Marker(point, { icon: icon }); 49 | 50 | return marker; 51 | } 52 | } 53 | } 54 | 55 | public static getIconForProperties(feature: any, styleJson: any[], zoom: number): L.Icon 56 | { 57 | let featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 58 | let label = ""; 59 | 60 | //icon limit 61 | if ((!featureStyle.iconMinZoom) || (zoom >= featureStyle.iconMinZoom)) 62 | { 63 | //label limit 64 | if ((!featureStyle.labelMinZoom) || (zoom >= featureStyle.labelMinZoom)) 65 | { 66 | label = feature.properties.name ? '
' + feature.properties.name + '
' : ""; 67 | } 68 | 69 | let icon = new L.DivIcon({ 70 | //iconUrl: "http://osm.lyrk.de/address/leaflet/images/marker-iconred.png", 71 | html: (featureStyle.iconUrl ? '' : "") 72 | + label, 73 | className: "label-class " + (featureStyle.markerClassName ? featureStyle.markerClassName : ""), 74 | iconAnchor: [50, 25] 75 | }); 76 | //console.log(icon); 77 | return icon; 78 | } 79 | else { 80 | let icon = new L.DivIcon({ 81 | html: "", 82 | className: "label-empty" 83 | }) 84 | return icon; 85 | } 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /mapstyle/style.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "indoor", 4 | "style": { 5 | "stroke": true, 6 | "color": "#000", 7 | "fill": true, 8 | "fillColor": "#FFF", 9 | "weight": 2, 10 | "opacity": 1, 11 | "fillOpacity": 1 12 | }, 13 | "valueStyles": [{ 14 | "value": "corridor", 15 | "style": { 16 | "stroke": false, 17 | "fillColor": "#FFF", 18 | "fillOpacity": 1 19 | } 20 | }] 21 | }, 22 | { 23 | "key": "room", 24 | "style": { 25 | "stroke": true, 26 | "color": "#000", 27 | "fill": true, 28 | "fillColor": "#FFFAD1", 29 | "fillOpacity": 1, 30 | "weight": 2, 31 | "opacity": 1, 32 | "showText": true, 33 | "markerClassName": "label-room" 34 | }, 35 | "valueStyles": [] 36 | }, 37 | { 38 | "key": "shop", 39 | "style": { 40 | "showText": true, 41 | "className": "roomLabel", 42 | "labelMinZoom": 20, 43 | "iconMinZoom": 19, 44 | "iconUrl": "./img/mapicons/shop.png", 45 | "markerClassName": "label-shop" 46 | }, 47 | "valueStyles": [{ 48 | "value": "bakery", 49 | "style": { 50 | "iconUrl": "./img/mapicons/bakery.png", 51 | "markerClassName": "label-bakery" 52 | } 53 | }, 54 | { 55 | "value": "supermarket", 56 | "style": { 57 | "iconUrl": "./img/mapicons/supermarket.png", 58 | "labelMinZoom": 19, 59 | "iconMinZoom": 18 60 | } 61 | }] 62 | }, 63 | { 64 | "key": "amenity", 65 | "style": { 66 | "showText": true, 67 | "className": "roomLabel", 68 | "labelMinZoom": 20, 69 | "iconMinZoom": 19 70 | }, 71 | "valueStyles": [{ 72 | "value": "cafe", 73 | "style": { 74 | "iconUrl": "./img/mapicons/coffee.png", 75 | "markerClassName": "label-bakery", 76 | "labelMinZoom": 19, 77 | "iconMinZoom": 18 78 | } 79 | }, 80 | { 81 | "value": "restaurant", 82 | "style": { 83 | "iconUrl": "./img/mapicons/restaurant.png", 84 | "markerClassName": "label-bakery", 85 | "labelMinZoom": 19, 86 | "iconMinZoom": 18 87 | } 88 | }, 89 | { 90 | "value": "fast_food", 91 | "style": { 92 | "iconUrl": "./img/mapicons/fastfood.png", 93 | "markerClassName": "label-bakery", 94 | "iconMinZoom": 18 95 | } 96 | }] 97 | }, 98 | { 99 | "key": "railway", 100 | "style": { 101 | 102 | }, 103 | "valueStyles": [{ 104 | "value": "platform", 105 | "style": { 106 | "stroke": true, 107 | "color": "#575757", 108 | "fill": true, 109 | "fillColor": "#B3B3B3", 110 | "weight": 2, 111 | "opacity": 1, 112 | "fillOpacity": 1 113 | } 114 | }] 115 | }, 116 | { 117 | "key": "public_transport", 118 | "style": { 119 | 120 | }, 121 | "valueStyles": [{ 122 | "value": "platform", 123 | "style": { 124 | "stroke": true, 125 | "color": "#575757", 126 | "fill": true, 127 | "fillColor": "#B3B3B3", 128 | "weight": 2, 129 | "opacity": 1, 130 | "fillOpacity": 1 131 | } 132 | }] 133 | }, 134 | { 135 | "key": "highway", 136 | "style": { 137 | 138 | }, 139 | "valueStyles": [{ 140 | "value": "footway", 141 | "style": { 142 | "stroke": true, 143 | "color": "#B3B3B3", 144 | "fill": false, 145 | "weight": 6, 146 | "opacity": 1, 147 | "dashArray": [12,3], 148 | "lineCap": "sqare" 149 | } 150 | }, 151 | { 152 | "value": "steps", 153 | "style": { 154 | "stroke": true, 155 | "color": "#575757", 156 | "fill": false, 157 | "weight": 8, 158 | "opacity": 1, 159 | "dashArray": [3,3], 160 | "lineCap": "sqare" 161 | } 162 | }, 163 | { 164 | "value": "elevator", 165 | "style": { 166 | "stroke": true, 167 | "color": "#B3B3B3", 168 | "fillColor": "#B3B3B3", 169 | "fill": true, 170 | "weight": 0, 171 | "opacity": 1, 172 | "fillOpacity": 1, 173 | "lineCap": "sqare", 174 | "showText": true, 175 | "iconUrl": "./img/mapicons/elevator_green_filled.png", 176 | "markerClassName": "label-elevator" 177 | } 178 | }] 179 | } 180 | ] -------------------------------------------------------------------------------- /mapstyle/wheelchairstyle.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "indoor", 4 | "style": { 5 | "stroke": true, 6 | "color": "#000", 7 | "fill": true, 8 | "fillColor": "#FFF", 9 | "weight": 2, 10 | "opacity": 1, 11 | "fillOpacity": 1 12 | }, 13 | "valueStyles": [{ 14 | "value": "corridor", 15 | "style": { 16 | "stroke": false, 17 | "fillColor": "#FFF", 18 | "fillOpacity": 1 19 | } 20 | }] 21 | }, 22 | { 23 | "key": "room", 24 | "style": { 25 | "stroke": true, 26 | "color": "#000", 27 | "fill": true, 28 | "fillColor": "#FFFAD1", 29 | "fillOpacity": 1, 30 | "weight": 2, 31 | "opacity": 1, 32 | "showText": true, 33 | "markerClassName": "label-room" 34 | }, 35 | "valueStyles": [] 36 | }, 37 | { 38 | "key": "shop", 39 | "style": { 40 | "showText": true, 41 | "className": "roomLabel", 42 | "labelMinZoom": 20, 43 | "iconMinZoom": 19, 44 | "iconUrl": "./img/mapicons/shop.png", 45 | "markerClassName": "label-shop" 46 | }, 47 | "valueStyles": [{ 48 | "value": "bakery", 49 | "style": { 50 | "iconUrl": "./img/mapicons/bakery.png", 51 | "markerClassName": "label-bakery" 52 | } 53 | }, 54 | { 55 | "value": "supermarket", 56 | "style": { 57 | "iconUrl": "./img/mapicons/supermarket.png", 58 | "labelMinZoom": 19, 59 | "iconMinZoom": 18 60 | } 61 | }] 62 | }, 63 | { 64 | "key": "amenity", 65 | "style": { 66 | "showText": true, 67 | "className": "roomLabel", 68 | "labelMinZoom": 20, 69 | "iconMinZoom": 19 70 | }, 71 | "valueStyles": [{ 72 | "value": "cafe", 73 | "style": { 74 | "iconUrl": "./img/mapicons/coffee.png", 75 | "markerClassName": "label-bakery", 76 | "labelMinZoom": 19, 77 | "iconMinZoom": 18 78 | } 79 | }, 80 | { 81 | "value": "restaurant", 82 | "style": { 83 | "iconUrl": "./img/mapicons/restaurant.png", 84 | "markerClassName": "label-bakery", 85 | "labelMinZoom": 19, 86 | "iconMinZoom": 18 87 | } 88 | }, 89 | { 90 | "value": "fast_food", 91 | "style": { 92 | "iconUrl": "./img/mapicons/fastfood.png", 93 | "markerClassName": "label-bakery", 94 | "iconMinZoom": 18 95 | } 96 | }] 97 | }, 98 | { 99 | "key": "railway", 100 | "style": { 101 | 102 | }, 103 | "valueStyles": [{ 104 | "value": "platform", 105 | "style": { 106 | "stroke": true, 107 | "color": "#575757", 108 | "fill": true, 109 | "fillColor": "#B3B3B3", 110 | "weight": 2, 111 | "opacity": 1, 112 | "fillOpacity": 1 113 | } 114 | }] 115 | }, 116 | { 117 | "key": "public_transport", 118 | "style": { 119 | 120 | }, 121 | "valueStyles": [{ 122 | "value": "platform", 123 | "style": { 124 | "stroke": true, 125 | "color": "#575757", 126 | "fill": true, 127 | "fillColor": "#B3B3B3", 128 | "weight": 2, 129 | "opacity": 1, 130 | "fillOpacity": 1 131 | } 132 | }] 133 | }, 134 | { 135 | "key": "highway", 136 | "style": { 137 | 138 | }, 139 | "valueStyles": [{ 140 | "value": "footway", 141 | "style": { 142 | "stroke": true, 143 | "color": "#B3B3B3", 144 | "fill": false, 145 | "weight": 6, 146 | "opacity": 1, 147 | "dashArray": [12,3], 148 | "lineCap": "sqare" 149 | } 150 | }, 151 | { 152 | "value": "steps", 153 | "style": { 154 | "stroke": true, 155 | "color": "#B10016", 156 | "fill": false, 157 | "weight": 8, 158 | "opacity": 1, 159 | "dashArray": [3,3], 160 | "lineCap": "sqare" 161 | } 162 | }, 163 | { 164 | "value": "elevator", 165 | "style": { 166 | "stroke": true, 167 | "color": "#B3B3B3", 168 | "fillColor": "#B3B3B3", 169 | "fill": true, 170 | "weight": 0, 171 | "opacity": 1, 172 | "fillOpacity": 1, 173 | "lineCap": "sqare", 174 | "showText": true, 175 | "iconUrl": "./img/mapicons/elevator_green_filled.png", 176 | "markerClassName": "label-elevator" 177 | } 178 | }] 179 | }, 180 | { 181 | "key": "wheelchair", 182 | "style": { 183 | 184 | }, 185 | "valueStyles": [{ 186 | "value": "yes", 187 | "style": { 188 | "stroke": true, 189 | "color": "#417605", 190 | "fillColor": "#417605", 191 | "fillOpacity": "0.5" 192 | } 193 | }, 194 | { 195 | "value": "no", 196 | "style": { 197 | "stroke": true, 198 | "color": "#B10016", 199 | "fillColor": "#B10016", 200 | "fillOpacity": "0.5" 201 | } 202 | }, 203 | { 204 | "value": "limited", 205 | "style": { 206 | "stroke": true, 207 | "color": "#FF9D00", 208 | "fillColor": "#FF9D00", 209 | "fillOpacity": "0.5" 210 | } 211 | }] 212 | } 213 | ] -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 184 | 185 | 186 |
187 |
188 |
189 |
Kaputten Aufzug Simulieren
190 |
191 |
192 |
Wheelchair
193 |
194 |
195 |
196 |
197 | 198 | -------------------------------------------------------------------------------- /ts/js/application.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"application.js","sourceRoot":"","sources":["../mapForm.ts","../index.ts","../styleParser.ts"],"names":["t","t.mapForm","t.mapForm.constructor","t.mapForm.initMap","t.mapForm.load","t.mapForm.loadStyle","t.mapForm._layerFilter","t.mapForm._styleGeoJson","t.mapForm.parseLevel","t.mapForm.createsStyledMarker","t.mapForm.initLevelButtons","t.mapForm.switchLevel","t.styleParser","t.styleParser.constructor","t.styleParser.getSimpleStyleForFeature","t.styleParser.getLabelMarker","t.styleParser.getIconForProperties"],"mappings":"AAGA,IAAO,CAAC,CAoJP;AApJD,WAAO,CAAC,EAAC,CAAC;IACTA;QAECC;YAECC,IAAIA,CAACA,OAAOA,EAAEA,CAACA;QAChBA,CAACA;QAEDD,yBAAOA,GAAPA;YAAAE,iBA2BCA;YAzBAA,IAAIA,CAACA,MAAMA,GAAGA,CAACA,CAACA;YAChBA,IAAIA,CAACA,KAAKA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,CAACA,KAAKA,EAAEA,EAAEA,CAACA,CAACA;YAClCA,IAAIA,CAACA,KAAKA,CAACA,OAAOA,CAACA,CAACA,QAAQA,EAAEA,QAAQA,CAACA,EAAEA,EAAEA,CAACA,CAACA;YAM7C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MAAMA,CAACA,KAAKA,EAAEA,EAAEA,IAAIA,EAAEA,IAAIA,EAAEA,CAACA,CAACA;oBAEjDA,MAAMA,CAACA,MAAMA,CAACA;gBACfA,CAACA;YACFA,CAACA;QACFA,CAACA;QAEaH,gCAAoBA,GAAlCA,UAAmCA,OAAYA,EAAEA,SAAgBA,EAAEA,IAAYA;YAE9EI,IAAIA,YAAYA,GAAGA,IAAIA,CAACA,wBAAwBA,CAACA,OAAOA,EAAEA,SAASA,CAACA,CAACA;YACrEA,IAAIA,KAAKA,GAAGA,EAAEA,CAACA;YAEfA,EAAEA,CAACA,CAACA,CAACA,YAAYA,CAACA,YAAYA,IAAIA,CAACA,IAAIA,IAAIA,YAAYA,CAACA,YAAYA,CAACA,YAAYA,CAACA,CAACA,CACnFA,CAACA;gBACAA,KAAKA,GAAGA,OAAOA,CAACA,UAAUA,CAACA,IAAIA,GAAGA,0BAA0BA,GAAGA,OAAOA,CAACA,UAAUA,CAACA,IAAIA,GAAGA,QAAQA,GAAGA,EAAEA,CAACA;YACxGA,CAACA;YAEDA,IAAIA,IAAIA,GAAGA,IAAIA,CAACA,CAACA,OAAOA,CAACA;gBAExBA,IAAIA,EAAEA,CAACA,YAAYA,CAACA,OAAOA,GAAGA,+BAA+BA,GAAGA,YAAYA,CAACA,OAAOA,GAAGA,MAAMA,GAAGA,EAAEA,CAACA;sBACjGA,KAAKA;gBACPA,SAASA,EAAEA,cAAcA,GAAGA,CAACA,YAAYA,CAACA,eAAeA,GAAGA,YAAYA,CAACA,eAAeA,GAAGA,EAAEA,CAACA;gBAC9FA,UAAUA,EAAOA,CAACA,EAAEA,EAAEA,EAAEA,CAACA;aACzBA,CAACA,CAACA;YACHA,MAAMA,CAACA,IAAIA,CAACA;QACbA,CAACA;QACFJ,kBAACA;IAADA,CAACA,AAtEDZ,IAsECA;IAtEYA,aAAWA,cAsEvBA,CAAAA;AACFA,CAACA,EAxEM,CAAC,KAAD,CAAC,QAwEP"} -------------------------------------------------------------------------------- /data/unavailable_plattform.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "generator": "overpass-turbo", 4 | "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.", 5 | "timestamp": "2016-01-10T14:53:02Z", 6 | "features": [ 7 | { 8 | "type": "Feature", 9 | "id": "relation/3578388", 10 | "properties": { 11 | "@id": "relation/3578388", 12 | "area": "yes", 13 | "bench": "yes", 14 | "bin": "yes", 15 | "layer": "1", 16 | "level": "1", 17 | "lit": "yes", 18 | "public_transport": "platform", 19 | "railway": "platform", 20 | "ref": "18;19", 21 | "shelter": "yes", 22 | "surface": "concrete", 23 | "tactile_paving": "yes", 24 | "type": "multipolygon", 25 | "wheelchair": "yes" 26 | }, 27 | "geometry": { 28 | "type": "Polygon", 29 | "coordinates": [ 30 | [ 31 | [ 32 | 13.7303412, 33 | 51.0413842 34 | ], 35 | [ 36 | 13.7302839, 37 | 51.0413152 38 | ], 39 | [ 40 | 13.7333305, 41 | 51.0403197 42 | ], 43 | [ 44 | 13.7346247, 45 | 51.0398885 46 | ], 47 | [ 48 | 13.7350333, 49 | 51.0397558 50 | ], 51 | [ 52 | 13.7350836, 53 | 51.0398155 54 | ], 55 | [ 56 | 13.7346776, 57 | 51.0399562 58 | ], 59 | [ 60 | 13.7344607, 61 | 51.0400307 62 | ], 63 | [ 64 | 13.7333887, 65 | 51.0403895 66 | ], 67 | [ 68 | 13.731113, 69 | 51.0411266 70 | ], 71 | [ 72 | 13.7303412, 73 | 51.0413842 74 | ] 75 | ], 76 | [ 77 | [ 78 | 13.7324314, 79 | 51.0406839 80 | ], 81 | [ 82 | 13.7324173, 83 | 51.0406668 84 | ], 85 | [ 86 | 13.7324032, 87 | 51.0406496 88 | ], 89 | [ 90 | 13.7323077, 91 | 51.0406806 92 | ], 93 | [ 94 | 13.7323218, 95 | 51.0406977 96 | ], 97 | [ 98 | 13.7323359, 99 | 51.040715 100 | ], 101 | [ 102 | 13.7324314, 103 | 51.0406839 104 | ] 105 | ], 106 | [ 107 | [ 108 | 13.7332691, 109 | 51.0404076 110 | ], 111 | [ 112 | 13.7332541, 113 | 51.0403895 114 | ], 115 | [ 116 | 13.7332403, 117 | 51.0403728 118 | ], 119 | [ 120 | 13.7331412, 121 | 51.0404053 122 | ], 123 | [ 124 | 13.7331553, 125 | 51.0404223 126 | ], 127 | [ 128 | 13.7331699, 129 | 51.04044 130 | ], 131 | [ 132 | 13.7332691, 133 | 51.0404076 134 | ] 135 | ], 136 | [ 137 | [ 138 | 13.731006, 139 | 51.0411423 140 | ], 141 | [ 142 | 13.7312241, 143 | 51.0410713 144 | ], 145 | [ 146 | 13.7312104, 147 | 51.0410547 148 | ], 149 | [ 150 | 13.731196, 151 | 51.0410371 152 | ], 153 | [ 154 | 13.7309779, 155 | 51.0411081 156 | ], 157 | [ 158 | 13.7309925, 159 | 51.0411259 160 | ], 161 | [ 162 | 13.731006, 163 | 51.0411423 164 | ] 165 | ], 166 | [ 167 | [ 168 | 13.7320907, 169 | 51.0407732 170 | ], 171 | [ 172 | 13.7321054, 173 | 51.0407907 174 | ], 175 | [ 176 | 13.7322834, 177 | 51.0407318 178 | ], 179 | [ 180 | 13.7322691, 181 | 51.0407147 182 | ], 183 | [ 184 | 13.7322543, 185 | 51.0406971 186 | ], 187 | [ 188 | 13.7320763, 189 | 51.040756 190 | ], 191 | [ 192 | 13.7320907, 193 | 51.0407732 194 | ] 195 | ], 196 | [ 197 | [ 198 | 13.7326502, 199 | 51.0405904 200 | ], 201 | [ 202 | 13.7326362, 203 | 51.0405733 204 | ], 205 | [ 206 | 13.7324492, 207 | 51.0406339 208 | ], 209 | [ 210 | 13.7324636, 211 | 51.0406515 212 | ], 213 | [ 214 | 13.7324778, 215 | 51.0406688 216 | ], 217 | [ 218 | 13.7326648, 219 | 51.0406081 220 | ], 221 | [ 222 | 13.7326502, 223 | 51.0405904 224 | ] 225 | ], 226 | [ 227 | [ 228 | 13.733128, 229 | 51.0404535 230 | ], 231 | [ 232 | 13.7331138, 233 | 51.0404363 234 | ], 235 | [ 236 | 13.7330993, 237 | 51.0404188 238 | ], 239 | [ 240 | 13.7329233, 241 | 51.0404763 242 | ], 243 | [ 244 | 13.7329377, 245 | 51.0404937 246 | ], 247 | [ 248 | 13.732952, 249 | 51.040511 250 | ], 251 | [ 252 | 13.733128, 253 | 51.0404535 254 | ] 255 | ], 256 | [ 257 | [ 258 | 13.7344492, 259 | 51.0399659 260 | ], 261 | [ 262 | 13.7344611, 263 | 51.0399805 264 | ], 265 | [ 266 | 13.734474, 267 | 51.039996 268 | ], 269 | [ 270 | 13.7346439, 271 | 51.0399407 272 | ], 273 | [ 274 | 13.7346317, 275 | 51.0399259 276 | ], 277 | [ 278 | 13.734619, 279 | 51.0399106 280 | ], 281 | [ 282 | 13.7344492, 283 | 51.0399659 284 | ] 285 | ] 286 | ] 287 | } 288 | } 289 | ] 290 | } -------------------------------------------------------------------------------- /ts/js/application.js: -------------------------------------------------------------------------------- 1 | var t; 2 | (function (t) { 3 | var mapForm = (function () { 4 | function mapForm() { 5 | this.initMap(); 6 | } 7 | mapForm.prototype.initMap = function () { 8 | var _this = this; 9 | this._level = 0; 10 | this.__map = new L.Map('map', {}); 11 | this.__map.setView([51.04022, 13.73245], 18); 12 | L.tileLayer('https://api.tiles.mapbox.com/v4/mapbox.streets-basic/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoidWJhaG52ZXJsZWloIiwiYSI6IjZyVGcyZzAifQ.EP3L8P8zlHIRF7-pB7zfDA', { 13 | attribution: 'Map data © OpenStreetMap contributors', 14 | maxZoom: 22 15 | }).addTo(this.__map); 16 | this.loadStyle().then(function () { return _this.load(); }); 17 | this.__map.on('zoomend', function () { 18 | _this.load().then(function () { 19 | _this.__map.eachLayer(function (layer) { 20 | if (!(layer instanceof L.TileLayer)) { 21 | _this.__map.removeLayer(layer); 22 | } 23 | }); 24 | }); 25 | }); 26 | }; 27 | mapForm.prototype.load = function () { 28 | var _this = this; 29 | var xhr = $.getJSON('./data/dresden_hbf.json', function (json) { 30 | var geojson = osmtogeojson(json, { 31 | flatProperties: true, 32 | polygonFeatures: function () { return true; } 33 | }); 34 | L.geoJson(geojson, { 35 | filter: function (feature) { return _this._layerFilter(feature); }, 36 | style: function (feature) { return _this._styleGeoJson(feature); }, 37 | pointToLayer: function (feature, latlng) { 38 | return _this.createsStyledMarker(feature, latlng); 39 | } 40 | }).addTo(_this.__map); 41 | }); 42 | return xhr; 43 | }; 44 | mapForm.prototype.loadStyle = function () { 45 | var _this = this; 46 | return $.getJSON('./mapstyle/style.json', function (json) { 47 | _this._style = json; 48 | }); 49 | }; 50 | mapForm.prototype._layerFilter = function (feature) { 51 | var properties = feature.properties; 52 | if (properties.level) { 53 | var level = properties.level; 54 | var parsedLevels = this.parseLevel(level); 55 | if ($.inArray(this._level, parsedLevels) !== -1) { 56 | return true; 57 | } 58 | else { 59 | return false; 60 | } 61 | } 62 | return false; 63 | }; 64 | mapForm.prototype._styleGeoJson = function (feature) { 65 | var s = t.styleParser.getSimpleStyleForFeature(feature, this._style); 66 | var marker = t.styleParser.getLabelMarker(feature, this._style, this.__map.getZoom()); 67 | if (marker) { 68 | marker.addTo(this.__map); 69 | } 70 | return s; 71 | }; 72 | mapForm.prototype.parseLevel = function (levelString) { 73 | if (levelString) { 74 | var levels = levelString.split(";"); 75 | levels.forEach(function (level, index) { 76 | levels[index] = parseInt(level, 10); 77 | }); 78 | return levels; 79 | } 80 | }; 81 | mapForm.prototype.createsStyledMarker = function (feature, latlng) { 82 | var icon = t.styleParser.getIconForProperties(feature, this._style, this.__map.getZoom()); 83 | if (icon) { 84 | return new L.Marker(latlng, { icon: icon }); 85 | } 86 | return new L.Marker(latlng); 87 | }; 88 | mapForm.prototype.initLevelButtons = function () { 89 | var levelContainer = $('#level'); 90 | }; 91 | mapForm.prototype.switchLevel = function (level) { 92 | this._level = level; 93 | this.load(); 94 | }; 95 | return mapForm; 96 | })(); 97 | t.mapForm = mapForm; 98 | })(t || (t = {})); 99 | $(function () { 100 | new t.mapForm(); 101 | }); 102 | var t; 103 | (function (t) { 104 | var styleParser = (function () { 105 | function styleParser() { 106 | } 107 | styleParser.getSimpleStyleForFeature = function (feature, styleJson) { 108 | var properties = feature.properties; 109 | var style = {}; 110 | if (properties) { 111 | styleJson.forEach(function (selection) { 112 | var key = selection["key"]; 113 | if (properties[key]) { 114 | $.extend(style, selection["style"]); 115 | } 116 | if (selection["valueStyles"]) { 117 | selection["valueStyles"].forEach(function (valueStyle) { 118 | if (properties[key] == valueStyle.value) { 119 | $.extend(style, valueStyle["style"]); 120 | } 121 | }); 122 | } 123 | }); 124 | } 125 | return style; 126 | }; 127 | styleParser.getLabelMarker = function (feature, styleJson, zoom) { 128 | if (feature.geometry.type === "Polygon") { 129 | var featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 130 | if (featureStyle.showText) { 131 | var coordinates = []; 132 | feature.geometry.coordinates[0].forEach(function (c) { 133 | coordinates.push({ lat: c[1], lng: c[0] }); 134 | }); 135 | var polygon = new L.Polygon(coordinates); 136 | var point = polygon.getBounds().getCenter(); 137 | var icon = this.getIconForProperties(feature, styleJson, zoom); 138 | var marker = new L.Marker(point, { icon: icon }); 139 | return marker; 140 | } 141 | } 142 | }; 143 | styleParser.getIconForProperties = function (feature, styleJson, zoom) { 144 | var featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 145 | var label = ""; 146 | if (!featureStyle.labelMinZoom || (zoom >= featureStyle.labelMinZoom.labelMinZoom)) { 147 | label = feature.properties.name ? '
' + feature.properties.name + '
' : ""; 148 | } 149 | var icon = new L.DivIcon({ 150 | html: (featureStyle.iconUrl ? '' : "") 151 | + label, 152 | className: "label-class " + (featureStyle.markerClassName ? featureStyle.markerClassName : ""), 153 | iconAnchor: [50, 50] 154 | }); 155 | return icon; 156 | }; 157 | return styleParser; 158 | })(); 159 | t.styleParser = styleParser; 160 | })(t || (t = {})); 161 | //# sourceMappingURL=application.js.map -------------------------------------------------------------------------------- /ts/mapForm.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | module t { 5 | export class mapForm { 6 | 7 | constructor() 8 | { 9 | this.initMap(); 10 | 11 | $('#simulatebutton').on('click', () => this.simulateBrokenLift()); 12 | $("#wheelchairtoggle").on('click', () => this.toggleWheelChair()); 13 | 14 | } 15 | 16 | initMap(): void 17 | { 18 | this._level = 0; 19 | this.__map = new L.Map('map', {}); 20 | this.__map.setView([51.04022, 13.73245], 19); 21 | this._isWheelchairstyleActive = false; 22 | /*L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { 23 | attribution: 'Map data © OpenStreetMap contributors', 24 | maxZoom: 22 25 | }).addTo(this.__map);*/ 26 | 27 | L.tileLayer('https://api.tiles.mapbox.com/v4/mapbox.streets-basic/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoidWJhaG52ZXJsZWloIiwiYSI6IjZyVGcyZzAifQ.EP3L8P8zlHIRF7-pB7zfDA', { 28 | attribution: 'Map data © OpenStreetMap contributors', 29 | maxZoom: 22 30 | }).addTo(this.__map); 31 | 32 | this._lastZoomLevel = this.__map.getZoom(); 33 | 34 | this.loadStyle() 35 | .then(() => this.loadWheelchairStyle()) 36 | .then(() => this.load()) 37 | .then(() => this.loadDbElevators()); //First load Style, then load the mapdata 38 | 39 | //reload/rerender on zoom 40 | this.__map.on('zoomend', () => { 41 | if (this._lastZoomLevel && ((this._lastZoomLevel >= 17) && (this.__map.getZoom() > this._lastZoomLevel))) { 42 | this.load(true); 43 | } 44 | else { 45 | this.load(); 46 | } 47 | this._lastZoomLevel = this.__map.getZoom() 48 | }); 49 | 50 | this.__map.on('moveend', (e: any) => { 51 | 52 | console.log(e.hard); 53 | if (e.hard === false) 54 | { 55 | //console.log("move with zoom"); 56 | } 57 | else 58 | { 59 | console.log('load'); 60 | this.load(); 61 | } 62 | }); 63 | //TODO reload/rerender on move - but only if movedistance is >= trashhold 64 | 65 | } 66 | 67 | load(resueData?: boolean): JQueryXHR 68 | { 69 | //TODO check zoomlevel 70 | resueData = resueData ? resueData : false; 71 | 72 | if ((resueData && this._jsonData) || (this.__map.getZoom() < 17)) 73 | { 74 | this.render(this._jsonData); 75 | let deferred = $.Deferred(); 76 | deferred.resolve(this._jsonData); 77 | return deferred.promise(); 78 | } 79 | else 80 | { 81 | this._levelList = []; 82 | //this.loadFromOverpass() //TODO 83 | //let xhr = $.getJSON('./data/dresden_hbf.json', (json) => { 84 | 85 | let xhr = this.loadFromOverpass(); 86 | xhr.done((json) => { 87 | this._jsonData = json; 88 | this.render(json); 89 | }); 90 | return xhr; 91 | } 92 | } 93 | 94 | render(json: any) 95 | { 96 | let geojson = osmtogeojson(json, { 97 | flatProperties: true, 98 | polygonFeatures: () => true //all closed lines are polygons 99 | }); 100 | 101 | this.__map.eachLayer((layer: any) => { 102 | if (!(layer instanceof L.TileLayer)) { 103 | this.__map.removeLayer(layer); 104 | } 105 | }); 106 | 107 | L.geoJson(geojson, { 108 | //smoothFactor: 0, //don't Simplify Lines 109 | filter: (feature) => this._layerFilter(feature), //`() =>` to keep scope 110 | style: (feature) => this._styleGeoJson(feature), //`() =>` to keep scope 111 | pointToLayer: (feature: any, latlng: L.LatLng) => { 112 | return this.createsStyledMarker(feature, latlng); 113 | } 114 | }).addTo(this.__map); 115 | this.initLevelButtons(); 116 | this.showElevators(); 117 | } 118 | 119 | loadStyle(): JQueryXHR 120 | { 121 | return $.getJSON('./mapstyle/style.json', (json) => { 122 | this._style = json; 123 | }); 124 | } 125 | 126 | loadWheelchairStyle(): JQueryXHR { 127 | return $.getJSON('./mapstyle/wheelchairstyle.json', (json) => { 128 | this._wheelchairStyle = json; 129 | }); 130 | } 131 | /** 132 | * Filtert alle Features raus, die nicht zum aktuellen Level gehören. 133 | */ 134 | _layerFilter(feature: any): boolean 135 | { 136 | let properties = feature.properties; 137 | if (properties.level) 138 | { 139 | let level = properties.level; 140 | let parsedLevels = this.parseLevel(level) 141 | 142 | //add parsedLevels to Levellist 143 | this.addToLevelList(parsedLevels); 144 | 145 | if ($.inArray(this._level, parsedLevels) !== -1) 146 | { 147 | return true; 148 | } 149 | else 150 | { 151 | return false; 152 | } 153 | } 154 | return false; 155 | } 156 | 157 | _styleGeoJson(feature: any): any 158 | { 159 | let style = this._isWheelchairstyleActive ? this._wheelchairStyle : this._style; 160 | let s = styleParser.getSimpleStyleForFeature(feature, style); 161 | 162 | let marker = styleParser.getLabelMarker(feature, style, this.__map.getZoom()); 163 | if (marker) { 164 | marker.addTo(this.__map); 165 | } 166 | /*if (s) 167 | console.log(s);*/ 168 | return s; 169 | } 170 | /** 171 | * parsing Levels 172 | */ 173 | parseLevel(levelString: string): any[] 174 | { 175 | //TODO: parse things like "0-10", "-5--2", "0;2-4" 176 | if (levelString) 177 | { 178 | let levels = levelString.split(";"); 179 | levels.forEach((level, index) => { 180 | levels[index] = parseInt(level, 10); 181 | }); 182 | return levels; 183 | } 184 | } 185 | 186 | createsStyledMarker(feature: any, latlng: L.LatLng): any 187 | { 188 | let icon = styleParser.getIconForProperties(feature, this._style, this.__map.getZoom()); 189 | if (icon) 190 | { 191 | return new L.Marker(latlng, { icon: icon }); 192 | } 193 | return new L.Marker(latlng); 194 | } 195 | 196 | initLevelButtons(): void 197 | { 198 | console.log("init this"); 199 | let levelContainer = $('#level'); 200 | levelContainer.html(""); 201 | this._levelList.forEach((level) => { 202 | let additionalClass = ""; 203 | if (this._level === level) 204 | { 205 | additionalClass = " levelbutton-active"; 206 | } 207 | let button = $('
'+level+'
'); 208 | 209 | levelContainer.append(button); 210 | button.on('click', () => this.switchLevel(level)); 211 | }); 212 | } 213 | 214 | switchLevel(level: number): JQueryXHR 215 | { 216 | this._level = level; 217 | return this.load(true); 218 | } 219 | 220 | addToLevelList(levels: number[]) 221 | { 222 | levels.forEach((level) => { 223 | if (!isNaN(level)) 224 | { 225 | if ($.inArray(level, this._levelList) == -1) { 226 | this._levelList.push(level); 227 | } 228 | } 229 | }); 230 | this._levelList.sort((a, b) => { return a - b }); 231 | this._levelList = this._levelList.reverse(); 232 | } 233 | 234 | /** 235 | * Simulates a broken lift to a blattform in Dresden Hbf 236 | */ 237 | simulateBrokenLift():void 238 | { 239 | this.switchLevel(1).then(() => { 240 | this.__map.setView([51.04034, 13.73327], 19); 241 | 242 | //timeOut besause else new layer will be cleared 243 | setTimeout(() => { 244 | $.getJSON("./data/unavailable_plattform.geojson", (geojson) => { 245 | let layer = L.geoJson(geojson, { 246 | style: () => { 247 | return { 248 | "fill": true, 249 | "fillColor": "#FF0000", 250 | "fillOpacity": 0.6, 251 | "stroke": false 252 | } 253 | } 254 | }); 255 | 256 | layer.addTo(this.__map); 257 | }); 258 | 259 | let marker = new L.Marker([51.0403711, 13.733309], { 260 | icon: new L.Icon({ 261 | iconUrl: "./img/mapicons/elevator_red_filled.png", 262 | iconAnchor: new L.Point(12, 14) 263 | }) 264 | }) 265 | marker.addTo(this.__map); 266 | 267 | }, 1500); 268 | }); 269 | } 270 | 271 | loadDbElevators() 272 | { 273 | this._elevatorMarkers = []; 274 | $.getJSON("http://adam.noncd.db.de/api/v1.0/facilities", (json) => { 275 | if (json) 276 | { 277 | json.forEach((elevator: any) => { 278 | let icon = new L.Icon({ 279 | iconUrl: "./img/mapicons/" + ((elevator.state == "INACTIVE") ? "elevator_red_filled.png" : "elevator_green_filled.png"), 280 | iconAnchor: new L.Point(12, 14) 281 | }) 282 | if (elevator.geocoordY && elevator.geocoordX) 283 | { 284 | var marker = new L.Marker([elevator.geocoordY, elevator.geocoordX], { 285 | icon: icon 286 | }); 287 | this._elevatorMarkers.push(marker); 288 | } 289 | }); 290 | } 291 | }); 292 | this.showElevators(); 293 | } 294 | 295 | showElevators(): void 296 | { 297 | if (this._elevatorMarkers) 298 | { 299 | this._elevatorMarkers.forEach((marker) => { 300 | marker.addTo(this.__map); 301 | }); 302 | } 303 | } 304 | 305 | loadFromOverpass(): JQueryXHR 306 | { 307 | this.loadindicator(1); 308 | let bounds = this.__map.getBounds() 309 | let bboxxtring = (bounds.getSouth()-0.0005) + "," 310 | + (bounds.getWest()-0.0005) + "," 311 | + (bounds.getNorth()+0.0005) + "," 312 | + (bounds.getEast()+0.0005); 313 | let overpassQuery = ` 314 | [out:json][timeout:25]; 315 | ( 316 | // query part for: “indoor=*” 317 | node["indoor"]({{bbox}}); 318 | way["indoor"]({{bbox}}); 319 | relation["indoor"]({{bbox}}); 320 | way["railway" = "platform"]({{bbox}}); 321 | way["public_transport" = "platform"]({{bbox}}); 322 | relation["public_transport" = "platform"]({{bbox}}); 323 | way["highway" = "platform"]({{bbox}}); 324 | relation["railway" = "platform"]({{bbox}}); 325 | node["room"]({{bbox}}); 326 | way["room"]({{bbox}}); 327 | relation["room"]({{bbox}}); 328 | node["highway" = "elevator"]({{bbox}}); 329 | node["level"]({{bbox}}); 330 | way["highway"~"footway|elevator|steps|path"]({{bbox}}); 331 | ); 332 | // print results 333 | out body; 334 | >; 335 | out skel qt;`; 336 | overpassQuery = overpassQuery.replace(/{{bbox}}/g, bboxxtring); 337 | 338 | //let url = "http://overpass.osm.rambler.ru/cgi/interpreter?data=%2F*%0AThis%20has%20been%20generated%20by%20the%20overpass-turbo%20wizard.%0AThe%20original%20search%20was%3A%0A%E2%80%9Cindoor%3D*%E2%80%9D%0A*%2F%0A%5Bout%3Ajson%5D%5Btimeout%3A25%5D%3B%0A%2F%2F%20gather%20results%0A%28%0A%20%20%2F%2F%20query%20part%20for%3A%20%E2%80%9Cindoor%3D*%E2%80%9D%0A%20%20node%5B%22indoor%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20way%5B%22indoor%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20relation%5B%22indoor%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20way%5B%22railway%22%3D%22platform%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20way%5B%22highway%22%3D%22platform%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20relation%5B%22railway%22%3D%22platform%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20node%5B%22room%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20way%5B%22room%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20relation%5B%22room%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20node%5B%22highway%22%3D%22elevator%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20node%5B%22level%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%20%20way%5B%22highway%22~%22footway%7Celevator%7Csteps%7Cpath%22%5D%2851.0399426744667%2C13.732688874006271%2C51.040494161677266%2C13.733840882778168%29%3B%0A%29%3B%0A%2F%2F%20print%20results%0Aout%20body%3B%0A%3E%3B%0Aout%20skel%20qt%3B" 339 | let apiUrl = "http://overpass.osm.rambler.ru/cgi/interpreter?data="; 340 | let url = apiUrl + encodeURI(overpassQuery); 341 | let request = $.getJSON(url, (result) => { 342 | //console.log(result); 343 | }); 344 | request.always(() => { 345 | 346 | this.loadindicator(-1); 347 | }); 348 | 349 | return request; 350 | } 351 | 352 | activateWheelchairStyle() 353 | { 354 | this._isWheelchairstyleActive = true; 355 | this.load(true); 356 | } 357 | 358 | deactivateWheelchairStyle() { 359 | this._isWheelchairstyleActive = false; 360 | this.load(true); 361 | } 362 | 363 | toggleWheelChair() 364 | { 365 | let button = $("#wheelchairtoggle") 366 | if (this._isWheelchairstyleActive) 367 | { 368 | this.deactivateWheelchairStyle(); 369 | button.removeClass('pressed'); 370 | } 371 | else 372 | { 373 | this.activateWheelchairStyle(); 374 | button.addClass('pressed'); 375 | } 376 | } 377 | 378 | loadindicator(n: number) { 379 | if (!this._activeLoads) { 380 | this._activeLoads = 0; 381 | } 382 | this._activeLoads = this._activeLoads + n; 383 | 384 | //should never happen ;) 385 | if (this._activeLoads < 0) 386 | { 387 | this._activeLoads = 0; 388 | } 389 | 390 | if (this._activeLoads == 0) { 391 | $("#loading").hide(); 392 | } 393 | if (this._activeLoads > 0) 394 | { 395 | $("#loading").show(); 396 | } 397 | } 398 | 399 | 400 | /** 401 | * Leaflet Mapobject 402 | */ 403 | private __map: L.Map; 404 | /** 405 | * current map level 406 | */ 407 | private _level: number; 408 | /** 409 | * Style 410 | */ 411 | private _style: any; 412 | /** 413 | * Wheelchairstyle 414 | */ 415 | private _wheelchairStyle: any; 416 | 417 | /** 418 | * List of all available Levels 419 | */ 420 | private _levelList: number[]; 421 | 422 | private _elevatorMarkers: L.Marker[]; 423 | 424 | /** 425 | * last Zoomlevel. Used to detect if zoomed in or out. 426 | */ 427 | private _lastZoomLevel: number; 428 | 429 | /** 430 | * indicate that the wheelchairstyle is activated 431 | */ 432 | private _isWheelchairstyleActive: boolean; 433 | 434 | /** 435 | * cached OSM JSON 436 | */ 437 | private _jsonData: any; 438 | 439 | private _activeLoads: number; 440 | } 441 | } 442 | -------------------------------------------------------------------------------- /js/application.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"application.js","sourceRoot":"","sources":["../ts/mapForm.ts","../ts/index.ts","../ts/styleParser.ts"],"names":["t","t.mapForm","t.mapForm.constructor","t.mapForm.initMap","t.mapForm.load","t.mapForm.render","t.mapForm.loadStyle","t.mapForm.loadWheelchairStyle","t.mapForm._layerFilter","t.mapForm._styleGeoJson","t.mapForm.parseLevel","t.mapForm.createsStyledMarker","t.mapForm.initLevelButtons","t.mapForm.switchLevel","t.mapForm.addToLevelList","t.mapForm.simulateBrokenLift","t.mapForm.loadDbElevators","t.mapForm.showElevators","t.mapForm.loadFromOverpass","t.mapForm.activateWheelchairStyle","t.mapForm.deactivateWheelchairStyle","t.mapForm.toggleWheelChair","t.mapForm.loadindicator","t.styleParser","t.styleParser.constructor","t.styleParser.getSimpleStyleForFeature","t.styleParser.getLabelMarker","t.styleParser.getIconForProperties"],"mappings":"AAGA,IAAO,CAAC,CAqbP;AArbD,WAAO,CAAC,EAAC,CAAC;IACTA;QAECC;YAFDC,iBAmbCA;YA/aCA,IAAIA,CAACA,OAAOA,EAAEA,CAACA;YAEfA,CAACA,CAACA,iBAAiBA,CAACA,CAACA,EAAEA,CAACA,OAAOA,EAAEA,cAAMA,OAAAA,KAAIA,CAACA,kBAAkBA,EAAEA,EAAzBA,CAAyBA,CAACA,CAACA;YAClEA,CAACA,CAACA,mBAAmBA,CAACA,CAACA,EAAEA,CAACA,OAAOA,EAAEA,cAAMA,OAAAA,KAAIA,CAACA,gBAAgBA,EAAEA,EAAvBA,CAAuBA,CAACA,CAACA;QAEnEA,CAACA;QAEDD,yBAAOA,GAAPA;YAAAE,iBAiDCA;YA/CAA,IAAIA,CAACA,MAAMA,GAAGA,CAACA,CAACA;YAChBA,IAAIA,CAACA,KAAKA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,CAACA,KAAKA,EAAEA,EAAEA,CAACA,CAACA;YAClCA,IAAIA,CAACA,KAAKA,CAACA,OAAOA,CAACA,CAACA,QAAQA,EAAEA,QAAQA,CAACA,EAAEA,EAAEA,CAACA,CAACA;YAC7CA,IAAIA,CAACA,wBAAwBA,GAAGA,KAAKA,CAACA;YAMtCA,CAACA,CAACA,SAASA,CAACA,4JAA4JA,EAAEA;gBACzKA,WAAWA,EAAEA,mFAAmFA;gBAChGA,OAAOA,EAAEA,EAAEA;aACXA,CAACA,CAACA,KAAKA,CAACA,IAAIA,CAACA,KAAKA,CAACA,CAACA;YAErBA,IAAIA,CAACA,cAAcA,GAAGA,IAAIA,CAACA,KAAKA,CAACA,OAAOA,EAAEA,CAACA;YAE3CA,IAAIA,CAACA,SAASA,EAAEA;iBACdA,IAAIA,CAAC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AAIA,MAAMA,GAAGA,CAACA,CAACA,mBAAmBA,CAACA,CAAAA;YACnCA,EAAEA,CAACA,CAACA,IAAIA,CAACA,wBAAwBA,CAACA,CAClCA,CAACA;gBACAA,IAAIA,CAACA,yBAAyBA,EAAEA,CAACA;gBACjCA,MAAMA,CAACA,WAAWA,CAACA,SAASA,CAACA,CAACA;YAC/BA,CAACA;YACDA,IAAIA,CACJA,CAACA;gBACAA,IAAIA,CAACA,uBAAuBA,EAAEA,CAACA;gBAC/BA,MAAMA,CAACA,QAAQA,CAACA,SAASA,CAACA,CAACA;YAC5BA,CAACA;QACFA,CAACA;QAEDpB,+BAAaA,GAAbA,UAAcA,CAASA;YACtBqB,EAAEA,CAACA,CAACA,CAACA,IAAIA,CAACA,YAAYA,CAACA,CAACA,CAACA;gBACxBA,IAAIA,CAACA,YAAYA,GAAGA,CAACA,CAACA;YACvBA,CAACA;YACDA,IAAIA,CAACA,YAAYA,GAAGA,IAAIA,CAACA,YAAYA,GAAGA,CAACA,CAACA;YAG1CA,EAAEA,CAACA,CAACA,IAAIA,CAACA,YAAYA,GAAGA,CAACA,CAACA,CAC1BA,CAACA;gBACAA,IAAIA,CAACA,YAAYA,GAAGA,CAACA,CAACA;YACvBA,CAACA;YAEDA,EAAEA,CAACA,CAACA,IAAIA,CAACA,YAAYA,IAAIA,CAACA,CAACA,CAACA,CAACA;gBAC5BA,CAACA,CAACA,UAAUA,CAACA,CAACA,IAAIA,EAAEA,CAACA;YACtBA,CAACA;YACDA,EAAEA,CAACA,CAACA,IAAIA,CAACA,YAAYA,GAAGA,CAACA,CAACA,CAC1BA,CAACA;gBACAA,CAACA,CAACA,UAAUA,CAACA,CAACA,IAAIA,EAAEA,CAACA;YACtBA,CAACA;QACFA,CAACA;QA2CFrB,cAACA;IAADA,CAACA,AAnbDD,IAmbCA;IAnbYA,SAAOA,UAmbnBA,CAAAA;AACFA,CAACA,EArbM,CAAC,KAAD,CAAC,QAqbP;ACpbD,CAAC,CAAC;IACD,I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IAAIA,CAACA,IAAIA,IAAIA,YAAYA,CAACA,WAAWA,CAACA,CAACA,CACtEA,CAACA;gBAEAA,EAAEA,CAACA,CAACA,CAACA,CAACA,YAAYA,CAACA,YAAYA,CAACA,IAAIA,CAACA,IAAIA,IAAIA,YAAYA,CAACA,YAAYA,CAACA,CAACA,CACxEA,CAACA;oBACAA,KAAKA,GAAGA,OAAOA,CAACA,UAAUA,CAACA,IAAIA,GAAGA,0BAA0BA,GAAGA,OAAOA,CAACA,UAAUA,CAACA,IAAIA,GAAGA,QAAQA,GAAGA,EAAEA,CAACA;gBACxGA,CAACA;gBAEDA,IAAIA,IAAIA,GAAGA,IAAIA,CAACA,CAACA,OAAOA,CAACA;oBAExBA,IAAIA,EAAEA,CAACA,YAAYA,CAACA,OAAOA,GAAGA,+BAA+BA,GAAGA,YAAYA,CAACA,OAAOA,GAAGA,MAAMA,GAAGA,EAAEA,CAACA;0BACjGA,KAAKA;oBACPA,SAASA,EAAEA,cAAcA,GAAGA,CAACA,YAAYA,CAACA,eAAeA,GAAGA,YAAYA,CAACA,eAAeA,GAAGA,EAAEA,CAACA;oBAC9FA,UAAUA,EAAOA,CAACA,EAAEA,EAAEA,EAAEA,CAACA;iBACzBA,CAACA,CAACA;gBAEHA,MAAMA,CAACA,IAAIA,CAACA;YACbA,CAACA;YACDA,IAAIA,CAACA,CAACA;gBACLA,IAAIA,IAAIA,GAAGA,IAAIA,CAACA,CAACA,OAAOA,CAACA;oBACxBA,IAAIA,EAAEA,EAAEA;oBACRA,SAASA,EAAEA,aAAaA;iBACxBA,CAACA,CAAAA;gBACFA,MAAMA,CAACA,IAAIA,CAACA;YACbA,CAACA;QACFA,CAACA;QACFJ,kBAACA;IAADA,CAACA,AAnFDvB,IAmFCA;IAnFYA,aAAWA,cAmFvBA,CAAAA;AACFA,CAACA,EArFM,CAAC,KAAD,CAAC,QAqFP"} -------------------------------------------------------------------------------- /js/application.js: -------------------------------------------------------------------------------- 1 | var t; 2 | (function (t) { 3 | var mapForm = (function () { 4 | function mapForm() { 5 | var _this = this; 6 | this.initMap(); 7 | $('#simulatebutton').on('click', function () { return _this.simulateBrokenLift(); }); 8 | $("#wheelchairtoggle").on('click', function () { return _this.toggleWheelChair(); }); 9 | } 10 | mapForm.prototype.initMap = function () { 11 | var _this = this; 12 | this._level = 0; 13 | this.__map = new L.Map('map', {}); 14 | this.__map.setView([51.04022, 13.73245], 19); 15 | this._isWheelchairstyleActive = false; 16 | L.tileLayer('https://api.tiles.mapbox.com/v4/mapbox.streets-basic/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoidWJhaG52ZXJsZWloIiwiYSI6IjZyVGcyZzAifQ.EP3L8P8zlHIRF7-pB7zfDA', { 17 | attribution: 'Map data © OpenStreetMap contributors', 18 | maxZoom: 22 19 | }).addTo(this.__map); 20 | this._lastZoomLevel = this.__map.getZoom(); 21 | this.loadStyle() 22 | .then(function () { return _this.loadWheelchairStyle(); }) 23 | .then(function () { return _this.load(); }) 24 | .then(function () { return _this.loadDbElevators(); }); 25 | this.__map.on('zoomend', function () { 26 | if (_this._lastZoomLevel && ((_this._lastZoomLevel >= 17) && (_this.__map.getZoom() > _this._lastZoomLevel))) { 27 | _this.load(true); 28 | } 29 | else { 30 | _this.load(); 31 | } 32 | _this._lastZoomLevel = _this.__map.getZoom(); 33 | }); 34 | this.__map.on('moveend', function (e) { 35 | console.log(e.hard); 36 | if (e.hard === false) { 37 | } 38 | else { 39 | console.log('load'); 40 | _this.load(); 41 | } 42 | }); 43 | }; 44 | mapForm.prototype.load = function (resueData) { 45 | var _this = this; 46 | resueData = resueData ? resueData : false; 47 | if ((resueData && this._jsonData) || (this.__map.getZoom() < 17)) { 48 | this.render(this._jsonData); 49 | var deferred = $.Deferred(); 50 | deferred.resolve(this._jsonData); 51 | return deferred.promise(); 52 | } 53 | else { 54 | this._levelList = []; 55 | var xhr = this.loadFromOverpass(); 56 | xhr.done(function (json) { 57 | _this._jsonData = json; 58 | _this.render(json); 59 | }); 60 | return xhr; 61 | } 62 | }; 63 | mapForm.prototype.render = function (json) { 64 | var _this = this; 65 | var geojson = osmtogeojson(json, { 66 | flatProperties: true, 67 | polygonFeatures: function () { return true; } 68 | }); 69 | this.__map.eachLayer(function (layer) { 70 | if (!(layer instanceof L.TileLayer)) { 71 | _this.__map.removeLayer(layer); 72 | } 73 | }); 74 | L.geoJson(geojson, { 75 | filter: function (feature) { return _this._layerFilter(feature); }, 76 | style: function (feature) { return _this._styleGeoJson(feature); }, 77 | pointToLayer: function (feature, latlng) { 78 | return _this.createsStyledMarker(feature, latlng); 79 | } 80 | }).addTo(this.__map); 81 | this.initLevelButtons(); 82 | this.showElevators(); 83 | }; 84 | mapForm.prototype.loadStyle = function () { 85 | var _this = this; 86 | return $.getJSON('./mapstyle/style.json', function (json) { 87 | _this._style = json; 88 | }); 89 | }; 90 | mapForm.prototype.loadWheelchairStyle = function () { 91 | var _this = this; 92 | return $.getJSON('./mapstyle/wheelchairstyle.json', function (json) { 93 | _this._wheelchairStyle = json; 94 | }); 95 | }; 96 | mapForm.prototype._layerFilter = function (feature) { 97 | var properties = feature.properties; 98 | if (properties.level) { 99 | var level = properties.level; 100 | var parsedLevels = this.parseLevel(level); 101 | this.addToLevelList(parsedLevels); 102 | if ($.inArray(this._level, parsedLevels) !== -1) { 103 | return true; 104 | } 105 | else { 106 | return false; 107 | } 108 | } 109 | return false; 110 | }; 111 | mapForm.prototype._styleGeoJson = function (feature) { 112 | var style = this._isWheelchairstyleActive ? this._wheelchairStyle : this._style; 113 | var s = t.styleParser.getSimpleStyleForFeature(feature, style); 114 | var marker = t.styleParser.getLabelMarker(feature, style, this.__map.getZoom()); 115 | if (marker) { 116 | marker.addTo(this.__map); 117 | } 118 | return s; 119 | }; 120 | mapForm.prototype.parseLevel = function (levelString) { 121 | if (levelString) { 122 | var levels = levelString.split(";"); 123 | levels.forEach(function (level, index) { 124 | levels[index] = parseInt(level, 10); 125 | }); 126 | return levels; 127 | } 128 | }; 129 | mapForm.prototype.createsStyledMarker = function (feature, latlng) { 130 | var icon = t.styleParser.getIconForProperties(feature, this._style, this.__map.getZoom()); 131 | if (icon) { 132 | return new L.Marker(latlng, { icon: icon }); 133 | } 134 | return new L.Marker(latlng); 135 | }; 136 | mapForm.prototype.initLevelButtons = function () { 137 | var _this = this; 138 | console.log("init this"); 139 | var levelContainer = $('#level'); 140 | levelContainer.html(""); 141 | this._levelList.forEach(function (level) { 142 | var additionalClass = ""; 143 | if (_this._level === level) { 144 | additionalClass = " levelbutton-active"; 145 | } 146 | var button = $('
' + level + '
'); 147 | levelContainer.append(button); 148 | button.on('click', function () { return _this.switchLevel(level); }); 149 | }); 150 | }; 151 | mapForm.prototype.switchLevel = function (level) { 152 | this._level = level; 153 | return this.load(true); 154 | }; 155 | mapForm.prototype.addToLevelList = function (levels) { 156 | var _this = this; 157 | levels.forEach(function (level) { 158 | if (!isNaN(level)) { 159 | if ($.inArray(level, _this._levelList) == -1) { 160 | _this._levelList.push(level); 161 | } 162 | } 163 | }); 164 | this._levelList.sort(function (a, b) { return a - b; }); 165 | this._levelList = this._levelList.reverse(); 166 | }; 167 | mapForm.prototype.simulateBrokenLift = function () { 168 | var _this = this; 169 | this.switchLevel(1).then(function () { 170 | _this.__map.setView([51.04034, 13.73327], 19); 171 | setTimeout(function () { 172 | $.getJSON("./data/unavailable_plattform.geojson", function (geojson) { 173 | var layer = L.geoJson(geojson, { 174 | style: function () { 175 | return { 176 | "fill": true, 177 | "fillColor": "#FF0000", 178 | "fillOpacity": 0.6, 179 | "stroke": false 180 | }; 181 | } 182 | }); 183 | layer.addTo(_this.__map); 184 | }); 185 | var marker = new L.Marker([51.0403711, 13.733309], { 186 | icon: new L.Icon({ 187 | iconUrl: "./img/mapicons/elevator_red_filled.png", 188 | iconAnchor: new L.Point(12, 14) 189 | }) 190 | }); 191 | marker.addTo(_this.__map); 192 | }, 1500); 193 | }); 194 | }; 195 | mapForm.prototype.loadDbElevators = function () { 196 | var _this = this; 197 | this._elevatorMarkers = []; 198 | $.getJSON("http://adam.noncd.db.de/api/v1.0/facilities", function (json) { 199 | if (json) { 200 | json.forEach(function (elevator) { 201 | var icon = new L.Icon({ 202 | iconUrl: "./img/mapicons/" + ((elevator.state == "INACTIVE") ? "elevator_red_filled.png" : "elevator_green_filled.png"), 203 | iconAnchor: new L.Point(12, 14) 204 | }); 205 | if (elevator.geocoordY && elevator.geocoordX) { 206 | var marker = new L.Marker([elevator.geocoordY, elevator.geocoordX], { 207 | icon: icon 208 | }); 209 | _this._elevatorMarkers.push(marker); 210 | } 211 | }); 212 | } 213 | }); 214 | this.showElevators(); 215 | }; 216 | mapForm.prototype.showElevators = function () { 217 | var _this = this; 218 | if (this._elevatorMarkers) { 219 | this._elevatorMarkers.forEach(function (marker) { 220 | marker.addTo(_this.__map); 221 | }); 222 | } 223 | }; 224 | mapForm.prototype.loadFromOverpass = function () { 225 | var _this = this; 226 | this.loadindicator(1); 227 | var bounds = this.__map.getBounds(); 228 | var bboxxtring = (bounds.getSouth() - 0.0005) + "," 229 | + (bounds.getWest() - 0.0005) + "," 230 | + (bounds.getNorth() + 0.0005) + "," 231 | + (bounds.getEast() + 0.0005); 232 | var overpassQuery = "\n\t\t\t\t[out:json][timeout:25];\n\t\t\t\t(\n\t\t\t\t// query part for: \u201Cindoor=*\u201D\n\t\t\t\tnode[\"indoor\"]({{bbox}});\n\t\t\t\tway[\"indoor\"]({{bbox}});\n\t\t\t\trelation[\"indoor\"]({{bbox}});\n\t\t\t\tway[\"railway\" = \"platform\"]({{bbox}});\n\t\t\t\tway[\"public_transport\" = \"platform\"]({{bbox}});\n\t\t\t\trelation[\"public_transport\" = \"platform\"]({{bbox}});\n\t\t\t\tway[\"highway\" = \"platform\"]({{bbox}});\n\t\t\t\trelation[\"railway\" = \"platform\"]({{bbox}});\n\t\t\t\tnode[\"room\"]({{bbox}});\n\t\t\t\tway[\"room\"]({{bbox}});\n\t\t\t\trelation[\"room\"]({{bbox}});\n\t\t\t\tnode[\"highway\" = \"elevator\"]({{bbox}});\n\t\t\t\tnode[\"level\"]({{bbox}});\n\t\t\t\tway[\"highway\"~\"footway|elevator|steps|path\"]({{bbox}});\n\t\t\t\t);\n\t\t\t\t// print results\n\t\t\t\tout body;\n\t\t\t\t>;\n\t\t\t\tout skel qt;"; 233 | overpassQuery = overpassQuery.replace(/{{bbox}}/g, bboxxtring); 234 | var apiUrl = "http://overpass.osm.rambler.ru/cgi/interpreter?data="; 235 | var url = apiUrl + encodeURI(overpassQuery); 236 | var request = $.getJSON(url, function (result) { 237 | }); 238 | request.always(function () { 239 | _this.loadindicator(-1); 240 | }); 241 | return request; 242 | }; 243 | mapForm.prototype.activateWheelchairStyle = function () { 244 | this._isWheelchairstyleActive = true; 245 | this.load(true); 246 | }; 247 | mapForm.prototype.deactivateWheelchairStyle = function () { 248 | this._isWheelchairstyleActive = false; 249 | this.load(true); 250 | }; 251 | mapForm.prototype.toggleWheelChair = function () { 252 | var button = $("#wheelchairtoggle"); 253 | if (this._isWheelchairstyleActive) { 254 | this.deactivateWheelchairStyle(); 255 | button.removeClass('pressed'); 256 | } 257 | else { 258 | this.activateWheelchairStyle(); 259 | button.addClass('pressed'); 260 | } 261 | }; 262 | mapForm.prototype.loadindicator = function (n) { 263 | if (!this._activeLoads) { 264 | this._activeLoads = 0; 265 | } 266 | this._activeLoads = this._activeLoads + n; 267 | if (this._activeLoads < 0) { 268 | this._activeLoads = 0; 269 | } 270 | if (this._activeLoads == 0) { 271 | $("#loading").hide(); 272 | } 273 | if (this._activeLoads > 0) { 274 | $("#loading").show(); 275 | } 276 | }; 277 | return mapForm; 278 | })(); 279 | t.mapForm = mapForm; 280 | })(t || (t = {})); 281 | $(function () { 282 | new t.mapForm(); 283 | }); 284 | var t; 285 | (function (t) { 286 | var styleParser = (function () { 287 | function styleParser() { 288 | } 289 | styleParser.getSimpleStyleForFeature = function (feature, styleJson) { 290 | var properties = feature.properties; 291 | var style = {}; 292 | if (properties) { 293 | styleJson.forEach(function (selection) { 294 | var key = selection["key"]; 295 | if (properties[key]) { 296 | $.extend(style, selection["style"]); 297 | } 298 | if (selection["valueStyles"]) { 299 | selection["valueStyles"].forEach(function (valueStyle) { 300 | if (properties[key] == valueStyle.value) { 301 | $.extend(style, valueStyle["style"]); 302 | } 303 | }); 304 | } 305 | }); 306 | } 307 | return style; 308 | }; 309 | styleParser.getLabelMarker = function (feature, styleJson, zoom) { 310 | if (feature.geometry.type === "Polygon") { 311 | var featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 312 | if (featureStyle.showText) { 313 | var coordinates = []; 314 | feature.geometry.coordinates[0].forEach(function (c) { 315 | coordinates.push({ lat: c[1], lng: c[0] }); 316 | }); 317 | var polygon = new L.Polygon(coordinates); 318 | var point = polygon.getBounds().getCenter(); 319 | var icon = this.getIconForProperties(feature, styleJson, zoom); 320 | var marker = new L.Marker(point, { icon: icon }); 321 | return marker; 322 | } 323 | } 324 | }; 325 | styleParser.getIconForProperties = function (feature, styleJson, zoom) { 326 | var featureStyle = this.getSimpleStyleForFeature(feature, styleJson); 327 | var label = ""; 328 | if ((!featureStyle.iconMinZoom) || (zoom >= featureStyle.iconMinZoom)) { 329 | if ((!featureStyle.labelMinZoom) || (zoom >= featureStyle.labelMinZoom)) { 330 | label = feature.properties.name ? '
' + feature.properties.name + '
' : ""; 331 | } 332 | var icon = new L.DivIcon({ 333 | html: (featureStyle.iconUrl ? '' : "") 334 | + label, 335 | className: "label-class " + (featureStyle.markerClassName ? featureStyle.markerClassName : ""), 336 | iconAnchor: [50, 25] 337 | }); 338 | return icon; 339 | } 340 | else { 341 | var icon = new L.DivIcon({ 342 | html: "", 343 | className: "label-empty" 344 | }); 345 | return icon; 346 | } 347 | }; 348 | return styleParser; 349 | })(); 350 | t.styleParser = styleParser; 351 | })(t || (t = {})); 352 | //# sourceMappingURL=application.js.map -------------------------------------------------------------------------------- /lib/osmtogeojson.js: -------------------------------------------------------------------------------- 1 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.osmtogeojson=e()}}(function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=t[i]={exports:{}};n[i][0].call(c.exports,function(e){var t=n[i][1][e];return o(t?t:e)},c,c.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i0});d.center&&n(d),g?a(d):d.bounds&&r(d)}return s(i,u,l)}function i(e){function n(e,n,t){e.hasAttribute(t)&&(n[t]=e.getAttribute(t))}function r(e,r){var o=t.clone(e);n(r,o,"lat"),n(r,o,"lon"),o.__is_center_placeholder=!0,u.push(o)}function o(e,n){function r(e,n,t){var r={type:"node",id:"_"+o.type+"/"+o.id+"bounds"+t,lat:e,lon:n};o.nodes.push(r.id),u.push(r)}var o=t.clone(e);o.nodes=[],r(n.getAttribute("minlat"),n.getAttribute("minlon"),1),r(n.getAttribute("maxlat"),n.getAttribute("minlon"),2),r(n.getAttribute("maxlat"),n.getAttribute("maxlon"),3),r(n.getAttribute("minlat"),n.getAttribute("maxlon"),4),o.nodes.push(o.nodes[0]),o.__is_bounds_placeholder=!0,l.push(o)}function a(e,n){function r(e,n,t){var r={type:"node",id:t,lat:e,lon:n,__is_uninteresting:!0};return u.push(r),r.id}t.isArray(e.nodes)||(e.nodes=[],t.each(n,function(n){e.nodes.push("_anonymous@"+n.getAttribute("lat")+"/"+n.getAttribute("lon"))})),t.each(n,function(n,t){n.getAttribute("lat")&&r(n.getAttribute("lat"),n.getAttribute("lon"),e.nodes[t])})}function i(e,n){function r(e,n,t){var r={type:"node",id:t,lat:e,lon:n};u.push(r)}function o(e,n){function r(e,n){var t={type:"node",id:"_anonymous@"+e+"/"+n,lat:e,lon:n,__is_uninteresting:!0};o.nodes.push(t.id),u.push(t)}if(!l.some(function(e){return"way"==e.type&&e.id==n})){var o={type:"way",id:n,nodes:[]};t.each(e,function(e){e.getAttribute("lat")?r(e.getAttribute("lat"),e.getAttribute("lon")):o.nodes.push(void 0)}),l.push(o)}}t.each(n,function(n,t){"node"==e.members[t].type?n.getAttribute("lat")&&r(n.getAttribute("lat"),n.getAttribute("lon"),e.members[t].ref):"way"==e.members[t].type&&n.getElementsByTagName("nd").length>0&&o(n.getElementsByTagName("nd"),e.members[t].ref)})}var u=new Array,l=new Array,c=new Array;t.each(e.getElementsByTagName("node"),function(e){var r={};t.each(e.getElementsByTagName("tag"),function(e){r[e.getAttribute("k")]=e.getAttribute("v")});var o={type:"node"};n(e,o,"id"),n(e,o,"lat"),n(e,o,"lon"),n(e,o,"version"),n(e,o,"timestamp"),n(e,o,"changeset"),n(e,o,"uid"),n(e,o,"user"),t.isEmpty(r)||(o.tags=r),u.push(o)});var f,p;return t.each(e.getElementsByTagName("way"),function(e){var i={},s=[];t.each(e.getElementsByTagName("tag"),function(e){i[e.getAttribute("k")]=e.getAttribute("v")});var u=!1;t.each(e.getElementsByTagName("nd"),function(e,n){var t;(t=e.getAttribute("ref"))&&(s[n]=t),!u&&e.getAttribute("lat")&&(u=!0)});var c={type:"way"};n(e,c,"id"),n(e,c,"version"),n(e,c,"timestamp"),n(e,c,"changeset"),n(e,c,"uid"),n(e,c,"user"),s.length>0&&(c.nodes=s),t.isEmpty(i)||(c.tags=i),(f=e.getElementsByTagName("center")[0])&&r(c,f),u?a(c,e.getElementsByTagName("nd")):(p=e.getElementsByTagName("bounds")[0])&&o(c,p),l.push(c)}),t.each(e.getElementsByTagName("relation"),function(e){var a={},s=[];t.each(e.getElementsByTagName("tag"),function(e){a[e.getAttribute("k")]=e.getAttribute("v")});var u=!1;t.each(e.getElementsByTagName("member"),function(e,t){s[t]={},n(e,s[t],"ref"),n(e,s[t],"role"),n(e,s[t],"type"),(!u&&"node"==s[t].type&&e.getAttribute("lat")||"way"==s[t].type&&e.getElementsByTagName("nd").length>0)&&(u=!0)});var l={type:"relation"};n(e,l,"id"),n(e,l,"version"),n(e,l,"timestamp"),n(e,l,"changeset"),n(e,l,"uid"),n(e,l,"user"),s.length>0&&(l.members=s),t.isEmpty(a)||(l.tags=a),(f=e.getElementsByTagName("center")[0])&&r(l,f),u?i(l,e.getElementsByTagName("member")):(p=e.getElementsByTagName("bounds")[0])&&o(l,p),c.push(l)}),s(u,l,c)}function s(e,o,a){function i(e,t){if("object"!=typeof t&&(t={}),"function"==typeof n.uninterestingTags)return!n.uninterestingTags(e,t);for(var r in e)if(n.uninterestingTags[r]!==!0&&t[r]!==!0&&t[r]!==e[r])return!0;return!1}function s(e){var n={timestamp:e.timestamp,version:e.version,changeset:e.changeset,user:e.user,uid:e.uid};for(k in n)void 0===n[k]&&delete n[k];return n}function l(e,r){function o(t){for(var r,o,a,i,s,u,c=function(e){return e[0]},f=function(e){return e[e.length-1]},p=[];t.length;)for(r=t.pop().nodes.slice(),p.push(r);t.length&&c(r)!==f(r);){for(o=c(r),a=f(r),i=0;ir!=c>r&&(l-s)*(r-u)/(c-u)+s>t;f&&(o=!o)}return o};for(e=o(e),n=0;no?0:o);++r3&&"function"==typeof n[t-2])var o=f(n[--t-1],n[t--],2);else t>2&&"function"==typeof n[t-1]&&(o=n[--t]);for(var s=i(arguments,1,t),u=-1,l=r(),c=r();++u2?g(e,17,i(arguments,2),null,n):g(e,1,null,null,n)}function T(e){return e}function N(){}var S=[],C={},M=40,L=/\w*$/,B=/^\s*function[ \n\r\t]+\w/,F=/\bthis\b/,I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],D="[object Arguments]",R="[object Array]",H="[object Boolean]",U="[object Date]",W="[object Error]",q="[object Function]",$="[object Number]",X="[object Object]",G="[object RegExp]",V="[object String]",z={};z[q]=!1,z[D]=z[R]=z[H]=z[U]=z[$]=z[X]=z[G]=z[V]=!0;var J={configurable:!1,enumerable:!1,value:null,writable:!1},K={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},Q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Y=Q[typeof window]&&window||this,Z=Q[typeof t]&&t&&!t.nodeType&&t,en=Q[typeof n]&&n&&!n.nodeType&&n,nn=en&&en.exports===Z&&Z,tn=Q[typeof e]&&e;!tn||tn.global!==tn&&tn.window!==tn||(Y=tn);var rn=[],on=Error.prototype,an=Object.prototype,sn=String.prototype,un=an.toString,ln=RegExp("^"+String(un).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),cn=Function.prototype.toString,fn=m(fn=Object.getPrototypeOf)&&fn,pn=an.hasOwnProperty,dn=rn.push,gn=an.propertyIsEnumerable,yn=rn.unshift,mn=function(){try{var e={},n=m(n=Object.defineProperty)&&n,t=n(e,e,e)&&n}catch(r){}return t}(),bn=m(bn=Object.create)&&bn,hn=m(hn=Array.isArray)&&hn,vn=m(vn=Object.keys)&&vn,wn={};wn[R]=Array,wn[H]=Boolean,wn[U]=Date,wn[q]=Function,wn[X]=Object,wn[$]=Number,wn[G]=RegExp,wn[V]=String;var _n={};_n[R]=_n[U]=_n[$]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},_n[H]=_n[V]={constructor:!0,toString:!0,valueOf:!0},_n[W]=_n[q]=_n[G]={constructor:!0,toString:!0},_n[X]={constructor:!0},function(){for(var e=I.length;e--;){var n=I[e];for(var t in _n)pn.call(_n,t)&&!pn.call(_n[t],n)&&(_n[t][n]=!1)}}();var xn=s.support={};!function(){var e=function(){this.x=1},n={0:1,length:1},t=[];e.prototype={valueOf:1,y:1};for(var r in new e)t.push(r);for(r in arguments);xn.argsClass=un.call(arguments)==D,xn.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),xn.enumErrorProps=gn.call(on,"message")||gn.call(on,"name"),xn.enumPrototypes=gn.call(e,"prototype"),xn.funcDecomp=!m(Y.WinRTError)&&F.test(function(){return this}),xn.funcNames="string"==typeof Function.name,xn.nonEnumArgs=0!=r,xn.nonEnumShadows=!/valueOf/.test(t),xn.ownLast="x"!=t[0],xn.spliceObjects=(rn.splice.call(n,0,1),!n[0]),xn.unindexedChars="x"[0]+Object("x")[0]!="xx";try{xn.nodeClass=!(un.call(document)==X&&!({toString:0}+""))}catch(o){xn.nodeClass=!0}}(1);var An=function(e){var n="var index, iterable = "+e.firstArg+", result = "+e.init+";\nif (!iterable) return result;\n"+e.top+";";e.array?(n+="\nvar length = iterable.length; index = -1;\nif ("+e.array+") { ",xn.unindexedChars&&(n+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),n+="\n while (++index < length) {\n "+e.loop+";\n }\n}\nelse { "):xn.nonEnumArgs&&(n+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+e.loop+";\n }\n } else { "),xn.enumPrototypes&&(n+="\n var skipProto = typeof iterable == 'function';\n "),xn.enumErrorProps&&(n+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var t=[];if(xn.enumPrototypes&&t.push('!(skipProto && index == "prototype")'),xn.enumErrorProps&&t.push('!(skipErrorProps && (index == "message" || index == "name"))'),e.useHas&&e.keys)n+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",t.length&&(n+=" if ("+t.join(" && ")+") {\n "),n+=e.loop+"; ",t.length&&(n+="\n }"),n+="\n } ";else if(n+="\n for (index in iterable) {\n",e.useHas&&t.push("hasOwnProperty.call(iterable, index)"),t.length&&(n+=" if ("+t.join(" && ")+") {\n "),n+=e.loop+"; ",t.length&&(n+="\n }"),n+="\n } ",xn.nonEnumShadows){for(n+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;k<7;k++)n+="\n index = '"+e.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",e.useHas||(n+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),n+=") {\n "+e.loop+";\n } ";n+="\n } "}return(e.array||xn.nonEnumArgs)&&(n+="\n}"),n+=e.bottom+";\nreturn result"};bn||(c=function(){function e(){}return function(n){if(x(n)){e.prototype=n;var t=new e;e.prototype=null}return t||Y.Object()}}());var jn=mn?function(e,n){J.value=n,mn(e,"__bindData__",J)}:N;xn.argsClass||(h=function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&pn.call(e,"callee")&&!gn.call(e,"callee")||!1});var En=hn||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&un.call(e)==R||!1},Pn=y({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),kn=vn?function(e){return x(e)?xn.enumPrototypes&&"function"==typeof e||xn.nonEnumArgs&&e.length&&h(e)?Pn(e):vn(e):[]}:Pn,On={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:kn,loop:"if (callback(iterable[index], index, collection) === false) return result"},Tn={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:kn,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},Nn={top:"if (!objectTypes[typeof iterable]) return result;\n"+On.top,array:!1},Sn=y(On),Cn=y(Tn,{top:Tn.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),Mn=y(On,Nn,{useHas:!1}),Ln=y(On,Nn);_(/x/)&&(_=function(e){return"function"==typeof e&&un.call(e)==q});var Bn=fn?function(e){if(!e||un.call(e)!=X||!xn.argsClass&&h(e))return!1;var n=e.valueOf,t=m(n)&&(t=fn(n))&&fn(t);return t?e==t||fn(e)==t:b(e)}:b;s.assign=Cn,s.bind=O,s.compact=P,s.forEach=E,s.forIn=Mn,s.forOwn=Ln,s.keys=kn,s.merge=j,s.each=E,s.extend=Cn,s.clone=v,s.identity=T,s.isArguments=h,s.isArray=En,s.isEmpty=w,s.isFunction=_,s.isObject=x,s.isPlainObject=Bn,s.isString=A,s.noop=N,s.VERSION="2.4.1",Z&&en&&nn&&((en.exports=s)._=s)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,n){function t(e,n){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(r(t,n)),e;case"Feature":return e.geometry=t(e.geometry,n),e;case"Polygon":case"MultiPolygon":return o(e,n);default:return e}}function r(e,n){return function(t){return e(t,n)}}function o(e,n){return"Polygon"===e.type?e.coordinates=a(e.coordinates,n):"MultiPolygon"===e.type&&(e.coordinates=e.coordinates.map(r(a,n))),e}function a(e,n){n=!!n,e[0]=i(e[0],!n);for(var t=1;t=0}var u=e("geojson-area");n.exports=t},{"geojson-area":4}],4:[function(e,n){function t(e){if("Polygon"===e.type)return r(e.coordinates);if("MultiPolygon"===e.type){for(var n=0,t=0;t0){n+=Math.abs(o(e[0]));for(var t=1;t2){for(var t,r,o=0;oa?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; 3 | 4 | return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("