Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/addon/dialog/dialog.min.js
(function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){function d(o,a,e){var i=o.getWrapperElement(),f;return f=i.appendChild(document.createElement("div")),e?f.className="CodeMirror-dialog CodeMirror-dialog-bottom":f.className="CodeMirror-dialog CodeMirror-dialog-top",typeof a=="string"?f.innerHTML=a:f.appendChild(a),n.addClass(i,"dialog-opened"),f}function r(o,a){o.state.currentNotificationClose&&o.state.currentNotificationClose(),o.state.currentNotificationClose=a}n.defineExtension("openDialog",function(o,a,e){e||(e={}),r(this,null);var i=d(this,o,e.bottom),f=!1,c=this;function u(t){if(typeof t=="string")l.value=t;else{if(f)return;f=!0,n.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),c.focus(),e.onClose&&e.onClose(i)}}var l=i.getElementsByTagName("input")[0],s;return l?(l.focus(),e.value&&(l.value=e.value,e.selectValueOnOpen!==!1&&l.select()),e.onInput&&n.on(l,"input",function(t){e.onInput(t,l.value,u)}),e.onKeyUp&&n.on(l,"keyup",function(t){e.onKeyUp(t,l.value,u)}),n.on(l,"keydown",function(t){e&&e.onKeyDown&&e.onKeyDown(t,l.value,u)||((t.keyCode==27||e.closeOnEnter!==!1&&t.keyCode==13)&&(l.blur(),n.e_stop(t),u()),t.keyCode==13&&a(l.value,t))}),e.closeOnBlur!==!1&&n.on(i,"focusout",function(t){t.relatedTarget!==null&&u()})):(s=i.getElementsByTagName("button")[0])&&(n.on(s,"click",function(){u(),c.focus()}),e.closeOnBlur!==!1&&n.on(s,"blur",u),s.focus()),u}),n.defineExtension("openConfirm",function(o,a,e){r(this,null);var i=d(this,o,e&&e.bottom),f=i.getElementsByTagName("button"),c=!1,u=this,l=1;function s(){c||(c=!0,n.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),u.focus())}f[0].focus();for(var t=0;t<f.length;++t){var v=f[t];(function(g){n.on(v,"click",function(m){n.e_preventDefault(m),s(),g&&g(u)})})(a[t]),n.on(v,"blur",function(){--l,setTimeout(function(){l<=0&&s()},200)}),n.on(v,"focus",function(){++l})}}),n.defineExtension("openNotification",function(o,a){r(this,u);var e=d(this,o,a&&a.bottom),i=!1,f,c=a&&typeof a.duration<"u"?a.duration:5e3;function u(){i||(i=!0,clearTimeout(f),n.rmClass(e.parentNode,"dialog-opened"),e.parentNode.removeChild(e))}return n.on(e,"click",function(l){n.e_preventDefault(l),u()}),c&&(f=setTimeout(u,c)),u})});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!