├── LICENSE ├── icon.png ├── getTicket.html ├── manifest.json ├── README.md ├── css ├── _notes │ └── dwsync.xml ├── bootstrap-responsive.min.css ├── bootstrap-responsive.css └── jquery-ui.css ├── js ├── get_data.js ├── popup.js ├── serialize-0.2.js ├── ticket.js ├── irctc.js ├── captcha.js ├── input.js ├── bootstrap.min.js ├── data.js └── trainNo.js ├── ticket.html ├── popup.html └── index.html /LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devendrachaplot/TicketMaster/HEAD/icon.png -------------------------------------------------------------------------------- /getTicket.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ticket Master 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | 4 | "name": "TicketMaster", 5 | "description": "Quick Easy Automatic Ticket Booking on IRCTC (Including tatkal)", 6 | "version": "1.31", 7 | "content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'", 8 | "content_scripts": [ 9 | { 10 | "matches": ["https://www.irctc.co.in/*"], 11 | "js": ["js/jquery.js", "js/irctc.js", "js/data.js", "js/captcha.js"] 12 | } 13 | ], 14 | 15 | "browser_action": { 16 | "default_popup": "popup.html", 17 | "default_icon": "icon.png" 18 | }, 19 | "permissions": [ 20 | "tabs", "https://www.irctc.co.in/*","storage" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TicketMaster 2 | ============ 3 | Quick Easy Automatic Ticket Booking on IRCTC (Including tatkal) 4 | Tired of failed bookings, try our new Chrome extension to book tickets. This extension takes in user ticket details for booking on the site IRCTC and does automated ticket booking. When your session expires, we loop it up unless you book your ticket successfully. 5 | Includes automatic captcha filling! ;) 6 | 7 | Download extension from: https://chrome.google.com/webstore/detail/ticketmaster/dcmkppkofblmhjmodckjhbmpamhnlgac 8 | 9 | Demo Video: http://www.youtube.com/watch?v=r4B78jQkq8I 10 | 11 | EDIT: The extension has been discontinued after IRCTC changed their website. 12 | 13 | Credits: Devendra Chaplot, Nishanth Dikkala, Priyank Chhipa, Rahul Gupta 14 | -------------------------------------------------------------------------------- /css/_notes/dwsync.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /js/get_data.js: -------------------------------------------------------------------------------- 1 | function load_data(counter) { 2 | var loginStr = "ticket"+counter+"_login"; 3 | var ticketStr = "ticket"+counter+"_ticket"; 4 | var passStr = "ticket"+counter+"_pass"; 5 | get_login(); 6 | 7 | function get_login() { 8 | chrome.storage.sync.get(loginStr, function(login_data) { 9 | console.log("The login data is: "); 10 | console.log(login_data); 11 | get_ticket(); 12 | }); 13 | } 14 | function get_ticket() { 15 | chrome.storage.sync.get(ticketStr, function(ticket_data) { 16 | console.log("The ticket data is: "); 17 | console.log(ticket_data); 18 | get_passengers(); 19 | }); 20 | } 21 | function get_passengers() { 22 | chrome.storage.sync.get(passStr, function(pass_data) { 23 | console.log("The passenger data is: "); 24 | console.log(pass_data); 25 | }); 26 | } 27 | } 28 | 29 | $(document).ready(function() { 30 | $("#submit").click(function() { 31 | var number = $("#ticketNumber").val(); 32 | load_data(number); 33 | }); 34 | }); -------------------------------------------------------------------------------- /ticket.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ticket Master 5 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |

29 |
30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ticket Master 5 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

