UNPKG

stimulsoft-reports-js

Version:

Stimulsoft Reports.JS is a reporting tool for Node.js

7 lines 1.54 MB
/* Stimulsoft.Reports.JS Version: 2025.3.3 Build date: 2025.07.28 License: https://www.stimulsoft.com/en/licensing/reports */ (t=>{var e;"undefined"!=typeof process&&process.__nwjs||"object"!=typeof exports||"undefined"==typeof module?"function"==typeof define&&define.amd?define(["./stimulsoft.dashboards"],e=>Object.assign(e,t(e.Stimulsoft))):window.Stimulsoft?window.Stimulsoft.Report&&window.Stimulsoft.Report.StiReport?Object.assign(window,t(window.Stimulsoft)):window.Stimulsoft.viewerFactory=t:window.Stimulsoft={viewerFactory:t}:module.exports=(e=require("./stimulsoft.dashboards"),Object.assign(e,t(e.Stimulsoft)))})(function(C){function i(e,t){for(var o in t)o in e?i(e[o],t[o]):e[o]=t[o];return e}C&&(C.__engineVersion&&"2025.3.3"!==C.__engineVersion?console.warn("Scripts versions mismatch: engine ver. = %s; viewer ver. = 2025.3.3",C.__engineVersion):"2025.3.3"!==C.__reportsVersion&&console.warn("Scripts versions mismatch: reports ver. = %s; viewer ver. = 2025.3.3",C.__reportsVersion));var C=i(C||{},{Viewer:{Helpers:{Dashboards:{}}}}),E={};function T(e,t){var o=this,i;if(this.defaultParameters=C.System.decompressLiteral("\bIQBa_€\bmz€€ހ"),this.options=e.options,this.options.isTouchDevice="Auto"==this.options.appearance.interfaceType?this.IsTouchDevice()&&this.IsMobileDevice():"Touch"==this.options.appearance.interfaceType||"Mobile"==this.options.appearance.interfaceType,this.options.isMobileDevice=!1!==this.options.appearance.allowMobileMode&&("Auto"==this.options.appearance.interfaceType&&0==this.options.reportDesignerMode?this.IsTouchDevice()&&this.IsMobileDevice():"Mobile"==this.options.appearance.interfaceType),this.options.menuAnimDuration=150,this.options.formAnimDuration=200,this.options.scrollDuration=350,this.options.menuHideDelay=250,this.options.server.timeoutAutoUpdateCache=18e4,this.options.toolbar.backgroundColor=this.getHTMLColor(this.options.toolbar.backgroundColor),this.options.toolbar.borderColor=this.getHTMLColor(this.options.toolbar.borderColor),this.options.toolbar.fontColor=this.getHTMLColor(this.options.toolbar.fontColor),this.options.appearance.pageBorderColor=this.getHTMLColor(this.options.appearance.pageBorderColor),this.options.exports.defaultSettings=e.defaultExportSettings,this.options.parametersValues={},this.options.parameterRowHeight=this.options.isTouchDevice?26:23,this.options.osWin11=this.checkWin11(),this.options.customThemeAccent=this.options.cloudMode?T.GetCookie("StimulsoftCustomThemeAccent"):this.options.customThemeAccentColor||this.options.appearance.customThemeAccentColor,this.options.viewerIsFocused=!0,this.proxy=document["proxy"+this.options.viewerId],this.proxy&&(this.proxy.jsObject=this),this.collections=C.System.decompressLiteral("\bIQBa_€\bmz€€ހ"),t&&(this.collections=t),e.loc&&this.collections.loc&&(this.collections.loc=e.loc),this.controls={},this.controls.forms={},this.controls.head=document.getElementsByTagName("head")[0],this.controls.viewer=document.getElementById(this.options.viewerId),this.controls.mainPanel=document.getElementById(this.options.viewerId+"_JsViewerMainPanel"),this.controls.findHelper={findLabels:[]},this.reportParams={type:"Auto",pageNumber:0,pagesCount:0,zoom:this.options.toolbar.zoom,viewMode:this.options.toolbar.viewMode,reportFileName:null,pagesArray:[],collapsingStates:null,bookmarksContent:null,editableParameters:null,drillDownGuid:null,dashboardDrillDownGuid:null,drillDownParameters:[]},this.service={},this.service.resizeTimer=null,this.service.refreshReportTimer=null,this.service.isRequestInProcess=!1,this.service.elementRefreshTimers={},this.options.actions.getReport||(this.options.actions.getReport=this.options.actions.viewerEvent),this.options.actions.printReport||(this.options.actions.printReport=this.options.actions.viewerEvent),this.options.actions.openReport||(this.options.actions.openReport=this.options.actions.viewerEvent),this.options.actions.exportReport||(this.options.actions.exportReport=this.options.actions.viewerEvent),this.options.actions.interaction||(this.options.actions.interaction=this.options.actions.viewerEvent),window.File&&window.FileReader&&window.FileList&&window.Blob||(this.options.toolbar.showOpenButton=!1),"Auto"==this.options.theme&&this.ApplyAutoTheme(),this.ApplyViewerBackColor(),(this.options.requestResourcesUrl||this.options.appearance.customStylesUrl)&&(i=this.options.appearance.customStylesUrl||this.GetResourceUrl("styles"),this.options.customThemeAccent&&(i+="&stiweb_customaccent="+this.options.customThemeAccent.replace("#","")),this.LoadStyle(i)),this.options.stimulsoftFontContent&&this.addCustomFontStyles([{contentForCss:this.options.stimulsoftFontContent,originalFontFamily:"Stimulsoft"}]),this.options.customOpenTypeFonts&&!o.options.reportDesignerMode&&this.addCustomFontStyles(this.options.customOpenTypeFonts),this.options.imagesScalingFactor=this.getImagesScalingFactor(),this.collections.images)this.InitializeViewerControls();else{var a={method:"GET",imagesScalingFactor:this.options.imagesScalingFactor,useCompression:this.options.server.useCompression,iconSet:this.options.appearance.iconSet},s=("StiCloudShareViewer"!=this.options.viewerId&&"StiCloudReportsShareViewer"!=this.options.viewerId||(a.sharingLocalization=T.GetCookie("sti_CloudLocalization")||this.getDefaultLocalization()),o.GetResourceUrl("images")),n;for(n in a)"method"!=n&&(s+="&stiweb_"+n.toLowerCase()+"="+a[n]);this.postAjax(s,a,function(e){e&&(o.options.server.useCompression&&(e=J.unpack(e)),(e=JSON.parse(e)).images&&(o.collections.images=e.images),e.localizationItems)&&(o.collections.loc=e.localizationItems),o.InitializeViewerControls(function(){o.options.reportDesignerMode||("complete"==document.readyState?o.postAction():o.addEvent(window,"load",function(){o.postAction()}))})})}}E.a=C.Viewer,E.b=E.a.Helpers,E.c=E.b.Dashboards,T.setImageSource=function(e,t,o,i,a,s){if(o.controlsWithImages||(o.controlsWithImages={}),s||(e.id||(e.id=T.prototype.newGuid()),o.controlsWithImages[e.id]={imageControl:e,imageName:i}),"IMG"==e.tagName)e.src=o.images[i];else if("image"==e.tagName)e.href.baseVal=o.images[i];else{if("DIV"!=e.tagName)throw"";e.style.backgroundImage="url("+o.images[i]+")"}},T.checkImageSource=function(e,t,o){return null!=t.images[o]},T.getImageSource=function(e,t,o){return t.images[o]},T.prototype.LoadStyle=function(e,t){if(t){for(var o=this.controls.head.childNodes,i=0;i<o.length;i++)if(o[i].tagName&&"link"==o[i].tagName.toLowerCase()&&"stimulsoft"==o[i].getAttribute("stimulsoft")&&"viewer"==o[i].getAttribute("component")){o[i].setAttribute("href",e);break}}else{var a=document.createElement(this.proxy?"style":"link");a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("stimulsoft","stimulsoft"),a.setAttribute("component","viewer"),this.proxy?this.proxy.getText(e).then(function(e){a.innerHTML=e}):a.setAttribute("href",e),this.controls.head.appendChild(a)}},T.prototype.GetResourceUrl=function(e){var t=this.getActionRequestUrl(this.options.requestResourcesUrl,this.options.actions.viewerEvent);return t=(t=(t=(t+=0<t.indexOf("?")?"&":"?")+("stiweb_component=Viewer&stiweb_action=Resource&stiweb_data="+e+"&stiweb_theme="+this.options.theme))+("&stiweb_cachemode="+(this.options.server.useCacheForResources?"ObjectSession"==this.options.server.cacheMode||"StringSession"==this.options.server.cacheMode?"session":"cache":"none")))+("&stiweb_version="+this.options.shortProductVersion)},T.prototype.InitializeViewerControls=function(e){var t=this;this.options.isMobileDevice?this.InitializeMobile():this.options.toolbar.showPinToolbarButton=!1,this.InitializeJsViewer(),this.InitializeDashboardsPanel(),this.InitializeToolBar(),this.options.toolbar.showFindButton&&this.InitializeFindPanel(),this.InitializeDrillDownPanel(),this.options.toolbar.showResourcesButton&&this.InitializeResourcesPanel(),this.InitializeDisabledPanels(),this.InitializeAboutPanel(),this.InitializeReportPanel(),this.InitializeProcessImage(),this.InitializeDatePicker(),this.InitializeToolTip(),"Separated"==this.options.toolbar.displayMode&&this.options.toolbar.visible&&this.InitializeNavigatePanel(),this.options.toolbar.showSaveButton&&this.options.toolbar.visible&&this.InitializeSaveMenu(),this.options.toolbar.showSendEmailButton&&this.options.toolbar.visible&&this.InitializeSendEmailMenu(),this.options.toolbar.showPrintButton&&this.options.toolbar.visible&&this.InitializePrintMenu(),this.options.toolbar.showZoomButton&&(this.options.toolbar.visible||"Separated"==this.options.toolbar.displayMode)&&this.InitializeZoomMenu(),this.options.toolbar.showViewModeButton&&this.options.toolbar.visible&&this.InitializeViewModeMenu(),(this.options.exports.showExportDialog||this.options.email.showExportDialog)&&this.InitializeExportForm(),this.options.toolbar.showSendEmailButton&&this.options.email.showEmailDialog&&this.options.toolbar.visible&&this.InitializeSendEmailForm(),this.addHoverEventsToMenus(),this.InitializeEvents(),this.options.reportDesignerMode||this.showTrLog(),this.options.serverMode&&this.InitializeFolderReportsPanel(),this.addEvent(document,"mouseup",function(e){t.DocumentMouseUp(e)}),this.addEvent(document,"mousemove",function(e){t.DocumentMouseMove(e)}),document.all&&!document.querySelector&&alert("Your web browser is not supported by our application. Please upgrade your browser!"),this.controls.viewer.style.top=0,this.controls.viewer.style.right=0,this.controls.viewer.style.bottom=0,this.controls.viewer.style.left=0,this.changeFullScreenMode(this.options.appearance.fullScreenMode),this.onready&&this.onready(),this.onreadyasync?this.onreadyasync(e):e&&e()},T.prototype.InitializeMobile=function(){for(var e=!1,t=this.controls.head.getElementsByTagName("meta"),o=0,i;o<t.length;o++)if(t[o].name&&"viewport"==t[o].name.toLowerCase()){e=!0;break}e||((i=document.createElement("meta")).id="viewport",i.name="viewport",i.content="initial-scale=1.0,width=device-width,user-scalable=0",i.setAttribute("stimulsoft","stimulsoft"),this.controls.head.appendChild(i)),this.options.appearance.fullScreenMode=!0,this.options.appearance.scrollbarsMode=!0,this.options.appearance.parametersPanelPosition="Left",this.options.appearance.parametersPanelColumnsCount=1,this.options.toolbar.displayMode="Separated",this.options.toolbar.viewMode="SinglePage",this.options.toolbar.showZoomButton=!1;var a=-2==this.options.toolbar.zoom?-2:-1;this.options.toolbar.zoom=this.reportParams.zoom=a,this.options.toolbar.showButtonCaptions=!1,this.options.toolbar.showOpenButton=!1,this.options.toolbar.showFindButton=!1,this.options.toolbar.showFullScreenButton=!1,this.options.toolbar.showAboutButton=!1,this.options.toolbar.showViewModeButton=!1,this.InitializeCenterText()},T.prototype.mergeOptions=function(e,t){for(var o in e)void 0===t[o]||"object"!=typeof t[o]?t[o]=e[o]:this.mergeOptions(e[o],t[o])},T.prototype.clearViewerState=function(e){this.reportParams.type="Auto",this.reportParams.pageNumber=0,this.reportParams.pagesCount=0,this.reportParams.pagesArray=[],this.reportParams.originalPageNumber=0,this.reportParams.drillDownGuid=null,this.reportParams.dashboardDrillDownGuid=null,this.reportParams.collapsingStates=null,this.reportParams.bookmarksContent=null,this.reportParams.editableParameters=null,this.reportParams.resources=null,this.reportParams.drillDownParameters=[],this.reportParams.elementName=null,this.reportParams.variablesValues=null,this.reportParams.tableOfContentsPointers=[],this.reportParams.isSignedReport=null,this.options.paramsVariables=null,this.options.multiFilterStates=null,this.options.tablesColumnsOrder={},this.options.isParametersReceived=!1,this.options.drillDownInProgress=!1,this.options.signatureInProgress=!1,this.options.paramsVariablesStartValues=null,this.options.isAutoHeight=null,this.options.isFullScreenHeight=null,this.options.displayModeFromReport=null,this.options.currentParameterWidth=null,this.options.currentParameterAlignment="Left",this.options.previewSettingsRepToolbarAlign=null,this.options.previewSettingsRepToolbarReverse=null,this.options.previewSettingsRepHorScrollBar=null,this.options.previewSettingsRepVertScrollBar=null,this.options.previewSettingsDbsToolbarAlign=null,this.options.previewSettingsDbsToolbarReverse=null,this.controls.mainPanel.style.background="",this.tableElementGridStates={},this.tableElementHiddenColumns={},this.tableElementGridPageNumbers={},this.framesCollection=[],this.signaturesCompleted={},this.currentOpeningData=null,this.removeDocToolTip(),clearTimeout(this.customTooltipTimer),clearTimeout(window._stiTooltipTimer),clearTimeout(window._stiTooltipTimer2),this.options.toolBarRebuilded&&(this.InitializeToolBar(),this.options.toolBarRebuilded=!1),this.options.dashboardsPanelRebuilded&&(this.InitializeDashboardsPanel(),this.options.dashboardsPanelRebuilded=!1),this.reportParams.prevPageNumber&&(this.reportParams.pageNumber=this.reportParams.prevPageNumber,delete this.reportParams.prevPageNumber),this.InitializeBookmarksPanel(),this.InitializeParametersPanel();var t=this.controls.dashboardsPanel,o;for(o in t&&(t.changeVisibleState(!1),t.dashboardsCount=0,t.reportsCount=0,t.clear()),this.controls.drillDownPanel&&this.controls.drillDownPanel.reset(),this.controls.findPanel&&this.controls.findPanel.changeVisibleState(!1),e&&(this.options.isParametersReceived=!1,this.options.isReportRecieved=!1),this.options.currentMenu&&this.options.currentMenu.changeVisibleState(!1),this.options.currentDatePicker&&this.options.currentDatePicker.changeVisibleState(!1),this.options.currentForm&&this.options.currentForm.visible&&"errorMessageForm"!=this.options.currentForm.name&&this.options.currentForm.changeVisibleState(!1),this.service.elementRefreshTimers)clearInterval(this.service.elementRefreshTimers[o])};var L={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){if("undefined"!=typeof unescape)e=unescape(encodeURIComponent(e));else{e=e.replace(/\r\n/g,"\n");for(var t="",o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?t+=String.fromCharCode(i):t=127<i&&i<2048?(t+=String.fromCharCode(i>>6|192))+String.fromCharCode(63&i|128):(t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128))+String.fromCharCode(63&i|128)}e=t}if(void 0!==window.btoa)return window.btoa(e);var a="",s,n,l,r,A,p,c,g=0;while(g<e.length)r=(s=e.charCodeAt(g++))>>2,A=(3&s)<<4|(n=e.charCodeAt(g++))>>4,p=(15&n)<<2|(l=e.charCodeAt(g++))>>6,c=63&l,isNaN(n)?p=c=64:isNaN(l)&&(c=64),a=a+this._keyStr.charAt(r)+this._keyStr.charAt(A)+this._keyStr.charAt(p)+this._keyStr.charAt(c);return a},decode:function(e){if(null==e)return"";var t="";if(void 0!==window.atob)t=window.atob(e);else{var o,i,a,s,n,l,r,A=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(A<e.length)s=this._keyStr.indexOf(e.charAt(A++)),i=(15&(n=this._keyStr.indexOf(e.charAt(A++))))<<4|(l=this._keyStr.indexOf(e.charAt(A++)))>>2,a=(3&l)<<6|(r=this._keyStr.indexOf(e.charAt(A++))),t+=String.fromCharCode(o=s<<2|n>>4),64!=l&&(t+=String.fromCharCode(i)),64!=r&&(t+=String.fromCharCode(a))}if("undefined"!=typeof escape)return decodeURIComponent(escape(t));var p="",A=0,c=0,g=0,h=0,d=0;while(A<t.length)(c=t.charCodeAt(A))<128?(p+=String.fromCharCode(c),A++):191<c&&c<224?(h=t.charCodeAt(A+1),p+=String.fromCharCode((31&c)<<6|63&h),A+=2):(h=t.charCodeAt(A+1),d=t.charCodeAt(A+2),p+=String.fromCharCode((15&c)<<12|(63&h)<<6|63&d),A+=3);return p}},J=(p=G=G||{},H=Z,V=q,N=_,O=$,X=ee,j=te,oe.bMax=16,oe.nMax=288,Y=oe,e.wSize=32768,e.storedBlock=0,e.staticTrees=1,e.dynamicTrees=2,e.defaultLevel=6,e.fullSearch=!0,e.lBits=9,e.dBits=6,e.inBufferSize=32768,e.inBufferExtra=64,e.outBufferSize=1024*8,e.windowSize=2*e.wSize,e.minMatch=3,e.maxMatch=258,e.bits=16,e.distBufferSize=e.litBufferSize=8192,e.hashMask=(e.hashSize=1<<(e.hashBits=13))-1,e.wMask=e.wSize-1,e.nil=0,e.tooFar=4096,e.maxDist=e.wSize-(e.minLookahead=e.maxMatch+e.minMatch+1),e.smallest=1,e.maxBits=15,e.maxBLBits=7,e.lengthCodes=29,e.literals=256,e.endBlock=256,e.lCodes=e.literals+1+e.lengthCodes,e.dCodes=30,e.blCodes=19,e.rep_3_6=16,e.repz_3_10=17,e.repz_11_138=18,e.heapSize=2*e.lCodes+1,e.hShift=parseInt(((e.hashBits+e.minMatch-1)/e.minMatch).toString()),e.bufferSize=16,e.maskBits=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],e.cplens=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],e.cplext=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],e.cpdist=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],e.cpdext=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],e.border=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e.extraLBits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],e.extraDBits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],e.extraBLBits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],e.blOrder=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e.configTable=[new N(0,0,0,0),new N(4,4,8,4),new N(4,5,16,8),new N(4,6,32,32),new N(4,4,16,16),new N(8,16,32,32),new N(8,16,128,128),new N(8,32,128,256),new N(32,128,258,1024),new N(32,258,258,4096)],d=e,o.deflate=function(e,t){if(null==e||void 0===e)return null;if(null==this._helper&&(this._helper=new o),"string"==typeof e)return this._helper.deflate(e.toUnicodeString().toBytesArray(),t);return this._helper.deflate(e,t)},o.inflate=function(e){return null==this._helper&&(this._helper=new o),this._helper.inflate(e)},o.prototype.deflateStart=function(e){var t;if(e?e<1?e=1:9<e&&(e=9):e=d.defaultLevel,this._compressLevel=e,this._initFlag=!1,this._eoFile=!1,null!=this._outBuffer)return;for(this._freeQueue=null,this._qHead=null,this._qTail=null,this._outBuffer=new Array(d.outBufferSize),this._window=new Array(d.windowSize),this._dBuffer=new Array(d.distBufferSize),this._lBuffer=new Array(d.inBufferSize+d.inBufferExtra),this._prev=new Array(1<<d.bits),this._dynamicLtree=new Array(d.heapSize),t=0;t<d.heapSize;t++)this._dynamicLtree[t]=new H;for(this._dynamicDtree=new Array(2*d.dCodes+1),t=0;t<2*d.dCodes+1;t++)this._dynamicDtree[t]=new H;for(this._staticLtree=new Array(d.lCodes+2),t=0;t<d.lCodes+2;t++)this._staticLtree[t]=new H;for(this._staticDtree=new Array(d.dCodes),t=0;t<d.dCodes;t++)this._staticDtree[t]=new H;for(this._blTree=new Array(2*d.blCodes+1),t=0;t<2*d.blCodes+1;t++)this._blTree[t]=new H;this._lDesc=new V,this._dDesc=new V,this._blDesc=new V,this._blCount=new Array(d.maxBits+1),this._heap=new Array(2*d.lCodes+1),this._depth=new Array(2*d.lCodes+1),this._lengthCode=new Array(d.maxMatch-d.minMatch+1),this._distCode=new Array(512),this._baseLength=new Array(d.lengthCodes),this._baseDist=new Array(d.dCodes),this._flagBuf=new Array(parseInt((d.litBufferSize/8).toString()))},o.prototype.deflateEnd=function(){this._freeQueue=null,this._qHead=null,this._qTail=null,this._outBuffer=null,this._window=null,this._dBuffer=null,this._lBuffer=null,this._prev=null,this._dynamicLtree=null,this._dynamicDtree=null,this._staticLtree=null,this._staticDtree=null,this._blTree=null,this._lDesc=null,this._dDesc=null,this._blDesc=null,this._blCount=null,this._heap=null,this._depth=null,this._lengthCode=null,this._distCode=null,this._baseLength=null,this._baseDist=null,this._flagBuf=null},o.prototype.reuseQueue=function(e){e.next=this._freeQueue,this._freeQueue=e},o.prototype.newQueue=function(){var e;return null!=this._freeQueue?(e=this._freeQueue,this._freeQueue=this._freeQueue.next):e=new O,e.next=null,e.length=0,e.offset=0,e},o.prototype.head1=function(e){return this._prev[d.wSize+e]},o.prototype.head2=function(e,t){return this._prev[d.wSize+e]=t},o.prototype.putByte=function(e){this._outBuffer[this._outOffset+this._outCount++]=e,this._outOffset+this._outCount==d.outBufferSize&&this.qOutBuffer()},o.prototype.putShort=function(e){e&=65535,this._outOffset+this._outCount<d.outBufferSize-2?(this._outBuffer[this._outOffset+this._outCount++]=255&e,this._outBuffer[this._outOffset+this._outCount++]=e>>>8):(this.putByte(255&e),this.putByte(e>>>8))},o.prototype.insertString=function(){this._insH=(this._insH<<d.hShift^255&this._window[this._strStart+d.minMatch-1])&d.hashMask,this._hashHead=this.head1(this._insH),this._prev[this._strStart&d.wMask]=this._hashHead,this.head2(this._insH,this._strStart)},o.prototype.sendCode=function(e,t){this.sendBits(t[e].fc,t[e].dl)},o.prototype.dCode=function(e){return 255&(e<256?this._distCode[e]:this._distCode[256+(e>>7)])},o.prototype.smaller=function(e,t,o){return e[t].fc<e[o].fc||e[t].fc==e[o].fc&&this._depth[t]<=this._depth[o]},o.prototype.readBuffer=function(e,t,o){for(var i,i=0;i<o&&this._deflatePos<this._deflateData.length;i++)e[t+i]=255&this._deflateData[this._deflatePos++];return i},o.prototype.lmInit=function(){for(var e,e=0;e<d.hashSize;e++)this._prev[d.wSize+e]=0;if(this._maxLazyMatch=d.configTable[this._compressLevel].maxLazy,this._goodMatch=d.configTable[this._compressLevel].goodLength,d.fullSearch||(this._niceMatch=d.configTable[this._compressLevel].niceLength),this._maxChainLength=d.configTable[this._compressLevel].maxChain,this._strStart=0,this._blockStart=0,this._lookahead=this.readBuffer(this._window,0,2*d.wSize),this._lookahead<=0)return this._eoFile=!0,void(this._lookahead=0);this._eoFile=!1;while(this._lookahead<d.minLookahead&&!this._eoFile)this.fillWindow();for(this._insH=0,e=0;e<d.minMatch-1;e++)this._insH=(this._insH<<d.hShift^255&this._window[e])&d.hashMask},o.prototype.longestMatch=function(e){var t=this._maxChainLength,o=this._strStart,i,a,s=this._prevLength,n=this._strStart>d.maxDist?this._strStart-d.maxDist:d.nil,l=this._strStart+d.maxMatch,r=this._window[o+s-1],A=this._window[o+s];this._prevLength>=this._goodMatch&&(t>>=2);do{if(i=e,this._window[i+s]!=A||this._window[i+s-1]!=r||this._window[i]!=this._window[o]||this._window[++i]!=this._window[o+1])continue;o+=2,i++;do{}while(this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&this._window[++o]==this._window[++i]&&o<l);if(a=d.maxMatch-(l-o),o=l-d.maxMatch,s<a){if(this._matchStart=e,s=a,d.fullSearch){if(a>=d.maxMatch)break}else if(a>=this._niceMatch)break;r=this._window[o+s-1],A=this._window[o+s]}}while((e=this._prev[e&d.wMask])>n&&0!=--t);return s},o.prototype.fillWindow=function(){var e,t,o=d.windowSize-this._lookahead-this._strStart;if(-1==o)o--;else if(this._strStart>=d.wSize+d.maxDist){for(e=0;e<d.wSize;e++)this._window[e]=this._window[e+d.wSize];for(this._matchStart-=d.wSize,this._strStart-=d.wSize,this._blockStart-=d.wSize,e=0;e<d.hashSize;e++)t=this.head1(e),this.head2(e,t>=d.wSize?t-d.wSize:d.nil);for(e=0;e<d.wSize;e++)t=this._prev[e],this._prev[e]=t>=d.wSize?t-d.wSize:d.nil;o+=d.wSize}this._eoFile||((e=this.readBuffer(this._window,this._strStart+this._lookahead,o))<=0?this._eoFile=!0:this._lookahead+=e)},o.prototype.deflateFast=function(){while(0!=this._lookahead&&null==this._qHead){var e=void 0;if(this.insertString(),this._hashHead!=d.nil&&this._strStart-this._hashHead<=d.maxDist&&(this._matchLength=this.longestMatch(this._hashHead),this._matchLength>this._lookahead)&&(this._matchLength=this._lookahead),this._matchLength>=d.minMatch)if(e=this.ctTally(this._strStart-this._matchStart,this._matchLength-d.minMatch),this._lookahead-=this._matchLength,this._matchLength<=this._maxLazyMatch){this._matchLength--;do{this._strStart++,this.insertString()}while(0!=--this._matchLength);this._strStart++}else this._strStart+=this._matchLength,this._matchLength=0,this._insH=255&this._window[this._strStart],this._insH=(this._insH<<d.hShift^255&this._window[this._strStart+1])&d.hashMask;else e=this.ctTally(0,255&this._window[this._strStart]),this._lookahead--,this._strStart++;e&&(this.flushBlock(0),this._blockStart=this._strStart);while(this._lookahead<d.minLookahead&&!this._eoFile)this.fillWindow()}},o.prototype.deflateBetter=function(){while(0!=this._lookahead&&null==this._qHead){if(this.insertString(),this._prevLength=this._matchLength,this._prevMatch=this._matchStart,this._matchLength=d.minMatch-1,this._hashHead!=d.nil&&this._prevLength<this._maxLazyMatch&&this._strStart-this._hashHead<=d.maxDist&&(this._matchLength=this.longestMatch(this._hashHead),this._matchLength>this._lookahead&&(this._matchLength=this._lookahead),this._matchLength==d.minMatch)&&this._strStart-this._matchStart>d.tooFar&&this._matchLength--,this._prevLength>=d.minMatch&&this._matchLength<=this._prevLength){var e=this.ctTally(this._strStart-1-this._prevMatch,this._prevLength-d.minMatch);this._lookahead-=this._prevLength-1,this._prevLength-=2;do{this._strStart++,this.insertString()}while(0!=--this._prevLength);this._matchAvailable=0,this._matchLength=d.minMatch-1,this._strStart++,e&&(this.flushBlock(0),this._blockStart=this._strStart)}else 0!=this._matchAvailable?this.ctTally(0,255&this._window[this._strStart-1])&&(this.flushBlock(0),this._blockStart=this._strStart):this._matchAvailable=1,this._strStart++,this._lookahead--;while(this._lookahead<d.minLookahead&&!this._eoFile)this.fillWindow()}},o.prototype.initDeflate=function(){if(this._eoFile)return;this._biBuffer=0,this._biValid=0,this.ctInit(),this.lmInit(),this._qHead=null,this._outCount=0,this._outOffset=0,this._matchAvailable=0,this._compressLevel<=3?(this._prevLength=d.minMatch-1,this._matchLength=0):(this._matchLength=d.minMatch-1,this._matchAvailable=0,this._matchAvailable=0),this._complete=!1},o.prototype.deflateInternal=function(e,t,o){var i;if(!this._initFlag&&(this.initDeflate(),this._initFlag=!0,0==this._lookahead))return this._complete=!0,0;if((i=this.qCopy(e,t,o))==o)return o;if(this._complete)return i;return this._compressLevel<=3?this.deflateFast():this.deflateBetter(),0==this._lookahead&&(0!=this._matchAvailable&&this.ctTally(0,255&this._window[this._strStart-1]),this.flushBlock(1),this._complete=!0),i+this.qCopy(e,i+t,o-i)},o.prototype.qCopy=function(e,t,o){var i=0,a,s,n;while(null!=this._qHead&&i<o){for((a=o-i)>this._qHead.length&&(a=this._qHead.length),s=0;s<a;s++)e[t+i+s]=this._qHead.ptr[this._qHead.offset+s];this._qHead.offset+=a,this._qHead.length-=a,i+=a,0==this._qHead.length&&(n=this._qHead,this._qHead=this._qHead.next,this.reuseQueue(n))}if(i==o)return i;if(this._outOffset<this._outCount){for((a=o-i)>this._outCount-this._outOffset&&(a=this._outCount-this._outOffset),s=0;s<a;s++)e[t+i+s]=this._outBuffer[this._outOffset+s];this._outOffset+=a,i+=a,this._outCount==this._outOffset&&(this._outCount=this._outOffset=0)}return i},o.prototype.ctInit=function(){var e,t;if(0!=this._staticDtree[0].dl)return;this._lDesc.dynamicTree=this._dynamicLtree,this._lDesc.staticTree=this._staticLtree,this._lDesc.extraBits=d.extraLBits,this._lDesc.extraBase=d.literals+1,this._lDesc.elements=d.lCodes,this._lDesc.maxLength=d.maxBits,this._lDesc.maxCode=0,this._dDesc.dynamicTree=this._dynamicDtree,this._dDesc.staticTree=this._staticDtree,this._dDesc.extraBits=d.extraDBits,this._dDesc.extraBase=0,this._dDesc.elements=d.dCodes,this._dDesc.maxLength=d.maxBits,this._dDesc.maxCode=0,this._blDesc.dynamicTree=this._blTree,this._blDesc.staticTree=null,this._blDesc.extraBits=d.extraBLBits,this._blDesc.extraBase=0,this._blDesc.elements=d.blCodes,this._blDesc.maxLength=d.maxBLBits,this._blDesc.maxCode=0;for(var o=0,t=0;t<d.lengthCodes-1;t++)for(this._baseLength[t]=o,e=0;e<1<<d.extraLBits[t];e++)this._lengthCode[o++]=t;this._lengthCode[o-1]=t;var i=0;for(t=0;t<16;t++)for(this._baseDist[t]=i,e=0;e<1<<d.extraDBits[t];e++)this._distCode[i++]=t;for(i>>=7;t<d.dCodes;t++)for(this._baseDist[t]=i<<7,e=0;e<1<<d.extraDBits[t]-7;e++)this._distCode[256+i++]=t;for(var a=0;a<=d.maxBits;a++)this._blCount[a]=0;e=0;while(e<=143)this._staticLtree[e++].dl=8,this._blCount[8]++;while(e<=255)this._staticLtree[e++].dl=9,this._blCount[9]++;while(e<=279)this._staticLtree[e++].dl=7,this._blCount[7]++;while(e<=287)this._staticLtree[e++].dl=8,this._blCount[8]++;for(this.genCodes(this._staticLtree,d.lCodes+1),e=0;e<d.dCodes;e++)this._staticDtree[e].dl=5,this._staticDtree[e].fc=this.biReverse(e,5);this.initBlock()},o.prototype.initBlock=function(){for(var e,e=0;e<d.lCodes;e++)this._dynamicLtree[e].fc=0;for(e=0;e<d.dCodes;e++)this._dynamicDtree[e].fc=0;for(e=0;e<d.blCodes;e++)this._blTree[e].fc=0;this._dynamicLtree[d.endBlock].fc=1,this._optLen=this._staticLen=0,this._lastLit=this._lastDist=this._lastFlags=0,this._flags=0,this._flagBit=1},o.prototype.pqDownHeap=function(e,t){var o=this._heap[t],i=t<<1;while(i<=this._heapLen){if(i<this._heapLen&&this.smaller(e,this._heap[i+1],this._heap[i])&&i++,this.smaller(e,o,this._heap[i]))break;this._heap[t]=this._heap[i],t=i,i<<=1}this._heap[t]=o},o.prototype.genBitLength=function(e){for(var t=e.dynamicTree,o=e.extraBits,i=e.extraBase,a=e.maxCode,s=e.maxLength,n=e.staticTree,l,r,A,p,c,g,h=0,p=0;p<=d.maxBits;p++)this._blCount[p]=0;for(t[this._heap[this._heapMax]].dl=0,l=this._heapMax+1;l<d.heapSize;l++){if(s<(p=t[t[r=this._heap[l]].dl].dl+1)&&(p=s,h++),t[r].dl=p,a<r)continue;this._blCount[p]++,c=0,i<=r&&(c=o[r-i]),g=t[r].fc,this._optLen+=g*(p+c),null!=n&&(this._staticLen+=g*(n[r].dl+c))}if(0==h)return;do{p=s-1;while(0==this._blCount[p])p--;this._blCount[p]--,this._blCount[p+1]+=2,this._blCount[s]--,h-=2}while(0<h);for(p=s;0!=p;p--){r=this._blCount[p];while(0!=r){if(a<(A=this._heap[--l]))continue;t[A].dl!=p&&(this._optLen+=(p-t[A].dl)*t[A].fc,t[A].fc=p),r--}}},o.prototype.genCodes=function(e,t){for(var o=new Array(d.maxBits+1),i=0,a=1;a<=d.maxBits;a++)i=i+this._blCount[a-1]<<1,o[a]=i;for(var s=0;s<=t;s++){var n=e[s].dl;if(0==n)continue;e[s].fc=this.biReverse(o[n]++,n)}},o.prototype.buildTree=function(e){var t=e.dynamicTree,o=e.staticTree,i=e.elements,a,s,n=-1,l=i;for(this._heapLen=0,this._heapMax=d.heapSize,a=0;a<i;a++)0!=t[a].fc?(this._heap[++this._heapLen]=n=a,this._depth[a]=0):t[a].dl=0;while(this._heapLen<2){var r=this._heap[++this._heapLen]=n<2?++n:0;t[r].fc=1,this._depth[r]=0,this._optLen--,null!=o&&(this._staticLen-=o[r].dl)}for(e.maxCode=n,a=this._heapLen>>1;1<=a;a--)this.pqDownHeap(t,a);do{a=this._heap[d.smallest],this._heap[d.smallest]=this._heap[this._heapLen--],this.pqDownHeap(t,d.smallest),s=this._heap[d.smallest],this._heap[--this._heapMax]=a,this._heap[--this._heapMax]=s,t[l].fc=t[a].fc+t[s].fc,this._depth[a]>this._depth[s]+1?this._depth[l]=this._depth[a]:this._depth[l]=this._depth[s]+1,t[a].dl=t[s].dl=l,this._heap[d.smallest]=l++,this.pqDownHeap(t,d.smallest)}while(2<=this._heapLen);this._heap[--this._heapMax]=this._heap[d.smallest],this.genBitLength(e),this.genCodes(t,n)},o.prototype.scanTree=function(e,t){var o=-1,i,a=e[0].dl,s=0,n=4,l=7;0==a&&(n=3,l=138),e[t+1].dl=65535;for(var r=0;r<=t;r++){if(i=a,a=e[r+1].dl,++s<l&&i==a)continue;s<n?this._blTree[i].fc+=s:0!=i?(i!=o&&this._blTree[i].fc++,this._blTree[d.rep_3_6].fc++):s<=10?this._blTree[d.repz_3_10].fc++:this._blTree[d.repz_11_138].fc++,o=i,l=(s=0)==a?(n=3,138):i==a?(n=3,6):(n=4,7)}},o.prototype.sendTree=function(e,t){var o=-1,i,a=e[0].dl,s=0,n=4,l=7;0==a&&(n=3,l=138);for(var r=0;r<=t;r++){if(i=a,a=e[r+1].dl,++s<l&&i==a)continue;if(s<n)do{this.sendCode(i,this._blTree)}while(0!=--s);else 0!=i?(i!=o&&(this.sendCode(i,this._blTree),s--),this.sendCode(d.rep_3_6,this._blTree),this.sendBits(s-3,2)):s<=10?(this.sendCode(d.repz_3_10,this._blTree),this.sendBits(s-3,3)):(this.sendCode(d.repz_11_138,this._blTree),this.sendBits(s-11,7));o=i,l=(s=0)==a?(n=3,138):i==a?(n=3,6):(n=4,7)}},o.prototype.buildBlTree=function(){var e;for(this.scanTree(this._dynamicLtree,this._lDesc.maxCode),this.scanTree(this._dynamicDtree,this._dDesc.maxCode),this.buildTree(this._blDesc),e=d.blCodes-1;3<=e;e--)if(0!=this._blTree[d.blOrder[e]].dl)break;return this._optLen+=3*(e+1)+5+5+4,e},o.prototype.sendAllTrees=function(e,t,o){this.sendBits(e-257,5),this.sendBits(t-1,5),this.sendBits(o-4,4);for(var i=0;i<o;i++)this.sendBits(this._blTree[d.blOrder[i]].dl,3);this.sendTree(this._dynamicLtree,e-1),this.sendTree(this._dynamicDtree,t-1)},o.prototype.flushBlock=function(e){var t=this._strStart-this._blockStart,o=(this._flagBuf[this._lastFlags]=this._flags,this.buildTree(this._lDesc),this.buildTree(this._dDesc),this.buildBlTree()),i=this._optLen+3+7>>3,a=this._staticLen+3+7>>3;if(t+4<=(i=a<=i?a:i)&&0<=this._blockStart){this.sendBits((d.storedBlock<<1)+e,3),this.biWindup(),this.putShort(t),this.putShort(~t);for(var s=0;s<t;s++)this.putByte(this._window[this._blockStart+s])}else a==i?(this.sendBits((d.staticTrees<<1)+e,3),this.compressBlock(this._staticLtree,this._staticDtree)):(this.sendBits((d.dynamicTrees<<1)+e,3),this.sendAllTrees(this._lDesc.maxCode+1,this._dDesc.maxCode+1,o+1),this.compressBlock(this._dynamicLtree,this._dynamicDtree));this.initBlock(),0!=e&&this.biWindup()},o.prototype.ctTally=function(e,t){if(this._lBuffer[this._lastLit++]=t,0==e?this._dynamicLtree[t].fc++:(e--,this._dynamicLtree[this._lengthCode[t]+d.literals+1].fc++,this._dynamicDtree[this.dCode(e)].fc++,this._dBuffer[this._lastDist++]=e,this._flags|=this._flagBit),this._flagBit<<=1,0==(7&this._lastLit)&&(this._flagBuf[this._lastFlags++]=this._flags,this._flags=0,this._flagBit=1),2<this._compressLevel&&0==(4095&this._lastLit)){for(var o=8*this._lastLit,i=this._strStart-this._blockStart,a=0;a<d.dCodes;a++)o+=this._dynamicDtree[a].fc*(5+d.extraDBits[a]);if(o>>=3,this._lastDist<parseInt((this._lastLit/2).toString())&&o<parseInt((i/2).toString()))return!0}return this._lastLit==d.litBufferSize-1||this._lastDist==d.distBufferSize},o.prototype.compressBlock=function(e,t){var o=0,i=0,a=0,s=0,n,l,r,A;if(0!=this._lastLit)do{0==(7&o)&&(s=this._flagBuf[a++]),n=255&this._lBuffer[o++],0==(1&s)?this.sendCode(n,e):(l=this._lengthCode[n],this.sendCode(l+d.literals+1,e),0!=(r=d.extraLBits[l])&&(n-=this._baseLength[l],this.sendBits(n,r)),A=this._dBuffer[i++],l=this.dCode(A),this.sendCode(l,t),0!=(r=d.extraDBits[l])&&(A-=this._baseDist[l],this.sendBits(A,r))),s>>=1}while(o<this._lastLit);this.sendCode(d.endBlock,e)},o.prototype.sendBits=function(e,t){this._biValid>d.bufferSize-t?(this._biBuffer|=e<<this._biValid,this.putShort(this._biBuffer),this._biBuffer=e>>d.bufferSize-this._biValid,this._biValid+=t-d.bufferSize):(this._biBuffer|=e<<this._biValid,this._biValid+=t)},o.prototype.biReverse=function(e,t){var o=0;do{o|=1&e,e>>=1,o<<=1}while(0<--t);return o>>1},o.prototype.biWindup=function(){8<this._biValid?this.putShort(this._biBuffer):0<this._biValid&&this.putByte(this._biBuffer),this._biBuffer=0,this._biValid=0},o.prototype.qOutBuffer=function(){if(0!=this._outCount){var e=this.newQueue();null==this._qHead?this._qHead=this._qTail=e:this._qTail=this._qTail.next=e,e.length=this._outCount-this._outOffset;for(var t=0;t<e.length;t++)e.ptr[t]=this._outBuffer[this._outOffset+t];this._outCount=this._outOffset=0}},o.prototype.deflate=function(e,t){var o,i=(void 0===t&&(t=d.defaultLevel),this._deflateData=e,this._deflatePos=0,this.deflateStart(t),new Array(1024)),a=[];while(0<(o=this.deflateInternal(i,0,i.length)))for(var s=0;s<o;s++)a[a.length]=i[s];return this._deflateData=null,a},o.prototype.getByte=function(){if(this._inflateData.length==this._inflatePos)return-1;return 255&this._inflateData[this._inflatePos++]},o.prototype.needBits=function(e){while(this._bitLength<e)this._bitBuffer|=this.getByte()<<this._bitLength,this._bitLength+=8},o.prototype.getBits=function(e){return this._bitBuffer&d.maskBits[e]},o.prototype.dumpBits=function(e){this._bitBuffer>>=e,this._bitLength-=e},o.prototype.inflateCodes=function(e,t,o){var i,a,s=0;if(0==o)return 0;for(;;){this.needBits(this._bl),i=(a=this._tl.list[this.getBits(this._bl)]).e;while(16<i){if(99==i)return-1;this.dumpBits(a.b),i-=16,this.needBits(i),i=(a=a.t[this.getBits(i)]).e}if(this.dumpBits(a.b),16==i){if(this._wp&=d.wSize-1,e[t+s++]=this._slide[this._wp++]=a.n,s==o)return o;continue}if(15==i)break;this.needBits(i),this._copyLength=a.n+this.getBits(i),this.dumpBits(i),this.needBits(this._bd),i=(a=this._td.list[this.getBits(this._bd)]).e;while(16<i){if(99==i)return-1;this.dumpBits(a.b),i-=16,this.needBits(i),i=(a=a.t[this.getBits(i)]).e}this.dumpBits(a.b),this.needBits(i),this._copyDist=this._wp-a.n-this.getBits(i),this.dumpBits(i);while(0<this._copyLength&&s<o)this._copyLength--,this._copyDist&=d.wSize-1,this._wp&=d.wSize-1,e[t+s++]=this._slide[this._wp++]=this._slide[this._copyDist++];if(s==o)return o}return this._method=-1,s},o.prototype.inflateStored=function(e,t,o){var i=7&this._bitLength;if(this.dumpBits(i),this.needBits(16),i=this.getBits(16),this.dumpBits(16),this.needBits(16),i!=(65535&~this._bitBuffer))return-1;this.dumpBits(16),this._copyLength=i,i=0;while(0<this._copyLength&&i<o)this._copyLength--,this._wp&=d.wSize-1,this.needBits(8),e[t+i++]=this._slide[this._wp++]=this.getBits(8),this.dumpBits(8);return 0==this._copyLength&&(this._method=-1),i},o.prototype.inflateFixed=function(e,t,o){if(null==this._fixedTL){for(var i=void 0,a=new Array(288),i=0;i<144;i++)a[i]=8;for(;i<256;i++)a[i]=9;for(;i<280;i++)a[i]=7;for(;i<288;i++)a[i]=8;this._fixedBL=7;var s=new Y(a,288,257,d.cplens,d.cplext,this._fixedBL);if(0!=s.status)throw"Error: "+s.status;for(this._fixedTL=s.root,this._fixedBL=s.m,i=0;i<30;i++)a[i]=5;if(this._fixedBD=5,1<(s=new Y(a,30,0,d.cpdist,d.cpdext,this._fixedBD)).status)throw this._fixedTL=null,"Error: "+s.status;this._fixedTD=s.root,this._fixedBD=s.m}return this._tl=this._fixedTL,this._td=this._fixedTD,this._bl=this._fixedBL,this._bd=this._fixedBD,this.inflateCodes(e,t,o)},o.prototype.inflateDynamic=function(e,t,o){for(var i,a,s=new Array(286+30),i=0;i<s.length;i++)s[i]=0;this.needBits(5);var n=257+this.getBits(5),l=(this.dumpBits(5),this.needBits(5),1+this.getBits(5)),r=(this.dumpBits(5),this.needBits(4),4+this.getBits(4));if(this.dumpBits(4),286<n||30<l)return-1;for(a=0;a<r;a++)this.needBits(3),s[d.border[a]]=this.getBits(3),this.dumpBits(3);for(;a<19;a++)s[d.border[a]]=0;this._bl=7;var A=new Y(s,19,19,null,null,this._bl);if(0!=A.status)return-1;this._tl=A.root,this._bl=A.m;var p=n+l,c=i=0,g;while(i<p)if(this.needBits(this._bl),a=(g=this._tl.list[this.getBits(this._bl)]).b,this.dumpBits(a),(a=g.n)<16)s[i++]=c=a;else if(16==a){if(this.needBits(2),a=3+this.getBits(2),this.dumpBits(2),p<i+a)return-1;while(0<a--)s[i++]=c}else{if(17==a){if(this.needBits(3),a=3+this.getBits(3),this.dumpBits(3),p<i+a)return-1}else if(this.needBits(7),a=11+this.getBits(7),this.dumpBits(7),p<i+a)return-1;while(0<a--)s[i++]=0;c=0}if(this._bl=d.lBits,A=new Y(s,n,257,d.cplens,d.cplext,this._bl),0==this._bl&&(A.status=1),0!=A.status)return-1;for(this._tl=A.root,this._bl=A.m,i=0;i<l;i++)s[i]=s[i+n];if(this._bd=d.dBits,A=new Y(s,l,0,d.cpdist,d.cpdext,this._bd),this._td=A.root,this._bd=A.m,0==this._bd&&257<n)return-1;if(0!=A.status)return-1;return this.inflateCodes(e,t,o)},o.prototype.inflateStart=function(){null==this._slide&&(this._slide=new Array(2*d.wSize)),this._wp=0,this._bitBuffer=0,this._bitLength=0,this._method=-1,this._eof=!1,this._copyLength=0,this._copyDist=0,this._tl=null},o.prototype.inflateInternal=function(e,t,o){var i=0;while(i<o){if(this._eof&&-1==this._method)return i;if(0<this._copyLength){if(this._method!=d.storedBlock)while(0<this._copyLength&&i<o)this._copyLength--,this._copyDist&=d.wSize-1,this._wp&=d.wSize-1,e[t+i++]=this._slide[this._wp++]=this._slide[this._copyDist++];else{while(0<this._copyLength&&i<o)this._copyLength--,this._wp&=d.wSize-1,this.needBits(8),e[t+i++]=this._slide[this._wp++]=this.getBits(8),this.dumpBits(8);0==this._copyLength&&(this._method=-1)}if(i==o)return i}if(-1==this._method){if(this._eof)break;this.needBits(1),0!=this.getBits(1)&&(this._eof=!0),this.dumpBits(1),this.needBits(2),this._method=this.getBits(2),this.dumpBits(2),this._tl=null,this._copyLength=0}var a=void 0;switch(this._method){case 0:a=this.inflateStored(e,t+i,o-i);break;case 1:a=null!=this._tl?this.inflateCodes(e,t+i,o-i):this.inflateFixed(e,t+i,o-i);break;case 2:a=null!=this._tl?this.inflateCodes(e,t+i,o-i):this.inflateDynamic(e,t+i,o-i);break;default:a=-1;break}if(-1==a){if(this._eof)return 0;return-1}i+=a}return i},o.prototype.inflate=function(e){var t,o,i=(this._inflateData=e,this._inflatePos=0,this.inflateStart(),new Array(1024)),a=[];while(0<(t=this.inflateInternal(i,0,i.length)))for(o=0;o<t;o++)a[a.length]=i[o];return this._inflateData=null,a},p.Helper=o,(W=z=z||{})[W["FText"]=1]="FText",W[W["FHcrc"]=2]="FHcrc",W[W["FExtra"]=4]="FExtra",W[W["FName"]=8]="FName",W[W["FComment"]=16]="FComment",Object.defineProperty(h,"crcTable",{get:function(){if(null==this._crcTable){this._crcTable=new Array(256);for(var e=void 0,t=0;t<256;t++){for(var e=t,o=0;o<8;o++)e=0!=(1&e)?3988292384^e>>>1:e>>>1;this._crcTable[t]=e}}return this._crcTable},enumerable:!0,configurable:!0}),h.crc32=function(e){for(var t=0^-1,o=0;o<e.length;o++)t=t>>>8^this.crcTable[255&(t^e[o])];return(-1^t)>>>0},h.putByte=function(e,t){t.push(255&e)},h.putShort=function(e,t){t.push(255&e),t.push(e>>>8)},h.putLong=function(e,t){h.putShort(65535&e,t),h.putShort(e>>>16,t)},h.putString=function(e,t){for(var o=0;o<e.length;o+=1)h.putByte(e.charCodeAt(o),t)},h.readByte=function(e){return e.shift()},h.readShort=function(e){return e.shift()|e.shift()<<8},h.readLong=function(e){var t=h.readShort(e),o=h.readShort(e);if(32768<o)return((o-=32768)<<16|t)+32768*Math.pow(2,16);return o<<16|t},h.readString=function(e){var t=[];while(0!==e[0])t.push(String.fromCharCode(e.shift()));return e.shift(),t.join("")},h.readBytes=function(e,t){for(var o=[],i=0;i<t;i+=1)o.push(e.shift());return o},h.pack=function(e,t){if(null==e||void 0===e)return null;var o=0,i=[],a=e,s=("string"==typeof e&&(a=Array.prototype.map.call(unescape(encodeURIComponent(e)),function(e){return e.charCodeAt(0)})),h.putByte(h.ID1,i),h.putByte(h.ID2,i),h.putByte(h.DefaultMethod,i),void 0!==t&&null!=t&&""!=t&&(o|=z.FName),h.putByte(o,i),h.putLong(parseInt((Date.now()/1e3).toString(),10),i),h.putByte(1==h.DefaultLevel?4:9==h.DefaultLevel?2:0,i),-1!=navigator.appVersion.indexOf("Win")?h.putByte(11,i):h.putByte(3,i),void 0!==t&&null!=t&&""!=t&&(h.putString(t.substring(t.lastIndexOf("/")+1),i),h.putByte(0,i)),G.Helper.deflate(a,h.DefaultLevel).forEach(function(e){h.putByte(e,i)}),h.putLong(h.crc32(a),i),h.putLong(a.length,i),new Uint8Array(i));e="";for(var n=0;n<s.byteLength;n++)e+=String.fromCharCode(s[n]);return window.btoa(e)},h.unpack=function(e){var t=e,o,t,i=("string"==typeof e&&(o=window&&window.atob?window.atob(e.split("\r\n").join("\n").split("\n").join("")):L.decode(e),t=Array.prototype.map.call(o,function(e){return e.charCodeAt(0)})),h.readByte(t)!==h.ID1||h.readByte(t)!==h.ID2?alert("The stream is not a GZip file"):8!==h.readByte(t)&&alert("Unsupported GZip compression method"),h.readByte(t)),a=h.readLong(t),s=h.readByte(t),n=h.readByte(t),l,r=(i&z.FExtra&&(l=h.readShort(t),h.readBytes(t,l)),i&z.FName&&h.readString(t),i&z.FComment&&h.readString(t),i&z.FHcrc&&h.readShort(t),G.Helper.inflate(t.splice(0,t.length-8)));if(h.readLong(t)!==h.crc32(r)&&alert("GZip checksum does not match"),h.readLong(t)!==r.length&&alert("Size of GZip decompressed file not correct"),Array.isArray(e))return r;for(var A="",p=0,c=r;p<c.length;p++){var g=c[p];A+=String.fromCharCode(g)}return decodeURIComponent(escape(A))},h.DefaultLevel=6,h.DefaultMethod=8,h.ID1=31,h.ID2=139,h._crcTable=null,h),G,p,H,V,N,O,X,j,Y,d,K,z,W;function h(){}function Z(){this.fc=0,this.dl=0}function q(){this.dynamicTree=null,this.staticTree=null,this.extraBits=null,this.extraBase=0,this.elements=0,this.maxLength=0,this.maxCode=0}function _(e,t,o,i){this.goodLength=e,this.maxLazy=t,this.niceLength=o,this.maxChain=i}function $(){this.next=null,this.length=0,this.ptr=new Array(d.outBufferSize),this.offset=0}function ee(){this.next=null,this.list=null}function te(){this.e=0,this.b=0,this.n=0,this.t=null}function oe(e,t,o,i,a,s){var n,l,r,A,p=(this.status=0,this.root=null,this.m=0,new Array(oe.bMax+1)),c=new Array(oe.bMax+1),g,h=new j,d=new Array(oe.bMax),u=new Array(oe.nMax),m=new Array(oe.bMax+1),b=null;for(this.root=null,n=0;n<p.length;n++)p[n]=0;for(n=0;n<c.length;n++)c[n]=0;for(n=0;n<d.length;n++)d[n]=null;for(n=0;n<u.length;n++)u[n]=0;for(n=0;n<m.length;n++)m[n]=0;var f=256<t?e[256]:oe.bMax,w=e,C=0,n=t;do{p[w[C]]++,C++}while(0<--n);if(p[0]==t)return this.root=null,this.m=0,void(this.status=0);for(l=1;l<=oe.bMax;l++)if(0!=p[l])break;var B=l;for(s<l&&(s=l),n=oe.bMax;0!=n;n--)if(0!=p[n])break;var y=n;for(n<s&&(s=n),r=1<<l;l<n;l++,r<<=1)if((r-=p[l])<0)return this.status=2,void(this.m=s);if((r-=p[n])<0)return this.status=2,void(this.m=s);p[n]+=r,m[1]=l=0;var w=p,C=1,E=2;while(0<--n)m[E++]=l+=w[C++];w=e,n=C=0;do{0!=(l=w[C++])&&(u[m[l]++]=n)}while(++n<t);t=m[y],m[0]=n=0,w=u;for(var v=-1,S=c[C=0]=0,k=0,D,R,g=null;B<=y;B++){D=p[B];while(0<D--){while(B>S+c[1+v]){if(S+=c[1+v],v++,k=(k=y-S)>s?s:k,(R=1<<(l=B-S))>D+1){R-=D+1,E=B;while(++l<k){if((R<<=1)<=p[++E])break;R-=p[E]}}for(k=1<<(l=f<S+l&&S<f?f-S:l),c[1+v]=l,g=new Array(k),A=0;A<k;A++)g[A]=new j;(b=null==b?this.root=new X:b.next=new X).next=null,b.list=g,d[v]=g,0<v&&(m[v]=n,h.b=c[v],h.e=16+l,h.t=g,l=(n&(1<<S)-1)>>S-c[v],d[v-1][l].e=h.e,d[v-1][l].b=h.b,d[v-1][l].n=h.n,d[v-1][l].t=h.t)}for(h.b=B-S,t<=C?h.e=99:w[C]<o?(h.e=w[C]<256?16:15,h.n=w[C++]):(h.e=a[w[C]-o],h.n=i[w[C++]-o]),R=1<<B-S,l=n>>S;l<k;l+=R)g[l].e=h.e,g[l].b=h.b,g[l].n=h.n,g[l].t=h.t;for(l=1<<B-1;0!=(n&l);l>>=1)n^=l;n^=l;while((n&(1<<S)-1)!=m[v])S-=c[v],v--}}this.m=c[1],this.status=0!=r&&1!=y?1:0}function e(){}function o(){this._outBuffer=null,this._fixedTL=null}var ie=0,ae;function se(e){return pe(re(ce(e)))}function ne(e,t){pe(Ae(ce(e),ce(t)))}function le(){se("abc").toLowerCase()}function re(e){return he(de(ge(e),8*e.length))}function Ae(e,t){for(var o=ge(e),i=(16<o.length&&(o=de(o,8*e.length)),Array(16)),a=Array(16),s=0;s<16;s++)i[s]=909522486^o[s],a[s]=1549556828^o[s];var n=de(i.concat(ge(t)),512+8*t.length);return he(de(a.concat(n),512+128))}function pe(e){try{}catch(e){ie=0}for(var t=ie?"0123456789ABCDEF":"0123456789abcdef",o="",i,a=0;a<e.length;a++)i=e.charCodeAt(a),o+=t.charAt(i>>>4&15)+t.charAt(15&i);return o}function ce(e){var t="",o=-1,i,a;while(++o<e.length)i=e.charCodeAt(o),a=o+1<e.length?e.charCodeAt(o+1):0,55296<=i&&i<=56319&&56320<=a&&a<=57343&&(i=65536+((1023&i)<<10)+(1023&a),o++),i<=127?t+=String.fromCharCode(i):i<=2047?t+=String.fromCharCode(192|i>>>6&31,128|63&i):i<=65535?t+=String.fromCharCode(224|i>>>12&15,128|i>>>6&63,128|63&i):i<=2097151&&(t+=String.fromCharCode(240|i>>>18&7,128|i>>>12&63,128|i>>>6&63,128|63&i));return t}function ge(e){for(var t=Array(e.length>>2),o=0;o<t.length;o++)t[o]=0;for(var o=0;o<8*e.length;o+=8)t[o>>5]|=(255&e.charCodeAt(o/8))<<o%32;return t}function he(e){for(var t="",o=0;o<32*e.length;o+=8)t+=String.fromCharCode(e[o>>5]>>>o%32&255);return t}function de(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var o=1732584193,i=-271733879,a=-1732584194,s=271733878,n=0;n<e.length;n+=16){var l=o,r=i,A=a,p=s,o=c(o,i,a,s,e[n+0],7,-680876936),s=c(s,o,i,a,e[n+1],12,-389564586),a=c(a,s,o,i,e[n+2],17,606105819),i=c(i,a,s,o,e[n+3],22,-1044525330);o=c(o,i,a,s,e[n+4],7,-176418897),s=c(s,o,i,a,e[n+5],12,1200080426),a=c(a,s,o,i,e[n+6],17,-1473231341),i=c(i,a,s,o,e[n+7],22,-45705983),o=c(o,i,a,s,e[n+8],7,1770035416),s=c(s,o,i,a,e[n+9],12,-1958414417),a=c(a,s,o,i,e[n+10],17,-42063),i=c(i,a,s,o,e[n+11],22,-1990404162),o=c(o,i,a,s,e[n+12],7,1804603682),s=c(s,o,i,a,e[n+13],12,-40341101),a=c(a,s,o,i,e[n+14],17,-1502002290),o=g(o,i=c(i,a,s,o,e[n+15],22,1236535329),a,s,e[n+1],5,-165796510),s=g(s,o,i,a,e[n+6],9,-1069501632),a=g(a,s,o,i,e[n+11],14,643717713),i=g(i,a,s,o,e[n+0],20,-373897302),o=g(o,i,a,s,e[n+5],5,-701558691),s=g(s,o,i,a,e[n+10],9,38016083),a=g(a,s,o,i,e[n+15],14,-660478335),i=g(i,a,s,o,e[n+4],20,-405537848),o=g(o,i,a,s,e[n+9],5,568446438),s=g(s,o,i,a,e[n+14],9,-1019803690),a=g(a,s,o,i,e[n+3],14,-187363961),i=g(i,a,s,o,e[n+8],20,1163531501),o=g(o,i,a,s,e[n+13],5,-1444681467),s=g(s,o,i,a,e[n+2],9,-51403784),a=g(a,s,o,i,e[n+7],14,1735328473),o=u(o,i=g(i,a,s,o,e[n+12],20,-1926607734),a,s,e[n+5],4,-378558),s=u(s,o,i,a,e[n+8],11,-2022574463),a=u(a,s,o,i,e[n+11],16,1839030562),i=u(i,a,s,o,e[n+14],23,-35309556),o=u(o,i,a,s,e[n+1],4,-1530992060),s=u(s,o,i,a,e[n+4],11,1272893353),a=u(a,s,o,i,e[n+7],16,-155497632),i=u(i,a,s,o,e[n+10],23,-1094730640),o=u(o,i,a,s,e[n+13],4,681279174),s=u(s,o,i,a,e[n+0],11,-358537222),a=u(a,s,o,i,e[n+3],16,-722521979),i=u(i,a,s,o,e[n+6],23,76029189),o=u(o,i,a,s,e[n+9],4,-640364487),s=u(s,o,i,a,e[n+12],11,-421815835),a=u(a,s,o,i,e[n+15],16,530742520),o=m(o,i=u(i,a,s,o,e[n+2],23,-995338651),a,s,e[n+0],6,-198630844),s=m(s,o,i,a,e[n+7],10,1126891415),a=m(a,s,o,i,e[n+14],15,-1416354905),i=m(i,a,s,o,e[n+5],21,-57434055),o=m(o,i,a,s,e[n+12],6,1700485571),s=m(s,o,i,a,e[n+3],10,-1894986606),a=m(a,s,o,i,e[n+10],15,-1051523),i=m(i,a,s,o,e[n+1],21,-2054922799),o=m(o,i,a,s,e[n+8],6,1873313359),s=m(s,o,i,a,e[n+15],10,-30611744),a=m(a,s,o,i,e[n+6],15,-1560198380),i=m(i,a,s,o,e[n+13],21,1309151649),o=m(o,i,a,s,e[n+4],6,-145523070),s=m(s,o,i,a,e[n+11],10,-1120210379),a=m(a,s,o,i,e[n+2],15,718787259),i=m(i,a,s,o,e[n+9],21,-343485551),o=me(o,l),i=me(i,r),a=me(a,A),s=me(s,p)}return Array(o,i,a,s)}function ue(e,t,o,i,a,s){return me(be(me(me(t,e),me(i,s)),a),o)}function c(e,t,o,i,a,s,n){return ue(t&o|~t&i,e,t,a,s,n)}function g(e,t,o,i,a,s,n){return ue(t&i|o&~i,e,t,a,s,n)}function u(e,t,o,i,a,s,n){return ue(t^o^i,e,t,a,s,n)}function m(e,t,o,i,a,s,n){return ue(o^(t|~i),e,t,a,s,n)}function me(e,t){var o=(65535&e)+(65535&t),i;return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function be(e,t){return e<<t|e>>>32-t}function fe(e,t,o,i,a,s){if(o&&A.prototype.checkXSSEvents(o)||i&&A.prototype.checkXSSEvents(i))return;this.id=e,this.pid=t,this.name=o,this.url=i&&i.replace(/'/g,"\\'"),this.title=a,this.page,a&&(this.page=parseInt(a.substr(5))-1),this.componentGuid=s,this.target=null,this.icon=null,this.iconOpen=null,this._io=!1,this._is=!1,this._ls=!1,this._hc=!1,this._ai=0,this._p}function A(e,t,o,i){for(var a in this.config={target:null,folderLinks:!0,useSelection:!0,useCookies:!1,useLines:!0