/* SWFObject v2.2 is released under the MIT License */ if(swfobject === undefined) { var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab 1 ? end : this.data.length) , type , this.encoding ); }; FB_proto.toString = function() { return "[object Blob]"; }; FB_proto.close = function() { this.size = 0; delete this.data; }; return FakeBlobBuilder; }(view)); view.Blob = function(blobParts, options) { var type = options ? (options.type || "") : ""; var builder = new BlobBuilder(); if (blobParts) { for (var i = 0, len = blobParts.length; i < len; i++) { if (Uint8Array && blobParts[i] instanceof Uint8Array) { builder.append(blobParts[i].buffer); } else { builder.append(blobParts[i]); } } } var blob = builder.getBlob(type); if (!blob.slice && blob.webkitSlice) { blob.slice = blob.webkitSlice; } return blob; }; var getPrototypeOf = Object.getPrototypeOf || function(object) { return object.__proto__; }; view.Blob.prototype = getPrototypeOf(new view.Blob()); }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); ; /* FileSaver.js * A saveAs() FileSaver implementation. * 1.1.20151003 * * By Eli Grey, http://eligrey.com * License: MIT * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md */ /*global self */ /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ var saveAs = saveAs || (function(view) { "use strict"; // IE <10 is explicitly unsupported if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { return; } var doc = view.document // only get URL when necessary in case Blob.js hasn't overridden it yet , get_URL = function() { return view.URL || view.webkitURL || view; } , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") , can_use_save_link = "download" in save_link , click = function(node) { var event = new MouseEvent("click"); node.dispatchEvent(event); } , is_safari = /Version\/[\d\.]+.*Safari/.test(navigator.userAgent) , webkit_req_fs = view.webkitRequestFileSystem , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem , throw_outside = function(ex) { (view.setImmediate || view.setTimeout)(function() { throw ex; }, 0); } , force_saveable_type = "application/octet-stream" , fs_min_size = 0 // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and // https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047 // for the reasoning behind the timeout and revocation flow , arbitrary_revoke_timeout = 500 // in ms , revoke = function(file) { var revoker = function() { if (typeof file === "string") { // file is an object URL get_URL().revokeObjectURL(file); } else { // file is a File file.remove(); } }; if (view.chrome) { revoker(); } else { setTimeout(revoker, arbitrary_revoke_timeout); } } , dispatch = function(filesaver, event_types, event) { event_types = [].concat(event_types); var i = event_types.length; while (i--) { var listener = filesaver["on" + event_types[i]]; if (typeof listener === "function") { try { listener.call(filesaver, event || filesaver); } catch (ex) { throw_outside(ex); } } } } , auto_bom = function(blob) { // prepend BOM for UTF-8 XML and text/* types (including HTML) if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { return new Blob(["\ufeff", blob], {type: blob.type}); } return blob; } , FileSaver = function(blob, name, no_auto_bom) { if (!no_auto_bom) { blob = auto_bom(blob); } // First try a.download, then web filesystem, then object URLs var filesaver = this , type = blob.type , blob_changed = false , object_url , target_view , dispatch_all = function() { dispatch(filesaver, "writestart progress write writeend".split(" ")); } // on any filesys errors revert to saving with object URLs , fs_error = function() { if (/*target_view &&*/ is_safari && typeof FileReader !== "undefined") { // Safari doesn't allow downloading of blob urls var reader = new FileReader(); reader.onloadend = function() { var base64Data = reader.result; /*target_*/view.location.href = "data:attachment/file" + base64Data.slice(base64Data.search(/[,;]/)); filesaver.readyState = filesaver.DONE; dispatch_all(); }; reader.readAsDataURL(blob); filesaver.readyState = filesaver.INIT; return; } // don't create more object URLs than needed if (blob_changed || !object_url) { object_url = get_URL().createObjectURL(blob); } if (target_view) { target_view.location.href = object_url; } else { var new_tab = view.open(object_url, "_blank"); if (new_tab == undefined && is_safari) { //Apple do not allow window.open, see http://bit.ly/1kZffRI view.location.href = object_url } } filesaver.readyState = filesaver.DONE; dispatch_all(); revoke(object_url); } , abortable = function(func) { return function() { if (filesaver.readyState !== filesaver.DONE) { return func.apply(this, arguments); } }; } , create_if_not_found = {create: true, exclusive: false} , slice ; filesaver.readyState = filesaver.INIT; if (!name) { name = "download"; } if (can_use_save_link) { object_url = get_URL().createObjectURL(blob); setTimeout(function() { save_link.href = object_url; save_link.download = name; click(save_link); dispatch_all(); revoke(object_url); filesaver.readyState = filesaver.DONE; }); return; } // Object and web filesystem URLs have a problem saving in Google Chrome when // viewed in a tab, so I force save with application/octet-stream // http://code.google.com/p/chromium/issues/detail?id=91158 // Update: Google errantly closed 91158, I submitted it again: // https://code.google.com/p/chromium/issues/detail?id=389642 if (view.chrome && type && type !== force_saveable_type) { slice = blob.slice || blob.webkitSlice; blob = slice.call(blob, 0, blob.size, force_saveable_type); blob_changed = true; } // Since I can't be sure that the guessed media type will trigger a download // in WebKit, I append .download to the filename. // https://bugs.webkit.org/show_bug.cgi?id=65440 if (webkit_req_fs && name !== "download") { name += ".download"; } if (type === force_saveable_type || webkit_req_fs) { target_view = view; } if (!req_fs) { fs_error(); return; } fs_min_size += blob.size; req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { var save = function() { dir.getFile(name, create_if_not_found, abortable(function(file) { file.createWriter(abortable(function(writer) { writer.onwriteend = function(event) { target_view.location.href = file.toURL(); filesaver.readyState = filesaver.DONE; dispatch(filesaver, "writeend", event); revoke(file); }; writer.onerror = function() { var error = writer.error; if (error.code !== error.ABORT_ERR) { fs_error(); } }; "writestart progress write abort".split(" ").forEach(function(event) { writer["on" + event] = filesaver["on" + event]; }); writer.write(blob); filesaver.abort = function() { writer.abort(); filesaver.readyState = filesaver.DONE; }; filesaver.readyState = filesaver.WRITING; }), fs_error); }), fs_error); }; dir.getFile(name, {create: false}, abortable(function(file) { // delete file if it already exists file.remove(); save(); }), abortable(function(ex) { if (ex.code === ex.NOT_FOUND_ERR) { save(); } else { fs_error(); } })); }), fs_error); }), fs_error); } , FS_proto = FileSaver.prototype , saveAs = function(blob, name, no_auto_bom) { return new FileSaver(blob, name, no_auto_bom); } ; // IE 10+ (native saveAs) if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { return function(blob, name, no_auto_bom) { if (!no_auto_bom) { blob = auto_bom(blob); } return navigator.msSaveOrOpenBlob(blob, name || "download"); }; } FS_proto.abort = function() { var filesaver = this; filesaver.readyState = filesaver.DONE; dispatch(filesaver, "abort"); }; FS_proto.readyState = FS_proto.INIT = 0; FS_proto.WRITING = 1; FS_proto.DONE = 2; FS_proto.error = FS_proto.onwritestart = FS_proto.onprogress = FS_proto.onwrite = FS_proto.onabort = FS_proto.onerror = FS_proto.onwriteend = null; return saveAs; }( typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content )); // `self` is undefined in Firefox for Android content script context // while `this` is nsIContentFrameMessageManager // with an attribute `content` that corresponds to the window if (typeof module !== "undefined" && module.exports) { module.exports.saveAs = saveAs; } else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) { define([], function() { return saveAs; }); } ; (()=>{var e={426:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(50),s=r(162);const i=function(e){function t(t,r,n){this.index=void 0!==t.index?t.index:-1,this.header=void 0!==t.label?t.label:"",this.notSupportedText=t.exportNotSupported,this.defaultAnswer=n&&n.previousState?n.previousState.answer:"",this.contentData=n;var s=H5P.ExportableTextArea.Exporter.supportsExport(),i=(n.subContentId?n.subContentId:r)+"-label";this.$label=e('
'+this.header+"
"),this.$input=e('")}return t.prototype.attach=function(e){this.$content=e.addClass("h5p-eta").append(this.$label).append(this.$input)},t.prototype.onDelete=function(e,t,r){H5P.ExportableTextArea.CPInterface.onDelete(e,t,r,this)},t.prototype.onAdd=function(e,t){H5P.ExportableTextArea.CPInterface.onAdd(e,t,this)},t.prototype.exportAnswers=!0,t.prototype.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"")},t.prototype.getCurrentState=function(){var e=this.$input.val();if(e.trim())return{answer:e}},t.prototype.resetTask=function(){this.$input.val("")},t}(H5P.jQuery);i.CPInterface=function(){if(i._singleton)return i._singleton;const e=i._singleton={};return e.answerCounter=[],e.onDelete=function(t,r,n,s){var i=t.slides[r].elements.filter((function(e,t){return e.action&&"H5P.ExportableTextArea"===H5P.libraryFromString(e.action.library).machineName})).sort((function(e,t){return e.action.params.index-t.action.params.index}));e.answerCounter[r]=[];for(var o=H5P.jQuery(".h5p-slides-wrapper > .h5p-current"),a=0;a{(0,s.saveAs)(e,"exported-text.docx")}))},supportsExport:function(){return!!new Blob},createDocx:function(e,t){const r=[];for(var s=0;s]+>/g,""),text:c};void 0!==a.action.params.exportComments&&a.action.params.exportComments&&(t.comments=a.solution.replace(/<[^>]+>/g,"")),r.push(t)}}const u=r.map((e=>new n.Paragraph({children:[new n.TextRun({text:e.header,break:2}),new n.TextRun({text:e.text,break:1}),new n.TextRun({text:e.comments,break:1})]})));return u.unshift(new n.Paragraph({children:[new n.ExternalHyperlink({children:[new n.TextRun({text:document.URL,style:"Hyperlink"})],link:document.URL})]})),new n.Document({sections:[{properties:{},children:u}]})},createExportButton:function(e){return H5P.ExportableTextArea.Exporter.supportsExport()?''+e+"":""}};const o=i},103:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(81),s=r.n(n),i=r(645),o=r.n(i)()(s());o.push([e.id,".h5p-eta.h5p-element {\n overflow: visible;\n}\n\n.h5p-eta {\n display: flex;\n flex-flow: column;\n height: 100%;\n position: absolute;\n width: 100%;\n}\n\n.h5p-eta .h5p-eta-input {\n width: 100%;\n resize: none !important;\n font-size: 100%;\n padding: 0.25em;\n border: 1px solid #a0a0a0;\n line-height: 1.25em;\n box-sizing: border-box;\n outline: none;\n flex: auto;\n}\n.h5p-eta .h5p-eta-input:focus {\n border-color: #53a0ff;\n}\n.h5p-eta-label {\n overflow: hidden;\n padding: 0.375em 0.5em;\n flex: none;\n}\n.h5p-eta-label p:last-child {\n margin-bottom: 0;\n}\n",""]);const a=o},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var a=0;a0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=i),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),s&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=s):l[4]="".concat(s)),t.push(l))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},50:e=>{var t;globalThis,t=()=>(()=>{var e={9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=c(e),o=i[0],a=i[1],u=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),l=0,h=a>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,s=n%3,i=[],o=16383,a=0,c=n-s;ac?c:a+o));return 1===s?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var s,i,o=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),s=r(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const s=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),a(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let s=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(s)return n?-1:V(e).length;t=(""+t).toLowerCase(),s=!0}}function w(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,s){let i,o=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){let n=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;ns&&(n=s):n=s;const i=t.length;let o;for(n>i/2&&(n=i/2),o=0;o>8,s=r%256,i.push(s),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let s=t;for(;s239?4:t>223?3:t>191?2:1;if(s+o<=r){let r,n,a,c;switch(o){case 1:t<128&&(i=t);break;case 2:r=e[s+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[s+1],n=e[s+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[s+1],n=e[s+2],a=e[s+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),s+=o}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,s)):Uint8Array.prototype.set.call(n,t,s);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,s)}s+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,s){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(s>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(i,o),u=this.slice(n,s),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const s=this.length-t;if((void 0===r||r>s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let s=t;sn)&&(r=n);let s="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,s,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n,s){z(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function P(e,t,r,n,s){z(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function F(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return t=+t,r>>>=0,i||F(e,0,r,4),s.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,i){return t=+t,r>>>=0,i||F(e,0,r,8),s.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],s=1,i=0;for(;++i>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e+--t],s=1;for(;t>0&&(s*=256);)n+=this[e+--t]*s;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,s=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(s)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],s=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||k(e,t,this.length);let n=this[e],s=1,i=0;for(;++i=s&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let n=t,s=1,i=this[e+--n];for(;n>0&&(s*=256);)i+=this[e+--n]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||k(e,4,this.length),s.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),s.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),s.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),s.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let s=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let s=r-1,i=1;for(this[t+s]=255&e;--s>=0&&(i*=256);)this[t+s]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let s=0,i=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,s,i){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",s,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,s,i)}function W(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}H("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),H("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),H("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,s=r;return Number.isInteger(r)&&Math.abs(r)>2**32?s=j(String(r)):"bigint"==typeof r&&(s=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(s=j(s)),s+="n"),n+=` It must be ${t}. Received ${s}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let s=null;const i=[];for(let o=0;o55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function $(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,r,n){let s;for(s=0;s=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let s=0;s<16;++s)t[n+s]=e[r]+e[s]}return t}();function J(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,s)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var s,i,o,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=l.bind(n);return s.listener=r,n.wrapFn=s,s}function p(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=f(c,u);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,s){var i,o,a=8*s-n-1,c=(1<>1,l=-7,h=r?s-1:0,p=r?-1:1,d=e[t+h];for(h+=p,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+e[t+h],h+=p,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),i-=u}return(d?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,s,i){var o,a,c,u=8*i-s-1,l=(1<>1,p=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?p/c:p*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=l?(a=0,o=l):o+h>=1?(a=(t*c-1)*Math.pow(2,s),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,s),o=0));s>=8;e[r+d]=255&a,d+=f,a/=256,s-=8);for(o=o<0;e[r+d]=255&o,d+=f,o/=256,u-=8);e[r+d-f]|=128*m}},5705:(e,t,r)=>{"use strict";var n,s,i=r.g.MutationObserver||r.g.WebKitMutationObserver;if(i){var o=0,a=new i(h),c=r.g.document.createTextNode("");a.observe(c,{characterData:!0}),n=function(){c.data=o=++o%2}}else if(r.g.setImmediate||void 0===r.g.MessageChannel)n="document"in r.g&&"onreadystatechange"in r.g.document.createElement("script")?function(){var e=r.g.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},r.g.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var u=new r.g.MessageChannel;u.port1.onmessage=h,n=function(){u.port2.postMessage(0)}}var l=[];function h(){var e,t;s=!0;for(var r=l.length;r;){for(t=l,l=[],e=-1;++e{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},8458:(e,t,r)=>{"use strict";var n=r(8910),s=r(3790),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t,r,s,o,a,c,u,l=[],h=0,p=e.length,d=p,f="string"!==n.getTypeOf(e);h>2,a=(3&t)<<4|r>>4,c=d>1?(15&r)<<2|s>>6:64,u=d>2?63&s:64,l.push(i.charAt(o)+i.charAt(a)+i.charAt(c)+i.charAt(u));return l.join("")},t.decode=function(e){var t,r,n,o,a,c,u=0,l=0,h="data:";if(e.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var p,d=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&d--,e.charAt(e.length-2)===i.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=s.uint8array?new Uint8Array(0|d):new Array(0|d);u>4,r=(15&o)<<4|(a=i.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(c=i.indexOf(e.charAt(u++))),p[l++]=t,64!==a&&(p[l++]=r),64!==c&&(p[l++]=n);return p}},7326:(e,t,r)=>{"use strict";var n=r(8565),s=r(5301),i=r(2541),o=r(5977);function a(e,t,r,n,s){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=s}a.prototype={getContentWorker:function(){var e=new s(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new s(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new o("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=a},1678:(e,t,r)=>{"use strict";var n=r(3718);t.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=r(1033)},6988:(e,t,r)=>{"use strict";var n=r(8910),s=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=s,o=0+r;e^=-1;for(var a=0;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r,n){var i=s,o=0+r;e^=-1;for(var a=0;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},6032:(e,t)=>{"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},8565:(e,t,r)=>{"use strict";var n;n="undefined"!=typeof Promise?Promise:r(3389),e.exports={Promise:n}},1033:(e,t,r)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,s=r(9591),i=r(8910),o=r(3718),a=n?"uint8array":"array";function c(e,t){o.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}t.magic="\b\0",i.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(a,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new c("Deflate",e)},t.uncompressWorker=function(){return new c("Inflate",{})}},4979:(e,t,r)=>{"use strict";var n=r(8910),s=r(3718),i=r(3600),o=r(6988),a=r(1141),c=function(e,t){var r,n="";for(r=0;r>>=8;return n},u=function(e,t,r,s,u,l){var h,p,d=e.file,f=e.compression,m=l!==i.utf8encode,w=n.transformTo("string",l(d.name)),g=n.transformTo("string",i.utf8encode(d.name)),y=d.comment,b=n.transformTo("string",l(y)),x=n.transformTo("string",i.utf8encode(y)),v=g.length!==d.name.length,_=x.length!==y.length,E="",T="",A="",S=d.dir,I=d.date,R={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(R.crc32=e.crc32,R.compressedSize=e.compressedSize,R.uncompressedSize=e.uncompressedSize);var N=0;t&&(N|=8),m||!v&&!_||(N|=2048);var C,O,k=0,L=0;S&&(k|=16),"UNIX"===u?(L=798,k|=(O=C=d.unixPermissions,C||(O=S?16893:33204),(65535&O)<<16)):(L=20,k|=63&(d.dosPermissions||0)),h=I.getUTCHours(),h<<=6,h|=I.getUTCMinutes(),h<<=5,h|=I.getUTCSeconds()/2,p=I.getUTCFullYear()-1980,p<<=4,p|=I.getUTCMonth()+1,p<<=5,p|=I.getUTCDate(),v&&(T=c(1,1)+c(o(w),4)+g,E+="up"+c(T.length,2)+T),_&&(A=c(1,1)+c(o(b),4)+x,E+="uc"+c(A.length,2)+A);var D="";return D+="\n\0",D+=c(N,2),D+=f.magic,D+=c(h,2),D+=c(p,2),D+=c(R.crc32,4),D+=c(R.compressedSize,4),D+=c(R.uncompressedSize,4),D+=c(w.length,2),D+=c(E.length,2),{fileRecord:a.LOCAL_FILE_HEADER+D+w+E,dirRecord:a.CENTRAL_FILE_HEADER+c(L,2)+D+c(b.length,2)+"\0\0\0\0"+c(k,4)+c(s,4)+w+E+b}},l=function(e){return a.DATA_DESCRIPTOR+c(e.crc32,4)+c(e.compressedSize,4)+c(e.uncompressedSize,4)};function h(e,t,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(h,s),h.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=u(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=u(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:l(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t{"use strict";var n=r(1678),s=r(4979);t.generateWorker=function(e,t,r){var i=new s(t.streamFiles,r,t.platform,t.encodeFileName),o=0;try{e.forEach((function(e,r){o++;var s=function(e,t){var r=e||t,s=n[r];if(!s)throw new Error(r+" is not a valid compression method !");return s}(r.options.compression,t.compression),a=r.options.compressionOptions||t.compressionOptions||{},c=r.dir,u=r.date;r._compressWorker(s,a).withStreamInfo("file",{name:e,dir:c,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)})),i.entriesCount=o}catch(e){i.error(e)}return i}},6085:(e,t,r)=>{"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=r(7132),n.prototype.loadAsync=r(1062),n.support=r(3790),n.defaults=r(6032),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=r(8565),e.exports=n},1062:(e,t,r)=>{"use strict";var n=r(8910),s=r(8565),i=r(3600),o=r(6624),a=r(2541),c=r(2182);function u(e){return new s.Promise((function(t,r){var n=e.decompressed.getContentWorker().pipe(new a);n.on("error",(function(e){r(e)})).on("end",(function(){n.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}e.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),c.isNode&&c.isStream(e)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new o(t);return r.load(e),r})).then((function(e){var r=[s.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var i=0;i{"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},660:(e,t,r)=>{"use strict";var n=r(8910),s=r(3718);function i(e,t){s.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(i,s),i.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},i.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=i},1220:(e,t,r)=>{"use strict";var n=r(749).Readable;function s(e,t,r){n.call(this,t),this._helper=e;var s=this;e.on("data",(function(e,t){s.push(e)||s._helper.pause(),r&&r(t)})).on("error",(function(e){s.emit("error",e)})).on("end",(function(){s.push(null)}))}r(8910).inherits(s,n),s.prototype._read=function(){this._helper.resume()},e.exports=s},7132:(e,t,r)=>{"use strict";var n=r(3600),s=r(8910),i=r(3718),o=r(1285),a=r(6032),c=r(7326),u=r(6859),l=r(7834),h=r(2182),p=r(660),d=function(e,t,r){var n,o=s.getTypeOf(t),l=s.extend(r||{},a);l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=m(e)),l.createFolders&&(n=f(e))&&w.call(this,n,!0);var d,g="string"===o&&!1===l.binary&&!1===l.base64;r&&void 0!==r.binary||(l.binary=!g),(t instanceof c&&0===t.uncompressedSize||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",o="string"),d=t instanceof c||t instanceof i?t:h.isNode&&h.isStream(t)?new p(e,t):s.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var y=new u(e,d,l);this.files[e]=y},f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},w=function(e,t){return t=void 0!==t?t:a.createFolders,e=m(e),this.files[e]||d.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function g(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1===arguments.length){if(g(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var s=this.files[this.root+e];return s&&!s.dir?s:null}return e=this.root+e,d.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(g(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=w.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n{"use strict";e.exports=r(2830)},2370:(e,t,r)=>{"use strict";var n=r(8542);function s(e){n.call(this,e);for(var t=0;t=0;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===n&&this.data[i+3]===s)return i-this.zero;return-1},s.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),s=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&s===i[3]},s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=s},8542:(e,t,r)=>{"use strict";var n=r(8910);function s(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=s},9583:(e,t,r)=>{"use strict";var n=r(414);function s(e){n.call(this,e)}r(8910).inherits(s,n),s.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=s},9226:(e,t,r)=>{"use strict";var n=r(8542);function s(e){n.call(this,e)}r(8910).inherits(s,n),s.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},s.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},s.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},s.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=s},414:(e,t,r)=>{"use strict";var n=r(2370);function s(e){n.call(this,e)}r(8910).inherits(s,n),s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=s},8435:(e,t,r)=>{"use strict";var n=r(8910),s=r(3790),i=r(2370),o=r(9226),a=r(9583),c=r(414);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||s.uint8array?"nodebuffer"===t?new a(e):s.uint8array?new c(n.transformTo("uint8array",e)):new i(n.transformTo("array",e)):new o(e)}},1141:(e,t)=>{"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},4293:(e,t,r)=>{"use strict";var n=r(3718),s=r(8910);function i(e){n.call(this,"ConvertWorker to "+e),this.destType=e}s.inherits(i,n),i.prototype.processChunk=function(e){this.push({data:s.transformTo(this.destType,e.data),meta:e.meta})},e.exports=i},2541:(e,t,r)=>{"use strict";var n=r(3718),s=r(6988);function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r(8910).inherits(i,n),i.prototype.processChunk=function(e){this.streamInfo.crc32=s(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=i},5977:(e,t,r)=>{"use strict";var n=r(8910),s=r(3718);function i(e){s.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(i,s),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}s.prototype.processChunk.call(this,e)},e.exports=i},5301:(e,t,r)=>{"use strict";var n=r(8910),s=r(3718);function i(e){s.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}n.inherits(i,s),i.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=i},3718:e=>{"use strict";function t(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}t.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},e.exports=t},1285:(e,t,r)=>{"use strict";var n=r(8910),s=r(4293),i=r(3718),o=r(8458),a=r(3790),c=r(8565),u=null;if(a.nodestream)try{u=r(1220)}catch(e){}function l(e,t,r){var o=t;switch(t){case"blob":case"arraybuffer":o="uint8array";break;case"base64":o="string"}try{this._internalType=o,this._outputType=t,this._mimeType=r,n.checkSupport(o),this._worker=e.pipe(new s(o)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}l.prototype={accumulate:function(e){return t=this,r=e,new c.Promise((function(e,s){var i=[],a=t._internalType,c=t._outputType,u=t._mimeType;t.on("data",(function(e,t){i.push(e),r&&r(t)})).on("error",(function(e){i=[],s(e)})).on("end",(function(){try{var t=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(c,function(e,t){var r,n=0,s=null,i=0;for(r=0;r{"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var n=new ArrayBuffer(0);try{t.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(n),t.blob=0===s.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!r(749).Readable}catch(e){t.nodestream=!1}},3600:(e,t,r)=>{"use strict";for(var n=r(8910),s=r(3790),i=r(2182),o=r(3718),a=new Array(256),c=0;c<256;c++)a[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;function u(){o.call(this,"utf-8 decode"),this.leftOver=null}function l(){o.call(this,"utf-8 encode")}a[254]=a[254]=1,t.utf8encode=function(e){return s.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,o,a=e.length,c=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t}(e)},t.utf8decode=function(e){return s.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,s,i,o=e.length,c=new Array(2*o);for(r=0,t=0;t4)c[r++]=65533,t+=i-1;else{for(s&=2===i?31:3===i?15:7;i>1&&t1?c[r++]=65533:s<65536?c[r++]=s:(s-=65536,c[r++]=55296|s>>10&1023,c[r++]=56320|1023&s)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(e=n.transformTo(s.uint8array?"uint8array":"array",e))},n.inherits(u,o),u.prototype.processChunk=function(e){var r=n.transformTo(s.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var i=r;(r=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),r.set(i,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}(r),c=r;o!==r.length&&(s.uint8array?(c=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(c=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(c),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=u,n.inherits(l,o),l.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=l},8910:(e,t,r)=>{"use strict";var n=r(3790),s=r(8458),i=r(2182),o=r(8565);function a(e){return e}function c(e,t){for(var r=0;r1;)try{return u.stringifyByChunk(e,n,r)}catch(e){r=Math.floor(r/2)}return u.stringifyByChar(e)}function h(e,t){for(var r=0;r{"use strict";var n=r(8435),s=r(8910),i=r(1141),o=r(9392),a=r(3790);function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(t)+", expected "+s.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",r=s.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;01)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=c},9392:(e,t,r)=>{"use strict";var n=r(8435),s=r(8910),i=r(7326),o=r(6988),a=r(3600),c=r(1678),u=r(3790);function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,s=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4{"use strict";var n=r(1285),s=r(5301),i=r(3600),o=r(7326),a=r(3718),c=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};c.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var s="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!s&&(t=t.pipe(new i.Utf8EncodeWorker)),!o&&s&&(t=t.pipe(new i.Utf8DecodeWorker))}catch(e){(t=new a("error")).error(e)}return new n(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new i.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof a?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h{"use strict";var n=r(5705);function s(){}var i={},o=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==s&&d(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,n)}))}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function s(t){r||(r=!0,i.resolve(e,t))}var o=f((function(){t(s,n)}));"error"===o.status&&n(o.value)}function f(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}e.exports=u,u.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===o)return this;var r=new this.constructor(s);return this.state!==c?h(r,this.state===a?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){i.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=f(p,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=a,e.outcome=t;for(var s=-1,o=e.queue.length;++s{"use strict";var n={};(0,r(4236).assign)(n,r(4555),r(8843),r(1619)),e.exports=n},4555:(e,t,r)=>{"use strict";var n=r(405),s=r(4236),i=r(9373),o=r(8898),a=r(2292),c=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(o[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var l;if(l="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,l)))throw new Error(o[r]);this._dict_set=!0}}function l(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}u.prototype.push=function(e,t){var r,o,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new s.Buf8(u),a.next_out=0,a.avail_out=u),1!==(r=n.deflate(a,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(i.buf2binstring(s.shrinkBuf(a.output,a.next_out))):this.onData(s.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),a.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=l,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}},8843:(e,t,r)=>{"use strict";var n=r(7948),s=r(4236),i=r(9373),o=r(1619),a=r(8898),c=r(2292),u=r(2401),l=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(a[r])}function p(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(e,t){var r,a,c,u,h,p=this.strm,d=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?p.input=i.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new s.Buf8(d),p.next_out=0,p.avail_out=d),(r=n.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(r=n.inflateSetDictionary(this.strm,f)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&r!==o.Z_STREAM_END&&(0!==p.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(p.output,p.next_out),u=p.next_out-c,h=i.buf2string(p.output,c),p.next_out=u,p.avail_out=d-u,u&&s.arraySet(p.output,p.output,c,u,0),this.onData(h)):this.onData(s.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((p.avail_in>0||0===p.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),p.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=p,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.ungzip=p},4236:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var s in r)n(r,s)&&(e[s]=r[s])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,n,s){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),s);else for(var i=0;i{"use strict";var n=r(4236),s=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&s))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,s=t.length;r4)u[n++]=65533,r+=i-1;else{for(s&=2===i?31:3===i?15:7;i>1&&r1?u[n++]=65533:s<65536?u[n++]=s:(s-=65536,u[n++]=55296|s>>10&1023,u[n++]=56320|1023&s)}return c(u,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},6069:e=>{"use strict";e.exports=function(e,t,r,n){for(var s=65535&e|0,i=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{i=i+(s=s+t[n++]|0)|0}while(--o);s%=65521,i%=65521}return s|i<<16|0}},1619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,s){var i=t,o=s+n;e^=-1;for(var a=s;a>>8^i[255&(e^r[a])];return-1^e}},405:(e,t,r)=>{"use strict";var n,s=r(4236),i=r(342),o=r(6069),a=r(2869),c=r(8898),u=-2,l=258,h=262,p=103,d=113,f=666;function m(e,t){return e.msg=c[t],t}function w(e){return(e<<1)-(e>4?9:0)}function g(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(s.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function b(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function x(e,t){e.pending_buf[e.pending++]=t}function v(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var r,n,s=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-h?e.strstart-(e.w_size-h):0,u=e.window,p=e.w_mask,d=e.prev,f=e.strstart+l,m=u[i+o-1],w=u[i+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+o]===w&&u[r+o-1]===m&&u[r]===u[i]&&u[++r]===u[i+1]){i+=2,r++;do{}while(u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&io){if(e.match_start=t,o=n,n>=a)break;m=u[i+o-1],w=u[i+o]}}}while((t=d[t&p])>c&&0!=--s);return o<=e.lookahead?o:e.lookahead}function E(e){var t,r,n,i,c,u,l,p,d,f,m=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-h)){s.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=m?n-m:0}while(--r);t=r=m;do{n=e.prev[--t],e.prev[t]=n>=m?n-m:0}while(--r);i+=m}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,p=e.strstart+e.lookahead,d=i,f=void 0,(f=u.avail_in)>d&&(f=d),r=0===f?0:(u.avail_in-=f,s.arraySet(l,u.input,u.next_in,f,p),1===u.state.wrap?u.adler=o(u.adler,l,f,p):2===u.state.wrap&&(u.adler=a(u.adler,l,f,p)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),i<1||i>9||8!==r||n<8||n>15||t<0||t>9||o<0||o>4)return m(e,u);8===n&&(n=9);var c=new I;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null,c.w_bits=n,c.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-h&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,T),new S(4,5,16,8,T),new S(4,6,32,32,T),new S(4,4,16,16,A),new S(8,16,32,32,A),new S(8,16,128,128,A),new S(8,32,128,256,A),new S(32,128,258,1024,A),new S(32,258,258,4096,A)],t.deflateInit=function(e,t){return C(e,t,8,15,8,0)},t.deflateInit2=C,t.deflateReset=N,t.deflateResetKeep=R,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},t.deflate=function(e,t){var r,s,o,c;if(!e||!e.state||t>5||t<0)return e?m(e,u):u;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===f&&4!==t)return m(e,0===e.avail_out?-5:u);if(s.strm=e,r=s.last_flush,s.last_flush=t,42===s.status)if(2===s.wrap)e.adler=0,x(s,31),x(s,139),x(s,8),s.gzhead?(x(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),x(s,255&s.gzhead.time),x(s,s.gzhead.time>>8&255),x(s,s.gzhead.time>>16&255),x(s,s.gzhead.time>>24&255),x(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),x(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(x(s,255&s.gzhead.extra.length),x(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=a(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69):(x(s,0),x(s,0),x(s,0),x(s,0),x(s,0),x(s,9===s.level?2:s.strategy>=2||s.level<2?4:0),x(s,3),s.status=d);else{var h=8+(s.w_bits-8<<4)<<8;h|=(s.strategy>=2||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(h|=32),h+=31-h%31,s.status=d,v(s,h),0!==s.strstart&&(v(s,e.adler>>>16),v(s,65535&e.adler)),e.adler=1}if(69===s.status)if(s.gzhead.extra){for(o=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),y(e),o=s.pending,s.pending!==s.pending_buf_size));)x(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=73)}else s.status=73;if(73===s.status)if(s.gzhead.name){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),y(e),o=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===c&&(s.gzindex=0,s.status=91)}else s.status=91;if(91===s.status)if(s.gzhead.comment){o=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>o&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),y(e),o=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexo&&(e.adler=a(e.adler,s.pending_buf,s.pending-o,o)),0===c&&(s.status=p)}else s.status=p;if(s.status===p&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&y(e),s.pending+2<=s.pending_buf_size&&(x(s,255&e.adler),x(s,e.adler>>8&255),e.adler=0,s.status=d)):s.status=d),0!==s.pending){if(y(e),0===e.avail_out)return s.last_flush=-1,0}else if(0===e.avail_in&&w(t)<=w(r)&&4!==t)return m(e,-5);if(s.status===f&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==s.lookahead||0!==t&&s.status!==f){var _=2===s.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(s,t):3===s.strategy?function(e,t){for(var r,n,s,o,a=e.window;;){if(e.lookahead<=l){if(E(e),e.lookahead<=l&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=a[s=e.strstart-1])===a[++s]&&n===a[++s]&&n===a[++s]){o=e.strstart+l;do{}while(n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(s,t):n[s.level].func(s,t);if(3!==_&&4!==_||(s.status=f),1===_||3===_)return 0===e.avail_out&&(s.last_flush=-1),0;if(2===_&&(1===t?i._tr_align(s):5!==t&&(i._tr_stored_block(s,0,0,!1),3===t&&(g(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),y(e),0===e.avail_out))return s.last_flush=-1,0}return 4!==t?0:s.wrap<=0?1:(2===s.wrap?(x(s,255&e.adler),x(s,e.adler>>8&255),x(s,e.adler>>16&255),x(s,e.adler>>24&255),x(s,255&e.total_in),x(s,e.total_in>>8&255),x(s,e.total_in>>16&255),x(s,e.total_in>>24&255)):(v(s,e.adler>>>16),v(s,65535&e.adler)),y(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==p&&t!==d&&t!==f?m(e,u):(e.state=null,t===d?m(e,-3):0):u},t.deflateSetDictionary=function(e,t){var r,n,i,a,c,l,h,p,d=t.length;if(!e||!e.state)return u;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return u;for(1===a&&(e.adler=o(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),p=new s.Buf8(r.w_size),s.arraySet(p,t,d-r.w_size,r.w_size,0),t=p,d=r.w_size),c=e.avail_in,l=e.next_in,h=e.input,e.avail_in=d,e.next_in=0,e.input=t,E(r);r.lookahead>=3;){n=r.strstart,i=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:e=>{"use strict";e.exports=function(e,t){var r,n,s,i,o,a,c,u,l,h,p,d,f,m,w,g,y,b,x,v,_,E,T,A,S;r=e.state,n=e.next_in,A=e.input,s=n+(e.avail_in-5),i=e.next_out,S=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.whave,h=r.wnext,p=r.window,d=r.hold,f=r.bits,m=r.lencode,w=r.distcode,g=(1<>>=x=b>>>24,f-=x,0==(x=b>>>16&255))S[i++]=65535&b;else{if(!(16&x)){if(0==(64&x)){b=m[(65535&b)+(d&(1<>>=x,f-=x),f<15&&(d+=A[n++]<>>=x=b>>>24,f-=x,!(16&(x=b>>>16&255))){if(0==(64&x)){b=w[(65535&b)+(d&(1<c){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=x,f-=x,_>(x=i-o)){if((x=_-x)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,T=p,0===h){if(E+=u-x,x2;)S[i++]=T[E++],S[i++]=T[E++],S[i++]=T[E++],v-=3;v&&(S[i++]=T[E++],v>1&&(S[i++]=T[E++]))}else{E=i-_;do{S[i++]=S[E++],S[i++]=S[E++],S[i++]=S[E++],v-=3}while(v>2);v&&(S[i++]=S[E++],v>1&&(S[i++]=S[E++]))}break}}break}}while(n>3,d&=(1<<(f-=v<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n{"use strict";var n=r(4236),s=r(6069),i=r(2869),o=r(4264),a=r(9241),c=-2,u=12,l=30;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):c}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):c}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,f(e))):c}function w(e,t){var r,n;return e?(n=new p,e.state=n,n.window=null,0!==(r=m(e,t))&&(e.state=null),r):c}var g,y,b=!0;function x(e){if(b){var t;for(g=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),b=!1}e.lencode=g,e.lenbits=9,e.distcode=y,e.distbits=5}function v(e,t,r,s){var i,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>s&&(i=s),n.arraySet(o.window,t,r-s,i,o.wnext),(s-=i)?(n.arraySet(o.window,t,r-s,s,0),o.wnext=s,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=i(r.check,M,2,0),y=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",r.mode=l;break}if(8!=(15&y)){e.msg="unknown compression method",r.mode=l;break}if(b-=4,L=8+(15&(y>>>=4)),0===r.wbits)r.wbits=L;else if(L>r.wbits){e.msg="invalid window size",r.mode=l;break}r.dmax=1<>8&1),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=i(r.check,M,2,0)),y=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===w)break e;w--,y+=p[f++]<>>8&255,M[2]=y>>>16&255,M[3]=y>>>24&255,r.check=i(r.check,M,4,0)),y=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===w)break e;w--,y+=p[f++]<>8),512&r.flags&&(M[0]=255&y,M[1]=y>>>8&255,r.check=i(r.check,M,2,0)),y=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===w)break e;w--,y+=p[f++]<>>8&255,r.check=i(r.check,M,2,0)),y=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((T=r.length)>w&&(T=w),T&&(r.head&&(L=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,p,f,T,L)),512&r.flags&&(r.check=i(r.check,p,T,f)),w-=T,f+=T,r.length-=T),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===w)break e;T=0;do{L=p[f+T++],r.head&&L&&r.length<65536&&(r.head.name+=String.fromCharCode(L))}while(L&&T>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=u;break;case 10:for(;b<32;){if(0===w)break e;w--,y+=p[f++]<>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===w)break e;w--,y+=p[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6===t){y>>>=2,b-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=l}y>>>=2,b-=2;break;case 14:for(y>>>=7&b,b-=7&b;b<32;){if(0===w)break e;w--,y+=p[f++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&y,y=0,b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(T=r.length){if(T>w&&(T=w),T>g&&(T=g),0===T)break e;n.arraySet(d,p,f,T,m),w-=T,f+=T,g-=T,m+=T,r.length-=T;break}r.mode=u;break;case 17:for(;b<14;){if(0===w)break e;w--,y+=p[f++]<>>=5,b-=5,r.ndist=1+(31&y),y>>>=5,b-=5,r.ncode=4+(15&y),y>>>=4,b-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,b-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},D=a(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,D){e.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,N=65535&B,!((I=B>>>24)<=b);){if(0===w)break e;w--,y+=p[f++]<>>=I,b-=I,r.lens[r.have++]=N;else{if(16===N){for(F=I+2;b>>=I,b-=I,0===r.have){e.msg="invalid bit length repeat",r.mode=l;break}L=r.lens[r.have-1],T=3+(3&y),y>>>=2,b-=2}else if(17===N){for(F=I+3;b>>=I)),y>>>=3,b-=3}else{for(F=I+7;b>>=I)),y>>>=7,b-=7}if(r.have+T>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=l;break}for(;T--;)r.lens[r.have++]=L}}if(r.mode===l)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,P={bits:r.lenbits},D=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,D){e.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},D=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,D){e.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(w>=6&&g>=258){e.next_out=m,e.avail_out=g,e.next_in=f,e.avail_in=w,r.hold=y,r.bits=b,o(e,E),m=e.next_out,d=e.output,g=e.avail_out,f=e.next_in,p=e.input,w=e.avail_in,y=r.hold,b=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;R=(B=r.lencode[y&(1<>>16&255,N=65535&B,!((I=B>>>24)<=b);){if(0===w)break e;w--,y+=p[f++]<>C)])>>>16&255,N=65535&B,!(C+(I=B>>>24)<=b);){if(0===w)break e;w--,y+=p[f++]<>>=C,b-=C,r.back+=C}if(y>>>=I,b-=I,r.back+=I,r.length=N,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=u;break}if(64&R){e.msg="invalid literal/length code",r.mode=l;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(F=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(B=r.distcode[y&(1<>>16&255,N=65535&B,!((I=B>>>24)<=b);){if(0===w)break e;w--,y+=p[f++]<>C)])>>>16&255,N=65535&B,!(C+(I=B>>>24)<=b);){if(0===w)break e;w--,y+=p[f++]<>>=C,b-=C,r.back+=C}if(y>>>=I,b-=I,r.back+=I,64&R){e.msg="invalid distance code",r.mode=l;break}r.offset=N,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(F=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===g)break e;if(T=E-g,r.offset>T){if((T=r.offset-T)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=l;break}T>r.wnext?(T-=r.wnext,A=r.wsize-T):A=r.wnext-T,T>r.length&&(T=r.length),S=r.window}else S=d,A=m-r.offset,T=r.length;T>g&&(T=g),g-=T,r.length-=T;do{d[m++]=S[A++]}while(--T);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;d[m++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===w)break e;w--,y|=p[f++]<{"use strict";var n=r(4236),s=[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],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[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,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,c,u,l,h,p){var d,f,m,w,g,y,b,x,v,_=p.bits,E=0,T=0,A=0,S=0,I=0,R=0,N=0,C=0,O=0,k=0,L=null,D=0,P=new n.Buf16(16),F=new n.Buf16(16),B=null,M=0;for(E=0;E<=15;E++)P[E]=0;for(T=0;T=1&&0===P[S];S--);if(I>S&&(I=S),0===S)return u[l++]=20971520,u[l++]=20971520,p.bits=1,0;for(A=1;A0&&(0===e||1!==S))return-1;for(F[1]=0,E=1;E<15;E++)F[E+1]=F[E]+P[E];for(T=0;T852||2===e&&O>592)return 1;for(;;){b=E-N,h[T]y?(x=B[M+h[T]],v=L[D+h[T]]):(x=96,v=0),d=1<>N)+(f-=d)]=b<<24|x<<16|v|0}while(0!==f);for(d=1<>=1;if(0!==d?(k&=d-1,k+=d):k=0,T++,0==--P[E]){if(E===S)break;E=t[r+h[T]]}if(E>I&&(k&w)!==m){for(0===N&&(N=I),g+=A,C=1<<(R=E-N);R+N852||2===e&&O>592)return 1;u[m=k&w]=I<<24|R<<16|g-l|0}}return 0!==k&&(u[g+k]=E-N<<24|64<<16|0),p.bits=I,0}},8898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(e,t,r)=>{"use strict";var n=r(4236);function s(e){for(var t=e.length;--t>=0;)e[t]=0}var i=[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],o=[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],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);s(u);var l=new Array(60);s(l);var h=new Array(512);s(h);var p=new Array(256);s(p);var d=new Array(29);s(d);var f,m,w,g=new Array(30);function y(e,t,r,n,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=s,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function x(e){return e<256?h[e]:h[256+(e>>>7)]}function v(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function A(e,t,r){var n,s,i=new Array(16),o=0;for(n=1;n<=15;n++)i[n]=o=o+r[n-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=T(i[a]++,a))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function R(e,t,r,n){var s=2*t,i=2*r;return e[s]>1;r>=1;r--)N(e,i,r);s=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*s]=i[2*r]+i[2*n],e.depth[s]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=s,e.heap[1]=s++,N(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,s,i,o,a,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(i=0;i<=15;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)>f&&(i=f,m++),c[2*n+1]=i,n>u||(e.bl_count[i]++,o=0,n>=d&&(o=p[n-d]),a=c[2*n],e.opt_len+=a*(i+o),h&&(e.static_len+=a*(l[2*n+1]+o)));if(0!==m){do{for(i=f-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(i=f;0!==i;i--)for(n=e.bl_count[i];0!==n;)(s=e.heap[--r])>u||(c[2*s+1]!==i&&(e.opt_len+=(i-c[2*s+1])*c[2*s],c[2*s+1]=i),n--)}}(e,t),A(i,u,e.bl_count)}function k(e,t,r){var n,s,i=-1,o=t[1],a=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)s=o,o=t[2*(n+1)+1],++a>=7;n<30;n++)for(g[n]=s<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),O(e,e.l_desc),O(e,e.d_desc),o=function(e){var t;for(k(e,e.dyn_ltree,e.l_desc.max_code),k(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=s&&(s=i)):s=i=r+5,r+4<=s&&-1!==t?P(e,t,r,n):4===e.strategy||i===s?(_(e,2+(n?1:0),3),C(e,u,l)):(_(e,4+(n?1:0),3),function(e,t,r,n){var s;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),s=0;s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+256+1)]++,e.dyn_dtree[2*x(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),E(e,256,u),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4155:e=>{var t,r,n=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,c=[],u=!1,l=-1;function h(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=o(h);u=!0;for(var t=c.length;t;){for(a=c,c=[];++l1)for(var r=1;r{var n=r(8764),s=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),i(s,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6099:(e,t,r)=>{!function(e){e.parser=function(e,t){return new s(e,t)},e.SAXParser=s,e.SAXStream=o,e.createStream=function(e,t){return new o(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function s(t,r){if(!(this instanceof s))return new s(t,r);var i=this;!function(e){for(var t=0,r=n.length;t"===i?(A(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=_.TEXT):m(i)?(r.state=_.SGML_DECL_QUOTED,r.sgmlDecl+=i):r.sgmlDecl+=i;continue;case _.SGML_DECL_QUOTED:i===r.q&&(r.state=_.SGML_DECL,r.q=""),r.sgmlDecl+=i;continue;case _.DOCTYPE:">"===i?(r.state=_.TEXT,A(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=i,"["===i?r.state=_.DOCTYPE_DTD:m(i)&&(r.state=_.DOCTYPE_QUOTED,r.q=i));continue;case _.DOCTYPE_QUOTED:r.doctype+=i,i===r.q&&(r.q="",r.state=_.DOCTYPE);continue;case _.DOCTYPE_DTD:r.doctype+=i,"]"===i?r.state=_.DOCTYPE:m(i)&&(r.state=_.DOCTYPE_DTD_QUOTED,r.q=i);continue;case _.DOCTYPE_DTD_QUOTED:r.doctype+=i,i===r.q&&(r.state=_.DOCTYPE_DTD,r.q="");continue;case _.COMMENT:"-"===i?r.state=_.COMMENT_ENDING:r.comment+=i;continue;case _.COMMENT_ENDING:"-"===i?(r.state=_.COMMENT_ENDED,r.comment=I(r.opt,r.comment),r.comment&&A(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+i,r.state=_.COMMENT);continue;case _.COMMENT_ENDED:">"!==i?(C(r,"Malformed comment"),r.comment+="--"+i,r.state=_.COMMENT):r.state=_.TEXT;continue;case _.CDATA:"]"===i?r.state=_.CDATA_ENDING:r.cdata+=i;continue;case _.CDATA_ENDING:"]"===i?r.state=_.CDATA_ENDING_2:(r.cdata+="]"+i,r.state=_.CDATA);continue;case _.CDATA_ENDING_2:">"===i?(r.cdata&&A(r,"oncdata",r.cdata),A(r,"onclosecdata"),r.cdata="",r.state=_.TEXT):"]"===i?r.cdata+="]":(r.cdata+="]]"+i,r.state=_.CDATA);continue;case _.PROC_INST:"?"===i?r.state=_.PROC_INST_ENDING:f(i)?r.state=_.PROC_INST_BODY:r.procInstName+=i;continue;case _.PROC_INST_BODY:if(!r.procInstBody&&f(i))continue;"?"===i?r.state=_.PROC_INST_ENDING:r.procInstBody+=i;continue;case _.PROC_INST_ENDING:">"===i?(A(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=_.TEXT):(r.procInstBody+="?"+i,r.state=_.PROC_INST_BODY);continue;case _.OPEN_TAG:g(h,i)?r.tagName+=i:(O(r),">"===i?D(r):"/"===i?r.state=_.OPEN_TAG_SLASH:(f(i)||C(r,"Invalid character in tag name"),r.state=_.ATTRIB));continue;case _.OPEN_TAG_SLASH:">"===i?(D(r,!0),P(r)):(C(r,"Forward-slash in opening tag not followed by >"),r.state=_.ATTRIB);continue;case _.ATTRIB:if(f(i))continue;">"===i?D(r):"/"===i?r.state=_.OPEN_TAG_SLASH:g(l,i)?(r.attribName=i,r.attribValue="",r.state=_.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case _.ATTRIB_NAME:"="===i?r.state=_.ATTRIB_VALUE:">"===i?(C(r,"Attribute without value"),r.attribValue=r.attribName,L(r),D(r)):f(i)?r.state=_.ATTRIB_NAME_SAW_WHITE:g(h,i)?r.attribName+=i:C(r,"Invalid attribute name");continue;case _.ATTRIB_NAME_SAW_WHITE:if("="===i)r.state=_.ATTRIB_VALUE;else{if(f(i))continue;C(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",A(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===i?D(r):g(l,i)?(r.attribName=i,r.state=_.ATTRIB_NAME):(C(r,"Invalid attribute name"),r.state=_.ATTRIB)}continue;case _.ATTRIB_VALUE:if(f(i))continue;m(i)?(r.q=i,r.state=_.ATTRIB_VALUE_QUOTED):(C(r,"Unquoted attribute value"),r.state=_.ATTRIB_VALUE_UNQUOTED,r.attribValue=i);continue;case _.ATTRIB_VALUE_QUOTED:if(i!==r.q){"&"===i?r.state=_.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=i;continue}L(r),r.q="",r.state=_.ATTRIB_VALUE_CLOSED;continue;case _.ATTRIB_VALUE_CLOSED:f(i)?r.state=_.ATTRIB:">"===i?D(r):"/"===i?r.state=_.OPEN_TAG_SLASH:g(l,i)?(C(r,"No whitespace between attributes"),r.attribName=i,r.attribValue="",r.state=_.ATTRIB_NAME):C(r,"Invalid attribute name");continue;case _.ATTRIB_VALUE_UNQUOTED:if(!w(i)){"&"===i?r.state=_.ATTRIB_VALUE_ENTITY_U:r.attribValue+=i;continue}L(r),">"===i?D(r):r.state=_.ATTRIB;continue;case _.CLOSE_TAG:if(r.tagName)">"===i?P(r):g(h,i)?r.tagName+=i:r.script?(r.script+=""===i?P(r):C(r,"Invalid characters in closing tag");continue;case _.TEXT_ENTITY:case _.ATTRIB_VALUE_ENTITY_Q:case _.ATTRIB_VALUE_ENTITY_U:var c,u;switch(r.state){case _.TEXT_ENTITY:c=_.TEXT,u="textNode";break;case _.ATTRIB_VALUE_ENTITY_Q:c=_.ATTRIB_VALUE_QUOTED,u="attribValue";break;case _.ATTRIB_VALUE_ENTITY_U:c=_.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===i?(r[u]+=F(r),r.entity="",r.state=c):g(r.entity.length?d:p,i)?r.entity+=i:(C(r,"Invalid character in entity name"),r[u]+="&"+r.entity+i,r.entity="",r.state=c);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(t){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),s=0,i=0,o=n.length;ir)switch(n[i]){case"textNode":S(t);break;case"cdata":A(t,"oncdata",t.cdata),t.cdata="";break;case"script":A(t,"onscript",t.script),t.script="";break;default:R(t,"Max buffer length exceeded: "+n[i])}s=Math.max(s,a)}var c=e.MAX_BUFFER_LENGTH-s;t.bufferCheckPosition=c+t.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;S(e=this),""!==e.cdata&&(A(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(A(e,"onscript",e.script),e.script="")}};try{t=r(2830).Stream}catch(e){t=function(){}}var i=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function o(e,r){if(!(this instanceof o))return new o(e,r);t.apply(this),this._parser=new s(e,r),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,i.forEach((function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}o.prototype=Object.create(t.prototype,{constructor:{value:o}}),o.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=r(2553).s;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(e,r){var n=this;return n._parser["on"+e]||-1===i.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),t.prototype.on.call(n,e,r)};var a="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/2000/xmlns/",u={xml:a,xmlns:c},l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function f(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function m(e){return'"'===e||"'"===e}function w(e){return">"===e||f(e)}function g(e,t){return e.test(t)}function y(e,t){return!g(e,t)}var b,x,v,_=0;for(var E in e.STATE={BEGIN:_++,BEGIN_WHITESPACE:_++,TEXT:_++,TEXT_ENTITY:_++,OPEN_WAKA:_++,SGML_DECL:_++,SGML_DECL_QUOTED:_++,DOCTYPE:_++,DOCTYPE_QUOTED:_++,DOCTYPE_DTD:_++,DOCTYPE_DTD_QUOTED:_++,COMMENT_STARTING:_++,COMMENT:_++,COMMENT_ENDING:_++,COMMENT_ENDED:_++,CDATA:_++,CDATA_ENDING:_++,CDATA_ENDING_2:_++,PROC_INST:_++,PROC_INST_BODY:_++,PROC_INST_ENDING:_++,OPEN_TAG:_++,OPEN_TAG_SLASH:_++,ATTRIB:_++,ATTRIB_NAME:_++,ATTRIB_NAME_SAW_WHITE:_++,ATTRIB_VALUE:_++,ATTRIB_VALUE_QUOTED:_++,ATTRIB_VALUE_CLOSED:_++,ATTRIB_VALUE_UNQUOTED:_++,ATTRIB_VALUE_ENTITY_Q:_++,ATTRIB_VALUE_ENTITY_U:_++,CLOSE_TAG:_++,CLOSE_TAG_SAW_WHITE:_++,SCRIPT:_++,SCRIPT_ENDING:_++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],n="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=n})),e.STATE)e.STATE[e.STATE[E]]=E;function T(e,t,r){e[t]&&e[t](r)}function A(e,t,r){e.textNode&&S(e),T(e,t,r)}function S(e){e.textNode=I(e.opt,e.textNode),e.textNode&&T(e,"ontext",e.textNode),e.textNode=""}function I(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return S(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,T(e,"onerror",t),e}function N(e){return e.sawRoot&&!e.closedRoot&&C(e,"Unclosed root tag"),e.state!==_.BEGIN&&e.state!==_.BEGIN_WHITESPACE&&e.state!==_.TEXT&&R(e,"Unexpected end"),S(e),e.c="",e.closed=!0,T(e,"onend"),s.call(e,e.strict,e.opt),e}function C(e,t){if("object"!=typeof e||!(e instanceof s))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function O(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,A(e,"onopentagstart",r)}function k(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],s=r[1];return t&&"xmlns"===e&&(n="xmlns",s=""),{prefix:n,local:s}}function L(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=k(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==a)C(e,"xml: prefix must be bound to "+a+"\nActual: "+e.attribValue);else if("xmlns"===n&&e.attribValue!==c)C(e,"xmlns: prefix must be bound to "+c+"\nActual: "+e.attribValue);else{var s=e.tag,i=e.tags[e.tags.length-1]||e;s.ns===i.ns&&(s.ns=Object.create(i.ns)),s.ns[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,A(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function D(e,t){if(e.opt.xmlns){var r=e.tag,n=k(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(C(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=n.prefix);var s=e.tags[e.tags.length-1]||e;r.ns&&s.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){A(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var i=0,o=e.attribList.length;i",e.tagName="",void(e.state=_.SCRIPT);A(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)C(e,"Unexpected close tag");if(t<0)return C(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=_.TEXT);e.tagName=r;for(var s=e.tags.length;s-- >t;){var i=e.tag=e.tags.pop();e.tagName=e.tag.name,A(e,"onclosetag",e.tagName);var o={};for(var a in i.ns)o[a]=i.ns[a];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&i.ns!==c.ns&&Object.keys(i.ns).forEach((function(t){var r=i.ns[t];A(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=_.TEXT}function F(e){var t,r=e.entity,n=r.toLowerCase(),s="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:("#"===(r=n).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),s=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),s=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||s.toLowerCase()!==r?(C(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function B(e,t){"<"===t?(e.state=_.OPEN_WAKA,e.startTagPosition=e.position):f(t)||(C(e,"Non-whitespace before first tag."),e.textNode=t,e.state=_.TEXT)}function M(e,t){var r="";return t1114111||x(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,n.push(e,t)),(s+1===i||n.length>r)&&(o+=b.apply(null,n),n.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:v,configurable:!0,writable:!0}):String.fromCodePoint=v)}(t)},4889:function(e,t,r){var n=r(4155);!function(e,t){"use strict";if(!e.setImmediate){var r,s,i,o,a,c=1,u={},l=!1,h=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){n.nextTick((function(){f(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){i.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(s=h.documentElement,r=function(e){var t=h.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):r=function(e){setTimeout(f,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{e.exports=s;var n=r(7187).EventEmitter;function s(){n.call(this)}r(5717)(s,n),s.Readable=r(6577),s.Writable=r(323),s.Duplex=r(8656),s.Transform=r(4473),s.PassThrough=r(2366),s.finished=r(1086),s.pipeline=r(6472),s.Stream=s,s.prototype.pipe=function(e,t){var r=this;function s(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",s),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",c));var o=!1;function a(){o||(o=!0,e.end())}function c(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",s),e.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",u),e.on("error",u),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},8106:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var s=function(e){var t,n;function s(t,n,s){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,s))||this}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s}(n);s.prototype.name=n.name,s.prototype.code=e,t[e]=s}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var s,i,o,a,c;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(s="must not be",t=t.replace(/^not /,"")):s="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(s," ").concat(n(t,"type"));else{var u=("number"!=typeof c&&(c=0),c+".".length>(a=e).length||-1===a.indexOf(".",c)?"argument":"property");o='The "'.concat(e,'" ').concat(u," ").concat(s," ").concat(n(t,"type"))}return o+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},8656:(e,t,r)=>{"use strict";var n=r(4155),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(6577),o=r(323);r(5717)(l,i);for(var a=s(o.prototype),c=0;c{"use strict";e.exports=s;var n=r(4473);function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}r(5717)(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},6577:(e,t,r)=>{"use strict";var n,s=r(4155);e.exports=A,A.ReadableState=T,r(7187).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},a=r(3194),c=r(8764).Buffer,u=r.g.Uint8Array||function(){},l=r(5575);i=l&&l.debuglog?l.debuglog("stream"):function(){};var h,p,d,f=r(9686),m=r(1029),w=r(94).getHighWaterMark,g=r(8106).q,y=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,x=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(A,a);var _=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function T(e,t,s){n=n||r(8656),e=e||{},"boolean"!=typeof s&&(s=t instanceof n),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",s),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(2553).s),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(8656),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new T(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function S(e,t,r,n,s){i("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,a);else if(s||(o=function(e,t){var r,n;return n=t,c.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(a,t)),o)_(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n)a.endEmitted?_(e,new v):I(e,a,t,!0);else if(a.ended)_(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?I(e,a,t,!1):k(e,a)):I(e,a,t,!1)}else n||(a.reading=!1,k(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,s.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function k(e,t){t.readingMore||(t.readingMore=!0,s.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){i("readable nexttick read 0"),e.read(0)}function F(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,s.nextTick(H,t,e))}function H(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function j(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):C(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,s=t.needReadable;return i("need readable",s),(0===t.length||t.length-e0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){_(this,new x("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===s.stdout||e===s.stderr?m:c;function c(){i("onend"),e.end()}n.endEmitted?s.nextTick(a):r.once("end",a),e.on("unpipe",(function t(s,o){i("onunpipe"),s===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",u),e.removeListener("error",p),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",h),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,B(e))}}(r);e.on("drain",u);var l=!1;function h(t){i("ondata");var s=e.write(t);i("dest.write",s),!1===s&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==j(n.pipes,e))&&!l&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function p(t){i("onerror",t),m(),e.removeListener("error",p),0===o(e,"error")&&_(e,t)}function d(){e.removeListener("finish",f),m()}function f(){i("onfinish"),e.removeListener("close",d),m()}function m(){i("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",f),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?C(this):n.reading||s.nextTick(P,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&s.nextTick(D,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||s.nextTick(D,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,s.nextTick(F,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var s in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){i("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(n=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var o=0;o{"use strict";e.exports=l;var n=r(8106).q,s=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(8656);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length{"use strict";var n,s=r(4155);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var s=n.callback;t.pendingcb--,s(void 0),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=T;var o,a={deprecate:r(4927)},c=r(3194),u=r(8764).Buffer,l=r.g.Uint8Array||function(){},h=r(1029),p=r(94).getHighWaterMark,d=r(8106).q,f=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,x=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=h.errorOrDestroy;function E(){}function T(e,t,o){n=n||r(8656),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new w;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(s.nextTick(i,n),s.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,n)):(i(n),e._writableState.errorEmitted=!0,_(e,n),O(e,t))}(e,r,n,t,i);else{var o=N(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?s.nextTick(I,e,r,o,i):I(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(n=n||r(8656));if(!t&&!o.call(A,this))return new A(e);this._writableState=new T(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function S(e,t,r,n,s,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(s,t.onwrite):e._write(s,i,t.onwrite),t.sync=!1}function I(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,c=!0;r;)s[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;s.allBuffers=c,S(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,h=r.callback;if(S(e,t,!1,t.objectMode?1:u.length,u,l,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=N(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,s.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(A,c),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===A&&e&&e._writableState instanceof T}})):o=function(e){return e instanceof this},A.prototype.pipe=function(){_(this,new g)},A.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof l);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new x;_(e,r),s.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new f("chunk",["string","Buffer"],r)),!i||(_(e,i),s.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,s,i){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,s);n!==o&&(r=!0,s="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?s.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(e,t){t(e)}},828:(e,t,r)=>{"use strict";var n,s=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(1086),a=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[h]=null,e[a]=null,e[c]=null,t(f(r,!1)))}}function w(e){s.nextTick(m,e)}var g=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){s.nextTick((function(){e[u]?r(e[u]):t(f(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(f(void 0,!0)):t[p](r,n)}),n)}}(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(f(i,!1));r=new Promise(this[p])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(f(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(y,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,p,{value:function(e,t){var n=r[d].read();n?(r[h]=null,r[a]=null,r[c]=null,e(f(n,!1))):(r[a]=e,r[c]=t)},writable:!0}),t));return r[h]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];return null!==t&&(r[h]=null,r[a]=null,r[c]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[c]=null,n(f(void 0,!0))),r[l]=!0})),e.on("readable",w.bind(null,r)),r}},9686:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(8764).Buffer,o=r(5575).inspect,a=o&&o.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n,s=i.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,n=a,i.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return s}},{key:"consume",value:function(e,t){var r;return es.length?s.length:e;if(i===s.length?n+=s:n+=s.slice(0,e),0==(e-=i)){i===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,o),0==(e-=o)){o===s.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(o));break}++n}return this.length-=n,t}},{key:a,value:function(e,t){return o(this,function(e){for(var t=1;t{"use strict";var n=r(4155);function s(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(i,r):(r._writableState.errorEmitted=!0,n.nextTick(s,r,e)):n.nextTick(s,r,e):t?(n.nextTick(i,r),t(e)):n.nextTick(i,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},1086:(e,t,r)=>{"use strict";var n=r(8106).q.ERR_STREAM_PREMATURE_CLOSE;function s(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);r||(r={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},6472:(e,t,r)=>{"use strict";var n,s=r(8106).q,i=s.ERR_MISSING_ARGS,o=s.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e,t,s,i){i=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(i);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(1086)),n(e,{readable:t,writable:s},(function(e){if(e)return i(e);a=!0,i()}));var c=!1;return function(t){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new o("pipe"))}}function u(e){e()}function l(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r0,(function(e){n||(n=e),e&&o.forEach(u),i||(o.forEach(u),s(n))}))}));return t.reduce(l)}},94:(e,t,r)=>{"use strict";var n=r(8106).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,s){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(s?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},3194:(e,t,r)=>{e.exports=r(7187).EventEmitter},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,s=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(s>0&&(e.lastNeed=s-1),s):--n=0?(s>0&&(e.lastNeed=s-2),s):--n=0?(s>0&&(2===s?s=0:e.lastNeed=s-3),s):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},5457:(e,t,r)=>{"use strict";r.d(t,{vw:()=>i,rq:()=>s,EL:()=>a,NY:()=>o});let n=0;const s=e=>Math.floor(e/25.4*72*20),i=e=>Math.floor(72*e*20),o=()=>++n,a=()=>((e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t})().toLowerCase()},5575:(e,t,r)=>{"use strict";r.r(t),r.d(t,{convertInchesToTwip:()=>n.vw,convertMillimetersToTwip:()=>n.rq,dateTimeValue:()=>s.sF,decimalNumber:()=>s.vH,eighthPointMeasureValue:()=>s.LV,hexColorValue:()=>s.dg,hpsMeasureValue:()=>s.KR,longHexNumber:()=>s.mA,measurementOrPercentValue:()=>s.aB,percentageValue:()=>s.wp,pointMeasureValue:()=>s.gg,positiveUniversalMeasureValue:()=>s._p,shortHexNumber:()=>s.G0,signedHpsMeasureValue:()=>s.Rg,signedTwipsMeasureValue:()=>s.xb,twipsMeasureValue:()=>s.Jd,uCharHexNumber:()=>s.xD,uniqueId:()=>n.EL,uniqueNumericId:()=>n.NY,universalMeasureValue:()=>s.KC,unsignedDecimalNumber:()=>s.f$});var n=r(5457),s=r(6595)},6595:(e,t,r)=>{"use strict";r.d(t,{G0:()=>a,Jd:()=>w,KC:()=>u,KR:()=>f,LV:()=>b,Rg:()=>m,_p:()=>h,aB:()=>y,dg:()=>p,f$:()=>s,gg:()=>x,mA:()=>o,sF:()=>v,vH:()=>n,wp:()=>g,xD:()=>c,xb:()=>d});const n=e=>{if(isNaN(e))throw new Error(`Invalid value '${e}' specified. Must be an integer.`);return Math.floor(e)},s=e=>{const t=n(e);if(t<0)throw new Error(`Invalid value '${e}' specified. Must be a positive integer.`);return t},i=(e,t)=>{const r=2*t;if(e.length!==r||isNaN(Number(`0x${e}`)))throw new Error(`Invalid hex value '${e}'. Expected ${r} digit hex value`);return e},o=e=>i(e,4),a=e=>i(e,2),c=e=>i(e,1),u=e=>{const t=e.slice(-2);if(!l.includes(t))throw new Error(`Invalid unit '${t}' specified. Valid units are ${l.join(", ")}`);const r=e.substring(0,e.length-2);if(isNaN(Number(r)))throw new Error(`Invalid value '${r}' specified. Expected a valid number.`);return`${Number(r)}${t}`},l=["mm","cm","in","pt","pc","pi"],h=e=>{const t=u(e);if(parseFloat(t)<0)throw new Error(`Invalid value '${t}' specified. Expected a positive number.`);return t},p=e=>{if("auto"===e)return e;const t="#"===e.charAt(0)?e.substring(1):e;return i(t,3)},d=e=>"string"==typeof e?u(e):n(e),f=e=>"string"==typeof e?h(e):s(e),m=e=>"string"==typeof e?u(e):n(e),w=e=>"string"==typeof e?h(e):s(e),g=e=>{if("%"!==e.slice(-1))throw new Error(`Invalid value '${e}'. Expected percentage value (eg '55%')`);const t=e.substring(0,e.length-1);if(isNaN(Number(t)))throw new Error(`Invalid value '${t}' specified. Expected a valid number.`);return`${Number(t)}%`},y=e=>"number"==typeof e?n(e):"%"===e.slice(-1)?g(e):u(e),b=s,x=s,v=e=>e.toISOString()},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},9881:e=>{e.exports={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}}},7888:(e,t,r)=>{var n=r(1229),s=r(1388),i=r(6501),o=r(4673);e.exports={xml2js:n,xml2json:s,js2xml:i,json2xml:o}},6501:(e,t,r)=>{var n,s,i=r(4740),o=r(9881).isArray;function a(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function c(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,s,n));var i,o,c,u,l=[];for(i in e)e.hasOwnProperty(i)&&null!==e[i]&&void 0!==e[i]&&(u=t.noQuotesForNativeAttributes&&"string"!=typeof e[i]?"":'"',o=(o=""+e[i]).replace(/"/g,"""),c="attributeNameFn"in t?t.attributeNameFn(i,o,s,n):i,l.push(t.spaces&&t.indentAttributes?a(t,r+1,!1):" "),l.push(c+"="+u+("attributeValueFn"in t?t.attributeValueFn(o,i,s,n):o)+u));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&l.push(a(t,r,!1)),l.join("")}function u(e,t,r){return n=e,s="xml",t.ignoreDeclaration?"":""}function l(e,t,r){if(t.ignoreInstruction)return"";var i;for(i in e)if(e.hasOwnProperty(i))break;var o="instructionNameFn"in t?t.instructionNameFn(i,e[i],s,n):i;if("object"==typeof e[i])return n=e,s=o,"";var a=e[i]?e[i]:"";return"instructionFn"in t&&(a=t.instructionFn(a,i,s,n)),""}function h(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,s,n):e)+"--\x3e"}function p(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function d(e,t){return t.ignoreDoctype?"":""}function f(e,t){return t.ignoreText?"":(e=(e=(e=""+e).replace(/&/g,"&")).replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,s,n):e)}function m(e,t,r,i){return e.reduce((function(e,o){var u=a(t,r,i&&!e);switch(o.type){case"element":return e+u+function(e,t,r){n=e,s=e.name;var i=[],o="elementNameFn"in t?t.elementNameFn(e.name,e):e.name;i.push("<"+o),e[t.attributesKey]&&i.push(c(e[t.attributesKey],t,r));var a=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&"preserve"===e[t.attributesKey]["xml:space"];return a||(a="fullTagEmptyElementFn"in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement),a?(i.push(">"),e[t.elementsKey]&&e[t.elementsKey].length&&(i.push(m(e[t.elementsKey],t,r+1)),n=e,s=e.name),i.push(t.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r")):i.push("/>"),i.join("")}(o,t,r);case"comment":return e+u+h(o[t.commentKey],t);case"doctype":return e+u+d(o[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?u:"")+p(o[t.cdataKey],t);case"text":return e+(t.indentText?u:"")+f(o[t.textKey],t);case"instruction":var w={};return w[o[t.nameKey]]=o[t.attributesKey]?o:o[t.instructionKey],e+(t.indentInstruction?u:"")+l(w,t,r)}}),"")}function w(e,t,r){var n;for(n in e)if(e.hasOwnProperty(n))switch(n){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function g(e,t,r,i,o){n=e,s=t;var u="elementNameFn"in r?r.elementNameFn(t,e):t;if(null==e||""===e)return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+u+">":"<"+u+"/>";var l=[];if(t){if(l.push("<"+u),"object"!=typeof e)return l.push(">"+f(e,r)+""),l.join("");e[r.attributesKey]&&l.push(c(e[r.attributesKey],r,i));var h=w(e,r,!0)||e[r.attributesKey]&&"preserve"===e[r.attributesKey]["xml:space"];if(h||(h="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(t,e):r.fullTagEmptyElement),!h)return l.push("/>"),l.join("");l.push(">")}return l.push(y(e,r,i+1,!1)),n=e,s=t,t&&l.push((o?a(r,i,!1):"")+""),l.join("")}function y(e,t,r,n){var s,i,c,m=[];for(i in e)if(e.hasOwnProperty(i))for(c=o(e[i])?e[i]:[e[i]],s=0;s{var n=r(6501);e.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var r=null;if("string"==typeof e)try{r=JSON.parse(e)}catch(e){throw new Error("The JSON structure is invalid")}else r=e;return n(r,t)}},4740:(e,t,r)=>{var n=r(9881).isArray;e.exports={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||n(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}},1229:(e,t,r)=>{var n,s,i=r(6099),o=r(4740),a=r(9881).isArray;function c(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function u(e,t){var r;if(n.compact){if(!s[n[e+"Key"]]&&(a(n.alwaysArray)?-1!==n.alwaysArray.indexOf(n[e+"Key"]):n.alwaysArray)&&(s[n[e+"Key"]]=[]),s[n[e+"Key"]]&&!a(s[n[e+"Key"]])&&(s[n[e+"Key"]]=[s[n[e+"Key"]]]),e+"Fn"in n&&"string"==typeof t&&(t=n[e+"Fn"](t,s)),"instruction"===e&&("instructionFn"in n||"instructionNameFn"in n))for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in n)t[r]=n.instructionFn(t[r],r,s);else{var i=t[r];delete t[r],t[n.instructionNameFn(r,i,s)]=i}a(s[n[e+"Key"]])?s[n[e+"Key"]].push(t):s[n[e+"Key"]]=t}else{s[n.elementsKey]||(s[n.elementsKey]=[]);var o={};if(o[n.typeKey]=e,"instruction"===e){for(r in t)if(t.hasOwnProperty(r))break;o[n.nameKey]="instructionNameFn"in n?n.instructionNameFn(r,t,s):r,n.instructionHasAttributes?(o[n.attributesKey]=t[r][n.attributesKey],"instructionFn"in n&&(o[n.attributesKey]=n.instructionFn(o[n.attributesKey],r,s))):("instructionFn"in n&&(t[r]=n.instructionFn(t[r],r,s)),o[n.instructionKey]=t[r])}else e+"Fn"in n&&(t=n[e+"Fn"](t,s)),o[n[e+"Key"]]=t;n.addParent&&(o[n.parentKey]=s),s[n.elementsKey].push(o)}}function l(e){var t;if("attributesFn"in n&&e&&(e=n.attributesFn(e,s)),(n.trim||"attributeValueFn"in n||"attributeNameFn"in n||n.nativeTypeAttributes)&&e)for(t in e)if(e.hasOwnProperty(t)&&(n.trim&&(e[t]=e[t].trim()),n.nativeTypeAttributes&&(e[t]=c(e[t])),"attributeValueFn"in n&&(e[t]=n.attributeValueFn(e[t],t,s)),"attributeNameFn"in n)){var r=e[t];delete e[t],e[n.attributeNameFn(t,e[t],s)]=r}return e}function h(e){var t={};if(e.body&&("xml"===e.name.toLowerCase()||n.instructionHasAttributes)){for(var r,i=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(r=i.exec(e.body));)t[r[1]]=r[2]||r[3]||r[4];t=l(t)}if("xml"===e.name.toLowerCase()){if(n.ignoreDeclaration)return;s[n.declarationKey]={},Object.keys(t).length&&(s[n.declarationKey][n.attributesKey]=t),n.addParent&&(s[n.declarationKey][n.parentKey]=s)}else{if(n.ignoreInstruction)return;n.trim&&(e.body=e.body.trim());var o={};n.instructionHasAttributes&&Object.keys(t).length?(o[e.name]={},o[e.name][n.attributesKey]=t):o[e.name]=e.body,u("instruction",o)}}function p(e,t){var r;if("object"==typeof e&&(t=e.attributes,e=e.name),t=l(t),"elementNameFn"in n&&(e=n.elementNameFn(e,s)),n.compact){var i;if(r={},!n.ignoreAttributes&&t&&Object.keys(t).length)for(i in r[n.attributesKey]={},t)t.hasOwnProperty(i)&&(r[n.attributesKey][i]=t[i]);!(e in s)&&(a(n.alwaysArray)?-1!==n.alwaysArray.indexOf(e):n.alwaysArray)&&(s[e]=[]),s[e]&&!a(s[e])&&(s[e]=[s[e]]),a(s[e])?s[e].push(r):s[e]=r}else s[n.elementsKey]||(s[n.elementsKey]=[]),(r={})[n.typeKey]="element",r[n.nameKey]=e,!n.ignoreAttributes&&t&&Object.keys(t).length&&(r[n.attributesKey]=t),n.alwaysChildren&&(r[n.elementsKey]=[]),s[n.elementsKey].push(r);r[n.parentKey]=s,s=r}function d(e){n.ignoreText||(e.trim()||n.captureSpacesBetweenElements)&&(n.trim&&(e=e.trim()),n.nativeType&&(e=c(e)),n.sanitize&&(e=e.replace(/&/g,"&").replace(//g,">")),u("text",e))}function f(e){n.ignoreComment||(n.trim&&(e=e.trim()),u("comment",e))}function m(e){var t=s[n.parentKey];n.addParent||delete s[n.parentKey],s=t}function w(e){n.ignoreCdata||(n.trim&&(e=e.trim()),u("cdata",e))}function g(e){n.ignoreDoctype||(e=e.replace(/^ /,""),n.trim&&(e=e.trim()),u("doctype",e))}function y(e){e.note=e}e.exports=function(e,t){var r=i.parser(!0,{}),a={};if(s=a,n=function(e){return n=o.copyOptions(e),o.ensureFlagExists("ignoreDeclaration",n),o.ensureFlagExists("ignoreInstruction",n),o.ensureFlagExists("ignoreAttributes",n),o.ensureFlagExists("ignoreText",n),o.ensureFlagExists("ignoreComment",n),o.ensureFlagExists("ignoreCdata",n),o.ensureFlagExists("ignoreDoctype",n),o.ensureFlagExists("compact",n),o.ensureFlagExists("alwaysChildren",n),o.ensureFlagExists("addParent",n),o.ensureFlagExists("trim",n),o.ensureFlagExists("nativeType",n),o.ensureFlagExists("nativeTypeAttributes",n),o.ensureFlagExists("sanitize",n),o.ensureFlagExists("instructionHasAttributes",n),o.ensureFlagExists("captureSpacesBetweenElements",n),o.ensureAlwaysArrayExists(n),o.ensureKeyExists("declaration",n),o.ensureKeyExists("instruction",n),o.ensureKeyExists("attributes",n),o.ensureKeyExists("text",n),o.ensureKeyExists("comment",n),o.ensureKeyExists("cdata",n),o.ensureKeyExists("doctype",n),o.ensureKeyExists("type",n),o.ensureKeyExists("name",n),o.ensureKeyExists("elements",n),o.ensureKeyExists("parent",n),o.checkFnExists("doctype",n),o.checkFnExists("instruction",n),o.checkFnExists("cdata",n),o.checkFnExists("comment",n),o.checkFnExists("text",n),o.checkFnExists("instructionName",n),o.checkFnExists("elementName",n),o.checkFnExists("attributeName",n),o.checkFnExists("attributeValue",n),o.checkFnExists("attributes",n),n}(t),r.opt={strictEntities:!0},r.onopentag=p,r.ontext=d,r.oncomment=f,r.onclosetag=m,r.onerror=y,r.oncdata=w,r.ondoctype=g,r.onprocessinginstruction=h,r.write(e).close(),a[n.elementsKey]){var c=a[n.elementsKey];delete a[n.elementsKey],a[n.elementsKey]=c,delete a.text}return a}},1388:(e,t,r)=>{var n=r(4740),s=r(1229);e.exports=function(e,t){var r,i,o;return r=function(e){var t=n.copyOptions(e);return n.ensureSpacesExists(t),t}(t),i=s(e,r),o="compact"in r&&r.compact?"_parent":"parent",("addParent"in r&&r.addParent?JSON.stringify(i,(function(e,t){return e===o?"_":t}),r.spaces):JSON.stringify(i,null,r.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},255:e=>{var t={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=function(e){return e&&e.replace?e.replace(/([&"<>'])/g,(function(e,r){return t[r]})):e}},3479:(e,t,r)=>{var n=r(4155),s=r(255),i=r(2830).Stream;function o(e,t,r){r=r||0;var n,i,a=(n=t,new Array(r||0).join(n||"")),c=e;if("object"==typeof e&&(c=e[i=Object.keys(e)[0]])&&c._elem)return c._elem.name=i,c._elem.icount=r,c._elem.indent=t,c._elem.indents=a,c._elem.interrupt=c,c._elem;var u,l=[],h=[];function p(e){Object.keys(e).forEach((function(t){l.push(function(e,t){return e+'="'+s(t)+'"'}(t,e[t]))}))}switch(typeof c){case"object":if(null===c)break;c._attr&&p(c._attr),c._cdata&&h.push(("/g,"]]]]>")+"]]>"),c.forEach&&(u=!1,h.push(""),c.forEach((function(e){"object"==typeof e?"_attr"==Object.keys(e)[0]?p(e._attr):h.push(o(e,t,r+1)):(h.pop(),u=!0,h.push(s(e)))})),u||h.push(""));break;default:h.push(s(c))}return{name:i,interrupt:!1,attributes:l,content:h,icount:r,indents:a,indent:t}}function a(e,t,r){if("object"!=typeof t)return e(!1,t);var n=t.interrupt?1:t.content.length;function s(){for(;t.content.length;){var s=t.content.shift();if(void 0!==s){if(i(s))return;a(e,s)}}e(!1,(n>1?t.indents:"")+(t.name?"":"")+(t.indent&&!r?"\n":"")),r&&r()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=s,t.interrupt=!1,e(!0),!0)}if(e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(n?t.name?">":"":t.name?"/>":"")+(t.indent&&n>1?"\n":"")),!n)return e(!1,t.indent?"\n":"");i(t)||s()}e.exports=function(e,t){"object"!=typeof t&&(t={indent:t});var r,s,c=t.stream?new i:null,u="",l=!1,h=t.indent?!0===t.indent?" ":t.indent:"",p=!0;function d(e){p?n.nextTick(e):e()}function f(e,t){if(void 0!==t&&(u+=t),e&&!l&&(c=c||new i,l=!0),e&&l){var r=u;d((function(){c.emit("data",r)})),u=""}}function m(e,t){a(f,o(e,h,h?1:0),t)}function w(){if(c){var e=u;d((function(){c.emit("data",e),c.emit("end"),c.readable=!1,c.emit("close")}))}}return d((function(){p=!1})),t.declaration&&(s={version:"1.0",encoding:(r=t.declaration).encoding||"UTF-8"},r.standalone&&(s.standalone=r.standalone),m({"?xml":{_attr:s}}),u=u.replace("/>","?>")),e&&e.forEach?e.forEach((function(t,r){var n;r+1===e.length&&(n=w),m(t,n)})):m(e,w),c?(c.readable=!0,c):u},e.exports.element=e.exports.Element=function(){var e=Array.prototype.slice.call(arguments),t={_elem:o(e),push:function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,r=this._elem.indent;a(this.append,o(e,r,this._elem.icount+(r?1:0)),(function(){t.append(!0)}))},close:function(e){void 0!==e&&this.push(e),this.end&&this.end()}};return t}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{AbstractNumbering:()=>Ji,Alignment:()=>D,AlignmentAttributes:()=>L,AlignmentType:()=>m,Attributes:()=>a,BaseEmphasisMark:()=>Q,BaseXmlComponent:()=>e,Body:()=>un,Bookmark:()=>Or,BookmarkEnd:()=>Lr,BookmarkStart:()=>kr,Border:()=>B,BorderElement:()=>P,BorderStyle:()=>w,Column:()=>hn,ColumnAttributes:()=>ln,ColumnBreak:()=>pr,Columns:()=>zr,ColumnsAttributes:()=>jr,Comment:()=>cr,CommentRangeEnd:()=>or,CommentRangeStart:()=>ir,CommentReference:()=>ar,Comments:()=>ur,ConcreteHyperlink:()=>Sr,ConcreteNumbering:()=>to,DeletedTextRun:()=>na,DocGridAttributes:()=>Wr,Document:()=>Ho,DocumentAttributes:()=>pn,DocumentBackground:()=>fn,DocumentBackgroundAttributes:()=>dn,DocumentDefaults:()=>Bo,DocumentGrid:()=>Kr,DocumentGridType:()=>Pe,DotEmphasisMark:()=>te,Drawing:()=>Xt,DropCapType:()=>vn,EMPTY_OBJECT:()=>t,EmphasisMark:()=>ee,EmphasisMarkType:()=>E,ExternalHyperlink:()=>Rr,File:()=>Ho,FootNoteReferenceRunAttributes:()=>Zo,FootNotes:()=>ki,Footer:()=>Xo,FooterWrapper:()=>_i,FootnoteReference:()=>qo,FootnoteReferenceRun:()=>Yo,FrameAnchorType:()=>_n,FrameProperties:()=>An,FramePropertiesAttributes:()=>Tn,FrameWrap:()=>En,GridSpan:()=>ks,Header:()=>$o,HeaderFooterReference:()=>Hr,HeaderFooterReferenceType:()=>Le,HeaderFooterType:()=>De,HeaderWrapper:()=>Fi,HeadingLevel:()=>Se,HeightRule:()=>$s,HorizontalPosition:()=>qe,HorizontalPositionAlign:()=>y,HorizontalPositionRelativeFrom:()=>xe,HpsMeasureElement:()=>R,HyperlinkType:()=>Oe,IgnoreIfEmptyXmlComponent:()=>i,ImageRun:()=>Zt,ImportDotx:()=>wa,ImportedRootElementAttributes:()=>p,ImportedXmlComponent:()=>h,Indent:()=>H,InitializableXmlComponent:()=>f,InsertedTextRun:()=>Jo,InternalHyperlink:()=>Ir,LeaderType:()=>Re,Level:()=>Xi,LevelBase:()=>$i,LevelForOverride:()=>Zi,LevelFormat:()=>Ui,LevelOverride:()=>no,LevelSuffix:()=>Hi,LineNumberAttributes:()=>Gr,LineNumberRestartFormat:()=>Fe,LineNumberType:()=>Vr,LineRuleType:()=>Ae,Math:()=>Rn,MathAccentCharacter:()=>Pn,MathAngledBrackets:()=>bs,MathBase:()=>Fn,MathCurlyBrackets:()=>ys,MathDegree:()=>ns,MathDenominator:()=>On,MathFraction:()=>Ln,MathFunction:()=>ls,MathFunctionName:()=>cs,MathFunctionProperties:()=>us,MathIntegral:()=>$n,MathLimitLocation:()=>Mn,MathNAryProperties:()=>Wn,MathNumerator:()=>kn,MathPreSubSuperScript:()=>ts,MathPreSubSuperScriptProperties:()=>es,MathRadical:()=>as,MathRadicalProperties:()=>os,MathRoundBrackets:()=>ws,MathRun:()=>Cn,MathSquareBrackets:()=>gs,MathSubScript:()=>Yn,MathSubScriptElement:()=>Kn,MathSubScriptProperties:()=>qn,MathSubSuperScript:()=>Qn,MathSubSuperScriptProperties:()=>Jn,MathSum:()=>Vn,MathSuperScript:()=>Zn,MathSuperScriptElement:()=>Gn,MathSuperScriptProperties:()=>Xn,Media:()=>Bi,NumberFormat:()=>x,NumberProperties:()=>xr,NumberValueElement:()=>C,Numbering:()=>oo,OnOffElement:()=>I,OutlineLevel:()=>Dr,OverlapType:()=>Gs,Packer:()=>pa,PageBorderDisplay:()=>Be,PageBorderOffsetFrom:()=>Me,PageBorderZOrder:()=>Ue,PageBorders:()=>Xr,PageBreak:()=>hr,PageBreakBefore:()=>dr,PageMargin:()=>qr,PageMarginAttributes:()=>Zr,PageNumber:()=>A,PageNumberSeparator:()=>He,PageNumberType:()=>Jr,PageNumberTypeAttributes:()=>Yr,PageOrientation:()=>je,PageReference:()=>Fr,PageSize:()=>en,PageSizeAttributes:()=>Qr,PageTextDirection:()=>rn,PageTextDirectionType:()=>ze,Paragraph:()=>In,ParagraphProperties:()=>Sn,ParagraphPropertiesDefaults:()=>Po,PrettifyType:()=>la,RelativeHorizontalPosition:()=>Ws,RelativeVerticalPosition:()=>Ks,Run:()=>me,RunFonts:()=>ae,RunProperties:()=>pe,RunPropertiesChange:()=>de,RunPropertiesDefaults:()=>Fo,SectionProperties:()=>cn,SectionType:()=>We,SectionTypeAttributes:()=>nn,SequentialIdentifier:()=>Yt,Shading:()=>Y,ShadingType:()=>_,SimpleField:()=>er,SimpleMailMergeField:()=>tr,SimplePos:()=>Ve,SpaceType:()=>v,Spacing:()=>mr,StringContainer:()=>k,StringEnumValueElement:()=>O,StringValueElement:()=>N,Style:()=>wr,StyleForCharacter:()=>bo,StyleForParagraph:()=>yo,StyleLevel:()=>Vo,Styles:()=>Do,SymbolRun:()=>be,TDirection:()=>Fs,Tab:()=>Jt,TabAttributes:()=>yr,TabStop:()=>gr,TabStopItem:()=>br,TabStopPosition:()=>Ne,TabStopType:()=>Ie,Table:()=>ei,TableAnchorType:()=>zs,TableBorders:()=>js,TableCell:()=>Ms,TableCellBorders:()=>Cs,TableFloatOptionsAttributes:()=>Zs,TableFloatProperties:()=>qs,TableLayout:()=>Js,TableLayoutType:()=>Vs,TableOfContents:()=>Go,TableProperties:()=>Qs,TableRow:()=>si,TableRowHeight:()=>ri,TableRowHeightAttributes:()=>ti,TableRowProperties:()=>ni,TableWidthElement:()=>Rs,TextDirection:()=>Ss,TextRun:()=>we,TextWrappingSide:()=>Ee,TextWrappingType:()=>_e,ThematicBreak:()=>M,Type:()=>sn,Underline:()=>he,UnderlineType:()=>T,VerticalAlign:()=>ke,VerticalAlignAttributes:()=>Br,VerticalAlignElement:()=>Mr,VerticalMerge:()=>Ds,VerticalMergeType:()=>As,VerticalPosition:()=>Je,VerticalPositionAlign:()=>b,VerticalPositionRelativeFrom:()=>ve,WORKAROUND:()=>jo,WORKAROUND2:()=>Mi,WORKAROUND3:()=>d,WORKAROUND4:()=>rs,WidthType:()=>Es,WrapNone:()=>Rt,WrapSquare:()=>Ct,WrapTight:()=>kt,WrapTopAndBottom:()=>Dt,XmlAttributeComponent:()=>o,XmlComponent:()=>s,convertInchesToTwip:()=>ga.convertInchesToTwip,convertMillimetersToTwip:()=>ga.convertMillimetersToTwip,convertToXmlComponent:()=>u,dateTimeValue:()=>ga.dateTimeValue,decimalNumber:()=>ga.decimalNumber,eighthPointMeasureValue:()=>ga.eighthPointMeasureValue,hexColorValue:()=>ga.hexColorValue,hpsMeasureValue:()=>ga.hpsMeasureValue,longHexNumber:()=>ga.longHexNumber,measurementOrPercentValue:()=>ga.measurementOrPercentValue,percentageValue:()=>ga.percentageValue,pointMeasureValue:()=>ga.pointMeasureValue,positiveUniversalMeasureValue:()=>ga.positiveUniversalMeasureValue,sectionMarginDefaults:()=>on,sectionPageSizeDefaults:()=>an,shortHexNumber:()=>ga.shortHexNumber,signedHpsMeasureValue:()=>ga.signedHpsMeasureValue,signedTwipsMeasureValue:()=>ga.signedTwipsMeasureValue,twipsMeasureValue:()=>ga.twipsMeasureValue,uCharHexNumber:()=>ga.uCharHexNumber,uniqueId:()=>ga.uniqueId,uniqueNumericId:()=>ga.uniqueNumericId,universalMeasureValue:()=>ga.universalMeasureValue,unsignedDecimalNumber:()=>ga.unsignedDecimalNumber});class e{constructor(e){this.rootKey=e}}const t=Object.seal({});class s extends e{constructor(e){super(e),this.root=new Array}prepForXml(r){var n;const s=this.root.map((t=>t instanceof e?t.prepForXml(r):t)).filter((e=>void 0!==e));return{[this.rootKey]:s.length?1===s.length&&(null===(n=s[0])||void 0===n?void 0:n._attr)?s[0]:s:t}}addChildElement(e){return this.root.push(e),this}}class i extends s{prepForXml(e){const t=super.prepForXml(e);if(t&&("object"!=typeof t[this.rootKey]||Object.keys(t[this.rootKey]).length))return t}}class o extends e{constructor(e){super("_attr"),this.root=e}prepForXml(e){const t={};return Object.keys(this.root).forEach((e=>{const r=this.root[e];if(void 0!==r){const n=this.xmlKeys&&this.xmlKeys[e]||e;t[n]=r}})),{_attr:t}}}class a extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"}}}var c=r(7888);const u=e=>{switch(e.type){case void 0:case"element":const t=new h(e.name,e.attributes),r=e.elements||[];for(const e of r){const r=u(e);void 0!==r&&t.push(r)}return t;case"text":return e.text;default:return}};class l extends o{}class h extends s{static fromXmlString(e){const t=(0,c.xml2js)(e,{compact:!1});return u(t)}constructor(e,t){super(e),t&&this.root.push(new l(t))}push(e){this.root.push(e)}}class p extends s{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}const d="";class f extends s{constructor(e,t){super(e),t&&(this.root=t.root)}}var m,w,g,y,b,x,v,_,E,T,A,S=r(6595);class I extends s{constructor(e,t=!0){super(e),!0!==t&&this.root.push(new a({val:t}))}}class R extends s{constructor(e,t){super(e),this.root.push(new a({val:(0,S.KR)(t)}))}}class N extends s{constructor(e,t){super(e),this.root.push(new a({val:t}))}}class C extends s{constructor(e,t){super(e),this.root.push(new a({val:t}))}}class O extends s{constructor(e,t){super(e),this.root.push(new a({val:t}))}}class k extends s{constructor(e,t){super(e),this.root.push(t)}}!function(e){e.START="start",e.CENTER="center",e.END="end",e.BOTH="both",e.MEDIUM_KASHIDA="mediumKashida",e.DISTRIBUTE="distribute",e.NUM_TAB="numTab",e.HIGH_KASHIDA="highKashida",e.LOW_KASHIDA="lowKashida",e.THAI_DISTRIBUTE="thaiDistribute",e.LEFT="left",e.RIGHT="right",e.JUSTIFIED="both"}(m||(m={}));class L extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class D extends s{constructor(e){super("w:jc"),this.root.push(new L({val:e}))}}class P extends s{constructor(e,{color:t,size:r,space:n,style:s}){super(e),this.root.push(new F({style:s,color:void 0===t?void 0:(0,S.dg)(t),size:void 0===r?void 0:(0,S.LV)(r),space:void 0===n?void 0:(0,S.gg)(n)}))}}class F extends o{constructor(){super(...arguments),this.xmlKeys={style:"w:val",color:"w:color",size:"w:sz",space:"w:space"}}}!function(e){e.SINGLE="single",e.DASH_DOT_STROKED="dashDotStroked",e.DASHED="dashed",e.DASH_SMALL_GAP="dashSmallGap",e.DOT_DASH="dotDash",e.DOT_DOT_DASH="dotDotDash",e.DOTTED="dotted",e.DOUBLE="double",e.DOUBLE_WAVE="doubleWave",e.INSET="inset",e.NIL="nil",e.NONE="none",e.OUTSET="outset",e.THICK="thick",e.THICK_THIN_LARGE_GAP="thickThinLargeGap",e.THICK_THIN_MEDIUM_GAP="thickThinMediumGap",e.THICK_THIN_SMALL_GAP="thickThinSmallGap",e.THIN_THICK_LARGE_GAP="thinThickLargeGap",e.THIN_THICK_MEDIUM_GAP="thinThickMediumGap",e.THIN_THICK_SMALL_GAP="thinThickSmallGap",e.THIN_THICK_THIN_LARGE_GAP="thinThickThinLargeGap",e.THIN_THICK_THIN_MEDIUM_GAP="thinThickThinMediumGap",e.THIN_THICK_THIN_SMALL_GAP="thinThickThinSmallGap",e.THREE_D_EMBOSS="threeDEmboss",e.THREE_D_ENGRAVE="threeDEngrave",e.TRIPLE="triple",e.WAVE="wave"}(w||(w={}));class B extends i{constructor(e){super("w:pBdr"),e.top&&this.root.push(new P("w:top",e.top)),e.bottom&&this.root.push(new P("w:bottom",e.bottom)),e.left&&this.root.push(new P("w:left",e.left)),e.right&&this.root.push(new P("w:right",e.right))}}class M extends s{constructor(){super("w:pBdr");const e=new P("w:bottom",{color:"auto",space:1,style:w.SINGLE,size:6});this.root.push(e)}}class U extends o{constructor(){super(...arguments),this.xmlKeys={start:"w:start",end:"w:end",left:"w:left",right:"w:right",hanging:"w:hanging",firstLine:"w:firstLine"}}}class H extends s{constructor({start:e,end:t,left:r,right:n,hanging:s,firstLine:i}){super("w:ind"),this.root.push(new U({start:void 0===e?void 0:(0,S.xb)(e),end:void 0===t?void 0:(0,S.xb)(t),left:void 0===r?void 0:(0,S.xb)(r),right:void 0===n?void 0:(0,S.xb)(n),hanging:void 0===s?void 0:(0,S.Jd)(s),firstLine:void 0===i?void 0:(0,S.Jd)(i)}))}}class j extends s{constructor(){super("w:br")}}!function(e){e.BEGIN="begin",e.END="end",e.SEPARATE="separate"}(g||(g={}));class z extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:fldCharType",dirty:"w:dirty"}}}class W extends s{constructor(e){super("w:fldChar"),this.root.push(new z({type:g.BEGIN,dirty:e}))}}class K extends s{constructor(e){super("w:fldChar"),this.root.push(new z({type:g.SEPARATE,dirty:e}))}}class G extends s{constructor(e){super("w:fldChar"),this.root.push(new z({type:g.END,dirty:e}))}}!function(e){e.CENTER="center",e.INSIDE="inside",e.LEFT="left",e.OUTSIDE="outside",e.RIGHT="right"}(y||(y={})),function(e){e.BOTTOM="bottom",e.CENTER="center",e.INSIDE="inside",e.OUTSIDE="outside",e.TOP="top"}(b||(b={})),function(e){e.DECIMAL="decimal",e.UPPER_ROMAN="upperRoman",e.LOWER_ROMAN="lowerRoman",e.UPPER_LETTER="upperLetter",e.LOWER_LETTER="lowerLetter",e.ORDINAL="ordinal",e.CARDINAL_TEXT="cardinalText",e.ORDINAL_TEXT="ordinalText",e.HEX="hex",e.CHICAGO="chicago",e.IDEOGRAPH_DIGITAL="ideographDigital",e.JAPANESE_COUNTING="japaneseCounting",e.AIUEO="aiueo",e.IROHA="iroha",e.DECIMAL_FULL_WIDTH="decimalFullWidth",e.DECIMAL_HALF_WIDTH="decimalHalfWidth",e.JAPANESE_LEGAL="japaneseLegal",e.JAPANESE_DIGITAL_TEN_THOUSAND="japaneseDigitalTenThousand",e.DECIMAL_ENCLOSED_CIRCLE="decimalEnclosedCircle",e.DECIMAL_FULL_WIDTH_2="decimalFullWidth2",e.AIUEO_FULL_WIDTH="aiueoFullWidth",e.IROHA_FULL_WIDTH="irohaFullWidth",e.DECIMAL_ZERO="decimalZero",e.BULLET="bullet",e.GANADA="ganada",e.CHOSUNG="chosung",e.DECIMAL_ENCLOSED_FULL_STOP="decimalEnclosedFullstop",e.DECIMAL_ENCLOSED_PAREN="decimalEnclosedParen",e.DECIMAL_ENCLOSED_CIRCLE_CHINESE="decimalEnclosedCircleChinese",e.IDEOGRAPH_ENCLOSED_CIRCLE="ideographEnclosedCircle",e.IDEOGRAPH_TRADITIONAL="ideographTraditional",e.IDEOGRAPH_ZODIAC="ideographZodiac",e.IDEOGRAPH_ZODIAC_TRADITIONAL="ideographZodiacTraditional",e.TAIWANESE_COUNTING="taiwaneseCounting",e.IDEOGRAPH_LEGAL_TRADITIONAL="ideographLegalTraditional",e.TAIWANESE_COUNTING_THOUSAND="taiwaneseCountingThousand",e.TAIWANESE_DIGITAL="taiwaneseDigital",e.CHINESE_COUNTING="chineseCounting",e.CHINESE_LEGAL_SIMPLIFIED="chineseLegalSimplified",e.CHINESE_COUNTING_TEN_THOUSAND="chineseCountingThousand",e.KOREAN_DIGITAL="koreanDigital",e.KOREAN_COUNTING="koreanCounting",e.KOREAN_LEGAL="koreanLegal",e.KOREAN_DIGITAL_2="koreanDigital2",e.VIETNAMESE_COUNTING="vietnameseCounting",e.RUSSIAN_LOWER="russianLower",e.RUSSIAN_UPPER="russianUpper",e.NONE="none",e.NUMBER_IN_DASH="numberInDash",e.HEBREW_1="hebrew1",e.HEBREW_2="hebrew2",e.ARABIC_ALPHA="arabicAlpha",e.ARABIC_ABJAD="arabicAbjad",e.HINDI_VOWELS="hindiVowels",e.HINDI_CONSONANTS="hindiConsonants",e.HINDI_NUMBERS="hindiNumbers",e.HINDI_COUNTING="hindiCounting",e.THAI_LETTERS="thaiLetters",e.THAI_NUMBERS="thaiNumbers",e.THAI_COUNTING="thaiCounting",e.BAHT_TEXT="bahtText",e.DOLLAR_TEXT="dollarText"}(x||(x={})),function(e){e.DEFAULT="default",e.PRESERVE="preserve"}(v||(v={}));class V extends o{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class $ extends s{constructor(){super("w:instrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("PAGE")}}class X extends s{constructor(){super("w:instrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("NUMPAGES")}}class Z extends s{constructor(){super("w:instrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("SECTIONPAGES")}}class q extends o{constructor(){super(...arguments),this.xmlKeys={fill:"w:fill",color:"w:color",type:"w:val"}}}class Y extends s{constructor({fill:e,color:t,type:r}){super("w:shd"),this.root.push(new q({fill:void 0===e?void 0:(0,S.dg)(e),color:void 0===t?void 0:(0,S.dg)(t),type:r}))}}!function(e){e.CLEAR="clear",e.DIAGONAL_CROSS="diagCross",e.DIAGONAL_STRIPE="diagStripe",e.HORIZONTAL_CROSS="horzCross",e.HORIZONTAL_STRIPE="horzStripe",e.NIL="nil",e.PERCENT_5="pct5",e.PERCENT_10="pct10",e.PERCENT_12="pct12",e.PERCENT_15="pct15",e.PERCENT_20="pct20",e.PERCENT_25="pct25",e.PERCENT_30="pct30",e.PERCENT_35="pct35",e.PERCENT_37="pct37",e.PERCENT_40="pct40",e.PERCENT_45="pct45",e.PERCENT_50="pct50",e.PERCENT_55="pct55",e.PERCENT_60="pct60",e.PERCENT_62="pct62",e.PERCENT_65="pct65",e.PERCENT_70="pct70",e.PERCENT_75="pct75",e.PERCENT_80="pct80",e.PERCENT_85="pct85",e.PERCENT_87="pct87",e.PERCENT_90="pct90",e.PERCENT_95="pct95",e.REVERSE_DIAGONAL_STRIPE="reverseDiagStripe",e.SOLID="solid",e.THIN_DIAGONAL_CROSS="thinDiagCross",e.THIN_DIAGONAL_STRIPE="thinDiagStripe",e.THIN_HORIZONTAL_CROSS="thinHorzCross",e.THIN_REVERSE_DIAGONAL_STRIPE="thinReverseDiagStripe",e.THIN_VERTICAL_STRIPE="thinVertStripe",e.VERTICAL_STRIPE="vertStripe"}(_||(_={}));class J extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id",author:"w:author",date:"w:date"}}}!function(e){e.DOT="dot"}(E||(E={}));class Q extends s{constructor(e){super("w:em"),this.root.push(new a({val:e}))}}class ee extends Q{constructor(e=E.DOT){super(e)}}class te extends Q{constructor(){super(E.DOT)}}class re extends s{constructor(e){super("w:spacing"),this.root.push(new a({val:(0,S.xb)(e)}))}}class ne extends s{constructor(e){super("w:color"),this.root.push(new a({val:(0,S.dg)(e)}))}}class se extends s{constructor(e){super("w:highlight"),this.root.push(new a({val:e}))}}class ie extends s{constructor(e){super("w:highlightCs"),this.root.push(new a({val:e}))}}class oe extends o{constructor(){super(...arguments),this.xmlKeys={ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"}}}class ae extends s{constructor(e,t){if(super("w:rFonts"),"string"==typeof e){const r=e;this.root.push(new oe({ascii:r,cs:r,eastAsia:r,hAnsi:r,hint:t}))}else{const t=e;this.root.push(new oe(t))}}}class ce extends s{constructor(e){super("w:vertAlign"),this.root.push(new a({val:e}))}}class ue extends ce{constructor(){super("superscript")}}class le extends ce{constructor(){super("subscript")}}!function(e){e.SINGLE="single",e.WORDS="words",e.DOUBLE="double",e.THICK="thick",e.DOTTED="dotted",e.DOTTEDHEAVY="dottedHeavy",e.DASH="dash",e.DASHEDHEAVY="dashedHeavy",e.DASHLONG="dashLong",e.DASHLONGHEAVY="dashLongHeavy",e.DOTDASH="dotDash",e.DASHDOTHEAVY="dashDotHeavy",e.DOTDOTDASH="dotDotDash",e.DASHDOTDOTHEAVY="dashDotDotHeavy",e.WAVE="wave",e.WAVYHEAVY="wavyHeavy",e.WAVYDOUBLE="wavyDouble",e.NONE="none"}(T||(T={}));class he extends s{constructor(e=T.SINGLE,t){super("w:u"),this.root.push(new a({val:e,color:void 0===t?void 0:(0,S.dg)(t)}))}}class pe extends i{constructor(e){var t,r;if(super("w:rPr"),!e)return;void 0!==e.bold&&this.push(new I("w:b",e.bold)),(void 0===e.boldComplexScript&&void 0!==e.bold||e.boldComplexScript)&&this.push(new I("w:bCs",null!==(t=e.boldComplexScript)&&void 0!==t?t:e.bold)),void 0!==e.italics&&this.push(new I("w:i",e.italics)),(void 0===e.italicsComplexScript&&void 0!==e.italics||e.italicsComplexScript)&&this.push(new I("w:iCs",null!==(r=e.italicsComplexScript)&&void 0!==r?r:e.italics)),e.underline&&this.push(new he(e.underline.type,e.underline.color)),e.emphasisMark&&this.push(new ee(e.emphasisMark.type)),e.color&&this.push(new ne(e.color)),void 0!==e.size&&this.push(new R("w:sz",e.size));const n=void 0===e.sizeComplexScript||!0===e.sizeComplexScript?e.size:e.sizeComplexScript;n&&this.push(new R("w:szCs",n)),void 0!==e.rightToLeft&&this.push(new I("w:rtl",e.rightToLeft)),void 0!==e.smallCaps?this.push(new I("w:smallCaps",e.smallCaps)):void 0!==e.allCaps&&this.push(new I("w:caps",e.allCaps)),void 0!==e.strike&&this.push(new I("w:strike",e.strike)),void 0!==e.doubleStrike&&this.push(new I("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new le),e.superScript&&this.push(new ue),e.style&&this.push(new N("w:rStyle",e.style)),e.font&&("string"==typeof e.font?this.push(new ae(e.font)):"name"in e.font?this.push(new ae(e.font.name,e.font.hint)):this.push(new ae(e.font))),e.highlight&&this.push(new se(e.highlight));const s=void 0===e.highlightComplexScript||!0===e.highlightComplexScript?e.highlight:e.highlightComplexScript;s&&this.push(new ie(s)),e.characterSpacing&&this.push(new re(e.characterSpacing)),void 0!==e.emboss&&this.push(new I("w:emboss",e.emboss)),void 0!==e.imprint&&this.push(new I("w:imprint",e.imprint)),e.shading&&this.push(new Y(e.shading)),e.revision&&this.push(new de(e.revision)),e.border&&this.push(new P("w:bdr",e.border)),e.vanish&&this.push(new I("w:vanish",e.vanish)),e.specVanish&&this.push(new I("w:specVanish",e.vanish)),void 0!==e.scale&&this.push(new C("w:w",e.scale))}push(e){this.root.push(e)}}class de extends s{constructor(e){super("w:rPrChange"),this.root.push(new J({id:e.id,author:e.author,date:e.date})),this.addChildElement(new pe(e))}}class fe extends s{constructor(e){var t;return super("w:t"),"string"==typeof e?(this.root.push(new V({space:v.PRESERVE})),this.root.push(e),this):(this.root.push(new V({space:null!==(t=e.space)&&void 0!==t?t:v.DEFAULT})),this.root.push(e.text),this)}}!function(e){e.CURRENT="CURRENT",e.TOTAL_PAGES="TOTAL_PAGES",e.TOTAL_PAGES_IN_SECTION="TOTAL_PAGES_IN_SECTION"}(A||(A={}));class me extends s{constructor(e){if(super("w:r"),this.properties=new pe(e),this.root.push(this.properties),e.break)for(let t=0;te.charCodeAt(0))))}return new(r(8764).Buffer)(e,"base64")}}class qt extends s{constructor(e){super("w:instrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push(`SEQ ${e}`)}}class Yt extends me{constructor(e){super({}),this.root.push(new W(!0)),this.root.push(new qt(e)),this.root.push(new K),this.root.push(new G)}}class Jt extends s{constructor(){super("w:tab")}}class Qt extends o{constructor(){super(...arguments),this.xmlKeys={instr:"w:instr"}}}class er extends s{constructor(e,t){super("w:fldSimple"),this.root.push(new Qt({instr:e})),void 0!==t&&this.root.push(new we(t))}}class tr extends er{constructor(e){super(` MERGEFIELD ${e} `,`«${e}»`)}}class rr extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"}}}class nr extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id"}}}class sr extends o{constructor(){super(...arguments),this.xmlKeys={"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"}}}class ir extends s{constructor(e){super("w:commentRangeStart"),this.root.push(new nr({id:e}))}}class or extends s{constructor(e){super("w:commentRangeEnd"),this.root.push(new nr({id:e}))}}class ar extends s{constructor(e){super("w:commentReference"),this.root.push(new nr({id:e}))}}class cr extends s{constructor({id:e,initials:t,author:r,date:n=new Date,text:s}){super("w:comment"),this.root.push(new rr({id:e,initials:t,author:r,date:n.toISOString()})),this.root.push(new In({children:[new we(s)]}))}}class ur extends s{constructor({children:e}){super("w:comments"),this.root.push(new sr({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));for(const t of e)this.root.push(new cr(t))}}!function(e){e.COLUMN="column",e.PAGE="page"}(Te||(Te={}));class lr extends s{constructor(e){super("w:br"),this.root.push(new a({type:e}))}}class hr extends me{constructor(){super({}),this.root.push(new lr(Te.PAGE))}}class pr extends me{constructor(){super({}),this.root.push(new lr(Te.COLUMN))}}class dr extends s{constructor(){super("w:pageBreakBefore")}}!function(e){e.AT_LEAST="atLeast",e.EXACTLY="exactly",e.EXACT="exact",e.AUTO="auto"}(Ae||(Ae={}));class fr extends o{constructor(){super(...arguments),this.xmlKeys={after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"}}}class mr extends s{constructor(e){super("w:spacing"),this.root.push(new fr(e))}}!function(e){e.HEADING_1="Heading1",e.HEADING_2="Heading2",e.HEADING_3="Heading3",e.HEADING_4="Heading4",e.HEADING_5="Heading5",e.HEADING_6="Heading6",e.TITLE="Title"}(Se||(Se={}));class wr extends s{constructor(e){super("w:pStyle"),this.root.push(new a({val:e}))}}class gr extends s{constructor(e){super("w:tabs");for(const t of e)this.root.push(new br(t))}}!function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.BAR="bar",e.CLEAR="clear",e.DECIMAL="decimal",e.END="end",e.NUM="num",e.START="start"}(Ie||(Ie={})),function(e){e.DOT="dot",e.HYPHEN="hyphen",e.MIDDLE_DOT="middleDot",e.NONE="none",e.UNDERSCORE="underscore"}(Re||(Re={})),function(e){e[e.MAX=9026]="MAX"}(Ne||(Ne={}));class yr extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val",pos:"w:pos",leader:"w:leader"}}}class br extends s{constructor({type:e,position:t,leader:r}){super("w:tab"),this.root.push(new yr({val:e,pos:t,leader:r}))}}class xr extends s{constructor(e,t){super("w:numPr"),this.root.push(new vr(t)),this.root.push(new _r(e))}}class vr extends s{constructor(e){if(super("w:ilvl"),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new a({val:e}))}}class _r extends s{constructor(e){super("w:numId"),this.root.push(new a({val:"string"==typeof e?`{${e}}`:e}))}}class Er extends o{constructor(){super(...arguments),this.xmlKeys={id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"}}}!function(e){e.EXTERNAL="External"}(Ce||(Ce={}));class Tr extends s{constructor(e,t,r,n){super("Relationship"),this.root.push(new Er({id:e,type:t,target:r,targetMode:n}))}}class Ar extends o{constructor(){super(...arguments),this.xmlKeys={id:"r:id",history:"w:history",anchor:"w:anchor"}}}!function(e){e.INTERNAL="INTERNAL",e.EXTERNAL="EXTERNAL"}(Oe||(Oe={}));class Sr extends s{constructor(e,t,r){super("w:hyperlink"),this.linkId=t;const n={history:1,anchor:r||void 0,id:r?void 0:`rId${this.linkId}`},s=new Ar(n);this.root.push(s),e.forEach((e=>{this.root.push(e)}))}}class Ir extends Sr{constructor(e){super(e.children,(0,Ke.EL)(),e.anchor)}}class Rr extends s{constructor(e){super("w:externalHyperlink"),this.options=e}}class Nr extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id",name:"w:name"}}}class Cr extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id"}}}class Or{constructor(e){const t=(0,Ke.NY)();this.start=new kr(e.id,t),this.children=e.children,this.end=new Lr(t)}}class kr extends s{constructor(e,t){super("w:bookmarkStart");const r=new Nr({name:e,id:t});this.root.push(r)}}class Lr extends s{constructor(e){super("w:bookmarkEnd");const t=new Cr({id:e});this.root.push(t)}}class Dr extends s{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new a({val:e}))}}class Pr extends s{constructor(e,t={}){super("w:instrText"),this.root.push(new V({space:v.PRESERVE}));let r=`PAGEREF ${e}`;t.hyperlink&&(r=`${r} \\h`),t.useRelativePosition&&(r=`${r} \\p`),this.root.push(r)}}class Fr extends me{constructor(e,t={}){super({children:[new W(!0),new Pr(e,t),new G]})}}!function(e){e.BOTTOM="bottom",e.CENTER="center",e.TOP="top"}(ke||(ke={}));class Br extends o{constructor(){super(...arguments),this.xmlKeys={verticalAlign:"w:val"}}}class Mr extends s{constructor(e){super("w:vAlign"),this.root.push(new Br({verticalAlign:e}))}}!function(e){e.DEFAULT="default",e.FIRST="first",e.EVEN="even"}(Le||(Le={}));class Ur extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:type",id:"r:id"}}}!function(e){e.HEADER="w:headerReference",e.FOOTER="w:footerReference"}(De||(De={}));class Hr extends s{constructor(e,t){super(e),this.root.push(new Ur({type:t.type||Le.DEFAULT,id:`rId${t.id}`}))}}class jr extends o{constructor(){super(...arguments),this.xmlKeys={space:"w:space",count:"w:num",separate:"w:sep",equalWidth:"w:equalWidth"}}}class zr extends s{constructor({space:e,count:t,separate:r,equalWidth:n,children:s}){super("w:cols"),this.root.push(new jr({space:void 0===e?void 0:(0,S.Jd)(e),count:void 0===t?void 0:(0,S.vH)(t),separate:r,equalWidth:n})),!n&&s&&s.forEach((e=>this.addChildElement(e)))}}!function(e){e.DEFAULT="default",e.LINES="lines",e.LINES_AND_CHARS="linesAndChars",e.SNAP_TO_CHARS="snapToChars"}(Pe||(Pe={}));class Wr extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:type",linePitch:"w:linePitch",charSpace:"w:charSpace"}}}class Kr extends s{constructor(e,t,r){super("w:docGrid"),this.root.push(new Wr({type:r,linePitch:(0,S.vH)(e),charSpace:t?(0,S.vH)(t):void 0}))}}!function(e){e.NEW_PAGE="newPage",e.NEW_SECTION="newSection",e.CONTINUOUS="continuous"}(Fe||(Fe={}));class Gr extends o{constructor(){super(...arguments),this.xmlKeys={countBy:"w:countBy",start:"w:start",restart:"w:restart",distance:"w:distance"}}}class Vr extends s{constructor({countBy:e,start:t,restart:r,distance:n}){super("w:lnNumType"),this.root.push(new Gr({countBy:void 0===e?void 0:(0,S.vH)(e),start:void 0===t?void 0:(0,S.vH)(t),restart:r,distance:void 0===n?void 0:(0,S.Jd)(n)}))}}!function(e){e.ALL_PAGES="allPages",e.FIRST_PAGE="firstPage",e.NOT_FIRST_PAGE="notFirstPage"}(Be||(Be={})),function(e){e.PAGE="page",e.TEXT="text"}(Me||(Me={})),function(e){e.BACK="back",e.FRONT="front"}(Ue||(Ue={}));class $r extends o{constructor(){super(...arguments),this.xmlKeys={display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"}}}class Xr extends i{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new $r({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new $r({})),e.pageBorderTop&&this.root.push(new P("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new P("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new P("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new P("w:right",e.pageBorderRight))}}class Zr extends o{constructor(){super(...arguments),this.xmlKeys={top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter"}}}class qr extends s{constructor(e,t,r,n,s,i,o){super("w:pgMar"),this.root.push(new Zr({top:(0,S.xb)(e),right:(0,S.Jd)(t),bottom:(0,S.xb)(r),left:(0,S.Jd)(n),header:(0,S.Jd)(s),footer:(0,S.Jd)(i),gutter:(0,S.Jd)(o)}))}}!function(e){e.HYPHEN="hyphen",e.PERIOD="period",e.COLON="colon",e.EM_DASH="emDash",e.EN_DASH="endash"}(He||(He={}));class Yr extends o{constructor(){super(...arguments),this.xmlKeys={start:"w:start",formatType:"w:fmt",separator:"w:chapSep"}}}class Jr extends s{constructor({start:e,formatType:t,separator:r}){super("w:pgNumType"),this.root.push(new Yr({start:void 0===e?void 0:(0,S.vH)(e),formatType:t,separator:r}))}}!function(e){e.PORTRAIT="portrait",e.LANDSCAPE="landscape"}(je||(je={}));class Qr extends o{constructor(){super(...arguments),this.xmlKeys={width:"w:w",height:"w:h",orientation:"w:orient"}}}class en extends s{constructor(e,t,r){super("w:pgSz");const n=r===je.LANDSCAPE,s=(0,S.Jd)(e),i=(0,S.Jd)(t);this.root.push(new Qr({width:n?i:s,height:n?s:i,orientation:r}))}}!function(e){e.LEFT_TO_RIGHT_TOP_TO_BOTTOM="lrTb",e.TOP_TO_BOTTOM_RIGHT_TO_LEFT="tbRl"}(ze||(ze={}));class tn extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class rn extends s{constructor(e){super("w:textDirection"),this.root.push(new tn({val:e}))}}!function(e){e.NEXT_PAGE="nextPage",e.NEXT_COLUMN="nextColumn",e.CONTINUOUS="continuous",e.EVEN_PAGE="evenPage",e.ODD_PAGE="oddPage"}(We||(We={}));class nn extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class sn extends s{constructor(e){super("w:type"),this.root.push(new nn({val:e}))}}const on={TOP:"1in",RIGHT:"1in",BOTTOM:"1in",LEFT:"1in",HEADER:708,FOOTER:708,GUTTER:0},an={WIDTH:11906,HEIGHT:16838,ORIENTATION:je.PORTRAIT};class cn extends s{constructor({page:{size:{width:e=an.WIDTH,height:t=an.HEIGHT,orientation:r=an.ORIENTATION}={},margin:{top:n=on.TOP,right:s=on.RIGHT,bottom:i=on.BOTTOM,left:o=on.LEFT,header:a=on.HEADER,footer:c=on.FOOTER,gutter:u=on.GUTTER}={},pageNumbers:l={},borders:h,textDirection:p}={},grid:{linePitch:d=360,charSpace:f,type:m}={},headerWrapperGroup:w={},footerWrapperGroup:g={},lineNumbers:y,titlePage:b,verticalAlign:x,column:v,type:_}={}){super("w:sectPr"),this.addHeaderFooterGroup(De.HEADER,w),this.addHeaderFooterGroup(De.FOOTER,g),_&&this.root.push(new sn(_)),this.root.push(new en(e,t,r)),this.root.push(new qr(n,s,i,o,a,c,u)),h&&this.root.push(new Xr(h)),y&&this.root.push(new Vr(y)),this.root.push(new Jr(l)),v&&this.root.push(new zr(v)),x&&this.root.push(new Mr(x)),void 0!==b&&this.root.push(new I("w:titlePg",b)),p&&this.root.push(new rn(p)),this.root.push(new Kr(d,f,m))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new Hr(e,{type:Le.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new Hr(e,{type:Le.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new Hr(e,{type:Le.EVEN,id:t.even.View.ReferenceId}))}}class un extends s{constructor(){super("w:body"),this.sections=[]}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new cn(e))}prepForXml(e){return 1===this.sections.length&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new In({}),r=new Sn({});return r.push(e),t.addChildElement(r),t}}class ln extends o{constructor(){super(...arguments),this.xmlKeys={width:"w:w",space:"w:space"}}}class hn extends s{constructor({width:e,space:t}){super("w:col"),this.root.push(new ln({width:(0,S.Jd)(e),space:void 0===t?void 0:(0,S.Jd)(t)}))}}class pn extends o{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",aink:"xmlns:aink",am3d:"xmlns:am3d",w16cex:"xmlns:w16cex",w16cid:"xmlns:w16cid",w16:"xmlns:w16",w16sdtdh:"xmlns:w16sdtdh",w16se:"xmlns:w16se"}}}class dn extends o{constructor(){super(...arguments),this.xmlKeys={color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"}}}class fn extends s{constructor(e){super("w:background"),this.root.push(new dn({color:void 0===e.color?void 0:(0,S.dg)(e.color),themeColor:e.themeColor,themeShade:void 0===e.themeShade?void 0:(0,S.xD)(e.themeShade),themeTint:void 0===e.themeTint?void 0:(0,S.xD)(e.themeTint)}))}}class mn extends s{constructor(e){super("w:document"),this.root.push(new pn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex",Ignorable:"w14 w15 wp14"})),this.body=new un,e.background&&this.root.push(new fn(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class wn extends o{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns"}}}class gn extends s{constructor(){super("Relationships"),this.root.push(new wn({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(e){this.root.push(e)}createRelationship(e,t,r,n){const s=new Tr(`rId${e}`,t,r,n);return this.addRelationship(s),s}get RelationshipCount(){return this.root.length-1}}class yn{constructor(e){this.document=new mn(e),this.relationships=new gn}get View(){return this.document}get Relationships(){return this.relationships}}class bn extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class xn extends s{constructor(){super("w:wordWrap"),this.root.push(new bn({val:0}))}}var vn,_n,En;!function(e){e.NONE="none",e.DROP="drop",e.MARGIN="margin"}(vn||(vn={})),function(e){e.MARGIN="margin",e.PAGE="page",e.TEXT="text"}(_n||(_n={})),function(e){e.AROUND="around",e.AUTO="auto",e.NONE="none",e.NOT_BESIDE="notBeside",e.THROUGH="through",e.TIGHT="tight"}(En||(En={}));class Tn extends o{constructor(){super(...arguments),this.xmlKeys={anchorLock:"w:anchorLock",dropCap:"w:dropCap",width:"w:w",height:"w:h",x:"w:x",y:"w:y",anchorHorizontal:"w:hAnchor",anchorVertical:"w:vAnchor",spaceHorizontal:"w:hSpace",spaceVertical:"w:vSpace",rule:"w:hRule",alignmentX:"w:xAlign",alignmentY:"w:yAlign",lines:"w:lines",wrap:"w:wrap"}}}class An extends s{constructor(e){var t,r;super("w:framePr"),this.root.push(new Tn({anchorLock:e.anchorLock,dropCap:e.dropCap,width:e.width,height:e.height,x:e.position?e.position.x:void 0,y:e.position?e.position.y:void 0,anchorHorizontal:e.anchor.horizontal,anchorVertical:e.anchor.vertical,spaceHorizontal:null===(t=e.space)||void 0===t?void 0:t.horizontal,spaceVertical:null===(r=e.space)||void 0===r?void 0:r.vertical,rule:e.rule,alignmentX:e.alignment?e.alignment.x:void 0,alignmentY:e.alignment?e.alignment.y:void 0,lines:e.lines,wrap:e.wrap}))}}class Sn extends i{constructor(e){var t,r;if(super("w:pPr"),this.numberingReferences=[],!e)return this;e.heading&&this.push(new wr(e.heading)),e.bullet&&this.push(new wr("ListParagraph")),e.numbering&&(e.style||e.heading||e.numbering.custom||this.push(new wr("ListParagraph"))),e.style&&this.push(new wr(e.style)),void 0!==e.keepNext&&this.push(new I("w:keepNext",e.keepNext)),void 0!==e.keepLines&&this.push(new I("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new dr),e.frame&&this.push(new An(e.frame)),void 0!==e.widowControl&&this.push(new I("w:widowControl",e.widowControl)),e.bullet&&this.push(new xr(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:null!==(t=e.numbering.instance)&&void 0!==t?t:0}),this.push(new xr(`${e.numbering.reference}-${null!==(r=e.numbering.instance)&&void 0!==r?r:0}`,e.numbering.level))),e.border&&this.push(new B(e.border)),e.thematicBreak&&this.push(new M),e.shading&&this.push(new Y(e.shading)),e.wordWrap&&this.push(new xn);const n=[...e.rightTabStop?[{type:Ie.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop?[{type:Ie.LEFT,position:e.leftTabStop}]:[]];n.length>0&&this.push(new gr(n)),void 0!==e.bidirectional&&this.push(new I("w:bidi",e.bidirectional)),e.spacing&&this.push(new mr(e.spacing)),e.indent&&this.push(new H(e.indent)),void 0!==e.contextualSpacing&&this.push(new I("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new D(e.alignment)),void 0!==e.outlineLevel&&this.push(new Dr(e.outlineLevel)),void 0!==e.suppressLineNumbers&&this.push(new I("w:suppressLineNumbers",e.suppressLineNumbers))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof yn)for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class In extends s{constructor(e){if(super("w:p"),"string"==typeof e)return this.properties=new Sn({}),this.root.push(this.properties),this.root.push(new we(e)),this;if(this.properties=new Sn(e),this.root.push(this.properties),e.text&&this.root.push(new we(e.text)),e.children)for(const t of e.children)if(t instanceof Or){this.root.push(t.start);for(const e of t.children)this.root.push(e);this.root.push(t.end)}else this.root.push(t)}prepForXml(e){for(const t of this.root)if(t instanceof Rr){const r=this.root.indexOf(t),n=new Sr(t.options.children,(0,Ke.EL)());e.viewWrapper.Relationships.createRelationship(n.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,Ce.EXTERNAL),this.root[r]=n}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}class Rn extends s{constructor(e){super("m:oMath");for(const t of e.children)this.root.push(t)}}class Nn extends s{constructor(e){super("m:t"),this.root.push(e)}}class Cn extends s{constructor(e){super("m:r"),this.root.push(new Nn(e))}}class On extends s{constructor(e){super("m:den");for(const t of e)this.root.push(t)}}class kn extends s{constructor(e){super("m:num");for(const t of e)this.root.push(t)}}class Ln extends s{constructor(e){super("m:f"),this.root.push(new kn(e.numerator)),this.root.push(new On(e.denominator))}}class Dn extends o{constructor(){super(...arguments),this.xmlKeys={accent:"m:val"}}}class Pn extends s{constructor(e){super("m:chr"),this.root.push(new Dn({accent:e}))}}class Fn extends s{constructor(e){super("m:e");for(const t of e)this.root.push(t)}}class Bn extends o{constructor(){super(...arguments),this.xmlKeys={value:"m:val"}}}class Mn extends s{constructor(){super("m:limLoc"),this.root.push(new Bn({value:"undOvr"}))}}class Un extends o{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class Hn extends s{constructor(){super("m:subHide"),this.root.push(new Un({hide:1}))}}class jn extends o{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class zn extends s{constructor(){super("m:supHide"),this.root.push(new jn({hide:1}))}}class Wn extends s{constructor(e,t,r){super("m:naryPr"),e&&this.root.push(new Pn(e)),this.root.push(new Mn),t||this.root.push(new zn),r||this.root.push(new Hn)}}class Kn extends s{constructor(e){super("m:sub");for(const t of e)this.root.push(t)}}class Gn extends s{constructor(e){super("m:sup");for(const t of e)this.root.push(t)}}class Vn extends s{constructor(e){super("m:nary"),this.root.push(new Wn("∑",!!e.superScript,!!e.subScript)),e.subScript&&this.root.push(new Kn(e.subScript)),e.superScript&&this.root.push(new Gn(e.superScript)),this.root.push(new Fn(e.children))}}class $n extends s{constructor(e){super("m:nary"),this.root.push(new Wn("",!!e.superScript,!!e.subScript)),e.subScript&&this.root.push(new Kn(e.subScript)),e.superScript&&this.root.push(new Gn(e.superScript)),this.root.push(new Fn(e.children))}}class Xn extends s{constructor(){super("m:sSupPr")}}class Zn extends s{constructor(e){super("m:sSup"),this.root.push(new Xn),this.root.push(new Fn(e.children)),this.root.push(new Gn(e.superScript))}}class qn extends s{constructor(){super("m:sSubPr")}}class Yn extends s{constructor(e){super("m:sSub"),this.root.push(new qn),this.root.push(new Fn(e.children)),this.root.push(new Kn(e.subScript))}}class Jn extends s{constructor(){super("m:sSubSupPr")}}class Qn extends s{constructor(e){super("m:sSubSup"),this.root.push(new Jn),this.root.push(new Fn(e.children)),this.root.push(new Kn(e.subScript)),this.root.push(new Gn(e.superScript))}}class es extends s{constructor(){super("m:sPrePr")}}class ts extends s{constructor(e){super("m:sPre"),this.root.push(new es),this.root.push(new Fn(e.children)),this.root.push(new Kn(e.subScript)),this.root.push(new Gn(e.superScript))}}const rs="";class ns extends s{constructor(e){if(super("m:deg"),e)for(const t of e)this.root.push(t)}}class ss extends o{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class is extends s{constructor(){super("m:degHide"),this.root.push(new ss({hide:1}))}}class os extends s{constructor(e){super("m:radPr"),e||this.root.push(new is)}}class as extends s{constructor(e){super("m:rad"),this.root.push(new os(!!e.degree)),this.root.push(new ns(e.degree)),this.root.push(new Fn(e.children))}}class cs extends s{constructor(e){super("m:fName");for(const t of e)this.root.push(t)}}class us extends s{constructor(){super("m:funcPr")}}class ls extends s{constructor(e){super("m:func"),this.root.push(new us),this.root.push(new cs(e.name)),this.root.push(new Fn(e.children))}}class hs extends o{constructor(){super(...arguments),this.xmlKeys={character:"m:val"}}}class ps extends s{constructor(e){super("m:begChr"),this.root.push(new hs({character:e}))}}class ds extends o{constructor(){super(...arguments),this.xmlKeys={character:"m:val"}}}class fs extends s{constructor(e){super("m:endChr"),this.root.push(new ds({character:e}))}}class ms extends s{constructor(e){super("m:dPr"),e&&(this.root.push(new ps(e.beginningCharacter)),this.root.push(new fs(e.endingCharacter)))}}class ws extends s{constructor(e){super("m:d"),this.root.push(new ms),this.root.push(new Fn(e.children))}}class gs extends s{constructor(e){super("m:d"),this.root.push(new ms({beginningCharacter:"[",endingCharacter:"]"})),this.root.push(new Fn(e.children))}}class ys extends s{constructor(e){super("m:d"),this.root.push(new ms({beginningCharacter:"{",endingCharacter:"}"})),this.root.push(new Fn(e.children))}}class bs extends s{constructor(e){super("m:d"),this.root.push(new ms({beginningCharacter:"〈",endingCharacter:"〉"})),this.root.push(new Fn(e.children))}}class xs extends s{constructor(e){super("w:tblGrid");for(const t of e)this.root.push(new _s(t))}}class vs extends o{constructor(){super(...arguments),this.xmlKeys={w:"w:w"}}}class _s extends s{constructor(e){super("w:gridCol"),void 0!==e&&this.root.push(new vs({w:(0,S.Jd)(e)}))}}var Es,Ts,As,Ss;!function(e){e.AUTO="auto",e.DXA="dxa",e.NIL="nil",e.PERCENTAGE="pct"}(Es||(Es={}));class Is extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:type",size:"w:w"}}}class Rs extends s{constructor(e,{type:t=Es.AUTO,size:r}){super(e);let n=r;t===Es.PERCENTAGE&&"number"==typeof r&&(n=`${r}%`),this.root.push(new Is({type:t,size:(0,S.aB)(n)}))}}!function(e){e.TABLE="w:tblCellMar",e.TABLE_CELL="w:tcMar"}(Ts||(Ts={}));class Ns extends i{constructor(e,{marginUnitType:t=Es.DXA,top:r,left:n,bottom:s,right:i}){super(e),void 0!==r&&this.root.push(new Rs("w:top",{type:t,size:r})),void 0!==n&&this.root.push(new Rs("w:left",{type:t,size:n})),void 0!==s&&this.root.push(new Rs("w:bottom",{type:t,size:s})),void 0!==i&&this.root.push(new Rs("w:right",{type:t,size:i}))}}class Cs extends i{constructor(e){super("w:tcBorders"),e.top&&this.root.push(new P("w:top",e.top)),e.start&&this.root.push(new P("w:start",e.start)),e.left&&this.root.push(new P("w:left",e.left)),e.bottom&&this.root.push(new P("w:bottom",e.bottom)),e.end&&this.root.push(new P("w:end",e.end)),e.right&&this.root.push(new P("w:right",e.right))}}class Os extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class ks extends s{constructor(e){super("w:gridSpan"),this.root.push(new Os({val:(0,S.vH)(e)}))}}!function(e){e.CONTINUE="continue",e.RESTART="restart"}(As||(As={}));class Ls extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Ds extends s{constructor(e){super("w:vMerge"),this.root.push(new Ls({val:e}))}}!function(e){e.BOTTOM_TO_TOP_LEFT_TO_RIGHT="btLr",e.LEFT_TO_RIGHT_TOP_TO_BOTTOM="lrTb",e.TOP_TO_BOTTOM_RIGHT_TO_LEFT="tbRl"}(Ss||(Ss={}));class Ps extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Fs extends s{constructor(e){super("w:textDirection"),this.root.push(new Ps({val:e}))}}class Bs extends i{constructor(e){super("w:tcPr"),e.width&&this.root.push(new Rs("w:tcW",e.width)),e.columnSpan&&this.root.push(new ks(e.columnSpan)),e.verticalMerge?this.root.push(new Ds(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new Ds(As.RESTART)),e.borders&&this.root.push(new Cs(e.borders)),e.shading&&this.root.push(new Y(e.shading)),e.margins&&this.root.push(new Ns(Ts.TABLE_CELL,e.margins)),e.textDirection&&this.root.push(new Fs(e.textDirection)),e.verticalAlign&&this.root.push(new Mr(e.verticalAlign))}}class Ms extends s{constructor(e){super("w:tc"),this.options=e,this.root.push(new Bs(e));for(const t of e.children)this.root.push(t)}prepForXml(e){return this.root[this.root.length-1]instanceof In||this.root.push(new In({})),super.prepForXml(e)}}const Us={style:w.NONE,size:0,color:"auto"},Hs={style:w.SINGLE,size:4,color:"auto"};class js extends s{constructor(e){super("w:tblBorders"),e.top?this.root.push(new P("w:top",e.top)):this.root.push(new P("w:top",Hs)),e.left?this.root.push(new P("w:left",e.left)):this.root.push(new P("w:left",Hs)),e.bottom?this.root.push(new P("w:bottom",e.bottom)):this.root.push(new P("w:bottom",Hs)),e.right?this.root.push(new P("w:right",e.right)):this.root.push(new P("w:right",Hs)),e.insideHorizontal?this.root.push(new P("w:insideH",e.insideHorizontal)):this.root.push(new P("w:insideH",Hs)),e.insideVertical?this.root.push(new P("w:insideV",e.insideVertical)):this.root.push(new P("w:insideV",Hs))}}var zs,Ws,Ks,Gs,Vs,$s,Xs;js.NONE={top:Us,bottom:Us,left:Us,right:Us,insideHorizontal:Us,insideVertical:Us},function(e){e.MARGIN="margin",e.PAGE="page",e.TEXT="text"}(zs||(zs={})),function(e){e.CENTER="center",e.INSIDE="inside",e.LEFT="left",e.OUTSIDE="outside",e.RIGHT="right"}(Ws||(Ws={})),function(e){e.CENTER="center",e.INSIDE="inside",e.BOTTOM="bottom",e.OUTSIDE="outside",e.INLINE="inline",e.TOP="top"}(Ks||(Ks={})),function(e){e.NEVER="never",e.OVERLAP="overlap"}(Gs||(Gs={}));class Zs extends o{constructor(){super(...arguments),this.xmlKeys={horizontalAnchor:"w:horzAnchor",verticalAnchor:"w:vertAnchor",absoluteHorizontalPosition:"w:tblpX",relativeHorizontalPosition:"w:tblpXSpec",absoluteVerticalPosition:"w:tblpY",relativeVerticalPosition:"w:tblpYSpec",bottomFromText:"w:bottomFromText",topFromText:"w:topFromText",leftFromText:"w:leftFromText",rightFromText:"w:rightFromText"}}}class qs extends s{constructor(e){var{leftFromText:t,rightFromText:r,topFromText:n,bottomFromText:s,absoluteHorizontalPosition:i,absoluteVerticalPosition:o}=e,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);se.CellCount)))).fill(100),margins:n,indent:s,float:i,layout:o,style:a,borders:c,alignment:u,visuallyRightToLeft:l}){super("w:tbl"),this.root.push(new Qs({borders:null!=c?c:{},width:null!=t?t:{size:100},indent:s,float:i,layout:o,style:a,alignment:u,cellMargin:n,visuallyRightToLeft:l})),this.root.push(new xs(r));for(const t of e)this.root.push(t);e.forEach(((t,r)=>{if(r===e.length-1)return;let n=0;t.cells.forEach((t=>{if(t.options.rowSpan&&t.options.rowSpan>1){const s=new Ms({rowSpan:t.options.rowSpan-1,columnSpan:t.options.columnSpan,borders:t.options.borders,children:[],verticalMerge:As.CONTINUE});e[r+1].addCellToColumnIndex(s,n)}n+=t.options.columnSpan||1}))}))}}!function(e){e.AUTO="auto",e.ATLEAST="atLeast",e.EXACT="exact"}($s||($s={}));class ti extends o{constructor(){super(...arguments),this.xmlKeys={value:"w:val",rule:"w:hRule"}}}class ri extends s{constructor(e,t){super("w:trHeight"),this.root.push(new ti({value:(0,S.Jd)(e),rule:t}))}}class ni extends i{constructor(e){super("w:trPr"),void 0!==e.cantSplit&&this.root.push(new I("w:cantSplit",e.cantSplit)),void 0!==e.tableHeader&&this.root.push(new I("w:tblHeader",e.tableHeader)),e.height&&this.root.push(new ri(e.height.value,e.height.rule))}}class si extends s{constructor(e){super("w:tr"),this.options=e,this.root.push(new ni(e));for(const t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter((e=>e instanceof Ms))}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){const r=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,r-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error("cell 'rootIndex' should between 1 to "+(this.root.length-1));let t=0;for(let r=1;r=this.root.length){if(t)return this.root.length;throw new Error("cell 'columnIndex' should not great than "+(r-1))}const e=this.root[n];n+=1,r+=e&&e.options.columnSpan||1}return n-1}}class ii extends o{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns",vt:"xmlns:vt"}}}class oi extends s{constructor(){super("Properties"),this.root.push(new ii({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class ai extends o{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns"}}}class ci extends o{constructor(){super(...arguments),this.xmlKeys={contentType:"ContentType",extension:"Extension"}}}class ui extends s{constructor(e,t){super("Default"),this.root.push(new ci({contentType:e,extension:t}))}}class li extends o{constructor(){super(...arguments),this.xmlKeys={contentType:"ContentType",partName:"PartName"}}}class hi extends s{constructor(e,t){super("Override"),this.root.push(new li({contentType:e,partName:t}))}}class pi extends s{constructor(){super("Types"),this.root.push(new ai({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new ui("image/png","png")),this.root.push(new ui("image/jpeg","jpeg")),this.root.push(new ui("image/jpeg","jpg")),this.root.push(new ui("image/bmp","bmp")),this.root.push(new ui("image/gif","gif")),this.root.push(new ui("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new ui("application/xml","xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new hi("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml"))}addFooter(e){this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new hi("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class di extends s{constructor(e){super("cp:coreProperties"),this.root.push(new pn({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new k("dc:title",e.title)),e.subject&&this.root.push(new k("dc:subject",e.subject)),e.creator&&this.root.push(new k("dc:creator",e.creator)),e.keywords&&this.root.push(new k("cp:keywords",e.keywords)),e.description&&this.root.push(new k("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new k("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new k("cp:revision",String(e.revision))),this.root.push(new fi("dcterms:created")),this.root.push(new fi("dcterms:modified"))}}class fi extends s{constructor(e){super(e),this.root.push(new pn({type:"dcterms:W3CDTF"})),this.root.push((0,S.sF)(new Date))}}class mi extends o{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns",vt:"xmlns:vt"}}}class wi extends o{constructor(){super(...arguments),this.xmlKeys={fmtid:"fmtid",pid:"pid",name:"name"}}}class gi extends s{constructor(e,t){super("property"),this.root.push(new wi({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new yi(t.value))}}class yi extends s{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class bi extends s{constructor(e){super("Properties"),this.properties=[],this.root.push(new mi({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach((e=>this.root.push(e))),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new gi(this.nextId++,e))}}class xi extends o{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"}}}class vi extends f{constructor(e,t){super("w:ftr",t),this.refId=e,t||this.root.push(new xi({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}}class _i{constructor(e,t,r){this.media=e,this.footer=new vi(t,r),this.relationships=new gn}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class Ei extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:type",id:"w:id"}}}class Ti extends s{constructor(){super("w:footnoteRef")}}class Ai extends me{constructor(){super({style:"FootnoteReference"}),this.root.push(new Ti)}}!function(e){e.SEPERATOR="separator",e.CONTINUATION_SEPERATOR="continuationSeparator"}(Xs||(Xs={}));class Si extends s{constructor(e){super("w:footnote"),this.root.push(new Ei({type:e.type,id:e.id}));for(let t=0;te.charCodeAt(0)))):new(r(8764).Buffer)(e,"base64")}}const Mi="";var Ui,Hi;!function(e){e.DECIMAL="decimal",e.UPPER_ROMAN="upperRoman",e.LOWER_ROMAN="lowerRoman",e.UPPER_LETTER="upperLetter",e.LOWER_LETTER="lowerLetter",e.ORDINAL="ordinal",e.CARDINAL_TEXT="cardinalText",e.ORDINAL_TEXT="ordinalText",e.HEX="hex",e.CHICAGO="chicago",e.IDEOGRAPH__DIGITAL="ideographDigital",e.JAPANESE_COUNTING="japaneseCounting",e.AIUEO="aiueo",e.IROHA="iroha",e.DECIMAL_FULL_WIDTH="decimalFullWidth",e.DECIMAL_HALF_WIDTH="decimalHalfWidth",e.JAPANESE_LEGAL="japaneseLegal",e.JAPANESE_DIGITAL_TEN_THOUSAND="japaneseDigitalTenThousand",e.DECIMAL_ENCLOSED_CIRCLE="decimalEnclosedCircle",e.DECIMAL_FULL_WIDTH2="decimalFullWidth2",e.AIUEO_FULL_WIDTH="aiueoFullWidth",e.IROHA_FULL_WIDTH="irohaFullWidth",e.DECIMAL_ZERO="decimalZero",e.BULLET="bullet",e.GANADA="ganada",e.CHOSUNG="chosung",e.DECIMAL_ENCLOSED_FULLSTOP="decimalEnclosedFullstop",e.DECIMAL_ENCLOSED_PARENTHESES="decimalEnclosedParen",e.DECIMAL_ENCLOSED_CIRCLE_CHINESE="decimalEnclosedCircleChinese",e.IDEOGRAPH_ENCLOSED_CIRCLE="ideographEnclosedCircle",e.IDEOGRAPH_TRADITIONAL="ideographTraditional",e.IDEOGRAPH_ZODIAC="ideographZodiac",e.IDEOGRAPH_ZODIAC_TRADITIONAL="ideographZodiacTraditional",e.TAIWANESE_COUNTING="taiwaneseCounting",e.IDEOGRAPH_LEGAL_TRADITIONAL="ideographLegalTraditional",e.TAIWANESE_COUNTING_THOUSAND="taiwaneseCountingThousand",e.TAIWANESE_DIGITAL="taiwaneseDigital",e.CHINESE_COUNTING="chineseCounting",e.CHINESE_LEGAL_SIMPLIFIED="chineseLegalSimplified",e.CHINESE_COUNTING_THOUSAND="chineseCountingThousand",e.KOREAN_DIGITAL="koreanDigital",e.KOREAN_COUNTING="koreanCounting",e.KOREAN_LEGAL="koreanLegal",e.KOREAN_DIGITAL2="koreanDigital2",e.VIETNAMESE_COUNTING="vietnameseCounting",e.RUSSIAN_LOWER="russianLower",e.RUSSIAN_UPPER="russianUpper",e.NONE="none",e.NUMBER_IN_DASH="numberInDash",e.HEBREW1="hebrew1",e.HEBREW2="hebrew2",e.ARABIC_ALPHA="arabicAlpha",e.ARABIC_ABJAD="arabicAbjad",e.HINDI_VOWELS="hindiVowels",e.HINDI_CONSONANTS="hindiConsonants",e.HINDI_NUMBERS="hindiNumbers",e.HINDI_COUNTING="hindiCounting",e.THAI_LETTERS="thaiLetters",e.THAI_NUMBERS="thaiNumbers",e.THAI_COUNTING="thaiCounting",e.BAHT_TEXT="bahtText",e.DOLLAR_TEXT="dollarText",e.CUSTOM="custom"}(Ui||(Ui={}));class ji extends o{constructor(){super(...arguments),this.xmlKeys={ilvl:"w:ilvl",tentative:"w15:tentative"}}}class zi extends s{constructor(e){super("w:numFmt"),this.root.push(new a({val:e}))}}class Wi extends s{constructor(e){super("w:lvlText"),this.root.push(new a({val:e}))}}class Ki extends s{constructor(e){super("w:lvlJc"),this.root.push(new a({val:e}))}}!function(e){e.NOTHING="nothing",e.SPACE="space",e.TAB="tab"}(Hi||(Hi={}));class Gi extends s{constructor(e){super("w:suff"),this.root.push(new a({val:e}))}}class Vi extends s{constructor(){super("w:isLgl")}}class $i extends s{constructor({level:e,format:t,text:r,alignment:n=m.START,start:s=1,style:i,suffix:o,isLegalNumberingStyle:a}){if(super("w:lvl"),this.root.push(new C("w:start",(0,S.vH)(s))),t&&this.root.push(new zi(t)),o&&this.root.push(new Gi(o)),a&&this.root.push(new Vi),r&&this.root.push(new Wi(r)),this.root.push(new Ki(n)),this.paragraphProperties=new Sn(i&&i.paragraph),this.runProperties=new pe(i&&i.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new ji({ilvl:(0,S.vH)(e),tentative:1}))}}class Xi extends $i{}class Zi extends $i{}class qi extends s{constructor(e){super("w:multiLevelType"),this.root.push(new a({val:e}))}}class Yi extends o{constructor(){super(...arguments),this.xmlKeys={abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"}}}class Ji extends s{constructor(e,t){super("w:abstractNum"),this.root.push(new Yi({abstractNumId:(0,S.vH)(e),restartNumberingAfterBreak:0})),this.root.push(new qi("hybridMultilevel")),this.id=e;for(const e of t)this.root.push(new Xi(e))}}class Qi extends s{constructor(e){super("w:abstractNumId"),this.root.push(new a({val:e}))}}class eo extends o{constructor(){super(...arguments),this.xmlKeys={numId:"w:numId"}}}class to extends s{constructor(e){super("w:num"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new eo({numId:(0,S.vH)(e.numId)})),this.root.push(new Qi((0,S.vH)(e.abstractNumId))),e.overrideLevel&&this.root.push(new no(e.overrideLevel.num,e.overrideLevel.start))}}class ro extends o{constructor(){super(...arguments),this.xmlKeys={ilvl:"w:ilvl"}}}class no extends s{constructor(e,t){super("w:lvlOverride"),this.root.push(new ro({ilvl:e})),void 0!==t&&this.root.push(new io(t))}}class so extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class io extends s{constructor(e){super("w:startOverride"),this.root.push(new so({val:e}))}}class oo extends s{constructor(e){super("w:numbering"),this.abstractNumberingMap=new Map,this.concreteNumberingMap=new Map,this.referenceConfigMap=new Map,this.root.push(new pn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const t=new Ji((0,Ke.NY)(),[{level:0,format:Ui.BULLET,text:"●",alignment:m.LEFT,style:{paragraph:{indent:{left:(0,Ke.vw)(.5),hanging:(0,Ke.vw)(.25)}}}},{level:1,format:Ui.BULLET,text:"○",alignment:m.LEFT,style:{paragraph:{indent:{left:(0,Ke.vw)(1),hanging:(0,Ke.vw)(.25)}}}},{level:2,format:Ui.BULLET,text:"■",alignment:m.LEFT,style:{paragraph:{indent:{left:2160,hanging:(0,Ke.vw)(.25)}}}},{level:3,format:Ui.BULLET,text:"●",alignment:m.LEFT,style:{paragraph:{indent:{left:2880,hanging:(0,Ke.vw)(.25)}}}},{level:4,format:Ui.BULLET,text:"○",alignment:m.LEFT,style:{paragraph:{indent:{left:3600,hanging:(0,Ke.vw)(.25)}}}},{level:5,format:Ui.BULLET,text:"■",alignment:m.LEFT,style:{paragraph:{indent:{left:4320,hanging:(0,Ke.vw)(.25)}}}},{level:6,format:Ui.BULLET,text:"●",alignment:m.LEFT,style:{paragraph:{indent:{left:5040,hanging:(0,Ke.vw)(.25)}}}},{level:7,format:Ui.BULLET,text:"●",alignment:m.LEFT,style:{paragraph:{indent:{left:5760,hanging:(0,Ke.vw)(.25)}}}},{level:8,format:Ui.BULLET,text:"●",alignment:m.LEFT,style:{paragraph:{indent:{left:6480,hanging:(0,Ke.vw)(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new to({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevel:{num:0,start:1}})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const t of e.config)this.abstractNumberingMap.set(t.reference,new Ji((0,Ke.NY)(),t.levels)),this.referenceConfigMap.set(t.reference,t.levels)}prepForXml(e){for(const e of this.abstractNumberingMap.values())this.root.push(e);for(const e of this.concreteNumberingMap.values())this.root.push(e);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const r=this.abstractNumberingMap.get(e);if(!r)return;const n=`${e}-${t}`;if(this.concreteNumberingMap.has(n))return;const s=this.referenceConfigMap.get(e),i=s&&s[0].start,o={numId:(0,Ke.NY)(),abstractNumId:r.id,reference:e,instance:t,overrideLevel:i&&Number.isInteger(i)?{num:0,start:i}:{num:0,start:1}};this.concreteNumberingMap.set(n,new to(o))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class ao extends o{constructor(){super(...arguments),this.xmlKeys={version:"w:val",name:"w:name",uri:"w:uri"}}}class co extends s{constructor(e){super("w:compatSetting"),this.root.push(new ao({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class uo extends s{constructor(e){super("w:compat"),e.version&&this.root.push(new co(e.version)),e.useSingleBorderforContiguousCells&&this.root.push(new I("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new I("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new I("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new I("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new I("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new I("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new I("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new I("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new I("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new I("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new I("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new I("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new I("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new I("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new I("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new I("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new I("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new I("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new I("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new I("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new I("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new I("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new I("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new I("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new I("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new I("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new I("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new I("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new I("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new I("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new I("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new I("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new I("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new I("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new I("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new I("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new I("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new I("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new I("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new I("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new I("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new I("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new I("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new I("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new I("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new I("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new I("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new I("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new I("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new I("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new I("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new I("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new I("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new I("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new I("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new I("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new I("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new I("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new I("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new I("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new I("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new I("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new I("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new I("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new I("w:cachedColBalance",e.cachedColumnBalance))}}class lo extends o{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"}}}class ho extends s{constructor(e){var t,r,n,s;super("w:settings"),this.root.push(new lo({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new I("w:displayBackgroundShape",!0)),void 0!==e.trackRevisions&&this.root.push(new I("w:trackRevisions",e.trackRevisions)),void 0!==e.evenAndOddHeaders&&this.root.push(new I("w:evenAndOddHeaders",e.evenAndOddHeaders)),void 0!==e.updateFields&&this.root.push(new I("w:updateFields",e.updateFields)),this.root.push(new uo(Object.assign(Object.assign({},null!==(t=e.compatibility)&&void 0!==t?t:{}),{version:null!==(s=null!==(n=null===(r=e.compatibility)||void 0===r?void 0:r.version)&&void 0!==n?n:e.compatibilityModeVersion)&&void 0!==s?s:15})))}}class po extends o{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class fo extends s{constructor(e){super("w:name"),this.root.push(new po({val:e}))}}class mo extends s{constructor(e){super("w:uiPriority"),this.root.push(new po({val:(0,S.vH)(e)}))}}class wo extends o{constructor(){super(...arguments),this.xmlKeys={type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"}}}class go extends s{constructor(e,t){super("w:style"),this.root.push(new wo(e)),t.name&&this.root.push(new fo(t.name)),t.basedOn&&this.root.push(new N("w:basedOn",t.basedOn)),t.next&&this.root.push(new N("w:next",t.next)),t.link&&this.root.push(new N("w:link",t.link)),void 0!==t.uiPriority&&this.root.push(new mo(t.uiPriority)),void 0!==t.semiHidden&&this.root.push(new I("w:semiHidden",t.semiHidden)),void 0!==t.unhideWhenUsed&&this.root.push(new I("w:unhideWhenUsed",t.unhideWhenUsed)),void 0!==t.quickFormat&&this.root.push(new I("w:qFormat",t.quickFormat))}}class yo extends go{constructor(e){super({type:"paragraph",styleId:e.id},e),this.paragraphProperties=new Sn(e.paragraph),this.runProperties=new pe(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class bo extends go{constructor(e){super({type:"character",styleId:e.id},Object.assign({uiPriority:99,unhideWhenUsed:!0},e)),this.runProperties=new pe(e.run),this.root.push(this.runProperties)}}class xo extends yo{constructor(e){super(Object.assign(Object.assign({},e),{basedOn:"Normal",next:"Normal",quickFormat:!0}))}}class vo extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Title",name:"Title"}))}}class _o extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading1",name:"Heading 1"}))}}class Eo extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading2",name:"Heading 2"}))}}class To extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading3",name:"Heading 3"}))}}class Ao extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading4",name:"Heading 4"}))}}class So extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading5",name:"Heading 5"}))}}class Io extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading6",name:"Heading 6"}))}}class Ro extends xo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Strong",name:"Strong"}))}}class No extends yo{constructor(e){super(Object.assign(Object.assign({},e),{id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0}))}}class Co extends yo{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Ae.AUTO}},run:{size:20}}))}}class Oo extends bo{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}}))}}class ko extends bo{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}}))}}class Lo extends bo{constructor(e){super(Object.assign(Object.assign({},e),{id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:T.SINGLE}}}))}}class Do extends s{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new yo(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new bo(t))}}class Po extends s{constructor(e){super("w:pPrDefault"),this.root.push(new Sn(e))}}class Fo extends s{constructor(e){super("w:rPrDefault"),this.root.push(new pe(e))}}class Bo extends s{constructor(e){super("w:docDefaults"),this.runPropertiesDefaults=new Fo(e.run),this.paragraphPropertiesDefaults=new Po(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class Mo{newInstance(e){const t=(0,c.xml2js)(e,{compact:!1});let r;for(const e of t.elements||[])"w:styles"===e.name&&(r=e);if(void 0===r)throw new Error("can not find styles element");const n=r.elements||[];return new Do({initialStyles:new p(r.attributes),importedStyles:n.map((e=>u(e)))})}}class Uo{newInstance(e={}){var t;return{initialStyles:new pn({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new Bo(null!==(t=e.document)&&void 0!==t?t:{}),new vo(Object.assign({run:{size:56}},e.title)),new _o(Object.assign({run:{color:"2E74B5",size:32}},e.heading1)),new Eo(Object.assign({run:{color:"2E74B5",size:26}},e.heading2)),new To(Object.assign({run:{color:"1F4D78",size:24}},e.heading3)),new Ao(Object.assign({run:{color:"2E74B5",italics:!0}},e.heading4)),new So(Object.assign({run:{color:"2E74B5"}},e.heading5)),new Io(Object.assign({run:{color:"1F4D78"}},e.heading6)),new Ro(Object.assign({run:{bold:!0}},e.strong)),new No(e.listParagraph||{}),new Lo(e.hyperlink||{}),new Oo(e.footnoteReference||{}),new Co(e.footnoteText||{}),new ko(e.footnoteTextChar||{})]}}}class Ho{constructor(e,t={}){var r,n,s,i,o,a,c;if(this.currentRelationshipId=1,this.headers=[],this.footers=[],this.coreProperties=new di(Object.assign(Object.assign({},e),{creator:null!==(r=e.creator)&&void 0!==r?r:"Un-named",revision:null!==(n=e.revision)&&void 0!==n?n:1,lastModifiedBy:null!==(s=e.lastModifiedBy)&&void 0!==s?s:"Un-named"})),this.numbering=new oo(e.numbering?e.numbering:{config:[]}),this.comments=new ur(null!==(i=e.comments)&&void 0!==i?i:{children:[]}),this.fileRelationships=new gn,this.customProperties=new bi(null!==(o=e.customProperties)&&void 0!==o?o:[]),this.appProperties=new oi,this.footnotesWrapper=new Li,this.contentTypes=new pi,this.documentWrapper=new yn({background:e.background}),this.settings=new ho({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:null===(a=e.features)||void 0===a?void 0:a.trackRevisions,updateFields:null===(c=e.features)||void 0===c?void 0:c.updateFields}),this.media=t.template&&t.template.media?t.template.media:new Bi,t.template&&(this.currentRelationshipId=t.template.currentRelationshipId+1),t.template&&e.externalStyles)throw Error("can not use both template and external styles");if(t.template&&t.template.styles){const e=new Mo;this.styles=e.newInstance(t.template.styles)}else if(e.externalStyles){const t=new Mo;this.styles=t.newInstance(e.externalStyles)}else if(e.styles){const t=(new Uo).newInstance(e.styles.default);this.styles=new Do(Object.assign(Object.assign({},t),e.styles))}else{const e=new Uo;this.styles=new Do(e.newInstance())}if(this.addDefaultRelationships(),t.template&&t.template.headers)for(const e of t.template.headers)this.addHeaderToDocument(e.header,e.type);if(t.template&&t.template.footers)for(const e of t.template.footers)this.addFooterToDocument(e.footer,e.type);for(const t of e.sections)this.addSection(t);if(e.footnotes)for(const t in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(t),e.footnotes[t].children)}addSection({headers:e={},footers:t={},children:r,properties:n}){this.documentWrapper.View.Body.addSection(Object.assign(Object.assign({},n),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(const e of r)this.documentWrapper.View.add(e)}createHeader(e){const t=new Fi(this.media,this.currentRelationshipId++);for(const r of e.options.children)t.add(r);return this.addHeaderToDocument(t),t}createFooter(e){const t=new _i(this.media,this.currentRelationshipId++);for(const r of e.options.children)t.add(r);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Le.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=Le.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.createRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.createRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.createRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.createRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map((e=>e.header))}get Footers(){return this.footers.map((e=>e.footer))}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}}const jo="";class zo extends s{constructor(e={}){super("w:instrText"),this.properties=e,this.root.push(new V({space:v.PRESERVE}));let t="TOC";this.properties.captionLabel&&(t=`${t} \\a "${this.properties.captionLabel}"`),this.properties.entriesFromBookmark&&(t=`${t} \\b "${this.properties.entriesFromBookmark}"`),this.properties.captionLabelIncludingNumbers&&(t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`),this.properties.sequenceAndPageNumbersSeparator&&(t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`),this.properties.tcFieldIdentifier&&(t=`${t} \\f "${this.properties.tcFieldIdentifier}"`),this.properties.hyperlink&&(t=`${t} \\h`),this.properties.tcFieldLevelRange&&(t=`${t} \\l "${this.properties.tcFieldLevelRange}"`),this.properties.pageNumbersEntryLevelsRange&&(t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`),this.properties.headingStyleRange&&(t=`${t} \\o "${this.properties.headingStyleRange}"`),this.properties.entryAndPageNumberSeparator&&(t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`),this.properties.seqFieldIdentifierForPrefix&&(t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`),this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length&&(t=`${t} \\t "${this.properties.stylesWithLevels.map((e=>`${e.styleName},${e.level}`)).join(",")}"`),this.properties.useAppliedParagraphOutlineLevel&&(t=`${t} \\u`),this.properties.preserveTabInEntries&&(t=`${t} \\w`),this.properties.preserveNewLineInEntries&&(t=`${t} \\x`),this.properties.hideTabAndPageNumbersInWebView&&(t=`${t} \\z`),this.root.push(t)}}class Wo extends s{constructor(){super("w:sdtContent")}}class Ko extends s{constructor(e){super("w:sdtPr"),this.root.push(new N("w:alias",e))}}class Go extends s{constructor(e="Table of Contents",t){super("w:sdt"),this.root.push(new Ko(e));const r=new Wo,n=new In({children:[new me({children:[new W(!0),new zo(t),new K]})]});r.addChildElement(n);const s=new In({children:[new me({children:[new G]})]});r.addChildElement(s),this.root.push(r)}}class Vo{constructor(e,t){this.styleName=e,this.level=t}}class $o{constructor(e={children:[]}){this.options=e}}class Xo{constructor(e={children:[]}){this.options=e}}class Zo extends o{constructor(){super(...arguments),this.xmlKeys={id:"w:id"}}}class qo extends s{constructor(e){super("w:footnoteReference"),this.root.push(new Zo({id:e}))}}class Yo extends me{constructor(e){super({style:"FootnoteReference"}),this.root.push(new qo(e))}}class Jo extends s{constructor(e){super("w:ins"),this.root.push(new J({id:e.id,author:e.author,date:e.date})),this.addChildElement(new we(e))}}class Qo extends s{constructor(){super("w:delInstrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("PAGE")}}class ea extends s{constructor(){super("w:delInstrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("NUMPAGES")}}class ta extends s{constructor(){super("w:delInstrText"),this.root.push(new V({space:v.PRESERVE})),this.root.push("SECTIONPAGES")}}class ra extends s{constructor(e){super("w:delText"),this.root.push(new V({space:v.PRESERVE})),this.root.push(e)}}class na extends s{constructor(e){super("w:del"),this.root.push(new J({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new sa(e),this.addChildElement(this.deletedTextRunWrapper)}}class sa extends s{constructor(e){if(super("w:r"),this.root.push(new pe(e)),e.children)for(const t of e.children)if("string"!=typeof t)this.root.push(t);else switch(t){case A.CURRENT:this.root.push(new W),this.root.push(new Qo),this.root.push(new K),this.root.push(new G);break;case A.TOTAL_PAGES:this.root.push(new W),this.root.push(new ea),this.root.push(new K),this.root.push(new G);break;case A.TOTAL_PAGES_IN_SECTION:this.root.push(new W),this.root.push(new ta),this.root.push(new K),this.root.push(new G);break;default:this.root.push(new ra(t))}else e.text&&this.root.push(new ra(e.text));if(e.break)for(let t=0;t{n=n.replace(new RegExp(`{${e.fileName}}`,"g"),(r+t).toString())})),n}getMediaData(e,t){return t.Array.filter((t=>e.search(`{${t.fileName}}`)>0))}}class ua{replace(e,t){let r=e;for(const e of t)r=r.replace(new RegExp(`{${e.reference}-${e.instance}}`,"g"),e.numId.toString());return r}}var la,ha=function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};!function(e){e.NONE="",e.WITH_2_BLANKS=" ",e.WITH_4_BLANKS=" ",e.WITH_TAB="\t"}(la||(la={}));class pa{static toString(e,t){return ha(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"string",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toBuffer(e,t){return ha(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toBase64String(e,t){return ha(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toBlob(e,t){return ha(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toStream(e,t){return this.compiler.compile(e,t).generateNodeStream({type:"nodebuffer",streamFiles:!0,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}}pa.compiler=new class{constructor(){this.formatter=new aa,this.imageReplacer=new ca,this.numberingReplacer=new ua}compile(e,t){const r=new ia,n=this.xmlifyFile(e,t),s=new Map(Object.entries(n));for(const[,e]of s)if(Array.isArray(e))for(const t of e)r.file(t.path,t.data);else r.file(e.path,e.data);for(const t of e.Media.Array){const e=t.stream;r.file(`word/media/${t.fileName}`,e)}return r}xmlifyFile(e,t){const r=e.Document.Relationships.RelationshipCount+1,n=oa(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=this.imageReplacer.getMediaData(n,e.Media);return{Relationships:{data:(()=>(s.forEach(((t,n)=>{e.Document.Relationships.createRelationship(r+n,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${t.fileName}`)})),oa(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}})))(),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const t=this.imageReplacer.replace(n,s,r);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const r=oa(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(r,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:oa(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:oa(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:oa(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map(((r,n)=>{const s=oa(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(s,e.Media).forEach(((e,t)=>{r.Relationships.createRelationship(t,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${e.fileName}`)})),{data:oa(this.formatter.format(r.Relationships,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${n+1}.xml.rels`}})),FooterRelationships:e.Footers.map(((r,n)=>{const s=oa(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(s,e.Media).forEach(((e,t)=>{r.Relationships.createRelationship(t,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${e.fileName}`)})),{data:oa(this.formatter.format(r.Relationships,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${n+1}.xml.rels`}})),Headers:e.Headers.map(((r,n)=>{const s=oa(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),i=this.imageReplacer.getMediaData(s,e.Media),o=this.imageReplacer.replace(s,i,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/header${n+1}.xml`}})),Footers:e.Footers.map(((r,n)=>{const s=oa(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),i=this.imageReplacer.getMediaData(s,e.Media),o=this.imageReplacer.replace(s,i,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/footer${n+1}.xml`}})),ContentTypes:{data:oa(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:oa(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:oa(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:oa(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:oa(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:oa(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:oa(this.formatter.format(e.Comments,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/comments.xml"}}}};var da=function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))};const fa={"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header":"header","http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer":"footer","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image":"image","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink":"hyperlink"};var ma;!function(e){e.HEADER="header",e.FOOTER="footer",e.IMAGE="image",e.HYPERLINK="hyperlink"}(ma||(ma={}));class wa{extract(e){return da(this,void 0,void 0,(function*(){const t=yield ia.loadAsync(e),r=yield t.files["word/document.xml"].async("text"),n=yield t.files["word/_rels/document.xml.rels"].async("text"),s=this.extractDocumentRefs(r),i=this.findReferenceFiles(n),o=new Bi;return{headers:yield this.createHeaders(t,s,i,o,0),footers:yield this.createFooters(t,s,i,o,s.headers.length),currentRelationshipId:s.footers.length+s.headers.length,styles:yield t.files["word/styles.xml"].async("text"),titlePageIsDefined:this.checkIfTitlePageIsDefined(r),media:o}}))}createFooters(e,t,r,n,s){return da(this,void 0,void 0,(function*(){const i=t.footers.map(((t,i)=>da(this,void 0,void 0,(function*(){const o=r.find((e=>e.id===t.id));if(null===o||!o)throw new Error(`Can not find target file for id ${t.id}`);const a=yield e.files[`word/${o.target}`].async("text"),l=(0,c.xml2js)(a,{compact:!1,captureSpacesBetweenElements:!0});if(!l.elements)return;const h=l.elements.reduce(((e,t)=>"w:ftr"===t.name?t:e)),p=u(h),d=new _i(n,s+i,p);return yield this.addRelationshipToWrapper(o,e,d,n),{type:t.type,footer:d}})))).filter((e=>!!e));return Promise.all(i)}))}createHeaders(e,t,r,n,s){return da(this,void 0,void 0,(function*(){const i=t.headers.map(((t,i)=>da(this,void 0,void 0,(function*(){const o=r.find((e=>e.id===t.id));if(null===o||!o)throw new Error(`Can not find target file for id ${t.id}`);const a=yield e.files[`word/${o.target}`].async("text"),l=(0,c.xml2js)(a,{compact:!1,captureSpacesBetweenElements:!0});if(!l.elements)return;const h=l.elements.reduce(((e,t)=>"w:hdr"===t.name?t:e)),p=u(h),d=new Fi(n,s+i,p);return yield this.addRelationshipToWrapper(o,e,d,n),{type:t.type,header:d}})))).filter((e=>!!e));return Promise.all(i)}))}addRelationshipToWrapper(e,t,r,n){return da(this,void 0,void 0,(function*(){const s=t.files[`word/_rels/${e.target}.rels`];if(!s)return;const i=yield s.async("text"),o=this.findReferenceFiles(i).filter((e=>e.type===ma.IMAGE)),a=this.findReferenceFiles(i).filter((e=>e.type===ma.HYPERLINK));for(const e of o){const s=ia.support.arraybuffer?"arraybuffer":"nodebuffer",i=yield t.files[`word/${e.target}`].async(s),o=n.addMedia(i,{width:100,height:100});r.Relationships.createRelationship(e.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${o.fileName}`)}for(const e of a)r.Relationships.createRelationship(e.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",e.target,Ce.EXTERNAL)}))}findReferenceFiles(e){const t=(0,c.xml2js)(e,{compact:!0});return(Array.isArray(t.Relationships.Relationship)?t.Relationships.Relationship:[t.Relationships.Relationship]).map((e=>{if(void 0===e._attributes)throw Error("relationship element has no attributes");return{id:this.parseRefId(e._attributes.Id),type:fa[e._attributes.Type],target:e._attributes.Target}})).filter((e=>null!==e.type))}extractDocumentRefs(e){const t=(0,c.xml2js)(e,{compact:!0})["w:document"]["w:body"]["w:sectPr"],r=t["w:headerReference"];let n;n=void 0===r?[]:Array.isArray(r)?r:[r];const s=n.map((e=>{if(void 0===e._attributes)throw Error("header reference element has no attributes");return{type:e._attributes["w:type"],id:this.parseRefId(e._attributes["r:id"])}})),i=t["w:footerReference"];let o;return o=void 0===i?[]:Array.isArray(i)?i:[i],{headers:s,footers:o.map((e=>{if(void 0===e._attributes)throw Error("footer reference element has no attributes");return{type:e._attributes["w:type"],id:this.parseRefId(e._attributes["r:id"])}}))}}checkIfTitlePageIsDefined(e){return void 0!==(0,c.xml2js)(e,{compact:!0})["w:document"]["w:body"]["w:sectPr"]["w:titlePg"]}parseRefId(e){const t=/^rId(\d+)$/.exec(e);if(null===t)throw new Error("Invalid ref id");return parseInt(t[1],10)}}var ga=r(5575)})(),n})(),e.exports=t()},162:function(e,t,r){var n,s;void 0===(s="function"==typeof(n=function(){"use strict";function t(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,o=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,r,o){var a=i.URL||i.webkitURL,c=document.createElement("a");r=r||e.name||"download",c.download=r,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?s(c):n(c.href)?t(e,r,o):s(c,c.target="_blank")):(c.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(c.href)}),4e4),setTimeout((function(){s(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),r);else if(n(e))t(e,r,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){s(o)}))}}:function(e,r,n,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,r,n);var a="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&c||o)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},l.readAsDataURL(e)}else{var h=i.URL||i.webkitURL,p=h.createObjectURL(e);s?s.location=p:location.href=p,s=null,setTimeout((function(){h.revokeObjectURL(p)}),4e4)}});i.saveAs=a.saveAs=a,e.exports=a})?n.apply(t,[]):n)||(e.exports=s)},379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0,(()=>{"use strict";var e=r(379),t=r.n(e),n=r(795),s=r.n(n),i=r(569),o=r.n(i),a=r(565),c=r.n(a),u=r(216),l=r.n(u),h=r(589),p=r.n(h),d=r(103),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=l(),t()(d.Z,f),d.Z&&d.Z.locals&&d.Z.locals,H5P=H5P||{},H5P.ExportableTextArea=r(426).Z})()})();; H5P.AdvancedText = (function ($, EventDispatcher) { /** * A simple library for displaying text with advanced styling. * * @class H5P.AdvancedText * @param {Object} parameters * @param {Object} [parameters.text='New text'] * @param {number} id */ function AdvancedText(parameters, id) { var self = this; EventDispatcher.call(this); var html = (parameters.text === undefined ? 'New text' : parameters.text); /** * Wipe container and add text html. * * @alias H5P.AdvancedText#attach * @param {H5P.jQuery} $container */ self.attach = function ($container) { $container.addClass('h5p-advanced-text').html(html); }; } AdvancedText.prototype = Object.create(EventDispatcher.prototype); AdvancedText.prototype.constructor = AdvancedText; return AdvancedText; })(H5P.jQuery, H5P.EventDispatcher); ; var H5P = H5P || {}; /** * Transition contains helper function relevant for transitioning */ H5P.Transition = (function ($) { /** * @class * @namespace H5P */ Transition = {}; /** * @private */ Transition.transitionEndEventNames = { 'WebkitTransition': 'webkitTransitionEnd', 'transition': 'transitionend', 'MozTransition': 'transitionend', 'OTransition': 'oTransitionEnd', 'msTransition': 'MSTransitionEnd' }; /** * @private */ Transition.cache = []; /** * Get the vendor property name for an event * * @function H5P.Transition.getVendorPropertyName * @static * @private * @param {string} prop Generic property name * @return {string} Vendor specific property name */ Transition.getVendorPropertyName = function (prop) { if (Transition.cache[prop] !== undefined) { return Transition.cache[prop]; } var div = document.createElement('div'); // Handle unprefixed versions (FF16+, for example) if (prop in div.style) { Transition.cache[prop] = prop; } else { var prefixes = ['Moz', 'Webkit', 'O', 'ms']; var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1); if (prop in div.style) { Transition.cache[prop] = prop; } else { for (var i = 0; i < prefixes.length; ++i) { var vendorProp = prefixes[i] + prop_; if (vendorProp in div.style) { Transition.cache[prop] = vendorProp; break; } } } } return Transition.cache[prop]; }; /** * Get the name of the transition end event * * @static * @private * @return {string} description */ Transition.getTransitionEndEventName = function () { return Transition.transitionEndEventNames[Transition.getVendorPropertyName('transition')] || undefined; }; /** * Helper function for listening on transition end events * * @function H5P.Transition.onTransitionEnd * @static * @param {domElement} $element The element which is transitioned * @param {function} callback The callback to be invoked when transition is finished * @param {number} timeout Timeout in milliseconds. Fallback if transition event is never fired */ Transition.onTransitionEnd = function ($element, callback, timeout) { // Fallback on 1 second if transition event is not supported/triggered timeout = timeout || 1000; Transition.transitionEndEventName = Transition.transitionEndEventName || Transition.getTransitionEndEventName(); var callbackCalled = false; var doCallback = function () { if (callbackCalled) { return; } $element.off(Transition.transitionEndEventName, callback); callbackCalled = true; clearTimeout(timer); callback(); }; var timer = setTimeout(function () { doCallback(); }, timeout); $element.on(Transition.transitionEndEventName, function () { doCallback(); }); }; /** * Wait for a transition - when finished, invokes next in line * * @private * * @param {Object[]} transitions Array of transitions * @param {H5P.jQuery} transitions[].$element Dom element transition is performed on * @param {number=} transitions[].timeout Timeout fallback if transition end never is triggered * @param {bool=} transitions[].break If true, sequence breaks after this transition * @param {number} index The index for current transition */ var runSequence = function (transitions, index) { if (index >= transitions.length) { return; } var transition = transitions[index]; H5P.Transition.onTransitionEnd(transition.$element, function () { if (transition.end) { transition.end(); } if (transition.break !== true) { runSequence(transitions, index+1); } }, transition.timeout || undefined); }; /** * Run a sequence of transitions * * @function H5P.Transition.sequence * @static * @param {Object[]} transitions Array of transitions * @param {H5P.jQuery} transitions[].$element Dom element transition is performed on * @param {number=} transitions[].timeout Timeout fallback if transition end never is triggered * @param {bool=} transitions[].break If true, sequence breaks after this transition */ Transition.sequence = function (transitions) { runSequence(transitions, 0); }; return Transition; })(H5P.jQuery); ; var H5P = H5P || {}; /** * Class responsible for creating a help text dialog */ H5P.JoubelHelpTextDialog = (function ($) { var numInstances = 0; /** * Display a pop-up containing a message. * * @param {H5P.jQuery} $container The container which message dialog will be appended to * @param {string} message The message * @param {string} closeButtonTitle The title for the close button * @return {H5P.jQuery} */ function JoubelHelpTextDialog(header, message, closeButtonTitle) { H5P.EventDispatcher.call(this); var self = this; numInstances++; var headerId = 'joubel-help-text-header-' + numInstances; var helpTextId = 'joubel-help-text-body-' + numInstances; var $helpTextDialogBox = $('
', { 'class': 'joubel-help-text-dialog-box', 'role': 'dialog', 'aria-labelledby': headerId, 'aria-describedby': helpTextId }); $('
', { 'class': 'joubel-help-text-dialog-background' }).appendTo($helpTextDialogBox); var $helpTextDialogContainer = $('
', { 'class': 'joubel-help-text-dialog-container' }).appendTo($helpTextDialogBox); $('
', { 'class': 'joubel-help-text-header', 'id': headerId, 'role': 'header', 'html': header }).appendTo($helpTextDialogContainer); $('
', { 'class': 'joubel-help-text-body', 'id': helpTextId, 'html': message, 'role': 'document', 'tabindex': 0 }).appendTo($helpTextDialogContainer); var handleClose = function () { $helpTextDialogBox.remove(); self.trigger('closed'); }; var $closeButton = $('
', { 'class': 'joubel-help-text-remove', 'role': 'button', 'title': closeButtonTitle, 'tabindex': 1, 'click': handleClose, 'keydown': function (event) { // 32 - space, 13 - enter if ([32, 13].indexOf(event.which) !== -1) { event.preventDefault(); handleClose(); } } }).appendTo($helpTextDialogContainer); /** * Get the DOM element * @return {HTMLElement} */ self.getElement = function () { return $helpTextDialogBox; }; self.focus = function () { $closeButton.focus(); }; } JoubelHelpTextDialog.prototype = Object.create(H5P.EventDispatcher.prototype); JoubelHelpTextDialog.prototype.constructor = JoubelHelpTextDialog; return JoubelHelpTextDialog; }(H5P.jQuery)); ; var H5P = H5P || {}; /** * Class responsible for creating auto-disappearing dialogs */ H5P.JoubelMessageDialog = (function ($) { /** * Display a pop-up containing a message. * * @param {H5P.jQuery} $container The container which message dialog will be appended to * @param {string} message The message * @return {H5P.jQuery} */ function JoubelMessageDialog ($container, message) { var timeout; var removeDialog = function () { $warning.remove(); clearTimeout(timeout); $container.off('click.messageDialog'); }; // Create warning popup: var $warning = $('
', { 'class': 'joubel-message-dialog', text: message }).appendTo($container); // Remove after 3 seconds or if user clicks anywhere in $container: timeout = setTimeout(removeDialog, 3000); $container.on('click.messageDialog', removeDialog); return $warning; } return JoubelMessageDialog; })(H5P.jQuery); ; var H5P = H5P || {}; /** * Class responsible for creating a circular progress bar */ H5P.JoubelProgressCircle = (function ($) { /** * Constructor for the Progress Circle * * @param {Number} number The amount of progress to display * @param {string} progressColor Color for the progress meter * @param {string} backgroundColor Color behind the progress meter */ function ProgressCircle(number, progressColor, fillColor, backgroundColor) { progressColor = progressColor || '#1a73d9'; fillColor = fillColor || '#f0f0f0'; backgroundColor = backgroundColor || '#ffffff'; var progressColorRGB = this.hexToRgb(progressColor); //Verify number try { number = Number(number); if (number === '') { throw 'is empty'; } if (isNaN(number)) { throw 'is not a number'; } } catch (e) { number = 'err'; } //Draw circle if (number > 100) { number = 100; } // We can not use rgba, since they will stack on top of each other. // Instead we create the equivalent of the rgba color // and applies this to the activeborder and background color. var progressColorString = 'rgb(' + parseInt(progressColorRGB.r, 10) + ',' + parseInt(progressColorRGB.g, 10) + ',' + parseInt(progressColorRGB.b, 10) + ')'; // Circle wrapper var $wrapper = $('
', { 'class': "joubel-progress-circle-wrapper" }); //Active border indicates progress var $activeBorder = $('
', { 'class': "joubel-progress-circle-active-border" }).appendTo($wrapper); //Background circle var $backgroundCircle = $('
', { 'class': "joubel-progress-circle-circle" }).appendTo($activeBorder); //Progress text/number $('', { 'text': number + '%', 'class': "joubel-progress-circle-percentage" }).appendTo($backgroundCircle); var deg = number * 3.6; if (deg <= 180) { $activeBorder.css('background-image', 'linear-gradient(' + (90 + deg) + 'deg, transparent 50%, ' + fillColor + ' 50%),' + 'linear-gradient(90deg, ' + fillColor + ' 50%, transparent 50%)') .css('border', '2px solid' + backgroundColor) .css('background-color', progressColorString); } else { $activeBorder.css('background-image', 'linear-gradient(' + (deg - 90) + 'deg, transparent 50%, ' + progressColorString + ' 50%),' + 'linear-gradient(90deg, ' + fillColor + ' 50%, transparent 50%)') .css('border', '2px solid' + backgroundColor) .css('background-color', progressColorString); } this.$activeBorder = $activeBorder; this.$backgroundCircle = $backgroundCircle; this.$wrapper = $wrapper; this.initResizeFunctionality(); return $wrapper; } /** * Initializes resize functionality for the progress circle */ ProgressCircle.prototype.initResizeFunctionality = function () { var self = this; $(window).resize(function () { // Queue resize setTimeout(function () { self.resize(); }); }); // First resize setTimeout(function () { self.resize(); }, 0); }; /** * Resize function makes progress circle grow or shrink relative to parent container */ ProgressCircle.prototype.resize = function () { var $parent = this.$wrapper.parent(); if ($parent !== undefined && $parent) { // Measurements var fontSize = parseInt($parent.css('font-size'), 10); // Static sizes var fontSizeMultiplum = 3.75; var progressCircleWidthPx = parseInt((fontSize / 4.5), 10) % 2 === 0 ? parseInt((fontSize / 4.5), 10) + 4 : parseInt((fontSize / 4.5), 10) + 5; var progressCircleOffset = progressCircleWidthPx / 2; var width = fontSize * fontSizeMultiplum; var height = fontSize * fontSizeMultiplum; this.$activeBorder.css({ 'width': width, 'height': height }); this.$backgroundCircle.css({ 'width': width - progressCircleWidthPx, 'height': height - progressCircleWidthPx, 'top': progressCircleOffset, 'left': progressCircleOffset }); } }; /** * Hex to RGB conversion * @param hex * @returns {{r: Number, g: Number, b: Number}} */ ProgressCircle.prototype.hexToRgb = function (hex) { var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), b: parseInt(result[3], 16) } : null; }; return ProgressCircle; }(H5P.jQuery)); ; var H5P = H5P || {}; H5P.SimpleRoundedButton = (function ($) { /** * Creates a new tip */ function SimpleRoundedButton(text) { var $simpleRoundedButton = $('
', { 'class': 'joubel-simple-rounded-button', 'title': text, 'role': 'button', 'tabindex': '0' }).keydown(function (e) { // 32 - space, 13 - enter if ([32, 13].indexOf(e.which) !== -1) { $(this).click(); e.preventDefault(); } }); $('', { 'class': 'joubel-simple-rounded-button-text', 'html': text }).appendTo($simpleRoundedButton); return $simpleRoundedButton; } return SimpleRoundedButton; }(H5P.jQuery)); ; var H5P = H5P || {}; /** * Class responsible for creating speech bubbles */ H5P.JoubelSpeechBubble = (function ($) { var $currentSpeechBubble; var $currentContainer; var $tail; var $innerTail; var removeSpeechBubbleTimeout; var currentMaxWidth; var DEFAULT_MAX_WIDTH = 400; var iDevice = navigator.userAgent.match(/iPod|iPhone|iPad/g) ? true : false; /** * Creates a new speech bubble * * @param {H5P.jQuery} $container The speaking object * @param {string} text The text to display * @param {number} maxWidth The maximum width of the bubble * @return {H5P.JoubelSpeechBubble} */ function JoubelSpeechBubble($container, text, maxWidth) { maxWidth = maxWidth || DEFAULT_MAX_WIDTH; currentMaxWidth = maxWidth; $currentContainer = $container; this.isCurrent = function ($tip) { return $tip.is($currentContainer); }; this.remove = function () { remove(); }; var fadeOutSpeechBubble = function ($speechBubble) { if (!$speechBubble) { return; } // Stop removing bubble clearTimeout(removeSpeechBubbleTimeout); $speechBubble.removeClass('show'); setTimeout(function () { if ($speechBubble) { $speechBubble.remove(); $speechBubble = undefined; } }, 500); }; if ($currentSpeechBubble !== undefined) { remove(); } var $h5pContainer = getH5PContainer($container); // Make sure we fade out old speech bubble fadeOutSpeechBubble($currentSpeechBubble); // Create bubble $tail = $('
'); $innerTail = $('
'); var $innerBubble = $( '
' + '
' + text + '
' + '
' ).prepend($innerTail); $currentSpeechBubble = $( '
' ).append([$tail, $innerBubble]) .appendTo($h5pContainer); // Show speech bubble with transition setTimeout(function () { $currentSpeechBubble.addClass('show'); }, 0); position($currentSpeechBubble, $currentContainer, maxWidth, $tail, $innerTail); // Handle click to close H5P.$body.on('mousedown.speechBubble', handleOutsideClick); // Handle window resizing H5P.$window.on('resize', '', handleResize); // Handle clicks when inside IV which blocks bubbling. $container.parents('.h5p-dialog') .on('mousedown.speechBubble', handleOutsideClick); if (iDevice) { H5P.$body.css('cursor', 'pointer'); } return this; } // Remove speechbubble if it belongs to a dom element that is about to be hidden H5P.externalDispatcher.on('domHidden', function (event) { if ($currentSpeechBubble !== undefined && event.data.$dom.find($currentContainer).length !== 0) { remove(); } }); /** * Returns the closest h5p container for the given DOM element. * * @param {object} $container jquery element * @return {object} the h5p container (jquery element) */ function getH5PContainer($container) { var $h5pContainer = $container.closest('.h5p-frame'); // Check closest h5p frame first, then check for container in case there is no frame. if (!$h5pContainer.length) { $h5pContainer = $container.closest('.h5p-container'); } return $h5pContainer; } /** * Event handler that is called when the window is resized. */ function handleResize() { position($currentSpeechBubble, $currentContainer, currentMaxWidth, $tail, $innerTail); } /** * Repositions the speech bubble according to the position of the container. * * @param {object} $currentSpeechbubble the speech bubble that should be positioned * @param {object} $container the container to which the speech bubble should point * @param {number} maxWidth the maximum width of the speech bubble * @param {object} $tail the tail (the triangle that points to the referenced container) * @param {object} $innerTail the inner tail (the triangle that points to the referenced container) */ function position($currentSpeechBubble, $container, maxWidth, $tail, $innerTail) { var $h5pContainer = getH5PContainer($container); // Calculate offset between the button and the h5p frame var offset = getOffsetBetween($h5pContainer, $container); var direction = (offset.bottom > offset.top ? 'bottom' : 'top'); var tipWidth = offset.outerWidth * 0.9; // Var needs to be renamed to make sense var bubbleWidth = tipWidth > maxWidth ? maxWidth : tipWidth; var bubblePosition = getBubblePosition(bubbleWidth, offset); var tailPosition = getTailPosition(bubbleWidth, bubblePosition, offset, $container.width()); // Need to set font-size, since element is appended to body. // Using same font-size as parent. In that way it will grow accordingly // when resizing var fontSize = 16;//parseFloat($parent.css('font-size')); // Set width and position of speech bubble $currentSpeechBubble.css(bubbleCSS( direction, bubbleWidth, bubblePosition, fontSize )); var preparedTailCSS = tailCSS(direction, tailPosition); $tail.css(preparedTailCSS); $innerTail.css(preparedTailCSS); } /** * Static function for removing the speechbubble */ var remove = function () { H5P.$body.off('mousedown.speechBubble'); H5P.$window.off('resize', '', handleResize); $currentContainer.parents('.h5p-dialog').off('mousedown.speechBubble'); if (iDevice) { H5P.$body.css('cursor', ''); } if ($currentSpeechBubble !== undefined) { // Apply transition, then remove speech bubble $currentSpeechBubble.removeClass('show'); // Make sure we remove any old timeout before reassignment clearTimeout(removeSpeechBubbleTimeout); removeSpeechBubbleTimeout = setTimeout(function () { $currentSpeechBubble.remove(); $currentSpeechBubble = undefined; }, 500); } // Don't return false here. If the user e.g. clicks a button when the bubble is visible, // we want the bubble to disapear AND the button to receive the event }; /** * Remove the speech bubble and container reference */ function handleOutsideClick(event) { if (event.target === $currentContainer[0]) { return; // Button clicks are not outside clicks } remove(); // There is no current container when a container isn't clicked $currentContainer = undefined; } /** * Calculate position for speech bubble * * @param {number} bubbleWidth The width of the speech bubble * @param {object} offset * @return {object} Return position for the speech bubble */ function getBubblePosition(bubbleWidth, offset) { var bubblePosition = {}; var tailOffset = 9; var widthOffset = bubbleWidth / 2; // Calculate top position bubblePosition.top = offset.top + offset.innerHeight; // Calculate bottom position bubblePosition.bottom = offset.bottom + offset.innerHeight + tailOffset; // Calculate left position if (offset.left < widthOffset) { bubblePosition.left = 3; } else if ((offset.left + widthOffset) > offset.outerWidth) { bubblePosition.left = offset.outerWidth - bubbleWidth - 3; } else { bubblePosition.left = offset.left - widthOffset + (offset.innerWidth / 2); } return bubblePosition; } /** * Calculate position for speech bubble tail * * @param {number} bubbleWidth The width of the speech bubble * @param {object} bubblePosition Speech bubble position * @param {object} offset * @param {number} iconWidth The width of the tip icon * @return {object} Return position for the tail */ function getTailPosition(bubbleWidth, bubblePosition, offset, iconWidth) { var tailPosition = {}; // Magic numbers. Tuned by hand so that the tail fits visually within // the bounds of the speech bubble. var leftBoundary = 9; var rightBoundary = bubbleWidth - 20; tailPosition.left = offset.left - bubblePosition.left + (iconWidth / 2) - 6; if (tailPosition.left < leftBoundary) { tailPosition.left = leftBoundary; } if (tailPosition.left > rightBoundary) { tailPosition.left = rightBoundary; } tailPosition.top = -6; tailPosition.bottom = -6; return tailPosition; } /** * Return bubble CSS for the desired growth direction * * @param {string} direction The direction the speech bubble will grow * @param {number} width The width of the speech bubble * @param {object} position Speech bubble position * @param {number} fontSize The size of the bubbles font * @return {object} Return CSS */ function bubbleCSS(direction, width, position, fontSize) { if (direction === 'top') { return { width: width + 'px', bottom: position.bottom + 'px', left: position.left + 'px', fontSize: fontSize + 'px', top: '' }; } else { return { width: width + 'px', top: position.top + 'px', left: position.left + 'px', fontSize: fontSize + 'px', bottom: '' }; } } /** * Return tail CSS for the desired growth direction * * @param {string} direction The direction the speech bubble will grow * @param {object} position Tail position * @return {object} Return CSS */ function tailCSS(direction, position) { if (direction === 'top') { return { bottom: position.bottom + 'px', left: position.left + 'px', top: '' }; } else { return { top: position.top + 'px', left: position.left + 'px', bottom: '' }; } } /** * Calculates the offset between an element inside a container and the * container. Only works if all the edges of the inner element are inside the * outer element. * Width/height of the elements is included as a convenience. * * @param {H5P.jQuery} $outer * @param {H5P.jQuery} $inner * @return {object} Position offset */ function getOffsetBetween($outer, $inner) { var outer = $outer[0].getBoundingClientRect(); var inner = $inner[0].getBoundingClientRect(); return { top: inner.top - outer.top, right: outer.right - inner.right, bottom: outer.bottom - inner.bottom, left: inner.left - outer.left, innerWidth: inner.width, innerHeight: inner.height, outerWidth: outer.width, outerHeight: outer.height }; } return JoubelSpeechBubble; })(H5P.jQuery); ; var H5P = H5P || {}; H5P.JoubelThrobber = (function ($) { /** * Creates a new tip */ function JoubelThrobber() { // h5p-throbber css is described in core var $throbber = $('
', { 'class': 'h5p-throbber' }); return $throbber; } return JoubelThrobber; }(H5P.jQuery)); ; H5P.JoubelTip = (function ($) { var $conv = $('
'); /** * Creates a new tip element. * * NOTE that this may look like a class but it doesn't behave like one. * It returns a jQuery object. * * @param {string} tipHtml The text to display in the popup * @param {Object} [behaviour] Options * @param {string} [behaviour.tipLabel] Set to use a custom label for the tip button (you want this for good A11Y) * @param {boolean} [behaviour.helpIcon] Set to 'true' to Add help-icon classname to Tip button (changes the icon) * @param {boolean} [behaviour.showSpeechBubble] Set to 'false' to disable functionality (you may this in the editor) * @param {boolean} [behaviour.tabcontrol] Set to 'true' if you plan on controlling the tabindex in the parent (tabindex="-1") * @return {H5P.jQuery|undefined} Tip button jQuery element or 'undefined' if invalid tip */ function JoubelTip(tipHtml, behaviour) { // Keep track of the popup that appears when you click the Tip button var speechBubble; // Parse tip html to determine text var tipText = $conv.html(tipHtml).text().trim(); if (tipText === '') { return; // The tip has no textual content, i.e. it's invalid. } // Set default behaviour behaviour = $.extend({ tipLabel: tipText, helpIcon: false, showSpeechBubble: true, tabcontrol: false }, behaviour); // Create Tip button var $tipButton = $('
', { class: 'joubel-tip-container' + (behaviour.showSpeechBubble ? '' : ' be-quiet'), 'aria-label': behaviour.tipLabel, 'aria-expanded': false, role: 'button', tabindex: (behaviour.tabcontrol ? -1 : 0), click: function (event) { // Toggle show/hide popup toggleSpeechBubble(); event.preventDefault(); }, keydown: function (event) { if (event.which === 32 || event.which === 13) { // Space & enter key // Toggle show/hide popup toggleSpeechBubble(); event.stopPropagation(); event.preventDefault(); } else { // Any other key // Toggle hide popup toggleSpeechBubble(false); } }, // Add markup to render icon html: '' + '' + '' + '' + '' // IMPORTANT: All of the markup elements must have 'pointer-events: none;' }); const $tipAnnouncer = $('
', { 'class': 'hidden-but-read', 'aria-live': 'polite', appendTo: $tipButton, }); /** * Tip button interaction handler. * Toggle show or hide the speech bubble popup when interacting with the * Tip button. * * @private * @param {boolean} [force] 'true' shows and 'false' hides. */ var toggleSpeechBubble = function (force) { if (speechBubble !== undefined && speechBubble.isCurrent($tipButton)) { // Hide current popup speechBubble.remove(); speechBubble = undefined; $tipButton.attr('aria-expanded', false); $tipAnnouncer.html(''); } else if (force !== false && behaviour.showSpeechBubble) { // Create and show new popup speechBubble = H5P.JoubelSpeechBubble($tipButton, tipHtml); $tipButton.attr('aria-expanded', true); $tipAnnouncer.html(tipHtml); } }; return $tipButton; } return JoubelTip; })(H5P.jQuery); ; var H5P = H5P || {}; H5P.JoubelSlider = (function ($) { /** * Creates a new Slider * * @param {object} [params] Additional parameters */ function JoubelSlider(params) { H5P.EventDispatcher.call(this); this.$slider = $('
', $.extend({ 'class': 'h5p-joubel-ui-slider' }, params)); this.$slides = []; this.currentIndex = 0; this.numSlides = 0; } JoubelSlider.prototype = Object.create(H5P.EventDispatcher.prototype); JoubelSlider.prototype.constructor = JoubelSlider; JoubelSlider.prototype.addSlide = function ($content) { $content.addClass('h5p-joubel-ui-slide').css({ 'left': (this.numSlides*100) + '%' }); this.$slider.append($content); this.$slides.push($content); this.numSlides++; if(this.numSlides === 1) { $content.addClass('current'); } }; JoubelSlider.prototype.attach = function ($container) { $container.append(this.$slider); }; JoubelSlider.prototype.move = function (index) { var self = this; if(index === 0) { self.trigger('first-slide'); } if(index+1 === self.numSlides) { self.trigger('last-slide'); } self.trigger('move'); var $previousSlide = self.$slides[this.currentIndex]; H5P.Transition.onTransitionEnd(this.$slider, function () { $previousSlide.removeClass('current'); self.trigger('moved'); }); this.$slides[index].addClass('current'); var translateX = 'translateX(' + (-index*100) + '%)'; this.$slider.css({ '-webkit-transform': translateX, '-moz-transform': translateX, '-ms-transform': translateX, 'transform': translateX }); this.currentIndex = index; }; JoubelSlider.prototype.remove = function () { this.$slider.remove(); }; JoubelSlider.prototype.next = function () { if(this.currentIndex+1 >= this.numSlides) { return; } this.move(this.currentIndex+1); }; JoubelSlider.prototype.previous = function () { this.move(this.currentIndex-1); }; JoubelSlider.prototype.first = function () { this.move(0); }; JoubelSlider.prototype.last = function () { this.move(this.numSlides-1); }; return JoubelSlider; })(H5P.jQuery); ; var H5P = H5P || {}; /** * @module */ H5P.JoubelScoreBar = (function ($) { /* Need to use an id for the star SVG since that is the only way to reference SVG filters */ var idCounter = 0; /** * Creates a score bar * @class H5P.JoubelScoreBar * @param {number} maxScore Maximum score * @param {string} [label] Makes it easier for readspeakers to identify the scorebar * @param {string} [helpText] Score explanation * @param {string} [scoreExplanationButtonLabel] Label for score explanation button */ function JoubelScoreBar(maxScore, label, helpText, scoreExplanationButtonLabel) { var self = this; self.maxScore = maxScore; self.score = 0; idCounter++; /** * @const {string} */ self.STAR_MARKUP = ''; /** * @function appendTo * @memberOf H5P.JoubelScoreBar# * @param {H5P.jQuery} $wrapper Dom container */ self.appendTo = function ($wrapper) { self.$scoreBar.appendTo($wrapper); }; /** * Create the text representation of the scorebar . * * @private * @return {string} */ var createLabel = function (score) { if (!label) { return ''; } return label.replace(':num', score).replace(':total', self.maxScore); }; /** * Creates the html for this widget * * @method createHtml * @private */ var createHtml = function () { // Container div self.$scoreBar = $('
', { 'class': 'h5p-joubelui-score-bar', }); var $visuals = $('
', { 'class': 'h5p-joubelui-score-bar-visuals', appendTo: self.$scoreBar }); // The progress bar wrapper self.$progressWrapper = $('
', { 'class': 'h5p-joubelui-score-bar-progress-wrapper', appendTo: $visuals }); self.$progress = $('
', { 'class': 'h5p-joubelui-score-bar-progress', 'html': createLabel(self.score), appendTo: self.$progressWrapper }); // The star $('
', { 'class': 'h5p-joubelui-score-bar-star', html: self.STAR_MARKUP }).appendTo($visuals); // The score container var $numerics = $('
', { 'class': 'h5p-joubelui-score-numeric', appendTo: self.$scoreBar, 'aria-hidden': true }); // The current score self.$scoreCounter = $('', { 'class': 'h5p-joubelui-score-number h5p-joubelui-score-number-counter', text: 0, appendTo: $numerics }); // The separator $('', { 'class': 'h5p-joubelui-score-number-separator', text: '/', appendTo: $numerics }); // Max score self.$maxScore = $('', { 'class': 'h5p-joubelui-score-number h5p-joubelui-score-max', text: self.maxScore, appendTo: $numerics }); if (helpText) { H5P.JoubelUI.createTip(helpText, { tipLabel: scoreExplanationButtonLabel ? scoreExplanationButtonLabel : helpText, helpIcon: true }).appendTo(self.$scoreBar); self.$scoreBar.addClass('h5p-score-bar-has-help'); } }; /** * Set the current score * @method setScore * @memberOf H5P.JoubelScoreBar# * @param {number} score */ self.setScore = function (score) { // Do nothing if score hasn't changed if (score === self.score) { return; } self.score = score > self.maxScore ? self.maxScore : score; self.updateVisuals(); }; /** * Increment score * @method incrementScore * @memberOf H5P.JoubelScoreBar# * @param {number=} incrementBy Optional parameter, defaults to 1 */ self.incrementScore = function (incrementBy) { self.setScore(self.score + (incrementBy || 1)); }; /** * Set the max score * @method setMaxScore * @memberOf H5P.JoubelScoreBar# * @param {number} maxScore The max score */ self.setMaxScore = function (maxScore) { self.maxScore = maxScore; }; /** * Updates the progressbar visuals * @memberOf H5P.JoubelScoreBar# * @method updateVisuals */ self.updateVisuals = function () { self.$progress.html(createLabel(self.score)); self.$scoreCounter.text(self.score); self.$maxScore.text(self.maxScore); setTimeout(function () { // Start the progressbar animation self.$progress.css({ width: ((self.score / self.maxScore) * 100) + '%' }); H5P.Transition.onTransitionEnd(self.$progress, function () { // If fullscore fill the star and start the animation self.$scoreBar.toggleClass('h5p-joubelui-score-bar-full-score', self.score === self.maxScore); self.$scoreBar.toggleClass('h5p-joubelui-score-bar-animation-active', self.score === self.maxScore); // Only allow the star animation to run once self.$scoreBar.one("animationend", function() { self.$scoreBar.removeClass("h5p-joubelui-score-bar-animation-active"); }); }, 600); }, 300); }; /** * Removes all classes * @method reset */ self.reset = function () { self.$scoreBar.removeClass('h5p-joubelui-score-bar-full-score'); }; createHtml(); } return JoubelScoreBar; })(H5P.jQuery); ; var H5P = H5P || {}; H5P.JoubelProgressbar = (function ($) { /** * Joubel progressbar class * @method JoubelProgressbar * @constructor * @param {number} steps Number of steps * @param {Object} [options] Additional options * @param {boolean} [options.disableAria] Disable readspeaker assistance * @param {string} [options.progressText] A progress text for describing * current progress out of total progress for readspeakers. * e.g. "Slide :num of :total" */ function JoubelProgressbar(steps, options) { H5P.EventDispatcher.call(this); var self = this; this.options = $.extend({ progressText: 'Slide :num of :total' }, options); this.currentStep = 0; this.steps = steps; this.$progressbar = $('
', { 'class': 'h5p-joubelui-progressbar' }); this.$background = $('
', { 'class': 'h5p-joubelui-progressbar-background' }).appendTo(this.$progressbar); } JoubelProgressbar.prototype = Object.create(H5P.EventDispatcher.prototype); JoubelProgressbar.prototype.constructor = JoubelProgressbar; JoubelProgressbar.prototype.updateAria = function () { var self = this; if (this.options.disableAria) { return; } if (!this.$currentStatus) { this.$currentStatus = $('
', { 'class': 'h5p-joubelui-progressbar-slide-status-text', 'aria-live': 'assertive' }).appendTo(this.$progressbar); } var interpolatedProgressText = self.options.progressText .replace(':num', self.currentStep) .replace(':total', self.steps); this.$currentStatus.html(interpolatedProgressText); }; /** * Appends to a container * @method appendTo * @param {H5P.jquery} $container */ JoubelProgressbar.prototype.appendTo = function ($container) { this.$progressbar.appendTo($container); }; /** * Update progress * @method setProgress * @param {number} step */ JoubelProgressbar.prototype.setProgress = function (step) { // Check for valid value: if (step > this.steps || step < 0) { return; } this.currentStep = step; this.$background.css({ width: ((this.currentStep/this.steps)*100) + '%' }); this.updateAria(); }; /** * Increment progress with 1 * @method next */ JoubelProgressbar.prototype.next = function () { this.setProgress(this.currentStep+1); }; /** * Reset progressbar * @method reset */ JoubelProgressbar.prototype.reset = function () { this.setProgress(0); }; /** * Check if last step is reached * @method isLastStep * @return {Boolean} */ JoubelProgressbar.prototype.isLastStep = function () { return this.steps === this.currentStep; }; return JoubelProgressbar; })(H5P.jQuery); ; var H5P = H5P || {}; /** * H5P Joubel UI library. * * This is a utility library, which does not implement attach. I.e, it has to bee actively used by * other libraries * @module */ H5P.JoubelUI = (function ($) { /** * The internal object to return * @class H5P.JoubelUI * @static */ function JoubelUI() {} /* Public static functions */ /** * Create a tip icon * @method H5P.JoubelUI.createTip * @param {string} text The textual tip * @param {Object} params Parameters * @return {H5P.JoubelTip} */ JoubelUI.createTip = function (text, params) { return new H5P.JoubelTip(text, params); }; /** * Create message dialog * @method H5P.JoubelUI.createMessageDialog * @param {H5P.jQuery} $container The dom container * @param {string} message The message * @return {H5P.JoubelMessageDialog} */ JoubelUI.createMessageDialog = function ($container, message) { return new H5P.JoubelMessageDialog($container, message); }; /** * Create help text dialog * @method H5P.JoubelUI.createHelpTextDialog * @param {string} header The textual header * @param {string} message The textual message * @param {string} closeButtonTitle The title for the close button * @return {H5P.JoubelHelpTextDialog} */ JoubelUI.createHelpTextDialog = function (header, message, closeButtonTitle) { return new H5P.JoubelHelpTextDialog(header, message, closeButtonTitle); }; /** * Create progress circle * @method H5P.JoubelUI.createProgressCircle * @param {number} number The progress (0 to 100) * @param {string} progressColor The progress color in hex value * @param {string} fillColor The fill color in hex value * @param {string} backgroundColor The background color in hex value * @return {H5P.JoubelProgressCircle} */ JoubelUI.createProgressCircle = function (number, progressColor, fillColor, backgroundColor) { return new H5P.JoubelProgressCircle(number, progressColor, fillColor, backgroundColor); }; /** * Create throbber for loading * @method H5P.JoubelUI.createThrobber * @return {H5P.JoubelThrobber} */ JoubelUI.createThrobber = function () { return new H5P.JoubelThrobber(); }; /** * Create simple rounded button * @method H5P.JoubelUI.createSimpleRoundedButton * @param {string} text The button label * @return {H5P.SimpleRoundedButton} */ JoubelUI.createSimpleRoundedButton = function (text) { return new H5P.SimpleRoundedButton(text); }; /** * Create Slider * @method H5P.JoubelUI.createSlider * @param {Object} [params] Parameters * @return {H5P.JoubelSlider} */ JoubelUI.createSlider = function (params) { return new H5P.JoubelSlider(params); }; /** * Create Score Bar * @method H5P.JoubelUI.createScoreBar * @param {number=} maxScore The maximum score * @param {string} [label] Makes it easier for readspeakers to identify the scorebar * @return {H5P.JoubelScoreBar} */ JoubelUI.createScoreBar = function (maxScore, label, helpText, scoreExplanationButtonLabel) { return new H5P.JoubelScoreBar(maxScore, label, helpText, scoreExplanationButtonLabel); }; /** * Create Progressbar * @method H5P.JoubelUI.createProgressbar * @param {number=} numSteps The total numer of steps * @param {Object} [options] Additional options * @param {boolean} [options.disableAria] Disable readspeaker assistance * @param {string} [options.progressText] A progress text for describing * current progress out of total progress for readspeakers. * e.g. "Slide :num of :total" * @return {H5P.JoubelProgressbar} */ JoubelUI.createProgressbar = function (numSteps, options) { return new H5P.JoubelProgressbar(numSteps, options); }; /** * Create standard Joubel button * * @method H5P.JoubelUI.createButton * @param {object} params * May hold any properties allowed by jQuery. If href is set, an A tag * is used, if not a button tag is used. * @return {H5P.jQuery} The jquery element created */ JoubelUI.createButton = function(params) { var type = 'button'; if (params.href) { type = 'a'; } else { params.type = 'button'; } if (params.class) { params.class += ' h5p-joubelui-button'; } else { params.class = 'h5p-joubelui-button'; } return $('<' + type + '/>', params); }; /** * Fix for iframe scoll bug in IOS. When focusing an element that doesn't have * focus support by default the iframe will scroll the parent frame so that * the focused element is out of view. This varies dependening on the elements * of the parent frame. */ if (H5P.isFramed && !H5P.hasiOSiframeScrollFix && /iPad|iPhone|iPod/.test(navigator.userAgent)) { H5P.hasiOSiframeScrollFix = true; // Keep track of original focus function var focus = HTMLElement.prototype.focus; // Override the original focus HTMLElement.prototype.focus = function () { // Only focus the element if it supports it natively if ( (this instanceof HTMLAnchorElement || this instanceof HTMLInputElement || this instanceof HTMLSelectElement || this instanceof HTMLTextAreaElement || this instanceof HTMLButtonElement || this instanceof HTMLIFrameElement || this instanceof HTMLAreaElement) && // HTMLAreaElement isn't supported by Safari yet. !this.getAttribute('role')) { // Focus breaks if a different role has been set // In theory this.isContentEditable should be able to recieve focus, // but it didn't work when tested. // Trigger the original focus with the proper context focus.call(this); } }; } return JoubelUI; })(H5P.jQuery); ; !function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.jQuery=H5P.jQuery,t.EventDispatcher=H5P.EventDispatcher,t.JoubelUI=H5P.JoubelUI},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stripHTML=t.addClickAndKeyboardListeners=t.keyCode=t.defaultValue=t.contains=t.isIOS=t.isIPad=t.kebabCase=t.isFunction=t.flattenArray=void 0;var i=n(0),r=(t.flattenArray=function(e){return e.concat.apply([],e)},t.isFunction=function(e){return"function"==typeof e},t.kebabCase=function(e){return e.replace(/[\W]/g,"-")},t.isIPad=null!==navigator.userAgent.match(/iPad/i),t.isIOS=null!==navigator.userAgent.match(/iPad|iPod|iPhone/i),t.contains=function(e,t){return-1!==e.indexOf(t)}),s=(t.defaultValue=function(e,t){return void 0!==e?e:t},t.keyCode={ENTER:13,ESC:27,SPACE:32}),o=(t.addClickAndKeyboardListeners=function(e,t,n){e.click(function(e){t.call(n||this,e)}),e.keydown(function(e){r([s.ENTER,s.SPACE],e.which)&&(e.preventDefault(),t.call(n||this,e))})},(0,i.jQuery)("
"));t.stripHTML=function(e){return o.html(e).text().trim()}},function(e,t,n){"use strict";function i(e,t){var n=this;s.call(n),n.children=[];var i=function(e){for(var t=e;t=t?e.apply(null,i):function(){var e=Array.prototype.slice.call(arguments,0);return n.apply(null,i.concat(e))}}},r=(t.compose=function(){for(var e=arguments.length,t=Array(e),n=0;n
';e.attr("role","application").addClass("h5p-course-presentation").html(i),this.$container=e,this.$slideAnnouncer=e.find(".h5p-current-slide-announcer"),this.$fullscreenAnnouncer=e.find(".h5p-fullscreen-announcer"),this.$slideTop=this.$slideAnnouncer.next(),this.$wrapper=e.children(".h5p-wrapper").focus(function(){n.initKeyEvents()}).blur(function(){void 0!==n.keydown&&(H5P.jQuery("body").unbind("keydown",n.keydown),delete n.keydown)}).click(function(e){var t=H5P.jQuery(e.target),i=n.belongsToTagName(e.target,["input","textarea","a","button"],e.currentTarget),r=-1!==e.target.tabIndex,s=t.closest(".h5p-popup-container"),o=0!==s.length;if(!i&&!r&&!n.editor)if(o){var a=t.closest("[tabindex]");1===a.closest(".h5p-popup-container").length?a.focus():s.find(".h5p-close-popup").focus()}else n.$wrapper.focus();n.presentation.keywordListEnabled&&!n.presentation.keywordListAlwaysShow&&n.presentation.keywordListAutoHide&&!t.is("textarea, .h5p-icon-pencil, span")&&n.hideKeywords()}),this.on("exitFullScreen",function(){t.$footer.removeClass("footer-full-screen"),t.$fullScreenButton.attr("title",t.l10n.fullscreen),t.$fullscreenAnnouncer.html(t.l10n.accessibilityExitedFullscreen)}),this.on("enterFullScreen",function(){t.$fullscreenAnnouncer.html(t.l10n.accessibilityEnteredFullscreen)});var r=parseInt(this.$wrapper.css("width"));this.width=0!==r?r:640;var s=parseInt(this.$wrapper.css("height"));this.height=0!==s?s:400,this.ratio=16/9,this.fontSize=16,this.$boxWrapper=this.$wrapper.children(".h5p-box-wrapper");var o=this.$boxWrapper.children(".h5p-presentation-wrapper");this.$slidesWrapper=o.children(".h5p-slides-wrapper"),this.$keywordsWrapper=o.children(".h5p-keywords-wrapper"),this.$progressbar=this.$wrapper.find(".h5p-progressbar"),this.$footer=this.$wrapper.children(".h5p-footer"),this.initKeywords=void 0===this.presentation.keywordListEnabled||!0===this.presentation.keywordListEnabled||void 0!==this.editor,this.activeSurface&&void 0===this.editor&&(this.initKeywords=!1,this.$boxWrapper.css("height","100%")),this.isSolutionMode=!1,this.createSlides(),this.elementsAttached[this.currentSlideIndex]=!0;var a;if(this.showSummarySlide=!1,this.hideSummarySlide?this.showSummarySlide=!this.hideSummarySlide:this.slidesWithSolutions.forEach(function(e){n.showSummarySlide=e.length}),void 0===this.editor&&(this.showSummarySlide||this.hasAnswerElements)){var l={elements:[],keywords:[]};this.slides.push(l),a=H5P.jQuery(g.default.createHTML(l)).appendTo(this.$slidesWrapper),a.addClass("h5p-summary-slide"),this.isCurrentSlide(this.slides.length-1)&&(this.$current=a)}var c=this.getKeywordMenuConfig();c.length>0||this.isEditor()?(this.keywordMenu.init(c),this.keywordMenu.on("select",function(e){return t.keywordClick(e.data.index)}),this.keywordMenu.on("close",function(){return t.hideKeywords()}),this.keywordMenu.on("select",function(){t.$currentKeyword=t.$keywords.children(".h5p-current")}),this.$keywords=(0,m.jQuery)(this.keywordMenu.getElement()).appendTo(this.$keywordsWrapper),this.$currentKeyword=this.$keywords.children(".h5p-current"),this.setKeywordsOpacity(void 0===this.presentation.keywordListOpacity?90:this.presentation.keywordListOpacity),this.presentation.keywordListAlwaysShow&&this.showKeywords()):(this.$keywordsWrapper.remove(),this.initKeywords=!1),void 0===this.editor&&this.activeSurface?(this.$progressbar.add(this.$footer).remove(),H5P.fullscreenSupported&&(this.$fullScreenButton=H5P.jQuery("
",{class:"h5p-toggle-full-screen",title:this.l10n.fullscreen,role:"button",tabindex:0,appendTo:this.$wrapper}),(0,y.addClickAndKeyboardListeners)(this.$fullScreenButton,function(){return n.toggleFullScreen()}))):(this.initTouchEvents(),this.navigationLine=new u.default(this),this.previousState&&this.previousState.progress||this.setSlideNumberAnnouncer(0,!1),this.summarySlideObject=new d.default(this,a)),new h.default(this),this.previousState&&this.previousState.progress&&this.jumpToSlide(this.previousState.progress)},S.prototype.belongsToTagName=function(e,t,n){if(!e)return!1;n=n||document.body,"string"==typeof t&&(t=[t]),t=t.map(function(e){return e.toLowerCase()});var i=e.tagName.toLowerCase();return-1!==t.indexOf(i)||n!==e&&this.belongsToTagName(e.parentNode,t,n)},S.prototype.updateKeywordMenuFromSlides=function(){this.keywordMenu.removeAllMenuItemElements();var e=this.getKeywordMenuConfig();return(0,m.jQuery)(this.keywordMenu.init(e))},S.prototype.getKeywordMenuConfig=function(){var e=this;return this.slides.map(function(t,n){return{title:e.createSlideTitle(t),subtitle:e.l10n.slide+" "+(n+1),index:n}}).filter(function(e){return null!==e.title})},S.prototype.createSlideTitle=function(e){var t=this.isEditor()?this.l10n.noTitle:null;return this.hasKeywords(e)?e.keywords[0].main:t},S.prototype.isEditor=function(){return void 0!==this.editor},S.prototype.hasKeywords=function(e){return void 0!==e.keywords&&e.keywords.length>0},S.prototype.createSlides=function(){for(var e=this,t=0;t=e.maxScore;n.addClass(i?"h5p-is-correct":"h5p-is-wrong"),t.navigationLine.updateSlideTitle(e.slide-1)}}):this.progressbarParts.forEach(function(e){e.find(".h5p-progressbar-part-has-task").removeClass("h5p-is-correct").removeClass("h5p-is-wrong")})},S.prototype.toggleKeywords=function(){this[this.$keywordsWrapper.hasClass("h5p-open")?"hideKeywords":"showKeywords"]()},S.prototype.hideKeywords=function(){this.$keywordsWrapper.hasClass("h5p-open")&&(void 0!==this.$keywordsButton&&(this.$keywordsButton.attr("title",this.l10n.showKeywords),this.$keywordsButton.attr("aria-label",this.l10n.showKeywords),this.$keywordsButton.attr("aria-expanded","false"),this.$keywordsButton.focus()),this.$keywordsWrapper.removeClass("h5p-open"))},S.prototype.showKeywords=function(){this.$keywordsWrapper.hasClass("h5p-open")||(void 0!==this.$keywordsButton&&(this.$keywordsButton.attr("title",this.l10n.hideKeywords),this.$keywordsButton.attr("aria-label",this.l10n.hideKeywords),this.$keywordsButton.attr("aria-expanded","true")),this.$keywordsWrapper.addClass("h5p-open"),this.presentation.keywordListAlwaysShow||this.$keywordsWrapper.find('li[tabindex="0"]').focus())},S.prototype.setKeywordsOpacity=function(e){var t=this.$keywordsWrapper.css("background-color").split(/\(|\)|,/g),n=r(t,3),i=n[0],s=n[1],o=n[2];this.$keywordsWrapper.css("background-color","rgba("+i+", "+s+", "+o+", "+e/100+")")},S.prototype.fitCT=function(){void 0===this.editor&&this.$current.find(".h5p-ct").each(function(){for(var e=100,t=H5P.jQuery(this),n=t.parent().height();t.outerHeight()>n&&(e--,t.css({fontSize:e+"%",lineHeight:e+65+"%"}),!(e<0)););})},S.prototype.resize=function(){var e=this.$container.hasClass("h5p-fullscreen")||this.$container.hasClass("h5p-semi-fullscreen");if(!this.ignoreResize){this.$wrapper.css("width","auto");var t=this.$container.width(),n={};if(e){var i=this.$container.height();t/i>this.ratio&&(t=i*this.ratio,n.width=t+"px")}var r=t/this.width;n.height=t/this.ratio+"px",n.fontSize=this.fontSize*r+"px",void 0!==this.editor&&this.editor.setContainerEm(this.fontSize*r*.75),this.$wrapper.css(n),this.swipeThreshold=100*r;var s=this.elementInstances[this.$current.index()];if(void 0!==s)for(var o=this.slides[this.$current.index()].elements,a=0;a",{class:o}).css({left:e.x+"%",top:e.y+"%",width:e.width+"%",height:e.height+"%"}).appendTo(n),l=void 0===e.backgroundOpacity||0===e.backgroundOpacity;if(a.toggleClass("h5p-transparent",l),r){this.createInteractionButton(e,t).appendTo(a)}else{var d=e.action&&e.action.library,c=d?this.getLibraryTypePmz(e.action.library):"other",u=H5P.jQuery("
",{class:"h5p-element-outer "+c+"-outer-element"}).css({background:"rgba(255,255,255,"+(void 0===e.backgroundOpacity?0:e.backgroundOpacity/100)+")"}).appendTo(a),p=H5P.jQuery("
",{class:"h5p-element-inner"}).appendTo(u);if(t.on("set-size",function(e){for(var t in e.data)a.get(0).style[t]=e.data[t]}),t.attach(p),void 0!==e.action&&"H5P.InteractiveVideo"===e.action.library.substr(0,20)){var h=function(){t.$container.addClass("h5p-fullscreen"),t.controls.$fullscreen&&t.controls.$fullscreen.remove(),t.hasFullScreen=!0,t.controls.$play.hasClass("h5p-pause")?t.$controls.addClass("h5p-autohide"):t.enableAutoHide()};void 0!==t.controls?h():t.on("controls",h)}0==i&&this.slidesWithSolutions.indexOf(i)<0&&p.attr("tabindex","0"),this.setOverflowTabIndex()}return void 0!==this.editor?this.editor.processElement(e,a,i,t):(e.solution&&this.addElementSolutionButton(e,t,a),this.hasAnswerElements=this.hasAnswerElements||void 0!==t.exportAnswers),a},S.prototype.disableTabIndexes=function(){var e=this.$container.find(".h5p-popup-container");this.$tabbables=this.$container.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){var t=(0,m.jQuery)(this),n=m.jQuery.contains(e.get(0),t.get(0));if(t.data("tabindex"))return!0;if(!n){var i=t.attr("tabindex");return t.data("tabindex",i),t.attr("tabindex","-1"),!0}return!1})},S.prototype.restoreTabIndexes=function(){this.$tabbables&&this.$tabbables.each(function(){var e=(0,m.jQuery)(this),t=e.data("tabindex");e.hasClass("ui-slider-handle")?(e.attr("tabindex",0),e.removeData("tabindex")):void 0!==t?(e.attr("tabindex",t),e.removeData("tabindex")):e.removeAttr("tabindex")})},S.prototype.createInteractionButton=function(e,t){var n=this,i=e.action.params&&e.action.params.cpAutoplay,r=e.action.metadata?e.action.metadata.title:"";""===r&&(r=e.action.params&&e.action.params.contentName||e.action.library.split(" ")[0].split(".")[1]);var s=this.getLibraryTypePmz(e.action.library),o=function(e){return function(){return e.attr("aria-expanded","false")}},a=(0,m.jQuery)("
",{role:"button",tabindex:0,"aria-label":r,"aria-popup":!0,"aria-expanded":!1,class:"h5p-element-button h5p-element-button-"+e.buttonSize+" "+s+"-button"}),l=(0,m.jQuery)('
');t.attach(l);var d="h5p-advancedtext"===s?{x:e.x,y:e.y}:null;return(0,y.addClickAndKeyboardListeners)(a,function(){a.attr("aria-expanded","true"),n.showInteractionPopup(t,a,l,s,i,o(a),d),n.disableTabIndexes()}),void 0!==e.action&&"H5P.InteractiveVideo"===e.action.library.substr(0,20)&&t.on("controls",function(){t.controls.$fullscreen&&t.controls.$fullscreen.remove()}),a},S.prototype.showInteractionPopup=function(e,t,n,i,r,s){var o=this,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=function(){e.trigger("resize")};if(!this.isEditor()){this.on("exitFullScreen",l),this.showPopup(n,t,a,function(){o.pauseMedia(e),n.detach(),o.off("exitFullScreen",l),s()},i),H5P.trigger(e,"resize"),"h5p-image"===i&&this.resizePopupImage(n);n.closest(".h5p-popup-container");setTimeout(function(){var e=n.find(":input").add(n.find("[tabindex]"));e.length?e[0].focus():(n.attr("tabindex",0),n.focus())},200),(0,y.isFunction)(e.setActivityStarted)&&(0,y.isFunction)(e.getScore)&&e.setActivityStarted(),r&&(0,y.isFunction)(e.play)&&e.play()}},S.prototype.getLibraryTypePmz=function(e){return(0,y.kebabCase)(e.split(" ")[0]).toLowerCase()},S.prototype.resizePopupImage=function(e){var t=Number(e.css("fontSize").replace("px","")),n=e.find("img"),i=function(n,i){if(!(i/t<18.5)){var r=n/i;i=18.5*t,e.css({width:i*r,height:i})}};n.height()?i(n.width(),n.height()):n.one("load",function(){i(this.width,this.height)})},S.prototype.addElementSolutionButton=function(e,t,n){var i=this;t.showCPComments=function(){if(0===n.children(".h5p-element-solution").length&&(0,y.stripHTML)(e.solution).length>0){var t=(0,m.jQuery)("
",{role:"button",tabindex:0,title:i.l10n.solutionsButtonTitle,"aria-popup":!0,"aria-expanded":!1,class:"h5p-element-solution"}).append('').appendTo(n),r={x:e.x,y:e.y};e.displayAsButton||(r.x+=e.width-4,r.y+=e.height-12),(0,y.addClickAndKeyboardListeners)(t,function(){return i.showPopup(e.solution,t,r)})}},void 0!==e.alwaysDisplayComments&&e.alwaysDisplayComments&&t.showCPComments()},S.prototype.showPopup=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this,s=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"h5p-popup-comment-field",a=this,l=function(e){if(n)return void(n=!1);void 0!==s&&setTimeout(function(){s(),a.restoreTabIndexes()},100),e.preventDefault(),d.addClass("h5p-animate"),d.find(".h5p-popup-container").addClass("h5p-animate"),setTimeout(function(){d.remove()},100),t.focus()},d=(0,m.jQuery)('
'),c=d.find(".h5p-popup-wrapper");e instanceof H5P.jQuery?c.append(e):c.html(e);var u=d.find(".h5p-popup-container");return function(e,t,n){if(n){t.css({visibility:"hidden"}),e.prependTo(r.$wrapper);var i=t.height(),s=t.width(),o=e.height(),a=e.width(),l=s*(100/a),d=i*(100/o);if(l>50&&d>50)return void e.detach();l>d&&d<45&&(l=Math.sqrt(l*d),t.css({width:l+"%"}));var c=100-l-7.5,u=n.x;n.x>c?u=c:n.x<7.5&&(u=7.5),d=t.height()*(100/o);var p=100-d-10,h=n.y;n.y>p?h=p:n.y<10&&(h=10),e.detach(),t.css({left:u+"%",top:h+"%"})}}(d,u,i),d.addClass("h5p-animate"),u.css({visibility:""}).addClass("h5p-animate"),d.prependTo(this.$wrapper).focus().removeClass("h5p-animate").click(l).find(".h5p-popup-container").removeClass("h5p-animate").click(function(){n=!0}).keydown(function(e){e.which===y.keyCode.ESC&&l(e)}).end(),(0,y.addClickAndKeyboardListeners)(d.find(".h5p-close-popup"),function(e){return l(e)}),d},S.prototype.checkForSolutions=function(e){return void 0!==e.showSolutions||void 0!==e.showCPComments},S.prototype.initKeyEvents=function(){if(void 0===this.keydown&&!this.activeSurface){var e=this,t=!1;this.keydown=function(n){t||(37!==n.keyCode&&33!==n.keyCode||!e.previousSlide()?39!==n.keyCode&&34!==n.keyCode||!e.nextSlide()||(n.preventDefault(),t=!0):(n.preventDefault(),t=!0),t&&setTimeout(function(){t=!1},300))},H5P.jQuery("body").keydown(this.keydown)}},S.prototype.initTouchEvents=function(){var e,t,n,i,r,s,o=this,a=!1,l=!1,d=function(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}},c=d("");this.$slidesWrapper.bind("touchstart",function(d){l=!1,n=e=d.originalEvent.touches[0].pageX,t=d.originalEvent.touches[0].pageY;var c=o.$slidesWrapper.width();i=0===o.currentSlideIndex?0:-c,r=o.currentSlideIndex+1>=o.slides.length?0:c,s=null,a=!0}).bind("touchmove",function(c){var u=c.originalEvent.touches;a&&(o.$current.prev().addClass("h5p-touch-move"),o.$current.next().addClass("h5p-touch-move"),a=!1),n=u[0].pageX;var p=e-n;null===s&&(s=Math.abs(t-c.originalEvent.touches[0].pageY)>Math.abs(p)),1!==u.length||s||(c.preventDefault(),l||(p<0?o.$current.prev().css(d("translateX("+(i-p)+"px")):o.$current.next().css(d("translateX("+(r-p)+"px)")),o.$current.css(d("translateX("+-p+"px)"))))}).bind("touchend",function(){if(!s){var t=e-n;if(t>o.swipeThreshold&&o.nextSlide()||t<-o.swipeThreshold&&o.previousSlide())return}o.$slidesWrapper.children().css(c).removeClass("h5p-touch-move")})},S.prototype.updateTouchPopup=function(e,t,n,i){if(arguments.length<=0)return void(void 0!==this.touchPopup&&this.touchPopup.remove());var r="";if(void 0!==this.$keywords&&void 0!==this.$keywords.children(":eq("+t+")").find("span").html())r+=this.$keywords.children(":eq("+t+")").find("span").html();else{var s=t+1;r+=this.l10n.slide+" "+s}void 0===this.editor&&t>=this.slides.length-1&&(r=this.l10n.showSolutions),void 0===this.touchPopup?this.touchPopup=H5P.jQuery("
",{class:"h5p-touch-popup"}).insertAfter(e):this.touchPopup.insertAfter(e),i-.15*e.parent().height()<0?i=0:i-=.15*e.parent().height(),this.touchPopup.css({"max-width":e.width()-n,left:n,top:i}),this.touchPopup.html(r)},S.prototype.previousSlide=function(e){var t=this.$current.prev();return!!t.length&&this.jumpToSlide(t.index(),e,!1)},S.prototype.nextSlide=function(e){var t=this.$current.next();return!!t.length&&this.jumpToSlide(t.index(),e,!1)},S.prototype.isCurrentSlide=function(e){return this.currentSlideIndex===e},S.prototype.getCurrentSlideIndex=function(){return this.currentSlideIndex},S.prototype.attachAllElements=function(){for(var e=this.$slidesWrapper.children(),t=0;t1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this;if(void 0===this.editor&&this.contentId){var r=this.createXAPIEventTemplate("progressed");r.data.statement.object.definition.extensions["http://id.tincanapi.com/extension/ending-point"]=e+1,this.trigger(r)}if(!this.$current.hasClass("h5p-animate")){var s=this.$current.addClass("h5p-animate"),o=i.$slidesWrapper.children(),a=o.filter(":lt("+e+")");this.$current=o.eq(e).addClass("h5p-animate");var l=this.currentSlideIndex;this.currentSlideIndex=e,this.attachElements(this.$current,e);var d=this.$current.next();d.length&&this.attachElements(d,e+1),this.setOverflowTabIndex();var c=this.elementInstances[l];if(void 0!==c)for(var u=0;un&&e.attr("tabindex",0)})},S.prototype.setSlideNumberAnnouncer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="";if(!this.navigationLine)return n;var i=this.slides[e];i.keywords&&i.keywords.length>0&&!this.navigationLine.isSummarySlide(e)&&(n+=this.l10n.slide+" "+(e+1)+": "),n+=this.navigationLine.createSlideTitle(e),this.$slideAnnouncer.html(n),t&&this.$slideTop.focus()},S.prototype.resetTask=function(){this.summarySlideObject.toggleSolutionMode(!1);for(var e=0;e=this.cp.slides.length-1,s=!this.cp.showSummarySlide&&this.cp.hasAnswerElements;if(r){n.cp.presentation.keywordListEnabled&&n.cp.presentation.keywordListAlwaysShow&&n.cp.hideKeywords(),this.$summarySlide.children().remove();var o=n.cp.getSlideScores(t),a=n.outputScoreStats(o);if((0,i.jQuery)(a).appendTo(n.$summarySlide),!s){var l=n.totalScores(o);if(!isNaN(l.totalPercentage)){var d=i.JoubelUI.createScoreBar(l.totalMaxScore,"","","");d.setScore(l.totalScore);var c=(0,i.jQuery)(".h5p-summary-total-score",n.$summarySlide);d.appendTo(c),setTimeout(function(){c.append((0,i.jQuery)("
",{"aria-live":"polite",class:"hidden-but-read",html:n.cp.l10n.summary+". "+n.cp.l10n.accessibilityTotalScore.replace("@score",l.totalScore).replace("@maxScore",l.totalMaxScore)}))},100)}if(1==n.cp.enableTwitterShare){var u=(0,i.jQuery)(".h5p-summary-twitter-message",n.$summarySlide);this.addTwitterScoreLinkTo(u,l)}if(1==n.cp.enableFacebookShare){var p=(0,i.jQuery)(".h5p-summary-facebook-message",n.$summarySlide);this.addFacebookScoreLinkTo(p,l)}if(1==n.cp.enableGoogleShare){var h=(0,i.jQuery)(".h5p-summary-google-message",n.$summarySlide);this.addGoogleScoreLinkTo(h)}n.$summarySlide.find(".h5p-td > .h5p-slide-link").each(function(){var e=(0,i.jQuery)(this);e.click(function(t){n.cp.jumpToSlide(parseInt(e.data("slide"),10)-1),t.preventDefault()})})}var f=(0,i.jQuery)(".h5p-summary-footer",n.$summarySlide);this.cp.showSummarySlideSolutionButton&&i.JoubelUI.createButton({class:"h5p-show-solutions",html:n.cp.l10n.showSolutions,on:{click:function(){n.toggleSolutionMode(!0)}},appendTo:f}),this.cp.showSummarySlideRetryButton&&i.JoubelUI.createButton({class:"h5p-cp-retry-button",html:n.cp.l10n.retry,on:{click:function(){n.cp.resetTask()}},appendTo:f}),n.cp.hasAnswerElements&&i.JoubelUI.createButton({class:"h5p-eta-export",html:n.cp.l10n.exportAnswers,on:{click:function(){H5P.ExportableTextArea.Exporter.run(n.cp.slides,n.cp.elementInstances)}},appendTo:f})}},e.prototype.outputScoreStats=function(e){var t=this;if(void 0===e)return this.$summarySlide.addClass("h5p-summary-only-export"),'';var n,i=this,r=0,s=0,o="",a=0,l="";for(n=0;n]+)>)/gi,"")+" "+a+'%" data-slide="'+e[n].slide+'">'+i.cp.l10n.slide+" "+e[n].slide+": "+l.replace(/(<([^>]+)>)/gi,"")+'

'+a+"%

"+e[n].score+"/"+e[n].maxScore+"

",r+=e[n].score,s+=e[n].maxScore;i.cp.triggerXAPICompleted(r,s);var d=i.cp.enableTwitterShare||i.cp.enableFacebookShare||i.cp.enableGoogleShare?''+i.cp.l10n.shareResult+"":"",c=1==i.cp.enableTwitterShare?'':"",u=1==i.cp.enableFacebookShare?'':"",p=1==i.cp.enableGoogleShare?'':"";return'
"+o+'
'+i.cp.l10n.slide+''+i.cp.l10n.score+"/"+i.cp.l10n.total.toLowerCase()+"
'+d+u+c+p+'

'+i.cp.l10n.totalScore+'

'},e.prototype.getSlideDescription=function(e){var t,n,i=this,r=i.cp.slides[e.slide-1].elements;if(e.indexes.length>1)t=i.cp.l10n.summaryMultipleTaskText;else if(void 0!==r[e.indexes[0]]&&r[0])if(n=r[e.indexes[0]].action,"function"==typeof i.cp.elementInstances[e.slide-1][e.indexes[0]].getTitle)t=i.cp.elementInstances[e.slide-1][e.indexes[0]].getTitle();else if(void 0!==n.library&&n.library){var s=n.library.split(" ")[0].split(".")[1].split(/(?=[A-Z])/),o="";s.forEach(function(e,t){0!==t&&(e=e.toLowerCase()),o+=e,t<=s.length-1&&(o+=" ")}),t=o}return t},e.prototype.addTwitterScoreLinkTo=function(e,t){var n=this,i=n.cp.twitterShareStatement||"",s=n.cp.twitterShareHashtags||"",o=n.cp.twitterShareUrl||"";o=o.replace("@currentpageurl",window.location.href),i=i.replace("@score",t.totalScore).replace("@maxScore",t.totalMaxScore).replace("@percentage",t.totalPercentage+"%").replace("@currentpageurl",window.location.href),s=s.trim().replace(" ",""),i=encodeURIComponent(i),s=encodeURIComponent(s),o=encodeURIComponent(o);var a="https://twitter.com/intent/tweet?";a+=i.length>0?"text="+i+"&":"",a+=o.length>0?"url="+o+"&":"",a+=s.length>0?"hashtags="+s:"";var l=window.innerWidth/2,d=window.innerHeight/2;e.attr("tabindex","0").attr("role","button"),(0,r.addClickAndKeyboardListeners)(e,function(){return window.open(a,n.cp.l10n.shareTwitter,"width=800,height=300,left="+l+",top="+d),!1})},e.prototype.addFacebookScoreLinkTo=function(e,t){var n=this,i=n.cp.facebookShareUrl||"",s=n.cp.facebookShareQuote||"";i=i.replace("@currentpageurl",window.location.href),s=s.replace("@currentpageurl",window.location.href).replace("@percentage",t.totalPercentage+"%").replace("@score",t.totalScore).replace("@maxScore",t.totalMaxScore),i=encodeURIComponent(i),s=encodeURIComponent(s);var o="https://www.facebook.com/sharer/sharer.php?";o+=i.length>0?"u="+i+"&":"",o+=s.length>0?"quote="+s:"";var a=window.innerWidth/2,l=window.innerHeight/2;e.attr("tabindex","0").attr("role","button"),(0,r.addClickAndKeyboardListeners)(e,function(){return window.open(o,n.cp.l10n.shareFacebook,"width=800,height=300,left="+a+",top="+l),!1})},e.prototype.addGoogleScoreLinkTo=function(e){var t=this,n=t.cp.googleShareUrl||"";n=n.replace("@currentpageurl",window.location.href),n=encodeURIComponent(n);var i="https://plus.google.com/share?";i+=n.length>0?"url="+n:"";var s=window.innerWidth/2,o=window.innerHeight/2;e.attr("tabindex","0").attr("role","button"),(0,r.addClickAndKeyboardListeners)(e,function(){return window.open(i,t.cp.l10n.shareGoogle,"width=401,height=437,left="+s+",top="+o),!1})},e.prototype.totalScores=function(e){if(void 0===e)return{totalScore:0,totalMaxScore:0,totalPercentage:0};var t,n=0,i=0;for(t=0;t",{class:"h5p-progressbar-part"}).appendTo(i.cp.$progressbar),h=e("",{href:"#",html:''+d+"",tabindex:"-1"}).data("slideNumber",o).click(s).appendTo(p);if(this.progresbarKeyboardControls.addElement(h.get(0)),u.isIOS||function(){var t=e("
",{class:"h5p-progressbar-popup",html:d,"aria-hidden":"true"}).appendTo(p);p.mouseenter(function(){return n.ensurePopupVisible(t)})}(),this.isSummarySlide(o)&&p.addClass("progressbar-part-summary-slide"),0===o&&p.addClass("h5p-progressbar-part-show"),o===r&&p.addClass("h5p-progressbar-part-selected"),i.cp.progressbarParts.push(p),this.updateSlideTitle(o),this.cp.slides.length<=60&&a.elements&&a.elements.length>0){var f=t[o]&&t[o].length>0,v=!!(i.cp.previousState&&i.cp.previousState.answered&&i.cp.previousState.answered[o]);f&&(e("
",{class:"h5p-progressbar-part-has-task"}).appendTo(h),this.setTaskAnswered(o,v))}}},t.prototype.ensurePopupVisible=function(e){var t=this.cp.$container.width(),n=e.outerWidth(),i=e.offset().left;i<0?(e.css("left",0),e.css("transform","translateX(0)")):i+n>t&&(e.css("left","auto"),e.css("right",0),e.css("transform","translateX(0)"))},t.prototype.displaySlide=function(e){var t=this.cp.getCurrentSlideIndex();this.updateSlideTitle(e,{isCurrent:!0}),this.updateSlideTitle(t,{isCurrent:!1}),this.cp.jumpToSlide(e),this.toggleNextAndPreviousButtonDisabled(e)},t.prototype.createSlideTitle=function(e){var t=this.cp.slides[e];return t.keywords&&t.keywords.length>0?t.keywords[0].main:this.isSummarySlide(e)?this.cp.l10n.summary:this.cp.l10n.slide+" "+(e+1)},t.prototype.isSummarySlide=function(e){return!(void 0!==this.cp.editor||e!==this.cp.slides.length-1||!this.cp.showSummarySlide)},t.prototype.initFooter=function(){var t=this,n=this,i=this.cp.$footer,r=e("
",{class:"h5p-footer-left-adjusted"}).appendTo(i),s=e("
",{class:"h5p-footer-center-adjusted"}).appendTo(i),a=e("
",{role:"toolbar",class:"h5p-footer-right-adjusted"}).appendTo(i);this.cp.$keywordsButton=e("
",{class:"h5p-footer-button h5p-footer-toggle-keywords","aria-expanded":"false","aria-label":this.cp.l10n.showKeywords,title:this.cp.l10n.showKeywords,role:"button",tabindex:"0",html:''}).appendTo(r),(0,u.addClickAndKeyboardListeners)(this.cp.$keywordsButton,function(e){n.cp.presentation.keywordListAlwaysShow||(n.cp.toggleKeywords(),e.stopPropagation())}),!this.cp.presentation.keywordListAlwaysShow&&this.cp.initKeywords||this.cp.$keywordsButton.hide(),this.cp.presentation.keywordListEnabled||this.cp.$keywordsWrapper.add(this.$keywordsButton).hide(),this.updateFooterKeyword(0),this.cp.$prevSlideButton=e("
",{class:"h5p-footer-button h5p-footer-previous-slide","aria-label":this.cp.l10n.prevSlide,title:this.cp.l10n.prevSlide,role:"button",tabindex:"-1","aria-disabled":"true"}).appendTo(s),(0,u.addClickAndKeyboardListeners)(this.cp.$prevSlideButton,function(){return t.cp.previousSlide()});var l=e("
",{class:"h5p-footer-slide-count"}).appendTo(s);this.cp.$footerCurrentSlide=e("
",{html:"1",class:"h5p-footer-slide-count-current",title:this.cp.l10n.currentSlide,"aria-hidden":"true"}).appendTo(l),this.cp.$footerCounter=e("
",{class:"hidden-but-read",html:this.cp.l10n.slideCount.replace("@index","1").replace("@total",this.cp.slides.length.toString())}).appendTo(s),e("
",{html:"/",class:"h5p-footer-slide-count-delimiter","aria-hidden":"true"}).appendTo(l),this.cp.$footerMaxSlide=e("
",{html:this.cp.slides.length,class:"h5p-footer-slide-count-max",title:this.cp.l10n.lastSlide,"aria-hidden":"true"}).appendTo(l),this.cp.$nextSlideButton=e("
",{class:"h5p-footer-button h5p-footer-next-slide","aria-label":this.cp.l10n.nextSlide,title:this.cp.l10n.nextSlide,role:"button",tabindex:"0"}).appendTo(s),(0,u.addClickAndKeyboardListeners)(this.cp.$nextSlideButton,function(){return t.cp.nextSlide()}),void 0===this.cp.editor&&(this.cp.$exitSolutionModeButton=e("
",{role:"button",class:"h5p-footer-exit-solution-mode","aria-label":this.cp.l10n.solutionModeTitle,title:this.cp.l10n.solutionModeTitle,tabindex:"0"}).appendTo(a),(0,u.addClickAndKeyboardListeners)(this.cp.$exitSolutionModeButton,function(){return n.cp.jumpToSlide(n.cp.slides.length-1)}),this.cp.enablePrintButton&&o.default.supported()&&(this.cp.$printButton=e("
",{class:"h5p-footer-button h5p-footer-print","aria-label":this.cp.l10n.printTitle,title:this.cp.l10n.printTitle,role:"button",tabindex:"0"}).appendTo(a),(0,u.addClickAndKeyboardListeners)(this.cp.$printButton,function(){return n.openPrintDialog()})),H5P.fullscreenSupported&&(this.cp.$fullScreenButton=e("
",{class:"h5p-footer-button h5p-footer-toggle-full-screen","aria-label":this.cp.l10n.fullscreen,title:this.cp.l10n.fullscreen,role:"button",tabindex:"0"}),(0,u.addClickAndKeyboardListeners)(this.cp.$fullScreenButton,function(){return n.cp.toggleFullScreen()}),this.cp.$fullScreenButton.appendTo(a))),this.cp.$exitSolutionModeText=e("
",{html:"",class:"h5p-footer-exit-solution-mode-text"}).appendTo(this.cp.$exitSolutionModeButton)},t.prototype.openPrintDialog=function(){var t=this,n=e(".h5p-wrapper");o.default.showDialog(this.cp.l10n,n,function(e){o.default.print(t.cp,n,e)}).children('[role="dialog"]').focus()},t.prototype.updateProgressBar=function(e,t,n){var i,r=this;for(i=0;ii?r.cp.progressbarParts[i].addClass("h5p-progressbar-part-show"):r.cp.progressbarParts[i].removeClass("h5p-progressbar-part-show");if(r.progresbarKeyboardControls.setTabbableByIndex(e),r.cp.progressbarParts[e].addClass("h5p-progressbar-part-selected").siblings().removeClass("h5p-progressbar-part-selected"),void 0===t)return void r.cp.progressbarParts.forEach(function(e,t){r.setTaskAnswered(t,!1)});n||r.cp.editor},t.prototype.setTaskAnswered=function(e,t){this.cp.progressbarParts[e].find(".h5p-progressbar-part-has-task").toggleClass("h5p-answered",t),this.updateSlideTitle(e,{state:t?p.ANSWERED:p.NOT_ANSWERED})},t.prototype.updateSlideTitle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.state,i=t.isCurrent;this.setSlideTitle(e,{state:(0,u.defaultValue)(n,this.getAnsweredState(e)),isCurrent:(0,u.defaultValue)(i,this.cp.isCurrentSlide(e))})},t.prototype.setSlideTitle=function(e,t){var n=t.state,i=void 0===n?p.NO_INTERACTIONS:n,r=t.isCurrent,s=void 0!==r&&r,o=this.cp.slides.length,a=this.cp.progressbarParts[e],l=a.find(".h5p-progressbar-part-title"),d=this.cp.l10n.slideCount.replace("@index",e+1).replace("@total",o),c=this.answeredLabels[i].replace("@slideName",this.createSlideTitle(e)),u=s?this.cp.l10n.currentSlide:"";l.html(d+": "+c+". "+u)},t.prototype.getAnsweredState=function(e){var t=this.cp.progressbarParts[e],n=this.slideHasInteraction(e),i=this.cp.slideHasAnsweredTask(e);return n?t.find(".h5p-is-correct").length>0?p.CORRECT:t.find(".h5p-is-wrong").length>0?p.INCORRECT:i?p.ANSWERED:p.NOT_ANSWERED:p.NO_INTERACTIONS},t.prototype.slideHasInteraction=function(e){return this.cp.progressbarParts[e].find(".h5p-progressbar-part-has-task").length>0},t.prototype.updateFooter=function(e){this.cp.$footerCurrentSlide.html(e+1),this.cp.$footerMaxSlide.html(this.cp.slides.length),this.cp.$footerCounter.html(this.cp.l10n.slideCount.replace("@index",(e+1).toString()).replace("@total",this.cp.slides.length.toString())),this.cp.isSolutionMode&&e===this.cp.slides.length-1?this.cp.$footer.addClass("summary-slide"):this.cp.$footer.removeClass("summary-slide"),this.toggleNextAndPreviousButtonDisabled(e),this.updateFooterKeyword(e)},t.prototype.toggleNextAndPreviousButtonDisabled=function(e){var t=this.cp.slides.length-1;this.cp.$prevSlideButton.attr("aria-disabled",(0===e).toString()),this.cp.$nextSlideButton.attr("aria-disabled",(e===t).toString()),this.cp.$prevSlideButton.attr("tabindex",0===e?"-1":"0"),this.cp.$nextSlideButton.attr("tabindex",e===t?"-1":"0")},t.prototype.updateFooterKeyword=function(e){var t=this.cp.slides[e],n="";t&&t.keywords&&t.keywords[0]&&(n=t.keywords[0].main),!this.cp.isEditor()&&this.cp.showSummarySlide&&e>=this.cp.slides.length-1&&(n=this.cp.l10n.summary),this.cp.$keywordsButton.children(".current-slide-title").html((0,u.defaultValue)(n,""))},t}(H5P.jQuery);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=function(e){function t(){}var n=0;return t.supported=function(){return"function"==typeof window.print},t.print=function(t,n,i){t.trigger("printing",{finished:!1,allSlides:i});var r=e(".h5p-slide.h5p-current"),s=r.height(),o=r.width(),a=o/670,l=e(".h5p-slide");l.css({height:s/a+"px",width:"670px",fontSize:Math.floor(100/a)+"%"});var d=n.height();n.css("height","auto"),l.toggleClass("doprint",!0===i),r.addClass("doprint"),setTimeout(function(){window.print(),l.css({height:"",width:"",fontSize:""}),n.css("height",d+"px"),t.trigger("printing",{finished:!0})},500)},t.showDialog=function(t,r,s){var o=this,a=n++,l="h5p-cp-print-dialog-"+a+"-title",d="h5p-cp-print-dialog-"+a+"-ingress",c=e('
\n ').insertAfter(r).click(function(){o.close()}).children(".h5p-inner").click(function(){return!1}).end();(0,i.addClickAndKeyboardListeners)(c.find(".h5p-close"),function(){return o.close()});var u=c.find(".h5p-scroll-content");return u.append(e("
",{class:"h5p-cp-print-ingress",id:d,html:t.printIngress})),H5P.JoubelUI.createButton({html:t.printAllSlides,class:"h5p-cp-print-all-slides",click:function(){o.close(),s(!0)}}).appendTo(u),H5P.JoubelUI.createButton({html:t.printCurrentSlide,class:"h5p-cp-print-current-slide",click:function(){o.close(),s(!1)}}).appendTo(u),this.open=function(){setTimeout(function(){c.addClass("h5p-open"),H5P.jQuery(o).trigger("dialog-opened",[c])},1)},this.close=function(){c.removeClass("h5p-open"),setTimeout(function(){c.remove()},200)},this.open(),c},t}(H5P.jQuery);t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=t.toggleClass=t.toggleVisibility=t.show=t.hide=t.removeClass=t.addClass=t.classListContains=t.removeChild=t.querySelectorAll=t.nodeListToArray=t.querySelector=t.appendChild=t.toggleAttribute=t.attributeEquals=t.hasAttribute=t.removeAttribute=t.setAttribute=t.getAttribute=void 0;var i=n(4),r=t.getAttribute=(0,i.curry)(function(e,t){return t.getAttribute(e)}),s=t.setAttribute=(0,i.curry)(function(e,t,n){return n.setAttribute(e,t)}),o=(t.removeAttribute=(0,i.curry)(function(e,t){return t.removeAttribute(e)}),t.hasAttribute=(0,i.curry)(function(e,t){return t.hasAttribute(e)}),t.attributeEquals=(0,i.curry)(function(e,t,n){return n.getAttribute(e)===t}),t.toggleAttribute=(0,i.curry)(function(e,t){var n=r(e,t);s(e,(0,i.inverseBooleanString)(n),t)}),t.appendChild=(0,i.curry)(function(e,t){return e.appendChild(t)}),t.querySelector=(0,i.curry)(function(e,t){return t.querySelector(e)}),t.nodeListToArray=function(e){return Array.prototype.slice.call(e)}),a=(t.querySelectorAll=(0,i.curry)(function(e,t){return o(t.querySelectorAll(e))}),t.removeChild=(0,i.curry)(function(e,t){return e.removeChild(t)}),t.classListContains=(0,i.curry)(function(e,t){return t.classList.contains(e)}),t.addClass=(0,i.curry)(function(e,t){return t.classList.add(e)})),l=t.removeClass=(0,i.curry)(function(e,t){return t.classList.remove(e)}),d=t.hide=a("hidden"),c=t.show=l("hidden");t.toggleVisibility=(0,i.curry)(function(e,t){return(e?c:d)(t)}),t.toggleClass=(0,i.curry)(function(e,t,n){n.classList[t?"add":"remove"](e)}),t.createElement=function(e){var t=e.tag,n=e.id,i=e.classes,r=e.attributes,s=document.createElement(t);return n&&(s.id=n),i&&i.forEach(function(e){s.classList.add(e)}),r&&Object.keys(r).forEach(function(e){s.setAttribute(e,r[e])}),s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Eventful=function(){return{listeners:{},on:function(e,t,n){var i={listener:t,scope:n};return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(i),this},fire:function(e,t){return(this.listeners[e]||[]).every(function(e){return!1!==e.listener.call(e.scope||this,t)})},propagate:function(e,t){var n=this;e.forEach(function(e){return t.on(e,function(t){return n.fire(e,t)})})}}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),s=function e(t){i(this,e);var n=t.presentation;n=r.jQuery.extend(!0,{globalBackgroundSelector:{fillGlobalBackground:"",imageGlobalBackground:{}},slides:[{slideBackgroundSelector:{fillSlideBackground:"",imageSlideBackground:{}}}]},n);var s=function(e,n,i){var r=t.$slidesWrapper.children().filter(":not(.h5p-summary-slide)");void 0!==i&&(r=r.eq(i)),e&&""!==e?r.addClass("has-background").css("background-image","").css("background-color",e):n&&n.path&&r.addClass("has-background").css("background-color","").css("background-image","url("+H5P.getPath(n.path,t.contentId)+")")};!function(){var e=n.globalBackgroundSelector;s(e.fillGlobalBackground,e.imageGlobalBackground)}(),function(){n.slides.forEach(function(e,t){var n=e.slideBackgroundSelector;n&&s(n.fillSlideBackground,n.imageSlideBackground,t)})}()};t.default=s},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n'+t.title+"",e.dataset.index=t.index}},{key:"onMenuItemSelect",value:function(e){this.setCurrentSlideIndex(e),this.eventDispatcher.trigger("select",{index:e})}},{key:"setCurrentSlideIndex",value:function(e){var t=this.getElementByIndex(this.menuItemElements,e);t&&(this.state.currentIndex=e,this.updateCurrentlySelected(this.menuItemElements,this.state),this.controls.setTabbable(t))}},{key:"updateCurrentlySelected",value:function(e,t){var n=this;e.forEach(function(e){var i=t.currentIndex===p(e);e.classList.toggle("h5p-current",i),i&&e.appendChild(n.currentSlideMarkerElement)})}},{key:"scrollToKeywords",value:function(e){var t=this.getFirstElementAfter(e);if(t){var n=(0,u.jQuery)(this.menuElement),i=n.scrollTop()+(0,u.jQuery)(t).position().top-8;c.isIPad?n.scrollTop(i):n.stop().animate({scrollTop:i},250)}}},{key:"getFirstElementAfter",value:function(e){return this.menuItemElements.filter(function(t){return p(t)>=e})[0]}},{key:"getElementByIndex",value:function(e,t){return e.filter(function(e){return p(e)===t})[0]}},{key:"createCurrentSlideMarkerElement",value:function(){var e=document.createElement("div");return e.classList.add("hidden-but-read"),e.innerHTML=this.l10n.currentSlide,e}}]),e}();t.default=h},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=this;l.default.call(t,o.default,e.elements);var n=void 0;t.getElement=function(){return n||(n=H5P.jQuery(r.createHTML(e))),n},t.setCurrent=function(){this.parent.$current=n.addClass("h5p-current")},t.appendElements=function(){for(var i=0;i
"},t.default=r},function(e,t,n){"use strict";function i(e){var t=this;if(void 0===e.action)t.instance=new s.default(e,{l10n:t.parent.parent.l10n,currentIndex:t.parent.index}),t.parent.parent.isEditor()||t.instance.on("navigate",function(e){var n=e.data;t.parent.parent.jumpToSlide(n)});else{var n;n=t.parent.parent.isEditor()?H5P.jQuery.extend(!0,{},e.action,t.parent.parent.elementsOverride):H5P.jQuery.extend(!0,e.action,t.parent.parent.elementsOverride),n.params.autoplay?(n.params.autoplay=!1,n.params.cpAutoplay=!0):n.params.playback&&n.params.playback.autoplay?(n.params.playback.autoplay=!1,n.params.cpAutoplay=!0):n.params.media&&n.params.media.params&&n.params.media.params.playback&&n.params.media.params.playback.autoplay?(n.params.media.params.playback.autoplay=!1,n.params.cpAutoplay=!0):n.params.media&&n.params.media.params&&n.params.media.params.autoplay?(n.params.media.params.autoplay=!1,n.params.cpAutoplay=!0):n.params.override&&n.params.override.autoplay&&(n.params.override.autoplay=!1,n.params.cpAutoplay=!0);var i=t.parent.parent.elementInstances[t.parent.index]?t.parent.parent.elementInstances[t.parent.index].length:0;t.parent.parent.previousState&&t.parent.parent.previousState.answers&&t.parent.parent.previousState.answers[t.parent.index]&&t.parent.parent.previousState.answers[t.parent.index][i]&&(n.userDatas={state:t.parent.parent.previousState.answers[t.parent.index][i]}),n.params=n.params||{},t.instance=H5P.newRunnable(n,t.parent.parent.contentId,void 0,!0,{parent:t.parent.parent}),void 0!==t.instance.preventResize&&(t.instance.preventResize=!0)}void 0===t.parent.parent.elementInstances[t.parent.index]?t.parent.parent.elementInstances[t.parent.index]=[t.instance]:t.parent.parent.elementInstances[t.parent.index].push(t.instance),(void 0!==t.instance.showCPComments||t.instance.isTask||void 0===t.instance.isTask&&void 0!==t.instance.showSolutions)&&(t.instance.coursePresentationIndexOnSlide=t.parent.parent.elementInstances[t.parent.index].length-1,void 0===t.parent.parent.slidesWithSolutions[t.parent.index]&&(t.parent.parent.slidesWithSolutions[t.parent.index]=[]),t.parent.parent.slidesWithSolutions[t.parent.index].push(t.instance)),void 0!==t.instance.exportAnswers&&t.instance.exportAnswers&&(t.parent.parent.hasAnswerElements=!0),t.parent.parent.isTask||t.parent.parent.hideSummarySlide||(t.instance.isTask||void 0===t.instance.isTask&&void 0!==t.instance.showSolutions)&&(t.parent.parent.isTask=!0)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),s=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n",{href:"#",class:m,tabindex:y,title:l}),(0,s.addClickAndKeyboardListeners)(this.$element,function(e){r.eventDispatcher.trigger("navigate",b),e.preventDefault()})}return r(e,[{key:"attach",value:function(e){e.html("").addClass("h5p-go-to-slide").append(this.$element)}},{key:"on",value:function(e,t){this.eventDispatcher.on(e,t)}}]),e}();t.default=l}]);;