/*! Buttons for DataTables 2.1.0 ©2016-2021 SpryMedia Ltd - datatables.net/license */ (function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(C){return f(C,window,document)}):"object"===typeof exports?module.exports=function(C,x){C||(C=window);x&&x.fn.dataTable||(x=require("datatables.net")(C,x).$);return f(x,C,C.document)}:f(jQuery,window,document)})(function(f,C,x,q){function I(a,b,c){f.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){f.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} function L(a,b){a=new u.Api(a);b=b?b:a.init().buttons||u.defaults.buttons;return(new v(a,b)).container()}var u=f.fn.dataTable,O=0,P=0,y=u.ext.buttons,v=function(a,b){if(!(this instanceof v))return function(c){return(new v(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=f.extend(!0,{},v.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new u.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:f("<"+this.c.dom.container.tag+ "/>").addClass(this.c.dom.container.className)};this._constructor()};f.extend(v.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===q)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=f(c.node);if(b===q)return c.hasClass(a);c.toggleClass(a,b===q?!0:b);return this},add:function(a,b,c){var d=this.s.buttons;if("string"===typeof b){b=b.split("-");var k=this.s;d=0;for(var e=b.length-1;d");g.conf._collection=g.collection;if(g.conf.split)for(var t=0;t'+this.c.dom.splitDropdown.text+""));this._expandButton(g.buttons,g.conf.buttons,g.conf.split,!b,b,e,g.conf)}g.conf.parent=h;n.init&&n.init.call(l.button(g.node),l,f(g.node),n);m++}}}},_buildButton:function(a,b,c,d){var k=this.c.dom.button,e=this.c.dom.buttonLiner,h=this.c.dom.collection,l=this.c.dom.splitCollection,m=this.c.dom.splitDropdownButton, p=this.s.dt,r=function(w){return"function"===typeof w?w(p,g,a):w};if(a.spacer){var n=f("").addClass("dt-button-spacer "+a.style+" "+k.spacerClass).html(r(a.text));return{conf:a,node:n,inserter:n,buttons:[],inCollection:b,isSplit:c,inSplit:d,collection:null}}!c&&d&&l?k=m:!c&&b&&h.button&&(k=h.button);!c&&d&&l.buttonLiner?e=l.buttonLiner:!c&&b&&h.buttonLiner&&(e=h.buttonLiner);if(a.available&&!a.available(p,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var g=f(a.html); else{var t=function(w,A,E,F){F.action.call(A.button(E),w,A,E,F);f(A.table().node()).triggerHandler("buttons-action.dt",[A.button(E),A,E,F])};h=a.tag||k.tag;var z=a.clickBlurs===q?!0:a.clickBlurs;g=f("<"+h+"/>").addClass(k.className).addClass(d?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(w){w.preventDefault();!g.hasClass(k.disabled)&&a.action&&t(w,p,g,a);z&&g.trigger("blur")}).on("keypress.dtb", function(w){13===w.keyCode&&(w.preventDefault(),!g.hasClass(k.disabled)&&a.action&&t(w,p,g,a))});"a"===h.toLowerCase()&&g.attr("href","#");"button"===h.toLowerCase()&&g.attr("type","button");e.tag?(h=f("<"+e.tag+"/>").html(r(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&h.attr("href","#"),g.append(h)):g.html(r(a.text));!1===a.enabled&&g.addClass(k.disabled);a.className&&g.addClass(a.className);a.titleAttr&&g.attr("title",r(a.titleAttr));a.attr&&g.attr(a.attr);a.namespace||(a.namespace= ".dt-button-"+P++);a.config!==q&&a.config.split&&(a.split=a.config.split)}e=(e=this.c.dom.buttonContainer)&&e.tag?f("<"+e.tag+"/>").addClass(e.className).append(g):g;this._addKey(a);this.c.buttonCreated&&(e=this.c.buttonCreated(a,e));if(c){n=f("
").addClass(this.c.dom.splitWrapper.className);n.append(g);var B=f.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,attr:{"aria-haspopup":!0,"aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass}); this._addKey(B);var G=function(w,A,E,F){y.split.action.call(A.button(f("div.dt-btn-split-wrapper")[0]),w,A,E,F);f(A.table().node()).triggerHandler("buttons-action.dt",[A.button(E),A,E,F]);E.attr("aria-expanded",!0)},D=f('").on("click.dtb",function(w){w.preventDefault();w.stopPropagation();D.hasClass(k.disabled)||G(w,p,D,B);z&&D.trigger("blur")}).on("keypress.dtb", function(w){13===w.keyCode&&(w.preventDefault(),D.hasClass(k.disabled)||G(w,p,D,B))});0===a.split.length&&D.addClass("dtb-hide-drop");n.append(D).attr(B.attr)}return{conf:a,node:c?n.get(0):g.get(0),inserter:c?n:e,buttons:[],inCollection:b,isSplit:c,inSplit:d,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c").addClass("dt-button-collection").addClass(e.collectionLayout).addClass(e.splitAlignClass).css("display","none");a=f(a).addClass(e.contentClassName).attr("role","menu").appendTo(c);h.attr("aria-expanded","true");h.parents("body")[0]!==x.body&&(h=x.body.lastChild);e.popoverTitle?c.prepend('
'+e.popoverTitle+"
"):e.collectionTitle&&c.prepend('
'+ e.collectionTitle+"
");I(c.insertAfter(h),e.fade);var m=f(b.table().container());d=c.css("position");"dt-container"===e.align&&(h=h.parent(),c.css("width",m.width()));if("absolute"===d){var p=h.position();d=f(b.node()).position();c.css({top:f(f(b[0].node).parent()[0]).hasClass("dt-buttons")?d.top+h.outerHeight():p.top+h.outerHeight(),left:p.left});p=c.outerHeight();var r=m.offset().top+m.height();r=d.top+h.outerHeight()+p-r;var n=d.top-p,g=m.offset().top;d=d.top-p-5;(r>g-n||e.dropup)&&-dp+g&&(d-=p+g,m-=r+g,g=d>m?g+m:g+d);else if(c.hasClass(e.splitRightAlignClassName))g=z-r,d>p+g&&(d-=p+g,m-=r+g,g=d>m?g+m:g+d);else if(c.hasClass(e.splitLeftAlignClassName)){if(g=t-p,mp+g)d-=p+g,m-=r+g,g=d>m?g+m:g+d}else g=d-p,mm?g+m:g+d)}else d=h.offset().top,g=0,g="button-right"===e.align?n-r:t-p;c.css("left",c.position().left+g)}else d=c.height()/2,d>f(C).height()/2&&(d=f(C).height()/2),c.css("marginTop",-1* d);e.background&&v.background(!0,e.backgroundClassName,e.fade,h);f("div.dt-button-background").on("click.dtb-collection",function(){});e.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(B,G,D,w){w[0]!==h[0]&&l()})},0);f(c).trigger("buttons-popover.dt");b.on("destroy",l);setTimeout(function(){k=!1;f("body").on("click.dtb-collection",function(B){if(!k){var G=f.fn.addBack?"addBack":"andSelf",D=f(B.target).parent()[0];(!f(B.target).parents()[G]().filter(a).length&&!f(D).hasClass("dt-buttons")|| f(B.target).hasClass("dt-button-background"))&&l()}}).on("keyup.dtb-collection",function(B){27===B.keyCode&&l()})},0)}}});v.background=function(a,b,c,d){c===q&&(c=400);d||(d=x.body);a?I(f("
").addClass(b).css("display","none").insertAfter(d),c):J(f("div."+b),c,function(){f(this).removeClass(b).remove()})};v.instanceSelector=function(a,b){if(a===q||null===a)return f.map(b,function(e){return e.inst});var c=[],d=f.map(b,function(e){return e.name}),k=function(e){if(Array.isArray(e))for(var h=0,l= e.length;h)<[^<]*)*<\/script>/gi,"");a=a.replace(//g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b|| b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};v.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div", className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}};v.version="2.1.0";f.extend(y,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b,c){b.attr("aria-expanded", !1)},action:function(a,b,c,d){d._collection.parents("body").length?this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",init:function(a,b,c){return b.attr("aria-expanded",!1)},action:function(a,b,c,d){this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(a,b){if(y.copyHtml5)return"copyHtml5"},csv:function(a,b){if(y.csvHtml5&&y.csvHtml5.available(a,b))return"csvHtml5"}, excel:function(a,b){if(y.excelHtml5&&y.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(y.pdfHtml5&&y.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var d=0;d"+a+"":"";I(f('
').html(a).append(f("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==q&&0!==c&&(H=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});return this});u.Api.register("buttons.exportData()", function(a){if(this.context.length)return Q(new u.Api(this.context[0]),a)});u.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==q&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===q||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",f("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")? b.replace("*",f("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===q?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=f("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=f("