YUI.add("datatable-mutable",function(o,n){var e,d=o.Array,t=o.Lang,i=t.isString,l=t.isArray,r=t.isObject,s=t.isNumber,m=o.Array.indexOf;o.namespace("DataTable").Mutable=e=function(){},e.ATTRS={autoSync:{value:!1,validator:t.isBoolean}},o.mix(e.prototype,{addColumn:function(n,e){return(n=i(n)?{key:n}:n)&&((arguments.length<2||!s(e)&&!l(e))&&(e=this.get("columns").length),this.fire("addColumn",{column:n,index:e})),this},modifyColumn:function(n,e){return i(e)&&(e={key:e}),r(e)&&this.fire("modifyColumn",{column:n,newColumnDef:e}),this},moveColumn:function(n,e){return n!==undefined&&(s(e)||l(e))&&this.fire("moveColumn",{column:n,index:e}),this},removeColumn:function(n){return n!==undefined&&this.fire("removeColumn",{column:n}),this},addRow:function(n,e){var t,i,o,l,s=e&&"sync"in e?e.sync:this.get("autoSync");if(n&&this.data&&(t=this.data.add.apply(this.data,arguments),s))for(t=d(t),l=d(arguments,1,!0),i=0,o=t.length;i<o;++i)t[i].isNew()&&t[i].save.apply(t[i],l);return this},removeRow:function(n,e){var t,i,o,l,s,u=this.data,a=e&&"sync"in e?e.sync:this.get("autoSync");if(r(n)&&n instanceof this.get("recordType")?i=n:u&&n!==undefined&&(i=u.getById(n)||u.getByClientId(n)||u.item(n)),i&&(s=d(arguments,1,!0),t=u.remove.apply(u,[i].concat(s)),a))for(r(s[0])||s.unshift({}),s[0]["delete"]=!0,o=0,l=(t=d(t)).length;o<l;++o)(i=t[o]).destroy.apply(i,s);return this},modifyRow:function(n,e,t){var i,o=this.data,l=t&&"sync"in t?t.sync:this.get("autoSync");return r(n)&&n instanceof this.get("recordType")?i=n:o&&n!==undefined&&(i=o.getById(n)||o.getByClientId(n)||o.item(n)),i&&r(e)&&(o=d(arguments,1,!0),i.setAttrs.apply(i,o),l&&!i.isNew()&&i.save.apply(i,o)),this},_defAddColumnFn:function(n){for(var e=d(n.index),t=this.get("columns"),i=t,o=0,l=e.length-1;i&&o<l;++o)i=i[e[o]]&&i[e[o]].children;i&&(i.splice(e[o],0,n.column),this.set("columns",t,{originEvent:n}))},_defModifyColumnFn:function(n){var e=this.get("columns"),t=this.getColumn(n.column);t&&(o.mix(t,n.newColumnDef,!0),this.set("columns",e,{originEvent:n}))},_defMoveColumnFn:function(n){var e,t,i,o,l,s=this.get("columns"),u=this.getColumn(n.column),a=d(n.index);if(u&&(e=u._parent?u._parent.children:s,-1<(t=m(e,u)))){for(i=s,o=0,l=a.length-1;i&&o<l;++o)i=i[a[o]]&&i[a[o]].children;i&&(l=i.length,e.splice(t,1),a=a[o],l>i.lenth&&t<a&&a--,i.splice(a,0,u),this.set("columns",s,{originEvent:n}))}},_defRemoveColumnFn:function(n){var e,t=this.get("columns"),i=this.getColumn(n.column);i&&(e=i._parent?i._parent.children:t,-1<(i=o.Array.indexOf(e,i))&&(e.splice(i,1),this.set("columns",t,{originEvent:n})))},initializer:function(){this.publish({addColumn:{defaultFn:o.bind("_defAddColumnFn",this)},removeColumn:{defaultFn:o.bind("_defRemoveColumnFn",this)},moveColumn:{defaultFn:o.bind("_defMoveColumnFn",this)},modifyColumn:{defaultFn:o.bind("_defModifyColumnFn",this)}})}}),e.prototype.addRows=e.prototype.addRow,t.isFunction(o.DataTable)&&o.Base.mix(o.DataTable,[e])},"patched-v3.18.4",{requires:["datatable-base"]});