constructor() {
        super()
        this.defaults   = {
            title: '',
            text: '',           // just a text (will be centered)
            body: '',
            buttons: '',
            width: 450,
            height: 250,
            focus: null,        // brings focus to the element, can be a number or selector
            actions: null,      // actions object
            style: '',          // style of the message div
            speed: 0.3,
            modal: false,
            maximized: false,   // this is a flag to show the state - to open the popup maximized use openMaximized instead
            keyboard: true,     // will close popup on esc if not modal
            showClose: true,
            showMax: false,
            transition: null,
            openMaximized: false,
            moved: false
        }
        this.name       = 'popup'
        this.status     = 'closed' // string that describes current status
        this.onOpen     = null
        this.onClose    = null
        this.onMax      = null
        this.onMin      = null
        this.onToggle   = null
        this.onKeydown  = null
        this.onAction   = null
        this.onMove     = null
        this.tmp        = {}
        // event handler for resize
        this.handleResize = (event) => {
            // if it was moved by the user, do not auto resize
            if (!this.options.moved) {
                this.center(undefined, undefined, true)
            }
        }
    }
Part of w2ui 2.0 library
 - Dependencies: mQuery, w2utils, w2base

== 2.0 changes
 - CSP - fixed inline events
 - removed jQuery dependency
 - popup.open - returns promise like object
 - popup.confirm - refactored
 - popup.message - refactored
 - removed popup.options.mutliple
 - refactores w2alert, w2confirm, w2prompt
 - add w2popup.open().on('')
 - removed w2popup.restoreTemplate
 - deprecated onMsgOpen and onMsgClose
 - deprecated options.bgColor
 - rename focus -> setFocus
 - added center() // will auto center on window resize
 - close(immediate), also refactored if popup is closed when opening