diff --git a/CHANGELOG.md b/CHANGELOG.md index 390280c6..ca094acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ * Auto-link a plugin/theme license in details if it starts with `http` * Allow to fallback to `docs:` instead of `readme:` * Forward a `sid` to GPM when downloading a premium package - * Better support for array field key/value when either key or value is empty [#1972](https://github.com/getgrav/grav-plugin-admin/issues/1972) + * Better support for array field key/value when either key or value is stored empty [#1972](https://github.com/getgrav/grav-plugin-admin/issues/1972) + * Remember the open state of the sidebar [#1973](https://github.com/getgrav/grav-plugin-admin/issues/1973) 1. [](#bugfix) * Fixed Safari issue with new ACL picker field [#1955](https://github.com/getgrav/grav-plugin-admin/issues/1955) * Stop propagation of ACL add button in ACL picker [flex-objects#83](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/83) diff --git a/themes/grav/app/utils/sidebar.js b/themes/grav/app/utils/sidebar.js index 97ff55a3..090e9bdc 100644 --- a/themes/grav/app/utils/sidebar.js +++ b/themes/grav/app/utils/sidebar.js @@ -1,5 +1,6 @@ import $ from 'jquery'; import Map from 'es6-map'; +import Cookies from 'cookies-js'; const MOBILE_BREAKPOINT = 48 - 0.062; const DESKTOP_BREAKPOINT = 75 + 0.063; @@ -123,6 +124,7 @@ export default class Sidebar { if (event) { event.preventDefault(); } clearTimeout(this.timeout); let isDesktop = global.matchMedia(DESKTOP_QUERY).matches; + let cookie = null; if (isDesktop) { this.body.removeClass('sidebar-open'); @@ -135,6 +137,14 @@ export default class Sidebar { this.body.toggleClass(`sidebar-${isDesktop ? 'closed' : 'open'}`); $(global).trigger('sidebar_state._grav', isDesktop); + + if (isDesktop) { + cookie = !this.body.hasClass('sidebar-closed'); + } else { + cookie = this.body.hasClass('sidebar-open'); + } + + Cookies.set('grav-admin-sidebar', cookie, { expires: Infinity }); } checkMatch(data) { diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index c0f4a74c..34434437 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -28,5 +28,5 @@ if(0===arguments.length)return r.parseInputDate;if("function"!=typeof e)throw ne * @version v4.2.8+1e68dce6 */ !function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function r(e){return"function"==typeof e}function i(e){V=e}function a(e){$=e}function o(){return function(){return t.nextTick(d)}}function s(){return"undefined"!=typeof B?function(){B(d)}:u()}function l(){var e=0,t=new H(d),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function c(){var e=new MessageChannel;return e.port1.onmessage=d,function(){return e.port2.postMessage(0)}}function u(){var e=setTimeout;return function(){return e(d,1)}}function d(){for(var e=0;e1)for(var n=1;n-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}var i=n(344);e.exports=r},function(e,t,n){function r(e){return e=i(e),e.replace(a,"")}var i=n(344),a=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;e.exports=r},function(e,t,n){function r(e){return e=i(e),e.toUpperCase()}var i=n(344);e.exports=r},function(e,t,n){function r(e){return e=i(e),e.toLowerCase()}var i=n(344);e.exports=r},function(e,t,n){function r(e,t,n){return e=i(e),t=i(t),e.indexOf(t,n)!==-1}var i=n(344);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(632),s=r(o);(0,a.default)(document).on("mousedown",'[data-remodal-target="theme-switch-warn"]',function(e){var t=(0,a.default)(e.target).closest("[data-gpm-theme]").find(".gpm-name a:first").text(),n=(0,a.default)(".remodal.theme-switcher");n.find("strong").text(t),n.find(".button.continue").attr("href",(0,a.default)(e.target).attr("href"))}),(0,a.default)(document).on("click",'[data-theme-action="remove-package"]',function(e){s.default.handleRemovingPackage("theme",e)}),(0,a.default)(document).on("click",'[data-theme-action="reinstall-package"]',function(e){s.default.handleReinstallPackage("theme",e)}),(0,a.default)(document).on("click",'[data-theme-action="remove-dependency-package"]',function(e){s.default.handleRemovingDependency("theme",e)}),(0,a.default)(document).on("click",'[data-theme-action="start-package-installation"]',function(e){s.default.handleGettingPackageDependencies("theme",e,"install")}),(0,a.default)(document).on("click",'[data-theme-action="start-packages-update"]',function(e){s.default.handleGettingPackageDependencies("theme",e)}),(0,a.default)(document).on("click",'[data-theme-action="install-dependencies-and-package"]',function(e){s.default.handleInstallingDependenciesAndPackage("theme",e)}),(0,a.default)(document).on("click",'[data-theme-action="install-package"]',function(e){s.default.handleInstallingPackage("theme",e)})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;nNo media found

')},w=function(){y(),h=0,m=!1,(0,s.default)(".empty-space").remove(),g(p,function(e){e.trim().length?p.page||p.date&&"*"!==p.date||p.type&&"*"!==p.type||(0,s.default)(".js__files").trigger("fillView"):b()})};(0,s.default)("body").on("click",".pages-list-container .js__page-link",function(e){var t=(0,s.default)(e.target).data("page");p.page=t,(0,s.default)(".media-list-title .page-indicator").html(t),(0,s.default)(".js__reset-pages-filter").removeClass("hidden"),_(),(0,s.default)(e.target).parents(".row").addClass("active"),(0,s.default)(".js__file-uploader").removeClass("hidden"),(0,s.default)(".dropzone")[0]&&(0,s.default)(".dropzone")[0].dropzone.on("processing",function(e){this.options.url=l.config.base_url_relative+"/media-manager"+t+".json/task"+l.config.param_sep+"addmedia"}),(0,s.default)(".js__button-clear-media-cache").addClass("hidden"),w(),S()}),(0,s.default)("body").on("click",".js__reset-pages-filter",function(e){(0,s.default)(".media-list-title .page-indicator").html("All Pages"),y(),_(),(0,s.default)(".js__reset-pages-filter").addClass("hidden"),(0,s.default)(".js__file-uploader").addClass("hidden"),(0,s.default)(".js__button-clear-media-cache").removeClass("hidden"),delete p.page,w()});var k=function(){(0,s.default)(".spinning-wheel").hide();var e=(0,s.default)(".mediapicker-scroll").last();e.length&&(0,s.default)(e).on("scroll",function(){(0,s.default)(this).scrollTop()+(0,s.default)(this).innerHeight()+100>=(0,s.default)(this)[0].scrollHeight&&C()})},x=function(e){m||g({},function(t){!(0,s.default)(t).length||t.split("card-item").length-1 .fa").addClass("fa-spin"),(0,l.default)(n,{method:"post"},function(e){(0,a.default)("[data-2fa-image]").attr("src",e.image),(0,a.default)("[data-2fa-secret]").text(e.secret),(0,a.default)("[data-2fa-value]").val(e.secret.replace(" ","")),t.removeAttr("disabled").find("> .fa").removeClass("fa-spin")})});var u=function(){var e=(0,a.default)("#toggle_twofa_enabled1"),t=(0,a.default)(".twofa-secret");t[e.is(":checked")?"addClass":"removeClass"]("show")};c.on("click",".twofa-toggle input",u),u()},function(e,t,n){"use strict";n(645)},function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r),a=n(646),o=function(t,n){return(0,a.setParam)(e.location.href,t,n)};(0,i.default)(document).on("change",".logs-content .block-select select[name]",function(t){var n=(0,i.default)(t.currentTarget),r=n.attr("name"),a=n.val();e.location.href=o(r,a)})}).call(t,function(){return this}())},function(e,t,n){e.exports={contains:n(647),decode:n(649),encode:n(651),getParam:n(653),getQuery:n(648),parse:n(654),setParam:n(655)}},function(e,t,n){function r(e,t){var n=new RegExp("(\\?|&)"+t+"=","g");return n.test(i(e))}var i=n(648);e.exports=r},function(e,t){function n(e){var t=/\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(e);return t?decodeURIComponent(t[0].replace(/\+/g," ")):""}e.exports=n},function(e,t,n){function r(e,t){for(var n,r,s,l,c=(e||"").replace("?","").split("&"),u=-1,d={};r=c[++u];)n=r.indexOf("="),l=r.substring(0,n),s=decodeURIComponent(r.substring(n+1)),t!==!1&&(s=i(s)),o(d,l)?a(d[l])?d[l].push(s):d[l]=[d[l],s]:d[l]=s;return d}var i=n(650),a=n(360),o=n(358);e.exports=r},function(e,t){function n(e){var t;return t=null===e||"null"===e?null:"true"===e||"false"!==e&&(e===r||"undefined"===e?r:""===e||isNaN(e)?e:parseFloat(e))}var r;e.exports=n},function(e,t,n){function r(e){var t,n,r=[];return i(e,function(e,i){a(e)?(t=i+"=",n=new RegExp("&"+i+"+=$"),o(e,function(e){t+=encodeURIComponent(e)+"&"+i+"="}),r.push(t.replace(n,""))):r.push(i+"="+encodeURIComponent(e))}),r.length?"?"+r.join("&"):""}var i=n(357),a=n(360),o=n(652);e.exports=r},function(e,t){function n(e,t,n){if(null!=e)for(var r=-1,i=e.length;++r1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};(0,o.prepareElement)(e);var i=f.collect();(0,s.default)({preview:t,exportScss:n,color_scheme:i?i.filter(function(e,t){return t.match(/^data\[whitelabel]\[color_scheme]/)}).toJS():[],callback:function(t){r.call(r,t),(0,o.resetElement)(e)}})};d.on("click","[data-preview-scss]",function(e){e&&e.preventDefault();var t=(0,a.default)(e.currentTarget);return!t.data("busy_right_now")&&void p(t,!0,!1,function(e){e.files&&Object.keys(e.files).forEach(function(n){var r=(0,a.default)("#admin-pro-preview-"+n),i=Date.now();if(!r.length&&(r=(0,a.default)(''),(0,a.default)("head").append(r),!(0,a.default)("[data-reset-scss]").length)){var o=(0,a.default)('');o.insertAfter(t)}r.attr("href",e.files[n]+"?"+i)})})}),d.on("click","[data-recompile-scss]",function(e){e&&e.preventDefault();var t=(0,a.default)(e.currentTarget);return!t.data("busy_right_now")&&void p(t,!0,!1)}),d.on("click","[data-export-scss]",function(e){e&&e.preventDefault();var t=(0,a.default)(e.currentTarget);return!t.data("busy_right_now")&&void p(t,!0,!0,function(e){e.files&&Object.keys(e.files).forEach(function(t){if("download"===t){var n=document.createElement("a");n.setAttribute("href",e.files[t]),n.setAttribute("download",""),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}})})}),d.on("change._grav_colorpicker","[data-grav-colorpicker]",function(e,t,n,r){var i=(0,u.hex2rgb)(n),a=(299*i.r+587*i.g+114*i.b)/1e3,o=a>=128||r<=.5?"dark":"light";t.parent().removeClass("dark-text light-text").addClass(o+"-text")}),d.ready(function(){(0,a.default)("[data-grav-colorpicker]").trigger("keyup")})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.resetElement=t.prepareElement=void 0;var i=n(342),a=n(365),o=r(a);t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.preview,n=void 0!==t&&t,r=e.exportScss,a=void 0!==r&&r,s=e.color_scheme,l=void 0===s?{}:s,c=(e.fonts,e.callback),u=void 0===c?function(){}:c,d=a?"exportScss":"compileScss",f=i.config.base_url_relative+".json/task:"+d;(0,o.default)(f,{method:"post",body:Object.assign({},n?{preview:n}:null,l)},u)};t.prepareElement=function(e){e.data("busy_right_now",!0),e.data("current_icon")||e.data("current_icon",e.find(".fa").attr("class")),e.find(".fa").attr("class","fa fa-fw fa-spin fa-refresh")},t.resetElement=function(e){e.data("busy_right_now",!1),e.find(".fa").attr("class",e.data("current_icon"))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(463),s=r(o),l=(0,a.default)("body"),c=[],u=s.default.FormState.Instance,d=function(e,t){var n=e.prop("name"),r=e.prop("tagName").toLowerCase(),i=e.prop("type");switch(c.push(n),r){case"select":e.val(t),e.data("selectize").setValue(t),e.trigger("change");break;case"input":if("radio"===i){var o=t?"1":"0";e.filter(function(e,t){return(0,a.default)(t).val()===o}).prop("checked",!0);break}if("checkbox"===i){e.prop("checked",t);break}e.val(t),e.trigger("keyup")}};l.on("click","[data-preset-values]",function(e){var t=(0,a.default)(e.currentTarget),n=t.data("preset-values");Object.keys(n).forEach(function(e){"string"!=typeof n[e]&&Object.keys(n[e]).forEach(function(t){var r=(0,a.default)('[name="data[whitelabel][color_scheme]['+e+"]["+t+']"], [name="data['+e+"]["+t+']"]'),i=n[e][t];d(r,i)})})}),l.on("click","[data-reset-scss]",function(e){e&&e.preventDefault();var t=(0,a.default)(e.currentTarget),n=(0,a.default)("link[id^=admin-pro-preview-]");t.remove(),n.remove(),c.forEach(function(e){var t=u.loadState.get(e);d((0,a.default)('[name="'+e+'"]'),t)}),c=[]}),a.default.fn.hscrollarrows=function(){return this.each(function(){var e=(0,a.default)(''),t=(0,a.default)(''),n=null,r=null,i=!1,o=0,s=0,l=0,c=0,u=function(){o=g.width(),s=y.get(0).scrollWidth,l=s-o,c=.3*o},d=function(){u(),h()},f=function(){u(),p()},p=function(){g.parent().prepend(e),g.parent().prepend(t),e.on("click",m),t.on("click",v),h(),(0,a.default)(g).scroll(function(){i||(clearTimeout(n),n=setTimeout(function(){h()},250))}),(0,a.default)(window).resize(function(){clearTimeout(r),r=setTimeout(function(){d()},250)})},h=function(){var n=g.scrollLeft();n0?t.removeClass("hide"):t.addClass("hide"),i=!1},m=function(){var e=g.scrollLeft();e0&&(i=!0,g.stop().animate({scrollLeft:e-c},h))},g=(0,a.default)(this),y=(0,a.default)(":first-child",g);f()})},(0,a.default)(document).ready(function(){(0,a.default)(".jquery-horizontal-scroll").hscrollarrows()})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);+function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(a.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(1),o=r(a);+function(e){function t(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(r)}function n(t){return this.each(function(){var n=e(this),a=n.data("bs.collapse"),o=e.extend({},r.DEFAULTS,n.data(),"object"===("undefined"==typeof t?"undefined":i(t))&&t);!a&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),a||n.data("bs.collapse",a=new r(this,o)),"string"==typeof t&&a[t]()})}var r=function t(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};r.VERSION="3.4.0",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(t=i.data("bs.collapse"),t&&t.transitioning))){var a=e.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),t||i.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var l=e.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",e.proxy(s,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][l])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[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 i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return e.support.transition?void this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION):i.call(this)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,r){var i=e(r);this.addAriaAndCollapsedClass(t(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var a=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=r,e.fn.collapse.noConflict=function(){return e.fn.collapse=a,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(r){var i=e(this);i.attr("data-target")||r.preventDefault();var a=t(i),o=a.data("bs.collapse"),s=o?"toggle":i.data();n.call(a,s)})}(o.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(662),s=r(o),l=n(397),c=JSON.parse(s.default.get("grav-tabs-state")||"{}");(0,a.default)("body").on("touchstart click","[data-tabid]",function(e){e&&e.stopPropagation();var t=(0,a.default)(e.currentTarget);c[t.data("tabkey")]=t.data("scope"),s.default.set("grav-tabs-state",JSON.stringify(c),{expires:1/0});var n=(0,a.default)('[id="'+t.data("tabid")+'"]');t.siblings("[data-tabid]").removeClass("active"),t.addClass("active"),n.siblings("[id]").removeClass("active"),n.addClass("active"),l.Instance.editors.each(function(e,t){var n=(0,a.default)(t).data("codemirror");n&&0===n.display.lastWrapWidth&&n.refresh()})})},function(e,t,n){var r;!function(i,a){"use strict";var o=function(e){if("object"!=typeof e.document)throw new Error("Cookies.js requires a `window` with a `document` object");var t=function(e,n,r){return 1===arguments.length?t.get(e):t.set(e,n,r)};return t._document=e.document,t._cacheKeyPrefix="cookey.",t._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),t.defaults={path:"/",secure:!1},t.get=function(e){t._cachedDocumentCookie!==t._document.cookie&&t._renewCache();var n=t._cache[t._cacheKeyPrefix+e];return n===a?a:decodeURIComponent(n)},t.set=function(e,n,r){return r=t._getExtendedOptions(r),r.expires=t._getExpiresDate(n===a?-1:r.expires),t._document.cookie=t._generateCookieString(e,n,r),t},t.expire=function(e,n){return t.set(e,a,n)},t._getExtendedOptions=function(e){return{path:e&&e.path||t.defaults.path,domain:e&&e.domain||t.defaults.domain,expires:e&&e.expires||t.defaults.expires,secure:e&&e.secure!==a?e.secure:t.defaults.secure}},t._isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},t._getExpiresDate=function(e,n){if(n=n||new Date,"number"==typeof e?e=e===1/0?t._maxExpireDate:new Date(n.getTime()+1e3*e):"string"==typeof e&&(e=new Date(e)),e&&!t._isValidDate(e))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return e},t._generateCookieString=function(e,t,n){e=e.replace(/[^#$&+\^`|]/g,encodeURIComponent),e=e.replace(/\(/g,"%28").replace(/\)/g,"%29"),t=(t+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),n=n||{};var r=e+"="+t;return r+=n.path?";path="+n.path:"",r+=n.domain?";domain="+n.domain:"",r+=n.expires?";expires="+n.expires.toUTCString():"",r+=n.secure?";secure":""},t._getCacheFromString=function(e){for(var n={},r=e?e.split("; "):[],i=0;i'),!o)return!0;var t=(0,a.default)(o).data("remodalChangelog");a.default.ajax({url:t}).done(function(t){e.$modal.html(t)})}),(0,a.default)(document).on("closed",'[data-remodal-id="changelog"]',function(){var e=a.default.remodal.lookup[(0,a.default)("[data-remodal-id=changelog]").data("remodal")];e.$modal.html("")})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];e&&e.preventDefault();var r=(0,s.default)("#overlay"),i=(0,s.default)("#admin-sidebar");this.body.addClass("sidebar-mobile-open"),r.css("display","block"),n?(i.css({display:"block",opacity:1}),this.isOpen=!0):i.css("display","block").animate({opacity:1},200,function(){t.isOpen=!0})}},{key:"close",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&e.preventDefault();var r=(0,s.default)("#overlay"),i=(0,s.default)("#admin-sidebar");this.body.removeClass("sidebar-mobile-open"),r.css("display","none"),n?(i.css({opacity:0,display:"none"}),this.isOpen=!1):i.animate({opacity:0},200,function(){i.css("display","none"),t.isOpen=!1})}},{key:"toggle",value:function(e){return e&&e.preventDefault(),this[this.isOpen?"close":"open"](e)}},{key:"toggleSidebarState",value:function(t){t&&t.preventDefault(),clearTimeout(this.timeout);var n=e.matchMedia(m).matches;n&&this.body.removeClass("sidebar-open"),n||(this.body.removeClass("sidebar-closed"),this.body.removeClass("sidebar-mobile-open")),this.body.toggleClass("sidebar-"+(n?"closed":"open")),(0,s.default)(e).trigger("sidebar_state._grav",n)}},{key:"checkMatch",value:function(e){var t=(0,s.default)("#admin-sidebar"),n=(0,s.default)("#overlay");this.isOpen=!1,n.css("display","none"),t.css({display:e.matches?"none":"inherit",opacity:e.matches?0:1}),e.matches&&this.body.removeClass("sidebar-open sidebar-closed"),this[e.matches?"attach":"detach"]()}},{key:"_resetMap",value:function(){return v.clear()}},{key:"_getBound",value:function(e){return v.has(e)?v.get(e):v.set(e,this[e].bind(this)).get(e)}}]),t}();t.default=g;t.Instance=new g}).call(t,function(){return this}())},function(e,t,n){"use strict";e.exports=n(666)()?Map:n(667)},function(e,t){"use strict";e.exports=function(){var e,t,n;if("function"!=typeof Map)return!1;try{e=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(e){return!1}return"[object Map]"===String(e)&&(3===e.size&&("function"==typeof e.clear&&("function"==typeof e.delete&&("function"==typeof e.entries&&("function"==typeof e.forEach&&("function"==typeof e.get&&("function"==typeof e.has&&("function"==typeof e.keys&&("function"==typeof e.set&&("function"==typeof e.values&&(t=e.entries(),n=t.next(),n.done===!1&&(!!n.value&&("raz"===n.value[0]&&"one"===n.value[1])))))))))))))}},function(e,t,n){"use strict";var r,i=n(668),a=n(672),o=n(681),s=n(686),l=n(669),c=n(687),u=n(703),d=n(704),f=n(715),p=n(719),h=n(739),m=n(742),v=Function.prototype.call,g=Object.defineProperties,y=Object.getPrototypeOf;e.exports=r=function(){var e,t,n,i=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return n=m&&o&&Map!==r?o(new Map,y(this)):this,null!=i&&f(i),g(n,{__mapKeysData__:c("c",e=[]),__mapValuesData__:c("c",t=[])}),i?(p(i,function(n){var r=l(n)[0];n=n[1],a.call(e,r)===-1&&(e.push(r),t.push(n))},n),n):n},m&&(o&&o(r,Map),r.prototype=Object.create(Map.prototype,{constructor:c(r)})),u(g(r.prototype,{clear:c(function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:c(function(e){var t=a.call(this.__mapKeysData__,e);return t!==-1&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)}),entries:c(function(){return new h(this,"key+value")}),forEach:c(function(e){var t,n,r=arguments[1];for(s(e),t=this.entries(),n=t._next();void 0!==n;)v.call(e,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=t._next()}),get:c(function(e){var t=a.call(this.__mapKeysData__,e);if(t!==-1)return this.__mapValuesData__[t]}),has:c(function(e){return a.call(this.__mapKeysData__,e)!==-1}),keys:c(function(){return new h(this,"key")}),set:c(function(e,t){var n,r=a.call(this.__mapKeysData__,e);return r===-1&&(r=this.__mapKeysData__.push(e)-1,n=!0),this.__mapValuesData__[r]=t,n&&this.emit("_add",r,e),this}),size:c.gs(function(){return this.__mapKeysData__.length}),values:c(function(){return new h(this,"value")}),toString:c(function(){return"[object Map]"})})),Object.defineProperty(r.prototype,d.iterator,c(function(){return this.entries()})),Object.defineProperty(r.prototype,d.toStringTag,c("c","Map"))},function(e,t,n){"use strict";var r=n(669);e.exports=function(){return r(this).length=0,this}},function(e,t,n){"use strict";var r=n(670);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(671)();e.exports=function(e){return e!==r&&null!==e}},function(e,t){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(673),i=n(676),a=n(669),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,l=Math.abs,c=Math.floor;e.exports=function(e){var t,n,u,d;if(!r(e))return o.apply(this,arguments);for(n=i(a(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):i(this.length)-c(l(u)),t=u;t0?1:-1}},function(e,t,n){"use strict";e.exports=n(682)()?Object.setPrototypeOf:n(683)},function(e,t){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||n;return"function"==typeof e&&r(e(t(null),i))===i}},function(e,t,n){"use strict";var r,i=n(684),a=n(669),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(a(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(r(e,t),t),e}):t=function(e,t){return r(e,t).__proto__=t,e}:t=function e(t,n){var i;return r(t,n),i=o.call(e.nullPolyfill,t),i&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{e=r.set,e.call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return t.__proto__=n,Object.getPrototypeOf(t)===n?{level:2}:(t={},t.__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}()),n(685)},function(e,t,n){"use strict";var r=n(670),i={function:!0,object:!0};e.exports=function(e){return r(e)&&i[typeof e]||!1}},function(e,t,n){"use strict";var r,i=Object.create;n(682)()||(r=n(683)),e.exports=function(){var e,t,n;return r?1!==r.level?i:(e={},t={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){return"__proto__"===e?void(t[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(t[e]=n)}),Object.defineProperties(e,t),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(t,n){return i(null===t?e:t,n)}):i}()},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=n(688),i=n(689),a=n(693),o=n(699),s=n(700),l=e.exports=function(e,t){var n,i,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=s.call(e,"c"),i=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,i=!1),u={value:t,configurable:n,enumerable:i,writable:l},c?a(o(c),u):u};l.gs=function(e,t,n){var l,c,u,d;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(n)?i(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),d={get:t,set:n,configurable:l,enumerable:c},u?a(o(u),d):d}},function(e,t){"use strict";var n=void 0;e.exports=function(e){return e!==n&&null!==e}},function(e,t,n){"use strict";var r=n(690),i=/^\s*class[\s{\/}]/,a=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!i.test(a.call(e))}},function(e,t,n){"use strict";var r=n(691);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},function(e,t,n){"use strict";var r=n(692);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(688),i={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(i,typeof e)}},function(e,t,n){"use strict";e.exports=n(694)()?Object.assign:n(695)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(696),i=n(669),a=Math.max;e.exports=function(e,t){var n,o,s,l=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o-1}},function(e,t,n){"use strict";var r,i,a,o,s,l,c,u=n(687),d=n(686),f=Function.prototype.apply,p=Function.prototype.call,h=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return d(t),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),m(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return d(t),i=this,r.call(this,e,n=function(){a.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a=function(e,t){var n,r,i,a;if(d(t),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[a?0:1]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},o=function(e){var t,n,r,i,a;if(g.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,a=new Array(n-1),t=1;t=55296&&v<=56319&&(m+=e[++p])),l.call(t,g,m,d),!f);++p);}},function(e,t,n){"use strict";var r=n(717),i=n(718),a=n(721),o=n(738),s=n(715),l=n(704).iterator;e.exports=function(e){return"function"==typeof s(e)[l]?e[l]():r(e)?new a(e):i(e)?new o(e):new a(e)}},function(e,t,n){"use strict";var r,i=n(681),a=n(700),o=n(687),s=n(704),l=n(722),c=Object.defineProperty;r=e.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?a.call(t,"key+value")?"key+value":a.call(t,"key")?"key":"value":"value",c(this,"__kind__",o("",t))},i&&i(r,l),delete r.prototype.constructor,r.prototype=Object.create(l.prototype,{_resolve:o(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),c(r.prototype,s.toStringTag,o("c","Array Iterator"))},function(e,t,n){"use strict";var r,i=n(668),a=n(693),o=n(686),s=n(669),l=n(687),c=n(723),u=n(704),d=Object.defineProperty,f=Object.defineProperties;e.exports=r=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete r.prototype.constructor,f(r.prototype,a({_next:l(function(){var e;if(this.__list__)return this.__redo__&&(e=this.__redo__.shift(),void 0!==e)?e:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void d(this,"__redo__",l("c",[e]));this.__redo__.forEach(function(t,n){t>=e&&(this.__redo__[n]=++t)},this),this.__redo__.push(e)}}),_onDelete:l(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,n){t>e&&(this.__redo__[n]=--t)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),d(r.prototype,u.iterator,l(function(){return this}))},function(e,t,n){"use strict";var r,i=n(688),a=n(724),o=n(729),s=n(730),l=n(699),c=n(735),u=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;r=function(e,t,n){var r,i=a(t)&&o(t.value);return r=s(t),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&f.call(this,e)?i:(t.value=u.call(i,n.resolveContext?n.resolveContext(this):this),d(this,e,t),this[e])},r},e.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&o(t.resolveContext),c(e,function(e,n){return r(n,e,t)})}},function(e,t,n){"use strict";var r=n(725),i=n(688);e.exports=function(e){return i(e)?e:r(e,"Cannot use %v",arguments[1])}},function(e,t,n){"use strict";var r=n(688),i=n(692),a=n(726),o=n(727),s=function(e,t){return e.replace("%v",o(t))};e.exports=function(e,t,n){if(!i(n))throw new TypeError(s(t,e));if(!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var o=a(n.errorMessage);throw r(o)||(o=t),new TypeError(s(o,e))}},function(e,t,n){"use strict";var r=n(688),i=n(692),a=Object.prototype.toString;e.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===a)return null}try{return""+e}catch(e){return null}}},function(e,t,n){"use strict";var r=n(728),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},function(e,t){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,n){"use strict";var r=n(725),i=n(689);e.exports=function(e){return i(e)?e:r(e,"%v is not a plain function",arguments[1])}},function(e,t,n){"use strict";var r=n(731),i=n(693),a=n(669);e.exports=function(e){var t=Object(a(e)),n=arguments[1],o=Object(arguments[2]);if(t!==e&&!n)return t;var s={};return n?r(n,function(t){(o.ensure||t in e)&&(s[t]=e[t])}):i(s,e),s}},function(e,t,n){"use strict";e.exports=n(732)()?Array.from:n(733)},function(e,t){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(e=["raz","dwa"],t=n(e),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,n){"use strict";var r=n(704).iterator,i=n(717),a=n(734),o=n(676),s=n(686),l=n(669),c=n(670),u=n(718),d=Array.isArray,f=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,n,m,v,g,y,_,b,w,k,x=arguments[1],C=arguments[2];if(e=Object(l(e)),c(x)&&s(x),this&&this!==Array&&a(this))t=this;else{if(!x){if(i(e))return g=e.length,1!==g?Array.apply(null,e):(v=new Array(1),v[0]=e[0],v);if(d(e)){for(v=new Array(g=e.length),n=0;n=55296&&y<=56319&&(k+=e[++n])),k=x?f.call(x,C,k,m):k,t?(p.value=k,h(v,m,p)):v[m]=k,++m;g=m}if(void 0===g)for(g=o(e.length),t&&(v=new t(g)),n=0;n=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(r.prototype,o.toStringTag,a("c","String Iterator"))},function(e,t,n){"use strict";var r,i=n(681),a=n(687),o=n(722),s=n(704).toStringTag,l=n(740),c=Object.defineProperties,u=o.prototype._unBind;r=e.exports=function(e,t){return this instanceof r?(o.call(this,e.__mapKeysData__,e),t&&l[t]||(t="key+value"),void c(this,{__kind__:a("",t),__values__:a("w",e.__mapValuesData__)})):new r(e,t)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_resolve:a(function(e){return"value"===this.__kind__?this.__values__[e]:"key"===this.__kind__?this.__list__[e]:[this.__list__[e],this.__values__[e]]}),_unBind:a(function(){this.__values__=null,u.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(r.prototype,s,a("c","Map Iterator"))},function(e,t,n){"use strict";e.exports=n(741)("key","value","key+value")},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create;e.exports=function(e){var t=r(null);return n.call(arguments,function(e){t[e]=!0}),t}},function(e,t){"use strict";e.exports=function(){return"undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()}]); +(0,a.default)(document).on("click","[data-remodal-changelog]",function(e){o=e.currentTarget}),(0,a.default)(document).on("opened",'[data-remodal-id="changelog"]',function(){var e=a.default.remodal.lookup[(0,a.default)("[data-remodal-id=changelog]").data("remodal")];if(e.$modal.html('
'),!o)return!0;var t=(0,a.default)(o).data("remodalChangelog");a.default.ajax({url:t}).done(function(t){e.$modal.html(t)})}),(0,a.default)(document).on("closed",'[data-remodal-id="changelog"]',function(){var e=a.default.remodal.lookup[(0,a.default)("[data-remodal-id=changelog]").data("remodal")];e.$modal.html("")})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];e&&e.preventDefault();var r=(0,s.default)("#overlay"),i=(0,s.default)("#admin-sidebar");this.body.addClass("sidebar-mobile-open"),r.css("display","block"),n?(i.css({display:"block",opacity:1}),this.isOpen=!0):i.css("display","block").animate({opacity:1},200,function(){t.isOpen=!0})}},{key:"close",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&e.preventDefault();var r=(0,s.default)("#overlay"),i=(0,s.default)("#admin-sidebar");this.body.removeClass("sidebar-mobile-open"),r.css("display","none"),n?(i.css({opacity:0,display:"none"}),this.isOpen=!1):i.animate({opacity:0},200,function(){i.css("display","none"),t.isOpen=!1})}},{key:"toggle",value:function(e){return e&&e.preventDefault(),this[this.isOpen?"close":"open"](e)}},{key:"toggleSidebarState",value:function(t){t&&t.preventDefault(),clearTimeout(this.timeout);var n=e.matchMedia(g).matches,r=null;n&&this.body.removeClass("sidebar-open"),n||(this.body.removeClass("sidebar-closed"),this.body.removeClass("sidebar-mobile-open")),this.body.toggleClass("sidebar-"+(n?"closed":"open")),(0,s.default)(e).trigger("sidebar_state._grav",n),r=n?!this.body.hasClass("sidebar-closed"):this.body.hasClass("sidebar-open"),d.default.set("grav-admin-sidebar",r,{expires:1/0})}},{key:"checkMatch",value:function(e){var t=(0,s.default)("#admin-sidebar"),n=(0,s.default)("#overlay");this.isOpen=!1,n.css("display","none"),t.css({display:e.matches?"none":"inherit",opacity:e.matches?0:1}),e.matches&&this.body.removeClass("sidebar-open sidebar-closed"),this[e.matches?"attach":"detach"]()}},{key:"_resetMap",value:function(){return y.clear()}},{key:"_getBound",value:function(e){return y.has(e)?y.get(e):y.set(e,this[e].bind(this)).get(e)}}]),t}();t.default=_;t.Instance=new _}).call(t,function(){return this}())},function(e,t,n){"use strict";e.exports=n(666)()?Map:n(667)},function(e,t){"use strict";e.exports=function(){var e,t,n;if("function"!=typeof Map)return!1;try{e=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(e){return!1}return"[object Map]"===String(e)&&(3===e.size&&("function"==typeof e.clear&&("function"==typeof e.delete&&("function"==typeof e.entries&&("function"==typeof e.forEach&&("function"==typeof e.get&&("function"==typeof e.has&&("function"==typeof e.keys&&("function"==typeof e.set&&("function"==typeof e.values&&(t=e.entries(),n=t.next(),n.done===!1&&(!!n.value&&("raz"===n.value[0]&&"one"===n.value[1])))))))))))))}},function(e,t,n){"use strict";var r,i=n(668),a=n(672),o=n(681),s=n(686),l=n(669),c=n(687),u=n(703),d=n(704),f=n(715),p=n(719),h=n(739),m=n(742),v=Function.prototype.call,g=Object.defineProperties,y=Object.getPrototypeOf;e.exports=r=function(){var e,t,n,i=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return n=m&&o&&Map!==r?o(new Map,y(this)):this,null!=i&&f(i),g(n,{__mapKeysData__:c("c",e=[]),__mapValuesData__:c("c",t=[])}),i?(p(i,function(n){var r=l(n)[0];n=n[1],a.call(e,r)===-1&&(e.push(r),t.push(n))},n),n):n},m&&(o&&o(r,Map),r.prototype=Object.create(Map.prototype,{constructor:c(r)})),u(g(r.prototype,{clear:c(function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:c(function(e){var t=a.call(this.__mapKeysData__,e);return t!==-1&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)}),entries:c(function(){return new h(this,"key+value")}),forEach:c(function(e){var t,n,r=arguments[1];for(s(e),t=this.entries(),n=t._next();void 0!==n;)v.call(e,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=t._next()}),get:c(function(e){var t=a.call(this.__mapKeysData__,e);if(t!==-1)return this.__mapValuesData__[t]}),has:c(function(e){return a.call(this.__mapKeysData__,e)!==-1}),keys:c(function(){return new h(this,"key")}),set:c(function(e,t){var n,r=a.call(this.__mapKeysData__,e);return r===-1&&(r=this.__mapKeysData__.push(e)-1,n=!0),this.__mapValuesData__[r]=t,n&&this.emit("_add",r,e),this}),size:c.gs(function(){return this.__mapKeysData__.length}),values:c(function(){return new h(this,"value")}),toString:c(function(){return"[object Map]"})})),Object.defineProperty(r.prototype,d.iterator,c(function(){return this.entries()})),Object.defineProperty(r.prototype,d.toStringTag,c("c","Map"))},function(e,t,n){"use strict";var r=n(669);e.exports=function(){return r(this).length=0,this}},function(e,t,n){"use strict";var r=n(670);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(671)();e.exports=function(e){return e!==r&&null!==e}},function(e,t){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(673),i=n(676),a=n(669),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,l=Math.abs,c=Math.floor;e.exports=function(e){var t,n,u,d;if(!r(e))return o.apply(this,arguments);for(n=i(a(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?c(u):i(this.length)-c(l(u)),t=u;t0?1:-1}},function(e,t,n){"use strict";e.exports=n(682)()?Object.setPrototypeOf:n(683)},function(e,t){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||n;return"function"==typeof e&&r(e(t(null),i))===i}},function(e,t,n){"use strict";var r,i=n(684),a=n(669),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(a(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(r(e,t),t),e}):t=function(e,t){return r(e,t).__proto__=t,e}:t=function e(t,n){var i;return r(t,n),i=o.call(e.nullPolyfill,t),i&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{e=r.set,e.call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return t.__proto__=n,Object.getPrototypeOf(t)===n?{level:2}:(t={},t.__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}()),n(685)},function(e,t,n){"use strict";var r=n(670),i={function:!0,object:!0};e.exports=function(e){return r(e)&&i[typeof e]||!1}},function(e,t,n){"use strict";var r,i=Object.create;n(682)()||(r=n(683)),e.exports=function(){var e,t,n;return r?1!==r.level?i:(e={},t={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){return"__proto__"===e?void(t[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(t[e]=n)}),Object.defineProperties(e,t),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(t,n){return i(null===t?e:t,n)}):i}()},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=n(688),i=n(689),a=n(693),o=n(699),s=n(700),l=e.exports=function(e,t){var n,i,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=s.call(e,"c"),i=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,i=!1),u={value:t,configurable:n,enumerable:i,writable:l},c?a(o(c),u):u};l.gs=function(e,t,n){var l,c,u,d;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(n)?i(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),d={get:t,set:n,configurable:l,enumerable:c},u?a(o(u),d):d}},function(e,t){"use strict";var n=void 0;e.exports=function(e){return e!==n&&null!==e}},function(e,t,n){"use strict";var r=n(690),i=/^\s*class[\s{\/}]/,a=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!i.test(a.call(e))}},function(e,t,n){"use strict";var r=n(691);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},function(e,t,n){"use strict";var r=n(692);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(688),i={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(i,typeof e)}},function(e,t,n){"use strict";e.exports=n(694)()?Object.assign:n(695)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(696),i=n(669),a=Math.max;e.exports=function(e,t){var n,o,s,l=a(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o-1}},function(e,t,n){"use strict";var r,i,a,o,s,l,c,u=n(687),d=n(686),f=Function.prototype.apply,p=Function.prototype.call,h=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return d(t),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),m(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return d(t),i=this,r.call(this,e,n=function(){a.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a=function(e,t){var n,r,i,a;if(d(t),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[a?0:1]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},o=function(e){var t,n,r,i,a;if(g.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,a=new Array(n-1),t=1;t=55296&&v<=56319&&(m+=e[++p])),l.call(t,g,m,d),!f);++p);}},function(e,t,n){"use strict";var r=n(717),i=n(718),a=n(721),o=n(738),s=n(715),l=n(704).iterator;e.exports=function(e){return"function"==typeof s(e)[l]?e[l]():r(e)?new a(e):i(e)?new o(e):new a(e)}},function(e,t,n){"use strict";var r,i=n(681),a=n(700),o=n(687),s=n(704),l=n(722),c=Object.defineProperty;r=e.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?a.call(t,"key+value")?"key+value":a.call(t,"key")?"key":"value":"value",c(this,"__kind__",o("",t))},i&&i(r,l),delete r.prototype.constructor,r.prototype=Object.create(l.prototype,{_resolve:o(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),c(r.prototype,s.toStringTag,o("c","Array Iterator"))},function(e,t,n){"use strict";var r,i=n(668),a=n(693),o=n(686),s=n(669),l=n(687),c=n(723),u=n(704),d=Object.defineProperty,f=Object.defineProperties;e.exports=r=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete r.prototype.constructor,f(r.prototype,a({_next:l(function(){var e;if(this.__list__)return this.__redo__&&(e=this.__redo__.shift(),void 0!==e)?e:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void d(this,"__redo__",l("c",[e]));this.__redo__.forEach(function(t,n){t>=e&&(this.__redo__[n]=++t)},this),this.__redo__.push(e)}}),_onDelete:l(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,n){t>e&&(this.__redo__[n]=--t)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),d(r.prototype,u.iterator,l(function(){return this}))},function(e,t,n){"use strict";var r,i=n(688),a=n(724),o=n(729),s=n(730),l=n(699),c=n(735),u=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;r=function(e,t,n){var r,i=a(t)&&o(t.value);return r=s(t),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&f.call(this,e)?i:(t.value=u.call(i,n.resolveContext?n.resolveContext(this):this),d(this,e,t),this[e])},r},e.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&o(t.resolveContext),c(e,function(e,n){return r(n,e,t)})}},function(e,t,n){"use strict";var r=n(725),i=n(688);e.exports=function(e){return i(e)?e:r(e,"Cannot use %v",arguments[1])}},function(e,t,n){"use strict";var r=n(688),i=n(692),a=n(726),o=n(727),s=function(e,t){return e.replace("%v",o(t))};e.exports=function(e,t,n){if(!i(n))throw new TypeError(s(t,e));if(!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var o=a(n.errorMessage);throw r(o)||(o=t),new TypeError(s(o,e))}},function(e,t,n){"use strict";var r=n(688),i=n(692),a=Object.prototype.toString;e.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===a)return null}try{return""+e}catch(e){return null}}},function(e,t,n){"use strict";var r=n(728),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},function(e,t){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,n){"use strict";var r=n(725),i=n(689);e.exports=function(e){return i(e)?e:r(e,"%v is not a plain function",arguments[1])}},function(e,t,n){"use strict";var r=n(731),i=n(693),a=n(669);e.exports=function(e){var t=Object(a(e)),n=arguments[1],o=Object(arguments[2]);if(t!==e&&!n)return t;var s={};return n?r(n,function(t){(o.ensure||t in e)&&(s[t]=e[t])}):i(s,e),s}},function(e,t,n){"use strict";e.exports=n(732)()?Array.from:n(733)},function(e,t){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(e=["raz","dwa"],t=n(e),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,n){"use strict";var r=n(704).iterator,i=n(717),a=n(734),o=n(676),s=n(686),l=n(669),c=n(670),u=n(718),d=Array.isArray,f=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,n,m,v,g,y,_,b,w,k,x=arguments[1],C=arguments[2];if(e=Object(l(e)),c(x)&&s(x),this&&this!==Array&&a(this))t=this;else{if(!x){if(i(e))return g=e.length,1!==g?Array.apply(null,e):(v=new Array(1),v[0]=e[0],v);if(d(e)){for(v=new Array(g=e.length),n=0;n=55296&&y<=56319&&(k+=e[++n])),k=x?f.call(x,C,k,m):k,t?(p.value=k,h(v,m,p)):v[m]=k,++m;g=m}if(void 0===g)for(g=o(e.length),t&&(v=new t(g)),n=0;n=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(r.prototype,o.toStringTag,a("c","String Iterator"))},function(e,t,n){"use strict";var r,i=n(681),a=n(687),o=n(722),s=n(704).toStringTag,l=n(740),c=Object.defineProperties,u=o.prototype._unBind;r=e.exports=function(e,t){return this instanceof r?(o.call(this,e.__mapKeysData__,e),t&&l[t]||(t="key+value"),void c(this,{__kind__:a("",t),__values__:a("w",e.__mapValuesData__)})):new r(e,t)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_resolve:a(function(e){return"value"===this.__kind__?this.__values__[e]:"key"===this.__kind__?this.__list__[e]:[this.__list__[e],this.__values__[e]]}),_unBind:a(function(){this.__values__=null,u.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(r.prototype,s,a("c","Map Iterator"))},function(e,t,n){"use strict";e.exports=n(741)("key","value","key+value")},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create;e.exports=function(e){var t=r(null);return n.call(arguments,function(e){t[e]=!0}),t}},function(e,t){"use strict";e.exports=function(){return"undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()}]); //# sourceMappingURL=admin.min.js.map \ No newline at end of file diff --git a/themes/grav/templates/partials/base-root.html.twig b/themes/grav/templates/partials/base-root.html.twig index aa07300e..1c804136 100644 --- a/themes/grav/templates/partials/base-root.html.twig +++ b/themes/grav/templates/partials/base-root.html.twig @@ -43,7 +43,9 @@ {% block body %} - + {% set sidebarStatus = get_cookie('grav-admin-sidebar') %} + {% set sidebarStatus = (sidebarStatus is not null and sidebarStatus == 'false') or config.plugins.admin.sidebar.size == 'small' ? 'sidebar-closed' : '' %} + {% if not authorize(['admin.login']) %} {% include 'partials/messages.html.twig' %}