├── saves └── .gitignore ├── .DS_Store ├── temp └── .DS_Store ├── screenshot ├── full.png ├── result.png └── text.png ├── Demo_Webpage ├── .DS_Store ├── static │ ├── .DS_Store │ ├── favicon.png │ ├── img │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── .DS_Store │ │ ├── demo.png │ │ ├── lake.jpg │ │ ├── text.png │ │ ├── Artboard.png │ │ ├── char │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 16.png │ │ │ ├── 17.png │ │ │ ├── 18.png │ │ │ ├── 19.png │ │ │ ├── 2.png │ │ │ ├── 20.png │ │ │ ├── 21.png │ │ │ ├── 22.png │ │ │ ├── 23.png │ │ │ ├── 24.png │ │ │ ├── 25.png │ │ │ ├── 26.png │ │ │ ├── 27.png │ │ │ ├── 28.png │ │ │ ├── 29.png │ │ │ ├── 3.png │ │ │ ├── 30.png │ │ │ ├── 31.png │ │ │ ├── 32.png │ │ │ ├── 33.png │ │ │ ├── 34.png │ │ │ ├── 35.png │ │ │ ├── 36.png │ │ │ ├── 37.png │ │ │ ├── 38.png │ │ │ ├── 39.png │ │ │ ├── 4.png │ │ │ ├── 40.png │ │ │ ├── 41.png │ │ │ ├── 42.png │ │ │ ├── 43.png │ │ │ ├── 44.png │ │ │ ├── 45.png │ │ │ ├── 46.png │ │ │ ├── 47.png │ │ │ ├── 48.png │ │ │ ├── 49.png │ │ │ ├── 5.png │ │ │ ├── 50.png │ │ │ ├── 51.png │ │ │ ├── 52.png │ │ │ ├── 53.png │ │ │ ├── 54.png │ │ │ ├── 55.png │ │ │ ├── 56.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 59.png │ │ │ ├── 6.png │ │ │ ├── 60.png │ │ │ ├── 61.png │ │ │ ├── 62.png │ │ │ ├── 63.png │ │ │ ├── 64.png │ │ │ ├── 65.png │ │ │ ├── 66.png │ │ │ ├── 67.png │ │ │ ├── 68.png │ │ │ ├── 69.png │ │ │ ├── 7.png │ │ │ ├── 70.png │ │ │ ├── 71.png │ │ │ ├── 72.png │ │ │ ├── 73.png │ │ │ ├── 74.png │ │ │ ├── 75.png │ │ │ ├── 76.png │ │ │ ├── 77.png │ │ │ ├── 78.png │ │ │ ├── 79.png │ │ │ ├── 8.png │ │ │ ├── 80.png │ │ │ ├── 81.png │ │ │ ├── 82.png │ │ │ ├── 83.png │ │ │ ├── 84.png │ │ │ ├── 85.png │ │ │ ├── 86.png │ │ │ ├── 87.png │ │ │ ├── 88.png │ │ │ ├── 89.png │ │ │ ├── 9.png │ │ │ ├── 90.png │ │ │ ├── 91.png │ │ │ ├── 92.png │ │ │ ├── 93.png │ │ │ ├── 94.png │ │ │ ├── 95.png │ │ │ ├── 96.png │ │ │ ├── 97.png │ │ │ ├── 98.png │ │ │ ├── 99.png │ │ │ └── file.txt │ │ ├── result.png │ │ ├── lazyload-ph.png │ │ ├── pageload-spinner.gif │ │ ├── placeholder-image.png │ │ ├── blocs-logo-wo.svg │ │ └── file.txt │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── feather-webfont.eot │ │ ├── feather-webfont.ttf │ │ ├── feather-webfont.woff │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── css │ │ ├── feather.min.css │ │ ├── style.css │ │ └── font-awesome.min.css │ └── js │ │ ├── lazysizes.min.js │ │ ├── blocs.min.js │ │ └── bootstrap.min.js ├── __pycache__ │ └── client.cpython-36.pyc ├── client.py └── templates │ ├── character.html │ └── index.html ├── model ├── __pycache__ │ ├── densenet.cpython-36.pyc │ ├── subpixel.cpython-36.pyc │ ├── model_saver.cpython-36.pyc │ └── tensorflow_backend.cpython-36.pyc ├── tensorflow_backend.py ├── model_saver.py └── subpixel.py ├── requirements.txt ├── translate.py ├── README.md ├── GoogleLens.py ├── labels.txt ├── demo.py ├── train.py └── utils.py /saves/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/.DS_Store -------------------------------------------------------------------------------- /temp/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/temp/.DS_Store -------------------------------------------------------------------------------- /screenshot/full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/screenshot/full.png -------------------------------------------------------------------------------- /screenshot/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/screenshot/result.png -------------------------------------------------------------------------------- /screenshot/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/screenshot/text.png -------------------------------------------------------------------------------- /Demo_Webpage/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/.DS_Store -------------------------------------------------------------------------------- /Demo_Webpage/static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/.DS_Store -------------------------------------------------------------------------------- /Demo_Webpage/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/favicon.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/0.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/1.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/2.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/3.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/4.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/5.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/6.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/7.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/.DS_Store -------------------------------------------------------------------------------- /Demo_Webpage/static/img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/demo.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/lake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/lake.jpg -------------------------------------------------------------------------------- /Demo_Webpage/static/img/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/text.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/Artboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/Artboard.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/0.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/1.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/10.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/11.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/12.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/13.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/14.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/15.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/16.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/17.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/18.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/19.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/2.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/20.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/21.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/22.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/23.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/24.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/25.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/26.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/27.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/28.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/29.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/3.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/30.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/31.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/32.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/33.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/34.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/35.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/36.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/37.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/38.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/39.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/4.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/40.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/41.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/42.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/43.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/44.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/45.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/46.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/47.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/48.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/49.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/5.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/50.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/51.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/52.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/53.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/54.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/55.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/56.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/57.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/58.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/59.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/59.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/6.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/60.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/61.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/61.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/62.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/62.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/63.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/64.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/65.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/66.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/66.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/67.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/67.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/68.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/68.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/69.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/69.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/7.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/70.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/71.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/71.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/72.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/73.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/73.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/74.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/74.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/75.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/76.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/77.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/78.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/78.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/79.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/79.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/8.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/80.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/81.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/81.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/82.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/82.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/83.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/83.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/84.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/85.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/85.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/86.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/87.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/88.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/89.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/89.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/9.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/90.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/91.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/92.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/92.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/93.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/93.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/94.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/94.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/95.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/95.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/96.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/97.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/97.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/98.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/99.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/char/99.png -------------------------------------------------------------------------------- /Demo_Webpage/static/img/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/result.png -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /Demo_Webpage/static/img/lazyload-ph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/lazyload-ph.png -------------------------------------------------------------------------------- /model/__pycache__/densenet.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/model/__pycache__/densenet.cpython-36.pyc -------------------------------------------------------------------------------- /model/__pycache__/subpixel.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/model/__pycache__/subpixel.cpython-36.pyc -------------------------------------------------------------------------------- /Demo_Webpage/__pycache__/client.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/__pycache__/client.cpython-36.pyc -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/feather-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/feather-webfont.eot -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/feather-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/feather-webfont.ttf -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/feather-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/feather-webfont.woff -------------------------------------------------------------------------------- /Demo_Webpage/static/img/pageload-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/pageload-spinner.gif -------------------------------------------------------------------------------- /Demo_Webpage/static/img/placeholder-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/img/placeholder-image.png -------------------------------------------------------------------------------- /model/__pycache__/model_saver.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/model/__pycache__/model_saver.cpython-36.pyc -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /Demo_Webpage/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/Demo_Webpage/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /model/__pycache__/tensorflow_backend.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lmcmz/12306-Captcha-Crack/HEAD/model/__pycache__/tensorflow_backend.cpython-36.pyc -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy==1.14.2 2 | tensorflow==1.7.0 3 | requests==2.18.4 4 | Keras==2.1.5 5 | opencv_contrib_python==3.4.0.12 6 | Flask==0.12.2 7 | Flask_RESTful==0.3.6 8 | fuzzywuzzy==0.16.0 9 | Pillow==5.2.0 10 | protobuf==3.6.1 11 | model==0.6.0 12 | -------------------------------------------------------------------------------- /translate.py: -------------------------------------------------------------------------------- 1 | import requests,json 2 | 3 | base_url = "https://translation.googleapis.com/language/translate/v2/" 4 | api_key= "YOUR—GOOGLE-API-KEY" 5 | 6 | 7 | def translate(text, source="zh", target="en"): 8 | params = {'key': api_key} 9 | data = { 10 | 'q': text, 11 | 'source': source, 12 | 'target': target, 13 | 'format': 'text' 14 | } 15 | response = requests.post(base_url, params=params, data=data) 16 | json_data = json.loads(response.text) 17 | return json_data['data']['translations'][0]['translatedText'] 18 | 19 | 20 | #translate('风铃 | 风铃 | 创可贴 | 创可贴 | 红枣 | 中国结 | 红豆 | 烛台 ') 21 | -------------------------------------------------------------------------------- /model/tensorflow_backend.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | 3 | from keras.backend import tensorflow_backend as KTF 4 | from keras.backend.common import image_data_format 5 | 6 | py_all = all 7 | 8 | def depth_to_space(input, scale, data_format=None): 9 | ''' Uses phase shift algorithm to convert channels/depth for spatial resolution ''' 10 | if data_format is None: 11 | data_format = image_data_format() 12 | 13 | if data_format == 'channels_first': 14 | data_format = 'NCHW' 15 | else: 16 | data_format = 'NHWC' 17 | 18 | data_format = data_format.lower() 19 | out = tf.depth_to_space(input, scale, data_format=data_format) 20 | return out -------------------------------------------------------------------------------- /Demo_Webpage/static/img/blocs-logo-wo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Demo_Webpage/static/img/file.txt: -------------------------------------------------------------------------------- 1 | { 2 | "text_label": "订书机", 3 | "text_label_en": "Stapler", 4 | "label": { 5 | "0": { 6 | "cn": "锦旗", 7 | "en": "Banner" 8 | }, 9 | "1": { 10 | "cn": "风铃", 11 | "en": "Wind Bell" 12 | }, 13 | "2": { 14 | "cn": "锦旗", 15 | "en": "Banner" 16 | }, 17 | "3": { 18 | "cn": "茶盅", 19 | "en": "Tea Ceremony" 20 | }, 21 | "4": { 22 | "cn": "订书机", 23 | "en": "Stapler" 24 | }, 25 | "5": { 26 | "cn": "订书机", 27 | "en": "Stapler" 28 | }, 29 | "6": { 30 | "cn": "锦旗", 31 | "en": "Banner" 32 | }, 33 | "7": { 34 | "cn": "电线", 35 | "en": "Wire" 36 | } 37 | }, 38 | "result": true 39 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 12306 CAPTCHA CRACK 2 | ## 介绍 🐸 3 | 4 | 12306验证码破解程序,单个图片识别率在94%左右,文字识别部分采用Google Vision识别,实际测试,整体正确率在80%左右。图片一共80种分类,支持12306爬虫登录,使用DenseNet 200层深层网络训练。附上已训练好的模型。Dataset来自Kaggle [传送门](https://www.kaggle.com/libowei/12306-captcha-image) 5 | 6 | ## 演示图片 🤖 7 | 8 |  9 |  10 | 11 | ## 使用方法 🐮 12 | 13 | #### 环境要求 14 | + [Tensorflow](https://www.tensorflow.org) 15 | + [Keras](https://keras.io) 16 | 17 | #### API要求 18 | 由于Google Vision API有调用次数限制,建议自行申请一个。~~由于Google安全警告,已移除API Key文件~~ 19 | 20 | ### Demo 21 | ``` 22 | pip3 -r requirement.txt 23 | python3 demo.py 24 | python3 Demo_Webpage/client.py 25 | ``` 26 | 打开浏览器输入地址 [127.0.0.1:5000](http://127.0.0.1:5000) 27 | Mac 可以使用下面命令 28 | ``` 29 | open http://127.0.0.1:5000 30 | ``` 31 | ### 训练模型 32 | 需要下载[数据集](https://www.kaggle.com/libowei/12306-captcha-image)在根目录,命名为captcha。建议在AWS或其它GPU运算能力强的机器上训练,MBP上训练至少40小时以上。训练好模型存在saves文件夹下,更多参数请看源代码。 33 | ``` 34 | python3 train.py --train --logs 35 | ``` 36 | 37 | ## TODO 🎄 38 | - [ ] 双词汇匹配 39 | - [ ] 使用CTPN,对中文进行神经网络训练 40 | - [ ] 中文近形字匹配 41 | -------------------------------------------------------------------------------- /GoogleLens.py: -------------------------------------------------------------------------------- 1 | import io, os, re 2 | from google.cloud import vision 3 | from google.cloud.vision import types 4 | import cv2 5 | 6 | 7 | auth_file_path = "YOUR_GOOGLE_API_KEY_FILE" 8 | file_name = "temp.png" 9 | 10 | def get_text(im): 11 | """ 12 | Cut the text part in image 13 | """ 14 | return im[3:24, 116:288] 15 | 16 | def get_12306_text(image_path): 17 | os.environ["GOOGLE_APPLICATION_CREDENTIALS"]=auth_file_path 18 | client = vision.ImageAnnotatorClient() 19 | 20 | 21 | def get_target_text(image_path): 22 | os.environ["GOOGLE_APPLICATION_CREDENTIALS"]=auth_file_path 23 | client = vision.ImageAnnotatorClient() 24 | file_name = os.path.join(os.path.dirname(__file__),image_path) 25 | 26 | cv2_image = cv2.imread(file_name) 27 | # cv2.imshow("image", cv2_image) 28 | text_img = get_text(cv2_image) 29 | cv2.imwrite(file_name, text_img) 30 | 31 | with io.open(file_name, 'rb') as image_file: 32 | content = image_file.read() 33 | 34 | image = types.Image(content=content) 35 | 36 | response = client.text_detection(image=image) 37 | texts = response.full_text_annotation 38 | text = texts.text 39 | 40 | s = text 41 | re_words = re.compile(u"[\u4e00-\u9fa5]+") 42 | res = re.findall(re_words, s) 43 | # print("".join(res)) 44 | return "".join(res) -------------------------------------------------------------------------------- /labels.txt: -------------------------------------------------------------------------------- 1 | 茶几 0 Coffee Table 2 | 雨靴 1 Rain Boots 3 | 护腕 2 Bracers 4 | 本子 3 Book 5 | 锦旗 4 Banner 6 | 烛台 5 Candlestick 7 | 海苔 6 Seaweed 8 | 中国结 7 Chinese Knot 9 | 龙舟 8 Dragon Boat 10 | 日历 9 Calendar 11 | 红枣 10 Jujube 12 | 药片 11 Tablets 13 | 高压锅 12 Pressure Cooker 14 | 锣 13 Gong 15 | 薯条 14 French Fries 16 | 调色板 15 Palette 17 | 路灯 16 Street Light 18 | 口哨 17 Whistle 19 | 菠萝 18 Pineapple 20 | 挂钟 19 Wall Clock 21 | 冰箱 20 Fridge 22 | 蜥蜴 21 Lizard 23 | 电线 22 Wire 24 | 航母 23 Aircraft Carrier 25 | 手掌印 24 Hand Print 26 | 热水袋 25 Hot Water Bag 27 | 鞭炮 26 Firecrackers 28 | 茶盅 27 Tea Ceremony 29 | 海报 28 Poster 30 | 电子秤 29 Electronic Scale 31 | 蜡烛 30 Candles 32 | 珊瑚 31 Coral 33 | 蚂蚁 32 Ants 34 | 话梅 33 Mei Mei 35 | 毛线 34 Wool 36 | 网球拍 35 Tennis Racket 37 | 沙拉 36 Salad 38 | 拖把 37 Mop 39 | 开瓶器 38 Bottle Opener 40 | 棉棒 39 Cotton Swab 41 | 风铃 40 Wind Bell 42 | 黑板 41 Chalkboard 43 | 盘子 42 Plate 44 | 金字塔 43 Pyramid 45 | 蜜蜂 44 Bee 46 | 文具盒 45 Stationery Box 47 | 公交卡 46 Bus Card 48 | 打字机 47 Typewriter 49 | 啤酒 48 Beer 50 | 漏斗 49 Funnel 51 | 印章 50 Seal 52 | 铃铛 51 Bell 53 | 绿豆 52 Green Beans 54 | 老虎 53 Tiger 55 | 樱桃 54 Cherry 56 | 档案袋 55 Portfolio 57 | 订书机 56 Stapler 58 | 苍蝇拍 57 Fly Swatter 59 | 辣椒酱 58 Chili Sauce 60 | 沙包 59 Sandbags 61 | 卷尺 60 Tape Measure 62 | 钟表 61 Watch 63 | 狮子 62 Lion 64 | 跑步机 63 Treadmill 65 | 锅铲 64 Spatula 66 | 红酒 65 Red Wine 67 | 牌坊 66 Archway 68 | 刺绣 67 Embroidery 69 | 安全帽 68 Safety Helmet 70 | 红豆 69 Red Beans 71 | 剪纸 70 Paper Cutting 72 | 电饭煲 71 Rice Cooker 73 | 创可贴 72 Band Aid 74 | 蒸笼 73 Steamer 75 | 仪表盘 74 Dash Board 76 | 海鸥 75 Seagull 77 | 排风机 76 Ventilator 78 | 双面胶 77 Double-sided Adhesive 79 | 篮球 78 Basketball 80 | 耳塞 79 Earplugs -------------------------------------------------------------------------------- /Demo_Webpage/client.py: -------------------------------------------------------------------------------- 1 | from flask import Flask,jsonify, url_for, Response, render_template, make_response, redirect 2 | from flask_restful import reqparse, request 3 | import requests,html,urllib.parse 4 | import json, requests, os, sys 5 | 6 | app = Flask(__name__) 7 | 8 | @app.route('/', methods=['GET']) 9 | def main(): 10 | with open('./static/img/file.txt') as f: 11 | jsonData = json.load(f) 12 | text_label = jsonData['text_label'] 13 | text_label_en = jsonData['text_label_en'] 14 | image_label = [] 15 | image_label_en = [] 16 | result = jsonData['result'] 17 | for i, value in enumerate(jsonData['label']): 18 | image_label.append(jsonData['label'][value]['cn']) 19 | image_label_en.append(jsonData['label'][value]['en']) 20 | return render_template('index.html', text_label = text_label, text_label_en = text_label_en, image_label=image_label, image_label_en = image_label_en , result=result), 200 21 | 22 | @app.route('/char', methods=['GET']) 23 | def character(): 24 | with open('./static/img/char/file.txt') as f: 25 | jsonData = json.load(f) 26 | 27 | label_list = [] 28 | predict_list = [] 29 | result_list = [] 30 | correct = 0 31 | wrong = 0 32 | accuracy = 0 33 | for key in jsonData: 34 | label_list.append(jsonData[key]['label']) 35 | predict_list.append(jsonData[key]['predict']) 36 | result_list.append(jsonData[key]['result']) 37 | if jsonData[key]['result'] == True: 38 | correct += 1 39 | else: 40 | wrong += 1 41 | accuracy = '%.2f' % (correct/len(label_list)) 42 | return render_template('character.html', length = len(label_list),label_list = label_list, predict_list = predict_list, result_list = result_list, total=len(label_list),correct=correct, wrong=wrong, accuracy=accuracy), 200 43 | 44 | def run(): 45 | app.config['JSON_AS_ASCII'] = False 46 | app.run(debug=True , port=5000) 47 | 48 | if __name__ == "__main__": 49 | app.config['JSON_AS_ASCII'] = False 50 | app.run(debug=True , port=5000) -------------------------------------------------------------------------------- /model/model_saver.py: -------------------------------------------------------------------------------- 1 | from keras.callbacks import Callback 2 | import warnings 3 | import numpy as np 4 | 5 | 6 | class MultiGPUCheckpointCallback(Callback): 7 | 8 | def __init__(self, filepath, base_model, monitor='val_loss', verbose=0, 9 | save_best_only=False, save_weights_only=False, 10 | mode='auto', period=1): 11 | super(MultiGPUCheckpointCallback, self).__init__() 12 | self.base_model = base_model 13 | self.monitor = monitor 14 | self.verbose = verbose 15 | self.filepath = filepath 16 | self.save_best_only = save_best_only 17 | self.save_weights_only = save_weights_only 18 | self.period = period 19 | self.epochs_since_last_save = 0 20 | 21 | if mode not in ['auto', 'min', 'max']: 22 | warnings.warn('ModelCheckpoint mode %s is unknown, ' 23 | 'fallback to auto mode.' % (mode), 24 | RuntimeWarning) 25 | mode = 'auto' 26 | 27 | if mode == 'min': 28 | self.monitor_op = np.less 29 | self.best = np.Inf 30 | elif mode == 'max': 31 | self.monitor_op = np.greater 32 | self.best = -np.Inf 33 | else: 34 | if 'acc' in self.monitor or self.monitor.startswith('fmeasure'): 35 | self.monitor_op = np.greater 36 | self.best = -np.Inf 37 | else: 38 | self.monitor_op = np.less 39 | self.best = np.Inf 40 | 41 | def on_epoch_end(self, epoch, logs=None): 42 | logs = logs or {} 43 | self.epochs_since_last_save += 1 44 | if self.epochs_since_last_save >= self.period: 45 | self.epochs_since_last_save = 0 46 | filepath = self.filepath.format(epoch=epoch + 1, **logs) 47 | if self.save_best_only: 48 | current = logs.get(self.monitor) 49 | if current is None: 50 | warnings.warn('Can save best model only with %s available, ' 51 | 'skipping.' % (self.monitor), RuntimeWarning) 52 | else: 53 | if self.monitor_op(current, self.best): 54 | if self.verbose > 0: 55 | print('Epoch %05d: %s improved from %0.5f to %0.5f,' 56 | ' saving model to %s' 57 | % (epoch + 1, self.monitor, self.best, 58 | current, filepath)) 59 | self.best = current 60 | if self.save_weights_only: 61 | self.base_model.save_weights(filepath, overwrite=True) 62 | else: 63 | self.base_model.save(filepath, overwrite=True) 64 | else: 65 | if self.verbose > 0: 66 | print('Epoch %05d: %s did not improve' % 67 | (epoch + 1, self.monitor)) 68 | else: 69 | if self.verbose > 0: 70 | print('Epoch %05d: saving model to %s' % (epoch + 1, filepath)) 71 | if self.save_weights_only: 72 | self.base_model.save_weights(filepath, overwrite=True) 73 | else: 74 | self.base_model.save(filepath, overwrite=True) 75 | -------------------------------------------------------------------------------- /Demo_Webpage/static/img/char/file.txt: -------------------------------------------------------------------------------- 1 | { 2 | "0": { 3 | "label": "xAly", 4 | "predict": "xAly", 5 | "result": true 6 | }, 7 | "1": { 8 | "label": "iqNQ", 9 | "predict": "iqNQ", 10 | "result": true 11 | }, 12 | "2": { 13 | "label": "wGTb", 14 | "predict": "wGTb", 15 | "result": true 16 | }, 17 | "3": { 18 | "label": "1sTE", 19 | "predict": "1sTE", 20 | "result": true 21 | }, 22 | "4": { 23 | "label": "MzBg", 24 | "predict": "MzBg", 25 | "result": true 26 | }, 27 | "5": { 28 | "label": "12bx", 29 | "predict": "1zbx", 30 | "result": false 31 | }, 32 | "6": { 33 | "label": "1MUC", 34 | "predict": "1MUC", 35 | "result": true 36 | }, 37 | "7": { 38 | "label": "KMO9", 39 | "predict": "KMO9", 40 | "result": true 41 | }, 42 | "8": { 43 | "label": "Ffdv", 44 | "predict": "Ffdv", 45 | "result": true 46 | }, 47 | "9": { 48 | "label": "uLg9", 49 | "predict": "uLg9", 50 | "result": true 51 | }, 52 | "10": { 53 | "label": "VIi3", 54 | "predict": "VIi3", 55 | "result": true 56 | }, 57 | "11": { 58 | "label": "0vIR", 59 | "predict": "OVIR", 60 | "result": false 61 | }, 62 | "12": { 63 | "label": "SpxJ", 64 | "predict": "SpXJ", 65 | "result": true 66 | }, 67 | "13": { 68 | "label": "oXFf", 69 | "predict": "oXFf", 70 | "result": true 71 | }, 72 | "14": { 73 | "label": "9lOh", 74 | "predict": "9loh", 75 | "result": true 76 | }, 77 | "15": { 78 | "label": "jLfg", 79 | "predict": "jLfg", 80 | "result": true 81 | }, 82 | "16": { 83 | "label": "REGn", 84 | "predict": "REGn", 85 | "result": true 86 | }, 87 | "17": { 88 | "label": "GdYK", 89 | "predict": "GdYK", 90 | "result": true 91 | }, 92 | "18": { 93 | "label": "nvgJ", 94 | "predict": "nvgJ", 95 | "result": true 96 | }, 97 | "19": { 98 | "label": "1UX6", 99 | "predict": "1Ux6", 100 | "result": true 101 | }, 102 | "20": { 103 | "label": "xD54", 104 | "predict": "xD54", 105 | "result": true 106 | }, 107 | "21": { 108 | "label": "sRAI", 109 | "predict": "sRAI", 110 | "result": true 111 | }, 112 | "22": { 113 | "label": "RneW", 114 | "predict": "RneW", 115 | "result": true 116 | }, 117 | "23": { 118 | "label": "Kn7Q", 119 | "predict": "Kn7Q", 120 | "result": true 121 | }, 122 | "24": { 123 | "label": "J2li", 124 | "predict": "J2li", 125 | "result": true 126 | }, 127 | "25": { 128 | "label": "9vko", 129 | "predict": "9vkO", 130 | "result": true 131 | }, 132 | "26": { 133 | "label": "3fwm", 134 | "predict": "3fwm", 135 | "result": true 136 | }, 137 | "27": { 138 | "label": "Eu4c", 139 | "predict": "Eu4C", 140 | "result": true 141 | }, 142 | "28": { 143 | "label": "FIr4", 144 | "predict": "FIr4", 145 | "result": true 146 | }, 147 | "29": { 148 | "label": "20pT", 149 | "predict": "20pT", 150 | "result": true 151 | } 152 | } -------------------------------------------------------------------------------- /demo.py: -------------------------------------------------------------------------------- 1 | from model.densenet import DenseNet 2 | from Demo_Webpage import client 3 | import utils 4 | import numpy as np 5 | import time 6 | import shutil 7 | import os, translate 8 | import json 9 | 10 | import GoogleLens 11 | from fuzzywuzzy import fuzz 12 | from fuzzywuzzy import process 13 | 14 | n_classes = 80 15 | image_shape = (64, 64, 3) 16 | image_model_weight = "./saves/DenseNet_k=12_d=40.weight" 17 | save_path = "./temp" 18 | save_fail_path = "temp/faild" 19 | 20 | demo_path = "./Demo_Webpage/static/img" 21 | 22 | def load_model(): 23 | text_model = None 24 | image_model = DenseNet(classes=n_classes, input_shape=image_shape, depth=40, \ 25 | growth_rate=12, bottleneck=False,reduction=0.0, dropout_rate=0.0, weight_decay=1e-4) 26 | image_model.load_weights(image_model_weight) 27 | return text_model, image_model 28 | 29 | def load_label_dict(): 30 | ''' 31 | Read Label 32 | ''' 33 | label_dict = {} 34 | label_dict_en = {} 35 | with open("labels.txt", encoding="utf-8") as file: 36 | for line in file: 37 | class_name, id , class_en = line.strip().split('\t') 38 | label_dict[int(id)] = class_name 39 | label_dict_en[int(id)] = class_en 40 | return label_dict, label_dict_en 41 | 42 | def demo_test(text_model, image_model, label_dict, label_dict_en): 43 | """ 44 | 获取验证码图片、模型识别、提交 45 | :return: 46 | """ 47 | image_path = utils.download_captcha() 48 | raw_texts, raw_images = utils.process_raw_images(image_path, (image_shape[0], image_shape[1])) 49 | utils.save_name(raw_texts[0], demo_path, 'text') 50 | for i, img in enumerate(raw_images): 51 | utils.save_name(raw_images[i], demo_path, i) 52 | 53 | shutil.copy(image_path, os.path.join(demo_path, 'demo.png')) 54 | 55 | images = np.array([np.asarray(image) for image in raw_images]) 56 | image_predict = image_model.predict(images) 57 | image_result = np.argmax(image_predict, 1) 58 | image_prob = np.max(image_predict, 1) 59 | 60 | image_label = [label_dict[r].replace("\xa0","") for r in image_result] 61 | image_label_en = [label_dict_en[r] for r in image_result] 62 | text_label = GoogleLens.get_target_text(image_path) 63 | 64 | print(text_label) 65 | print(image_label) 66 | print(image_label_en) 67 | 68 | ids = set() 69 | for id, r2 in enumerate(image_label): 70 | if text_label == r2: 71 | ids.add(id) 72 | 73 | if len(ids) == 0: 74 | txt, score = process.extractOne(text_label, image_label) 75 | print(text_label, txt) 76 | text_label = txt 77 | for id, r2 in enumerate(image_label): 78 | if txt == r2: 79 | ids.add(id) 80 | 81 | result = utils.submit_captcha(ids) 82 | utils.draw_circle(ids, demo_path, 'demo.png') 83 | 84 | label = {} 85 | for i, l in enumerate(image_label): 86 | label[i] = {} 87 | label[i]['cn'] = l 88 | label[i]['en'] = image_label_en[i] 89 | 90 | dict = {} 91 | dict['text_label'] = text_label 92 | dict['text_label_en'] = utils.find_en_word(image_label, image_label_en, text_label) 93 | # translate.translate(text_label) 94 | dict['label'] = label 95 | if "成功" in result: 96 | dict['result'] = True 97 | else: 98 | dict['result'] = False 99 | with open(os.path.join(demo_path,'file.txt'), 'w') as file: 100 | file.write(json.dumps(dict, indent=4, ensure_ascii=False)) 101 | 102 | if __name__ == '__main__': 103 | text_model, image_model = load_model() 104 | label_dict, label_dict_en = load_label_dict() 105 | demo_test(text_model, image_model, label_dict, label_dict_en) 106 | -------------------------------------------------------------------------------- /model/subpixel.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from keras import backend as K 4 | from keras.engine import Layer 5 | from keras.utils.generic_utils import get_custom_objects 6 | from keras.utils.conv_utils import normalize_data_format 7 | 8 | if K.backend() == 'theano': 9 | import theano_backend as K_BACKEND 10 | else: 11 | from model import tensorflow_backend as K_BACKEND 12 | 13 | 14 | class SubPixelUpscaling(Layer): 15 | """ Sub-pixel convolutional upscaling layer based on the paper "Real-Time Single Image 16 | and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network" 17 | (https://arxiv.org/abs/1609.05158). 18 | This layer requires a Convolution2D prior to it, having output filters computed according to 19 | the formula : 20 | filters = k * (scale_factor * scale_factor) 21 | where k = a user defined number of filters (generally larger than 32) 22 | scale_factor = the upscaling factor (generally 2) 23 | This layer performs the depth to space operation on the convolution filters, and returns a 24 | tensor with the size as defined below. 25 | # Example : 26 | ```python 27 | # A standard subpixel upscaling block 28 | x = Convolution2D(256, 3, 3, padding='same', activation='relu')(...) 29 | u = SubPixelUpscaling(scale_factor=2)(x) 30 | [Optional] 31 | x = Convolution2D(256, 3, 3, padding='same', activation='relu')(u) 32 | ``` 33 | In practice, it is useful to have a second convolution layer after the 34 | SubPixelUpscaling layer to speed up the learning process. 35 | However, if you are stacking multiple SubPixelUpscaling blocks, it may increase 36 | the number of parameters greatly, so the Convolution layer after SubPixelUpscaling 37 | layer can be removed. 38 | # Arguments 39 | scale_factor: Upscaling factor. 40 | data_format: Can be None, 'channels_first' or 'channels_last'. 41 | # Input shape 42 | 4D tensor with shape: 43 | `(samples, k * (scale_factor * scale_factor) channels, rows, cols)` if data_format='channels_first' 44 | or 4D tensor with shape: 45 | `(samples, rows, cols, k * (scale_factor * scale_factor) channels)` if data_format='channels_last'. 46 | # Output shape 47 | 4D tensor with shape: 48 | `(samples, k channels, rows * scale_factor, cols * scale_factor))` if data_format='channels_first' 49 | or 4D tensor with shape: 50 | `(samples, rows * scale_factor, cols * scale_factor, k channels)` if data_format='channels_last'. 51 | """ 52 | 53 | def __init__(self, scale_factor=2, data_format=None, **kwargs): 54 | super(SubPixelUpscaling, self).__init__(**kwargs) 55 | 56 | self.scale_factor = scale_factor 57 | self.data_format = normalize_data_format(data_format) 58 | 59 | def build(self, input_shape): 60 | pass 61 | 62 | def call(self, x, mask=None): 63 | y = K_BACKEND.depth_to_space(x, self.scale_factor, self.data_format) 64 | return y 65 | 66 | def compute_output_shape(self, input_shape): 67 | if self.data_format == 'channels_first': 68 | b, k, r, c = input_shape 69 | return (b, k // (self.scale_factor ** 2), r * self.scale_factor, c * self.scale_factor) 70 | else: 71 | b, r, c, k = input_shape 72 | return (b, r * self.scale_factor, c * self.scale_factor, k // (self.scale_factor ** 2)) 73 | 74 | def get_config(self): 75 | config = {'scale_factor': self.scale_factor, 76 | 'data_format': self.data_format} 77 | base_config = super(SubPixelUpscaling, self).get_config() 78 | return dict(list(base_config.items()) + list(config.items())) 79 | 80 | 81 | get_custom_objects().update({'SubPixelUpscaling': SubPixelUpscaling}) -------------------------------------------------------------------------------- /Demo_Webpage/static/css/feather.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"feather";src:url(../fonts/feather-webfont.eot);src:url(../fonts/feather-webfont.eot?#iefix) format("embedded-opentype"),url(../fonts/feather-webfont.woff) format("woff"),url(../fonts/feather-webfont.ttf) format("truetype"),url(../fonts/feather-webfont.svg#feather) format("svg");font-weight:400;font-style:normal}.feather-icon{display:inline-block;font-family:"feather";font-style:normal;font-weight:400;font-variant:normal;text-transform:none;speak:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-eye:before{content:"\e000"}.icon-paper-clip:before{content:"\e001"}.icon-mail:before{content:"\e002";content:\e002}.icon-toggle:before{content:"\e003"}.icon-layout:before{content:"\e004"}.icon-link:before{content:"\e005"}.icon-bell:before{content:"\e006"}.icon-lock:before{content:"\e007"}.icon-unlock:before{content:"\e008"}.icon-ribbon:before{content:"\e009"}.icon-image:before{content:"\e010"}.icon-signal:before{content:"\e011"}.icon-target:before{content:"\e012"}.icon-clipboard:before{content:"\e013"}.icon-clock:before{content:"\e014";content:\e014}.icon-watch:before{content:"\e015"}.icon-air-play:before{content:"\e016"}.icon-camera:before{content:"\e017"}.icon-video:before{content:"\e018"}.icon-disc:before{content:"\e019"}.icon-printer:before{content:"\e020"}.icon-monitor:before{content:"\e021"}.icon-server:before{content:"\e022"}.icon-cog:before{content:"\e023"}.icon-heart:before{content:"\e024"}.icon-paragraph:before{content:"\e025"}.icon-align-justify:before{content:"\e026"}.icon-align-left:before{content:"\e027"}.icon-align-center:before{content:"\e028"}.icon-align-right:before{content:"\e029"}.icon-book:before{content:"\e030"}.icon-layers:before{content:"\e031"}.icon-stack:before{content:"\e032"}.icon-stack-2:before{content:"\e033"}.icon-paper:before{content:"\e034"}.icon-paper-stack:before{content:"\e035"}.icon-search:before{content:"\e036"}.icon-zoom-in:before{content:"\e037"}.icon-zoom-out:before{content:"\e038"}.icon-reply:before{content:"\e039"}.icon-circle-plus:before{content:"\e040"}.icon-circle-minus:before{content:"\e041"}.icon-circle-check:before{content:"\e042"}.icon-circle-cross:before{content:"\e043"}.icon-square-plus:before{content:"\e044"}.icon-square-minus:before{content:"\e045"}.icon-square-check:before{content:"\e046"}.icon-square-cross:before{content:"\e047"}.icon-microphone:before{content:"\e048"}.icon-record:before{content:"\e049"}.icon-skip-back:before{content:"\e050"}.icon-rewind:before{content:"\e051"}.icon-play:before{content:"\e052"}.icon-pause:before{content:"\e053"}.icon-stop:before{content:"\e054"}.icon-fast-forward:before{content:"\e055"}.icon-skip-forward:before{content:"\e056"}.icon-shuffle:before{content:"\e057"}.icon-repeat:before{content:"\e058"}.icon-folder:before{content:"\e059"}.icon-umbrella:before{content:"\e060"}.icon-moon:before{content:"\e061"}.icon-thermometer:before{content:"\e062"}.icon-drop:before{content:"\e063"}.icon-sun:before{content:"\e064"}.icon-cloud:before{content:"\e065"}.icon-cloud-upload:before{content:"\e066"}.icon-cloud-download:before{content:"\e067"}.icon-upload:before{content:"\e068"}.icon-download:before{content:"\e069"}.icon-location:before{content:"\e070"}.icon-location-2:before{content:"\e071"}.icon-map:before{content:"\e072"}.icon-battery:before{content:"\e073"}.icon-head:before{content:"\e074"}.icon-briefcase:before{content:"\e075"}.icon-speech-bubble:before{content:"\e076"}.icon-anchor:before{content:"\e077"}.icon-globe:before{content:"\e078"}.icon-box:before{content:"\e079"}.icon-reload:before{content:"\e080"}.icon-share:before{content:"\e081"}.icon-marquee:before{content:"\e082"}.icon-marquee-plus:before{content:"\e083"}.icon-marquee-minus:before{content:"\e084"}.icon-tag:before{content:"\e085"}.icon-power:before{content:"\e086"}.icon-command:before{content:"\e087"}.icon-alt:before{content:"\e088"}.icon-esc:before{content:"\e089"}.icon-bar-graph:before{content:"\e090"}.icon-bar-graph-2:before{content:"\e091"}.icon-pie-graph:before{content:"\e092"}.icon-star:before{content:"\e093"}.icon-arrow-left:before{content:"\e094"}.icon-arrow-right:before{content:"\e095"}.icon-arrow-up:before{content:"\e096"}.icon-arrow-down:before{content:"\e097"}.icon-volume:before{content:"\e098"}.icon-mute:before{content:"\e099"}.icon-content-right:before{content:"\e100"}.icon-content-left:before{content:"\e101"}.icon-grid:before{content:"\e102"}.icon-grid-2:before{content:"\e103"}.icon-columns:before{content:"\e104"}.icon-loader:before{content:"\e105"}.icon-bag:before{content:"\e106"}.icon-ban:before{content:"\e107"}.icon-flag:before{content:"\e108"}.icon-trash:before{content:"\e109"}.icon-expand:before{content:"\e110"}.icon-contract:before{content:"\e111"}.icon-maximize:before{content:"\e112"}.icon-minimize:before{content:"\e113"}.icon-plus:before{content:"\e114"}.icon-minus:before{content:"\e115"}.icon-check:before{content:"\e116"}.icon-cross:before{content:"\e117"}.icon-move:before{content:"\e118"}.icon-delete:before{content:"\e119"}.icon-menu:before{content:"\e120"}.icon-archive:before{content:"\e121"}.icon-inbox:before{content:"\e122"}.icon-outbox:before{content:"\e123"}.icon-file:before{content:"\e124"}.icon-file-add:before{content:"\e125"}.icon-file-subtract:before{content:"\e126"}.icon-help:before{content:"\e127"}.icon-open:before{content:"\e128"}.icon-ellipsis:before{content:"\e129"} -------------------------------------------------------------------------------- /Demo_Webpage/static/js/lazysizes.min.js: -------------------------------------------------------------------------------- 1 | /*! lazysizes - v3.0.0 */ 2 | !function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d=b.documentElement,e=a.Date,f=a.HTMLPictureElement,g="addEventListener",h="getAttribute",i=a[g],j=a.setTimeout,k=a.requestAnimationFrame||j,l=a.requestIdleCallback,m=/^picture$/i,n=["load","error","lazyincluded","_lazyloaded"],o={},p=Array.prototype.forEach,q=function(a,b){return o[b]||(o[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),o[b].test(a[h]("class")||"")&&o[b]},r=function(a,b){q(a,b)||a.setAttribute("class",(a[h]("class")||"").trim()+" "+b)},s=function(a,b){var c;(c=q(a,b))&&a.setAttribute("class",(a[h]("class")||"").replace(c," "))},t=function(a,b,c){var d=c?g:"removeEventListener";c&&t(a,b),n.forEach(function(c){a[d](c,b)})},u=function(a,c,d,e,f){var g=b.createEvent("CustomEvent");return g.initCustomEvent(c,!e,!f,d||{}),a.dispatchEvent(g),g},v=function(b,d){var e;!f&&(e=a.picturefill||c.pf)?e({reevaluate:!0,elements:[b]}):d&&d.src&&(b.src=d.src)},w=function(a,b){return(getComputedStyle(a,null)||{})[b]},x=function(a,b,d){for(d=d||a.offsetWidth;df&&(f=0),a||9>f&&l?i():j(i,f))}},B=function(a){var b,c,d=99,f=function(){b=null,a()},g=function(){var a=e.now()-c;d>a?j(g,d-a):(l||f)(f)};return function(){c=e.now(),b||(b=j(g,d))}},C=function(){var f,k,l,n,o,x,C,E,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O="onscroll"in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=-1,T=function(a){R--,a&&a.target&&t(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var e,f=a,g="hidden"==w(b.body,"visibility")||"hidden"!=w(a,"visibility");for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=d;)g=(w(f,"opacity")||1)>0,g&&"visible"!=w(f,"overflow")&&(e=f.getBoundingClientRect(),g=H>e.left&&Ge.top-1&&FR&&(a=f.length)){e=0,S++,null==K&&("expand"in c||(c.expand=d.clientHeight>500&&d.clientWidth>500?500:370),J=c.expand,K=J*c.expFactor),K>Q&&1>R&&S>2&&o>2&&!b.hidden?(Q=K,S=0):Q=o>1&&S>1&&6>R?J:P;for(;a>e;e++)if(f[e]&&!f[e]._lazyRace)if(O)if((p=f[e][h]("data-expand"))&&(m=1*p)||(m=Q),q!==m&&(C=innerWidth+m*L,E=innerHeight+m,n=-1*m,q=m),g=f[e].getBoundingClientRect(),(I=g.bottom)>=n&&(F=g.top)<=E&&(H=g.right)>=n*L&&(G=g.left)<=C&&(I||H||G||F)&&(l&&3>R&&!p&&(3>o||4>S)||U(f[e],m))){if(ba(f[e]),j=!0,R>9)break}else!j&&l&&!i&&4>R&&4>S&&o>2&&(k[0]||c.preloadAfterLoad)&&(k[0]||!p&&(I||H||G||F||"auto"!=f[e][h](c.sizesAttr)))&&(i=k[0]||f[e]);else ba(f[e]);i&&!j&&ba(i)}},W=A(V),X=function(a){r(a.target,c.loadedClass),s(a.target,c.loadingClass),t(a.target,Z)},Y=z(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,d,e=a[h](c.srcsetAttr);(b=c.customMedia[a[h]("data-media")||a[h]("media")])&&a.setAttribute("media",b),e&&a.setAttribute("srcset",e),b&&(d=a.parentNode,d.insertBefore(a.cloneNode(),a),d.removeChild(a))},aa=z(function(a,b,d,e,f){var g,i,k,l,o,q;(o=u(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(d?r(a,c.autosizesClass):a.setAttribute("sizes",e)),i=a[h](c.srcsetAttr),g=a[h](c.srcAttr),f&&(k=a.parentNode,l=k&&m.test(k.nodeName||"")),q=b.firesLoad||"src"in a&&(i||g||l),o={target:a},q&&(t(a,T,!0),clearTimeout(n),n=j(T,2500),r(a,c.loadingClass),t(a,Z,!0)),l&&p.call(k.getElementsByTagName("source"),_),i?a.setAttribute("srcset",i):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),(i||l)&&v(a,{src:g})),a._lazyRace&&delete a._lazyRace,s(a,c.lazyClass),y(function(){(!q||a.complete&&a.naturalWidth>1)&&(q?T(o):R--,X(o))},!0)}),ba=function(a){var b,d=M.test(a.nodeName),e=d&&(a[h](c.sizesAttr)||a[h]("sizes")),f="auto"==e;(!f&&l||!d||!a.src&&!a.srcset||a.complete||q(a,c.errorClass))&&(b=u(a,"lazyunveilread").detail,f&&D.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,d))},ca=function(){if(!l){if(e.now()-x<999)return void j(ca,999);var a=B(function(){c.loadMode=3,W()});l=!0,c.loadMode=3,W(),i("scroll",function(){3==c.loadMode&&(c.loadMode=2),a()},!0)}};return{_:function(){x=e.now(),f=b.getElementsByClassName(c.lazyClass),k=b.getElementsByClassName(c.lazyClass+" "+c.preloadClass),L=c.hFac,i("scroll",W,!0),i("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(d,{childList:!0,subtree:!0,attributes:!0}):(d[g]("DOMNodeInserted",W,!0),d[g]("DOMAttrModified",W,!0),setInterval(W,999)),i("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[g](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(i("load",ca),b[g]("DOMContentLoaded",W),j(ca,2e4)),f.length?(V(),y._lsFlush()):W()},checkElems:W,unveil:ba}}(),D=function(){var a,d=z(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),m.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||v(a,c.detail)}),e=function(a,b,c){var e,f=a.parentNode;f&&(c=x(a,f,c),e=u(a,"lazybeforesizes",{width:c,dataAttr:!!b}),e.defaultPrevented||(c=e.detail.width,c&&c!==a._lazysizesWidth&&d(a,f,e,c)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=B(f);return{_:function(){a=b.getElementsByClassName(c.autosizesClass),i("resize",g)},checkElems:g,updateElem:e}}(),E=function(){E.i||(E.i=!0,D._(),C._())};return function(){var b,d={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2};c=a.lazySizesConfig||a.lazysizesConfig||{};for(b in d)b in c||(c[b]=d[b]);a.lazySizesConfig=c,j(function(){c.init&&E()})}(),{cfg:c,autoSizer:D,loader:C,init:E,uP:v,aC:r,rC:s,hC:q,fire:u,gW:x,rAF:y}}}); -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- 1 | from model.densenet import DenseNet 2 | from keras.optimizers import SGD 3 | import keras 4 | 5 | import tensorflow as tf 6 | from keras.utils import multi_gpu_model 7 | from keras.callbacks import TensorBoard, LearningRateScheduler 8 | from model.model_saver import MultiGPUCheckpointCallback 9 | from keras.losses import categorical_crossentropy 10 | import argparse 11 | from utils import read_data 12 | import os 13 | 14 | batch_size = 64 15 | n_gpus = 1 16 | n_epochs = 40 17 | image_shape = (64, 64, 3) 18 | n_classes = 80 19 | initial_learning_rate = 0.1 20 | reduce_lr_epoch_1 = 20 21 | reduce_lr_epoch_2 = 30 22 | image_dir = "./captcha" 23 | 24 | if __name__ == '__main__': 25 | parser = argparse.ArgumentParser() 26 | parser.add_argument("--train", action="store_true", help="训练模型") 27 | parser.add_argument("--test", action="store_true", help="测试模型") 28 | parser.add_argument('--model_type', '-m', type=str, choices=['DenseNet', 'DenseNet-BC'], default='DenseNet', 29 | help='What type of model to use') 30 | parser.add_argument('--growth_rate', '-k', type=int, choices=[12, 24, 40], default=12, 31 | help='Grows rate for every layer,choices were restricted to used in paper') 32 | parser.add_argument('--depth', '-d', type=int, choices=[40, 100, 190, 250], default=40, 33 | help='Depth of whole network, restricted to paper choices') 34 | parser.add_argument('--total_blocks', '-tb', type=int, default=3, metavar='', 35 | help='Total blocks of layers stack (default: %(default)s)') 36 | parser.add_argument('--keep_prob', '-kp', type=float, default=1.0, metavar='', 37 | help="Keep probability for dropout.") 38 | parser.add_argument('--weight_decay', '-wd', type=float, default=1e-4, metavar='', 39 | help='Weight decay for optimizer (default: %(default)s)') 40 | parser.add_argument('--nesterov_momentum', '-nm', type=float, default=0.9, metavar='', 41 | help='Nesterov momentum (default: %(default)s)') 42 | parser.add_argument('--reduction', '-red', type=float, default=0.5, metavar='', 43 | help='reduction Theta at transition layer for DenseNets-BC models') 44 | parser.add_argument('--logs', dest='should_save_logs', action='store_true', 45 | help='Write tensorflow logs ') 46 | parser.add_argument('--no-logs', dest='should_save_logs', action='store_false', 47 | help='Do not write tensorflow logs') 48 | parser.set_defaults(should_save_logs=True) 49 | parser.add_argument('--saves', dest='should_save_model', action='store_true', 50 | help='Save model during training') 51 | parser.add_argument('--no-saves', dest='should_save_model', action='store_false', 52 | help='Do not save model during training') 53 | parser.set_defaults(should_save_model=True) 54 | 55 | args = parser.parse_args() 56 | if args.model_type == 'DenseNet': 57 | args.bc_mode = False 58 | args.reduction = 0.0 59 | elif args.model_type == 'DenseNet-BC': 60 | args.bc_mode = True 61 | 62 | if not args.train and not args.test: 63 | print("需要指定 --train 或 --test") 64 | exit() 65 | 66 | if keras.backend.backend() != "tensorflow": 67 | print("只可运行于基于TensorFlow后端的Keras下") 68 | 69 | model_identifier = "%s_k=%s_d=%s" % ( 70 | args.model_type, args.growth_rate, args.depth) 71 | 72 | images, labels = read_data(image_dir, image_shape) 73 | labels = keras.utils.to_categorical(labels, n_classes) 74 | 75 | base_model = DenseNet(classes=n_classes, input_shape=image_shape, depth=args.depth, 76 | growth_rate=args.growth_rate, 77 | bottleneck=args.bc_mode, reduction=args.reduction, dropout_rate=1.0 - args.keep_prob, 78 | weight_decay=args.weight_decay) 79 | 80 | if args.train: 81 | batch_size *= n_gpus 82 | 83 | if os.path.exists("saves/%s.weight" % model_identifier): 84 | print("Loading model...") 85 | base_model.load_weights("saves/%s.weight" % 86 | model_identifier, by_name=True) 87 | 88 | if n_gpus > 1: 89 | model = multi_gpu_model(base_model, n_gpus) 90 | else: 91 | model = base_model 92 | 93 | def loss_func(y_true, y_pred): 94 | l2_loss = tf.add_n([tf.nn.l2_loss(var) 95 | for var in model.trainable_weights]) 96 | return categorical_crossentropy(y_true, y_pred) + l2_loss * 1e-4 97 | 98 | optimizer = SGD(lr=initial_learning_rate, clipvalue=0.5, 99 | momentum=0.9, decay=1e-4, nesterov=True) 100 | model.compile(optimizer=optimizer, loss=loss_func, 101 | metrics=['accuracy']) 102 | 103 | # Callback:LearningRateScheduler 104 | def lr_reduce(epoch): 105 | if epoch < reduce_lr_epoch_1: 106 | return initial_learning_rate 107 | elif epoch >= reduce_lr_epoch_2: 108 | return initial_learning_rate / 100 109 | else: 110 | return initial_learning_rate / 10 111 | 112 | # define callbacks 113 | learning_rate_scheduler = LearningRateScheduler(lr_reduce) 114 | checkpoints = MultiGPUCheckpointCallback("saves/%s.weight" % model_identifier, base_model=base_model, 115 | save_weights_only=True, save_best_only=True) 116 | 117 | tensorboard = TensorBoard( 118 | "logs/%s/" % (model_identifier), batch_size=batch_size, histogram_freq=10) 119 | 120 | callbacks = [learning_rate_scheduler] 121 | if args.should_save_model: 122 | callbacks.append(checkpoints) 123 | if args.should_save_logs: 124 | callbacks.append(tensorboard) 125 | 126 | model.fit(x=images, y=labels, validation_split=0.1, batch_size=batch_size, epochs=n_epochs, 127 | callbacks=callbacks, shuffle=True) 128 | 129 | elif args.test: 130 | 131 | if os.path.exists("saves/%s.weight" % model_identifier): 132 | print("Loading model...") 133 | base_model.load_weights("saves/%s.weight" % 134 | model_identifier, by_name=True) 135 | else: 136 | print("saves/%s.weight file not exists" % model_identifier) 137 | exit() 138 | 139 | def loss_func(y_true, y_pred): 140 | l2_loss = tf.add_n([tf.nn.l2_loss(var) 141 | for var in base_model.trainable_weights]) 142 | return categorical_crossentropy(y_true, y_pred) + l2_loss * 1e-4 143 | 144 | optimizer = SGD(lr=initial_learning_rate, clipvalue=0.5, 145 | momentum=0.9, decay=1e-4, nesterov=True) 146 | base_model.compile(optimizer=optimizer, 147 | loss=loss_func, metrics=['accuracy']) 148 | 149 | score = base_model.evaluate(images, labels, batch_size=batch_size) 150 | print("Test loss: %.3f" % score[0]) 151 | print("Test accuracy: %.3f" % score[1]) 152 | -------------------------------------------------------------------------------- /Demo_Webpage/templates/character.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Character 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | lmcmz 41 | 42 | Toggle navigation 43 | 44 | 45 | 46 | 47 | 48 | 12306 49 | 50 | 51 | Character 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | Image 69 | 70 | 71 | 72 | 73 | Label 74 | 75 | 76 | 77 | 78 | Predict 79 | 80 | 81 | 82 | 83 | Result 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | {% for n in range(length) %} 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | {{label_list[n]}} 100 | 101 | 102 | 103 | 104 | {{predict_list[n]}} 105 | 106 | 107 | 108 | {% if result_list[n] %} 109 | 111 | {% else %} 112 | 114 | {% endif %} 115 | 116 | 117 | 118 | 119 | 120 | 121 | {% endfor %} 122 | 123 | 124 | 125 | 126 | Total 127 | 128 | 129 | 130 | 131 | Correct 132 | 133 | 134 | 135 | 136 | Wrong 137 | 138 | 139 | 140 | 141 | Accuracy 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | {{total}} 154 | 155 | 156 | 157 | 158 | {{correct}} 159 | 160 | 161 | 162 | 163 | {{wrong}} 164 | 165 | 166 | 167 | 168 | {{accuracy}} 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | Copyright © lmcmz 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | from PIL import Image 3 | from PIL import ImageDraw 4 | import numpy as np 5 | import os 6 | import time 7 | import requests 8 | import uuid 9 | #import cookielib 10 | import ssl 11 | import http.cookiejar 12 | import urllib.request 13 | 14 | # 跳过证书验证 15 | ssl._create_default_https_context = ssl._create_unverified_context 16 | 17 | headers = { 18 | 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' 19 | } 20 | 21 | session = requests.Session() 22 | requests.packages.urllib3.disable_warnings() 23 | 24 | def read_data(image_dir, image_shape, label_path="labels.txt"): 25 | """ 26 | 读取图片 27 | :param image_dir: 28 | :param image_shape: 29 | :param label_path: 30 | :return: 31 | """ 32 | label_dict = {} 33 | if os.path.exists(label_path): 34 | with open(label_path, encoding="utf-8") as file: 35 | for line in file: 36 | split_line = line.strip().split() 37 | class_name = split_line[0] 38 | id = split_line[1] 39 | label_dict[class_name] = int(id) 40 | else: 41 | with open(label_path, "w", encoding="utf-8") as file: 42 | for id, class_name in enumerate(os.listdir(image_dir)): 43 | file.write("%s %s\n" % (class_name, id)) 44 | label_dict[class_name] = id 45 | 46 | images = [] 47 | labels = [] 48 | 49 | file_label_dict = {} 50 | for dir_name in os.listdir(image_dir): 51 | for filename in os.listdir(os.path.join(image_dir, dir_name)): 52 | full_path = os.path.join(image_dir, dir_name, filename) 53 | label = label_dict[dir_name] 54 | file_label_dict[full_path] = label 55 | keys = list(file_label_dict.keys()) 56 | np.random.shuffle(keys) 57 | 58 | for path in keys: 59 | image = Image.open(path) 60 | if image.size != image_shape[:2]: 61 | image = image.resize(image_shape[:2]) 62 | image = np.asarray(image) 63 | images.append(image) 64 | labels.append(file_label_dict[path]) 65 | 66 | return np.array(images), np.array(labels) 67 | 68 | 69 | def download_captcha(retry=False): 70 | """ 71 | 下载验证码图片 72 | :param retry: 73 | :return: 74 | """ 75 | url = "https://kyfw.12306.cn/passport/captcha/captcha-image" 76 | r = session.get(url, verify=False) 77 | cookie = r.cookies.get_dict().get('session') 78 | 79 | if retry: 80 | # url2 = "https://kyfw.12306.cn/passport/captcha/captcha-image?login_site=E&module=login&rand=sjrand&0.5074854291360469" 81 | r = session.get(url, headers=headers, verify=False) 82 | 83 | filename = "temp/%s.png" % uuid.uuid4() 84 | with open(filename, "wb") as file: 85 | file.write(r.content) 86 | return filename 87 | 88 | 89 | def submit_captcha(ids): 90 | """ 91 | 提交验证码 92 | :param ids: 93 | :return: 94 | """ 95 | indices = {0: "48,70", 96 | 1: "100,70", 97 | 2: "180,70", 98 | 3: "250,70", 99 | 4: "48,150", 100 | 5: "100,150", 101 | 6: "180,150", 102 | 7: "250,150"} 103 | 104 | list = [indices[id] for id in ids] 105 | answer = ",".join(list) 106 | post = { 107 | "answer": answer, 108 | "login_site": "E", 109 | "rand": "sjrand" 110 | } 111 | 112 | url = "https://kyfw.12306.cn/passport/captcha/captcha-check" 113 | s = session.post(url, data=post, verify=False) 114 | return s.text 115 | 116 | 117 | def process_raw_images(raw_image, image_shape): 118 | flag = judge_image_background(raw_image) 119 | text_part = split_image_text(raw_image, image_shape, flag) 120 | image_part = cut_images(raw_image, image_shape) 121 | return text_part, image_part 122 | 123 | 124 | def save(image, dir, label, image_shape=(64, 64)): 125 | """ 126 | 保存图片 127 | :param image: 128 | :param dir: 保存目录 129 | :param label: 子文件夹 130 | :param image_shape: 131 | :return: 132 | """ 133 | if not os.path.exists(dir): 134 | os.mkdir(dir) 135 | 136 | path = os.path.join(dir, label) 137 | if not os.path.exists(path): 138 | os.mkdir(path) 139 | 140 | filename = "%s.png" % uuid.uuid4() 141 | image = image.resize(image_shape) 142 | image.save(os.path.join(path, filename)) 143 | 144 | def save_name(image, path, name, image_shape=(64, 64)): 145 | """ 146 | 保存图片 147 | :param image: 148 | :param dir: save path 149 | :param name: filename 150 | :param image_shape: 151 | :return: 152 | """ 153 | filename = str(name) + ".png" 154 | image = image.resize(image_shape) 155 | image.save(os.path.join(path, filename)) 156 | 157 | def save_txt(image, dir, label): 158 | if not os.path.exists(dir): 159 | os.mkdir(dir) 160 | 161 | path = os.path.join(dir, label) 162 | if not os.path.exists(path): 163 | os.mkdir(path) 164 | filename = "%s.png" % uuid.uuid4() 165 | image.save(os.path.join(path, filename)) 166 | 167 | def cut_images(raw_image, image_shape): 168 | """ 169 | 切分出8个验证码 170 | :param raw_image: 171 | :return: 172 | """ 173 | crop_area = [(5, 41, 71, 107), (77, 41, 143, 107), (149, 41, 215, 107), (221, 41, 287, 107), 174 | (5, 113, 71, 179), (77, 113, 143, 179), (149, 113, 215, 179), (221, 113, 287, 179)] 175 | if isinstance(raw_image, str): 176 | raw_image = Image.open(raw_image) 177 | return [raw_image.crop(region).resize(image_shape) for region in crop_area] 178 | 179 | def draw_circle(ids, path, filename): 180 | image = Image.open(os.path.join(path, filename)) 181 | draw = ImageDraw.Draw(image) 182 | indices = { 0: [48,70], 183 | 1: [100,70], 184 | 2: [180,70], 185 | 3: [250,70], 186 | 4: [48,150], 187 | 5: [100,150], 188 | 6: [180,150], 189 | 7: [250,150]} 190 | for id in ids: 191 | x, y = indices[id][0], indices[id][1] 192 | r = 15 193 | draw.ellipse((x-r, y-r, x+r, y+r), fill=(255,0,0,255)) 194 | image.save(os.path.join(path, 'result.png')) 195 | 196 | 197 | def judge_image_background(raw_image): 198 | """ 199 | 判断验证码文字区域的词个数 200 | :param raw_image: Image对象或图像路径 201 | :return: 1 或 2 202 | """ 203 | if isinstance(raw_image, str): 204 | raw_image = Image.open(raw_image) 205 | 206 | # 裁切出验证码文字区域 高28 宽112 207 | image = raw_image.crop((118, 0, 230, 28)) 208 | image = image.convert("P") 209 | image_array = np.asarray(image) 210 | 211 | # 取最后4行 212 | image_array = image_array[24:28] 213 | 214 | if np.mean(image_array) > 200: 215 | return 1 216 | else: 217 | return 2 218 | 219 | 220 | def split_image_text(raw_image, image_shape, mode=1): 221 | """ 222 | 裁切出验证码文字部分 223 | :param raw_image: Image对象或图像路径 224 | :param mode: 图中有几组验证码文字 225 | :return: 226 | """ 227 | if isinstance(raw_image, str): 228 | raw_image = Image.open(raw_image) 229 | # 裁切出验证码文字区域 高28 宽112 230 | image = raw_image.crop((118, 0, 230, 28)) 231 | 232 | resize_list = [] 233 | if mode == 1: 234 | # 图中只有一组验证码 235 | image_array = np.asarray(image) 236 | image_array = image_array[6:22] 237 | image_array = np.mean(image_array, axis=2) 238 | image_array = np.mean(image_array, axis=0) 239 | image_array = np.reshape(image_array, [-1]) 240 | 241 | indices = np.where(image_array < 240) 242 | resize_list.append((indices[0][0], indices[0][-1])) 243 | 244 | if mode == 2: 245 | image_p = image.convert("P") 246 | image_array = np.asarray(image_p) 247 | image_array = image_array[6:22] 248 | image_array = np.mean(image_array, axis=0) 249 | avg_image = np.reshape(image_array, [-1]) 250 | indices = np.where(avg_image < 190) 251 | start = indices[0][0] - 1 252 | end = indices[0][0] - 1 253 | for i in indices[0]: 254 | if i == end + 1: 255 | end = i 256 | else: 257 | if end - start > 10: 258 | resize_list.append([start + 1, end]) 259 | start = i 260 | end = i 261 | if end - start > 10: 262 | resize_list.append([start + 1, end]) 263 | 264 | return [image.crop((x1, 0, x2, 28)).resize(image_shape) for x1, x2 in resize_list] 265 | 266 | def find_en_word(list_cn, list_en, text): 267 | if text in list_cn: 268 | index = list_cn.index(text) 269 | return list_en[index] 270 | return "" 271 | 272 | if __name__ == '__main__': 273 | # download_captcha() 274 | # print(submit_captcha([0])) 275 | pass 276 | -------------------------------------------------------------------------------- /Demo_Webpage/static/js/blocs.min.js: -------------------------------------------------------------------------------- 1 | // Blocs.js Minified 2 | function setUpSpecialNavs(){function t(){var t="fadeInRight",e=0,i=60;$(".blocsapp-special-menu blocsnav").hasClass("fullscreen-nav")?(t="fadeIn",i=100):$(".blocsapp-special-menu").hasClass("nav-invert")&&(t="fadeInLeft"),$(".blocsapp-special-menu blocsnav li").each(function(){$(this).parent().hasClass("dropdown-menu")?$(this).addClass("animated fadeIn"):(e+=i,$(this).attr("style","animation-delay:"+e+"ms").addClass("animated "+t))})}$(".navbar-toggle").click(function(e){var i=$(this).closest("nav"),a=i.find("ul.site-navigation"),o=a.clone();if(a.parent().hasClass("nav-special"))if(e.stopPropagation(),$(this).hasClass("selected-nav"))$(".blocsapp-special-menu blocsnav").removeClass("open"),$(".selected-nav").removeClass("selected-nav"),setTimeout(function(){$(".blocsapp-special-menu").remove(),$("body").removeClass("lock-scroll"),$(".selected-nav").removeClass("selected-nav")},300);else{$(this).addClass("selected-nav");var l=i.attr("class").replace("navbar","").replace("row",""),n=a.parent().attr("class").replace("navbar-collapse","").replace("collapse","");($(".content-tint").length=-1)&&$("body").append(''),o.insertBefore(".page-container").wrap(''),$("blocsnav").prepend(''),t(),setTimeout(function(){$(".blocsapp-special-menu blocsnav").addClass("open"),$(".content-tint").addClass("on"),$("body").addClass("lock-scroll")},10)}}),$("body").on("mousedown touchstart",".content-tint, .close-special-menu",function(t){$(".content-tint").removeClass("on"),$(".selected-nav").click(),setTimeout(function(){$(".content-tint").remove()},10)}).on("click",".blocsapp-special-menu a",function(t){$(t.target).closest(".dropdown-toggle").length||$(".close-special-menu").mousedown()})}function extraNavFuncs(){$(".site-navigation a").click(function(t){$(t.target).closest(".dropdown-toggle").length||$(".navbar-collapse").collapse("hide")}),$("a.dropdown-toggle").click(function(t){$(this).parent().addClass("target-open-menu"),$(this).closest(".dropdown-menu").find(".dropdown.open").each(function(t){$(this).hasClass("target-open-menu")||$(this).removeClass("open")}),$(".target-open-menu").removeClass("target-open-menu")})}function setFillScreenBlocHeight(){$(".bloc-fill-screen").each(function(t){var e=$(this);window.fillBodyHeight=0,$(this).find(".container").each(function(t){fillPadding=2*parseInt($(this).css("padding-top")),e.hasClass("bloc-group")?fillBodyHeight=fillPadding+$(this).outerHeight()+50:fillBodyHeight=fillBodyHeight+fillPadding+$(this).outerHeight()+50}),$(this).css("height",getFillHeight()+"px")})}function getFillHeight(){var t=$(window).height();return t$(window).width()&&e.addClass("dropmenu-flow-right")})}function stickyNavToggle(){var t=0,e="sticky";if($(".sticky-nav").hasClass("fill-bloc-top-edge")){var i=$(".fill-bloc-top-edge.sticky-nav").parent().css("background-color");"rgba(0, 0, 0, 0)"==i&&(i="#FFFFFF"),$(".sticky-nav").css("background",i),t=$(".sticky-nav").height(),e="sticky animated fadeInDown"}$(window).scrollTop()>t?($(".sticky-nav").addClass(e),"sticky"==e&&$(".page-container").css("padding-top",$(".sticky-nav").height())):($(".sticky-nav").removeClass(e).removeAttr("style"),$(".page-container").removeAttr("style"))}function hideAll(){$(".animated").each(function(t){$(this).closest(".hero").length||$(this).removeClass("animated").addClass("hideMe")})}function inViewCheck(){$($(".hideMe").get().reverse()).each(function(t){var e=jQuery(this),i=e.offset().top+e.height(),a=$(window).scrollTop()+$(window).height();if(e.height()>$(window).height()&&(i=e.offset().top),i$(window).height()/3?$(".scrollToTop").hasClass("showScrollTop")||$(".scrollToTop").addClass("showScrollTop"):$(".scrollToTop").removeClass("showScrollTop")}function setUpVisibilityToggle(){$(document).on("click","[data-toggle-visibility]",function(t){function e(t){t.is("img")?t.toggle():t.slideToggle()}t.preventDefault();var i=$(this).attr("data-toggle-visibility");if(-1!=i.indexOf(",")){var a=i.split(",");$.each(a,function(t){e($("#"+a[t]))})}else e($("#"+i))})}function setUpLightBox(){window.targetLightbox,$(document).on("click","[data-lightbox]",function(t){t.preventDefault(),targetLightbox=$(this);var e=targetLightbox.attr("data-lightbox"),i=targetLightbox.attr("data-autoplay"),a=''+targetLightbox.attr("data-caption")+"",o="no-gallery-set",l=targetLightbox.attr("data-frame");targetLightbox.attr("data-gallery-id")&&(o=targetLightbox.attr("data-gallery-id")),targetLightbox.attr("data-caption")||(a="");var n="";1==i&&(n="autoplay");var s=$('×'+a+"");$("body").append(s),"fullscreen-lb"==l&&($("#lightbox-modal").addClass("fullscreen-modal").append(''),$("#blocs-lightbox-close-btn").remove()),".mp4"==e.substring(e.length-4)?($("#lightbox-image, .lightbox-caption").hide(),$("#lightbox-video-container").show()):($("#lightbox-image,.lightbox-caption").show(),$("#lightbox-video-container").hide()),$("#lightbox-modal").modal("show"),"no-gallery-set"==o?(0==$("a[data-lightbox]").index(targetLightbox)&&$(".prev-lightbox").hide(),$("a[data-lightbox]").index(targetLightbox)==$("a[data-lightbox]").length-1&&$(".next-lightbox").hide()):(0==$('a[data-gallery-id="'+o+'"]').index(targetLightbox)&&$(".prev-lightbox").hide(),$('a[data-gallery-id="'+o+'"]').index(targetLightbox)==$('a[data-gallery-id="'+o+'"]').length-1&&$(".next-lightbox").hide()),addLightBoxSwipeSupport()}).on("hidden.bs.modal","#lightbox-modal",function(){$("#lightbox-modal").remove()}),$(document).on("click",".next-lightbox, .prev-lightbox",function(t){t.preventDefault();var e="no-gallery-set",i=$("a[data-lightbox]").index(targetLightbox),a=$("a[data-lightbox]").eq(i+1);targetLightbox.attr("data-gallery-id")&&(e=targetLightbox.attr("data-gallery-id"),i=$('a[data-gallery-id="'+e+'"]').index(targetLightbox),a=$('a[data-gallery-id="'+e+'"]').eq(i+1)),$(this).hasClass("prev-lightbox")&&(a=$('a[data-gallery-id="'+e+'"]').eq(i-1),"no-gallery-set"==e&&(a=$("a[data-lightbox]").eq(i-1)));var o=a.attr("data-lightbox");if(".mp4"==o.substring(o.length-4)){var l="";1==a.attr("data-autoplay")&&(l="autoplay"),$("#lightbox-image, .lightbox-caption").hide(),$("#lightbox-video-container").show().html("')}else $("#lightbox-image").attr("src",o).show(),$(".lightbox-caption").html(a.attr("data-caption")).show(),$("#lightbox-video-container").hide();targetLightbox=a,$(".next-lightbox, .prev-lightbox").hide(),"no-gallery-set"==e?($("a[data-lightbox]").index(a)!=$("a[data-lightbox]").length-1&&$(".next-lightbox").show(),$("a[data-lightbox]").index(a)>0&&$(".prev-lightbox").show()):($('a[data-gallery-id="'+e+'"]').index(a)!=$('a[data-gallery-id="'+e+'"]').length-1&&$(".next-lightbox").show(),$('a[data-gallery-id="'+e+'"]').index(a)>0&&$(".prev-lightbox").show())})}function addSwipeSupport(){$(".carousel-inner").length&&$(".carousel-inner").swipe({swipeLeft:function(t,e,i,a,o){$(this).parent().carousel("next")},swipeRight:function(){$(this).parent().carousel("prev")},threshold:0})}function addKeyBoardSupport(){$(window).keydown(function(t){37==t.which?$(".prev-lightbox").is(":visible")&&$(".prev-lightbox").click():39==t.which&&$(".next-lightbox").is(":visible")&&$(".next-lightbox").click()})}function addLightBoxSwipeSupport(){$("#lightbox-image").length&&$("#lightbox-image").swipe({swipeLeft:function(t,e,i,a,o){$(".next-lightbox").is(":visible")&&$(".next-lightbox").click()},swipeRight:function(){$(".prev-lightbox").is(":visible")&&$(".prev-lightbox").click()},threshold:0})}$(document).ready(function(){$("#scroll-hero").click(function(t){t.preventDefault(),$("html,body").animate({scrollTop:$("#scroll-hero").closest(".bloc").height()},"slow")}),extraNavFuncs(),setUpSpecialNavs(),setUpDropdownSubs(),setUpLightBox(),setUpVisibilityToggle(),addSwipeSupport(),addKeyBoardSupport(),-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")&&$("#page-loading-blocs-notifaction").remove()}),$(window).load(function(){setFillScreenBlocHeight(),animateWhenVisible(),$("#page-loading-blocs-notifaction").remove()}).resize(function(){setFillScreenBlocHeight()}),$(function(){$('[data-toggle="tooltip"]').tooltip()}); -------------------------------------------------------------------------------- /Demo_Webpage/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Home 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | lmcmz 42 | 43 | Toggle navigation 44 | 45 | 46 | 47 | 48 | 49 | 12306 50 | 51 | 52 | Character 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 109 | 110 | 111 | 112 | 113 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | {{text_label}} 142 | 143 | 144 | {{text_label_en}} 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | {{image_label_en[0]}} 157 | 158 | 159 | {{ image_label[0]}} 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | {{image_label_en[4]}} 168 | 169 | 170 | {{image_label[4]}} 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | {{image_label_en[1]}} 183 | 184 | 185 | {{image_label[1]}} 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | {{image_label_en[5]}} 194 | 195 | 196 | {{image_label[5]}} 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | {{image_label_en[2]}} 209 | 210 | 211 | {{image_label[2]}} 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | {{image_label_en[6]}} 220 | 221 | 222 | {{image_label[6]}} 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | {{image_label_en[3]}} 235 | 236 | 237 | {{image_label[3]}} 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | {{image_label_en[7]}} 246 | 247 | 248 | {{image_label[7]}} 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | Result 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | {% if result %} 282 | 284 | {% else %} 285 | 287 | {% endif %} 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | Copyright © lmcmz 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | -------------------------------------------------------------------------------- /Demo_Webpage/static/css/style.css: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------------- 2 | 12306 3 | Built with Blocs 4 | -----------------------------------------------------------------------------------*/ 5 | 6 | body{ 7 | margin:0; 8 | padding:0; 9 | background:#FFF; 10 | overflow-x:hidden; 11 | -webkit-font-smoothing: antialiased; 12 | -moz-osx-font-smoothing: grayscale; 13 | } 14 | a,button{transition: all .3s ease-in-out;outline: none!important;} /* Prevent ugly blue glow on chrome and safari */ 15 | a:hover{text-decoration: none; cursor:pointer;} 16 | 17 | #page-loading-blocs-notifaction{position: fixed;top: 0;bottom: 0;width: 100%;z-index:100000;background:#FFFFFF url("img/pageload-spinner.gif") no-repeat center center;} 18 | 19 | /* = Blocs 20 | -------------------------------------------------------------- */ 21 | 22 | .bloc{ 23 | width:100%; 24 | clear:both; 25 | background: 50% 50% no-repeat; 26 | padding:0 50px; 27 | -webkit-background-size: cover; 28 | -moz-background-size: cover; 29 | -o-background-size: cover; 30 | background-size: cover; 31 | position:relative; 32 | } 33 | .bloc .container{ 34 | padding-left:0; 35 | padding-right:0; 36 | } 37 | 38 | 39 | /* Sizes */ 40 | 41 | .bloc-md{ 42 | padding:50px; 43 | } 44 | .bloc-sm{ 45 | padding:20px 50px; 46 | } 47 | 48 | 49 | /* Group Styles */ 50 | 51 | .bloc-group{ 52 | display:flex; 53 | } 54 | .bloc-tile-2{ 55 | width:50%; 56 | } 57 | .bloc-tile-3{ 58 | width:33.33333333%; 59 | } 60 | .bloc-tile-4{ 61 | width:25%; 62 | } 63 | .bloc-tile-2 .container, .bloc-tile-3 .container, .bloc-tile-4 .container{ 64 | width:100%; 65 | } 66 | 67 | 68 | /* Dark theme */ 69 | 70 | .d-bloc{ 71 | color:rgba(255,255,255,.7); 72 | } 73 | .d-bloc button:hover{ 74 | color:rgba(255,255,255,.9); 75 | } 76 | .d-bloc .icon-round,.d-bloc .icon-square,.d-bloc .icon-rounded,.d-bloc .icon-semi-rounded-a,.d-bloc .icon-semi-rounded-b{ 77 | border-color:rgba(255,255,255,.9); 78 | } 79 | .d-bloc .divider-h span{ 80 | border-color:rgba(255,255,255,.2); 81 | } 82 | .d-bloc .a-btn,.d-bloc .navbar a,.d-bloc .navbar-brand, .d-bloc a .icon-sm, .d-bloc a .icon-md, .d-bloc a .icon-lg, .d-bloc a .icon-xl, .d-bloc h1 a, .d-bloc h2 a, .d-bloc h3 a, .d-bloc h4 a, .d-bloc h5 a, .d-bloc h6 a, .d-bloc p a{ 83 | color:rgba(255,255,255,.6); 84 | } 85 | .d-bloc .a-btn:hover,.d-bloc .navbar a:hover,.d-bloc .navbar-brand:hover,.d-bloc a:hover .icon-sm, .d-bloc a:hover .icon-md, .d-bloc a:hover .icon-lg, .d-bloc a:hover .icon-xl, .d-bloc h1 a:hover, .d-bloc h2 a:hover, .d-bloc h3 a:hover, .d-bloc h4 a:hover, .d-bloc h5 a:hover, .d-bloc h6 a:hover, .d-bloc p a:hover{ 86 | color:rgba(255,255,255,1); 87 | } 88 | .d-bloc .navbar-toggle .icon-bar{ 89 | background:rgba(255,255,255,1); 90 | } 91 | .d-bloc .btn-wire,.d-bloc .btn-wire:hover{ 92 | color:rgba(255,255,255,1); 93 | border-color:rgba(255,255,255,1); 94 | } 95 | .d-bloc .panel{ 96 | color:rgba(0,0,0,.5); 97 | } 98 | .d-bloc .panel button:hover{ 99 | color:rgba(0,0,0,.7); 100 | } 101 | .d-bloc .panel icon{ 102 | border-color:rgba(0,0,0,.7); 103 | } 104 | .d-bloc .panel .divider-h span{ 105 | border-color:rgba(0,0,0,.1); 106 | } 107 | .d-bloc .panel .a-btn{ 108 | color:rgba(0,0,0,.6); 109 | } 110 | .d-bloc .panel .a-btn:hover{ 111 | color:rgba(0,0,0,1); 112 | } 113 | .d-bloc .panel .btn-wire, .d-bloc .panel .btn-wire:hover{ 114 | color:rgba(0,0,0,.7); 115 | border-color:rgba(0,0,0,.3); 116 | } 117 | 118 | /* Row Margin Offsets */ 119 | 120 | .voffset{ 121 | margin-top:30px; 122 | } 123 | 124 | /* Bloc text custom styling */ 125 | 126 | #bloc-0 .navbar-brand{ 127 | font-family: "Lobster Two"; 128 | font-size: 38px; 129 | } 130 | 131 | /* = NavBar 132 | -------------------------------------------------------------- */ 133 | 134 | .navbar{ 135 | margin-bottom: 0; 136 | z-index:1; 137 | } 138 | .navbar-brand{ 139 | height:auto; 140 | padding:3px 15px; 141 | font-size:25px; 142 | font-weight:normal; 143 | font-weight:600; 144 | line-height:44px; 145 | } 146 | .navbar-brand img{ 147 | max-height: 200px; 148 | margin: 0 5px 0 0; 149 | display:inline; 150 | } 151 | .nav-center .navbar-brand img{ 152 | margin:0; 153 | } 154 | .navbar .nav{ 155 | padding-top: 2px; 156 | margin-right: -16px; 157 | float:right; 158 | z-index:1; 159 | } 160 | .nav > li{ 161 | float:left; 162 | margin-top:4px; 163 | font-size:16px; 164 | } 165 | .navbar-nav .open .dropdown-menu > li > a{ 166 | text-align: inherit; 167 | } 168 | .nav > li a:hover, .nav > li a:focus{ 169 | background:transparent; 170 | } 171 | .navbar-toggle{ 172 | margin: 10px 10px 0 0; 173 | border: 0px; 174 | } 175 | .navbar-toggle:hover{ 176 | background:transparent!important; 177 | } 178 | .navbar-toggle .icon-bar{ 179 | background-color: rgba(0,0,0,.5); 180 | width: 26px; 181 | } 182 | /* Inverted navbar */ 183 | 184 | .nav-invert .navbar .nav{ 185 | float:left; 186 | } 187 | .nav-invert .navbar-header, .nav-invert .navbar-brand{ 188 | float:right; 189 | position:relative; 190 | z-index:2; 191 | } 192 | @media (min-width: 768px){ 193 | .site-navigation{ 194 | position:absolute; 195 | top:50%; 196 | right:20px; 197 | transform:translate(0, -50%); 198 | -webkit-transform:translateY(-50%); 199 | } 200 | .nav > li .dropdown-menu a,.nav > li .dropdown-menu a:hover{ 201 | color:#484848; 202 | } 203 | .nav-invert .site-navigation{ 204 | left:0; 205 | right:0; 206 | } 207 | .nav-center{ 208 | text-align:center; 209 | } 210 | .nav-center .navbar-header{ 211 | width:100%; 212 | } 213 | .nav-center .navbar-header, .nav-center .navbar-brand, .nav-center .nav > li{ 214 | float: none; 215 | display:inline-block; 216 | } 217 | .nav-center .site-navigation{ 218 | position:relative; 219 | width:100%; 220 | right:0; 221 | margin-right:0px; 222 | margin-top:20px; 223 | } 224 | .nav-center.mini-nav .navbar-toggle{ 225 | float:none; 226 | margin: 10px auto 0; 227 | } 228 | } 229 | .nav > li > .dropdown a{ 230 | background: none!important; 231 | display: block; 232 | padding: 14px 15px; 233 | } 234 | 235 | nav .caret{ 236 | margin: 0 5px; 237 | } 238 | /* Dropdown Menus SubMenu */ 239 | .dropdown-menu .dropdown-menu{ 240 | top:-8px; 241 | left:100%; 242 | } 243 | .dropdown-menu .dropmenu-flow-right{ 244 | top:100%; 245 | left:0; 246 | margin-left: -1px; 247 | border-top-left-radius: 0; 248 | border-top-right-radius: 0; 249 | } 250 | .dropdown-menu .dropdown span{ 251 | border: 4px solid black; 252 | border-top-color:transparent; 253 | border-right-color:transparent; 254 | border-bottom-color:transparent; 255 | margin: 6px -5px 0 0!important; 256 | float: right; 257 | } 258 | 259 | /* = Bric adjustment margins 260 | -------------------------------------------------------------- */ 261 | 262 | .mg-sm{ 263 | margin-top:10px; 264 | margin-bottom:5px; 265 | } 266 | .mg-md{ 267 | margin-top:10px; 268 | margin-bottom:20px; 269 | } 270 | img.mg-sm,img.mg-md,img.mg-lg{ 271 | margin-top: 0; 272 | } 273 | img.mg-sm{ 274 | margin-bottom:10px; 275 | } 276 | img.mg-md{ 277 | margin-bottom:30px; 278 | } 279 | img.mg-lg{ 280 | margin-bottom:50px; 281 | } 282 | 283 | /* = Buttons 284 | -------------------------------------------------------------- */ 285 | 286 | .btn{ 287 | margin: 0 5px 5px 0; 288 | } 289 | .btn.pull-right{ 290 | margin: 0 0 5px 5px; 291 | } 292 | .btn-d,.btn-d:hover,.btn-d:focus{ 293 | color:#FFF; 294 | background:rgba(0,0,0,.3); 295 | } 296 | 297 | /* Prevent ugly blue glow on chrome and safari */ 298 | button{ 299 | outline: none!important; 300 | } 301 | 302 | .btn-rd{ 303 | border-radius: 40px; 304 | } 305 | .btn-xl{ 306 | padding: 16px 40px; 307 | font-size: 28px; 308 | } 309 | .icon-spacer{ 310 | margin-right:5px; 311 | } 312 | 313 | 314 | 315 | 316 | 317 | .panel-sq, .panel-sq .panel-heading, .panel-sq .panel-footer{ 318 | border-radius:0; 319 | } 320 | .panel-rd{ 321 | border-radius:30px; 322 | } 323 | .panel-rd .panel-heading{ 324 | border-radius:29px 29px 0 0; 325 | } 326 | .panel-rd .panel-footer{ 327 | border-radius:0 0 29px 29px; 328 | } 329 | 330 | /* = Dividers 331 | -------------------------------------------------------------- */ 332 | .divider-h{ 333 | padding:20px 0; 334 | } 335 | .divider-h span{ 336 | display: block; 337 | border-top:1px solid transparent; 338 | } 339 | .divider-half{ 340 | width: 50%; 341 | margin: 0 auto; 342 | } 343 | .dropdown-menu .divider-h,.dropdown-menu .divider-half{ 344 | padding:0; 345 | } 346 | 347 | 348 | 349 | 350 | /* ScrollToTop button */ 351 | 352 | .scrollToTop{ 353 | width:40px; 354 | height:40px; 355 | position:fixed; 356 | bottom:20px; 357 | right:20px; 358 | opacity: 0; 359 | z-index: 500; 360 | transition: all .3s ease-in-out; 361 | } 362 | .scrollToTop span{ 363 | margin-top: 6px; 364 | } 365 | .showScrollTop{ 366 | font-size: 14px; 367 | opacity: 1; 368 | } 369 | 370 | /* = Custom Styling 371 | -------------------------------------------------------------- */ 372 | 373 | h1,h2,h3,h4,h5,h6,p,label,.btn,a{ 374 | font-family:"Helvetica"; 375 | } 376 | .container{ 377 | max-width:1170px; 378 | } 379 | .hero-bloc-text{ 380 | font-size:55px; 381 | } 382 | .built-with-blocs-bloc p{ 383 | font-size:11px; 384 | font-family:"helvetica"; 385 | font-weight:bold; 386 | color:rgba(255,255,255,0.8); 387 | } 388 | .blocs-mobile-signup-text{ 389 | font-size:33px; 390 | } 391 | 392 | /* = Colour 393 | -------------------------------------------------------------- */ 394 | 395 | /* Background colour styles */ 396 | 397 | .bgc-charcoal{ 398 | background-color:#2B3250; 399 | } 400 | 401 | /* Link colour styles */ 402 | 403 | .ltc-magnolia{ 404 | color:#F2ECFF!important; 405 | } 406 | .ltc-magnolia:hover{ 407 | color:#c2bdcc!important; 408 | } 409 | 410 | 411 | 412 | 413 | 414 | /* = Mobile adjustments 415 | -------------------------------------------------------------- */ 416 | @media (max-width: 1024px) 417 | { 418 | .bloc{ 419 | padding-left: 20px; 420 | padding-right: 20px; 421 | } 422 | .bloc.full-width-bloc, .bloc-tile-2.full-width-bloc .container, .bloc-tile-3.full-width-bloc .container, .bloc-tile-4.full-width-bloc .container{ 423 | padding-left: 0; 424 | padding-right: 0; 425 | } 426 | } 427 | @media (max-width: 992px) and (min-width: 768px) 428 | { 429 | .navbar .nav{ 430 | max-width:80% 431 | } 432 | .nav-center.navbar .nav{ 433 | max-width:100% 434 | } 435 | } 436 | @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {.b-parallax{background-attachment:scroll;}} 437 | @media (max-width: 991px) 438 | { 439 | .container{width:100%;} 440 | .b-parallax{background-attachment:scroll;} 441 | .page-container, #hero-bloc{overflow-x: hidden;position: relative;} /* Prevent unwanted side scroll on mobile */ 442 | .bloc{padding-left: constant(safe-area-inset-left);padding-right: constant(safe-area-inset-right);} /* iPhone X Notch Support*/ 443 | .bloc-group, .bloc-group .bloc{display:block;width:100%;} 444 | .bloc-fill-screen .fill-bloc-top-edge, .bloc-fill-screen .fill-bloc-bottom-edge{padding:0 20px;padding-left: constant(safe-area-inset-left);padding-right: constant(safe-area-inset-right);} 445 | } 446 | @media (max-width: 767px) 447 | { 448 | .page-container{ 449 | overflow-x: hidden; 450 | position:relative; 451 | } 452 | h1,h2,h3,h4,h5,h6,p,#disqus_thread{ 453 | padding-left:10px!important; 454 | padding-right:10px!important; 455 | } 456 | .b-parallax{ 457 | background-attachment:scroll; 458 | } 459 | .navbar .nav{ 460 | padding-top: 0; 461 | border-top:1px solid rgba(0,0,0,.2); 462 | float:none!important; 463 | } 464 | .navbar.row{ 465 | margin-left: 0; 466 | margin-right: 0; 467 | } 468 | .site-navigation{ 469 | position:inherit; 470 | transform:none; 471 | -webkit-transform:none; 472 | -ms-transform:none; 473 | } 474 | .nav > li{ 475 | margin-top: 0; 476 | border-bottom:1px solid rgba(0,0,0,.1); 477 | background:rgba(0,0,0,.05); 478 | text-align: left; 479 | padding-left:15px; 480 | width:100%; 481 | } 482 | .nav > li:hover{ 483 | background:rgba(0,0,0,.08); 484 | } 485 | .dropdown .dropdown a .caret{ 486 | float: none; 487 | margin: 5px 0 0 10px!important; 488 | border: 4px solid black; 489 | border-bottom-color: transparent; 490 | border-right-color: transparent; 491 | border-left-color: transparent; 492 | } 493 | 494 | #hero-bloc .navbar .nav{ 495 | background:rgba(0,0,0,.8); 496 | } 497 | #hero-bloc .navbar .nav a{ 498 | color:rgba(255,255,255,.6); 499 | } 500 | .hero{ 501 | padding:50px 0; 502 | } 503 | .hero-nav{ 504 | left:-1px; 505 | right:-1px; 506 | } 507 | .navbar-collapse{ 508 | padding:0; 509 | overflow-x: hidden; 510 | -webkit-box-shadow: none; 511 | box-shadow: none; 512 | } 513 | .navbar-brand img{ 514 | max-height: 40px; 515 | width:auto; 516 | } 517 | .nav-invert .navbar-header{ 518 | float: none; 519 | width:100%; 520 | } 521 | .nav-invert .navbar-toggle{ 522 | float:left; 523 | margin-left:10px; 524 | } 525 | .bloc{ 526 | padding-left: 0; 527 | padding-right: 0; 528 | } 529 | .bloc-xxl,.bloc-xl,.bloc-lg{ 530 | padding: 40px 0; 531 | } 532 | .bloc-sm,.bloc-md{ 533 | padding-left: 0; 534 | padding-right: 0; 535 | } 536 | .bloc-tile-2 .container, .bloc-tile-3 .container, .bloc-tile-4 .container, .bloc-fill-screen .fill-bloc-top-edge, .bloc-fill-screen .fill-bloc-bottom-edge{ 537 | padding-left:0;padding-right:0; 538 | } 539 | .a-block{ 540 | padding:0 10px; 541 | } 542 | .btn-dwn{ 543 | display:none; 544 | } 545 | .voffset{ 546 | margin-top:5px; 547 | } 548 | .voffset-md{ 549 | margin-top:20px; 550 | } 551 | .voffset-lg{ 552 | margin-top:30px; 553 | } 554 | form{ 555 | padding:5px; 556 | } 557 | .close-lightbox{ 558 | display:inline-block; 559 | } 560 | .video-bg-container{ 561 | display:none; 562 | } 563 | .blocsapp-device-iphone5{ 564 | background-size: 216px 425px; 565 | padding-top:60px; 566 | width:216px; 567 | height:425px; 568 | } 569 | .blocsapp-device-iphone5 img{ 570 | width: 180px; 571 | height: 320px; 572 | } 573 | } 574 | 575 | @media (max-width: 400px) 576 | { 577 | .bloc{ 578 | padding-left: 0; 579 | padding-right: 0; 580 | } 581 | } 582 | @media (max-width: 767px){ 583 | .blocs-mobile-signup-text{ 584 | text-align:center; 585 | } 586 | } 587 | 588 | -------------------------------------------------------------------------------- /Demo_Webpage/static/css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} 5 | -------------------------------------------------------------------------------- /Demo_Webpage/static/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); --------------------------------------------------------------------------------
192 | Copyright © lmcmz 193 |
'+targetLightbox.attr("data-caption")+"
306 | Copyright © lmcmz 307 |