/*!
 * formBuilder - https://formbuilder.online/
 * Version: 2.9.8
 * Author: Kevin Chappell 
 */
var _Mathfloor = Math.floor,
_Mathmax = Math.max; !
function(A) {
        function e(r) {
                if (t[r]) return t[r].exports;
                var o = t[r] = {
                        i: r,
                        l: !1,
                        exports: {}
                };
                return A[r].call(o.exports, o, o.exports, e),
                o.l = !0,
                o.exports
        }
        var t = {};
        e.m = A,
        e.c = t,
        e.i = function(A) {
                return A
        },
        e.d = function(A, t, r) {
                e.o(A, t) || Object.defineProperty(A, t, {
                        configurable: !1,
                        enumerable: !0,
                        get: r
                })
        },
        e.n = function(A) {
                var t = A && A.__esModule ?
                function() {
                        return A.
                default
                }:
                function() {
                        return A
                };
                return e.d(t, "a", t),
                t
        },
        e.o = function(A, e) {
                return Object.prototype.hasOwnProperty.call(A, e)
        },
        e.p = "/assets/js/",
        e(e.s = 153)
} ({
        111 : function(A) {
                function e(A, e) {
                        var r = A[1] || "",
                        o = A[3];
                        if (!o) return r;
                        if (e && "function" == typeof btoa) {
                                var i = t(o);
                                return [r].concat(o.sources.map(function(A) {
                                        return "/*# sourceURL=" + o.sourceRoot + A + " */"
                                })).concat([i]).join("\n")
                        }
                        return [r].join("\n")
                }
                function t(A) {
                        return "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(A)))) + " */"
                }
                A.exports = function(A) {
                        var t = [];
                        return t.toString = function() {
                                return this.map(function(t) {
                                        var r = e(t, A);
                                        return t[2] ? "@media " + t[2] + "{" + r + "}": r
                                }).join("")
                        },
                        t.i = function(A, e) {
                                "string" == typeof A && (A = [[null, A, ""]]);
                                for (var r, o = {},
                                i = 0; i < this.length; i++)"number" == typeof(r = this[i][0]) && (o[r] = !0);
                                for (i = 0; i < A.length; i++) {
                                        var n = A[i];
                                        "number" == typeof n[0] && o[n[0]] || (e && !n[2] ? n[2] = e: e && (n[2] = "(" + n[2] + ") and (" + e + ")"), t.push(n))
                                }
                        },
                        t
                }
        },
        112 : function(A) {
                function e() {
                        throw new Error("setTimeout has not been defined")
                }
                function t() {
                        throw new Error("clearTimeout has not been defined")
                }
                function r(A) {
                        if (s === setTimeout) return setTimeout(A, 0);
                        if ((s === e || !s) && setTimeout) return s = setTimeout,
                        setTimeout(A, 0);
                        try {
                                return s(A, 0)
                        } catch(e) {
                                try {
                                        return s.call(null, A, 0)
                                } catch(e) {
                                        return s.call(this, A, 0)
                                }
                        }
                }
                function o(A) {
                        if (c === clearTimeout) return clearTimeout(A);
                        if ((c === t || !c) && clearTimeout) return c = clearTimeout,
                        clearTimeout(A);
                        try {
                                return c(A)
                        } catch(e) {
                                try {
                                        return c.call(null, A)
                                } catch(e) {
                                        return c.call(this, A)
                                }
                        }
                }
                function i() {
                        d && f && (d = !1, f.length ? g = f.concat(g) : p = -1, g.length && n())
                }
                function n() {
                        if (!d) {
                                var A = r(i);
                                d = !0;
                                for (var e = g.length; e;) {
                                        for (f = g, g = []; ++p < e;) f && f[p].run();
                                        p = -1,
                                        e = g.length
                                }
                                f = null,
                                d = !1,
                                o(A)
                        }
                }
                function a(A, e) {
                        this.fun = A,
                        this.array = e
                }
                function l() {}
                var s, c, u = A.exports = {}; !
                function() {
                        try {
                                s = "function" == typeof setTimeout ? setTimeout: e
                        } catch(A) {
                                s = e
                        }
                        try {
                                c = "function" == typeof clearTimeout ? clearTimeout: t
                        } catch(A) {
                                c = t
                        }
                } ();
                var f, g = [],
                d = !1,
                p = -1;
                u.nextTick = function(A) {
                        var e = Array(arguments.length - 1);
                        if (1 < arguments.length) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
                        g.push(new a(A, e)),
                        1 !== g.length || d || r(n)
                },
                a.prototype.run = function() {
                        this.fun.apply(null, this.array)
                },
                u.title = "browser",
                u.browser = !0,
                u.env = {},
                u.argv = [],
                u.version = "",
                u.versions = {},
                u.on = l,
                u.addListener = l,
                u.once = l,
                u.off = l,
                u.removeListener = l,
                u.removeAllListeners = l,
                u.emit = l,
                u.prependListener = l,
                u.prependOnceListener = l,
                u.listeners = function() {
                        return []
                },
                u.binding = function() {
                        throw new Error("process.binding is not supported")
                },
                u.cwd = function() {
                        return "/"
                },
                u.chdir = function() {
                        throw new Error("process.chdir is not supported")
                },
                u.umask = function() {
                        return 0
                }
        },
        113 : function(A, e, t) {
                function r(A, e) {
                        for (var t = 0; t < A.length; t++) {
                                var r = A[t],
                                o = d[r.id];
                                if (o) {
                                        o.refs++;
                                        for (var i = 0; i < o.parts.length; i++) o.parts[i](r.parts[i]);
                                        for (; i < r.parts.length; i++) o.parts.push(c(r.parts[i], e))
                                } else {
                                        for (var n = [], i = 0; i < r.parts.length; i++) n.push(c(r.parts[i], e));
                                        d[r.id] = {
                                                id: r.id,
                                                refs: 1,
                                                parts: n
                                        }
                                }
                        }
                }
                function o(A) {
                        for (var e = [], t = {},
                        r = 0; r < A.length; r++) {
                                var o = A[r],
                                i = o[0],
                                n = o[1],
                                a = o[2],
                                l = o[3],
                                s = {
                                        css: n,
                                        media: a,
                                        sourceMap: l
                                };
                                t[i] ? t[i].parts.push(s) : e.push(t[i] = {
                                        id: i,
                                        parts: [s]
                                })
                        }
                        return e
                }
                function i(A, e) {
                        var t = w(A.insertInto);
                        if (!t) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
                        var r = B[B.length - 1];
                        if ("top" === A.insertAt) r ? r.nextSibling ? t.insertBefore(e, r.nextSibling) : t.appendChild(e) : t.insertBefore(e, t.firstChild),
                        B.push(e);
                        else {
                                if ("bottom" !== A.insertAt) throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
                                t.appendChild(e)
                        }
                }
                function n(A) {
                        A.parentNode.removeChild(A);
                        var e = B.indexOf(A);
                        0 <= e && B.splice(e, 1)
                }
                function a(A) {
                        var e = document.createElement("style");
                        return A.attrs.type = "text/css",
                        s(e, A.attrs),
                        i(A, e),
                        e
                }
                function l(A) {
                        var e = document.createElement("link");
                        return A.attrs.type = "text/css",
                        A.attrs.rel = "stylesheet",
                        s(e, A.attrs),
                        i(A, e),
                        e
                }
                function s(A, e) {
                        Object.keys(e).forEach(function(t) {
                                A.setAttribute(t, e[t])
                        })
                }
                function c(A, e) {
                        var t, r, o;
                        if (e.singleton) {
                                var i = b++;
                                t = m || (m = a(e)),
                                r = u.bind(null, t, i, !1),
                                o = u.bind(null, t, i, !0)
                        } else A.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (t = l(e), r = g.bind(null, t, e), o = function() {
                                n(t),
                                t.href && URL.revokeObjectURL(t.href)
                        }) : (t = a(e), r = f.bind(null, t), o = function() {
                                n(t)
                        });
                        return r(A),
                        function(e) {
                                if (e) {
                                        if (e.css === A.css && e.media === A.media && e.sourceMap === A.sourceMap) return;
                                        r(A = e)
                                } else o()
                        }
                }
                function u(A, e, t, r) {
                        var o = t ? "": r.css;
                        if (A.styleSheet) A.styleSheet.cssText = I(e, o);
                        else {
                                var i = document.createTextNode(o),
                                n = A.childNodes;
                                n[e] && A.removeChild(n[e]),
                                n.length ? A.insertBefore(i, n[e]) : A.appendChild(i)
                        }
                }
                function f(A, e) {
                        var t = e.css,
                        r = e.media;
                        if (r && A.setAttribute("media", r), A.styleSheet) A.styleSheet.cssText = t;
                        else {
                                for (; A.firstChild;) A.removeChild(A.firstChild);
                                A.appendChild(document.createTextNode(t))
                        }
                }
                function g(A, e, t) {
                        var r = t.css,
                        o = t.sourceMap,
                        i = void 0 === e.convertToAbsoluteUrls && o; (e.convertToAbsoluteUrls || i) && (r = h(r)),
                        o && (r += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + " */");
                        var n = new Blob([r], {
                                type: "text/css"
                        }),
                        a = A.href;
                        A.href = URL.createObjectURL(n),
                        a && URL.revokeObjectURL(a)
                }
                var d = {},
                p = function(A) {
                        var e;
                        return function() {
                                return void 0 === e && (e = A.apply(this, arguments)),
                                e
                        }
                } (function() {
                        return window && document && document.all && !window.atob
                }),
                w = function(A) {
                        var e = {};
                        return function(t) {
                                return void 0 === e[t] && (e[t] = A.call(this, t)),
                                e[t]
                        }
                } (function(A) {
                        return document.querySelector(A)
                }),
                m = null,
                b = 0,
                B = [],
                h = t(114);
                A.exports = function(A, e) {
                        if ("undefined" != typeof DEBUG && DEBUG && "object" != typeof document) throw new Error("The style-loader cannot be used in a non-browser environment");
                        e = e || {},
                        e.attrs = "object" == typeof e.attrs ? e.attrs: {},
                        void 0 === e.singleton && (e.singleton = p()),
                        void 0 === e.insertInto && (e.insertInto = "head"),
                        void 0 === e.insertAt && (e.insertAt = "bottom");
                        var t = o(A);
                        return r(t, e),
                        function(A) {
                                for (var i = [], n = 0; n < t.length; n++) {
                                        var a = t[n],
                                        l = d[a.id];
                                        l.refs--,
                                        i.push(l)
                                }
                                if (A) {
                                        r(o(A), e)
                                }
                                for (var l, n = 0; n < i.length; n++) if (l = i[n], 0 === l.refs) {
                                        for (var s = 0; s < l.parts.length; s++) l.parts[s]();
                                        delete d[l.id]
                                }
                        }
                };
                var I = function() {
                        var A = [];
                        return function(e, t) {
                                return A[e] = t,
                                A.filter(Boolean).join("\n")
                        }
                } ()
        },
        114 : function(A) {
                A.exports = function(A) {
                        var e = "undefined" != typeof window && window.location;
                        if (!e) throw new Error("fixUrls requires window.location");
                        if (!A || "string" != typeof A) return A;
                        var t = e.protocol + "//" + e.host,
                        r = t + e.pathname.replace(/\/[^\/]*$/, "/");
                        return A.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,
                        function(A, e) {
                                var o = e.trim().replace(/^"(.*)"$/,
                                function(A, e) {
                                        return e
                                }).replace(/^'(.*)'$/,
                                function(A, e) {
                                        return e
                                });
                                if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o)) return A;
                                var i;
                                return i = 0 === o.indexOf("//") ? o: 0 === o.indexOf("/") ? t + o: r + o.replace(/^\.\//, ""),
                                "url(" + JSON.stringify(i) + ")"
                        })
                }
        },
        115 : function(A, e) {
                "use strict";
                function t(A, e) {
                        if (! (A instanceof e)) throw new TypeError("Cannot call a class as a function")
                }
                Object.defineProperty(e, "__esModule", {
                        value: !0
                });
                var r = e.instanceData = {};
                e.Data = function A(e) {
                        t(this, A),
                        this.formData = {},
                        this.formID = e,
                        this.layout = "",
                        r[e] = this
                },
                e.availablefields = {}
        },
        149 : function(A, e, t) {
                "use strict";
                function r(A) {
                        return A && A.__esModule ? A: {
                        default:
                                A
                        }
                }
                function o(A, e) {
                        var t = {};
                        for (var r in A) 0 <= e.indexOf(r) || Object.prototype.hasOwnProperty.call(A, r) && (t[r] = A[r]);
                        return t
                }
                function i(A, e) {
                        if (! (A instanceof e)) throw new TypeError("Cannot call a class as a function")
                }
                Object.defineProperty(e, "__esModule", {
                        value: !0
                });
                var n = t(51),
                a = t(115),
                l = t(19),
                s = r(l),
                c = t(53),
                u = r(c),
                f = t(29),
                g = r(f),
                d = t(52),
                p = t(6),
                w = r(p),
                m = t(35),
                b = r(m),
                B = s.
        default.markup,
                h = function() {
                        function A(e, t) {
                                i(this, A),
                                this.data = a.instanceData[e],
                                this.d = n.instanceDom[e],
                                this.doCancel = !1,
                                this.layout = t
                        }
                        return A.prototype.startMoving = function(A, e) {
                                e.item.show().addClass("moving"),
                                this.doCancel = !0,
                                this.from = e.item.parent()
                        },
                        A.prototype.stopMoving = function(A, e) {
                                var t = this;
                                e.item.removeClass("moving"),
                                t.doCancel && (e.sender && $(e.sender).sortable("cancel"), this.from.sortable("cancel")),
                                t.save(),
                                t.doCancel = !1
                        },
                        A.prototype.beforeStop = function(A, e) {
                                var t = this,
                                r = d.config.opts,
                                o = t.d.stage,
                                i = o.childNodes.length - 1,
                                n = [];
                                t.stopIndex = e.placeholder.index() - 1,
                                !r.sortableControls && e.item.parent().hasClass("frmb-control") && n.push(!0),
                                r.prepend && n.push(0 === t.stopIndex),
                                r.append && n.push(t.stopIndex + 1 === i),
                                t.doCancel = n.some(function(A) {
                                        return ! 0 === A
                                })
                        },
                        A.prototype.getTypes = function(A) {
                                var e = {
                                        type: A.attr("type")
                                },
                                t = $(".fld-subtype", A).val();
                                return t !== e.type && (e.subtype = t),
                                e
                        },
                        A.prototype.fieldOptionData = function(A) {
                                var e = [],
                                t = $(".sortable-options li", A);
                                return t.each(function(A) {
                                        var r = $(t[A]),
                                        o = $(".option-selected", r).is(":checked"),
                                        i = {
                                                label: $(".option-label", r).val(),
                                                value: $(".option-value", r).val()
                                        };
                                        o && (i.selected = o),
                                        e.push(i)
                                }),
                                e
                        },
                        A.prototype.xmlSave = function(A) {
                                var e = this.prepData(A),
                                t = ["\n\t"];
                                return s.
                        default.forEach(e,
                                function(A, e) {
                                        var r = null,
                                        o = n.optionFieldsRegEx;
                                        if (e.type.match(o)) {
                                                for (var i = e.values,
                                                a = [], l = 0; l < i.length; l++) {
                                                        var s = i[l],
                                                        c = B("option", s.label, s).outerHTML;
                                                        a.push("\n\t\t\t" + c)
                                                }
                                                a.push("\n\t\t"),
                                                r = a.join(""),
                                                delete e.values
                                        }
                                        var u = B("field", r, e);
                                        t.push("\n\t\t" + u.outerHTML)
                                }),
                                t.push("\n\t\n"),
                                t.join("")
                        },
                        A.prototype.prepData = function(A) {
                                var e = [],
                                t = this.d,
                                r = this;
                                return 0 !== A.childNodes.length && s.
                        default.forEach(A.childNodes,
                                function(A, o) {
                                        var i = $(o);
                                        if (!i.hasClass("disabled-field")) {
                                                var n = r.getTypes(i),
                                                a = $(".roles-field:checked", o),
                                                l = a.map(function(A) {
                                                        return a[A].value
                                                }).get();
                                                if (r.setAttrVals(o, n), n.subtype) if ("quill" === n.subtype) {
                                                        var c = n.name;
//                                                        var c = n.name + "-preview";
                                                        if (window.fbEditors.quill[c]) {
                                                                var u = window.fbEditors.quill[c].instance,
                                                                f = u.getContents();
                                                                n.value = window.JSON.stringify(f.ops)
                                                        }
                                                } else if ("tinymce" === n.subtype && window.tinymce) {
                                                        var g = n.name;
//                                                        var g = n.name + "-preview";
                                                        if (window.tinymce.editors[g]) {
                                                                var d = window.tinymce.editors[g];
                                                                n.value = d.getContent()
                                                        }
                                                }
                                                if (l.length && (n.role = l.join(",")), n.className = n.className || n.class, n.className) {
                                                        var p = /(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(n.className);
                                                        p && (n.style = p[1])
                                                }
                                                n = s.
                                        default.trimObj(n);
                                                n.type && n.type.match(t.optionFieldsRegEx) && (n.values = r.fieldOptionData(i)),
                                                e.push(n)
                                        }
                                }),
                                e
                        },
                        A.prototype.getData = function(A) {
                                var e = this.data;
                                return A || (A = d.config.opts.formData),
                                !!A && (e.formData = {
                                        xml: function(A) {
                                                return s.
                                        default.parseXML(A)
                                        },
                                        json: function(A) {
                                                return window.JSON.parse(A)
                                        }
                                } [d.config.opts.dataType](A) || [], e.formData)
                        },
                        A.prototype.save = function(A) {
                                var e = this,
                                t = this.data;
                                return A || (A = this.d.stage),
                                t.formData = {
                                        xml: function() {
                                                return e.xmlSave(A)
                                        },
                                        json: function() {
                                                return window.JSON.stringify(e.prepData(A), null, "\t")
                                        }
                                } [d.config.opts.dataType](A),
                                document.dispatchEvent(u.
                        default.formSaved),
                                t.formData
                        },
                        A.prototype.incrementId = function(A) {
                                var e = A.lastIndexOf("-"),
                                t = parseInt(A.substring(e + 1)) + 1;
                                return A.substring(0, e) + "-" + t
                        },
                        A.prototype.setAttrVals = function(A, e) {
                                var t = A.querySelectorAll('[class*="fld-"]');
                                s.
                        default.forEach(t,
                                function(A) {
                                        var r, o = t[A],
                                        i = s.
                                default.camelCase(o.getAttribute("name"));
                                        r = o.attributes.contenteditable ? o.innerHTML: "checkbox" === o.type ? o.checked: o.value,
                                        e[i] = r
                                })
                        },
                        A.prototype.updatePreview = function(A) {
                                var e = this,
                                t = this.d,
                                r = A.attr("class"),
                                o = A[0];
                                if ( - 1 === r.indexOf("input-control")) {
                                        var i, a = A.attr("type"),
                                        l = $(".prev-holder", o),
                                        c = {
                                                type: a
                                        };
                                        e.setAttrVals(o, c);
                                        var f = $(".btn-style", o).val();
                                        f && (c.style = f),
                                        a.match(t.optionFieldsRegEx) && (c.values = [], c.multiple = $('[name="multiple"]', o).is(":checked"), $(".sortable-options li", o).each(function(A, e) {
                                                var t = {};
                                                t.selected = $(".option-selected", e).is(":checked"),
                                                t.value = $(".option-value", e).val(),
                                                t.label = $(".option-label", e).val(),
                                                c.values.push(t)
                                        })),
                                        c = s.
                                default.trimObj(c),
                                        c.className = e.classNames(o, c),
                                        $(".fld-className", o).val(c.className),
                                        A.data("fieldData", c);
                                        var g = b.
                                default.lookup(c.type),
                                        d = g ? g.class: w.
                                default.getClass(c.type, c.subtype);
                                        i = this.layout.build(d, c),
                                        (0, n.empty)(l[0]),
                                        l[0].appendChild(i),
                                        i.dispatchEvent(u.
                                default.fieldRendered)
                                }
                        },
                        A.prototype.disabledTT = function(A) {
                                var e = function(A, e) {
                                        var t = e.field.getBoundingClientRect(),
                                        r = A.clientX - t.left - 21,
                                        o = A.clientY - t.top - e.tt.offsetHeight - 12;
                                        e.tt.style.transform = "translate(" + r + "px, " + o + "px)"
                                },
                                t = A.querySelectorAll(".disabled-field");
                                s.
                        default.forEach(t,
                                function(A) {
                                        var r = t[A],
                                        o = g.
                                default.get("fieldNonEditable");
                                        if (o) {
                                                var i = s.
                                        default.markup("p", o, {
                                                        className: "frmb-tt"
                                                });
                                                r.appendChild(i),
                                                r.addEventListener("mousemove",
                                                function(A) {
                                                        return e(A, {
                                                                tt: i,
                                                                field: r
                                                        })
                                                })
                                        }
                                })
                        },
                        A.prototype.classNames = function(A, e) {
                                var t = A.querySelector(".fld-className");
                                if (t) {
                                        var r = void 0,
                                        o = e.type,
                                        i = e.style,
                                        n = t.value.split(" "),
                                        a = {
                                                button: "btn",
                                                submit: "btn"
                                        } [o];
                                        if (a) {
                                                if (i) {
                                                        for (r = 0; r < n.length; r++) {
                                                                var l = new RegExp("(?:^|s)" + a + "-(.*?)(?:s|$)+", "g");
                                                                n[r].match(l) && n.splice(r, 1)
                                                        }
                                                        n.push(a + "-" + i)
                                                }
                                                n.push(a)
                                        }
                                        return s.
                                default.unique(n).join(" ").trim()
                                }
                        },
                        A.prototype.closeConfirm = function(A, e) {
                                A || (A = document.getElementsByClassName("form-builder-overlay")[0]),
                                e || (e = document.getElementsByClassName("form-builder-dialog")[0]),
                                A.classList.remove("visible"),
                                (0, n.remove)(e),
                                (0, n.remove)(A),
                                document.dispatchEvent(u.
                        default.modalClosed)
                        },
                        A.prototype.editorLayout = function(A) {
                                return {
                                        left: {
                                                stage: "pull-left",
                                                controls: "pull-right"
                                        },
                                        right: {
                                                stage: "pull-right",
                                                controls: "pull-left"
                                        }
                                } [A] || ""
                        },
                        A.prototype.showOverlay = function() {
                                var A = this,
                                e = s.
                        default.markup("div", null, {
                                        className: "form-builder-overlay"
                                });
                                return document.body.appendChild(e),
                                e.classList.add("visible"),
                                e.onclick = function() {
                                        A.closeConfirm(e)
                                },
                                e
                        },
                        A.prototype.confirm = function(A, e) {
                                var t = 2 < arguments.length && void 0 !== arguments[2] && arguments[2],
                                r = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : "",
                                o = this,
                                i = g.
                        default.current,
                                n = o.showOverlay(),
                                a = B("button", i.yes, {
                                        className: "yes btn btn-success btn-sm"
                                }),
                                l = B("button", i.no, {
                                        className: "no btn btn-danger btn-sm"
                                });
                                l.onclick = function() {
                                        o.closeConfirm(n)
                                },
                                a.onclick = function() {
                                        e(),
                                        o.closeConfirm(n)
                                };
                                var s = B("div", [l, a], {
                                        className: "button-wrap"
                                });
                                r = "form-builder-dialog " + r;
                                var c = B("div", [A, s], {
                                        className: r
                                });
                                if (t) c.classList.add("positioned");
                                else {
                                        var u = document.documentElement;
                                        t = {
                                                pageX: _Mathmax(u.clientWidth, window.innerWidth || 0) / 2,
                                                pageY: _Mathmax(u.clientHeight, window.innerHeight || 0) / 2
                                        },
                                        c.style.position = "fixed"
                                }
                                return c.style.left = t.pageX + "px",
                                c.style.top = t.pageY + "px",
                                document.body.appendChild(c),
                                a.focus(),
                                c
                        },
                        A.prototype.dialog = function(A) {
                                var e = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
                                t = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : "",
                                r = this,
                                o = document.documentElement.clientWidth,
                                i = document.documentElement.clientHeight;
                                r.showOverlay(),
                                t = "form-builder-dialog " + t;
                                var n = s.
                        default.markup("div", A, {
                                        className: t
                                });
                                return e ? n.classList.add("positioned") : (e = {
                                        pageX: _Mathmax(o, window.innerWidth || 0) / 2,
                                        pageY: _Mathmax(i, window.innerHeight || 0) / 2
                                },
                                n.style.position = "fixed"),
                                n.style.left = e.pageX + "px",
                                n.style.top = e.pageY + "px",
                                document.body.appendChild(n),
                                document.dispatchEvent(u.
                        default.modalOpened),
                                -1 !== t.indexOf("data-dialog") && document.dispatchEvent(u.
                        default.viewData),
                                n
                        },
                        A.prototype.confirmRemoveAll = function(A) {
                                var e = this,
                                t = A.target.id.match(/frmb-\d{13}/)[0],
                                r = document.getElementById(t),
                                o = g.
                        default.current,
                                i = $("li.form-field", r),
                                n = A.target.getBoundingClientRect(),
                                a = document.body.getBoundingClientRect(),
                                l = {
                                        pageX: n.left + n.width / 2,
                                        pageY: n.top - a.top - 12
                                };
                                i.length ? e.confirm(o.clearAllMessage,
                                function() {
                                        e.removeAllFields.call(e, r),
                                        d.config.opts.notify.success(o.allFieldsRemoved),
                                        d.config.opts.onClearAll()
                                },
                                l) : e.dialog(o.noFieldsToClear, l)
                        },
                        A.prototype.removeAllFields = function(A) {
                                var e = this,
                                t = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1],
                                r = g.
                        default.current,
                                o = d.config.opts,
                                i = A.querySelectorAll("li.form-field"),
                                a = [];
                                if (!i.length) return ! 1;
                                if (o.prepend && a.push(!0), o.append && a.push(!0), a.some(function(A) {
                                        return ! 0 === A
                                }) || (A.parentElement.classList.add("empty"), A.parentElement.dataset.content = r.getStarted), t) {
                                        A.classList.add("removing");
                                        var l = 0;
                                        s.
                                default.forEach(i,
                                        function(A) {
                                                return l += i[A].offsetHeight + 3
                                        }),
                                        i[0].style.marginTop = -l + "px",
                                        setTimeout(function() { (0, n.empty)(A).classList.remove("removing"),
                                                e.save()
                                        },
                                        400)
                                } else(0, n.empty)(A),
                                this.save()
                        },
                        A.prototype.setFieldOrder = function(A) {
                                if (!d.config.opts.sortableControls) return ! 1;
                                var e = window,
                                t = e.sessionStorage,
                                r = e.JSON,
                                o = [];
                                return A.children().each(function(A, e) {
                                        var t = $(e).data("type");
                                        t && o.push(t)
                                }),
                                t && t.setItem("fieldOrder", r.stringify(o)),
                                o
                        },
                        A.prototype.orderFields = function(A) {
                                var e, t = d.config.opts,
                                r = t.controlOrder.concat(A);
                                return window.sessionStorage && (t.sortableControls ? e = window.sessionStorage.getItem("fieldOrder") : window.sessionStorage.removeItem("fieldOrder")),
                                e ? (e = window.JSON.parse(e), e = s.
                        default.unique(e.concat(A)), e = Object.keys(e).map(function(A) {
                                        return e[A]
                                })) : e = s.
                        default.unique(r),
                                e.forEach(function(A) {
                                        var t = /-[\d]{4}$/;
                                        if (A.match(t)) {
                                                var r = e.indexOf(A.replace(t, "")); - 1 !== r && (e.splice(e.indexOf(A), 1), e.splice(r + 1, e.indexOf(A), A))
                                        }
                                }),
                                t.disableFields.length && (e = e.filter(function(A) {
                                        return - 1 == t.disableFields.indexOf(A)
                                })),
                                e.filter(Boolean)
                        },
                        A.prototype.closeAllEdit = function() {
                                var A = this,
                                e = $("> li.editing", A.d.stage),
                                t = $(".toggle-form", A.d.stage),
                                r = $(".frm-holder", e);
                                t.removeClass("open"),
                                e.parent().siblings('form-field').find('li').removeClass('editing');
                                 $(".prev-holder", e).show(),
                                 r.hide()
                        },
                        A.prototype.toggleEdit = function(A) {
                                console.log(A);
                                var e = !(1 < arguments.length && void 0 !== arguments[1]) || arguments[1],
                                t = document.getElementById(A),
                                r = $(".toggle-form", t);
                                if (r.length) {
                                        $('.form-field').removeClass('editing');
                                        var o = $(".frm-holder", t);
                                        t.classList.toggle("editing"),
                                        r.toggleClass("open"),
                                        e ? ($(".prev-holder", t).slideToggle(250), o.slideToggle(250)) : ($(".prev-holder", t).toggle(), o.toggle()),
                                        this.updatePreview($(t))

                                }
                        },
                        A.prototype.stickyControls = function() {
                                var A = this.d,
                                e = $(A.controls).parent(),
                                t = $(A.stage).parent(),
                                r = e.width(),
                                o = A.controls.getBoundingClientRect();
                                $(window).scroll(function(i) {
                                        var n = $(i.target).scrollTop(),
                                        a = {
                                                top: 5,
                                                bottom: "auto",
                                                right: "auto",
                                                left: o.left
                                        },
                                        l = Object.assign({},
                                        a, d.config.opts.stickyControls.offset);
                                        if (n > t.offset().top) {
                                                var s = Object.assign({
                                                        position: "fixed",
                                                        width: r
                                                },
                                                l),
                                                c = e.offset(),
                                                u = t.offset(),
                                                f = c.top + e.height(),
                                                g = u.top + t.height(),
                                                p = f === g && c.top > n;
                                                f > g && c.top !== u.top && e.css({
                                                        position: "absolute",
                                                        top: "auto",
                                                        bottom: 0,
                                                        right: 0,
                                                        left: "auto"
                                                }),
                                                (f < g || p) && e.css(s)
                                        } else A.controls.parentElement.removeAttribute("style")
                                })
                        },
                        A.prototype.showData = function() {
                                var A = this.data,
                                e = s.
                        default.escapeHtml(A.formData),
                                t = B("code", e, {
                                        className: "formData-" + d.config.opts.dataType
                                });
                                this.dialog(B("pre", t), null, "data-dialog")
                        },
                        A.prototype.removeField = function(A) {
                                var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 250,
                                t = !1,
                                r = this,
                                o = this.d.stage,
                                i = o.getElementsByClassName("form-field");
                                if (!i.length) return console.warn("No fields to remove"),
                                !1;
                                if (!A) {
                                        var n = [].slice.call(i).map(function(A) {
                                                return A.id
                                        });
                                        console.warn("fieldID required to remove specific fields."),
                                        console.warn("Removing last field since no ID was supplied."),
                                        console.warn("Available IDs: " + n.join(", ")),
                                        A = o.lastChild.id
                                }
                                var a = document.getElementById(A),
                                l = $(a);
                                return a ? (l.slideUp(e,
                                function() {
                                        if (l.removeClass("deleting"), l.remove(), t = !0, r.save(), !o.childNodes.length) {
                                                var A = o.parentElement;
                                                A.classList.add("empty"),
                                                A.dataset.content = g.
                                        default.current.getStarted
                                        }
                                }), document.dispatchEvent(u.
                        default.fieldRemoved), t) : (console.warn("Field not found"), !1)
                        },
                        A.prototype.processActionButtons = function(A) {
                                var e = A.label,
                                t = A.events,
                                r = o(A, ["label", "events"]),
                                i = this.data;
                                e = e ? g.
                        default.current[e] || e: r.id ? g.
                        default.current[r.id] || s.
                        default.capitalize(r.id):
                                "",
                                r.id = r.id ? i.formID + "-" + r.id + "-action": i.formID + "-action-" + Math.round(1e3 * Math.random());
                                var n = B("button", e, r);
                                if (t) {
                                        for (var a in t) !
                                        function(A) {
                                                t.hasOwnProperty(A) && n.addEventListener(A,
                                                function(e) {
                                                        return t[A](e)
                                                })
                                        } (a)
                                }
                                return n
                        },
                        A.prototype.processSubtypes = function(A) {
                                for (var e in A) if (A.hasOwnProperty(e)) {
                                        var t = w.
                                default.getClass(e);
                                        w.
                                default.register(A[e], t, e)
                                }
                                var r = w.
                        default.getRegisteredSubtypes(),
                                o = {};
                                for (var i in r) if (r.hasOwnProperty(i)) {
                                        for (var n = [], a = r[i], l = Array.isArray(a), s = 0, a = l ? a: a[Symbol.iterator]();;) {
                                                var c;
                                                if (l) {
                                                        if (s >= a.length) break;
                                                        c = a[s++]
                                                } else {
                                                        if (s = a.next(), s.done) break;
                                                        c = s.value
                                                }
                                                var u = c,
                                                f = w.
                                        default.getClass(i, u);
                                                n.push({
                                                        label: f.mi18n(u),
                                                        value: u
                                                })
                                        }
                                        o[i] = n
                                }
                                return o
                        },
                        A.prototype.editorUI = function() {
                                var A = this.d,
                                e = this.data;
                              
                                 A.stage = B("ul", null, {
                                                id: e.formID,
                                                className: "frmb"
                                        })
                                A.controls = B("ul", null, {
                                        id: e.formID + "-control-box",
                                        className: "frmb-control"
                                })
                        },
                        A.prototype.processOptions = function(A) {
                                var e = this,
                                t = A.actionButtons,
                                r = A.replaceFields,
                                i = o(A, ["actionButtons", "replaceFields"]);
                                return t = [{
                                        type: "button",
                                        id: "clear",
                                        className: "clear-all btn btn-danger",
                                        events: {
                                                click: e.confirmRemoveAll.bind(e)
                                        }
                                },
//                                {
//                                        type: "button",
//                                        label: "viewJSON",
//                                        id: "data",
//                                        className: "btn btn-info get-data",
//                                        events: {
//                                                click: e.showData.bind(e)
//                                        }
//                                },
                                {
                                        type: "button",
                                        id: "save",
                                        className: "btn btn-primary save-template",
                                        events: {
                                                click: function(A) {
                                                        e.save(),
                                                        d.config.opts.onSave(A, e.data.formData)
                                                }
                                        }
                                }].concat(A.actionButtons),
                                i.fields = i.fields.concat(r),
                                i.disableFields = i.disableFields.concat(r.map(function(A) {
                                        var e = A.type;
                                        return e && e
                                })),
                                d.config.opts = Object.assign({},
                                {
                                        actionButtons: t
                                },
                                i),
                                d.config.opts
                        },
                        A.prototype.input = function() {
                                var A = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
                                return B("input", null, A)
                        },
                        A.prototype.getFormData = function() {
                                var A = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "js",
                                e = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
                                t = this;
                                return {
                                        js: function() {
                                                return t.prepData(t.d.stage)
                                        },
                                        xml: function() {
                                                return t.xmlSave(t.d.stage)
                                        },
                                        json: function(A) {
                                                return A ? window.JSON.stringify(t.prepData(t.d.stage), null, "\t") : window.JSON.stringify(t.prepData(t.d.stage))
                                        }
                                } [A](e)
                        },
                        A
                } ();
                e.
        default = h
        },
        151 : function(A, e, t) {
                var r = t(359);
                "string" == typeof r && (r = [[A.i, r, ""]]),
                t(113)(r, {
                        attrs: {
                                class: "formBuilder-injected-style"
                        }
                }),
                r.locals && (A.exports = r.locals)
        },
        153 : function(A, e, t) {
                "use strict";
                function r(A) {
                        return A && A.__esModule ? A: {
                        default:
                                A
                        }
                }
                function o(A, e) {
                        var t = {};
                        for (var r in A) 0 <= e.indexOf(r) || Object.prototype.hasOwnProperty.call(A, r) && (t[r] = A[r]);
                        return t
                }
                function i(A) {
                        return function() {
                                var e = A.apply(this, arguments);
                                return new Promise(function(A, t) {
                                        function r(o, i) {
                                                try {
                                                        var n = e[o](i),
                                                        a = n.value
                                                } catch(A) {
                                                        return void t(A)
                                                }
                                                return n.done ? void A(a) : Promise.resolve(a).then(function(A) {
                                                        r("next", A)
                                                },
                                                function(A) {
                                                        r("throw", A)
                                                })
                                        }
                                        return r("next")
                                })
                        }
                }
                t(61),
                t(151);
                var n = t(51),
                a = r(n),
                l = t(115),
                s = t(29),
                c = r(s),
                u = t(19),
                f = r(u),
                g = t(53),
                d = r(g),
                p = t(60),
                w = r(p),
                m = t(149),
                b = r(m),
                B = t(52),
                h = t(6),
                I = r(h);
                t(59);
                var E = t(35),
                M = r(E),
                y = (new Date).getTime(),
                Q = function A(e, t) {
                        function r(A, e) {
                                var t = [];
                                for (var r in A) if (A.hasOwnProperty(r)) {
                                        var i = p[r],
                                        n = A[r],
                                        a = n.value;
                                        n.value = e[r] || n.value || "",
                                        n.label && (p[r] = n.label),
                                        n.options ? t.push(s(r, n)) : t.push(o(r, n)),
                                        p[r] = i,
                                        n.value = a
                                }
                                return t.join("")
                        }
                        function o(A, e) {
                                var t = {
                                        id: A + "-" + h.lastID,
                                        title: e.description || e.label || A.toUpperCase(),
                                        name: A,
                                        type: e.type || "text",
                                        className: ["fld-" + A]
                                },
                                r = '' + p[A] + "";
                                return f.
                        default.inArray(t.type, ["checkbox", "checkbox-group", "radio-group"]) || t.className.push("form-control"),
                                t = Object.assign({},
                                e, t),
                                '' + r + '