| 1 |
|
| 2 |
s. |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
( function () { |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
mw.widgets.DateInputWidget = function MWWDateInputWidget( config ) { |
| 95 |
|
| 96 |
config = Object.assign( { |
| 97 |
precision: 'day', |
| 98 |
longDisplayFormat: false, |
| 99 |
required: false, |
| 100 |
placeholderLabel: mw.msg( 'mw-widgets-dateinput-no-date' ) |
| 101 |
}, config ); |
| 102 |
if ( config.required ) { |
| 103 |
if ( config.indicator === undefined ) { |
| 104 |
config.indicator = 'required'; |
| 105 |
} |
| 106 |
} |
| 107 |
|
| 108 |
let placeholderDateFormat; |
| 109 |
if ( config.placeholderDateFormat ) { |
| 110 |
placeholderDateFormat = config.placeholderDateFormat; |
| 111 |
} else if ( config.inputFormat ) { |
| 112 |
|
| 113 |
placeholderDateFormat = ''; |
| 114 |
} else { |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
placeholderDateFormat = mw.msg( 'mw-widgets-dateinput-placeholder-' + config.precision ); |
| 119 |
} |
| 120 |
|
| 121 |
|
| 122 |
this.$handle = $( '<div>' ); |
| 123 |
this.innerLabel = new OO.ui.LabelWidget(); |
| 124 |
this.textInput = new OO.ui.TextInputWidget( { |
| 125 |
required: config.required, |
| 126 |
placeholder: placeholderDateFormat, |
| 127 |
validate: this.validateDate.bind( this ) |
| 128 |
} ); |
| 129 |
this.calendar = new mw.widgets.CalendarWidget( Object.assign( { |
| 130 |
lazyInitOnToggle: true, |
| 131 |
|
| 132 |
|
| 133 |
precision: config.precision |
| 134 |
}, config.calendar ) ); |
| 135 |
this.inCalendar = 0; |
| 136 |
this.inTextInput = 0; |
| 137 |
this.closing = false; |
| 138 |
this.inputFormat = config.inputFormat; |
| 139 |
this.displayFormat = config.displayFormat; |
| 140 |
this.longDisplayFormat = config.longDisplayFormat; |
| 141 |
this.required = config.required; |
| 142 |
this.placeholderLabel = config.placeholderLabel; |
| 143 |
|
| 144 |
|
| 145 |
if ( config.mustBeAfter !== undefined ) { |
| 146 |
const mustBeAfter = moment( config.mustBeAfter, 'YYYY-MM-DD' ); |
| 147 |
if ( mustBeAfter.isValid() ) { |
| 148 |
this.mustBeAfter = mustBeAfter; |
| 149 |
} |
| 150 |
} |
| 151 |
if ( config.mustBeBefore !== undefined ) { |
| 152 |
const mustBeBefore = moment( config.mustBeBefore, 'YYYY-MM-DD' ); |
| 153 |
if ( mustBeBefore.isValid() ) { |
| 154 |
this.mustBeBefore = mustBeBefore; |
| 155 |
} |
| 156 |
} |
| 157 |
|
| 158 |
mw.widgets.DateInputWidget.super.call( this, config ); |
| 159 |
|
| 160 |
|
| 161 |
OO.ui.mixin.IndicatorElement.call( this, config ); |
| 162 |
|
| 163 |
|
| 164 |
this.calendar.connect( this, { |
| 165 |
change: 'onCalendarChange' |
| 166 |
} ); |
| 167 |
this.textInput.connect( this, { |
| 168 |
enter: 'onEnter', |
| 169 |
change: 'onTextInputChange' |
| 170 |
} ); |
| 171 |
this.$element.on( { |
| 172 |
focusout: this.onBlur.bind( this ) |
| 173 |
} ); |
| 174 |
this.calendar.$element.on( { |
| 175 |
focusout: this.onBlur.bind( this ), |
| 176 |
click: this.onCalendarClick.bind( this ), |
| 177 |
keypress: this.onCalendarKeyPress.bind( this ) |
| 178 |
} ); |
| 179 |
this.$handle.on( { |
| 180 |
click: this.onClick.bind( this ), |
| 181 |
keypress: this.onKeyPress.bind( this ), |
| 182 |
focus: this.onFocus.bind( this ) |
| 183 |
} ); |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
if ( !this.isDisabled() ) { |
| 188 |
this.setTabIndexedElement( this.$handle ); |
| 189 |
} |
| 190 |
this.$handle |
| 191 |
.append( this.innerLabel.$element, this.$indicator ) |
| 192 |
.addClass( 'mw-widget-dateInputWidget-handle' ); |
| 193 |
this.calendar.$element |
| 194 |
.addClass( 'mw-widget-dateInputWidget-calendar' ); |
| 195 |
this.$element |
| 196 |
.addClass( 'mw-widget-dateInputWidget' ) |
| 197 |
.append( this.$handle, this.textInput.$element, this.calendar.$element ); |
| 198 |
|
| 199 |
const $overlay = config.$overlay === true ? OO.ui.getDefaultOverlay() : config.$overlay; |
| 200 |
|
| 201 |
if ( $overlay ) { |
| 202 |
this.calendar.setFloatableContainer( this.$element ); |
| 203 |
$overlay.append( this.calendar.$element ); |
| 204 |
|
| 205 |
|
| 206 |
this.textInput.$input.on( 'keydown', ( e ) => { |
| 207 |
if ( e.which === OO.ui.Keys.TAB ) { |
| 208 |
if ( e.shiftKey ) { |
| 209 |
|
| 210 |
} else { |
| 211 |
|
| 212 |
this.calendar.$element.trigger( 'focus' ); |
| 213 |
return false; |
| 214 |
} |
| 215 |
} |
| 216 |
} ); |
| 217 |
this.calendar.$element.on( 'keydown', ( e ) => { |
| 218 |
if ( e.which === OO.ui.Keys.TAB ) { |
| 219 |
if ( e.shiftKey ) { |
| 220 |
|
| 221 |
this.textInput.$input.trigger( 'focus' ); |
| 222 |
return false; |
| 223 |
} else { |
| 224 |
|
| 225 |
|
| 226 |
this.textInput.$input.trigger( 'focus' ); |
| 227 |
} |
| 228 |
} |
| 229 |
} ); |
| 230 |
} |
| 231 |
|
| 232 |
|
| 233 |
this.updateUI(); |
| 234 |
this.textInput.toggle( false ); |
| 235 |
this.calendar.toggle( false ); |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
if ( config.$input ) { |
| 240 |
config.$input.addClass( 'oo-ui-element-hidden' ); |
| 241 |
} |
| 242 |
}; |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
OO.inheritClass( mw.widgets.DateInputWidget, OO.ui.TextInputWidget ); |
| 247 |
OO.mixinClass( mw.widgets.DateInputWidget, OO.ui.mixin.IndicatorElement ); |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
mw.widgets.DateInputWidget.prototype.getInputElement = function () { |
| 266 |
return $( '<input>' ).attr( 'type', 'hidden' ); |
| 267 |
}; |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
mw.widgets.DateInputWidget.prototype.onCalendarChange = function () { |
| 275 |
this.inCalendar++; |
| 276 |
if ( !this.inTextInput ) { |
| 277 |
|
| 278 |
|
| 279 |
this.setValue( this.calendar.getDate() ); |
| 280 |
} |
| 281 |
this.inCalendar--; |
| 282 |
}; |
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
mw.widgets.DateInputWidget.prototype.onTextInputChange = function () { |
| 290 |
const |
| 291 |
widget = this, |
| 292 |
value = this.textInput.getValue(), |
| 293 |
mom = moment( value, this.getInputFormat() ), |
| 294 |
valid = this.isValidDate( value ); |
| 295 |
this.inTextInput++; |
| 296 |
|
| 297 |
if ( value === '' ) { |
| 298 |
|
| 299 |
widget.setValue( '' ); |
| 300 |
} else if ( valid ) { |
| 301 |
|
| 302 |
|
| 303 |
widget.setValue( mom.locale( 'en' ).format( widget.getInternalFormat() ) ); |
| 304 |
} else { |
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
if ( widget.getInputFormat() === widget.getInternalFormat() ) { |
| 311 |
widget.calendar.setMoment( mom ); |
| 312 |
} |
| 313 |
} |
| 314 |
widget.inTextInput--; |
| 315 |
|
| 316 |
}; |
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
mw.widgets.DateInputWidget.prototype.setValue = function ( value ) { |
| 322 |
const oldValue = this.value; |
| 323 |
|
| 324 |
if ( !moment( value, this.getInternalFormat() ).isValid() ) { |
| 325 |
value = ''; |
| 326 |
} |
| 327 |
|
| 328 |
mw.widgets.DateInputWidget.super.prototype.setValue.call( this, value ); |
| 329 |
|
| 330 |
if ( this.value !== oldValue ) { |
| 331 |
this.updateUI(); |
| 332 |
this.setValidityFlag(); |
| 333 |
} |
| 334 |
|
| 335 |
return this; |
| 336 |
}; |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
mw.widgets.DateInputWidget.prototype.onBlur = function () { |
| 344 |
setTimeout( () => { |
| 345 |
const $focussed = $( ':focus' ); |
| 346 |
|
| 347 |
if ( |
| 348 |
!OO.ui.contains( this.$element[ 0 ], $focussed[ 0 ], true ) && |
| 349 |
|
| 350 |
!OO.ui.contains( this.calendar.$element[ 0 ], $focussed[ 0 ], true ) |
| 351 |
) { |
| 352 |
this.deactivate(); |
| 353 |
} |
| 354 |
}, 0 ); |
| 355 |
}; |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
mw.widgets.DateInputWidget.prototype.focus = function () { |
| 361 |
this.activate(); |
| 362 |
return this; |
| 363 |
}; |
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
mw.widgets.DateInputWidget.prototype.blur = function () { |
| 369 |
this.deactivate(); |
| 370 |
return this; |
| 371 |
}; |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
mw.widgets.DateInputWidget.prototype.updateUI = function () { |
| 379 |
if ( this.getValue() === '' ) { |
| 380 |
this.textInput.setValue( '' ); |
| 381 |
this.calendar.setDate( null ); |
| 382 |
this.innerLabel.setLabel( this.placeholderLabel ); |
| 383 |
this.$element.addClass( 'mw-widget-dateInputWidget-empty' ); |
| 384 |
} else { |
| 385 |
const moment = this.getMoment(); |
| 386 |
if ( !this.inTextInput ) { |
| 387 |
this.textInput.setValue( moment.format( this.getInputFormat() ) ); |
| 388 |
} |
| 389 |
if ( !this.inCalendar ) { |
| 390 |
this.calendar.setDate( this.getValue() ); |
| 391 |
} |
| 392 |
this.innerLabel.setLabel( moment.format( this.getDisplayFormat() ) ); |
| 393 |
this.$element.removeClass( 'mw-widget-dateInputWidget-empty' ); |
| 394 |
} |
| 395 |
}; |
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
mw.widgets.DateInputWidget.prototype.deactivate = function ( userSelected ) { |
| 404 |
this.$element.removeClass( 'mw-widget-dateInputWidget-active' ); |
| 405 |
this.$handle.show(); |
| 406 |
this.textInput.toggle( false ); |
| 407 |
this.calendar.toggle( false ); |
| 408 |
this.setValidityFlag(); |
| 409 |
|
| 410 |
if ( userSelected ) { |
| 411 |
|
| 412 |
this.closing = true; |
| 413 |
this.$handle.trigger( 'focus' ); |
| 414 |
this.closing = false; |
| 415 |
} |
| 416 |
|
| 417 |
this.emit( 'deactivate', !!userSelected ); |
| 418 |
}; |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
mw.widgets.DateInputWidget.prototype.activate = function () { |
| 426 |
this.calendar.resetUI(); |
| 427 |
this.$element.addClass( 'mw-widget-dateInputWidget-active' ); |
| 428 |
this.$handle.hide(); |
| 429 |
this.textInput.toggle( true ); |
| 430 |
this.calendar.toggle( true ); |
| 431 |
|
| 432 |
this.textInput.$input.trigger( 'focus' ); |
| 433 |
}; |
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
mw.widgets.DateInputWidget.prototype.getDisplayFormat = function () { |
| 442 |
if ( this.displayFormat !== undefined ) { |
| 443 |
return this.displayFormat; |
| 444 |
} |
| 445 |
|
| 446 |
if ( this.calendar.getPrecision() === 'month' ) { |
| 447 |
return 'MMMM YYYY'; |
| 448 |
} else { |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
const localeData = moment.localeData( moment.locale() ); |
| 461 |
const llll = localeData.longDateFormat( 'llll' ); |
| 462 |
const lll = localeData.longDateFormat( 'lll' ); |
| 463 |
const ll = localeData.longDateFormat( 'll' ); |
| 464 |
let format = llll.replace( lll.replace( ll, '' ), '' ); |
| 465 |
|
| 466 |
if ( this.longDisplayFormat ) { |
| 467 |
|
| 468 |
format = format.replace( /MMMM?/, 'MMMM' ).replace( /dddd?/, 'dddd' ); |
| 469 |
} |
| 470 |
|
| 471 |
return format; |
| 472 |
} |
| 473 |
}; |
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
mw.widgets.DateInputWidget.prototype.getInputFormat = function () { |
| 482 |
if ( this.inputFormat !== undefined ) { |
| 483 |
return this.inputFormat; |
| 484 |
} |
| 485 |
|
| 486 |
return { |
| 487 |
day: 'YYYY-MM-DD', |
| 488 |
month: 'YYYY-MM' |
| 489 |
}[ this.calendar.getPrecision() ]; |
| 490 |
}; |
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
mw.widgets.DateInputWidget.prototype.getInternalFormat = function () { |
| 500 |
return { |
| 501 |
day: 'YYYY-MM-DD', |
| 502 |
month: 'YYYY-MM' |
| 503 |
}[ this.calendar.getPrecision() ]; |
| 504 |
}; |
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
mw.widgets.DateInputWidget.prototype.getMoment = function () { |
| 512 |
return moment( this.getValue(), this.getInternalFormat() ); |
| 513 |
}; |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
mw.widgets.DateInputWidget.prototype.onClick = function ( e ) { |
| 523 |
if ( !this.isDisabled() && !this.isReadOnly() && e.which === 1 ) { |
| 524 |
this.activate(); |
| 525 |
} |
| 526 |
return false; |
| 527 |
}; |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
mw.widgets.DateInputWidget.prototype.onKeyPress = function ( e ) { |
| 537 |
if ( !this.isDisabled() && !this.isReadOnly() && |
| 538 |
( e.which === OO.ui.Keys.SPACE || e.which === OO.ui.Keys.ENTER ) |
| 539 |
) { |
| 540 |
this.activate(); |
| 541 |
return false; |
| 542 |
} |
| 543 |
}; |
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
mw.widgets.DateInputWidget.prototype.onFocus = function () { |
| 551 |
if ( !this.isDisabled() && !this.isReadOnly() && !this.closing ) { |
| 552 |
this.activate(); |
| 553 |
} |
| 554 |
}; |
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
mw.widgets.DateInputWidget.prototype.onCalendarKeyPress = function ( e ) { |
| 564 |
if ( !this.isDisabled() && e.which === OO.ui.Keys.ENTER ) { |
| 565 |
this.deactivate( true ); |
| 566 |
return false; |
| 567 |
} |
| 568 |
}; |
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
mw.widgets.DateInputWidget.prototype.onCalendarClick = function ( e ) { |
| 578 |
const targetClass = this.calendar.getPrecision() === 'month' ? |
| 579 |
'mw-widget-calendarWidget-month' : |
| 580 |
'mw-widget-calendarWidget-day'; |
| 581 |
if ( |
| 582 |
!this.isDisabled() && |
| 583 |
e.which === 1 && |
| 584 |
|
| 585 |
$( e.target ).hasClass( targetClass ) |
| 586 |
) { |
| 587 |
this.deactivate( true ); |
| 588 |
return false; |
| 589 |
} |
| 590 |
}; |
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
mw.widgets.DateInputWidget.prototype.onEnter = function () { |
| 598 |
this.deactivate( true ); |
| 599 |
}; |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
mw.widgets.DateInputWidget.prototype.validateDate = function ( date ) { |
| 608 |
let isValid; |
| 609 |
if ( date === '' ) { |
| 610 |
isValid = !this.required; |
| 611 |
} else { |
| 612 |
isValid = this.isValidDate( date ) && this.isInRange( date ); |
| 613 |
} |
| 614 |
return isValid; |
| 615 |
}; |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
mw.widgets.DateInputWidget.prototype.isValidDate = function ( date ) { |
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
const |
| 627 |
mom = moment( date, this.getInputFormat() ), |
| 628 |
flags = mom.parsingFlags(); |
| 629 |
|
| 630 |
return mom.isValid() && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0; |
| 631 |
}; |
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
mw.widgets.DateInputWidget.prototype.isInRange = function ( date ) { |
| 643 |
if ( this.mustBeAfter === undefined && this.mustBeBefore === undefined ) { |
| 644 |
return true; |
| 645 |
} |
| 646 |
const momentDate = moment( date, 'YYYY-MM-DD' ); |
| 647 |
const isAfter = ( this.mustBeAfter === undefined || momentDate.isAfter( this.mustBeAfter ) ); |
| 648 |
const isBefore = ( this.mustBeBefore === undefined || momentDate.isBefore( this.mustBeBefore ) ); |
| 649 |
return isAfter && isBefore; |
| 650 |
}; |
| 651 |
|
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
mw.widgets.DateInputWidget.prototype.getValidity = function () { |
| 661 |
const isValid = this.validateDate( this.getValue() ); |
| 662 |
|
| 663 |
if ( isValid ) { |
| 664 |
return $.Deferred().resolve().promise(); |
| 665 |
} else { |
| 666 |
return $.Deferred().reject().promise(); |
| 667 |
} |
| 668 |
}; |
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
mw.widgets.DateInputWidget.prototype.setValidityFlag = function ( isValid ) { |
| 676 |
const widget = this, |
| 677 |
setFlag = function ( valid ) { |
| 678 |
if ( !valid ) { |
| 679 |
widget.$input.attr( 'aria-invalid', 'true' ); |
| 680 |
} else { |
| 681 |
widget.$input.removeAttr( 'aria-invalid' ); |
| 682 |
} |
| 683 |
widget.setFlags( { invalid: !valid } ); |
| 684 |
}; |
| 685 |
|
| 686 |
if ( isValid !== undefined ) { |
| 687 |
setFlag( isValid ); |
| 688 |
} else { |
| 689 |
this.getValidity().then( () => { |
| 690 |
setFlag( true ); |
| 691 |
}, () => { |
| 692 |
setFlag( false ); |
| 693 |
} ); |
| 694 |
} |
| 695 |
}; |
| 696 |
|
| 697 |
}() ); |