otsdaq_utilities  v2_05_02_indev
edit.min.js
1 /* Tabulator v4.5.3 (c) Oliver Folkerd */
2 var _typeof="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},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(){var e,t=this.currentCell;if(this.invalidEdit=!1,t){for(this.currentCell=!1,e=t.getElement(),e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);t.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(),e.setValueActual(e.getValue()),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus()}),i.addEventListener("mousedown",function(e){t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus(),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&(i=u.table.modules.validate.validate(e.column.modules.validate,e.getComponent(),t)),!0===i?(u.clearEditor(),e.setValue(t,!0),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),d(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function a(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function o(e){d=e}var r,l,s,u=this,c=!0,d=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":c=e.column.modules.edit.check(e.getComponent());break;case"boolean":c=e.column.modules.edit.check}if(c||i){if(u.cancelEdit(),u.currentCell=e,l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,o,n,a,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),d();for(var f=m.children,v=0;v<f.length;v++)f[v].addEventListener("click",function(e){e.stopPropagation()});return!0}return this.mouseClick=!1,m.blur(),!1},Edit.prototype.editors={input:function(e,t,i,n,a){function o(e){(null===r||void 0===r)&&""!==l.value||l.value!=r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",a.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var s in a.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+a.elementAttributes["+"+s])):l.setAttribute(s,a.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus(),l.style.height="100%"}),l.addEventListener("change",o),l.addEventListener("blur",o),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:o(e);break;case 27:n()}}),l},textarea:function(e,t,i,n,a){function o(t){(null===r||void 0===r)&&""!==u.value||u.value!=r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=a.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),c=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var d in a.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),u.setAttribute(d,u.getAttribute(d)+a.elementAttributes["+"+d])):u.setAttribute(d,a.elementAttributes[d]);return u.value=s,t(function(){u.focus(),u.style.height="100%"}),u.addEventListener("change",o),u.addEventListener("blur",o),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=c&&(c=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation())}}),u},number:function(e,t,i,n,a){function o(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=a.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==a.max&&s.setAttribute("max",a.max),void 0!==a.min&&s.setAttribute("min",a.min),void 0!==a.step&&s.setAttribute("step",a.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var u in a.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+a.elementAttributes["+"+u])):s.setAttribute(u,a.elementAttributes[u]);s.value=r;var c=function(e){o()};return t(function(){s.removeEventListener("blur",c),s.focus(),s.style.height="100%",s.addEventListener("blur",c)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:o();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation())}}),s},range:function(e,t,i,n,a){function o(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==a.max&&l.setAttribute("max",a.max),void 0!==a.min&&l.setAttribute("min",a.min),void 0!==a.step&&l.setAttribute("step",a.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var s in a.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+a.elementAttributes["+"+s])):l.setAttribute(s,a.elementAttributes[s]);return l.value=r,t(function(){l.focus(),l.style.height="100%"}),l.addEventListener("blur",function(e){o()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:case 9:o();break;case 27:n()}}),l},select:function(e,t,i,n,a){function o(t){var i,n={},o=v.table.getData();return i=t?v.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(o.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=a.sortValuesList?"asc"==a.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create select lookup list:",t),n}function r(t,i){function n(e){var e={label:a.listItemFormatter?a.listItemFormatter(e.value,e.label):e.label,value:e.value,element:!1};return e.value!==i&&(isNaN(parseFloat(e.value))||isNaN(parseFloat(e.value))||parseFloat(e.value)!==parseFloat(i))||s(e),o.push(e),r.push(e),e}var o=[],r=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,element:!1},r.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:a.listItemFormatter?a.listItemFormatter(e,e):e,value:e,element:!1},t.value!==i&&(isNaN(parseFloat(t.value))||isNaN(parseFloat(t.value))||parseFloat(t.value)!==parseFloat(i))||s(t),o.push(t),r.push(t))});else for(var u in t){var c={label:a.listItemFormatter?a.listItemFormatter(u,t[u]):t[u],value:u,element:!1};c.value!==i&&(isNaN(parseFloat(c.value))||isNaN(parseFloat(c.value))||parseFloat(c.value)!==parseFloat(i))||s(c),o.push(c),r.push(c)}A=o,k=r,l()}function l(){for(;E.firstChild;)E.removeChild(E.firstChild);k.forEach(function(e){var t=e.element;t||(e.group?(t=document.createElement("div"),t.classList.add("tabulator-edit-select-list-group"),t.tabIndex=0,t.innerHTML=""===e.label?"&nbsp;":e.label):(t=document.createElement("div"),t.classList.add("tabulator-edit-select-list-item"),t.tabIndex=0,t.innerHTML=""===e.label?"&nbsp;":e.label,t.addEventListener("click",function(){s(e),u()}),e===C&&t.classList.add("active")),t.addEventListener("mousedown",function(){L=!1,setTimeout(function(){L=!0},10)}),e.element=t),E.appendChild(t)})}function s(e){C&&C.element&&C.element.classList.remove("active"),C=e,y.value="&nbsp;"===e.label?"":e.label,e.element&&e.element.classList.add("active")}function u(){m(),b!==C.value?(b=C.value,i(C.value)):n()}function c(){m(),n()}function d(){if(!E.parentNode){!0===a.values?r(o(),g):"string"==typeof a.values?r(o(a.values),g):r(a.values||[],g);var e=Tabulator.prototype.helpers.elOffset(p);E.style.minWidth=p.offsetWidth+"px",E.style.top=e.top+p.offsetHeight+"px",E.style.left=e.left+"px",document.body.appendChild(E)}}function m(){E.parentNode&&E.parentNode.removeChild(E),f()}function f(){v.table.rowManager.element.removeEventListener("scroll",c)}var v=this,p=e.getElement(),b=e.getValue(),h=a.verticalNavigation||"editor",g=void 0!==b||null===b?b:void 0!==a.defaultValue?a.defaultValue:"",y=document.createElement("input"),E=document.createElement("div"),A=[],k=[],C={},L=!0;if(this.table.rowManager.element.addEventListener("scroll",c),(Array.isArray(a)||!Array.isArray(a)&&"object"===(void 0===a?"undefined":_typeof(a))&&!a.values)&&(console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),a={values:a}),y.setAttribute("type","text"),y.style.padding="4px",y.style.width="100%",y.style.boxSizing="border-box",y.style.cursor="default",y.readOnly=0!=this.currentCell,a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var w in a.elementAttributes)"+"==w.charAt(0)?(w=w.slice(1),y.setAttribute(w,y.getAttribute(w)+a.elementAttributes["+"+w])):y.setAttribute(w,a.elementAttributes[w]);return y.value=void 0!==b||null===b?b:"",y.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=A.indexOf(C),("editor"==h||"hybrid"==h&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&s(A[t-1]));break;case 40:t=A.indexOf(C),("editor"==h||"hybrid"==h&&t<A.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<A.length-1&&s(-1==t?A[0]:A[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:u();break;case 27:c()}}),y.addEventListener("blur",function(e){L&&c()}),y.addEventListener("focus",function(e){d()}),E=document.createElement("div"),E.classList.add("tabulator-edit-select-list"),t(function(){y.style.height="100%",y.focus()}),y},autocomplete:function(e,t,i,n,a){function o(t){var i,n={},o=p.table.getData();return i=t?p.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(o.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=a.sortValuesList?"asc"==a.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",t),n}function r(e,t){var i=[];if(Array.isArray(e))e.forEach(function(e){var n={title:a.listItemFormatter?a.listItemFormatter(e,e):e,value:e,element:!1};n.value!==t&&(isNaN(parseFloat(n.value))||isNaN(parseFloat(n.value))||parseFloat(n.value)!==parseFloat(t))||u(n),i.push(n)});else for(var n in e){var o={title:a.listItemFormatter?a.listItemFormatter(n,e[n]):e[n],value:n,element:!1};o.value!==t&&(isNaN(parseFloat(o.value))||isNaN(parseFloat(o.value))||parseFloat(o.value)!==parseFloat(t))||u(o),i.push(o)}a.searchFunc&&i.forEach(function(e){e.search={title:e.title,value:e.value}}),k=i}function l(e,t){var i=[],n=[],o=[];a.searchFunc?(k.forEach(function(e){n.push(e.search)}),o=a.searchFunc(e,n),o.forEach(function(e){var t=k.find(function(t){return t.search===e});t&&i.push(t)})):""===e?a.showListOnEmpty&&k.forEach(function(e){i.push(e)}):k.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&i.push(t)}),C=i,s(t)}function s(e){for(var t=!1;A.firstChild;)A.removeChild(A.firstChild);C.forEach(function(i){var n=i.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=i.title,n.addEventListener("click",function(){u(i),c()}),n.addEventListener("mousedown",function(){x=!1,setTimeout(function(){x=!0},10)}),i.element=n,e&&i.value==h&&(E.value=i.title,i.element.classList.add("active"),t=!0),i===w&&(i.element.classList.add("active"),t=!0)),A.appendChild(n)}),t||u(!1)}function u(e,t){w&&w.element&&w.element.classList.remove("active"),w=e,e&&e.element&&e.element.classList.add("active")}function c(){f(),w?h!==w.value?(h=w.value,E.value=w.title,i(w.value)):n():a.freetext?(h=E.value,i(E.value)):a.allowEmpty&&""===E.value?(h=E.value,i(E.value)):n()}function d(){f(),n()}function m(){if(!A.parentNode){for(;A.firstChild;)A.removeChild(A.firstChild);L=!0===a.values?o():"string"==typeof a.values?o(a.values):a.values||[],r(L,h);var e=Tabulator.prototype.helpers.elOffset(b);A.style.minWidth=b.offsetWidth+"px",A.style.top=e.top+b.offsetHeight+"px",A.style.left=e.left+"px",document.body.appendChild(A)}}function f(){A.parentNode&&A.parentNode.removeChild(A),v()}function v(){p.table.rowManager.element.removeEventListener("scroll",d)}var p=this,b=e.getElement(),h=e.getValue(),g=a.verticalNavigation||"editor",y=void 0!==h||null===h?h:void 0!==a.defaultValue?a.defaultValue:"",E=document.createElement("input"),A=document.createElement("div"),k=[],C=[],L=[],w={},x=!0;if(this.table.rowManager.element.addEventListener("scroll",d),E.setAttribute("type","search"),E.style.padding="4px",E.style.width="100%",E.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var N in a.elementAttributes)"+"==N.charAt(0)?(N=N.slice(1),E.setAttribute(N,E.getAttribute(N)+a.elementAttributes["+"+N])):E.setAttribute(N,a.elementAttributes[N]);return E.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=C.indexOf(w),("editor"==g||"hybrid"==g&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),u(t>0?C[t-1]:!1));break;case 40:t=C.indexOf(w),("editor"==g||"hybrid"==g&&t<C.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<C.length-1&&u(-1==t?C[0]:C[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:c();break;case 27:d();break;case 36:case 35:e.stopImmediatePropagation()}}),E.addEventListener("keyup",function(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:l(E.value)}}),E.addEventListener("search",function(e){l(E.value)}),E.addEventListener("blur",function(e){x&&c()}),E.addEventListener("focus",function(e){var t=y;m(),E.value=t,l(t,!0)}),A=document.createElement("div"),A.classList.add("tabulator-edit-select-list"),t(function(){E.style.height="100%",E.focus()}),E},star:function(e,t,i,n,a){function o(e){m.forEach(function(t,i){i<e?("ie"==l.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function r(e){u=e,o(e)}var l=this,s=e.getElement(),u=e.getValue(),c=s.getElementsByTagName("svg").length||5,d=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",v.setAttribute("width",d),v.setAttribute("height",d),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var p in a.elementAttributes)"+"==p.charAt(0)?(p=p.slice(1),f.setAttribute(p,f.getAttribute(p)+a.elementAttributes["+"+p])):f.setAttribute(p,a.elementAttributes[p]);for(var b=1;b<=c;b++)!function(e){var t=document.createElement("span"),n=v.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e)}),t.appendChild(n),f.appendChild(t)}(b);return u=Math.min(parseInt(u),c),o(u),f.addEventListener("mousemove",function(e){o(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,a){function o(){var e=d*Math.round(v.offsetWidth/(s.clientWidth/100))+c;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===a.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:a.max,c=void 0===a.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:a.min,d=(u-c)/100,m=e.getValue()||0,f=document.createElement("div"),v=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),v.style.display="inline-block",v.style.position="relative",v.style.height="100%",v.style.backgroundColor="#488CE9",v.style.maxWidth="100%",v.style.minWidth="0%",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var p in a.elementAttributes)"+"==p.charAt(0)?(p=p.slice(1),v.setAttribute(p,v.getAttribute(p)+a.elementAttributes["+"+p])):v.setAttribute(p,a.elementAttributes[p]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),c),m=Math.round((m-c)/d),v.style.width=m+"%",s.setAttribute("aria-valuemin",c),s.setAttribute("aria-valuemax",u),v.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=v.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(v.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,o())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:v.style.width=v.clientWidth+s.clientWidth/100+"px";break;case 37:v.style.width=v.clientWidth-s.clientWidth/100+"px";break;case 13:o();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),v},tickCross:function(e,t,i,n,a){function o(e){return s?e?c?u:l.checked:l.checked&&!c?(l.checked=!1,l.indeterminate=!0,c=!0,u):(c=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=a.tristate,u=void 0===a.indeterminateValue?null:a.indeterminateValue,c=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",a.elementAttributes&&"object"==_typeof(a.elementAttributes))for(var d in a.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),l.setAttribute(d,l.getAttribute(d)+a.elementAttributes["+"+d])):l.setAttribute(d,a.elementAttributes[d]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(c=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus()}),l.checked=!0===r||"true"===r||"True"===r||1===r,l.addEventListener("change",function(e){i(o())}),l.addEventListener("blur",function(e){i(o(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(o()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit);