
!function (e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { var t; t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.Froffcanvas = e() } }(function () { return function e(t, n, o) { function i(c, f) { if (!n[c]) { if (!t[c]) { var a = "function" == typeof require && require; if (!f && a) return a(c, !0); if (r) return r(c, !0); var s = new Error("Cannot find module '" + c + "'"); throw s.code = "MODULE_NOT_FOUND", s } var u = n[c] = { exports: {} }; t[c][0].call(u.exports, function (e) { var n = t[c][1][e]; return i(n ? n : e) }, u, u.exports, e, t, n, o) } return n[c].exports } for (var r = "function" == typeof require && require, c = 0; c < o.length; c++) i(o[c]); return i }({ 1: [function (e, t, n) { "use strict"; Object.defineProperty(n, "__esModule", { value: !0 }), Element.prototype.matches = Element.prototype.matches || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector; var o = function () { function e(e) { "function" == typeof e && setTimeout(e, 0) } function t(e, t) { for (; e && !e.matches(t) ;) e = e.parentElement; return e } function n(e) { return e.getAttribute("id") } function o(e) { e.setAttribute("aria-hidden", !0) } function i(e) { e.removeAttribute("aria-hidden") } function r(t) { t.style.visibility = "visible", t.setAttribute("aria-hidden", !1), t.setAttribute("tabindex", -1), t.focus(), e(m), e(y), e(p), e(v), t.scrollTop = 0, t.classList.add(C) } function c() { var e = arguments.length <= 0 || void 0 === arguments[0] ? U : arguments[0], t = arguments.length <= 1 || void 0 === arguments[1] ? !0 : arguments[1]; e.setAttribute("aria-hidden", !0), e.removeAttribute("tabindex"), e.blur(), e.style.visibility = "hidden", h(e), b(), E(), d(e), e.classList.remove(C), t && (N.focus(), N = null) } function f() { F.forEach(function (e) { i(e), m(e), h(e), e.classList.remove(j), e.classList.remove(C), e.style.visibility = "" }), E(), b(), N = null, U = null } function a(e) { var t = e.currentTarget.getAttribute("aria-controls"), n = O.getElementById(t); U && c(U, !1), N = e.currentTarget, U = n, r(n) } function s() { c() } function u(e) { var n = e.target === U, o = t(e.target, k); n || o || c() } function l(e) { 27 === e.keyCode && c() } function d(e) { var t = D(A + '[aria-controls="' + n(e) + '"]'); t.forEach(function (e) { return e.addEventListener("click", a) }) } function v() { var e = arguments.length <= 0 || void 0 === arguments[0] ? U : arguments[0], t = D(q, e)[0]; t.addEventListener("click", s) } function p() { O.addEventListener("click", u) } function y() { O.addEventListener("keydown", l) } function m() { var e = arguments.length <= 0 || void 0 === arguments[0] ? U : arguments[0], t = D(A + '[aria-controls="' + n(e) + '"]'); t.forEach(function (e) { return e.removeEventListener("click", a) }) } function h() { var e = arguments.length <= 0 || void 0 === arguments[0] ? U : arguments[0], t = D(q, e)[0]; t.removeEventListener("click", s) } function E() { O.removeEventListener("click", u) } function b() { O.removeEventListener("keydown", l) } function g() { F && F.forEach(function (e) { o(e), d(e), e.classList.add(j) }) } var L = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0], w = L.selector, k = void 0 === w ? ".js-fr-offcanvas" : w, x = L.openSelector, A = void 0 === x ? ".js-fr-offcanvas-open" : x, S = L.closeSelector, q = void 0 === S ? ".js-fr-offcanvas-close" : S, M = L.readyClass, j = void 0 === M ? "fr-offcanvas--is-ready" : M, T = L.activeClass, C = void 0 === T ? "fr-offcanvas--is-active" : T, O = document, _ = O.documentElement, D = function (e) { var t = arguments.length <= 1 || void 0 === arguments[1] ? O : arguments[1]; return [].slice.call(t.querySelectorAll(e)) }; if ("querySelector" in O && "addEventListener" in window && _.classList) { var F = D(k), N = null, U = null; return g(), { init: g, destroy: f } } }; n["default"] = o, t.exports = n["default"] }, {}] }, {}, [1])(1) });


