├── public ├── .gitkeep └── assets │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ ├── css │ └── bootstrap-datetimepicker.min.css │ └── js │ ├── moment.min.js │ ├── bootstrap.min.js │ └── bootstrap-datetimepicker.min.js ├── tests └── .gitkeep ├── .gitignore ├── phpspec.yml ├── .travis.yml ├── src └── Cornford │ └── Bootstrapper │ ├── Facades │ └── BootstrapFacade.php │ ├── Contracts │ ├── IncludableInterface.php │ ├── LinkableInterface.php │ ├── AlertableInterface.php │ └── FormableInterface.php │ ├── BootstrapServiceProvider.php │ ├── Bootstrap.php │ └── BootstrapBase.php ├── phpunit.xml ├── composer.json ├── LICENSE.txt ├── .scrutinizer.yml ├── README.md └── spec └── Cornford └── Bootstrapper └── BootstrapSpec.php /public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | composer.phar 3 | composer.lock 4 | .DS_Store 5 | .idea 6 | -------------------------------------------------------------------------------- /phpspec.yml: -------------------------------------------------------------------------------- 1 | suites: 2 | cornford_suite: 3 | namespace: Cornford 4 | src_path: src 5 | spec_prefix: spec -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradcornford/Bootstrapper/HEAD/public/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradcornford/Bootstrapper/HEAD/public/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradcornford/Bootstrapper/HEAD/public/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bradcornford/Bootstrapper/HEAD/public/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | dist: trusty 3 | 4 | php: 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | 9 | before_script: 10 | - composer self-update 11 | - composer install --prefer-source --no-interaction --dev 12 | 13 | script: vendor/bin/phpspec run -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/Facades/BootstrapFacade.php: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | ./tests/ 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/Contracts/IncludableInterface.php: -------------------------------------------------------------------------------- 1 | =5.4.0", 14 | "laravelcollective/html": "5.*", 15 | "illuminate/support": "5.*", 16 | "illuminate/http": "5.*" 17 | }, 18 | "require-dev": { 19 | "phpspec/phpspec": "2.0.*@dev", 20 | "mockery/mockery": "~0.9.1" 21 | }, 22 | "autoload": { 23 | "psr-0": { 24 | "Cornford\\Bootstrapper": "src/" 25 | } 26 | }, 27 | "minimum-stability": "stable" 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Bradley Cornford 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | filter: 2 | excluded_paths: 3 | - 'spec/*' 4 | paths: { } 5 | tools: 6 | php_sim: 7 | enabled: true 8 | min_mass: 16 9 | filter: 10 | excluded_paths: 11 | - 'spec/*' 12 | paths: { } 13 | php_pdepend: 14 | enabled: true 15 | configuration_file: null 16 | suffixes: 17 | - php 18 | excluded_dirs: { } 19 | filter: 20 | excluded_paths: 21 | - 'spec/*' 22 | paths: { } 23 | php_analyzer: 24 | enabled: true 25 | extensions: 26 | - php 27 | dependency_paths: { } 28 | filter: 29 | excluded_paths: 30 | - 'spec/*' 31 | paths: { } 32 | path_configs: { } 33 | php_changetracking: 34 | enabled: true 35 | bug_patterns: 36 | - '\bfix(?:es|ed)?\b' 37 | feature_patterns: 38 | - '\badd(?:s|ed)?\b' 39 | - '\bimplement(?:s|ed)?\b' 40 | filter: 41 | excluded_paths: 42 | - 'spec/*' 43 | paths: { } 44 | before_commands: { } 45 | after_commands: { } 46 | artifacts: { } 47 | build_failure_conditions: { } -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/BootstrapServiceProvider.php: -------------------------------------------------------------------------------- 1 | publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); 23 | } 24 | 25 | /** 26 | * Register the service provider. 27 | * 28 | * @return void 29 | */ 30 | public function register() 31 | { 32 | $this->app->singleton('bootstrap', function($app) 33 | { 34 | return new Bootstrap( 35 | $this->app->make('Collective\Html\FormBuilder', ['csrfToken' => $app['session.store']->token()]), 36 | $this->app->make('Collective\Html\HtmlBuilder'), 37 | $this->app->make('Illuminate\Http\Request') 38 | ); 39 | }); 40 | } 41 | 42 | /** 43 | * Get the services provided by the provider. 44 | * 45 | * @return string[] 46 | */ 47 | public function provides() 48 | { 49 | return array('bootstrap'); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/Contracts/LinkableInterface.php: -------------------------------------------------------------------------------- 1 | 'Collective\Html\FormFacade', 68 | 'HTML' => 'Collective\Html\HtmlFacade', 69 | 'Bootstrap' => 'Cornford\Bootstrapper\Facades\Bootstrap', 70 | 71 | If you want to introduce the packages JavaScripts and Stylesheets, run the following command to pull them into your project. 72 | 73 | php artisan vendor:publish --provider="Cornford\\Bootstrapper\\BootstrapServiceProvider" 74 | 75 | That's it! You're all set to go. 76 | 77 | ## Usage 78 | 79 | In order to include the Bootstrap dependencies you will need to utilise the Bootstrap::css() and Bootstrap:js() methods in the head section of your layout / page template. 80 | 81 | It's really as simple as using the Bootstrap class in any Controller / Model / File you see fit with: 82 | 83 | `Bootstrap::` 84 | 85 | This will give you access to 86 | 87 | - [CSS](#css) 88 | - [JS](#js) 89 | - [Vertical](#vertical) 90 | - [Horizontal](#horizontal) 91 | - [Inline](#inline) 92 | - [Text](#text) 93 | - [Password](#password) 94 | - [Telephone](#telephone) 95 | - [Number](#number) 96 | - [Url](#url) 97 | - [Range](#range) 98 | - [Search](#search) 99 | - [File](#file) 100 | - [Date](#date) 101 | - [Datetime](#datetime) 102 | - [Time](#time) 103 | - [Textarea](#textarea) 104 | - [Select](#select) 105 | - [Checkbox](#checkbox) 106 | - [Radio](#radio) 107 | - [Submit](#submit) 108 | - [Button](#button) 109 | - [Reset](#reset) 110 | - [Link](#link) 111 | - [Secure Link](#secure-link) 112 | - [Link Route](#link-route) 113 | - [Link Action](#link-action) 114 | - [Mailto](#mailto) 115 | - [None Alert](#none-alert) 116 | - [Success Alert](#success-alert) 117 | - [Info Alert](#info-alert) 118 | - [Warning Alert](#warning-alert) 119 | - [Danger Alert](#danger-alert) 120 | 121 | ### CSS 122 | 123 | The `css` method includes Bootstrap CSS via either a CDN / Local file, and pass optional attributes. 124 | 125 | Bootstrap::css(); 126 | Bootstrap::css('local', ['type' => 'text/css']); 127 | 128 | ### JS 129 | 130 | The `js` method includes Bootstrap JS via either a CDN / Local file, and pass optional attributes. 131 | 132 | Bootstrap::js(); 133 | Bootstrap::js('local', ['type' => 'text/javascript']); 134 | 135 | ### Vertical 136 | 137 | The `vertical` method allows a form to be set in a vertical manner. This is the default form type. 138 | The vertical method can be chained before any form element is added and will continue for subsequent form elements until overwritten. 139 | 140 | Bootstrap::vertical(); 141 | Bootstrap::vertical()->text('text', 'Text', 'Value'); 142 | 143 | ### Horizontal 144 | 145 | The `horizontal` method allows a form to be set in a horizontal manner. This form type accepts both an input class and a label class. 146 | The horizontal method can be chained before any form element is added and will continue for subsequent form elements until overwritten. 147 | 148 | Bootstrap::horizontal('col-sm-10', 'col-sm-2'); 149 | Bootstrap::horizontal('col-sm-10', 'col-sm-2')->text('text', 'Text', 'Value'); 150 | 151 | ### Inline 152 | 153 | The `inline` method allows a form to be set in an inline manner. This form type accepts only a label class. 154 | The inline method can be chained before any form element is added and will continue for subsequent form elements until overwritten. 155 | 156 | Bootstrap::inline('sr-only'); 157 | Bootstrap::inline('sr-only')->text('text', 'Text', 'Value'); 158 | 159 | ### Text 160 | 161 | The `text` method generates a text field with an optional label, from errors and options. 162 | 163 | Bootstrap::text('text', 'Text', 'Value', $errors); 164 | 165 | ### Password 166 | 167 | The `password` method generates a password field with an optional label, from errors and options. 168 | 169 | Bootstrap::password('password', 'Password'); 170 | 171 | ### Email 172 | 173 | The `email` method generates an email field with an optional label, from errors and options. 174 | 175 | Bootstrap::email('email', 'Email address', 'Value'); 176 | 177 | ### Telephone 178 | 179 | The `telephone` method generates an tel field with an optional label, from errors and options. 180 | 181 | Bootstrap::telephone('telephone', 'Telephone Number', 'Value', $errors, array('pattern' => '^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$')); 182 | 183 | ### Number 184 | 185 | The `number` method generates an number field with an optional label, from errors and options. 186 | 187 | Bootstrap::number('number', 'Number', 'Value', $errors, array('min' => 1, 'max' => 10, 'step' => 2)); 188 | 189 | ### Url 190 | 191 | The `url` method generates an url field with an optional label, from errors and options. 192 | 193 | Bootstrap::url('url', 'URL', 'Value', $errors, array('pattern' => '^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?')); 194 | 195 | ### Range 196 | 197 | The `range` method generates an number field with an optional label, from errors and options. 198 | 199 | Bootstrap::range('range', 'Range', 'Value', $errors, array('min' => 1, 'max' => 10, 'step' => 2)); 200 | 201 | ### Search 202 | 203 | The `search` method generates an search field and icon with an optional label, from errors and options. 204 | 205 | Bootstrap::number('search', 'Search', 'Value'); 206 | 207 | ### File 208 | 209 | The `file` method generates a file field with an optional label, from errors and options. 210 | 211 | Bootstrap::file('file', 'File'); 212 | 213 | ### Date 214 | 215 | The `date` method generates a date field with a date picker, with an optional label, from errors, input options, and javascript parameters. 216 | 217 | Bootstrap::date('date', 'Date'); 218 | Bootstrap::date('date', 'Date', date('d-m-Y'), $errors, [], ['format' => 'DD-MM-YYYY']); 219 | 220 | ### Datetime 221 | 222 | The `datetime` method generates a date field with a datetime picker, with an optional label, from errors, input options, and javascript parameters. 223 | 224 | Bootstrap::datetime('datetime', 'Date'); 225 | Bootstrap::datetime('datetime', 'Date', date('d-m-Y H:i:s')); 226 | 227 | ### Time 228 | 229 | The `time` method generates a date field with a time picker, with an optional label, from errors, input options, and javascript parameters. 230 | 231 | Bootstrap::time('time', 'Time'); 232 | Bootstrap::time('time', 'Time', date('H:i:s')); 233 | 234 | ### Textarea 235 | 236 | The `textarea` method generates a textarea field with an optional label, from errors and options. 237 | 238 | Bootstrap::textarea('file', 'File', 'Value'); 239 | 240 | ### Select 241 | 242 | The `select` method generates a select field with items and an optional label, selected item, from errors and options. 243 | 244 | Bootstrap::select('select', 'Select', ['1' => 'Item 1', '2' => 'Item 2'], 2); 245 | 246 | ### Checkbox 247 | 248 | The `checkbox` method generates a checkbox field with a value and an optional label, checked and options. 249 | 250 | Bootstrap::checkbox('checkbox', 'Checkbox', 1, true); 251 | 252 | ### Radio 253 | 254 | The `radio` method generates a radio field with a value and an optional label, checked and options. 255 | 256 | Bootstrap::checkbox('radio', 'Radio', 1); 257 | 258 | ### Submit 259 | 260 | The `submit` method generates a submit button with a value and optional attributes. 261 | 262 | Bootstrap::submit('Submit'); 263 | 264 | ### Button 265 | 266 | The `button` method generates a button with a value and optional attributes. 267 | 268 | Bootstrap::button('Button'); 269 | 270 | ### Reset 271 | 272 | The `reset` method generates a reset button with a value and optional attributes. 273 | 274 | Bootstrap::reset('Reset'); 275 | 276 | ### Link 277 | 278 | The `link` method generates a link button with a url, title and optional attributes and secure link. 279 | 280 | Bootstrap::link('/', 'Link'); 281 | 282 | ### Secure Link 283 | 284 | The `secureLink` method generates a secure link button with a url, title and optional attributes and secure link. 285 | 286 | Bootstrap::secureLink('/', 'Link'); 287 | 288 | ### Link Route 289 | 290 | The `linkRoute` method generates a link button with a route, title and optional parameters, attributes. 291 | 292 | Bootstrap::linkRoute('home', 'Home'); 293 | 294 | ### Link Action 295 | 296 | The `linkAction` method generates a link button with an action, title and optional parameters, attributes. 297 | 298 | Bootstrap::linkAction('index', 'Home'); 299 | 300 | ### Mailto 301 | 302 | The `mailto` method generates a mailto link button with an email address, title and optional attributes. 303 | 304 | Bootstrap::mailto('test@test.com', 'Email'); 305 | 306 | ### None Alert 307 | 308 | The `none` method generates a none alert with content with optional emphasis, optionally be dismissible, and optional attributes. 309 | 310 | Bootstrap::none('A message', null, true); 311 | 312 | ### Success Alert 313 | 314 | The `success` method generates a success alert with content with optional emphasis, optionally be dismissible, and optional attributes. 315 | 316 | Bootstrap::success('A success message', 'Well done!', true); 317 | 318 | ### Info Alert 319 | 320 | The `info` method generates an info alert with content with optional emphasis, optionally be dismissible, and optional attributes. 321 | 322 | Bootstrap::info('An info message', 'Heads up!', true); 323 | 324 | ### Warning Alert 325 | 326 | The `warning` method generates a warning alert with content with optional emphasis, optionally be dismissible, and optional attributes. 327 | 328 | Bootstrap::warning('A warning message', 'Warning!', true); 329 | 330 | ### Danger Alert 331 | 332 | The `danger` method generates a danger alert with content with optional emphasis, optionally be dismissible, and optional attributes. 333 | 334 | Bootstrap::danger('A danger message', 'Oh snap!', true); 335 | 336 | ### License 337 | 338 | Bootstrapper is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) 339 | -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/Bootstrap.php: -------------------------------------------------------------------------------- 1 | add('style', self::CSS_BOOTSTRAP_CDN, $attributes) . 24 | $this->add('style', self::CSS_DATETIME_CDN, $attributes); 25 | break; 26 | case 'local': 27 | default: 28 | $return = $this->add('style', asset(self::CSS_BOOTSTRAP_LOCAL), $attributes) . 29 | $this->add('style', asset(self::CSS_DATETIME_LOCAL), $attributes); 30 | } 31 | 32 | return $return; 33 | } 34 | 35 | /** 36 | * Include the Bootstrap CDN JS file. Include jQuery CDN / Local JS file. 37 | * 38 | * @param string $type 39 | * @param array $attributes 40 | * 41 | * @return string 42 | */ 43 | public function js($type = 'cdn', array $attributes = array()) 44 | { 45 | switch($type) 46 | { 47 | case 'cdn': 48 | $return = $this->add('script', self::JS_JQUERY_CDN, $attributes) . 49 | $this->add('script', self::JS_BOOTSTRAP_CDN, $attributes) . 50 | $this->add('script', self::JS_MOMENT_CDN, $attributes) . 51 | $this->add('script', self::JS_DATETIME_CDN, $attributes); 52 | break; 53 | case 'local': 54 | default: 55 | $return = $this->add('script', asset(self::JS_JQUERY_LOCAL), $attributes) . 56 | $this->add('script', asset(self::JS_BOOTSTRAP_LOCAL), $attributes) . 57 | $this->add('script', asset(self::JS_MOMENT_LOCAL), $attributes) . 58 | $this->add('script', asset(self::JS_DATETIME_LOCAL), $attributes); 59 | } 60 | 61 | return $return; 62 | } 63 | 64 | /** 65 | * Create a form text field. 66 | * 67 | * @param string $name 68 | * @param string $label 69 | * @param string $value 70 | * @param \Illuminate\Support\MessageBag $errors 71 | * @param array $options 72 | * 73 | * @return string 74 | */ 75 | public function text($name, $label = null, $value = null, $errors = null, array $options = array()) 76 | { 77 | return $this->input('text', $name, $label, $value, $errors, $options); 78 | } 79 | 80 | /** 81 | * Create a form password field. 82 | * 83 | * @param string $name 84 | * @param string $label 85 | * @param \Illuminate\Support\MessageBag $errors 86 | * @param array $options 87 | * 88 | * @return string 89 | */ 90 | public function password($name, $label = null, $errors = null, array $options = array()) 91 | { 92 | return $this->input('password', $name, $label, null, $errors, $options); 93 | } 94 | 95 | /** 96 | * Create a form email field. 97 | * 98 | * @param string $name 99 | * @param string $label 100 | * @param string $value 101 | * @param \Illuminate\Support\MessageBag $errors 102 | * @param array $options 103 | * 104 | * @return string 105 | */ 106 | public function email($name, $label = null, $value = null, $errors = null, array $options = array()) 107 | { 108 | return $this->input('email', $name, $label, $value, $errors, $options); 109 | } 110 | 111 | /** 112 | * Create a form telephone field. 113 | * 114 | * @param string $name 115 | * @param string $label 116 | * @param string $value 117 | * @param \Illuminate\Support\MessageBag $errors 118 | * @param array $options 119 | * 120 | * @return string 121 | */ 122 | public function telephone($name, $label = null, $value = null, $errors = null, array $options = array()) 123 | { 124 | return $this->input('telephone', $name, $label, $value, $errors, $options); 125 | } 126 | 127 | /** 128 | * Create a form number field. 129 | * 130 | * @param string $name 131 | * @param string $label 132 | * @param string $value 133 | * @param \Illuminate\Support\MessageBag $errors 134 | * @param array $options 135 | * 136 | * @return string 137 | */ 138 | public function number($name, $label = null, $value = null, $errors = null, array $options = array()) 139 | { 140 | return $this->input('number', $name, $label, $value, $errors, $options); 141 | } 142 | 143 | /** 144 | * Create a form url field. 145 | * 146 | * @param string $name 147 | * @param string $label 148 | * @param string $value 149 | * @param \Illuminate\Support\MessageBag $errors 150 | * @param array $options 151 | * 152 | * @return string 153 | */ 154 | public function url($name, $label = null, $value = null, $errors = null, array $options = array()) 155 | { 156 | return $this->input('url', $name, $label, $value, $errors, $options); 157 | } 158 | 159 | /** 160 | * Create a form range field. 161 | * 162 | * @param string $name 163 | * @param string $label 164 | * @param string $value 165 | * @param \Illuminate\Support\MessageBag $errors 166 | * @param array $options 167 | * 168 | * @return string 169 | */ 170 | public function range($name, $label = null, $value = null, $errors = null, array $options = array()) 171 | { 172 | return $this->input('range', $name, $label, $value, $errors, $options); 173 | } 174 | 175 | /** 176 | * Create a form search field. 177 | * 178 | * @param string $name 179 | * @param string $label 180 | * @param string $value 181 | * @param \Illuminate\Support\MessageBag $errors 182 | * @param array $options 183 | * 184 | * @return string 185 | */ 186 | public function search($name, $label = null, $value = null, $errors = null, array $options = array()) 187 | { 188 | return $this->input('search', $name, $label, $value, $errors, $options); 189 | } 190 | 191 | /** 192 | * Create a form file field. 193 | * 194 | * @param string $name 195 | * @param string $label 196 | * @param \Illuminate\Support\MessageBag $errors 197 | * @param array $options 198 | * 199 | * @return string 200 | */ 201 | public function file($name, $label = null, $errors = null, array $options = array()) 202 | { 203 | return $this->input('file', $name, $label, null, $errors, $options); 204 | } 205 | 206 | /** 207 | * Create a form date field. 208 | * 209 | * @param string $name 210 | * @param string $label 211 | * @param string $value 212 | * @param \Illuminate\Support\MessageBag $errors 213 | * @param array $options 214 | * @param array $parameters 215 | * 216 | * @return string 217 | */ 218 | public function date($name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array()) 219 | { 220 | return $this->input('date', $name, $label, $value, $errors, $options, $parameters); 221 | } 222 | 223 | /** 224 | * Create a form datetime field. 225 | * 226 | * @param string $name 227 | * @param string $label 228 | * @param string $value 229 | * @param \Illuminate\Support\MessageBag $errors 230 | * @param array $options 231 | * @param array $parameters 232 | * 233 | * @return string 234 | */ 235 | public function datetime($name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array()) 236 | { 237 | return $this->input('datetime', $name, $label, $value, $errors, $options, $parameters); 238 | } 239 | 240 | /** 241 | * Create a form time field. 242 | * 243 | * @param string $name 244 | * @param string $label 245 | * @param string $value 246 | * @param \Illuminate\Support\MessageBag $errors 247 | * @param array $options 248 | * @param array $parameters 249 | * 250 | * @return string 251 | */ 252 | public function time($name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array()) 253 | { 254 | return $this->input('time', $name, $label, $value, $errors, $options, $parameters); 255 | } 256 | 257 | /** 258 | * Create a form textarea field. 259 | * 260 | * @param string $name 261 | * @param string $label 262 | * @param string $value 263 | * @param \Illuminate\Support\MessageBag $errors 264 | * @param array $options 265 | * 266 | * @return string 267 | */ 268 | public function textarea($name, $label = null, $value = null, $errors = null, array $options = array()) 269 | { 270 | return $this->input('textarea', $name, $label, $value, $errors, $options); 271 | } 272 | 273 | /** 274 | * Create a form select field. 275 | * 276 | * @param string $name 277 | * @param string $label 278 | * @param array $list 279 | * @param string $selected 280 | * @param \Illuminate\Support\MessageBag $errors 281 | * @param array $options 282 | * 283 | * @return string 284 | */ 285 | public function select($name, $label = null, array $list = array(), $selected = null, $errors = null, array $options = array()) 286 | { 287 | return $this->options($name, $label, $list, $selected, $errors, $options); 288 | } 289 | 290 | /** 291 | * Create a form field. 292 | * 293 | * @param string $name 294 | * @param string $label 295 | * @param integer $value 296 | * @param string $checked 297 | * @param array $options 298 | * 299 | * @return string 300 | */ 301 | public function checkbox($name, $label = null, $value = 1, $checked = null, array $options = array()) 302 | { 303 | return $this->field('checkbox', $name, $label, $value, $checked, $options); 304 | } 305 | 306 | /** 307 | * Create a form radio field. 308 | * 309 | * @param string $name 310 | * @param string $label 311 | * @param string $value 312 | * @param string $checked 313 | * @param array $options 314 | * 315 | * @return string 316 | */ 317 | public function radio($name, $label = null, $value = null, $checked = null, array $options = array()) 318 | { 319 | return $this->field('radio', $name, $label, $value, $checked, $options); 320 | } 321 | 322 | /** 323 | * Create a form submit button. 324 | * 325 | * @param string $value 326 | * @param array $attributes 327 | * 328 | * @return string 329 | */ 330 | public function submit($value, array $attributes = array()) 331 | { 332 | return $this->action('submit', $value, $attributes); 333 | } 334 | 335 | /** 336 | * Create a form button. 337 | * 338 | * @param string $value 339 | * @param array $attributes 340 | * 341 | * @return string 342 | */ 343 | public function button($value, array $attributes = array()) 344 | { 345 | return $this->action('button', $value, $attributes); 346 | } 347 | 348 | /** 349 | * Create a form reset button. 350 | * 351 | * @param string $value 352 | * @param array $attributes 353 | * 354 | * @return string 355 | */ 356 | public function reset($value, array $attributes = array()) 357 | { 358 | return $this->action('reset', $value, $attributes); 359 | } 360 | 361 | /** 362 | * Create a button link to url. 363 | * 364 | * @param string $url 365 | * @param string $title 366 | * @param array $attributes 367 | * @param string $secure 368 | * 369 | * @return string 370 | */ 371 | public function link($url, $title = null, array $attributes = array(), $secure = null) 372 | { 373 | return $this->hyperlink('link', $url, $title, $parameters = array(), $attributes, $secure); 374 | } 375 | 376 | /** 377 | * Create a secure button link to url. 378 | * 379 | * @param string $url 380 | * @param string $title 381 | * @param array $attributes 382 | * @param string $secure 383 | * 384 | * @return string 385 | */ 386 | public function secureLink($url, $title = null, array $attributes = array(), $secure = null) 387 | { 388 | return $this->hyperlink('secureLink', $url, $title, array(), $attributes, $secure); 389 | } 390 | 391 | /** 392 | * Create a button link to route. 393 | * 394 | * @param string $name 395 | * @param string $title 396 | * @param array $parameters 397 | * @param array $attributes 398 | * 399 | * @return string 400 | */ 401 | public function linkRoute($name, $title = null, array $parameters = array(), array $attributes = array()) 402 | { 403 | return $this->hyperlink('linkRoute', $name, $title, $parameters, $attributes, null); 404 | } 405 | 406 | /** 407 | * Create a button link to action. 408 | * 409 | * @param string $action 410 | * @param string $title 411 | * @param array $parameters 412 | * @param array $attributes 413 | * 414 | * @return string 415 | */ 416 | public function linkAction($action, $title = null, array $parameters = array(), array $attributes = array()) 417 | { 418 | return $this->hyperlink('linkAction', $action, $title, $parameters, $attributes, null); 419 | } 420 | 421 | /** 422 | * Create a button link to an email address. 423 | * 424 | * @param string $email 425 | * @param string $title 426 | * @param array $attributes 427 | * 428 | * @return string 429 | */ 430 | public function mailto($email, $title = null, array $attributes = array()) 431 | { 432 | return $this->hyperlink('mailto', $email, $title, array(), $attributes, null); 433 | } 434 | 435 | /** 436 | * Create a none alert item. 437 | * 438 | * @param string $content 439 | * @param string $emphasis 440 | * @param boolean $dismissible 441 | * @param array $attributes 442 | * 443 | * @return string 444 | */ 445 | public function none($content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 446 | { 447 | return $this->alert('message', $content, $emphasis, $dismissible, $attributes); 448 | } 449 | 450 | /** 451 | * Create a success alert item. 452 | * 453 | * @param string $content 454 | * @param string $emphasis 455 | * @param boolean $dismissible 456 | * @param array $attributes 457 | * 458 | * @return string 459 | */ 460 | public function success($content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 461 | { 462 | return $this->alert('success', $content, $emphasis, $dismissible, $attributes); 463 | } 464 | 465 | /** 466 | * Create an info alert item. 467 | * 468 | * @param string $content 469 | * @param string $emphasis 470 | * @param boolean $dismissible 471 | * @param array $attributes 472 | * 473 | * @return string 474 | */ 475 | public function info($content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 476 | { 477 | return $this->alert('info', $content, $emphasis, $dismissible, $attributes); 478 | } 479 | 480 | /** 481 | * Create a warning alert item. 482 | * 483 | * @param string $content 484 | * @param string $emphasis 485 | * @param boolean $dismissible 486 | * @param array $attributes 487 | * 488 | * @return string 489 | */ 490 | public function warning($content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 491 | { 492 | return $this->alert('warning', $content, $emphasis, $dismissible, $attributes); 493 | } 494 | 495 | /** 496 | * Create a danger alert item. 497 | * 498 | * @param string $content 499 | * @param string $emphasis 500 | * @param boolean $dismissible 501 | * @param array $attributes 502 | * 503 | * @return string 504 | */ 505 | public function danger($content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 506 | { 507 | return $this->alert('danger', $content, $emphasis, $dismissible, $attributes); 508 | } 509 | 510 | } -------------------------------------------------------------------------------- /src/Cornford/Bootstrapper/BootstrapBase.php: -------------------------------------------------------------------------------- 1 | form = $form; 78 | $this->html = $html; 79 | $this->input = $input; 80 | } 81 | 82 | /** 83 | * Set the form type 84 | * 85 | * @param string $type 86 | * @param string $inputClass 87 | * @param string $labelClass 88 | * 89 | * @return void 90 | */ 91 | protected function form($type = self::FORM_VERTICAL, $inputClass = '', $labelClass = '') { 92 | $this->formType = $type; 93 | $this->inputClass = $inputClass; 94 | $this->labelClass = $labelClass; 95 | } 96 | 97 | /** 98 | * Set the form type to vertical 99 | * 100 | * @return self 101 | */ 102 | public function vertical() { 103 | $this->form(); 104 | 105 | return $this; 106 | } 107 | 108 | /** 109 | * Set the form type to horizontal 110 | * 111 | * @param string $inputClass 112 | * @param string $labelClass 113 | * 114 | * @return self 115 | */ 116 | public function horizontal($inputClass = '', $labelClass = '') { 117 | $this->form(self::FORM_HORIZONTAL, $inputClass, $labelClass); 118 | 119 | return $this; 120 | } 121 | 122 | /** 123 | * Set the form type to inline 124 | * 125 | * @param string $labelClass 126 | * 127 | * @return self 128 | */ 129 | public function inline($labelClass = '') { 130 | $this->form(self::FORM_INLINE, '', $labelClass); 131 | 132 | return $this; 133 | } 134 | 135 | /** 136 | * Get the form type 137 | * 138 | * @return string 139 | */ 140 | public function getFormType() { 141 | return $this->formType; 142 | } 143 | 144 | /** 145 | * Include the Bootstrap file 146 | * 147 | * @param string $type 148 | * @param string $location 149 | * @param array $attributes 150 | * 151 | * @return string 152 | */ 153 | protected function add($type, $location, array $attributes = array()) 154 | { 155 | return $this->html->$type($location, $attributes); 156 | } 157 | 158 | /** 159 | * Create a form label field. 160 | * 161 | * @param string $name 162 | * @param string $label 163 | * @param array $options 164 | * @param string $content 165 | * 166 | * @return string 167 | */ 168 | protected function label($name, $label = null, array $options = array(), $content = null) { 169 | $return = ''; 170 | $options = array_merge(array('class' => 'control-label ' . $this->labelClass, 'for' => (!$content ? $name : null)), $options); 171 | 172 | if ($label !== null) { 173 | $return .= 'html->attributes($options) . '>' . $content . ucwords(str_replace('_', ' ', $label)) . '' . "\n"; 174 | } 175 | 176 | return $return; 177 | } 178 | 179 | /** 180 | * Create a form error helper field. 181 | * 182 | * @param string $name 183 | * @param \Illuminate\Support\MessageBag $errors 184 | * @param string $wrap 185 | * 186 | * @return string 187 | */ 188 | protected function errors($name, $errors = null, $wrap = ':message') { 189 | $return = ''; 190 | 191 | if ($errors && $errors->has($name)) { 192 | $return .= $errors->first($name, $wrap) . "\n"; 193 | } 194 | 195 | return $return; 196 | } 197 | 198 | /** 199 | * Create a form group element. 200 | * 201 | * @param string $name 202 | * @param \Illuminate\Support\MessageBag $errors 203 | * @param string $class 204 | * @param array $options 205 | * 206 | * @return string 207 | */ 208 | protected function group($name, $errors = null, $class = 'form-group', array $options = array()) 209 | { 210 | $options = array_merge(array('class' => $class), $options); 211 | $options['class'] .= ($errors && $errors->has($name) ? ' has-error' : ''); 212 | $return = 'html->attributes($options) . '>' . "\n"; 213 | 214 | return $return; 215 | } 216 | 217 | /** 218 | * Create a form input field. 219 | * 220 | * @param string $type 221 | * @param string $name 222 | * @param string $value 223 | * @param string $label 224 | * @param \Illuminate\Support\MessageBag $errors 225 | * @param array $options 226 | * @param array $parameters 227 | * 228 | * @return string 229 | */ 230 | protected function input($type = 'text', $name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array()) 231 | { 232 | $return = ''; 233 | $options = array_merge(array('class' => 'form-control', 'placeholder' => $label, 'id' => $name), $options); 234 | $containerAttributes = $this->getContainerAttributes($options); 235 | $labelAttributes = $this->getLabelAttributes($options); 236 | 237 | if (!isset($containerAttributes['display'])) { 238 | $return .= $this->group($name, $errors, 'form-group', $containerAttributes); 239 | } 240 | 241 | if ($type != 'search') { 242 | $return .= $this->label($name, $label, $labelAttributes); 243 | } 244 | 245 | if ($value === null) { 246 | $value = $this->input->get($name); 247 | } 248 | 249 | if ($this->formType == self::FORM_HORIZONTAL) { 250 | $return .= $this->group('', null, $this->inputClass); 251 | } 252 | 253 | switch ($type) { 254 | case 'datetime': 255 | case 'date': 256 | case 'time': 257 | if (isset($parameters['displayIcon']) && !$parameters['displayIcon']) { 258 | unset($parameters['displayIcon']); 259 | $return .= $this->form->text($name, $value, $options); 260 | } else { 261 | $return .= '
'; 262 | $return .= $this->form->text($name, $value, $options); 263 | $return .= '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"; 264 | } 265 | 266 | $return .= '' . "\n"; 282 | break; 283 | case 'password': 284 | case 'file': 285 | unset($options['placeholder']); 286 | $return .= $this->form->$type($name, $options) . "\n"; 287 | break; 288 | case 'search': 289 | $return .= '
' . "\n"; 290 | $return .= $this->form->input('search', $name, $value, $options) . "\n"; 291 | $return .= '
' . "\n"; 292 | $return .= '' . "\n"; 293 | $return .= '
' . "\n"; 294 | $return .= '
' . "\n"; 295 | break; 296 | case 'telephone': 297 | $return .= $this->form->input('tel', $name, $value, $options) . "\n"; 298 | break; 299 | case 'range': 300 | $return .= '
' . "\n"; 301 | $return .= '
' . "\n"; 302 | $return .= $this->form->input('range', $name, $value, array_merge($options, array('class' => '', 'onchange' => $name . 'value.value=value', 'oninput' => $name . 'value.value=value'))) . "\n"; 303 | $return .= '
' . "\n"; 304 | $return .= '0' . "\n"; 305 | $return .= '
' . "\n"; 306 | break; 307 | case 'text': 308 | case 'hidden': 309 | case 'email': 310 | case 'textarea': 311 | $return .= $this->form->$type($name, $value, $options) . "\n"; 312 | break; 313 | default: 314 | $return .= $this->form->input($type, $name, $value, $options) . "\n"; 315 | } 316 | 317 | $return .= $this->errors($name, $errors); 318 | 319 | if ($this->formType == self::FORM_HORIZONTAL) { 320 | $return .= '' . "\n"; 321 | } 322 | 323 | if (!isset($containerAttributes['display'])) { 324 | $return .= '' . "\n"; 325 | } 326 | 327 | return $return; 328 | } 329 | 330 | /** 331 | * Create a form select field. 332 | * 333 | * @param string $name 334 | * @param string $label 335 | * @param array $list 336 | * @param string $selected 337 | * @param \Illuminate\Support\MessageBag $errors 338 | * @param array $options 339 | * 340 | * @return string 341 | */ 342 | protected function options($name, $label = null, array $list = array(), $selected = null, $errors = null, array $options = array()) 343 | { 344 | $return = ''; 345 | $options = array_merge(array('class' => 'form-control', 'id' => $name), $options); 346 | $containerAttributes = $this->getContainerAttributes($options); 347 | $labelAttributes = $this->getLabelAttributes($options); 348 | 349 | if (!isset($containerAttributes['display'])) { 350 | $return .= $this->group($name, $errors, 'form-group', $containerAttributes); 351 | } 352 | 353 | $return .= $this->label($name, $label, $labelAttributes); 354 | 355 | if ($this->formType == self::FORM_HORIZONTAL) { 356 | $return .= $this->group('', null, $this->inputClass); 357 | } 358 | 359 | $return .= $this->form->select($name, $list, $selected, $options) . "\n"; 360 | $return .= $this->errors($name, $errors); 361 | 362 | if ($this->formType == self::FORM_HORIZONTAL) { 363 | $return .= '' . "\n"; 364 | } 365 | 366 | if (!isset($containerAttributes['display'])) { 367 | $return .= '' . "\n"; 368 | } 369 | 370 | return $return; 371 | } 372 | 373 | /** 374 | * Create a form field. 375 | * 376 | * @param string $type 377 | * @param string $name 378 | * @param string $label 379 | * @param string $value 380 | * @param string $checked 381 | * @param array $options 382 | * 383 | * @return string 384 | */ 385 | protected function field($type, $name, $label = null, $value = null, $checked = null, array $options = array()) 386 | { 387 | $return = ''; 388 | $options = array_merge(array('id' => $name), $options); 389 | $containerAttributes = $this->getContainerAttributes($options); 390 | $labelAttributes = $this->getLabelAttributes($options); 391 | 392 | if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) { 393 | $return .= $this->group($name, null, 'form-group', $containerAttributes); 394 | } 395 | 396 | if ($this->formType == self::FORM_HORIZONTAL) { 397 | $return .= $this->group('', null, $this->inputClass); 398 | } 399 | 400 | $return .= '
' . "\n"; 401 | $return .= $this->label($name, $label, $labelAttributes, $this->form->$type($name, $value, $checked, $options)); 402 | $return .= '
' . "\n"; 403 | 404 | if ($this->formType == self::FORM_HORIZONTAL) { 405 | $return .= '' . "\n"; 406 | } 407 | 408 | if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) { 409 | $return .= ''; 410 | } 411 | 412 | return $return; 413 | } 414 | 415 | /** 416 | * Create a form action button. 417 | * 418 | * @param string $value 419 | * @param string $type 420 | * @param array $attributes 421 | * 422 | * @return string 423 | */ 424 | protected function action($type, $value, array $attributes = array()) 425 | { 426 | $return = ''; 427 | $containerAttributes = $this->getContainerAttributes($attributes); 428 | 429 | switch ($type) { 430 | case 'submit': 431 | $attributes = array_merge(array('class' => 'btn btn-primary pull-right'), $attributes); 432 | break; 433 | case 'button': 434 | case 'reset': 435 | default: 436 | $attributes = array_merge(array('class' => 'btn btn-default'), $attributes); 437 | } 438 | 439 | if (!isset($containerAttributes['display'])) { 440 | $return .= $this->group('', null, 'form-group', $containerAttributes); 441 | } 442 | 443 | if ($this->formType == self::FORM_HORIZONTAL) { 444 | $return .= $this->group('', null, $this->inputClass); 445 | } 446 | 447 | $return .= $this->form->$type($value, $attributes) . "\n"; 448 | 449 | if ($this->formType == self::FORM_HORIZONTAL) { 450 | $return .= '' . "\n"; 451 | } 452 | 453 | if (!isset($containerAttributes['display'])) { 454 | $return .= '' . "\n"; 455 | } 456 | 457 | return $return; 458 | } 459 | 460 | /** 461 | * Create a button link. 462 | * 463 | * @param string $type 464 | * @param string $location 465 | * @param string $title 466 | * @param array $parameters 467 | * @param string $secure 468 | * @param array $attributes 469 | * 470 | * @return string 471 | */ 472 | protected function hyperlink($type, $location, $title = null, array $parameters = array(), array $attributes = array(), $secure = null) 473 | { 474 | $attributes = array_merge(array('class' => 'btn btn-default'), $attributes); 475 | 476 | switch ($type) { 477 | case 'linkRoute': 478 | case 'linkAction': 479 | $return = $this->html->$type($location, $title, $parameters, $attributes); 480 | break; 481 | case 'mailto': 482 | $return = $this->html->$type($location, $title, $attributes); 483 | break; 484 | case 'link': 485 | case 'secureLink': 486 | default: 487 | $return = $this->html->$type($location, $title, $attributes, $secure); 488 | } 489 | 490 | return $return; 491 | } 492 | 493 | /** 494 | * Create an alert item with optional emphasis. 495 | * 496 | * @param string $type 497 | * @param string $content 498 | * @param string $emphasis 499 | * @param boolean $dismissible 500 | * @param array $attributes 501 | * 502 | * @return string 503 | */ 504 | protected function alert($type = 'message', $content = null, $emphasis = null, $dismissible = false, array $attributes = array()) 505 | { 506 | $attributes = array_merge(array('class' => 'alert' . ($dismissible ? ' alert-dismissable' : '') . ' alert-' . ($type != 'message' ? $type : 'default')), $attributes); 507 | $return = '
html->attributes($attributes) . '>'; 508 | 509 | if ($dismissible !== false) { 510 | $return .= ''; 511 | } 512 | 513 | $return .= ($emphasis !== null && is_string($emphasis) ? '' . $emphasis . ' ' : '') . $content . '
'; 514 | 515 | return $return; 516 | } 517 | 518 | /** 519 | * Get container attributes. 520 | * 521 | * @param array &$attributes 522 | * 523 | * @return array 524 | */ 525 | protected function getContainerAttributes(array &$attributes = array()) 526 | { 527 | $containerAttributes = array(); 528 | 529 | if (isset($attributes['container'])) { 530 | $containerAttributes = $attributes['container']; 531 | unset($attributes['container']); 532 | } 533 | 534 | return $containerAttributes; 535 | } 536 | 537 | /** 538 | * Get label attributes. 539 | * 540 | * @param array &$attributes 541 | * 542 | * @return array 543 | */ 544 | protected function getLabelAttributes(array &$attributes = array()) 545 | { 546 | $labelAttributes = array(); 547 | 548 | if (isset($attributes['label'])) { 549 | $labelAttributes = $attributes['label']; 550 | unset($attributes['label']); 551 | } 552 | 553 | return $labelAttributes; 554 | } 555 | 556 | } 557 | -------------------------------------------------------------------------------- /spec/Cornford/Bootstrapper/BootstrapSpec.php: -------------------------------------------------------------------------------- 1 | shouldReceive('label')->andReturn(''); 13 | $form->shouldReceive('input')->andReturn(''); 14 | $form->shouldReceive('text')->andReturn(''); 15 | $form->shouldReceive('password')->andReturn(''); 16 | $form->shouldReceive('email')->andReturn(''); 17 | $form->shouldReceive('file')->andReturn(''); 18 | $form->shouldReceive('textarea')->andReturn(''); 19 | $form->shouldReceive('select')->andReturn(''); 20 | $form->shouldReceive('checkbox')->andReturn(''); 21 | $form->shouldReceive('radio')->andReturn(''); 22 | $form->shouldReceive('submit')->andReturn(''); 23 | $form->shouldReceive('button')->andReturn(''); 24 | $form->shouldReceive('reset')->andReturn(''); 25 | 26 | $html = Mockery::mock('Collective\Html\HtmlBuilder'); 27 | $html->shouldReceive('attributes')->andReturn(''); 28 | $html->shouldReceive('style')->andReturn(Bootstrap::CSS_BOOTSTRAP_CDN)->once(); 29 | $html->shouldReceive('script')->andReturn(Bootstrap::JS_BOOTSTRAP_CDN)->once(); 30 | $html->shouldReceive('link')->andReturn('title'); 31 | $html->shouldReceive('secureLink')->andReturn('title'); 32 | $html->shouldReceive('linkRoute')->andReturn('title'); 33 | $html->shouldReceive('linkAction')->andReturn('title'); 34 | $html->shouldReceive('mailto')->andReturn('title'); 35 | 36 | $input = Mockery::mock('Illuminate\Http\Request'); 37 | $input->shouldReceive('get')->andReturn(false); 38 | 39 | $this->beConstructedWith($form, $html, $input); 40 | } 41 | 42 | function it_is_initializable() 43 | { 44 | $this->shouldHaveType('Cornford\Bootstrapper\Bootstrap'); 45 | } 46 | 47 | function it_can_have_form_type_vertical() 48 | { 49 | $this->vertical()->shouldReturn($this); 50 | $this->getFormType()->shouldReturn(Bootstrap::FORM_VERTICAL); 51 | } 52 | 53 | function it_can_have_form_type_horizontal() 54 | { 55 | $this->horizontal()->shouldReturn($this); 56 | $this->getFormType()->shouldReturn(Bootstrap::FORM_HORIZONTAL); 57 | } 58 | 59 | function it_can_have_form_type_inline() 60 | { 61 | $this->inline()->shouldReturn($this); 62 | $this->getFormType()->shouldReturn(Bootstrap::FORM_INLINE); 63 | } 64 | 65 | function it_can_get_form_type() 66 | { 67 | $this->getFormType()->shouldReturn(Bootstrap::FORM_VERTICAL); 68 | } 69 | 70 | function it_can_add_a_css_file() 71 | { 72 | $this->css()->shouldReturn(Bootstrap::CSS_BOOTSTRAP_CDN . Bootstrap::CSS_BOOTSTRAP_CDN); 73 | } 74 | 75 | function it_can_add_a_js_file() 76 | { 77 | $this->js()->shouldReturn(Bootstrap::JS_BOOTSTRAP_CDN . Bootstrap::JS_BOOTSTRAP_CDN . Bootstrap::JS_BOOTSTRAP_CDN . Bootstrap::JS_BOOTSTRAP_CDN); 78 | } 79 | 80 | function it_can_create_a_text_input() 81 | { 82 | $this->text('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 83 | } 84 | 85 | function it_can_create_a_text_input_with_out_container() 86 | { 87 | $this->text('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 88 | } 89 | 90 | function it_can_create_a_password_input() 91 | { 92 | $this->password('name', 'Label')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 93 | } 94 | 95 | function it_can_create_a_password_input_with_out_container() 96 | { 97 | $this->password('name', 'Label', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 98 | } 99 | 100 | function it_can_create_an_email_input() 101 | { 102 | $this->email('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 103 | } 104 | 105 | function it_can_create_an_email_input_with_out_container() 106 | { 107 | $this->email('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 108 | } 109 | 110 | function it_can_create_a_telephone_input() 111 | { 112 | $this->telephone('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 113 | } 114 | 115 | function it_can_create_a_telephone_input_with_out_container() 116 | { 117 | $this->telephone('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 118 | } 119 | 120 | function it_can_create_a_number_input() 121 | { 122 | $this->number('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 123 | } 124 | 125 | function it_can_create_a_number_input_with_out_container() 126 | { 127 | $this->number('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 128 | } 129 | 130 | function it_can_create_a_url_input() 131 | { 132 | $this->url('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 133 | } 134 | 135 | function it_can_create_a_url_input_with_out_container() 136 | { 137 | $this->url('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 138 | } 139 | 140 | function it_can_create_a_range_input() 141 | { 142 | $this->range('name', 'Label', 'value', null, array('min' => '1', 'max' => '10'))->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '0' . "\n" . '
' . "\n" . '
' . "\n"); 143 | } 144 | 145 | function it_can_create_a_range_input_with_out_container() 146 | { 147 | $this->range('name', 'Label', 'value', null, array('min' => '1', 'max' => '10', 'container' => array('display' => 'none')))->shouldReturn('' . "\n" . '
' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '0' . "\n" . '
' . "\n"); 148 | } 149 | 150 | function it_can_create_a_search_input() 151 | { 152 | $this->search('name', 'Label', 'value')->shouldReturn('
' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '
' . "\n" . '
' . "\n"); 153 | } 154 | 155 | function it_can_create_a_search_input_with_out_container() 156 | { 157 | $this->search('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '
' . "\n"); 158 | } 159 | 160 | function it_can_create_a_file_input() 161 | { 162 | $this->file('name', 'Label')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 163 | } 164 | 165 | function it_can_create_a_file_input_with_out_container() 166 | { 167 | $this->file('name', 'Label', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 168 | } 169 | 170 | function it_can_create_a_date_input() 171 | { 172 | $this->date('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . 173 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n"); 175 | } 176 | 177 | function it_can_create_a_date_input_with_out_container() 178 | { 179 | $this->date('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '
' . 180 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n"); 182 | } 183 | 184 | function it_can_create_a_datetime_input() 185 | { 186 | $this->datetime('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . 187 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n"); 189 | } 190 | 191 | function it_can_create_a_datetime_input_with_out_container() 192 | { 193 | $this->datetime('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '
' . 194 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n"); 196 | } 197 | 198 | function it_can_create_a_time_input() 199 | { 200 | $this->time('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . 201 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n"); 203 | } 204 | 205 | function it_can_create_a_time_input_with_out_container() 206 | { 207 | $this->time('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '
' . 208 | '' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n" . '' . "\n"); 210 | } 211 | 212 | function it_can_create_a_textarea_field() 213 | { 214 | $this->textarea('name', 'Label', 'value')->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 215 | } 216 | 217 | function it_can_create_a_textarea_field_with_out_container() 218 | { 219 | $this->textarea('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 220 | } 221 | 222 | function it_can_create_a_select_field() 223 | { 224 | $this->select('name', 'Label', array(0 => 1))->shouldReturn('
' . "\n" . '' . "\n" . '' . "\n" . '
' . "\n"); 225 | } 226 | 227 | function it_can_create_a_select_field_with_out_container() 228 | { 229 | $this->select('name', 'Label', array(0 => 1), 1, null, array('container' => array('display' => 'none')))->shouldReturn('' . "\n" . '' . "\n"); 230 | } 231 | 232 | function it_can_create_a_checkbox_field() 233 | { 234 | $this->checkbox('name', 'Label', 'value')->shouldReturn('
' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '
'); 235 | } 236 | 237 | function it_can_create_a_checkbox_field_with_out_container() 238 | { 239 | $this->checkbox('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n"); 240 | } 241 | 242 | function it_can_create_a_radio_field() 243 | { 244 | $this->radio('name', 'Label', 'value')->shouldReturn('
' . "\n" . '
' . "\n" . '' . "\n" . '
' . "\n" . '
'); 245 | } 246 | 247 | function it_can_create_a_radio_field_with_out_container() 248 | { 249 | $this->radio('name', 'Label', 'value', null, array('container' => array('display' => 'none')))->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n"); 250 | } 251 | 252 | function it_can_create_a_submit_button() 253 | { 254 | $this->submit('value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n"); 255 | } 256 | 257 | function it_can_create_a_submit_button_with_out_container() 258 | { 259 | $this->submit('value', array('container' => array('display' => 'none')))->shouldReturn('' . "\n"); 260 | } 261 | 262 | function it_can_create_a_button() 263 | { 264 | $this->button('value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n"); 265 | } 266 | 267 | function it_can_create_a_button_with_out_container() 268 | { 269 | $this->button('value', array('container' => array('display' => 'none')))->shouldReturn('' . "\n"); 270 | } 271 | 272 | function it_can_create_a_reset_button() 273 | { 274 | $this->reset('value')->shouldReturn('
' . "\n" . '' . "\n" . '
' . "\n"); 275 | } 276 | 277 | function it_can_create_a_reset_button_with_out_container() 278 | { 279 | $this->reset('value', array('container' => array('display' => 'none')))->shouldReturn('' . "\n"); 280 | } 281 | 282 | function it_can_create_a_hyperlink() 283 | { 284 | $this->link('#', 'title')->shouldReturn('title'); 285 | } 286 | 287 | function it_can_create_a_secure_hyperlink() 288 | { 289 | $this->secureLink('#', 'title')->shouldReturn('title'); 290 | } 291 | 292 | function it_can_create_a_route_hyperlink() 293 | { 294 | $this->linkRoute('#', 'title')->shouldReturn('title'); 295 | } 296 | 297 | function it_can_create_an_action_hyperlink() 298 | { 299 | $this->linkAction('#', 'title')->shouldReturn('title'); 300 | } 301 | 302 | function it_can_create_a_mailto_hyperlink() 303 | { 304 | $this->mailto('#', 'title')->shouldReturn('title'); 305 | } 306 | 307 | function it_can_create_a_none_alert() 308 | { 309 | $this->none('This is a message')->shouldReturn('
This is a message
'); 310 | } 311 | 312 | function it_can_create_a_success_alert() 313 | { 314 | $this->success('This is a message')->shouldReturn('
This is a message
'); 315 | } 316 | 317 | function it_can_create_an_info_alert() 318 | { 319 | $this->info('This is a message')->shouldReturn('
This is a message
'); 320 | } 321 | 322 | function it_can_create_a_warning_alert() 323 | { 324 | $this->warning('This is a message')->shouldReturn('
This is a message
'); 325 | } 326 | 327 | function it_can_create_a_danger_alert() 328 | { 329 | $this->danger('This is a message')->shouldReturn('
This is a message
'); 330 | } 331 | 332 | function it_can_create_an_alert_with_emphasis() 333 | { 334 | $this->info('This is a message', 'Well!', true)->shouldReturn('
Well! This is a message
'); 336 | } 337 | 338 | function it_can_create_a_dismissible_alert() 339 | { 340 | $this->info('This is a message', null, true)->shouldReturn('
This is a message
'); 342 | } 343 | } 344 | -------------------------------------------------------------------------------- /public/assets/js/moment.min.js: -------------------------------------------------------------------------------- 1 | //! moment.js 2 | //! version : 2.8.4 3 | //! authors : Tim Wood, Iskren Chernev, Moment.js contributors 4 | //! license : MIT 5 | //! momentjs.com 6 | (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>24||24===a._a[Db]&&(0!==a._a[Eb]||0!==a._a[Fb]||0!==a._a[Gb])?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(tb.isMoment(a)||v(a)?+a:+tb(a))-+c,c._d.setTime(+c._d+d),tb.updateOffset(c,!1),c):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"x":return Xb;case"X":return Yb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Db]&&0===a._a[Eb]&&0===a._a[Fb]&&0===a._a[Gb]&&(a._nextDay=!0,a._a[Db]=0),a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Db]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===tb.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Nb)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Db]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Db]<12&&(b._a[Db]+=12),b._isPm===!1&&12===b._a[Db]&&(b._a[Db]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;fg)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||tb.localeData(b._l),null===d||e===a&&""===d?tb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),tb.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):bb(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=tb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 00:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,tb(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()+a):(c=tb.isMoment(a)?+a:+tb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):(c=tb.isMoment(a)?+a:+tb(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3; 7 | case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this); -------------------------------------------------------------------------------- /public/assets/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 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||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(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){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(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.7",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?[]: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.7",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).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},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).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).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.7",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"));if(!(a>this.$items.length-1||a<0))return 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(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return 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.7",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(a.Event("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.7",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(a.Event("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);if(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())return 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,a.$element=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.7",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.7",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.7",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 e=a-d&&"bottom"},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); -------------------------------------------------------------------------------- /public/assets/js/bootstrap-datetimepicker.min.js: -------------------------------------------------------------------------------- 1 | !function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)module.exports=a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},w={},x=function(){return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone},y=function(a){var c;return c=void 0===a||null===a?b():b.isDate(a)||b.isMoment(a)?b(a):x()?b.tz(a,j,d.useStrict,d.timeZone):b(a,j,d.useStrict),x()&&c.tz(d.timeZone),c},z=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return i.indexOf("Y")!==-1;case"M":return i.indexOf("M")!==-1;case"d":return i.toLowerCase().indexOf("d")!==-1;case"h":case"H":return i.toLowerCase().indexOf("h")!==-1;case"m":return i.indexOf("m")!==-1;case"s":return i.indexOf("s")!==-1;default:return!1}},A=function(){return z("h")||z("m")||z("s")},B=function(){return z("y")||z("M")||z("d")},C=function(){var b=a("").append(a("").append(a("").addClass("prev").attr("data-action","previous").append(a("").addClass(d.icons.previous))).append(a("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("").addClass("next").attr("data-action","next").append(a("").addClass(d.icons.next)))),c=a("").append(a("").append(a("").attr("colspan",d.calendarWeeks?"8":"7")));return[a("
").addClass("datepicker-days").append(a("").addClass("table-condensed").append(b).append(a(""))),a("
").addClass("datepicker-months").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone())),a("
").addClass("datepicker-years").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone())),a("
").addClass("datepicker-decades").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone()))]},D=function(){var b=a(""),c=a(""),e=a("");return z("h")&&(b.append(a("
").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("").addClass(d.icons.down))))),z("m")&&(z("h")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("").addClass(d.icons.down))))),z("s")&&(z("m")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("").addClass(d.icons.down))))),h||(b.append(a("").addClass("separator")),c.append(a("").append(a("").addClass("separator"))),a("
").addClass("timepicker-picker").append(a("").addClass("table-condensed").append([b,c,e]))},E=function(){var b=a("
").addClass("timepicker-hours").append(a("
").addClass("table-condensed")),c=a("
").addClass("timepicker-minutes").append(a("
").addClass("table-condensed")),d=a("
").addClass("timepicker-seconds").append(a("
").addClass("table-condensed")),e=[D()];return z("h")&&e.push(b),z("m")&&e.push(c),z("s")&&e.push(d),e},F=function(){var b=[];return d.showTodayButton&&b.push(a("
").append(a("").attr({"data-action":"today",title:d.tooltips.today}).append(a("").addClass(d.icons.today)))),!d.sideBySide&&B()&&A()&&b.push(a("").append(a("").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("").addClass(d.icons.time)))),d.showClear&&b.push(a("").append(a("").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("").addClass(d.icons.clear)))),d.showClose&&b.push(a("").append(a("").attr({"data-action":"close",title:d.tooltips.close}).append(a("").addClass(d.icons.close)))),a("").addClass("table-condensed").append(a("").append(a("").append(b)))},G=function(){var b=a("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("
").addClass("datepicker").append(C()),e=a("
").addClass("timepicker").append(E()),f=a("
    ").addClass("list-unstyled"),g=a("
  • ").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(F());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),z("s")&&!h&&b.addClass("wider"),d.sideBySide&&B()&&A()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("
    ").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),B()&&f.append(a("
  • ").addClass(d.collapse&&A()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("
  • ").addClass(d.collapse&&B()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},H=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},I=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"static"===b.css("position")&&(b=b.parents().filter(function(){return"static"!==a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?b.outerHeight()-(b===c?0:e.top):"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},J=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},K=function(a){"y"===a&&(a="YYYY"),J({type:"dp.update",change:a,viewDate:f.clone()})},L=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},M=function(){var b=a("
"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a(""),d.calendarWeeks&&c.append('"),j.push(c)),k=["day"],b.isBefore(f,"M")&&k.push("old"),b.isAfter(f,"M")&&k.push("new"),b.isSame(e,"d")&&!m&&k.push("active"),R(b,"d")||k.push("disabled"),b.isSame(y(),"d")&&k.push("today"),0!==b.day()&&6!==b.day()||k.push("weekend"),J({type:"dp.classify",date:b,classNames:k}),c.append('"),b.add(1,"d");h.find("tbody").empty().append(j),T(),U(),V()}},X=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a(""),d.push(e)),e.append('"),c.add(1,"h");b.empty().append(d)},Y=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a(""),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a(""),e.push(g)),g.append('"),c.add(h,"m");b.empty().append(e)},Z=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("");f.isSame(c,"m");)c.second()%20===0&&(e=a(""),d.push(e)),e.append('"),c.add(5,"s");b.empty().append(d)},$=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),R(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),X(),Y(),Z()},_=function(){o&&(W(),$())},aa=function(a){var b=m?null:e;if(!a)return m=!0,g.val(""),c.data("date",""),J({type:"dp.change",date:!1,oldDate:b}),void _();if(a=a.clone().locale(d.locale),x()&&a.tz(d.timeZone),1!==d.stepping)for(a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping).seconds(0);d.minDate&&a.isBefore(d.minDate);)a.add(d.stepping,"minutes");R(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,_(),J({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid?J({type:"dp.change",date:a,oldDate:b}):g.val(m?"":e.format(i)),J({type:"dp.error",date:a,oldDate:b}))},ba=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return!c||!c.transitioning||(b=!0,!1)}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",I),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,J({type:"dp.hide",date:e.clone()}),g.blur(),f=e.clone(),l)):l},ca=function(){aa(null)},da=function(a){return void 0===d.parseInputDate?(!b.isMoment(a)||a instanceof Date)&&(a=y(a)):a=d.parseInputDate(a),a},ea={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),W(),K(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),W(),K(a)},pickerSwitch:function(){L(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));f.month(c),k===p?(aa(e.clone().year(f.year()).month(f.month())),d.inline||ba()):(L(-1),W()),K("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),aa(c.date(parseInt(a(b.target).text(),10))),A()||d.keepOpen||d.inline||ba()},incrementHours:function(){var a=e.clone().add(1,"h");R(a,"h")&&aa(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");R(a,"m")&&aa(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");R(a,"s")&&aa(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");R(a,"h")&&aa(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");R(a,"m")&&aa(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");R(a,"s")&&aa(a)},togglePeriod:function(){aa(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),aa(e.clone().hours(c)),ea.showPicker.call(l)},selectMinute:function(b){aa(e.clone().minutes(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},selectSecond:function(b){aa(e.clone().seconds(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},clear:ca,today:function(){var a=y();R(a,"d")&&aa(a)},close:ba},fa=function(b){return!a(b.currentTarget).is(".disabled")&&(ea[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ga=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?aa(da(g.val().trim())):m&&d.useCurrent&&(d.inline||g.is("input")&&0===g.val().trim().length)&&(b=y(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),aa(b)),o=G(),M(),S(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),_(),L(),a(window).on("resize",I),o.on("click","[data-action]",fa),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),I(),o.show(),d.focusOnShow&&!g.is(":focus")&&g.focus(),J({type:"dp.show"}),l)},ha=function(){return o?ba():ga()},ia=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ja=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ka=function(b){var c=a(b.target).val().trim(),d=c?da(c):null;return aa(d),b.stopImmediatePropagation(),!1},la=function(){g.on({change:ka,blur:d.debug?"":ba,keydown:ia,keyup:ja,focus:d.allowInputToggle?ga:""}),c.is("input")?g.on({focus:ga}):n&&(n.on("click",ha),n.on("mousedown",!1))},ma=function(){g.off({change:ka,blur:blur,keydown:ia,keyup:ja,focus:d.allowInputToggle?ba:""}),c.is("input")?g.off({focus:ga}):n&&(n.off("click",ha),n.off("mousedown",!1))},na=function(b){var c={};return a.each(b,function(){var a=da(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},oa=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},pa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,z("y")&&(p=2),z("M")&&(p=1),z("d")&&(p=0),k=Math.max(p,k),m||aa(e)};if(l.destroy=function(){ba(),ma(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=ha,l.show=ga,l.hide=ba,l.disable=function(){return ba(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return aa(null===a?null:da(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);return d.format=a,i&&pa(),l},l.timeZone=function(a){if(0===arguments.length)return d.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");return d.timeZone=a,l},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&pa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=na(b),d.enabledDates=!1,_(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=na(b),d.disabledDates=!1,_(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,_(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!R(e,"d");){if(e.add(1,"d"),31===b)throw"Tried 31 times to find a valid date";b++}aa(e)}return _(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&aa(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),_(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&aa(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),_(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&(a="now"===a||"moment"===a?y():y(a));var b=da(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!R(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&aa(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&pa(),o&&(ba(),ga()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||a<1)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&b.indexOf(a.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(ba(),ga()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(ba(),ga()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(ba(),ga()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(ba(),ga()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(r.indexOf(a)===-1)throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),L(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(u.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(ba(),ga()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),t.indexOf(b.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),s.indexOf(b.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return _(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,_(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(ba(),ga()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(ba(),ga()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(ba(),ga()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ca(),l},l.keyBinds=function(a){return 0===arguments.length?d.keyBinds:(d.keyBinds=a,l)},l.getMoment=function(a){return y(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter"); 2 | return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,_(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=oa(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=oa(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=da(a),K(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.length)g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").length?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=y(),f=e.clone(),a.extend(!0,d,H()),l.options(d),pa(),la(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?aa(da(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&aa(d.defaultDate),d.inline&&ga(),l};return a.fn.datetimepicker=function(b){b=b||{};var d,e=Array.prototype.slice.call(arguments,1),f=!0,g=["destroy","hide","show","toggle"];if("object"==typeof b)return this.each(function(){var d,e=a(this);e.data("DateTimePicker")||(d=a.extend(!0,{},a.fn.datetimepicker.defaults,b),e.data("DateTimePicker",c(e,d)))});if("string"==typeof b)return this.each(function(){var c=a(this),g=c.data("DateTimePicker");if(!g)throw new Error('bootstrap-datetimepicker("'+b+'") method was called on an element that is not using DateTimePicker');d=g[b].apply(g,e),f=d===g}),f||a.inArray(b,g)>-1?this:d;throw new TypeError("Invalid arguments for DateTimePicker: "+b)},a.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a&&a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},a.fn.datetimepicker}); --------------------------------------------------------------------------------
").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},N=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},P=function(a){return d.disabledHours[a.format("H")]===!0},Q=function(a){return d.enabledHours[a.format("H")]===!0},R=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&N(b))return!1;if(d.enabledDates&&"d"===c&&!O(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&d.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&P(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!Q(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return e=!0,!1}),e)return!1}return!0},S=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},T=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),R(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),R(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){R(f.clone().month(b),"M")||a(this).addClass("disabled")})},U=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+=''+c.year()+"",c.add(1,"y");a.find("td").html(h)},V=function(){var a,c=o.find(".datepicker-decades"),g=c.find("th"),h=b({y:f.year()-f.year()%100-1}),i=h.clone().add(100,"y"),j=h.clone(),k=!1,l=!1,m="";for(g.eq(0).find("span").attr("title",d.tooltips.prevCentury),g.eq(2).find("span").attr("title",d.tooltips.nextCentury),c.find(".disabled").removeClass("disabled"),(h.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(h,"y"))&&g.eq(0).addClass("disabled"),g.eq(1).text(h.year()+"-"+i.year()),(h.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(i,"y"))&&g.eq(2).addClass("disabled");!h.isAfter(i,"y");)a=h.year()+12,k=d.minDate&&d.minDate.isAfter(h,"y")&&d.minDate.year()<=a,l=d.maxDate&&d.maxDate.isAfter(h,"y")&&d.maxDate.year()<=a,m+=''+(h.year()+1)+" - "+(h.year()+12)+"",h.add(12,"y");m+="",c.find("td").html(m),g.eq(1).text(j.year()+1+"-"+h.year())},W=function(){var b,c,g,h=o.find(".datepicker-days"),i=h.find("th"),j=[],k=[];if(B()){for(i.eq(0).find("span").attr("title",d.tooltips.prevMonth),i.eq(1).attr("title",d.tooltips.selectMonth),i.eq(2).find("span").attr("title",d.tooltips.nextMonth),h.find(".disabled").removeClass("disabled"),i.eq(1).text(f.format(d.dayViewHeaderFormat)),R(f.clone().subtract(1,"M"),"M")||i.eq(0).addClass("disabled"),R(f.clone().add(1,"M"),"M")||i.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),g=0;g<42;g++)0===b.weekday()&&(c=a("
'+b.week()+"'+b.date()+"
'+c.format(h?"HH":"hh")+"
'+c.format("mm")+"
'+c.format("ss")+"