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