/* * # Fomantic UI - 2.9.2 * https://github.com/fomantic/Fomantic-UI * https://fomantic-ui.com/ * * Copyright 2023 Contributors * Released under the MIT license * https://opensource.org/licenses/MIT * */ !function(V,W,M){"use strict";function z(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,V.fn.popup=function(T){var E,t=V(this),k=V(M),S=V(W),O=V("body"),A=t.selector||"",D="ontouchstart"in M.documentElement?"touchstart":"click",j=Date.now(),F=[],R=T,H="string"==typeof R,N=[].slice.call(arguments,1);return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),n=u.selector,c=u.className,d=u.error,f=u.metadata,i=u.namespace,r="."+u.namespace,a="module-"+i,h=V(this),l=[W,M].indexOf(u.context)<0?k.find(u.context):V(u.context),g=[W,M].indexOf(u.scrollContext)<0?k.find(u.scrollContext):V(u.scrollContext),v=[W,M].indexOf(u.boundary)<0?k.find(u.boundary):V(u.boundary),m=u.target?[W,M].indexOf(u.target)<0?k.find(u.target):V(u.target):h,b=0,w=!1,y=!1,P=this,C=h.data(a),x={initialize:function(){x.debug("Initializing",h),x.createID(),x.bind.events(),!x.exists()&&u.preserve&&x.create(),u.observeChanges&&x.observeChanges(),x.instantiate()},instantiate:function(){x.verbose("Storing instance",x),C=x,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(x.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),x.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=m.nextAll(n.popup).eq(0),u.popup=p),u.popup?(x.set.invisible(),s=x.get.offsetParent(),x.remove.invisible(),u.movePopup&&x.has.popup()&&x.get.offsetParent(p)[0]!==s[0]&&(x.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?x.get.offsetParent(m):x.has.popup()?x.get.offsetParent(p):O,s.is("html")&&s[0]!==O[0]&&(x.debug("Setting page as offset parent"),s=O),x.get.variation()&&x.set.variation()},reposition:function(){x.refresh(),x.set.position()},destroy:function(){x.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&x.removePopup(),clearTimeout(x.hideTimer),clearTimeout(x.showTimer),x.unbind.close(),x.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(x.hideTimer),y&&!u.addTouchEvents||(x.showTimer=setTimeout(x.show,e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(x.showTimer),x.hideTimer=setTimeout(x.hide,t)},touchstart:function(t){y=!0,u.addTouchEvents&&x.show()},resize:function(){x.is.visible()&&x.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t===P||0").addClass(c.popup).data(f.activator,h).html(t),u.inline?(x.verbose("Inserting popup element inline",p),p.insertAfter(h)):(x.verbose("Appending popup element to body",p),p.appendTo(l)),x.refresh(),x.set.variation(),u.hoverable&&x.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),x.verbose("Used popup specified in settings"),x.refresh(),u.hoverable&&x.bind.popup()):0":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(t)?(t=t.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=V.fn.popup.settings.templates.escape;return void 0!==t&&(t.title&&(t.title=o(t.title),e+='
'+t.title+"
"),t.content&&(t.content=o(t.content),e+='
'+t.content+"
")),e}}}}(jQuery,window,document);