28 |
29 | 30 | 31 |
No.SourceDestinationDateTrain NoClass
32 |
33 | 34 | -------------------------------------------------------------------------------- /js/popup.js: -------------------------------------------------------------------------------- 1 | var _gaq = _gaq || []; 2 | _gaq.push(['_setAccount', 'UA-43841023-1']); 3 | _gaq.push(['_trackPageview']); 4 | 5 | (function() { 6 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 7 | ga.src = 'https://ssl.google-analytics.com/ga.js'; 8 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 9 | })(); 10 | 11 | function addTickets() { 12 | chrome.storage.sync.get('tickets', function(data){ 13 | data['tickets'].forEach(function(counter) { 14 | var ticketStr = "ticket"+counter+"_ticket"; 15 | var keys = [ticketStr]; 16 | chrome.storage.sync.get(keys, function(login_data) { 17 | detail = login_data[ticketStr]; 18 | addHtml(detail, counter); 19 | }); 20 | }); 21 | }); 22 | function addHtml(detail, counter) { 23 | currHtml = ""; 24 | currHtml += "" 25 | currHtml += "
"+counter+""+detail['source']+""+detail['destination']+""+detail['date']+""+detail['trainNo']+""+detail['class'].substring(0,2)+"
"; 26 | document.getElementById('tickets').innerHTML += currHtml; 27 | } 28 | } 29 | 30 | $(document).ready(function() { 31 | addTickets(); 32 | $("#clearTicket").click(function(){ 33 | chrome.storage.local.remove('bookticket', function() { 34 | }); 35 | }); 36 | $(".ticket").on('click',function(){ 37 | alert("dsgdfg"); 38 | //window.location = "ticket.html?ticket="+$(this).attr('counter'); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /js/serialize-0.2.js: -------------------------------------------------------------------------------- 1 | function serialize(form) { 2 | if (!form || form.nodeName !== "FORM") { 3 | return; 4 | } 5 | var i, j, q = []; 6 | for (i = form.elements.length - 1; i >= 0; i = i - 1) { 7 | if (form.elements[i].name === "") { 8 | continue; 9 | } 10 | switch (form.elements[i].nodeName) { 11 | case 'INPUT': 12 | switch (form.elements[i].type) { 13 | case 'text': 14 | case 'hidden': 15 | case 'password': 16 | case 'button': 17 | case 'reset': 18 | case 'submit': 19 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].value)); 20 | break; 21 | case 'checkbox': 22 | case 'radio': 23 | if (form.elements[i].checked) { 24 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].value)); 25 | } 26 | break; 27 | case 'file': 28 | break; 29 | } 30 | break; 31 | case 'TEXTAREA': 32 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].value)); 33 | break; 34 | case 'SELECT': 35 | switch (form.elements[i].type) { 36 | case 'select-one': 37 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].value)); 38 | break; 39 | case 'select-multiple': 40 | for (j = form.elements[i].options.length - 1; j >= 0; j = j - 1) { 41 | if (form.elements[i].options[j].selected) { 42 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].options[j].value)); 43 | } 44 | } 45 | break; 46 | } 47 | break; 48 | case 'BUTTON': 49 | switch (form.elements[i].type) { 50 | case 'reset': 51 | case 'submit': 52 | case 'button': 53 | q.push(form.elements[i].name + "=" + encodeURIComponent(form.elements[i].value)); 54 | break; 55 | } 56 | break; 57 | } 58 | } 59 | return q.join("&"); 60 | } -------------------------------------------------------------------------------- /js/ticket.js: -------------------------------------------------------------------------------- 1 | //var counter = jQuery.url.param("ticket"); 2 | var _gaq = _gaq || []; 3 | _gaq.push(['_setAccount', 'UA-43841023-1']); 4 | _gaq.push(['_trackPageview']); 5 | 6 | (function() { 7 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 8 | ga.src = 'https://ssl.google-analytics.com/ga.js'; 9 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 10 | })(); 11 | 12 | var counter; 13 | var user = new Array(); 14 | var detail = new Array(); 15 | var ticketDetails = new Array(); 16 | 17 | function getURLParameter(name) { 18 | return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null 19 | } 20 | 21 | function updateHtml() { 22 | var html1 = ""; 23 | html1 += ""; 24 | html1 += ""; 25 | html1 += ""; 26 | html1 += ""; 27 | html1 += ""; 28 | for(var i in ticketDetails){ 29 | if($.isNumeric(i)) 30 | html1 += ""; 31 | } 32 | html1 += "
Username:"+user['username']+"
Soruce:"+detail['source']+"
Destination:"+detail['destination']+"
Date:"+detail['date']+"
Train No:"+detail['trainNo']+"
Class:"+detail['class']+"
Passenger "+i+":"+ticketDetails[i]['name']+" -- "+ticketDetails[i]['sex']+" -- "+ticketDetails[i]['age']+" -- "+ticketDetails[i]['berth_preference']+"
"; 33 | $("#displayArea").html(html1); 34 | } 35 | 36 | $(document).ready(function() { 37 | counter = getURLParameter("ticket"); 38 | console.log(counter); 39 | 40 | var loginStr = 'ticket'+counter+'_login'; 41 | var ticketStr = "ticket"+counter+"_ticket"; 42 | var passStr = "ticket"+counter+"_pass"; 43 | var keys = [loginStr,ticketStr,passStr]; 44 | chrome.storage.sync.get(keys, function(login_data) { 45 | user = login_data[loginStr]; 46 | detail = login_data[ticketStr]; 47 | ticketDetails = login_data[passStr]; 48 | ticketDetails['boardPoint'] = detail['boarding_point']; 49 | updateHtml(); 50 | }); 51 | 52 | $("#editTicket").click(function(){ 53 | var win = window.open("/index.html?edit="+counter,'_blank'); 54 | 55 | }); 56 | 57 | $("#book").click(function(){ 58 | chrome.storage.local.set({'bookticket': counter}, function() { 59 | window.open("https://www.irctc.co.in",'_blank'); 60 | }); 61 | //localStorage.setItem('bookticket',counter); 62 | }); 63 | 64 | $("#removeTicket").click(function(){ 65 | var loginStr = 'ticket'+counter+'_login'; 66 | var ticketStr = "ticket"+counter+"_ticket"; 67 | var passStr = "ticket"+counter+"_pass"; 68 | var keys = [loginStr,ticketStr,passStr]; 69 | chrome.storage.sync.remove(keys, function() { 70 | chrome.storage.sync.get('tickets',function(data){ 71 | var index = data['tickets'].indexOf(counter); 72 | data['tickets'].splice(index, 1); 73 | chrome.storage.sync.set({'tickets': data['ticekts']}, function() { 74 | window.location = "popup.html"; 75 | }); 76 | }); 77 | }); 78 | }); 79 | }); 80 | -------------------------------------------------------------------------------- /js/irctc.js: -------------------------------------------------------------------------------- 1 | javascript:void(document.oncontextmenu=null); 2 | 3 | var user = new Array(); 4 | var detail = new Array(); 5 | var ticketDetails = new Array(); 6 | 7 | chrome.storage.local.get('bookticket',function(data){ 8 | if(data['bookticket'] > 0){ 9 | var counter = data['bookticket']; 10 | var loginStr = 'ticket'+counter+'_login'; 11 | var ticketStr = "ticket"+counter+"_ticket"; 12 | var passStr = "ticket"+counter+"_pass"; 13 | var keys = [loginStr,ticketStr,passStr]; 14 | chrome.storage.sync.get(keys, function(login_data) { 15 | //console.log(login_data); 16 | user = login_data[loginStr]; 17 | detail = login_data[ticketStr]; 18 | ticketDetails = login_data[passStr]; 19 | ticketDetails['boardPoint'] = detail['boarding_point']; 20 | bookTicket(); 21 | }); 22 | } 23 | }) 24 | 25 | function login(detail){ 26 | $("input[name='userName']").val(detail['username']); 27 | $("input[name='password']").val(detail['password']); 28 | $("input#button").click(); 29 | } 30 | 31 | function planMyTravel(detail){ 32 | $("input[name='stationFrom']").val(detail['source']); 33 | $("input[name='stationTo']").val(detail['destination']); 34 | $("input[name='JDatee1']").val(detail['date']); 35 | var Date = detail['date'].split("/"); 36 | $("select[name='day']").val(Date[0]); 37 | $("select[name='month']").val(Date[1]); 38 | $("select[name='year']").val(Date[2]); 39 | $("select[name='ticketType']").val('eticket'); 40 | $("select[name='quota']").val(detail['quota']); 41 | $("#findTrain input").click(); 42 | } 43 | 44 | function listOfTrains(detail){ 45 | $('#plannerTrainListResult').parent().find('table > tbody > tr').each(function() { 46 | // alert("check!"); 47 | if($(this).find('td:first-child').html().search(detail['trainNo']) >= 0){ 48 | $(this).find('td input[value="'+detail['class']+'"]').click(); 49 | // alert("found!"); 50 | } 51 | }); 52 | } 53 | //listOfTrains(trainDetails); 54 | 55 | 56 | function ticketConfirmation(detail){ 57 | $("input[name='boardPoint1']").val(detail['boardPoint']); 58 | $("input[name='mobileNumber']").val(detail['mobileNumber']); 59 | for(var i in detail){ 60 | if($.isNumeric(i)){ 61 | var j = i-1; 62 | $("input[name='passengers["+j+"].passengerName']").val(detail[i]['name']); 63 | $("input[name='passengers["+j+"].passengerAge']").val(detail[i]['age']); 64 | $("select[name='passengers["+j+"].passengerSex']").val(detail[i]['sex']); 65 | $("select[name='passengers["+j+"].berthPreffer']").val(detail[i]['berth_preference']); 66 | $("select[name='passengers["+j+"].foodPreffer']").val(detail[i]['food_preference']); 67 | $("input[name='passengers["+j+"].seniorCitizen']").prop('checked', (detail[i]['senior_citizen'] == "off")?false:true); 68 | $("select[name='passengers["+j+"].idCardType']").val(detail[i]['idCardType']); 69 | $("input[name='passengers["+j+"].idCardNo']").val(detail[i]['idCardNo']); 70 | } 71 | } 72 | } 73 | 74 | function clickBook(){ 75 | var timerbook = setInterval(function(){ 76 | if(document.getElementById('submitButton0')){ 77 | document.getElementById('submitButton0').click(); 78 | clearInterval(timerbook); 79 | } 80 | if(document.documentElement.outerHTML.search("Session has Expired") >= 0) 81 | window.location.href="/"; 82 | },1000); 83 | } 84 | //ticketConfirmation(ticketDetails); 85 | 86 | // planMyTravel(detail); 87 | function bookTicket(){ 88 | if(document.documentElement.outerHTML.search("Session has Expired") >= 0 || document.documentElement.outerHTML.search("Online Reservation Error") >= 0 ){ 89 | window.location.href="/"; 90 | } 91 | else if(window.location.pathname.search('cgi-bin') < 0){ 92 | login(user); 93 | } 94 | else if(window.location.pathname.search('planner.do') >= 0){ 95 | var str = document.documentElement.outerHTML; 96 | if(str.search("

Train Route

") >= 0){ 97 | alert("TicketMaster : Please select correct station codes and click on Book"); 98 | } 99 | // else if($(".ErrorMsg").length > 0 && $(".welcomealert").length <= 0){ 100 | // alert("Some error occurred, please check ticket details again"); 101 | // } 102 | else if(str.search("

 List of Trains

") < 0){ 103 | planMyTravel(detail); 104 | } 105 | else{ 106 | listOfTrains(detail); 107 | var str = document.documentElement.outerHTML; 108 | if(str.search(">Availability
") >= 0){ 109 | //alert("asdasd"); 110 | clickBook(); 111 | } 112 | } 113 | } 114 | else if(window.location.pathname.search('bookticket.do') >= 0){ 115 | if($('input[value="Go"]').length > 0){ 116 | ticketConfirmation(ticketDetails); 117 | var timercaptcha = setInterval(function(){ 118 | var value = captcha(); 119 | if(value != ""){ 120 | $('input[name="captchaImage"]').val(value); 121 | $('input[value="Go"]').click(); 122 | //clearInterval(timercaptcha); 123 | } 124 | },500); 125 | } 126 | else{ 127 | if($('#payButton').css('display') != 'none') 128 | $('input[value="Make Payment"]').click(); 129 | } 130 | } 131 | } 132 | 133 | //bookTicket(); -------------------------------------------------------------------------------- /js/captcha.js: -------------------------------------------------------------------------------- 1 | var flagcaptcha = true; 2 | function captcha(){ 3 | if(flagcaptcha){ 4 | document.getElementsByTagName('body')[0].insertAdjacentHTML('beforeend',''); 5 | var canvas = document.getElementById('myCanvas'); 6 | var ctx=canvas.getContext("2d"); 7 | ctx.rotate(-0.075); 8 | ctx.transform(1, 0, -0.4, 1, 0, 0); 9 | flagcaptcha = false; 10 | } 11 | var canvas = document.getElementById('myCanvas'); 12 | var ctx=canvas.getContext("2d"); 13 | var img=document.getElementById("divImagePath"); 14 | ctx.drawImage(img,-23,-13,130,50); 15 | 16 | // Read in pixel data 17 | var image = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height); 18 | 19 | // Convert to grayscale 20 | for (var x = 0; x < image.width; x++){ 21 | for (var y = 0; y < image.height; y++){ 22 | var i = x*4+y*4*image.width; 23 | var luma = Math.floor( 24 | image.data[i] * 299/1000 + 25 | image.data[i+1] * 587/1000 + 26 | image.data[i+2] * 114/1000 27 | //(image.data[i]+image.data[i+1]+image.data[i+2])/3 28 | ); 29 | image.data[i] = luma; 30 | image.data[i+1] = luma; 31 | image.data[i+2] = luma; 32 | image.data[i+3] = 255; 33 | } 34 | } 35 | // Cut into blocks 36 | var blocks = new Array(); 37 | var block_start = 0; 38 | var block_end = 0; 39 | var before_white = true; 40 | for (var x = 0; x < image.width; x++) { 41 | var white = true; 42 | var limit = 1; 43 | for (var y = 0; y < image.height; y++) { 44 | var i = x*4 + y*4*image.width 45 | var c = image.data[i]; 46 | if (c < 140) { 47 | limit--; 48 | if(limit < 0){ 49 | white = false; 50 | break; 51 | } 52 | } 53 | } 54 | if (before_white == true && white == false) { 55 | block_start = x; 56 | } 57 | if (before_white == false && white == true) { 58 | block_end = x - 1; 59 | var block = {start: block_start, end: block_end, image: {}, canvas: {}}; 60 | blocks.push(block); 61 | } 62 | before_white = white; 63 | } 64 | 65 | // Clone each block 66 | for (var w = 0; w < blocks.length; w++) { 67 | blocks[w].image.width = image.width; 68 | blocks[w].image.height = image.height; 69 | blocks[w].image.data = new Uint8ClampedArray(image.data.length); 70 | for (var i = 0; i < image.data.length; i++) { 71 | blocks[w].image.data[i] = image.data[i]; 72 | } 73 | } 74 | 75 | // Whiteout all other characters from each block 76 | for (var w = 0; w < blocks.length; w++) { 77 | for (var x = 0; x < image.width; x++) { 78 | if (x < blocks[w].start || x > blocks[w].end) { 79 | for (var y = 0; y < image.height; y++) { 80 | var i = x*4 + y*4*image.width 81 | blocks[w].image.data[i] = 255; 82 | blocks[w].image.data[i+1] = 255; 83 | blocks[w].image.data[i+2] = 255; 84 | } 85 | } 86 | } 87 | } 88 | // Crop each block, pad with whitespace to appropriate ratio, and resize to 60 x 50 89 | for (var w = 0; w < blocks.length; w++) { 90 | // We already have the x-boundaries, just need to find y-boundaries 91 | var y_min = 0; 92 | findmin: 93 | for (var y = 0; y < blocks[w].image.height; y++) { 94 | for (var x = 0; x < blocks[w].image.width; x++) { 95 | var i = x*4 + y*4*image.width 96 | if (blocks[w].image.data[i] < 200) { 97 | y_min = y; 98 | break findmin; 99 | } 100 | } 101 | } 102 | var y_max = 0; 103 | findmax: 104 | for (var y = blocks[w].image.height; y >= 0; y--) { 105 | for (var x = 0; x < blocks[w].image.width; x++) { 106 | var i = x*4 + y*4*image.width 107 | if (blocks[w].image.data[i] < 200) { 108 | y_max = y; 109 | break findmax; 110 | } 111 | } 112 | } 113 | 114 | // Pad and resize 115 | var cwidth = blocks[w].end - blocks[w].start + 1; 116 | var cheight = y_max - y_min + 1; 117 | var cratio = cwidth / cheight; 118 | 119 | var sx = blocks[w].start; 120 | var sy = y_min; 121 | var sw = blocks[w].end - blocks[w].start + 1; 122 | var sh = y_max - y_min + 1; 123 | 124 | var dimx = 15; 125 | var dimy = 18; 126 | var dimr = dimx / dimy; 127 | if ((cwidth / cheight) < dimr) { 128 | var dh = dimy; 129 | var dw = Math.round(cwidth * dimy / cheight); 130 | var dy = 0; 131 | var dx = Math.round((dimx - dw) / 2); 132 | } 133 | else if ((cwidth / cheight) > dimr) { 134 | var dw = dimx; 135 | var dh = Math.round(cheight * dimx / cwidth); 136 | var dx = 0; 137 | var dy = Math.round((dimy - dh) / 2); 138 | } 139 | else { 140 | var dh = dimy; 141 | var dw = dimx; 142 | var dy = 0; 143 | var dx = 0; 144 | } 145 | blocks[w].canvas = document.createElement('canvas'); 146 | blocks[w].canvas.width = dimx; 147 | blocks[w].canvas.height = dimy; 148 | blocks[w].canvas.style.margin = "0 1px 0 0"; 149 | blocks[w].canvas.getContext('2d').fillStyle="#ffffff"; 150 | blocks[w].canvas.getContext('2d').fillRect(0,0,dimx,dimy); 151 | blocks[w].canvas.getContext('2d').drawImage(canvas, sx, sy, sw, sh, dx, dy, dw, dh); 152 | /*document.getElementsByTagName('body')[0].appendChild(blocks[w].canvas); 153 | var data1 = blocks[w].canvas.getContext('2d').getImageData(0,0,blocks[w].canvas.width,blocks[w].canvas.height); 154 | var tempstr = ""; 155 | for(var z = 0;z < blocks[w].canvas.width*blocks[w].canvas.height*4;z += 4){ 156 | tempstr += data1.data[z]+","; 157 | } 158 | console.log(tempstr);*/ 159 | //console.log(blocks[w].canvas.getContext('2d').getImageData(0,0,blocks[w].canvas.width,blocks[w].canvas.height)); 160 | 161 | } 162 | 163 | // Create an image with all letters and numbers - "ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890" 164 | // Feed that image to the previous code thus far to get blocks of each character 165 | 166 | var code = ""; 167 | for (var w = 0; w < blocks.length; w++){ 168 | var minerror = 9876543210; 169 | var minchar = '?'; 170 | for (var k in characters){ 171 | var data1 = blocks[w].canvas.getContext('2d').getImageData(0,0,blocks[w].canvas.width,blocks[w].canvas.height); 172 | var temp = compare(data1.data, characters[k]); 173 | if(templabel{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top{position:static;margin-bottom:18px}.navbar-fixed-top .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /js/input.js: -------------------------------------------------------------------------------- 1 | //var elem = document.getElementById('submit'); 2 | //elem.addEventListener('click', saveform(), false); 3 | //elem.onclick(saveform()); 4 | 5 | var _gaq = _gaq || []; 6 | _gaq.push(['_setAccount', 'UA-43841023-1']); 7 | _gaq.push(['_trackPageview']); 8 | 9 | (function() { 10 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 11 | ga.src = 'https://ssl.google-analytics.com/ga.js'; 12 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 13 | })(); 14 | /* 15 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 16 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 17 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 18 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 19 | 20 | ga('create', 'UA-43841023-1', 'ticketmaster.com'); 21 | ga('send', 'pageview'); 22 | 23 | */ 24 | 25 | fields = 2; 26 | function addInput() { 27 | if (fields != 7) { 28 | document.getElementById('table').innerHTML += " "; 29 | fields += 1; 30 | document.getElementById('id').value=fields; 31 | } else { 32 | document.getElementById('add_button').disabled=true; 33 | } 34 | } 35 | 36 | function removeFormField(src) { 37 | if(fields > 1) { 38 | var row = $(src).parent().parent(); 39 | row.parent().removeChild(row); 40 | fields -= 1; 41 | document.getElementById('add_button').disabled=false; 42 | } 43 | } 44 | 45 | function updateDOM(inputField) { 46 | // if the inputField ID string has been passed in, get the inputField object 47 | if (typeof inputField == "string") { 48 | inputField = document.getElementById(inputField); 49 | } 50 | inputField.setAttribute("value",inputField.value); 51 | } 52 | 53 | function validate() { 54 | var myform = document.forms["form1"]; 55 | //formName being the name of the form 56 | for (i = 0; i < myform.length; i++) { 57 | inp= myform.elements[i]; 58 | if(inp.type=="text" || inp.type=="password") { 59 | if (inp.value.length == 0){ 60 | if (inp.name=="name[]") { 61 | alert("Please enter the name of guest"); 62 | } else if (inp.name=="age[]") { 63 | alert("Please enter the age of guest"); 64 | } else if (inp.name=="rel[]") { 65 | alert("Please enter the relationship with guest"); 66 | } else { 67 | alert("Please enter value in field : " + inp.name); 68 | } 69 | return false; 70 | } 71 | } 72 | } 73 | } 74 | 75 | function savedata(counter, callback) { 76 | var login_data = $('#login_data').serializeArray(); 77 | var ticket_data = $('#ticket_data').serializeArray(); 78 | var pass1 = $('#pass1').serializeArray(); 79 | var pass2 = $('#pass2').serializeArray(); 80 | var pass3 = $('#pass3').serializeArray(); 81 | var pass4 = $('#pass4').serializeArray(); 82 | var pass5 = $('#pass5').serializeArray(); 83 | var pass6 = $('#pass6').serializeArray(); 84 | 85 | var loginStr = 'ticket'+counter+'_login'; 86 | login_format_data = get_login_array(login_data); 87 | var ticketStr = "ticket"+counter+"_ticket"; 88 | ticket_format_data = get_ticket_array(ticket_data); 89 | var passStr = "ticket"+counter+"_pass"; 90 | pass_format_data = get_passenger_array(pass1, pass2, pass3, pass4, pass5, pass6); 91 | 92 | var data = {}; 93 | data[loginStr] = login_format_data; 94 | data[ticketStr] = ticket_format_data; 95 | data[passStr] = pass_format_data; 96 | 97 | chrome.storage.sync.set(data, function() { 98 | callback(); 99 | }); 100 | } 101 | 102 | function saveform() { 103 | function storedata(counter){ 104 | savedata(counter,function(){ 105 | chrome.storage.sync.get('tickets',function(data){ 106 | data['tickets'].push(counter); 107 | chrome.storage.sync.set({'tickets': data['tickets']}, function() { 108 | counter++; 109 | chrome.storage.sync.set({'ticketcounter': counter}, function() { 110 | alert("Ticket Saved with number : "+(counter-1)); 111 | window.location = "\index.html" 112 | }); 113 | }); 114 | }); 115 | }); 116 | } 117 | 118 | chrome.storage.sync.get('ticketcounter', function(counter) { 119 | if(counter['ticketcounter'] > 1) { 120 | chrome.storage.sync.get('tickets',function(data){ 121 | if(!$.isArray(data['tickets'])){ 122 | chrome.storage.sync.set({'tickets': new Array()}, function() { 123 | storedata(counter['ticketcounter']); 124 | }); 125 | } 126 | else{ 127 | storedata(counter['ticketcounter']); 128 | } 129 | }); 130 | } else { 131 | chrome.storage.sync.set({'ticketcounter': 1}, function() { 132 | counter = 1; 133 | chrome.storage.sync.get('tickets',function(data){ 134 | if(!$.isArray(data['tickets'])){ 135 | chrome.storage.sync.set({'tickets': new Array()}, function() { 136 | storedata(counter); 137 | }); 138 | } 139 | else{ 140 | storedata(counter); 141 | } 142 | }); 143 | }); 144 | } 145 | }); 146 | } 147 | 148 | function get_login_array(login_array) { 149 | username = login_array.shift(); 150 | password = login_array.shift(); 151 | var login_detail = { 152 | "username": username.value, 153 | "password": password.value 154 | } 155 | return login_detail; 156 | } 157 | 158 | function get_ticket_array(ticket_array) { 159 | source = parseStation(ticket_array.shift().value); 160 | board_point = parseStation(ticket_array.shift().value); 161 | destination = parseStation(ticket_array.shift().value); 162 | date = ticket_array.shift(); 163 | quota = ticket_array.shift(); 164 | trainNo = parseStation(ticket_array.shift().value); 165 | class1 = ticket_array.shift(); 166 | ticketType = ticket_array.shift(); 167 | var ticket_detail = { 168 | "source": source, 169 | "boarding_point": board_point, 170 | "destination": destination, 171 | "date": date.value, 172 | "quota": quota.value, 173 | "trainNo": trainNo, 174 | "class": class1.value, 175 | "ticketType": ticketType.value 176 | } 177 | return ticket_detail; 178 | } 179 | 180 | function parseStation(nameString) { 181 | var code = nameString.split(' : '); 182 | return code[0]; 183 | } 184 | 185 | function get_passenger_array(pass1, pass2, pass3, pass4, pass5, pass6) { 186 | pass1_json = get_passenger_json(pass1); 187 | pass2_json = get_passenger_json(pass2); 188 | pass3_json = get_passenger_json(pass3); 189 | pass4_json = get_passenger_json(pass4); 190 | pass5_json = get_passenger_json(pass5); 191 | pass6_json = get_passenger_json(pass6); 192 | var i = 1; 193 | var passengers = {}; 194 | if(pass1_json != null) { 195 | passengers[i] = pass1_json; 196 | i++; 197 | } 198 | if(pass2_json != null) { 199 | passengers[i] = pass2_json; 200 | i++; 201 | } 202 | if(pass3_json != null) { 203 | passengers[i] = pass3_json; 204 | i++; 205 | } 206 | if(pass4_json != null) { 207 | passengers[i] = pass4_json; 208 | i++; 209 | } 210 | if(pass5_json != null) { 211 | passengers[i] = pass5_json; 212 | i++; 213 | } 214 | if(pass6_json != null) { 215 | passengers[i] = pass6_json; 216 | i++; 217 | } 218 | passengers['mobileNumber'] = $("input[name='mobileNumber']").val(); 219 | /*var passengers = { 220 | 1: pass1_json, 221 | 2: pass2_json, 222 | 3: pass3_json, 223 | 4: pass4_json, 224 | 5: pass5_json, 225 | 6: pass6_json 226 | }*/ 227 | return passengers; 228 | } 229 | 230 | function get_passenger_json(pass) { 231 | passName = pass.shift(); 232 | if(passName.value != "") { 233 | sex = pass.shift(); 234 | age = pass.shift(); 235 | berth_preference = pass.shift(); 236 | food_preference = pass.shift(); 237 | idCardType = pass.shift(); 238 | idCardNo = pass.shift(); 239 | senior_citizen = pass.shift(); 240 | if(senior_citizen) { 241 | var ticket_detail = { 242 | "name": passName.value, 243 | "sex": sex.value, 244 | "age": age.value, 245 | "berth_preference": berth_preference.value, 246 | "food_preference" : food_preference.value, 247 | "senior_citizen": senior_citizen.value, 248 | "idCardType": idCardType.value, 249 | "idCardNo": idCardNo.value 250 | } 251 | } else { 252 | var ticket_detail = { 253 | "name": passName.value, 254 | "sex": sex.value, 255 | "age": age.value, 256 | "berth_preference": berth_preference.value, 257 | "food_preference" : food_preference.value, 258 | "senior_citizen": "off", 259 | "idCardType": idCardType.value, 260 | "idCardNo": idCardNo.value 261 | } 262 | } 263 | return ticket_detail; 264 | } else { 265 | return null; 266 | } 267 | } 268 | 269 | function fillForm(counter){ 270 | var loginStr = 'ticket'+counter+'_login'; 271 | var ticketStr = "ticket"+counter+"_ticket"; 272 | var passStr = "ticket"+counter+"_pass"; 273 | var keys = [loginStr,ticketStr,passStr]; 274 | chrome.storage.sync.get(keys, function(login_data) { 275 | //console.log(login_data); 276 | user = login_data[loginStr]; 277 | ticketdetail = login_data[ticketStr]; 278 | passdetail = login_data[passStr]; 279 | $("#login_data #username").val(user['username']); 280 | $("#login_data #password").val(user['password']); 281 | $("#ticket_data #src").val(ticketdetail['source']); 282 | $("#ticket_data #dest").val(ticketdetail['destination']); 283 | $("#ticket_data #brdp").val(ticketdetail['boarding_point']); 284 | $("#ticket_data #book_date").val(ticketdetail['date']); 285 | $("#ticket_data #quota").val(ticketdetail['quota']); 286 | $("#ticket_data #trainNo").val(ticketdetail['trainNo']); 287 | $("#ticket_data #class").val(ticketdetail['class']); 288 | $("#ticket_data #ticketType").val(ticketdetail['ticketType']); 289 | for(var i in passdetail){ 290 | if($.isNumeric(i)){ 291 | $("#row"+i+" input[name='name']").val(passdetail[i]['name']); 292 | $("#row"+i+" input[name='age']").val(passdetail[i]['age']); 293 | $("#row"+i+" select[name='gender']").val(passdetail[i]['sex']); 294 | $("#row"+i+" select[name='berth']").val(passdetail[i]['berth_preference']); 295 | $("#row"+i+" select[name='food']").val(passdetail[i]['food_preference']); 296 | $("#row"+i+" select[name='idCardType']").val(passdetail[i]['idCardType']); 297 | $("#row"+i+" input[name='idCardNo']").val(passdetail[i]['idCardNo']); 298 | $("#row"+i+" input[name='senior']").prop('checked', (passdetail[i]['senior_citizen'] == "off")?false:true); 299 | } 300 | } 301 | $("input[name='mobileNumber']").val(passdetail['mobileNumber']); 302 | }); 303 | } 304 | 305 | $(function() { 306 | $("#book_date").datepicker({ 307 | changeMonth: true, 308 | changeYear: true, 309 | dateFormat: 'dd/m/yy', 310 | minDate: 0 311 | }); 312 | }); 313 | 314 | $(document).ready(function() { 315 | var counter = null; 316 | if(document.URL.match(/edit=([^&]+)/)) 317 | counter = document.URL.match(/edit=([^&]+)/)[1]; 318 | if(counter != null) 319 | fillForm(counter); 320 | $("#submit").click(function(){ 321 | if(counter == null){ 322 | saveform(); 323 | } 324 | else{ 325 | savedata(counter,function(){alert("Ticket updated successfully");}); 326 | } 327 | }); 328 | $("#submit1").click(function(){ 329 | if(counter == null) 330 | saveform(); 331 | else{ 332 | savedata(counter,function(){alert("Ticket updated successfully");}); 333 | } 334 | }); 335 | //$("#add_button").click(function() {addInput();}); 336 | //$(".remove_button").click(function() {removeFormField(this);}); 337 | }); 338 | -------------------------------------------------------------------------------- /css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.3 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | .clearfix { 12 | *zoom: 1; 13 | } 14 | 15 | .clearfix:before, 16 | .clearfix:after { 17 | display: table; 18 | content: ""; 19 | } 20 | 21 | .clearfix:after { 22 | clear: both; 23 | } 24 | 25 | .hide-text { 26 | font: 0/0 a; 27 | color: transparent; 28 | text-shadow: none; 29 | background-color: transparent; 30 | border: 0; 31 | } 32 | 33 | .input-block-level { 34 | display: block; 35 | width: 100%; 36 | min-height: 28px; 37 | -webkit-box-sizing: border-box; 38 | -moz-box-sizing: border-box; 39 | -ms-box-sizing: border-box; 40 | box-sizing: border-box; 41 | } 42 | 43 | .hidden { 44 | display: none; 45 | visibility: hidden; 46 | } 47 | 48 | .visible-phone { 49 | display: none !important; 50 | } 51 | 52 | .visible-tablet { 53 | display: none !important; 54 | } 55 | 56 | .hidden-desktop { 57 | display: none !important; 58 | } 59 | 60 | @media (max-width: 767px) { 61 | .visible-phone { 62 | display: inherit !important; 63 | } 64 | .hidden-phone { 65 | display: none !important; 66 | } 67 | .hidden-desktop { 68 | display: inherit !important; 69 | } 70 | .visible-desktop { 71 | display: none !important; 72 | } 73 | } 74 | 75 | @media (min-width: 768px) and (max-width: 979px) { 76 | .visible-tablet { 77 | display: inherit !important; 78 | } 79 | .hidden-tablet { 80 | display: none !important; 81 | } 82 | .hidden-desktop { 83 | display: inherit !important; 84 | } 85 | .visible-desktop { 86 | display: none !important ; 87 | } 88 | } 89 | 90 | @media (max-width: 480px) { 91 | .nav-collapse { 92 | -webkit-transform: translate3d(0, 0, 0); 93 | } 94 | .page-header h1 small { 95 | display: block; 96 | line-height: 18px; 97 | } 98 | input[type="checkbox"], 99 | input[type="radio"] { 100 | border: 1px solid #ccc; 101 | } 102 | .form-horizontal .control-group > label { 103 | float: none; 104 | width: auto; 105 | padding-top: 0; 106 | text-align: left; 107 | } 108 | .form-horizontal .controls { 109 | margin-left: 0; 110 | } 111 | .form-horizontal .control-list { 112 | padding-top: 0; 113 | } 114 | .form-horizontal .form-actions { 115 | padding-right: 10px; 116 | padding-left: 10px; 117 | } 118 | .modal { 119 | position: absolute; 120 | top: 10px; 121 | right: 10px; 122 | left: 10px; 123 | width: auto; 124 | margin: 0; 125 | } 126 | .modal.fade.in { 127 | top: auto; 128 | } 129 | .modal-header .close { 130 | padding: 10px; 131 | margin: -10px; 132 | } 133 | .carousel-caption { 134 | position: static; 135 | } 136 | } 137 | 138 | @media (max-width: 767px) { 139 | body { 140 | padding-right: 20px; 141 | padding-left: 20px; 142 | } 143 | .navbar-fixed-top, 144 | .navbar-fixed-bottom { 145 | margin-right: -20px; 146 | margin-left: -20px; 147 | } 148 | .container-fluid { 149 | padding: 0; 150 | } 151 | .dl-horizontal dt { 152 | float: none; 153 | width: auto; 154 | clear: none; 155 | text-align: left; 156 | } 157 | .dl-horizontal dd { 158 | margin-left: 0; 159 | } 160 | .container { 161 | width: auto; 162 | } 163 | .row-fluid { 164 | width: 100%; 165 | } 166 | .row, 167 | .thumbnails { 168 | margin-left: 0; 169 | } 170 | [class*="span"], 171 | .row-fluid [class*="span"] { 172 | display: block; 173 | float: none; 174 | width: auto; 175 | margin-left: 0; 176 | } 177 | .input-large, 178 | .input-xlarge, 179 | .input-xxlarge, 180 | input[class*="span"], 181 | select[class*="span"], 182 | textarea[class*="span"], 183 | .uneditable-input { 184 | display: block; 185 | width: 100%; 186 | min-height: 28px; 187 | -webkit-box-sizing: border-box; 188 | -moz-box-sizing: border-box; 189 | -ms-box-sizing: border-box; 190 | box-sizing: border-box; 191 | } 192 | .input-prepend input, 193 | .input-append input, 194 | .input-prepend input[class*="span"], 195 | .input-append input[class*="span"] { 196 | display: inline-block; 197 | width: auto; 198 | } 199 | } 200 | 201 | @media (min-width: 768px) and (max-width: 979px) { 202 | .row { 203 | margin-left: -20px; 204 | *zoom: 1; 205 | } 206 | .row:before, 207 | .row:after { 208 | display: table; 209 | content: ""; 210 | } 211 | .row:after { 212 | clear: both; 213 | } 214 | [class*="span"] { 215 | float: left; 216 | margin-left: 20px; 217 | } 218 | .container, 219 | .navbar-fixed-top .container, 220 | .navbar-fixed-bottom .container { 221 | width: 724px; 222 | } 223 | .span12 { 224 | width: 724px; 225 | } 226 | .span11 { 227 | width: 662px; 228 | } 229 | .span10 { 230 | width: 600px; 231 | } 232 | .span9 { 233 | width: 538px; 234 | } 235 | .span8 { 236 | width: 476px; 237 | } 238 | .span7 { 239 | width: 414px; 240 | } 241 | .span6 { 242 | width: 352px; 243 | } 244 | .span5 { 245 | width: 290px; 246 | } 247 | .span4 { 248 | width: 228px; 249 | } 250 | .span3 { 251 | width: 166px; 252 | } 253 | .span2 { 254 | width: 104px; 255 | } 256 | .span1 { 257 | width: 42px; 258 | } 259 | .offset12 { 260 | margin-left: 764px; 261 | } 262 | .offset11 { 263 | margin-left: 702px; 264 | } 265 | .offset10 { 266 | margin-left: 640px; 267 | } 268 | .offset9 { 269 | margin-left: 578px; 270 | } 271 | .offset8 { 272 | margin-left: 516px; 273 | } 274 | .offset7 { 275 | margin-left: 454px; 276 | } 277 | .offset6 { 278 | margin-left: 392px; 279 | } 280 | .offset5 { 281 | margin-left: 330px; 282 | } 283 | .offset4 { 284 | margin-left: 268px; 285 | } 286 | .offset3 { 287 | margin-left: 206px; 288 | } 289 | .offset2 { 290 | margin-left: 144px; 291 | } 292 | .offset1 { 293 | margin-left: 82px; 294 | } 295 | .row-fluid { 296 | width: 100%; 297 | *zoom: 1; 298 | } 299 | .row-fluid:before, 300 | .row-fluid:after { 301 | display: table; 302 | content: ""; 303 | } 304 | .row-fluid:after { 305 | clear: both; 306 | } 307 | .row-fluid [class*="span"] { 308 | display: block; 309 | float: left; 310 | width: 100%; 311 | min-height: 28px; 312 | margin-left: 2.762430939%; 313 | *margin-left: 2.709239449638298%; 314 | -webkit-box-sizing: border-box; 315 | -moz-box-sizing: border-box; 316 | -ms-box-sizing: border-box; 317 | box-sizing: border-box; 318 | } 319 | .row-fluid [class*="span"]:first-child { 320 | margin-left: 0; 321 | } 322 | .row-fluid .span12 { 323 | width: 99.999999993%; 324 | *width: 99.9468085036383%; 325 | } 326 | .row-fluid .span11 { 327 | width: 91.436464082%; 328 | *width: 91.38327259263829%; 329 | } 330 | .row-fluid .span10 { 331 | width: 82.87292817100001%; 332 | *width: 82.8197366816383%; 333 | } 334 | .row-fluid .span9 { 335 | width: 74.30939226%; 336 | *width: 74.25620077063829%; 337 | } 338 | .row-fluid .span8 { 339 | width: 65.74585634900001%; 340 | *width: 65.6926648596383%; 341 | } 342 | .row-fluid .span7 { 343 | width: 57.182320438000005%; 344 | *width: 57.129128948638304%; 345 | } 346 | .row-fluid .span6 { 347 | width: 48.618784527%; 348 | *width: 48.5655930376383%; 349 | } 350 | .row-fluid .span5 { 351 | width: 40.055248616%; 352 | *width: 40.0020571266383%; 353 | } 354 | .row-fluid .span4 { 355 | width: 31.491712705%; 356 | *width: 31.4385212156383%; 357 | } 358 | .row-fluid .span3 { 359 | width: 22.928176794%; 360 | *width: 22.874985304638297%; 361 | } 362 | .row-fluid .span2 { 363 | width: 14.364640883%; 364 | *width: 14.311449393638298%; 365 | } 366 | .row-fluid .span1 { 367 | width: 5.801104972%; 368 | *width: 5.747913482638298%; 369 | } 370 | input, 371 | textarea, 372 | .uneditable-input { 373 | margin-left: 0; 374 | } 375 | input.span12, 376 | textarea.span12, 377 | .uneditable-input.span12 { 378 | width: 714px; 379 | } 380 | input.span11, 381 | textarea.span11, 382 | .uneditable-input.span11 { 383 | width: 652px; 384 | } 385 | input.span10, 386 | textarea.span10, 387 | .uneditable-input.span10 { 388 | width: 590px; 389 | } 390 | input.span9, 391 | textarea.span9, 392 | .uneditable-input.span9 { 393 | width: 528px; 394 | } 395 | input.span8, 396 | textarea.span8, 397 | .uneditable-input.span8 { 398 | width: 466px; 399 | } 400 | input.span7, 401 | textarea.span7, 402 | .uneditable-input.span7 { 403 | width: 404px; 404 | } 405 | input.span6, 406 | textarea.span6, 407 | .uneditable-input.span6 { 408 | width: 342px; 409 | } 410 | input.span5, 411 | textarea.span5, 412 | .uneditable-input.span5 { 413 | width: 280px; 414 | } 415 | input.span4, 416 | textarea.span4, 417 | .uneditable-input.span4 { 418 | width: 218px; 419 | } 420 | input.span3, 421 | textarea.span3, 422 | .uneditable-input.span3 { 423 | width: 156px; 424 | } 425 | input.span2, 426 | textarea.span2, 427 | .uneditable-input.span2 { 428 | width: 94px; 429 | } 430 | input.span1, 431 | textarea.span1, 432 | .uneditable-input.span1 { 433 | width: 32px; 434 | } 435 | } 436 | 437 | @media (min-width: 1200px) { 438 | .row { 439 | margin-left: -30px; 440 | *zoom: 1; 441 | } 442 | .row:before, 443 | .row:after { 444 | display: table; 445 | content: ""; 446 | } 447 | .row:after { 448 | clear: both; 449 | } 450 | [class*="span"] { 451 | float: left; 452 | margin-left: 30px; 453 | } 454 | .container, 455 | .navbar-fixed-top .container, 456 | .navbar-fixed-bottom .container { 457 | width: 1170px; 458 | } 459 | .span12 { 460 | width: 1170px; 461 | } 462 | .span11 { 463 | width: 1070px; 464 | } 465 | .span10 { 466 | width: 970px; 467 | } 468 | .span9 { 469 | width: 870px; 470 | } 471 | .span8 { 472 | width: 770px; 473 | } 474 | .span7 { 475 | width: 670px; 476 | } 477 | .span6 { 478 | width: 570px; 479 | } 480 | .span5 { 481 | width: 470px; 482 | } 483 | .span4 { 484 | width: 370px; 485 | } 486 | .span3 { 487 | width: 270px; 488 | } 489 | .span2 { 490 | width: 170px; 491 | } 492 | .span1 { 493 | width: 70px; 494 | } 495 | .offset12 { 496 | margin-left: 1230px; 497 | } 498 | .offset11 { 499 | margin-left: 1130px; 500 | } 501 | .offset10 { 502 | margin-left: 1030px; 503 | } 504 | .offset9 { 505 | margin-left: 930px; 506 | } 507 | .offset8 { 508 | margin-left: 830px; 509 | } 510 | .offset7 { 511 | margin-left: 730px; 512 | } 513 | .offset6 { 514 | margin-left: 630px; 515 | } 516 | .offset5 { 517 | margin-left: 530px; 518 | } 519 | .offset4 { 520 | margin-left: 430px; 521 | } 522 | .offset3 { 523 | margin-left: 330px; 524 | } 525 | .offset2 { 526 | margin-left: 230px; 527 | } 528 | .offset1 { 529 | margin-left: 130px; 530 | } 531 | .row-fluid { 532 | width: 100%; 533 | *zoom: 1; 534 | } 535 | .row-fluid:before, 536 | .row-fluid:after { 537 | display: table; 538 | content: ""; 539 | } 540 | .row-fluid:after { 541 | clear: both; 542 | } 543 | .row-fluid [class*="span"] { 544 | display: block; 545 | float: left; 546 | width: 100%; 547 | min-height: 28px; 548 | margin-left: 2.564102564%; 549 | *margin-left: 2.510911074638298%; 550 | -webkit-box-sizing: border-box; 551 | -moz-box-sizing: border-box; 552 | -ms-box-sizing: border-box; 553 | box-sizing: border-box; 554 | } 555 | .row-fluid [class*="span"]:first-child { 556 | margin-left: 0; 557 | } 558 | .row-fluid .span12 { 559 | width: 100%; 560 | *width: 99.94680851063829%; 561 | } 562 | .row-fluid .span11 { 563 | width: 91.45299145300001%; 564 | *width: 91.3997999636383%; 565 | } 566 | .row-fluid .span10 { 567 | width: 82.905982906%; 568 | *width: 82.8527914166383%; 569 | } 570 | .row-fluid .span9 { 571 | width: 74.358974359%; 572 | *width: 74.30578286963829%; 573 | } 574 | .row-fluid .span8 { 575 | width: 65.81196581200001%; 576 | *width: 65.7587743226383%; 577 | } 578 | .row-fluid .span7 { 579 | width: 57.264957265%; 580 | *width: 57.2117657756383%; 581 | } 582 | .row-fluid .span6 { 583 | width: 48.717948718%; 584 | *width: 48.6647572286383%; 585 | } 586 | .row-fluid .span5 { 587 | width: 40.170940171000005%; 588 | *width: 40.117748681638304%; 589 | } 590 | .row-fluid .span4 { 591 | width: 31.623931624%; 592 | *width: 31.5707401346383%; 593 | } 594 | .row-fluid .span3 { 595 | width: 23.076923077%; 596 | *width: 23.0237315876383%; 597 | } 598 | .row-fluid .span2 { 599 | width: 14.529914530000001%; 600 | *width: 14.4767230406383%; 601 | } 602 | .row-fluid .span1 { 603 | width: 5.982905983%; 604 | *width: 5.929714493638298%; 605 | } 606 | input, 607 | textarea, 608 | .uneditable-input { 609 | margin-left: 0; 610 | } 611 | input.span12, 612 | textarea.span12, 613 | .uneditable-input.span12 { 614 | width: 1160px; 615 | } 616 | input.span11, 617 | textarea.span11, 618 | .uneditable-input.span11 { 619 | width: 1060px; 620 | } 621 | input.span10, 622 | textarea.span10, 623 | .uneditable-input.span10 { 624 | width: 960px; 625 | } 626 | input.span9, 627 | textarea.span9, 628 | .uneditable-input.span9 { 629 | width: 860px; 630 | } 631 | input.span8, 632 | textarea.span8, 633 | .uneditable-input.span8 { 634 | width: 760px; 635 | } 636 | input.span7, 637 | textarea.span7, 638 | .uneditable-input.span7 { 639 | width: 660px; 640 | } 641 | input.span6, 642 | textarea.span6, 643 | .uneditable-input.span6 { 644 | width: 560px; 645 | } 646 | input.span5, 647 | textarea.span5, 648 | .uneditable-input.span5 { 649 | width: 460px; 650 | } 651 | input.span4, 652 | textarea.span4, 653 | .uneditable-input.span4 { 654 | width: 360px; 655 | } 656 | input.span3, 657 | textarea.span3, 658 | .uneditable-input.span3 { 659 | width: 260px; 660 | } 661 | input.span2, 662 | textarea.span2, 663 | .uneditable-input.span2 { 664 | width: 160px; 665 | } 666 | input.span1, 667 | textarea.span1, 668 | .uneditable-input.span1 { 669 | width: 60px; 670 | } 671 | .thumbnails { 672 | margin-left: -30px; 673 | } 674 | .thumbnails > li { 675 | margin-left: 30px; 676 | } 677 | .row-fluid .thumbnails { 678 | margin-left: 0; 679 | } 680 | } 681 | 682 | @media (max-width: 979px) { 683 | body { 684 | padding-top: 0; 685 | } 686 | .navbar-fixed-top { 687 | position: static; 688 | margin-bottom: 18px; 689 | } 690 | .navbar-fixed-top .navbar-inner { 691 | padding: 5px; 692 | } 693 | .navbar .container { 694 | width: auto; 695 | padding: 0; 696 | } 697 | .navbar .brand { 698 | padding-right: 10px; 699 | padding-left: 10px; 700 | margin: 0 0 0 -5px; 701 | } 702 | .nav-collapse { 703 | clear: both; 704 | } 705 | .nav-collapse .nav { 706 | float: none; 707 | margin: 0 0 9px; 708 | } 709 | .nav-collapse .nav > li { 710 | float: none; 711 | } 712 | .nav-collapse .nav > li > a { 713 | margin-bottom: 2px; 714 | } 715 | .nav-collapse .nav > .divider-vertical { 716 | display: none; 717 | } 718 | .nav-collapse .nav .nav-header { 719 | color: #999999; 720 | text-shadow: none; 721 | } 722 | .nav-collapse .nav > li > a, 723 | .nav-collapse .dropdown-menu a { 724 | padding: 6px 15px; 725 | font-weight: bold; 726 | color: #999999; 727 | -webkit-border-radius: 3px; 728 | -moz-border-radius: 3px; 729 | border-radius: 3px; 730 | } 731 | .nav-collapse .btn { 732 | padding: 4px 10px 4px; 733 | font-weight: normal; 734 | -webkit-border-radius: 4px; 735 | -moz-border-radius: 4px; 736 | border-radius: 4px; 737 | } 738 | .nav-collapse .dropdown-menu li + li a { 739 | margin-bottom: 2px; 740 | } 741 | .nav-collapse .nav > li > a:hover, 742 | .nav-collapse .dropdown-menu a:hover { 743 | background-color: #222222; 744 | } 745 | .nav-collapse.in .btn-group { 746 | padding: 0; 747 | margin-top: 5px; 748 | } 749 | .nav-collapse .dropdown-menu { 750 | position: static; 751 | top: auto; 752 | left: auto; 753 | display: block; 754 | float: none; 755 | max-width: none; 756 | padding: 0; 757 | margin: 0 15px; 758 | background-color: transparent; 759 | border: none; 760 | -webkit-border-radius: 0; 761 | -moz-border-radius: 0; 762 | border-radius: 0; 763 | -webkit-box-shadow: none; 764 | -moz-box-shadow: none; 765 | box-shadow: none; 766 | } 767 | .nav-collapse .dropdown-menu:before, 768 | .nav-collapse .dropdown-menu:after { 769 | display: none; 770 | } 771 | .nav-collapse .dropdown-menu .divider { 772 | display: none; 773 | } 774 | .nav-collapse .navbar-form, 775 | .nav-collapse .navbar-search { 776 | float: none; 777 | padding: 9px 15px; 778 | margin: 9px 0; 779 | border-top: 1px solid #222222; 780 | border-bottom: 1px solid #222222; 781 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 782 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 783 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 784 | } 785 | .navbar .nav-collapse .nav.pull-right { 786 | float: none; 787 | margin-left: 0; 788 | } 789 | .nav-collapse, 790 | .nav-collapse.collapse { 791 | height: 0; 792 | overflow: hidden; 793 | } 794 | .navbar .btn-navbar { 795 | display: block; 796 | } 797 | .navbar-static .navbar-inner { 798 | padding-right: 10px; 799 | padding-left: 10px; 800 | } 801 | } 802 | 803 | @media (min-width: 980px) { 804 | .nav-collapse.collapse { 805 | height: auto !important; 806 | overflow: visible !important; 807 | } 808 | } 809 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ticket Master 5 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 41 |
42 | 43 |
44 |

Irctc Login Details

45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Username
Password
55 |
56 |
57 |
58 |

Train Details

59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 100 | 101 | 102 | 103 | 107 | 108 |
Source
Boarding Point
Destination
Date
Quota
Train Number
Class
Ticket Type
109 |
110 |
111 |

Passenger Details

112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 131 | 132 | 142 | 148 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 173 | 174 | 184 | 190 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 215 | 216 | 226 | 232 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 257 | 258 | 268 | 274 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 299 | 300 | 310 | 316 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 341 | 342 | 352 | 358 | 371 | 372 | 373 | 374 | 375 |
Name Gender Age Berth Preference Food Preference ID Card Type ID Card No. Senior Citizen
130 | 141 | 143 | 147 | 160 |
172 | 183 | 185 | 189 | 202 |
214 | 225 | 227 | 231 | 244 |
256 | 267 | 269 | 273 | 286 |
298 | 309 | 311 | 315 | 328 |
340 | 351 | 353 | 357 | 370 |
376 |
377 | Mobile Number 378 |
379 | 380 |

 

381 |
382 | 383 | 384 | 385 | -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(a){a(function(){"use strict",a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(a){return a||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j=a.Event("slide");this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c);e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e,f,g;if(c.is(".disabled, :disabled"))return;return f=c.attr("data-target"),f||(f=c.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),e=a(f),e.length||(e=c.parent()),g=e.hasClass("open"),d(),g||e.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('