/* * # Fomantic UI - 2.8.8 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2022 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(D,j,R,z){"use strict";D.isFunction=D.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.fn.sidebar=function(C){var T,e=D(this),k=D(j),w=D(R),S=D("html"),x=D("head"),A=e.selector||"",F=(new Date).getTime(),O=[],P=C,E="string"==typeof P,H=[].slice.call(arguments,1),M=j.requestAnimationFrame||j.mozRequestAnimationFrame||j.webkitRequestAnimationFrame||j.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,i,s,a=D.isPlainObject(C)?D.extend(!0,{},D.fn.sidebar.settings,C):D.extend({},D.fn.sidebar.settings),n=a.selector,l=a.className,t=a.namespace,c=a.regExp,u=a.error,d="."+t,f="module-"+t,b=D(this),h=D(a.context),m=b.children(n.sidebar),g=(h.children(n.fixed),h.children(n.pusher)),v=this,p=b.data(f),y={initialize:function(){y.debug("Initializing sidebar",C),y.create.id(),s=y.get.transitionEvent(),a.delaySetup?M(y.setup.layout):y.setup.layout(),M(function(){y.setup.cache()}),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),p=y,b.data(f,y)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),r="."+e,y.verbose("Creating unique id for element",e)}},destroy:function(){y.verbose("Destroying previous module for",b),b.off(d).removeData(f),y.is.ios()&&y.remove.ios(),h.off(r),k.off(r),w.off(r)},event:{clickaway:function(e){var i;a.closable&&(i=0=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===D(e.target).closest(n.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){y.verbose("Adding clickaway events to context",h),h.on("click"+r,y.event.clickaway).on("touchend"+r,y.event.clickaway)},scrollLock:function(){a.scrollLock&&(y.debug("Disabling page scroll"),k.on("DOMMouseScroll"+r,y.event.scroll)),y.verbose("Adding events to contain sidebar scroll"),w.on("touchmove"+r,y.event.touch),b.on("scroll"+d,y.event.containScroll)}},unbind:{clickaway:function(){y.verbose("Removing clickaway events from context",h),h.off(r)},scrollLock:function(){y.verbose("Removing scroll lock from page"),w.off(r),k.off(r),b.off("scroll"+d)}},add:{inlineCSS:function(){var e=y.cache.width||b.outerWidth(),i=y.cache.height||b.outerHeight(),n=y.is.rtl(),t=y.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(y.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="").appendTo(x),y.debug("Adding sizing css to head",o)}},refresh:function(){y.verbose("Refreshing selector cache"),h=D(a.context),m=h.children(n.sidebar),g=h.children(n.pusher),h.children(n.fixed),y.clear.cache()},refreshSidebars:function(){y.verbose("Refreshing other sidebars"),m=h.children(n.sidebar)},repaint:function(){y.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){y.cache={width:b.outerWidth(),height:b.outerHeight()}},layout:function(){0===h.children(n.pusher).length&&(y.debug("Adding wrapper element for sidebar"),y.error(u.pusher),g=D('
'),h.children().not(n.omitted).not(m).wrapAll(g),y.refresh()),0!==b.nextAll(n.pusher).length&&b.nextAll(n.pusher)[0]===g[0]||(y.debug("Moved sidebar to correct parent element"),y.error(u.movedSidebar,v),b.detach().prependTo(h),y.refresh()),y.clear.cache(),y.set.pushable(),y.set.direction()}},attachEvents:function(e,i){var n=D(e);i=D.isFunction(y[i])?y[i]:y.toggle,0