snipe-it/public/js/dist/bootstrap-table.js

12 lines
336 KiB
JavaScript
Raw Normal View History

function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(t){"use strict";var e=3;try{e=parseInt(t.fn.dropdown.Constructor.VERSION,10)}catch(t){}var n={3:{buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggleOff:"glyphicon-list-alt icon-list-alt",toggleOn:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus",fullscreen:"glyphicon-fullscreen"},pullClass:"pull",toobarDropdowHtml:['<ul class="dropdown-menu" role="menu">',"</ul>"],toobarDropdowItemHtml:'<li role="menuitem"><label>%s</label></li>',pageDropdownHtml:['<ul class="dropdown-menu" role="menu">',"</ul>"],pageDropdownItemHtml:'<li role="menuitem" class="%s"><a href="#">%s</a></li>'},4:{buttonsClass:"secondary",iconsPrefix:"fa",icons:{paginationSwitchDown:"fa-toggle-down",paginationSwitchUp:"fa-toggle-up",refresh:"fa-refresh",toggleOff:"fa-toggle-off",toggleOn:"fa-toggle-on",columns:"fa-th-list",detailOpen:"fa-plus",detailClose:"fa-minus",fullscreen:"fa-arrows-alt"},pullClass:"float",toobarDropdowHtml:['<div class="dropdown-menu dropdown-menu-right">',"</div>"],toobarDropdowItemHtml:'<label class="dropdown-item">%s</label>',pageDropdownHtml:['<div class="dropdown-menu">',"</div>"],pageDropdownItemHtml:'<a class="dropdown-item %s" href="#">%s</a>'}}[e],i=null,o=function(t){var e=arguments,n=!0,i=1;return t=t.replace(/%s/g,function(){var t=e[i++];return void 0===t?(n=!1,""):t}),n?t:""},r=function(e,n,i,o){var r="";return t.each(e,function(t,e){return e[n]!==o||(r=e[i],!1)}),r},s=function(e){var n,i,o,r=0,s=[];for(n=0;n<e[0].length;n++)r+=e[0][n].colspan||1;for(n=0;n<e.length;n++)for(s[n]=[],i=0;i<r;i++)s[n][i]=!1;for(n=0;n<e.length;n++)for(i=0;i<e[n].length;i++){var a=e[n][i],l=a.rowspan||1,c=a.colspan||1,h=t.inArray(!1,s[n]);for(1===c&&(a.fieldIndex=h,void 0===a.field&&(a.field=h)),o=0;o<l;o++)s[n+o][h]=!0;for(o=0;o<c;o++)s[n][h+o]=!0}},a=function(){if(null===i){var e,n,o=t("<p/>").addClass("fixed-table-scroll-inner"),r=t("<div/>").addClass("fixed-table-scroll-outer");r.append(o),t("body").append(r),e=o[0].offsetWidth,r.css("overflow","scroll"),n=o[0].offsetWidth,e===n&&(n=r[0].clientWidth),r.remove(),i=e-n}return i},l=function(e,n,i,r){var s=n;if("string"==typeof n){var a=n.split(".");a.length>1?(s=window,t.each(a,function(t,e){s=s[e]})):s=window[n]}return"object"==typeof s?s:"function"==typeof s?s.apply(e,i||[]):!s&&"string"==typeof n&&o.apply(this,[n].concat(i))?o.apply(this,[n].concat(i)):r},c=function(e,n,i){var o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},r=o(e),s=o(n),a="";if(i&&r.length!==s.length)return!1;for(var l=0;l<r.length;l++)if(a=r[l],t.inArray(a,s)>-1&&e[a]!==n[a])return!1;return!0},h=function(t){return"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/`/g,"&#x60;"):t},u=function(t){for(var e in t){var n=e.split(/(?=[A-Z])/).join("-").toLowerCase();n!==e&&(t[n]=t[e],delete t[e])}return t},d=function(t,e,n){var i=t;if("string"!=typeof e||t.hasOwnProperty(e))return n?h(t[e]):t[e];var o=e.split(".");for(var r in o)o.hasOwnProperty(r)&&(i=i&&i[o[r]]);return n?h(i):i},p=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},f=function(){Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var r,s,a=[];for(r in o)t.call(o,r)&&a.push(r);if(e)for(s=0;s<i;s++)t.call(o,n[s])&&a.push(n[s]);return a}}())},g=function(e,n){th
2018-10-03 00:52:29 -07:00
t.each(this.header.fields,function(i,s){var a="",g=d(e,s,c.options.escape),m="",y="",w={},b="",v=c.header.classes[i],x="",k="",S="",C="",_=c.columns[i];if((!c.fromHtml||void 0!==g||_.checkbox||_.radio)&&_.visible&&(!c.options.cardView||_.cardVisible)){if(_.escape&&(g=h(g)),p=o('style="%s"',f.concat(c.header.styles[i]).join("; ")),e["_"+s+"_id"]&&(b=o(' id="%s"',e["_"+s+"_id"])),e["_"+s+"_class"]&&(v=o(' class="%s"',e["_"+s+"_class"])),e["_"+s+"_rowspan"]&&(k=o(' rowspan="%s"',e["_"+s+"_rowspan"])),e["_"+s+"_colspan"]&&(S=o(' colspan="%s"',e["_"+s+"_colspan"])),e["_"+s+"_title"]&&(C=o(' title="%s"',e["_"+s+"_title"])),w=l(c.header,c.header.cellStyles[i],[g,e,n,s],w),w.classes&&(v=o(' class="%s"',w.classes)),w.css){var T=[];for(var A in w.css)T.push(A+": "+w.css[A]);p=o('style="%s"',T.concat(c.header.styles[i]).join("; "))}m=l(_,c.header.formatters[i],[g,e,n,s],g),e["_"+s+"_data"]&&!t.isEmptyObject(e["_"+s+"_data"])&&t.each(e["_"+s+"_data"],function(t,e){"index"!==t&&(x+=o(' data-%s="%s"',t,e))}),_.checkbox||_.radio?(y=_.checkbox?"checkbox":y,y=_.radio?"radio":y,a=[o(c.options.cardView?'<div class="card-view %s">':'<td class="bs-checkbox %s">',_.class||""),"<input"+o(' data-index="%s"',n)+o(' name="%s"',c.options.selectItemName)+o(' type="%s"',y)+o(' value="%s"',e[c.options.idField])+o(' checked="%s"',!0===m||g||m&&m.checked?"checked":void 0)+o(' disabled="%s"',!_.checkboxEnabled||m&&m.disabled?"disabled":void 0)+" />",c.header.formatters[i]&&"string"==typeof m?m:"",c.options.cardView?"</div>":"</td>"].join(""),e[c.header.stateField]=!0===m||!!g||m&&m.checked):(m=void 0===m||null===m?c.options.undefinedText:m,a=c.options.cardView?['<div class="card-view">',c.options.showHeader?o('<span class="title" %s>%s</span>',p,r(c.columns,"field","title",s)):"",o('<span class="value">%s</span>',m),"</div>"].join(""):[o("<td%s %s %s %s %s %s %s>",b,v,p,x,k,S,C),m,"</td>"].join(""),c.options.cardView&&c.options.smartDisplay&&""===m&&(a='<div class="card-view"></div>')),u.push(a)}}),this.options.cardView&&u.push("</div></td>"),u.push("</tr>"),u.join(" ")}},g.prototype.initBody=function(e){var n=this,i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=t("<tbody></tbody>").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var r,s=t(document.createDocumentFragment()),a=this.pageFrom-1;a<this.pageTo;a++){var c=i[a],h=this.initRow(c,a,i,s);r=r||!!h,h&&!0!==h&&s.append(h)}r||s.append('<tr class="no-records-found">'+o('<td colspan="%s">%s</td>',this.$header.find("th").length,this.options.formatNoMatches())+"</tr>"),this.$body.html(s),e||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(e){var i=t(this),r=i.parent(),s=n.data[r.data("index")],a=i[0].cellIndex,l=n.getVisibleFields(),c=l[n.options.detailView&&!n.options.cardView?a-1:a],h=n.columns[n.fieldsColumnsIndex[c]],u=d(s,c,n.options.escape);if(!i.find(".detail-icon").length&&(n.trigger("click"===e.type?"click-cell":"dbl-click-cell",c,u,s,i),n.trigger("click"===e.type?"click-row":"dbl-click-row",s,r,c),"click"===e.type&&n.options.clickToSelect&&h.clickToSelect&&n.options.ignoreClickToSelectOn(e.target))){var p=r.find(o('[name="%s"]',n.options.selectItemName));p.length&&p[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(e){e.preventDefault();var r=t(this),s=r.parent().parent(),a=s.data("index"),c=i[a];if(s.next().is("tr.detail-view"))r.find("i").attr("class",o("%s %s",n.options.iconsPrefix,n.options.icons.detailOpen)),n.trigger("collapse-row",a,c,s.next()),s.next().remove();else{r.find("i").attr("class",o("%s %s",n.options.iconsPrefix,n.options.icons.detailClose)),s.after(o('<tr class="detail-view"><td colspan="%s"></td></tr>',s.find("td").length));var h=s.next().find("td"),u=l(n.options,n.options.detailFormatter,[a,c,h],"");1===h.length&&h.append(u),n.trigger("expand-row",a,c,h)}return n.resetView(),!1}),this.$selectItem=this.$body.find(o('[name="
},h=function(o){setTimeout(function(){var r=JSON.parse(a(o,o.options.cookieIdTable,e.filterControl));if(!o.options.filterControlValuesLoaded&&r){var s={},l=n(o),c=i(o),h=function(e,n){t(n).each(function(n,i){""!==i.text&&(t(e).val(i.text),s[i.field]=i.text)})};l.find(c).each(function(){var e=t(this).closest("[data-field]").data("field"),n=t.grep(r,function(t){return t.field===e});h(this,n)}),o.initColumnSearch(s),o.options.filterControlValuesLoaded=!0,o.initServer()}},250)};t.extend(t.fn.bootstrapTable.defaults,{cookie:!1,cookieExpire:"2h",cookiePath:null,cookieDomain:null,cookieSecure:null,cookieIdTable:"",cookiesEnabled:["bs.table.sortOrder","bs.table.sortName","bs.table.pageNumber","bs.table.pageList","bs.table.columns","bs.table.searchText","bs.table.filterControl"],cookieStorage:"cookieStorage",filterControls:[],filterControlValuesLoaded:!1}),t.fn.bootstrapTable.methods.push("getCookies"),t.fn.bootstrapTable.methods.push("deleteCookie"),t.extend(t.fn.bootstrapTable.utils,{setCookie:s,getCookie:a});var u=t.fn.bootstrapTable.Constructor,d=u.prototype.init,p=u.prototype.initTable,f=u.prototype.initServer,g=u.prototype.onSort,m=u.prototype.onPageNumber,y=u.prototype.onPageListChange,w=u.prototype.onPagePre,b=u.prototype.onPageNext,v=u.prototype.toggleColumn,x=u.prototype.selectPage,k=u.prototype.onSearch;u.prototype.init=function(){if(this.options.filterControls=[],this.options.filterControlValuesLoaded=!1,this.options.cookiesEnabled="string"==typeof this.options.cookiesEnabled?this.options.cookiesEnabled.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.cookiesEnabled,this.options.filterControl){var t=this;this.$el.on("column-search.bs.table",function(n,i,o){for(var r=!0,a=0;a<t.options.filterControls.length;a++)if(t.options.filterControls[a].field===i){t.options.filterControls[a].text=o,r=!1;break}r&&t.options.filterControls.push({field:i,text:o}),s(t,e.filterControl,JSON.stringify(t.options.filterControls))}).on("post-body.bs.table",h(t))}d.apply(this,Array.prototype.slice.apply(arguments))},u.prototype.initServer=function(){var t=this;if(t.options.cookie&&t.options.filterControl&&!t.options.filterControlValuesLoaded){if(JSON.parse(a(t,t.options.cookieIdTable,e.filterControl)))return}f.apply(this,Array.prototype.slice.apply(arguments))},u.prototype.initTable=function(){p.apply(this,Array.prototype.slice.apply(arguments)),this.initCookie()},u.prototype.initCookie=function(){if(this.options.cookie){if(""===this.options.cookieIdTable||""===this.options.cookieExpire||!o())return console.error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies"),void(this.options.cookie=!1);var n=a(this,this.options.cookieIdTable,e.sortOrder),i=a(this,this.options.cookieIdTable,e.sortName),r=a(this,this.options.cookieIdTable,e.pageNumber),s=a(this,this.options.cookieIdTable,e.pageList),l=JSON.parse(a(this,this.options.cookieIdTable,e.columns)),c=a(this,this.options.cookieIdTable,e.searchText);this.options.sortOrder=n||this.options.sortOrder,this.options.sortName=i||this.options.sortName,this.options.pageNumber=r?+r:this.options.pageNumber,this.options.pageSize=s?s===this.options.formatAllRows()?s:+s:this.options.pageSize,this.options.searchText=c||"",l&&t.each(this.columns,function(e,n){n.visible=-1!==t.inArray(n.field,l)})}},u.prototype.onSort=function(){g.apply(this,Array.prototype.slice.apply(arguments)),s(this,e.sortOrder,this.options.sortOrder),s(this,e.sortName,this.options.sortName)},u.prototype.onPageNumber=function(){return m.apply(this,Array.prototype.slice.apply(arguments)),s(this,e.pageNumber,this.options.pageNumber),!1},u.prototype.onPageListChange=function(){return y.apply(this,Array.prototype.slice.apply(arguments)),s(this,e.pageList,this.options.pageSize),s(this,e.pageNumber,this.options.pageNumber),!1},u.prototype.onPagePre=function(){return w.apply(this,Array.prototype.slice.apply(arguments)),s(this,e.pageNumber,this.options.pageNumber),!1},u.prototype.onPageNext=function(){return
L.displayTableName&&(At+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+x(t("<p>"+L.tableName+"</p>"))+"</td></tr>"),At+="</tbody></table>"});var It='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+Tt+' xmlns="http://www.w3.org/TR/REC-html40">';if(It+='<meta http-equiv="content-type" content="application/vnd.ms-'+Ct+'; charset=UTF-8">',It+="<head>","excel"===Ct&&(It+="\x3c!--[if gte mso 9]>",It+="<xml>",It+="<x:ExcelWorkbook>",It+="<x:ExcelWorksheets>",It+="<x:ExcelWorksheet>",It+="<x:Name>",It+=Pt,It+="</x:Name>",It+="<x:WorksheetOptions>",It+="<x:DisplayGridlines/>",L.mso.rtl&&(It+="<x:DisplayRightToLeft/>"),It+="</x:WorksheetOptions>",It+="</x:ExcelWorksheet>",It+="</x:ExcelWorksheets>",It+="</x:ExcelWorkbook>",It+="</xml>",It+="<![endif]--\x3e"),It+="<style>",It+="@page { size:"+L.mso.pageOrientation+"; mso-page-orientation:"+L.mso.pageOrientation+"; }",It+="@page Section1 {size:"+z[L.mso.pageFormat][0]+"pt "+z[L.mso.pageFormat][1]+"pt",It+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",It+="div.Section1 {page:Section1;}",It+="@page Section2 {size:"+z[L.mso.pageFormat][1]+"pt "+z[L.mso.pageFormat][0]+"pt",It+=";mso-page-orientation:"+L.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}",It+="div.Section2 {page:Section2;}",It+="br {mso-data-placement:same-cell;}",It+="</style>",It+="</head>",It+="<body>",It+='<div class="Section'+("landscape"===L.mso.pageOrientation?"2":"1")+'">',It+=At,It+="</div>",It+="</body>",It+="</html>","string"===L.outputMode)return It;if("base64"===L.outputMode)return D(It);try{j=new Blob([It],{type:"application/vnd.ms-"+L.type}),saveAs(j,L.fileName+"."+_t)}catch(t){N(L.fileName+"."+_t,"data:application/vnd.ms-"+Ct+";base64,",It)}}else if("png"===L.type)html2canvas(t(U)[0]).then(function(t){for(var e=t.toDataURL(),n=atob(e.substring(22)),i=new ArrayBuffer(n.length),o=new Uint8Array(i),r=0;r<n.length;r++)o[r]=n.charCodeAt(r);if("string"===L.outputMode)return n;if("base64"===L.outputMode)return D(e);if("window"===L.outputMode)return void window.open(e);try{j=new Blob([i],{type:"image/png"}),saveAs(j,L.fileName+".png")}catch(t){N(L.fileName+".png","data:image/png,",j)}});else if("pdf"===L.type)if(!0===L.pdfmake.enabled){var Ot=[],Et=[];V=0,G=[];var Ft=function(e,n,i){var o=0;return t(e).each(function(){var t=[];c(this,n,V,i,function(e,n,i){if(void 0!==e&&null!==e){var o=T(e),r=A(e),s=x(e,n,i)||" ";o>1||r>1?(o=o||1,r=r||1,t.push({colSpan:o,rowSpan:r,text:s})):t.push(s)}else t.push(" ")}),t.length&&Et.push(t),o<t.length&&(o=t.length),V++}),o};W=t(this).find("thead").first().find(L.theadSelector);for(var Rt=Ft(W,"th,td",W.length),qt=Ot.length;qt<Rt;qt++)Ot.push("*");$=n(t(this)),Ft($,"th,td",W.length+$.length);var Nt={content:[{table:{headerRows:W.length,widths:Ot,body:Et}}]};t.extend(!0,Nt,L.pdfmake.docDefinition),pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}},t.extend(!0,pdfMake.fonts,L.pdfmake.fonts),pdfMake.createPdf(Nt).getBuffer(function(t){try{var e=new Blob([t],{type:"application/pdf"});saveAs(e,L.fileName+".pdf")}catch(e){N(L.fileName+".pdf","data:application/pdf;base64,",t)}})}else if(!1===L.jspdf.autotable){var Bt={dim:{w:O(t(U).first().get(0),"width","mm"),h:O(t(U).first().get(0),"height","mm")},pagesplit:!1},Dt=new jsPDF(L.jspdf.orientation,L.jspdf.unit,L.jspdf.format);Dt.addHTML(t(U).first(),L.jspdf.margins.left,L.jspdf.margins.top,Bt,function(){h(Dt,!1)})}else{var jt=L.jspdf.autotable.tableExport;if("string"==typeof L.jspdf.format&&"bestfit"===L.jspdf.format.toLowerCase()){var Lt="",zt="",Mt=0;t(U).each(function(){if(s(t(this))){var e=O(t(this).get(0),"width","pt");if(e>Mt){e>z.a0[0]&&(Lt="a0",zt="l");for(var n in z)z.hasOwnProperty(n)&&z[n][1]>e&&(Lt=n,zt="l",z[n][0]>e&&(zt="p"));Mt=e}}}),L.jspdf.format=""===Lt?"a4":Lt,L.jspdf.orientation=""===zt?"w":zt}null==jt.doc&&(jt.doc=new jsPDF(L.jspdf.orientation,L.jspdf.unit,L.jspdf.format),"function"==typeof
;t.pushbutton&&(e=n.internal.setBitPosition(e,17),delete t.pushbutton),t.radio&&(e=n.internal.setBitPosition(e,16),delete t.radio),t.noToggleToOff&&(e=n.internal.setBitPosition(e,15)),t.Ff=e,a.call(this,t)},p=function(t){var t=t||new n.Field;t.FT="/Tx";var e=t.Ff||0;t.multiline&&(e|=4096),t.password&&(e|=8192),t.fileSelect&&(e|=1<<20),t.doNotSpellCheck&&(e|=1<<22),t.doNotScroll&&(e|=1<<23),t.Ff=t.Ff||e,a.call(this,t)},f=function(t){var e=t||new n.Field;e.FT="/Ch";var i=e.Ff||0;e.combo&&(i=n.internal.setBitPosition(i,18),delete e.combo),e.edit&&(i=n.internal.setBitPosition(i,19),delete e.edit),e.sort&&(i=n.internal.setBitPosition(i,20),delete e.sort),e.multiSelect&&this.internal.getPDFVersion()>=1.4&&(i=n.internal.setBitPosition(i,22),delete e.multiSelect),e.doNotSpellCheck&&this.internal.getPDFVersion()>=1.4&&(i=n.internal.setBitPosition(i,23),delete e.doNotSpellCheck),e.Ff=i,a.call(this,e)}})(e.API);var n=window.AcroForm;n.internal={},n.createFormXObject=function(t){var e=new n.FormXObject,i=n.Appearance.internal.getHeight(t)||0,o=n.Appearance.internal.getWidth(t)||0;return e.BBox=[0,0,o,i],e},n.Appearance={CheckBox:{createAppearanceStream:function(){return{N:{On:n.Appearance.CheckBox.YesNormal},D:{On:n.Appearance.CheckBox.YesPushDown,Off:n.Appearance.CheckBox.OffPushDown}}},createMK:function(){return"<< /CA (3)>>"},YesPushDown:function(t){var e=n.createFormXObject(t),i="";t.Q=1;var o=n.internal.calculateX(t,"3","ZapfDingbats",50);return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n BMC\n q\n 0 0 1 rg\n /F13 "+o.fontSize+" Tf 0 g\n BT\n",i+=o.text,i+="ET\n Q\n EMC\n",e.stream=i,e},YesNormal:function(t){var e=n.createFormXObject(t),i="";t.Q=1;var o=n.internal.calculateX(t,"3","ZapfDingbats",.9*n.Appearance.internal.getHeight(t));return i+="1 g\n0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\nf\nq\n0 0 1 rg\n0 0 "+(n.Appearance.internal.getWidth(t)-1)+" "+(n.Appearance.internal.getHeight(t)-1)+" re\nW\nn\n0 g\nBT\n/F13 "+o.fontSize+" Tf 0 g\n",i+=o.text,i+="ET\n Q\n",e.stream=i,e},OffPushDown:function(t){var e=n.createFormXObject(t),i="";return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=i,e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:n.Appearance.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=n.Appearance.RadioButton.Circle.YesNormal,e.D[t]=n.Appearance.RadioButton.Circle.YesPushDown,e},createMK:function(){return"<< /CA (l)>>"},YesNormal:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;o*=.9;var r=n.Appearance.internal.Bezier_C;return i+="q\n1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+o*r+" "+o*r+" "+o+" 0 "+o+" c\n-"+o*r+" "+o+" -"+o+" "+o*r+" -"+o+" 0 c\n-"+o+" -"+o*r+" -"+o*r+" -"+o+" 0 -"+o+" c\n"+o*r+" -"+o+" "+o+" -"+o*r+" "+o+" 0 c\nf\nQ\n",e.stream=i,e},YesPushDown:function(t){var e=n.createFormXObject(t),i="",o=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;o*=.9;var r=2*o,s=r*n.Appearance.internal.Bezier_C,a=o*n.Appearance.internal.Bezier_C;return i+="0.749023 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+r+" 0 m\n"+r+" "+s+" "+s+" "+r+" 0 "+r+" c\n-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c\n-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c\n"+s+" -"+r+" "+r+" -"+s+" "+r+" 0 c\n f\n Q\n 0 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+a+" "+a+" "+o+" 0 "+o+" c\n-"+a+" "+o+" -"+o+" "+a+
Object.defineProperty(t.canvas,"height",{get:function(){return this._height},set:function(t){this._height=t,this.getContext("2d").pageWrapY=t+1}})}(e.API),function(t){var e,n,i,o,r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,a=function(t,e,n,i,o){r={x:t,y:e,w:n,h:i,ln:o}},l=function(){return r},c={left:0,top:0,bottom:0};t.setHeaderFunction=function(t){o=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,n=this.table_font_size||this.internal.getFontSize(),i=this.internal.getFont().fontStyle;var o,r,s=19.049976/25.4;r=document.createElement("font"),r.id="jsPDFCell";try{r.style.fontStyle=i}catch(t){r.style.fontWeight=i}r.style.fontName=e,r.style.fontSize=n+"pt";try{r.textContent=t}catch(e){r.innerText=t}return document.body.appendChild(r),o={w:(r.offsetWidth+1)*s,h:(r.offsetHeight+1)*s},document.body.removeChild(r),o},t.cellAddPage=function(){var t=this.margins||c;this.addPage(),a(t.left,t.top,void 0,void 0),s+=1},t.cellInitialize=function(){r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1},t.cell=function(t,e,n,i,o,r,s){var h=l(),u=!1;if(void 0!==h.ln)if(h.ln===r)t=h.x+h.w,e=h.y;else{var d=this.margins||c;h.y+h.h+i+13>=this.internal.pageSize.height-d.bottom&&(this.cellAddPage(),u=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(r,!0)),e=l().y+l().h,u&&(e=23)}if(void 0!==o[0])if(this.printingHeaderRow?this.rect(t,e,n,i,"FD"):this.rect(t,e,n,i),"right"===s){o instanceof Array||(o=[o]);for(var p=0;p<o.length;p++){var f=o[p],g=this.getStringUnitWidth(f)*this.internal.getFontSize();this.text(f,t+n-g-3,e+this.internal.getLineHeight()*(p+1))}}else this.text(o,t+3,e+this.internal.getLineHeight());return a(t,e,n,i,r),this},t.arrayMax=function(t,e){var n,i,o,r=t[0];for(n=0,i=t.length;n<i;n+=1)o=t[n],e?-1===e(r,o)&&(r=o):o>r&&(r=o);return r},t.table=function(e,n,i,o,a){if(!i)throw"No data for PDF table";var l,h,u,d,p,f,g,m,y,w,b=[],v=[],x={},k={},S=[],C=[],_=!1,T=!0,A=12,P=c;if(P.width=this.internal.pageSize.width,a&&(!0===a.autoSize&&(_=!0),!1===a.printHeaders&&(T=!1),a.fontSize&&(A=a.fontSize),a.css&&void 0!==a.css["font-size"]&&(A=16*a.css["font-size"]),a.margins&&(P=a.margins)),this.lnMod=0,r={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,this.printHeaders=T,this.margins=P,this.setFontSize(A),this.table_font_size=A,void 0===o||null===o)b=Object.keys(i[0]);else if(o[0]&&"string"!=typeof o[0]){for(h=0,u=o.length;h<u;h+=1)l=o[h],b.push(l.name),v.push(l.prompt),k[l.name]=l.width*(19.049976/25.4)}else b=o;if(_)for(w=function(t){return t[l]},h=0,u=b.length;h<u;h+=1){for(l=b[h],x[l]=i.map(w),S.push(this.getTextDimensions(v[h]||l).w),f=x[l],g=0,d=f.length;g<d;g+=1)p=f[g],S.push(this.getTextDimensions(p).w);k[l]=t.arrayMax(S),S=[]}if(T){var I=this.calculateLineHeight(b,k,v.length?v:b);for(h=0,u=b.length;h<u;h+=1)l=b[h],C.push([e,n,k[l],I,String(v.length?v[h]:l)]);this.setTableHeaderRow(C),this.printHeaderRow(1,!1)}for(h=0,u=i.length;h<u;h+=1){var I;for(m=i[h],I=this.calculateLineHeight(b,k,m),g=0,y=b.length;g<y;g+=1)l=b[g],this.cell(e,n,k[l],I,m[l],h+2,l.align)}return this.lastCellPos=r,this.table_x=e,this.table_y=n,this},t.calculateLineHeight=function(t,e,n){for(var i,o=0,r=0;r<t.length;r++){i=t[r],n[i]=this.splitTextToSize(String(n[i]),e[i]-3);var s=this.internal.getLineHeight()*n[i].length+3;s>o&&(o=s)}return o},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,i,r,l;if(this.printingHeaderRow=!0,void 0!==o){var c=o(this,s);a(c[0],c[1],c[2],c[3],-1)}this.setFontStyle("bold");var h=[];for(r=0,l=this.tableHeaderRow.length;r<l;r+=1)this.setFillColor(200,200,200),n=this.tableHeaderRow[r],e&&(this.margins.top=13,n[1]=this.margins&&this.margins.top||0,h.push(n)),i=[].concat(n),this.cell.apply(this,i.concat(t));h.length>0&&this.setTableHeaderRow(h),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(e.API),function(t){function e(){this._isStrokeTransparent=!1,this._strokeOpacity=1,this.strokeStyle="#000000",this.fillStyle="#000000",this._isFillTransparent=!1,this._fillOpacity=1
var r=void 0!==t?t.pageNumber:1,s=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=a;for(var l=o.getElementsByTagName("span"),c=0;c<l.length;++c)(" "+l[c].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")>-1&&(l[c].innerHTML=r),(" "+l[c].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(l[c].innerHTML="###jsPDFVarTotalPages###");i(o,e,n),e.pdf.margins_doc.bottom+=a,e.y=s},c=o.getElementsByTagName("span"),h=0;h<c.length;++h)(" "+c[h].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",l,!1),l(),S.FOOTER=1}},x=function(t,e,n,o,r,s){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,n,i,o;return i="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),o="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n=document.createElement("div"),n.style.cssText=o,n.innerHTML='<iframe style="height:1px;width:1px" name="'+i+'" />',document.body.appendChild(n),e=window.frames[i],e.document.open(),e.document.writeln(t),e.document.close(),e.document.body}(e.replace(/<\/?script[^>]*?>/gi,"")));var a,l=new p(t,n,o,r);return b.call(this,e,l,r.elementHandlers,function(t){v(e,l,r.elementHandlers),i(e,l,r.elementHandlers),l.pdf.internal.events.publish("htmlRenderingFinished"),a=l.dispose(),"function"==typeof s?s(a):t&&console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")}),a||{x:l.x,y:l.y}},p.prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")},p.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y,ready:!0}},p.prototype.executeWatchFunctions=function(t){var e=!1,n=[];if(this.watchFunctions.length>0){for(var i=0;i<this.watchFunctions.length;++i)!0===this.watchFunctions[i](t)?e=!0:n.push(this.watchFunctions[i]);this.watchFunctions=n}return e},p.prototype.splitFragmentsIntoLines=function(t,e){var i,o,r,s,a,l,c,h,u,d,p,f,g,m,y;for(o=12,p=this.pdf.internal.scaleFactor,a={},r=void 0,d=void 0,s=void 0,l=void 0,y=void 0,u=void 0,h=void 0,c=void 0,f=[],g=[f],i=0,m=this.settings.width;t.length;)if(l=t.shift(),y=e.shift(),l)if(r=y["font-family"],d=y["font-style"],s=a[r+d],s||(s=this.pdf.internal.getFont(r,d).metadata.Unicode,a[r+d]=s),u={widths:s.widths,kerning:s.kerning,fontSize:y["font-size"]*o,textIndent:i},h=this.pdf.getStringUnitWidth(l,u)*u.fontSize/p,"\u2028"==l)f=[],g.push(f);else if(i+h>m){for(c=this.pdf.splitTextToSize(l,m,u),f.push([c.shift(),y]);c.length;)f=[[c.shift(),y]],g.push(f);i=this.pdf.getStringUnitWidth(f[0][0],u)*u.fontSize/p}else f.push([l,y]),i+=h;if(void 0!==y["text-align"]&&("center"===y["text-align"]||"right"===y["text-align"]||"justify"===y["text-align"]))for(var w=0;w<g.length;++w){var b=this.pdf.getStringUnitWidth(g[w][0][0],u)*u.fontSize/p;w>0&&(g[w][0][1]=n(g[w][0][1]));var v=m-b;if("right"===y["text-align"])g[w][0][1]["margin-left"]=v;else if("center"===y["text-align"])g[w][0][1]["margin-left"]=v/2;else if("justify"===y["text-align"]){var x=g[w][0][0].split(" ").length-1;g[w][0][1]["word-spacing"]=v/x,w===g.length-1&&(g[w][0][1]["word-spacing"]=0)}}return g},p.prototype.RenderTextFragment=function(t,e){var n,i,o;o=0,n=12,this.pdf.internal.pageSize.height-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()&&(this.pdf.internal.write("ET","Q"),this.pdf.addPage(),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),e.color,"Td"),o=Math.max(o,e["line-height"],e["font-size"]),this.pdf.internal.write(0,(-1*n*o).toFixed(2),"Td")),i=this.pdf.internal.getFont(e["font-family"],e["font-style"]);var r=this.getPdfCol
"Helvetica-Oblique":e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(t){var e,n,r,s="Unicode";e=o[s][t.PostScriptName],e&&(n=t.metadata[s]?t.metadata[s]:t.metadata[s]={},n.widths=e.widths,n.kerning=e.kerning),(r=i[s][t.PostScriptName])&&(n=t.metadata[s]?t.metadata[s]:t.metadata[s]={},n.encoding=r,r.codePages&&r.codePages.length&&(t.encoding=r.codePages[0]))}])}(e.API),function(t){t.addSVG=function(t,e,n,i,o){function r(t,e){var n=e.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(e.createTextNode(t)),e.getElementsByTagName("head")[0].appendChild(n)}var s;if(e===s||n===s)throw new Error("addSVG needs values for 'x' and 'y'");var a=function(t){var e=t.createElement("iframe");return r(".jsPDF_sillysvg_iframe {display:none;position:absolute;}",t),e.name="childframe",e.setAttribute("width",0),e.setAttribute("height",0),e.setAttribute("frameborder","0"),e.setAttribute("scrolling","no"),e.setAttribute("seamless","seamless"),e.setAttribute("class","jsPDF_sillysvg_iframe"),t.body.appendChild(e),e}(document),l=function(t,e){var n=(e.contentWindow||e.contentDocument).document;return n.write(t),n.close(),n.getElementsByTagName("svg")[0]}(t,a),c=[1,1],h=parseFloat(l.getAttribute("width")),u=parseFloat(l.getAttribute("height"));h&&u&&(i&&o?c=[i/h,o/u]:i?c=[i/h,i/h]:o&&(c=[o/u,o/u]));var d,p,f,g,m=l.childNodes;for(d=0,p=m.length;d<p;d++)f=m[d],f.tagName&&"PATH"===f.tagName.toUpperCase()&&(g=function(t){for(var e=parseFloat(t[1]),n=parseFloat(t[2]),i=[],o=3,r=t.length;o<r;)"c"===t[o]?(i.push([parseFloat(t[o+1]),parseFloat(t[o+2]),parseFloat(t[o+3]),parseFloat(t[o+4]),parseFloat(t[o+5]),parseFloat(t[o+6])]),o+=7):"l"===t[o]?(i.push([parseFloat(t[o+1]),parseFloat(t[o+2])]),o+=3):o+=1;return[e,n,i]}(f.getAttribute("d").split(" ")),g[0]=g[0]*c[0]+e,g[1]=g[1]*c[1]+n,this.lines.call(this,g[2],g[0],g[1],c));return this}}(e.API),function(t){t.putTotalPages=function(t){for(var e=new RegExp(t,"g"),n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,this.internal.getNumberOfPages());return this}}(e.API),function(t){var e="",n="",i="";t.addMetadata=function(t,o){return n=o||"http://jspdf.default.namespaceuri/",e=t,this.internal.events.subscribe("postPutResources",function(){if(e){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf
;return n.dstate?n.dstate.deflateParams(n,t,e):I},deflateSetDictionary:function(t,e){var n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):I},read_buf:function(t,e,n){var i=this,o=i.avail_in;return o>n&&(o=n),0===o?0:(i.avail_in-=o,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+o),e),i.next_in_index+=o,i.total_in+=o,o)},flush_pending:function(){var t=this,e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}},function(t){var e=this,n=new s,i=512,o=k,r=new Uint8Array(i);void 0===t&&(t=w),n.deflateInit(t),n.next_out=r,e.append=function(t,e){var s,a=[],l=0,c=0,h=0;if(t.length){n.next_in_index=0,n.next_in=t,n.avail_in=t.length;do{if(n.next_out_index=0,n.avail_out=i,n.deflate(o)!=T)throw"deflating: "+n.msg;n.next_out_index&&(n.next_out_index==i?a.push(new Uint8Array(r)):a.push(new Uint8Array(r.subarray(0,n.next_out_index)))),h+=n.next_out_index,e&&n.next_in_index>0&&n.next_in_index!=l&&(e(n.next_in_index),l=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return s=new Uint8Array(h),a.forEach(function(t){s.set(t,c),c+=t.length}),s}},e.flush=function(){var t,e,o=[],s=0,a=0;do{if(n.next_out_index=0,n.avail_out=i,(t=n.deflate(_))!=A&&t!=T)throw"deflating: "+n.msg;i-n.avail_out>0&&o.push(new Uint8Array(r.subarray(0,n.next_out_index))),a+=n.next_out_index}while(n.avail_in>0||0===n.avail_out);return n.deflateEnd(),e=new Uint8Array(a),o.forEach(function(t){e.set(t,s),s+=t.length}),e}}}();!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.html2canvas=t()}}(function(){var t;return function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[s]={exports:{}};e[s][0].call(h.exports,function(t){var n=e[s][1][t];return o(n||t)},h,h.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,n,i){(function(e){!function(o){function r(t){throw RangeError(q[t])}function s(t,e){for(var n=t.length;n--;)t[n]=e(t[n]);return t}function a(t,e){return s(t.split(R),e).join(".")}function l(t){for(var e,n,i=[],o=0,r=t.length;o<r;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<r?(n=t.charCodeAt(o++),56320==(64512&n)?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--)):i.push(e);return i}function c(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=D(t>>>10&1023|55296),t=56320|1023&t),e+=D(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:S}function u(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,n){var i=0;for(t=n?B(t/A):t>>1,t+=B(t/e);t>N*_>>1;i+=S)t=B(t/N);return B(i+(N+1)*t/(t+T))}function p(t){var e,n,i,o,s,a,l,u,p,f,g=[],m=t.length,y=0,w=I,b=P;for(n=t.lastIndexOf(O),n<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&r("not-basic"),g.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<m;){for(s=y,a=1,l=S;o>=m&&r("invalid-input"),u=h(t.charCodeAt(o++)),(u>=S||u>B((k-y)/a))&&r("overflow"),y+=u*a,p=l<=b?C:l>=b+_?_:l-b,!(u<p);l+=S)f=S-p,a>B(k/f)&&r("overflow"),a*=f;e=g.length+1,b=d(y-s,e,0==s),B(y/e)>k-w&&r("overflow"),w+=B(y/e),y%=e,g.splice(y++,0,w)}return c(g)}function f(t){var e,n,i,o,s,a,c,h,p,f,g,m,y,w,b,v=[];for(t=l(t),m=t.length,e=I,n=0,s=P,a=0;a<m;++a)(g=t[a])<128&&v.push(D(g));for(i=o=v.length,o&&v.push(O);i<m;){for(c=k,a=0;a<m;++a)(g=t[a])>=e&&g<c&&(c=g);for(y=i+1,c-e>B((k-n)/y)&&r("overflow"),n+=(c-e)*y,e=c,a=0;a<m;++a)if(g=t[a],g<e&&++n>k&&r("overflow"),g==e){for(h=n,p=S;f=p<=s?C:p>=s+_?_:p-s,!(h<f);p+=S)b=h-f,w=S-f,v.push(D(u(f+b%w,0))),h=B(b/w);v.push(D(u(h,0))),s=d(n,y,i==o),n=0,++i}++n,++e}
},i[1],i[2],n.topRightOuter,n.topRightInner,n.bottomRightOuter,n.bottomRightInner);break;case 2:a=a+e.height-t[2].width,c=t[2].width,o.args=u({c1:[s+l,a+c],c2:[s,a+c],c3:[s+t[3].width,a],c4:[s+l-t[3].width,a]},i[2],i[3],n.bottomRightOuter,n.bottomRightInner,n.bottomLeftOuter,n.bottomLeftInner);break;case 3:l=t[3].width,o.args=u({c1:[s,a+c+t[2].width],c2:[s,a],c3:[s+l,a+t[0].width],c4:[s+l,a+c]},i[3],i[0],n.bottomLeftOuter,n.bottomLeftInner,n.topLeftOuter,n.topLeftInner)}}return o})}function l(t,e,n,i){var o=(Math.sqrt(2)-1)/3*4,r=n*o,s=i*o,a=t+n,l=e+i;return{topLeft:h({x:t,y:l},{x:t,y:l-s},{x:a-r,y:e},{x:a,y:e}),topRight:h({x:t,y:e},{x:t+r,y:e},{x:a,y:l-s},{x:a,y:l}),bottomRight:h({x:a,y:e},{x:a,y:e+s},{x:t+r,y:l},{x:t,y:l}),bottomLeft:h({x:a,y:l},{x:a-r,y:l},{x:t,y:e+s},{x:t,y:e})}}function c(t,e,n){var i=t.left,o=t.top,r=t.width,s=t.height,a=e[0][0]<r/2?e[0][0]:r/2,c=e[0][1]<s/2?e[0][1]:s/2,h=e[1][0]<r/2?e[1][0]:r/2,u=e[1][1]<s/2?e[1][1]:s/2,d=e[2][0]<r/2?e[2][0]:r/2,p=e[2][1]<s/2?e[2][1]:s/2,f=e[3][0]<r/2?e[3][0]:r/2,g=e[3][1]<s/2?e[3][1]:s/2,m=r-h,y=s-p,w=r-d,b=s-g;return{topLeftOuter:l(i,o,a,c).topLeft.subdivide(.5),topLeftInner:l(i+n[3].width,o+n[0].width,Math.max(0,a-n[3].width),Math.max(0,c-n[0].width)).topLeft.subdivide(.5),topRightOuter:l(i+m,o,h,u).topRight.subdivide(.5),topRightInner:l(i+Math.min(m,r+n[3].width),o+n[0].width,m>r+n[3].width?0:h-n[3].width,u-n[0].width).topRight.subdivide(.5),bottomRightOuter:l(i+w,o+y,d,p).bottomRight.subdivide(.5),bottomRightInner:l(i+Math.min(w,r-n[3].width),o+Math.min(y,s+n[0].width),Math.max(0,d-n[1].width),p-n[2].width).bottomRight.subdivide(.5),bottomLeftOuter:l(i,o+b,f,g).bottomLeft.subdivide(.5),bottomLeftInner:l(i+n[3].width,o+b,Math.max(0,f-n[3].width),g-n[2].width).bottomLeft.subdivide(.5)}}function h(t,e,n,i){var o=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}};return{start:t,startControl:e,endControl:n,end:i,subdivide:function(r){var s=o(t,e,r),a=o(e,n,r),l=o(n,i,r),c=o(s,a,r),u=o(a,l,r),d=o(c,u,r);return[h(t,s,c,d),h(d,u,l,i)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,n.x,n.y,i.x,i.y])},curveToReversed:function(i){i.push(["bezierCurve",n.x,n.y,e.x,e.y,t.x,t.y])}}}function u(t,e,n,i,o,r,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",i[1].start.x,i[1].start.y]),i[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(a.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",o[1].end.x,o[1].end.y]),o[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function d(t,e,n,i,o,r,s){e[0]>0||e[1]>0?(t.push(["line",i[0].start.x,i[0].start.y]),i[0].curveTo(t),i[1].curveTo(t)):t.push(["line",r,s]),(n[0]>0||n[1]>0)&&t.push(["line",o[0].start.x,o[0].start.y])}function p(t){return t.cssInt("zIndex")<0}function f(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function m(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function y(t){return t instanceof X}function w(t){return t.node.data.trim().length>0}function b(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function v(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var n=t.css("border"+e+"Radius"),i=n.split(" ");return i.length<=1&&(i[1]=i[0]),i.map(F)})}function x(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function k(t){return"auto"!==(-1!==["absolute","relative","fixed"].indexOf(t.css("position"))?t.css("zIndex"):"auto")}function S(t){return"static"!==t.css("position")}function C(t){return"none"!==t.css("float")}function _(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function T(t){var e=this;return function(){return!t.apply(e,arguments)}}function A(t){return t.node.nodeType===Node.ELEMENT_NODE}function P(t){return!0===t.isPseudoElement}function I(t){return t.node.nodeType===Node.TEXT_NODE}function O(t){return function(e,n){return e.cssInt("zIndex")+t.indexOf(e)/t.len
}break;case"tEXt":d=this.read(e),l=d.indexOf(0),c=String.fromCharCode.apply(String,d.slice(0,l)),this.text[c]=String.fromCharCode.apply(String,d.slice(l+1));break;case"IEND":return s&&this.animation.frames.push(s),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(g=this.colorType)||6===g,n=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*n,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}var n,i,o,r,s,a;e.load=function(t,n,i){var o;return"function"==typeof n&&(i=n),o=new XMLHttpRequest,o.open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){var t,r;return t=new Uint8Array(o.response||o.mozResponseArrayBuffer),r=new e(t),"function"==typeof(null!=n?n.getContext:void 0)&&r.render(n),"function"==typeof i?i(r):void 0},o.send(null)},0,i=1,o=2,n=0,1,e.prototype.read=function(t){var e,n;for(n=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)n.push(this.data[this.pos++]);return n},e.prototype.readUInt32=function(){var t,e,n,i;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,n=this.data[this.pos++]<<8,i=this.data[this.pos++],t|e|n|i},e.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},e.prototype.decodePixels=function(t){var e,n,i,o,r,s,a,c,h,u,d,p,f,g,m,y,w,b,v,x,k,S,C;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new l(t),t=t.getBytes(),p=this.pixelBitlength/8,y=p*this.width,f=new Uint8Array(y*this.height),s=t.length,m=0,g=0,n=0;g<s;){switch(t[g++]){case 0:for(o=v=0;v<y;o=v+=1)f[n++]=t[g++];break;case 1:for(o=x=0;x<y;o=x+=1)e=t[g++],r=o<p?0:f[n-p],f[n++]=(e+r)%256;break;case 2:for(o=k=0;k<y;o=k+=1)e=t[g++],i=(o-o%p)/p,w=m&&f[(m-1)*y+i*p+o%p],f[n++]=(w+e)%256;break;case 3:for(o=S=0;S<y;o=S+=1)e=t[g++],i=(o-o%p)/p,r=o<p?0:f[n-p],w=m&&f[(m-1)*y+i*p+o%p],f[n++]=(e+Math.floor((r+w)/2))%256;break;case 4:for(o=C=0;C<y;o=C+=1)e=t[g++],i=(o-o%p)/p,r=o<p?0:f[n-p],0===m?w=b=0:(w=f[(m-1)*y+i*p+o%p],b=i&&f[(m-1)*y+(i-1)*p+o%p]),a=r+w-b,c=Math.abs(a-r),u=Math.abs(a-w),d=Math.abs(a-b),h=c<=u&&c<=d?r:u<=d?w:b,f[n++]=(e+h)%256;break;default:throw new Error("Invalid filter algorithm: "+t[g-1])}m++}return f},e.prototype.decodePalette=function(){var t,e,n,i,o,r,s,a,l;for(n=this.palette,r=this.transparency.indexed||[],o=new Uint8Array((r.length||0)+n.length),i=0,n.length,t=0,e=s=0,a=n.length;s<a;e=s+=3)o[i++]=n[e],o[i++]=n[e+1],o[i++]=n[e+2],o[i++]=null!=(l=r[t++])?l:255;return o},e.prototype.copyToImageData=function(t,e){var n,i,o,r,s,a,l,c,h,u,d;if(i=this.colors,h=null,n=this.hasAlphaChannel,this.palette.length&&(h=null!=(d=this._decodedPalette)?d:this._decodedPalette=this.decodePalette(),i=4,n=!0),o=t.data||t,c=o.length,s=h||e,r=a=0,1===i)for(;r<c;)l=h?4*e[r/4]:a,u=s[l++],o[r++]=u,o[r++]=u,o[r++]=u,o[r++]=n?s[l++]:255,a=l;else for(;r<c;)l=h?4*e[r/4]:a,o[r++]=s[l++],o[r++]=s[l++],o[r++]=s[l++],o[r++]=n?s[l++]:255,a=l},e.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};try{s=t.document.createElement("canvas"),a=s.getContext("2d")}catch(t){return-1}return r=function(t){var e;return a.width=t.width,a.height=t.height,a.clearRect(0,0,t.width,t.height),a.putImageData(t,0,0),e=new Image,e.src=s.toDataURL(),e},e.prototype.decodeFrames=function(t){var e,n,i,o,s,a,l,c;if(this.animation){for(l=this.animation.frames,c=[],n=s=0,a=l.length;s<a;n=++s)e=l[n],i=t.createImageData(e.width,e.height),o=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(i,o),e.imageData=i,c.push(e.image=r(i));return c}},e.prototype.renderFrame=function(t,e){var r,s,a;return s=this.animation.frames,r=s[e],a=s[e-1],0===e&&t.clearRect(0,0,this.width,this.height),(null!=a?a.disposeOp:void 0)===i?t.clearRect(a.xOffset,a.yOffset,a.width,a.height):(null!=a?a.disposeOp:void 0)===o&&t.putI