").text(),class:m.button+" "+i,click:function(){var e=R(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(w,y)||A.hide()}}))})),A.cache={},A.verbose("Initializing dimmer",k),A.create.dimmer(),u.allowMultiple&&A.create.innerDimmer(),u.centered||y.addClass("top aligned"),A.refreshModals(),A.refreshInputs(),A.bind.events(),A.observeChanges(),A.instantiate(),u.autoShow&&A.show()},instantiate:function(){A.verbose("Storing instance of modal"),C=A,y.data(b,C)},create:{modal:function(){var e;y=R("",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(x=R("",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(x)),""!==u.title&&(e="_"+A.get.id()+"title",y.attr("aria-labelledby",e),R("",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+A.get.id()+"desc",y.attr("aria-describedby",e),R("",{class:m.content,id:e}).appendTo(y)),A.has.configActions()&&R("",{class:m.actions}).appendTo(y),k.append(y)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=R.extend(!0,e,u.dimmerSettings);R.fn.dimmer===W?A.error(p.dimmer):(A.debug("Creating dimmer"),i=k.dimmer(e),u.detachable?(A.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):A.set.undetached(),n=i.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),r="."+l,A.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&R("",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),A.verbose("Destroying previous modal"),y.removeData(b).off(v),H.off(r),n.off(r),x.off(r),t&&t.off(r),k.dimmer("destroy")},observeChanges:function(){"MutationObserver"in P&&((d=new MutationObserver(function(e){u.observeChanges&&(A.debug("DOM tree modified, refreshing"),A.refresh()),A.refreshInputs()})).observe(w,{childList:!0,subtree:!0}),A.debug("Setting up mutation observer",d))},refresh:function(){A.remove.scrolling(),A.cacheSizes(),A.can.useFlex()||A.set.modalOffset(),A.set.screenHeight(),A.set.type()},refreshModals:function(){s=y.siblings(f.modal),o=s.add(y)},refreshInputs:function(){t&&t.off("keydown"+r),(t=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===R(this).closest(".disabled").length})).first().on("keydown"+r,A.event.inputKeyDown.first),t.last().on("keydown"+r,A.event.inputKeyDown.last)},attachEvents:function(e,t){var n=R(e);t=R.isFunction(A[t])?A[t]:A.toggle,0=e.clientX))&&A.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)A.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(c)A.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return A.cache.leftBodyScrollbar===W&&(A.cache.leftBodyScrollbar=A.is.rtl()&&(A.is.iframe&&!A.is.firefox()||A.is.safari()||A.is.edge()||A.is.ie())),A.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!A.is.ie():(u.useFlex&&A.is.ie()?A.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&A.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=A.cache.contextHeight,t=A.cache.contextHeight/2,n=A.cache.topOffset,i=A.cache.scrollHeight,o=A.cache.height,s=u.padding;return o .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},R.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return R.isPlainObject(e[0])?R.extend({handler:function(){},content:"",title:""},e[0]):(R.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];o.handler(R(e).val())}function t(){o.handler(null)}var n=this,i=this.get.settings(),o=i.templates.getArguments(arguments);return 0===R(R.parseHTML(o.content)).filter(".ui.input").length&&(o.content+=''),{title:o.title,content:o.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document);