forge-terminal 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +305 -24
  2. package/dist/chunks/adm-zip-SQKLKBDP.js +3 -0
  3. package/dist/chunks/available-2VX7K7W6.js +3 -0
  4. package/dist/chunks/boot-ODZZHFUI.js +3 -0
  5. package/dist/chunks/cfb-V6M2PYOD.js +13 -0
  6. package/dist/chunks/chunk-2WYHI73Y.js +3 -0
  7. package/dist/chunks/chunk-4YHKTP7I.js +3 -0
  8. package/dist/chunks/chunk-5PYTOHLZ.js +3 -0
  9. package/dist/chunks/chunk-7YQR2MVH.js +3 -0
  10. package/dist/chunks/chunk-DRBA23IQ.js +3 -0
  11. package/dist/chunks/chunk-EOYBXOCV.js +4 -0
  12. package/dist/chunks/chunk-FQV57RMH.js +3 -0
  13. package/dist/chunks/chunk-IMKI5F4I.js +4 -0
  14. package/dist/chunks/chunk-J7FLFHQJ.js +3 -0
  15. package/dist/chunks/chunk-L2WK7CJG.js +3 -0
  16. package/dist/chunks/chunk-LFE3WRU4.js +3 -0
  17. package/dist/chunks/chunk-MHFY7HF6.js +10 -0
  18. package/dist/chunks/chunk-PBIS2ONZ.js +3 -0
  19. package/dist/chunks/chunk-QVACE4IE.js +3 -0
  20. package/dist/chunks/chunk-TMUK2DD3.js +3 -0
  21. package/dist/chunks/chunk-UNVHKJW4.js +41 -0
  22. package/dist/chunks/chunk-V4GHQGQM.js +4 -0
  23. package/dist/chunks/chunk-VB665HTV.js +3 -0
  24. package/dist/chunks/chunk-YHK5VE5R.js +3 -0
  25. package/dist/chunks/colour-QV2C3R7R.js +3 -0
  26. package/dist/chunks/config-command-UXJY623L.js +3 -0
  27. package/dist/chunks/dist-J2V6ITHG.js +29 -0
  28. package/dist/chunks/es-T2U7NBLD.js +3 -0
  29. package/dist/chunks/execute-4WJCUM7J.js +3 -0
  30. package/dist/chunks/extensions-command-6WZV2AES.js +3 -0
  31. package/dist/chunks/launch-2OI4ZLBQ.js +66 -0
  32. package/dist/chunks/lib-TPEJ5CJJ.js +46 -0
  33. package/dist/chunks/lock-R6GZXCCW.js +3 -0
  34. package/dist/chunks/manager-H52ENJOH.js +4 -0
  35. package/dist/chunks/paths-XY2345OS.js +3 -0
  36. package/dist/chunks/pdf-compress-IMRFBLZF.js +3 -0
  37. package/dist/chunks/react-devtools-core-UM4FS6CU.js +3 -0
  38. package/dist/chunks/run-N3F4EM7E.js +4 -0
  39. package/dist/chunks/server-5RWSVTOM.js +73 -0
  40. package/dist/chunks/theme-GW7CQPUO.js +3 -0
  41. package/dist/chunks/word-OGQ2KZAJ.js +24 -0
  42. package/dist/index.js +67 -95
  43. package/dist/third-party-licenses.txt +2856 -0
  44. package/package.json +28 -21
  45. package/skills/forge/SKILL.md +128 -0
  46. package/dist/cli/args.js +0 -278
  47. package/dist/cli/args.js.map +0 -1
  48. package/dist/cli/config-command.js +0 -55
  49. package/dist/cli/config-command.js.map +0 -1
  50. package/dist/cli/execute.js +0 -377
  51. package/dist/cli/execute.js.map +0 -1
  52. package/dist/cli/report.js +0 -123
  53. package/dist/cli/report.js.map +0 -1
  54. package/dist/cli/spinner.js +0 -60
  55. package/dist/cli/spinner.js.map +0 -1
  56. package/dist/cli/stdin.js +0 -47
  57. package/dist/cli/stdin.js.map +0 -1
  58. package/dist/config/preferences.js +0 -143
  59. package/dist/config/preferences.js.map +0 -1
  60. package/dist/core/actions/compress.js +0 -157
  61. package/dist/core/actions/compress.js.map +0 -1
  62. package/dist/core/actions/convert.js +0 -270
  63. package/dist/core/actions/convert.js.map +0 -1
  64. package/dist/core/actions/extract.js +0 -94
  65. package/dist/core/actions/extract.js.map +0 -1
  66. package/dist/core/actions/index.js +0 -23
  67. package/dist/core/actions/index.js.map +0 -1
  68. package/dist/core/actions/merge.js +0 -16
  69. package/dist/core/actions/merge.js.map +0 -1
  70. package/dist/core/actions/rotate.js +0 -36
  71. package/dist/core/actions/rotate.js.map +0 -1
  72. package/dist/core/actions/split.js +0 -65
  73. package/dist/core/actions/split.js.map +0 -1
  74. package/dist/core/atomic.js +0 -61
  75. package/dist/core/atomic.js.map +0 -1
  76. package/dist/core/capabilities.js +0 -59
  77. package/dist/core/capabilities.js.map +0 -1
  78. package/dist/core/compress.js +0 -76
  79. package/dist/core/compress.js.map +0 -1
  80. package/dist/core/describe.js +0 -49
  81. package/dist/core/describe.js.map +0 -1
  82. package/dist/core/errors.js +0 -469
  83. package/dist/core/errors.js.map +0 -1
  84. package/dist/core/execute-jobs.js +0 -122
  85. package/dist/core/execute-jobs.js.map +0 -1
  86. package/dist/core/formats.js +0 -108
  87. package/dist/core/formats.js.map +0 -1
  88. package/dist/core/order.js +0 -44
  89. package/dist/core/order.js.map +0 -1
  90. package/dist/core/output-path.js +0 -176
  91. package/dist/core/output-path.js.map +0 -1
  92. package/dist/core/pages.js +0 -107
  93. package/dist/core/pages.js.map +0 -1
  94. package/dist/core/pdf-compress.js +0 -206
  95. package/dist/core/pdf-compress.js.map +0 -1
  96. package/dist/core/plan.js +0 -42
  97. package/dist/core/plan.js.map +0 -1
  98. package/dist/core/resolve.js +0 -115
  99. package/dist/core/resolve.js.map +0 -1
  100. package/dist/core/run.js +0 -66
  101. package/dist/core/run.js.map +0 -1
  102. package/dist/core/suggest.js +0 -50
  103. package/dist/core/suggest.js.map +0 -1
  104. package/dist/core/types.js +0 -2
  105. package/dist/core/types.js.map +0 -1
  106. package/dist/core/units.js +0 -94
  107. package/dist/core/units.js.map +0 -1
  108. package/dist/core/write-safety.js +0 -128
  109. package/dist/core/write-safety.js.map +0 -1
  110. package/dist/engines/heic.js +0 -166
  111. package/dist/engines/heic.js.map +0 -1
  112. package/dist/engines/image.js +0 -342
  113. package/dist/engines/image.js.map +0 -1
  114. package/dist/engines/pdf.js +0 -444
  115. package/dist/engines/pdf.js.map +0 -1
  116. package/dist/engines/pdfium.js +0 -161
  117. package/dist/engines/pdfium.js.map +0 -1
  118. package/dist/engines/registry.js +0 -65
  119. package/dist/engines/registry.js.map +0 -1
  120. package/dist/engines/types.js +0 -2
  121. package/dist/engines/types.js.map +0 -1
  122. package/dist/engines/word.js +0 -385
  123. package/dist/engines/word.js.map +0 -1
  124. package/dist/index.js.map +0 -1
  125. package/dist/shell/App.js +0 -1972
  126. package/dist/shell/App.js.map +0 -1
  127. package/dist/shell/ClickTargets.js +0 -183
  128. package/dist/shell/ClickTargets.js.map +0 -1
  129. package/dist/shell/ThemeContext.js +0 -21
  130. package/dist/shell/ThemeContext.js.map +0 -1
  131. package/dist/shell/blocks.js +0 -160
  132. package/dist/shell/blocks.js.map +0 -1
  133. package/dist/shell/clipboard.js +0 -64
  134. package/dist/shell/clipboard.js.map +0 -1
  135. package/dist/shell/commands.js +0 -51
  136. package/dist/shell/commands.js.map +0 -1
  137. package/dist/shell/components/Banner.js +0 -73
  138. package/dist/shell/components/Banner.js.map +0 -1
  139. package/dist/shell/components/CommandPalette.js +0 -37
  140. package/dist/shell/components/CommandPalette.js.map +0 -1
  141. package/dist/shell/components/FileCard.js +0 -59
  142. package/dist/shell/components/FileCard.js.map +0 -1
  143. package/dist/shell/components/HintBar.js +0 -18
  144. package/dist/shell/components/HintBar.js.map +0 -1
  145. package/dist/shell/components/Hints.js +0 -21
  146. package/dist/shell/components/Hints.js.map +0 -1
  147. package/dist/shell/components/MergeList.js +0 -268
  148. package/dist/shell/components/MergeList.js.map +0 -1
  149. package/dist/shell/components/ModeHeader.js +0 -21
  150. package/dist/shell/components/ModeHeader.js.map +0 -1
  151. package/dist/shell/components/PageGrid.js +0 -324
  152. package/dist/shell/components/PageGrid.js.map +0 -1
  153. package/dist/shell/components/PathInput.js +0 -147
  154. package/dist/shell/components/PathInput.js.map +0 -1
  155. package/dist/shell/components/Progress.js +0 -43
  156. package/dist/shell/components/Progress.js.map +0 -1
  157. package/dist/shell/components/Prompt.js +0 -667
  158. package/dist/shell/components/Prompt.js.map +0 -1
  159. package/dist/shell/components/ResultLinks.js +0 -26
  160. package/dist/shell/components/ResultLinks.js.map +0 -1
  161. package/dist/shell/components/Select.js +0 -152
  162. package/dist/shell/components/Select.js.map +0 -1
  163. package/dist/shell/components/Slider.js +0 -48
  164. package/dist/shell/components/Slider.js.map +0 -1
  165. package/dist/shell/components/StagedFiles.js +0 -92
  166. package/dist/shell/components/StagedFiles.js.map +0 -1
  167. package/dist/shell/components/ThemePicker.js +0 -18
  168. package/dist/shell/components/ThemePicker.js.map +0 -1
  169. package/dist/shell/components/UnitRow.js +0 -30
  170. package/dist/shell/components/UnitRow.js.map +0 -1
  171. package/dist/shell/flows/pdf.js +0 -424
  172. package/dist/shell/flows/pdf.js.map +0 -1
  173. package/dist/shell/frame-geometry.js +0 -56
  174. package/dist/shell/frame-geometry.js.map +0 -1
  175. package/dist/shell/hyperlink.js +0 -27
  176. package/dist/shell/hyperlink.js.map +0 -1
  177. package/dist/shell/intro.js +0 -101
  178. package/dist/shell/intro.js.map +0 -1
  179. package/dist/shell/launch.js +0 -75
  180. package/dist/shell/launch.js.map +0 -1
  181. package/dist/shell/mark.js +0 -134
  182. package/dist/shell/mark.js.map +0 -1
  183. package/dist/shell/mouse.js +0 -209
  184. package/dist/shell/mouse.js.map +0 -1
  185. package/dist/shell/redraw.js +0 -36
  186. package/dist/shell/redraw.js.map +0 -1
  187. package/dist/shell/reveal.js +0 -24
  188. package/dist/shell/reveal.js.map +0 -1
  189. package/dist/shell/stage.js +0 -34
  190. package/dist/shell/stage.js.map +0 -1
  191. package/dist/shell/terminal-write.js +0 -16
  192. package/dist/shell/terminal-write.js.map +0 -1
  193. package/dist/shell/theme.js +0 -178
  194. package/dist/shell/theme.js.map +0 -1
  195. package/dist/shell/useFrameOrigin.js +0 -175
  196. package/dist/shell/useFrameOrigin.js.map +0 -1
  197. package/dist/shell/useKeys.js +0 -28
  198. package/dist/shell/useKeys.js.map +0 -1
  199. package/dist/shell/useMouse.js +0 -150
  200. package/dist/shell/useMouse.js.map +0 -1
  201. package/dist/shell/useMouseRouting.js +0 -69
  202. package/dist/shell/useMouseRouting.js.map +0 -1
  203. package/dist/shell/width.js +0 -62
  204. package/dist/shell/width.js.map +0 -1
  205. package/dist/utils/display-path.js +0 -31
  206. package/dist/utils/display-path.js.map +0 -1
  207. package/dist/utils/unescape-path.js +0 -68
  208. package/dist/utils/unescape-path.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import { createRequire as __forgeCreateRequire } from 'node:module';
2
+ const require = __forgeCreateRequire(import.meta.url);
3
+ import{a as vt}from"./chunk-TMUK2DD3.js";var Vo=Object.create,ua=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,Xo=Object.getOwnPropertyNames,Yo=Object.getPrototypeOf,ca=Object.prototype.hasOwnProperty,ha=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}},de=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Zo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Xo(t),o=0,a=i.length,s;o<a;o++)s=i[o],!ca.call(e,s)&&s!==r&&ua(e,s,{get:(u=>t[u]).bind(null,s),enumerable:!(n=qo(t,s))||n.enumerable});return e},Fn=(e,t,r)=>(r=e!=null?Vo(Yo(e)):{},Zo(t||!e||!e.__esModule||!ca.call(e,"default")?ua(r,"default",{value:e,enumerable:!0}):r,e)),mr=(e=>typeof vt<"u"?vt:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof vt<"u"?vt:t)[r]}):e)(function(e){if(typeof vt<"u")return vt.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function Jo(e,t){if(Jt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qo(e){var t=Jo(e,"string");return Jt(t)=="symbol"?t:t+""}function Y(e,t,r){return(t=Qo(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Qt=class{constructor(e){Y(this,"rootKey",void 0),this.rootKey=e}get writtenAs(){}},el=Object.seal({}),ee=class extends Qt{constructor(e){super(e),Y(this,"root",void 0),this.root=new Array}prepForXml(e){var t;e.stack.push(this);let r=this.root.flatMap(n=>{if(n instanceof Qt){let i=n.writtenAs;return i?i.map(o=>o.prepForXml(e)):n.prepForXml(e)}return n}).filter(n=>n!==void 0);return e.stack.pop(),{[this.rootKey]:r.length?r.length===1&&(!((t=r[0])===null||t===void 0)&&t._attr)?r[0]:r:el}}addChildElement(e){return this.root.push(e),this}},ht=class extends ee{constructor(e,t){super(e),Y(this,"includeIfEmpty",void 0),this.includeIfEmpty=t}prepForXml(e){let t=super.prepForXml(e);return this.includeIfEmpty||t&&(typeof t[this.rootKey]!="object"||Object.keys(t[this.rootKey]).length)?t:void 0}};function bi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bi(Object(r),!0).forEach(function(n){Y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var me=class extends Qt{constructor(e){super("_attr"),Y(this,"root",void 0),Y(this,"xmlKeys",void 0),this.root=e}prepForXml(e){let t={};return Object.entries(this.root).forEach(([r,n])=>{if(n!==void 0){let i=this.xmlKeys&&this.xmlKeys[r]||r;t[i]=n}}),{_attr:t}}},Or=class extends Qt{constructor(e){super("_attr"),Y(this,"root",void 0),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:t})=>t!==void 0).reduce((t,{key:r,value:n})=>ie(ie({},t),{},{[r]:n}),{})}}},Ne=class extends me{constructor(...e){super(...e),Y(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"})}},Mn=de(((e,t)=>{var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(O,M,k){return Function.prototype.apply.call(O,M,k)},i;r&&typeof r.ownKeys=="function"?i=r.ownKeys:Object.getOwnPropertySymbols?i=function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:i=function(O){return Object.getOwnPropertyNames(O)};function o(g){console&&console.warn&&console.warn(g)}var a=Number.isNaN||function(O){return O!==O};function s(){s.init.call(this)}t.exports=s,t.exports.once=N,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function h(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(g){if(typeof g!="number"||g<0||a(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");u=g}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||a(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this};function m(g){return g._maxListeners===void 0?s.defaultMaxListeners:g._maxListeners}s.prototype.getMaxListeners=function(){return m(this)},s.prototype.emit=function(O){for(var M=[],k=1;k<arguments.length;k++)M.push(arguments[k]);var q=O==="error",te=this._events;if(te!==void 0)q=q&&te.error===void 0;else if(!q)return!1;if(q){var P;if(M.length>0&&(P=M[0]),P instanceof Error)throw P;var G=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw G.context=P,G}var I=te[O];if(I===void 0)return!1;if(typeof I=="function")n(I,this,M);else for(var $=I.length,K=_(I,$),k=0;k<$;++k)n(K[k],this,M);return!0};function f(g,O,M,k){var q,te,P;if(h(M),te=g._events,te===void 0?(te=g._events=Object.create(null),g._eventsCount=0):(te.newListener!==void 0&&(g.emit("newListener",O,M.listener?M.listener:M),te=g._events),P=te[O]),P===void 0)P=te[O]=M,++g._eventsCount;else if(typeof P=="function"?P=te[O]=k?[M,P]:[P,M]:k?P.unshift(M):P.push(M),q=m(g),q>0&&P.length>q&&!P.warned){P.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=g,G.type=O,G.count=P.length,o(G)}return g}s.prototype.addListener=function(O,M){return f(this,O,M,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(O,M){return f(this,O,M,!0)};function w(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(g,O,M){var k={fired:!1,wrapFn:void 0,target:g,type:O,listener:M},q=w.bind(k);return q.listener=M,k.wrapFn=q,q}s.prototype.once=function(O,M){return h(M),this.on(O,p(this,O,M)),this},s.prototype.prependOnceListener=function(O,M){return h(M),this.prependListener(O,p(this,O,M)),this},s.prototype.removeListener=function(O,M){var k,q,te,P,G;if(h(M),q=this._events,q===void 0)return this;if(k=q[O],k===void 0)return this;if(k===M||k.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete q[O],q.removeListener&&this.emit("removeListener",O,k.listener||M));else if(typeof k!="function"){for(te=-1,P=k.length-1;P>=0;P--)if(k[P]===M||k[P].listener===M){G=k[P].listener,te=P;break}if(te<0)return this;te===0?k.shift():S(k,te),k.length===1&&(q[O]=k[0]),q.removeListener!==void 0&&this.emit("removeListener",O,G||M)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(O){var M,k=this._events,q;if(k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[O]),this;if(arguments.length===0){var te=Object.keys(k),P;for(q=0;q<te.length;++q)P=te[q],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(M=k[O],typeof M=="function")this.removeListener(O,M);else if(M!==void 0)for(q=M.length-1;q>=0;q--)this.removeListener(O,M[q]);return this};function d(g,O,M){var k=g._events;if(k===void 0)return[];var q=k[O];return q===void 0?[]:typeof q=="function"?M?[q.listener||q]:[q]:M?E(q):_(q,q.length)}s.prototype.listeners=function(O){return d(this,O,!0)},s.prototype.rawListeners=function(O){return d(this,O,!1)},s.listenerCount=function(g,O){return typeof g.listenerCount=="function"?g.listenerCount(O):v.call(g,O)},s.prototype.listenerCount=v;function v(g){var O=this._events;if(O!==void 0){var M=O[g];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function _(g,O){for(var M=new Array(O),k=0;k<O;++k)M[k]=g[k];return M}function S(g,O){for(;O+1<g.length;O++)g[O]=g[O+1];g.pop()}function E(g){for(var O=new Array(g.length),M=0;M<O.length;++M)O[M]=g[M].listener||g[M];return O}function N(g,O){return new Promise(function(M,k){function q(P){g.removeListener(O,te),k(P)}function te(){typeof g.removeListener=="function"&&g.removeListener("error",q),M([].slice.call(arguments))}T(g,O,te,{once:!0}),O!=="error"&&C(g,q,{once:!0})})}function C(g,O,M){typeof g.on=="function"&&T(g,"error",O,M)}function T(g,O,M,k){if(typeof g.on=="function")k.once?g.once(O,M):g.on(O,M);else if(typeof g.addEventListener=="function")g.addEventListener(O,function q(te){k.once&&g.removeEventListener(O,q),M(te)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g)}})),dt=de(((e,t)=>{typeof Object.create=="function"?t.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,i){if(i){n.super_=i;var o=function(){};o.prototype=i.prototype,n.prototype=new o,n.prototype.constructor=n}}})),Oe,Lt=ha((()=>{Oe=globalThis||self}));function tl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tn(){throw new Error("setTimeout has not been defined")}function Sn(){throw new Error("clearTimeout has not been defined")}function da(e){if(ze===setTimeout)return setTimeout(e,0);if((ze===Tn||!ze)&&setTimeout)return ze=setTimeout,setTimeout(e,0);try{return ze(e,0)}catch{try{return ze.call(null,e,0)}catch{return ze.call(this,e,0)}}}function rl(e){if(Ke===clearTimeout)return clearTimeout(e);if((Ke===Sn||!Ke)&&clearTimeout)return Ke=clearTimeout,clearTimeout(e);try{return Ke(e)}catch{try{return Ke.call(null,e)}catch{return Ke.call(this,e)}}}function nl(){!_t||!gt||(_t=!1,gt.length?qe=gt.concat(qe):Yt=-1,qe.length&&fa())}function fa(){if(!_t){var e=da(nl);_t=!0;for(var t=qe.length;t;){for(gt=qe,qe=[];++Yt<t;)gt&&gt[Yt].run();Yt=-1,t=qe.length}gt=null,_t=!1,rl(e)}}function _i(e,t){this.fun=e,this.array=t}function tt(){}var Xr,_e,ze,Ke,qe,_t,gt,Yt,Ei,ge,ft=ha((()=>{Xr={exports:{}},_e=Xr.exports={},(function(){try{typeof setTimeout=="function"?ze=setTimeout:ze=Tn}catch{ze=Tn}try{typeof clearTimeout=="function"?Ke=clearTimeout:Ke=Sn}catch{Ke=Sn}})(),qe=[],_t=!1,Yt=-1,_e.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];qe.push(new _i(e,t)),qe.length===1&&!_t&&da(fa)},_i.prototype.run=function(){this.fun.apply(null,this.array)},_e.title="browser",_e.browser=!0,_e.env={},_e.argv=[],_e.version="",_e.versions={},_e.on=tt,_e.addListener=tt,_e.once=tt,_e.off=tt,_e.removeListener=tt,_e.removeAllListeners=tt,_e.emit=tt,_e.prependListener=tt,_e.prependOnceListener=tt,_e.listeners=function(e){return[]},_e.binding=function(e){throw new Error("process.binding is not supported")},_e.cwd=function(){return"/"},_e.chdir=function(e){throw new Error("process.chdir is not supported")},_e.umask=function(){return 0},Ei=Xr.exports,ge=tl(Ei)})),pa=de(((e,t)=>{t.exports=Mn().EventEmitter})),il=de((e=>{e.byteLength=u,e.toByteArray=m,e.fromByteArray=p;for(var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=i.length;o<a;++o)t[o]=i[o],r[i.charCodeAt(o)]=o;r[45]=62,r[95]=63;function s(d){var v=d.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=d.indexOf("=");_===-1&&(_=v);var S=_===v?0:4-_%4;return[_,S]}function u(d){var v=s(d),_=v[0],S=v[1];return(_+S)*3/4-S}function h(d,v,_){return(v+_)*3/4-_}function m(d){for(var v,_=s(d),S=_[0],E=_[1],N=new n(h(d,S,E)),C=0,T=E>0?S-4:S,g=0;g<T;g+=4)v=r[d.charCodeAt(g)]<<18|r[d.charCodeAt(g+1)]<<12|r[d.charCodeAt(g+2)]<<6|r[d.charCodeAt(g+3)],N[C++]=v>>16&255,N[C++]=v>>8&255,N[C++]=v&255;return E===2&&(v=r[d.charCodeAt(g)]<<2|r[d.charCodeAt(g+1)]>>4,N[C++]=v&255),E===1&&(v=r[d.charCodeAt(g)]<<10|r[d.charCodeAt(g+1)]<<4|r[d.charCodeAt(g+2)]>>2,N[C++]=v>>8&255,N[C++]=v&255),N}function f(d){return t[d>>18&63]+t[d>>12&63]+t[d>>6&63]+t[d&63]}function w(d,v,_){for(var S,E=[],N=v;N<_;N+=3)S=(d[N]<<16&16711680)+(d[N+1]<<8&65280)+(d[N+2]&255),E.push(f(S));return E.join("")}function p(d){for(var v,_=d.length,S=_%3,E=[],N=16383,C=0,T=_-S;C<T;C+=N)E.push(w(d,C,C+N>T?T:C+N));return S===1?(v=d[_-1],E.push(t[v>>2]+t[v<<4&63]+"==")):S===2&&(v=(d[_-2]<<8)+d[_-1],E.push(t[v>>10]+t[v>>4&63]+t[v<<2&63]+"=")),E.join("")}})),al=de((e=>{e.read=function(t,r,n,i,o){var a,s,u=o*8-i-1,h=(1<<u)-1,m=h>>1,f=-7,w=n?o-1:0,p=n?-1:1,d=t[r+w];for(w+=p,a=d&(1<<-f)-1,d>>=-f,f+=u;f>0;a=a*256+t[r+w],w+=p,f-=8);for(s=a&(1<<-f)-1,a>>=-f,f+=i;f>0;s=s*256+t[r+w],w+=p,f-=8);if(a===0)a=1-m;else{if(a===h)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,i),a=a-m}return(d?-1:1)*s*Math.pow(2,a-i)},e.write=function(t,r,n,i,o,a){var s,u,h,m=a*8-o-1,f=(1<<m)-1,w=f>>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,v=i?1:-1,_=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,s=f):(s=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-s))<1&&(s--,h*=2),s+w>=1?r+=p/h:r+=p*Math.pow(2,1-w),r*h>=2&&(s++,h/=2),s+w>=f?(u=0,s=f):s+w>=1?(u=(r*h-1)*Math.pow(2,o),s=s+w):(u=r*Math.pow(2,w-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=u&255,d+=v,u/=256,o-=8);for(s=s<<o|u,m+=o;m>0;t[n+d]=s&255,d+=v,s/=256,m-=8);t[n+d-v]|=_*128}}));var Pr=de((e=>{var t=il(),r=al(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var R=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(R,l),R.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(R){if(R>i)throw new RangeError('The value "'+R+'" is invalid for option "size"');var l=new Uint8Array(R);return Object.setPrototypeOf(l,s.prototype),l}function s(R,l,c){if(typeof R=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(R)}return u(R,l,c)}s.poolSize=8192;function u(R,l,c){if(typeof R=="string")return w(R,l);if(ArrayBuffer.isView(R))return d(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(F(R,ArrayBuffer)||R&&F(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(F(R,SharedArrayBuffer)||R&&F(R.buffer,SharedArrayBuffer)))return v(R,l,c);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var x=R.valueOf&&R.valueOf();if(x!=null&&x!==R)return s.from(x,l,c);var B=_(R);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return s.from(R[Symbol.toPrimitive]("string"),l,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}s.from=function(R,l,c){return u(R,l,c)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function h(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function m(R,l,c){return h(R),R<=0?a(R):l!==void 0?typeof c=="string"?a(R).fill(l,c):a(R).fill(l):a(R)}s.alloc=function(R,l,c){return m(R,l,c)};function f(R){return h(R),a(R<0?0:S(R)|0)}s.allocUnsafe=function(R){return f(R)},s.allocUnsafeSlow=function(R){return f(R)};function w(R,l){if((typeof l!="string"||l==="")&&(l="utf8"),!s.isEncoding(l))throw new TypeError("Unknown encoding: "+l);var c=N(R,l)|0,x=a(c),B=x.write(R,l);return B!==c&&(x=x.slice(0,B)),x}function p(R){for(var l=R.length<0?0:S(R.length)|0,c=a(l),x=0;x<l;x+=1)c[x]=R[x]&255;return c}function d(R){if(F(R,Uint8Array)){var l=new Uint8Array(R);return v(l.buffer,l.byteOffset,l.byteLength)}return p(R)}function v(R,l,c){if(l<0||R.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(R.byteLength<l+(c||0))throw new RangeError('"length" is outside of buffer bounds');var x;return l===void 0&&c===void 0?x=new Uint8Array(R):c===void 0?x=new Uint8Array(R,l):x=new Uint8Array(R,l,c),Object.setPrototypeOf(x,s.prototype),x}function _(R){if(s.isBuffer(R)){var l=S(R.length)|0,c=a(l);return c.length===0||R.copy(c,0,0,l),c}if(R.length!==void 0)return typeof R.length!="number"||y(R.length)?a(0):p(R);if(R.type==="Buffer"&&Array.isArray(R.data))return p(R.data)}function S(R){if(R>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return R|0}function E(R){return+R!=R&&(R=0),s.alloc(+R)}s.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==s.prototype},s.compare=function(l,c){if(F(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),F(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(l)||!s.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===c)return 0;for(var x=l.length,B=c.length,V=0,W=Math.min(x,B);V<W;++V)if(l[V]!==c[V]){x=l[V],B=c[V];break}return x<B?-1:B<x?1:0},s.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(l,c){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return s.alloc(0);var x;if(c===void 0)for(c=0,x=0;x<l.length;++x)c+=l[x].length;var B=s.allocUnsafe(c),V=0;for(x=0;x<l.length;++x){var W=l[x];if(F(W,Uint8Array))V+W.length>B.length?s.from(W).copy(B,V):Uint8Array.prototype.set.call(B,W,V);else if(s.isBuffer(W))W.copy(B,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=W.length}return B};function N(R,l){if(s.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||F(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);var c=R.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&c===0)return 0;for(var B=!1;;)switch(l){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return b(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return oe(R).length;default:if(B)return x?-1:b(R).length;l=(""+l).toLowerCase(),B=!0}}s.byteLength=N;function C(R,l,c){var x=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,l>>>=0,c<=l))return"";for(R||(R="utf8");;)switch(R){case"hex":return Z(this,l,c);case"utf8":case"utf-8":return I(this,l,c);case"ascii":return j(this,l,c);case"latin1":case"binary":return se(this,l,c);case"base64":return G(this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,l,c);default:if(x)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function T(R,l,c){var x=R[l];R[l]=R[c],R[c]=x}s.prototype.swap16=function(){var l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var c=0;c<l;c+=2)T(this,c,c+1);return this},s.prototype.swap32=function(){var l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var c=0;c<l;c+=4)T(this,c,c+3),T(this,c+1,c+2);return this},s.prototype.swap64=function(){var l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var c=0;c<l;c+=8)T(this,c,c+7),T(this,c+1,c+6),T(this,c+2,c+5),T(this,c+3,c+4);return this},s.prototype.toString=function(){var l=this.length;return l===0?"":arguments.length===0?I(this,0,l):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(l){if(!s.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:s.compare(this,l)===0},s.prototype.inspect=function(){var l="",c=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(l+=" ... "),"<Buffer "+l+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(l,c,x,B,V){if(F(l,Uint8Array)&&(l=s.from(l,l.offset,l.byteLength)),!s.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(c===void 0&&(c=0),x===void 0&&(x=l?l.length:0),B===void 0&&(B=0),V===void 0&&(V=this.length),c<0||x>l.length||B<0||V>this.length)throw new RangeError("out of range index");if(B>=V&&c>=x)return 0;if(B>=V)return-1;if(c>=x)return 1;if(c>>>=0,x>>>=0,B>>>=0,V>>>=0,this===l)return 0;for(var W=V-B,le=x-c,ce=Math.min(W,le),ue=this.slice(B,V),fe=l.slice(c,x),ve=0;ve<ce;++ve)if(ue[ve]!==fe[ve]){W=ue[ve],le=fe[ve];break}return W<le?-1:le<W?1:0};function g(R,l,c,x,B){if(R.length===0)return-1;if(typeof c=="string"?(x=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,y(c)&&(c=B?0:R.length-1),c<0&&(c=R.length+c),c>=R.length){if(B)return-1;c=R.length-1}else if(c<0)if(B)c=0;else return-1;if(typeof l=="string"&&(l=s.from(l,x)),s.isBuffer(l))return l.length===0?-1:O(R,l,c,x,B);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?B?Uint8Array.prototype.indexOf.call(R,l,c):Uint8Array.prototype.lastIndexOf.call(R,l,c):O(R,[l],c,x,B);throw new TypeError("val must be string, number or Buffer")}function O(R,l,c,x,B){var V=1,W=R.length,le=l.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(R.length<2||l.length<2)return-1;V=2,W/=2,le/=2,c/=2}function ce(Ae,lt){return V===1?Ae[lt]:Ae.readUInt16BE(lt*V)}var ue;if(B){var fe=-1;for(ue=c;ue<W;ue++)if(ce(R,ue)===ce(l,fe===-1?0:ue-fe)){if(fe===-1&&(fe=ue),ue-fe+1===le)return fe*V}else fe!==-1&&(ue-=ue-fe),fe=-1}else for(c+le>W&&(c=W-le),ue=c;ue>=0;ue--){for(var ve=!0,we=0;we<le;we++)if(ce(R,ue+we)!==ce(l,we)){ve=!1;break}if(ve)return ue}return-1}s.prototype.includes=function(l,c,x){return this.indexOf(l,c,x)!==-1},s.prototype.indexOf=function(l,c,x){return g(this,l,c,x,!0)},s.prototype.lastIndexOf=function(l,c,x){return g(this,l,c,x,!1)};function M(R,l,c,x){c=Number(c)||0;var B=R.length-c;x?(x=Number(x),x>B&&(x=B)):x=B;var V=l.length;x>V/2&&(x=V/2);for(var W=0;W<x;++W){var le=parseInt(l.substr(W*2,2),16);if(y(le))return W;R[c+W]=le}return W}function k(R,l,c,x){return L(b(l,R.length-c),R,c,x)}function q(R,l,c,x){return L(H(l),R,c,x)}function te(R,l,c,x){return L(oe(l),R,c,x)}function P(R,l,c,x){return L(U(l,R.length-c),R,c,x)}s.prototype.write=function(l,c,x,B){if(c===void 0)B="utf8",x=this.length,c=0;else if(x===void 0&&typeof c=="string")B=c,x=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(x)?(x=x>>>0,B===void 0&&(B="utf8")):(B=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var V=this.length-c;if((x===void 0||x>V)&&(x=V),l.length>0&&(x<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");for(var W=!1;;)switch(B){case"hex":return M(this,l,c,x);case"utf8":case"utf-8":return k(this,l,c,x);case"ascii":case"latin1":case"binary":return q(this,l,c,x);case"base64":return te(this,l,c,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,c,x);default:if(W)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(R,l,c){return l===0&&c===R.length?t.fromByteArray(R):t.fromByteArray(R.slice(l,c))}function I(R,l,c){c=Math.min(R.length,c);for(var x=[],B=l;B<c;){var V=R[B],W=null,le=V>239?4:V>223?3:V>191?2:1;if(B+le<=c){var ce,ue,fe,ve;switch(le){case 1:V<128&&(W=V);break;case 2:ce=R[B+1],(ce&192)===128&&(ve=(V&31)<<6|ce&63,ve>127&&(W=ve));break;case 3:ce=R[B+1],ue=R[B+2],(ce&192)===128&&(ue&192)===128&&(ve=(V&15)<<12|(ce&63)<<6|ue&63,ve>2047&&(ve<55296||ve>57343)&&(W=ve));break;case 4:ce=R[B+1],ue=R[B+2],fe=R[B+3],(ce&192)===128&&(ue&192)===128&&(fe&192)===128&&(ve=(V&15)<<18|(ce&63)<<12|(ue&63)<<6|fe&63,ve>65535&&ve<1114112&&(W=ve))}}W===null?(W=65533,le=1):W>65535&&(W-=65536,x.push(W>>>10&1023|55296),W=56320|W&1023),x.push(W),B+=le}return K(x)}var $=4096;function K(R){var l=R.length;if(l<=$)return String.fromCharCode.apply(String,R);for(var c="",x=0;x<l;)c+=String.fromCharCode.apply(String,R.slice(x,x+=$));return c}function j(R,l,c){var x="";c=Math.min(R.length,c);for(var B=l;B<c;++B)x+=String.fromCharCode(R[B]&127);return x}function se(R,l,c){var x="";c=Math.min(R.length,c);for(var B=l;B<c;++B)x+=String.fromCharCode(R[B]);return x}function Z(R,l,c){var x=R.length;(!l||l<0)&&(l=0),(!c||c<0||c>x)&&(c=x);for(var B="",V=l;V<c;++V)B+=X[R[V]];return B}function re(R,l,c){for(var x=R.slice(l,c),B="",V=0;V<x.length-1;V+=2)B+=String.fromCharCode(x[V]+x[V+1]*256);return B}s.prototype.slice=function(l,c){var x=this.length;l=~~l,c=c===void 0?x:~~c,l<0?(l+=x,l<0&&(l=0)):l>x&&(l=x),c<0?(c+=x,c<0&&(c=0)):c>x&&(c=x),c<l&&(c=l);var B=this.subarray(l,c);return Object.setPrototypeOf(B,s.prototype),B};function z(R,l,c){if(R%1!==0||R<0)throw new RangeError("offset is not uint");if(R+l>c)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(l,c,x){l=l>>>0,c=c>>>0,x||z(l,c,this.length);for(var B=this[l],V=1,W=0;++W<c&&(V*=256);)B+=this[l+W]*V;return B},s.prototype.readUintBE=s.prototype.readUIntBE=function(l,c,x){l=l>>>0,c=c>>>0,x||z(l,c,this.length);for(var B=this[l+--c],V=1;c>0&&(V*=256);)B+=this[l+--c]*V;return B},s.prototype.readUint8=s.prototype.readUInt8=function(l,c){return l=l>>>0,c||z(l,1,this.length),this[l]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(l,c){return l=l>>>0,c||z(l,2,this.length),this[l]|this[l+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(l,c){return l=l>>>0,c||z(l,2,this.length),this[l]<<8|this[l+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(l,c){return l=l>>>0,c||z(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(l,c){return l=l>>>0,c||z(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},s.prototype.readIntLE=function(l,c,x){l=l>>>0,c=c>>>0,x||z(l,c,this.length);for(var B=this[l],V=1,W=0;++W<c&&(V*=256);)B+=this[l+W]*V;return V*=128,B>=V&&(B-=Math.pow(2,8*c)),B},s.prototype.readIntBE=function(l,c,x){l=l>>>0,c=c>>>0,x||z(l,c,this.length);for(var B=c,V=1,W=this[l+--B];B>0&&(V*=256);)W+=this[l+--B]*V;return V*=128,W>=V&&(W-=Math.pow(2,8*c)),W},s.prototype.readInt8=function(l,c){return l=l>>>0,c||z(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},s.prototype.readInt16LE=function(l,c){l=l>>>0,c||z(l,2,this.length);var x=this[l]|this[l+1]<<8;return x&32768?x|4294901760:x},s.prototype.readInt16BE=function(l,c){l=l>>>0,c||z(l,2,this.length);var x=this[l+1]|this[l]<<8;return x&32768?x|4294901760:x},s.prototype.readInt32LE=function(l,c){return l=l>>>0,c||z(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},s.prototype.readInt32BE=function(l,c){return l=l>>>0,c||z(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},s.prototype.readFloatLE=function(l,c){return l=l>>>0,c||z(l,4,this.length),r.read(this,l,!0,23,4)},s.prototype.readFloatBE=function(l,c){return l=l>>>0,c||z(l,4,this.length),r.read(this,l,!1,23,4)},s.prototype.readDoubleLE=function(l,c){return l=l>>>0,c||z(l,8,this.length),r.read(this,l,!0,52,8)},s.prototype.readDoubleBE=function(l,c){return l=l>>>0,c||z(l,8,this.length),r.read(this,l,!1,52,8)};function D(R,l,c,x,B,V){if(!s.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>B||l<V)throw new RangeError('"value" argument is out of bounds');if(c+x>R.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(l,c,x,B){if(l=+l,c=c>>>0,x=x>>>0,!B){var V=Math.pow(2,8*x)-1;D(this,l,c,x,V,0)}var W=1,le=0;for(this[c]=l&255;++le<x&&(W*=256);)this[c+le]=l/W&255;return c+x},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(l,c,x,B){if(l=+l,c=c>>>0,x=x>>>0,!B){var V=Math.pow(2,8*x)-1;D(this,l,c,x,V,0)}var W=x-1,le=1;for(this[c+W]=l&255;--W>=0&&(le*=256);)this[c+W]=l/le&255;return c+x},s.prototype.writeUint8=s.prototype.writeUInt8=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,1,255,0),this[c]=l&255,c+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,2,65535,0),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,2,65535,0),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,4,4294967295,0),this[c+3]=l>>>24,this[c+2]=l>>>16,this[c+1]=l>>>8,this[c]=l&255,c+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,4,4294967295,0),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4},s.prototype.writeIntLE=function(l,c,x,B){if(l=+l,c=c>>>0,!B){var V=Math.pow(2,8*x-1);D(this,l,c,x,V-1,-V)}var W=0,le=1,ce=0;for(this[c]=l&255;++W<x&&(le*=256);)l<0&&ce===0&&this[c+W-1]!==0&&(ce=1),this[c+W]=(l/le>>0)-ce&255;return c+x},s.prototype.writeIntBE=function(l,c,x,B){if(l=+l,c=c>>>0,!B){var V=Math.pow(2,8*x-1);D(this,l,c,x,V-1,-V)}var W=x-1,le=1,ce=0;for(this[c+W]=l&255;--W>=0&&(le*=256);)l<0&&ce===0&&this[c+W+1]!==0&&(ce=1),this[c+W]=(l/le>>0)-ce&255;return c+x},s.prototype.writeInt8=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,1,127,-128),l<0&&(l=255+l+1),this[c]=l&255,c+1},s.prototype.writeInt16LE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,2,32767,-32768),this[c]=l&255,this[c+1]=l>>>8,c+2},s.prototype.writeInt16BE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,2,32767,-32768),this[c]=l>>>8,this[c+1]=l&255,c+2},s.prototype.writeInt32LE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,4,2147483647,-2147483648),this[c]=l&255,this[c+1]=l>>>8,this[c+2]=l>>>16,this[c+3]=l>>>24,c+4},s.prototype.writeInt32BE=function(l,c,x){return l=+l,c=c>>>0,x||D(this,l,c,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[c]=l>>>24,this[c+1]=l>>>16,this[c+2]=l>>>8,this[c+3]=l&255,c+4};function J(R,l,c,x,B,V){if(c+x>R.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function Q(R,l,c,x,B){return l=+l,c=c>>>0,B||J(R,l,c,4,34028234663852886e22,-34028234663852886e22),r.write(R,l,c,x,23,4),c+4}s.prototype.writeFloatLE=function(l,c,x){return Q(this,l,c,!0,x)},s.prototype.writeFloatBE=function(l,c,x){return Q(this,l,c,!1,x)};function ne(R,l,c,x,B){return l=+l,c=c>>>0,B||J(R,l,c,8,17976931348623157e292,-17976931348623157e292),r.write(R,l,c,x,52,8),c+8}s.prototype.writeDoubleLE=function(l,c,x){return ne(this,l,c,!0,x)},s.prototype.writeDoubleBE=function(l,c,x){return ne(this,l,c,!1,x)},s.prototype.copy=function(l,c,x,B){if(!s.isBuffer(l))throw new TypeError("argument should be a Buffer");if(x||(x=0),!B&&B!==0&&(B=this.length),c>=l.length&&(c=l.length),c||(c=0),B>0&&B<x&&(B=x),B===x||l.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),l.length-c<B-x&&(B=l.length-c+x);var V=B-x;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,x,B):Uint8Array.prototype.set.call(l,this.subarray(x,B),c),V},s.prototype.fill=function(l,c,x,B){if(typeof l=="string"){if(typeof c=="string"?(B=c,c=0,x=this.length):typeof x=="string"&&(B=x,x=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!s.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(l.length===1){var V=l.charCodeAt(0);(B==="utf8"&&V<128||B==="latin1")&&(l=V)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(c<0||this.length<c||this.length<x)throw new RangeError("Out of range index");if(x<=c)return this;c=c>>>0,x=x===void 0?this.length:x>>>0,l||(l=0);var W;if(typeof l=="number")for(W=c;W<x;++W)this[W]=l;else{var le=s.isBuffer(l)?l:s.from(l,B),ce=le.length;if(ce===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(W=0;W<x-c;++W)this[W+c]=le[W%ce]}return this};var pe=/[^+/0-9A-Za-z-_]/g;function A(R){if(R=R.split("=")[0],R=R.trim().replace(pe,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function b(R,l){l=l||1/0;for(var c,x=R.length,B=null,V=[],W=0;W<x;++W){if(c=R.charCodeAt(W),c>55295&&c<57344){if(!B){if(c>56319){(l-=3)>-1&&V.push(239,191,189);continue}else if(W+1===x){(l-=3)>-1&&V.push(239,191,189);continue}B=c;continue}if(c<56320){(l-=3)>-1&&V.push(239,191,189),B=c;continue}c=(B-55296<<10|c-56320)+65536}else B&&(l-=3)>-1&&V.push(239,191,189);if(B=null,c<128){if((l-=1)<0)break;V.push(c)}else if(c<2048){if((l-=2)<0)break;V.push(c>>6|192,c&63|128)}else if(c<65536){if((l-=3)<0)break;V.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((l-=4)<0)break;V.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return V}function H(R){for(var l=[],c=0;c<R.length;++c)l.push(R.charCodeAt(c)&255);return l}function U(R,l){for(var c,x,B,V=[],W=0;W<R.length&&!((l-=2)<0);++W)c=R.charCodeAt(W),x=c>>8,B=c%256,V.push(B),V.push(x);return V}function oe(R){return t.toByteArray(A(R))}function L(R,l,c,x){for(var B=0;B<x&&!(B+c>=l.length||B>=R.length);++B)l[B+c]=R[B];return B}function F(R,l){return R instanceof l||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===l.name}function y(R){return R!==R}var X=(function(){for(var R="0123456789abcdef",l=new Array(256),c=0;c<16;++c)for(var x=c*16,B=0;B<16;++B)l[x+B]=R[c]+R[B];return l})()})),ma=de(((e,t)=>{t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},i=Symbol("test"),o=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var a=42;n[i]=a;for(var s in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var u=Object.getOwnPropertySymbols(n);if(u.length!==1||u[0]!==i||!Object.prototype.propertyIsEnumerable.call(n,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(n,i);if(h.value!==a||h.enumerable!==!0)return!1}return!0}})),Bn=de(((e,t)=>{var r=ma();t.exports=function(){return r()&&!!Symbol.toStringTag}})),va=de(((e,t)=>{t.exports=Object})),sl=de(((e,t)=>{t.exports=Error})),ol=de(((e,t)=>{t.exports=EvalError})),ll=de(((e,t)=>{t.exports=RangeError})),ul=de(((e,t)=>{t.exports=ReferenceError})),wa=de(((e,t)=>{t.exports=SyntaxError})),Dr=de(((e,t)=>{t.exports=TypeError})),cl=de(((e,t)=>{t.exports=URIError})),hl=de(((e,t)=>{t.exports=Math.abs})),dl=de(((e,t)=>{t.exports=Math.floor})),fl=de(((e,t)=>{t.exports=Math.max})),pl=de(((e,t)=>{t.exports=Math.min})),ml=de(((e,t)=>{t.exports=Math.pow})),vl=de(((e,t)=>{t.exports=Math.round})),wl=de(((e,t)=>{t.exports=Number.isNaN||function(n){return n!==n}})),gl=de(((e,t)=>{var r=wl();t.exports=function(i){return r(i)||i===0?i:i<0?-1:1}})),yl=de(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),nr=de(((e,t)=>{var r=yl();if(r)try{r([],"length")}catch{r=null}t.exports=r})),Lr=de(((e,t)=>{var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r})),bl=de(((e,t)=>{var r=typeof Symbol<"u"&&Symbol,n=ma();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}})),ga=de(((e,t)=>{t.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null})),ya=de(((e,t)=>{t.exports=va().getPrototypeOf||null})),_l=de(((e,t)=>{var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,i=Math.max,o="[object Function]",a=function(m,f){for(var w=[],p=0;p<m.length;p+=1)w[p]=m[p];for(var d=0;d<f.length;d+=1)w[d+m.length]=f[d];return w},s=function(m,f){for(var w=[],p=f||0,d=0;p<m.length;p+=1,d+=1)w[d]=m[p];return w},u=function(h,m){for(var f="",w=0;w<h.length;w+=1)f+=h[w],w+1<h.length&&(f+=m);return f};t.exports=function(m){var f=this;if(typeof f!="function"||n.apply(f)!==o)throw new TypeError(r+f);for(var w=s(arguments,1),p,d=function(){if(this instanceof p){var N=f.apply(this,a(w,arguments));return Object(N)===N?N:this}return f.apply(m,a(w,arguments))},v=i(0,f.length-w.length),_=[],S=0;S<v;S++)_[S]="$"+S;if(p=Function("binder","return function ("+u(_,",")+"){ return binder.apply(this,arguments); }")(d),f.prototype){var E=function(){};E.prototype=f.prototype,p.prototype=new E,E.prototype=null}return p}})),ir=de(((e,t)=>{var r=_l();t.exports=Function.prototype.bind||r})),Un=de(((e,t)=>{t.exports=Function.prototype.call})),Hn=de(((e,t)=>{t.exports=Function.prototype.apply})),El=de(((e,t)=>{t.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply})),ba=de(((e,t)=>{var r=ir(),n=Hn(),i=Un();t.exports=El()||r.call(i,n)})),Wn=de(((e,t)=>{var r=ir(),n=Dr(),i=Un(),o=ba();t.exports=function(s){if(s.length<1||typeof s[0]!="function")throw new n("a function is required");return o(r,i,s)}})),xl=de(((e,t)=>{var r=Wn(),n=nr(),i;try{i=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var o=!!i&&n&&n(Object.prototype,"__proto__"),a=Object,s=a.getPrototypeOf;t.exports=o&&typeof o.get=="function"?r([o.get]):typeof s=="function"?function(h){return s(h==null?h:a(h))}:!1})),_a=de(((e,t)=>{var r=ga(),n=ya(),i=xl();t.exports=r?function(a){return r(a)}:n?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return n(a)}:i?function(a){return i(a)}:null})),Tl=de(((e,t)=>{var r=Function.prototype.call,n=Object.prototype.hasOwnProperty;t.exports=ir().call(r,n)})),Ea=de(((e,t)=>{var r,n=va(),i=sl(),o=ol(),a=ll(),s=ul(),u=wa(),h=Dr(),m=cl(),f=hl(),w=dl(),p=fl(),d=pl(),v=ml(),_=vl(),S=gl(),E=Function,N=function(U){try{return E('"use strict"; return ('+U+").constructor;")()}catch{}},C=nr(),T=Lr(),g=function(){throw new h},O=C?(function(){try{return arguments.callee,g}catch{try{return C(arguments,"callee").get}catch{return g}}})():g,M=bl()(),k=_a(),q=ya(),te=ga(),P=Hn(),G=Un(),I={},$=typeof Uint8Array>"u"||!k?r:k(Uint8Array),K={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":M&&k?k([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&k?k(k([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!k?r:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!k?r:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&k?k(""[Symbol.iterator]()):r,"%Symbol%":M?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":O,"%TypedArray%":$,"%TypeError%":h,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":G,"%Function.prototype.apply%":P,"%Object.defineProperty%":T,"%Object.getPrototypeOf%":q,"%Math.abs%":f,"%Math.floor%":w,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":v,"%Math.round%":_,"%Math.sign%":S,"%Reflect.getPrototypeOf%":te};if(k)try{null.error}catch(U){K["%Error.prototype%"]=k(k(U))}var j=function U(oe){var L;if(oe==="%AsyncFunction%")L=N("async function () {}");else if(oe==="%GeneratorFunction%")L=N("function* () {}");else if(oe==="%AsyncGeneratorFunction%")L=N("async function* () {}");else if(oe==="%AsyncGenerator%"){var F=U("%AsyncGeneratorFunction%");F&&(L=F.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var y=U("%AsyncGenerator%");y&&k&&(L=k(y.prototype))}return K[oe]=L,L},se={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Z=ir(),re=Tl(),z=Z.call(G,Array.prototype.concat),D=Z.call(P,Array.prototype.splice),J=Z.call(G,String.prototype.replace),Q=Z.call(G,String.prototype.slice),ne=Z.call(G,RegExp.prototype.exec),pe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,b=function(oe){var L=Q(oe,0,1),F=Q(oe,-1);if(L==="%"&&F!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(F==="%"&&L!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var y=[];return J(oe,pe,function(X,R,l,c){y[y.length]=l?J(c,A,"$1"):R||X}),y},H=function(oe,L){var F=oe,y;if(re(se,F)&&(y=se[F],F="%"+y[0]+"%"),re(K,F)){var X=K[F];if(X===I&&(X=j(F)),typeof X>"u"&&!L)throw new h("intrinsic "+oe+" exists, but is not available. Please file an issue!");return{alias:y,name:F,value:X}}throw new u("intrinsic "+oe+" does not exist!")};t.exports=function(oe,L){if(typeof oe!="string"||oe.length===0)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof L!="boolean")throw new h('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,oe)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var F=b(oe),y=F.length>0?F[0]:"",X=H("%"+y+"%",L),R=X.name,l=X.value,c=!1,x=X.alias;x&&(y=x[0],D(F,z([0,1],x)));for(var B=1,V=!0;B<F.length;B+=1){var W=F[B],le=Q(W,0,1),ce=Q(W,-1);if((le==='"'||le==="'"||le==="`"||ce==='"'||ce==="'"||ce==="`")&&le!==ce)throw new u("property names with quotes must have matching quotes");if((W==="constructor"||!V)&&(c=!0),y+="."+W,R="%"+y+"%",re(K,R))l=K[R];else if(l!=null){if(!(W in l)){if(!L)throw new h("base intrinsic for "+oe+" exists, but the property is not available.");return}if(C&&B+1>=F.length){var ue=C(l,W);V=!!ue,V&&"get"in ue&&!("originalValue"in ue.get)?l=ue.get:l=l[W]}else V=re(l,W),l=l[W];V&&!c&&(K[R]=l)}}return l}})),xa=de(((e,t)=>{var r=Ea(),n=Wn(),i=n([r("%String.prototype.indexOf%")]);t.exports=function(a,s){var u=r(a,!!s);return typeof u=="function"&&i(a,".prototype.")>-1?n([u]):u}})),Sl=de(((e,t)=>{var r=Bn()(),n=xa()("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:n(u)==="[object Arguments]"},o=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&n(u)!=="[object Array]"&&"callee"in u&&n(u.callee)==="[object Function]"},a=(function(){return i(arguments)})();i.isLegacyArguments=o,t.exports=a?i:o})),Al=de(((e,t)=>{var r=Object.prototype.toString,n=Function.prototype.toString,i=/^\s*(?:function)?\*/,o=Bn()(),a=Object.getPrototypeOf,s=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}},u;t.exports=function(m){if(typeof m!="function")return!1;if(i.test(n.call(m)))return!0;if(!o)return r.call(m)==="[object GeneratorFunction]";if(!a)return!1;if(typeof u>"u"){var f=s();u=f?a(f):!1}return a(m)===u}})),kl=de(((e,t)=>{var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,i,o;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw o}}),o={},n(function(){throw 42},null,i)}catch(C){C!==o&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(T){try{var g=r.call(T);return a.test(g)}catch{return!1}},u=function(T){try{return s(T)?!1:(r.call(T),!0)}catch{return!1}},h=Object.prototype.toString,m="[object Object]",f="[object Function]",w="[object GeneratorFunction]",p="[object HTMLAllCollection]",d="[object HTML document.all class]",v="[object HTMLCollection]",_=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),E=function(){return!1};if(typeof document=="object"){var N=document.all;h.call(N)===h.call(document.all)&&(E=function(T){if((S||!T)&&(typeof T>"u"||typeof T=="object"))try{var g=h.call(T);return(g===p||g===d||g===v||g===m)&&T("")==null}catch{}return!1})}t.exports=n?function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;try{n(T,null,i)}catch(g){if(g!==o)return!1}return!s(T)&&u(T)}:function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;if(_)return u(T);if(s(T))return!1;var g=h.call(T);return g!==f&&g!==w&&!/^\[object HTML/.test(g)?!1:u(T)}})),Il=de(((e,t)=>{var r=kl(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(m,f,w){for(var p=0,d=m.length;p<d;p++)i.call(m,p)&&(w==null?f(m[p],p,m):f.call(w,m[p],p,m))},a=function(m,f,w){for(var p=0,d=m.length;p<d;p++)w==null?f(m.charAt(p),p,m):f.call(w,m.charAt(p),p,m)},s=function(m,f,w){for(var p in m)i.call(m,p)&&(w==null?f(m[p],p,m):f.call(w,m[p],p,m))};function u(h){return n.call(h)==="[object Array]"}t.exports=function(m,f,w){if(!r(f))throw new TypeError("iterator must be a function");var p;arguments.length>=3&&(p=w),u(m)?o(m,f,p):typeof m=="string"?a(m,f,p):s(m,f,p)}})),Rl=de(((e,t)=>{t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]})),Cl=de(((e,t)=>{Lt();var r=Rl(),n=typeof globalThis>"u"?Oe:globalThis;t.exports=function(){for(var o=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(o[o.length]=r[a]);return o}})),Nl=de(((e,t)=>{var r=Lr(),n=wa(),i=Dr(),o=nr();t.exports=function(s,u,h){if(!s||typeof s!="object"&&typeof s!="function")throw new i("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i("`loose`, if provided, must be a boolean");var m=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,w=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,d=!!o&&o(s,u);if(r)r(s,u,{configurable:w===null&&d?d.configurable:!w,enumerable:m===null&&d?d.enumerable:!m,value:h,writable:f===null&&d?d.writable:!f});else if(p||!m&&!f&&!w)s[u]=h;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}})),Ol=de(((e,t)=>{var r=Lr(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},t.exports=n})),Pl=de(((e,t)=>{var r=Ea(),n=Nl(),i=Ol()(),o=nr(),a=Dr(),s=r("%Math.floor%");t.exports=function(h,m){if(typeof h!="function")throw new a("`fn` is not a function");if(typeof m!="number"||m<0||m>4294967295||s(m)!==m)throw new a("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],w=!0,p=!0;if("length"in h&&o){var d=o(h,"length");d&&!d.configurable&&(w=!1),d&&!d.writable&&(p=!1)}return(w||p||!f)&&(i?n(h,"length",m,!0,!0):n(h,"length",m)),h}})),Dl=de(((e,t)=>{var r=ir(),n=Hn(),i=ba();t.exports=function(){return i(r,n,arguments)}})),Ll=de(((e,t)=>{var r=Pl(),n=Lr(),i=Wn(),o=Dl();t.exports=function(s){var u=i(arguments),h=s.length-(arguments.length-1);return r(u,1+(h>0?h:0),!0)},n?n(t.exports,"apply",{value:o}):t.exports.apply=o})),Ta=de(((e,t)=>{Lt();var r=Il(),n=Cl(),i=Ll(),o=xa(),a=nr(),s=_a(),u=o("Object.prototype.toString"),h=Bn()(),m=typeof globalThis>"u"?Oe:globalThis,f=n(),w=o("String.prototype.slice"),p=o("Array.prototype.indexOf",!0)||function(E,N){for(var C=0;C<E.length;C+=1)if(E[C]===N)return C;return-1},d={__proto__:null};h&&a&&s?r(f,function(S){var E=new m[S];if(Symbol.toStringTag in E&&s){var N=s(E),C=a(N,Symbol.toStringTag);!C&&N&&(C=a(s(N),Symbol.toStringTag)),d["$"+S]=i(C.get)}}):r(f,function(S){var E=new m[S],N=E.slice||E.set;N&&(d["$"+S]=i(N))});var v=function(E){var N=!1;return r(d,function(C,T){if(!N)try{"$"+C(E)===T&&(N=w(T,1))}catch{}}),N},_=function(E){var N=!1;return r(d,function(C,T){if(!N)try{C(E),N=w(T,1)}catch{}}),N};t.exports=function(E){if(!E||typeof E!="object")return!1;if(!h){var N=w(u(E),8,-1);return p(f,N)>-1?N:N!=="Object"?!1:_(E)}return a?v(E):null}})),Fl=de(((e,t)=>{var r=Ta();t.exports=function(i){return!!r(i)}})),Ml=de((e=>{var t=Sl(),r=Al(),n=Ta(),i=Fl();function o(x){return x.call.bind(x)}var a=typeof BigInt<"u",s=typeof Symbol<"u",u=o(Object.prototype.toString),h=o(Number.prototype.valueOf),m=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);if(a)var w=o(BigInt.prototype.valueOf);if(s)var p=o(Symbol.prototype.valueOf);function d(x,B){if(typeof x!="object")return!1;try{return B(x),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i;function v(x){return typeof Promise<"u"&&x instanceof Promise||x!==null&&typeof x=="object"&&typeof x.then=="function"&&typeof x.catch=="function"}e.isPromise=v;function _(x){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(x):i(x)||J(x)}e.isArrayBufferView=_;function S(x){return n(x)==="Uint8Array"}e.isUint8Array=S;function E(x){return n(x)==="Uint8ClampedArray"}e.isUint8ClampedArray=E;function N(x){return n(x)==="Uint16Array"}e.isUint16Array=N;function C(x){return n(x)==="Uint32Array"}e.isUint32Array=C;function T(x){return n(x)==="Int8Array"}e.isInt8Array=T;function g(x){return n(x)==="Int16Array"}e.isInt16Array=g;function O(x){return n(x)==="Int32Array"}e.isInt32Array=O;function M(x){return n(x)==="Float32Array"}e.isFloat32Array=M;function k(x){return n(x)==="Float64Array"}e.isFloat64Array=k;function q(x){return n(x)==="BigInt64Array"}e.isBigInt64Array=q;function te(x){return n(x)==="BigUint64Array"}e.isBigUint64Array=te;function P(x){return u(x)==="[object Map]"}P.working=typeof Map<"u"&&P(new Map);function G(x){return typeof Map>"u"?!1:P.working?P(x):x instanceof Map}e.isMap=G;function I(x){return u(x)==="[object Set]"}I.working=typeof Set<"u"&&I(new Set);function $(x){return typeof Set>"u"?!1:I.working?I(x):x instanceof Set}e.isSet=$;function K(x){return u(x)==="[object WeakMap]"}K.working=typeof WeakMap<"u"&&K(new WeakMap);function j(x){return typeof WeakMap>"u"?!1:K.working?K(x):x instanceof WeakMap}e.isWeakMap=j;function se(x){return u(x)==="[object WeakSet]"}se.working=typeof WeakSet<"u"&&se(new WeakSet);function Z(x){return se(x)}e.isWeakSet=Z;function re(x){return u(x)==="[object ArrayBuffer]"}re.working=typeof ArrayBuffer<"u"&&re(new ArrayBuffer);function z(x){return typeof ArrayBuffer>"u"?!1:re.working?re(x):x instanceof ArrayBuffer}e.isArrayBuffer=z;function D(x){return u(x)==="[object DataView]"}D.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&D(new DataView(new ArrayBuffer(1),0,1));function J(x){return typeof DataView>"u"?!1:D.working?D(x):x instanceof DataView}e.isDataView=J;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ne(x){return u(x)==="[object SharedArrayBuffer]"}function pe(x){return typeof Q>"u"?!1:(typeof ne.working>"u"&&(ne.working=ne(new Q)),ne.working?ne(x):x instanceof Q)}e.isSharedArrayBuffer=pe;function A(x){return u(x)==="[object AsyncFunction]"}e.isAsyncFunction=A;function b(x){return u(x)==="[object Map Iterator]"}e.isMapIterator=b;function H(x){return u(x)==="[object Set Iterator]"}e.isSetIterator=H;function U(x){return u(x)==="[object Generator]"}e.isGeneratorObject=U;function oe(x){return u(x)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=oe;function L(x){return d(x,h)}e.isNumberObject=L;function F(x){return d(x,m)}e.isStringObject=F;function y(x){return d(x,f)}e.isBooleanObject=y;function X(x){return a&&d(x,w)}e.isBigIntObject=X;function R(x){return s&&d(x,p)}e.isSymbolObject=R;function l(x){return L(x)||F(x)||y(x)||X(x)||R(x)}e.isBoxedPrimitive=l;function c(x){return typeof Uint8Array<"u"&&(z(x)||pe(x))}e.isAnyArrayBuffer=c,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(x){Object.defineProperty(e,x,{enumerable:!1,value:function(){throw new Error(x+" is not supported in userland")}})})})),Bl=de(((e,t)=>{t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}})),Sa=de((e=>{ft();var t=Object.getOwnPropertyDescriptors||function(J){for(var Q=Object.keys(J),ne={},pe=0;pe<Q.length;pe++)ne[Q[pe]]=Object.getOwnPropertyDescriptor(J,Q[pe]);return ne},r=/%[sdj%]/g;e.format=function(D){if(!T(D)){for(var J=[],Q=0;Q<arguments.length;Q++)J.push(a(arguments[Q]));return J.join(" ")}for(var Q=1,ne=arguments,pe=ne.length,A=String(D).replace(r,function(H){if(H==="%%")return"%";if(Q>=pe)return H;switch(H){case"%s":return String(ne[Q++]);case"%d":return Number(ne[Q++]);case"%j":try{return JSON.stringify(ne[Q++])}catch{return"[Circular]"}default:return H}}),b=ne[Q];Q<pe;b=ne[++Q])E(b)||!k(b)?A+=" "+b:A+=" "+a(b);return A},e.deprecate=function(D,J){if(typeof ge<"u"&&ge.noDeprecation===!0)return D;if(typeof ge>"u")return function(){return e.deprecate(D,J).apply(this,arguments)};var Q=!1;function ne(){if(!Q){if(ge.throwDeprecation)throw new Error(J);ge.traceDeprecation?console.trace(J):console.error(J),Q=!0}return D.apply(this,arguments)}return ne};var n={},i=/^$/;if(ge.env.NODE_DEBUG){var o=ge.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}e.debuglog=function(D){if(D=D.toUpperCase(),!n[D])if(i.test(D)){var J=ge.pid;n[D]=function(){var Q=e.format.apply(e,arguments);console.error("%s %d: %s",D,J,Q)}}else n[D]=function(){};return n[D]};function a(D,J){var Q={seen:[],stylize:u};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),S(J)?Q.showHidden=J:J&&e._extend(Q,J),O(Q.showHidden)&&(Q.showHidden=!1),O(Q.depth)&&(Q.depth=2),O(Q.colors)&&(Q.colors=!1),O(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=s),m(Q,D,Q.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(D,J){var Q=a.styles[J];return Q?"\x1B["+a.colors[Q][0]+"m"+D+"\x1B["+a.colors[Q][1]+"m":D}function u(D,J){return D}function h(D){var J={};return D.forEach(function(Q,ne){J[Q]=!0}),J}function m(D,J,Q){if(D.customInspect&&J&&P(J.inspect)&&J.inspect!==e.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ne=J.inspect(Q,D);return T(ne)||(ne=m(D,ne,Q)),ne}var pe=f(D,J);if(pe)return pe;var A=Object.keys(J),b=h(A);if(D.showHidden&&(A=Object.getOwnPropertyNames(J)),te(J)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return w(J);if(A.length===0){if(P(J)){var H=J.name?": "+J.name:"";return D.stylize("[Function"+H+"]","special")}if(M(J))return D.stylize(RegExp.prototype.toString.call(J),"regexp");if(q(J))return D.stylize(Date.prototype.toString.call(J),"date");if(te(J))return w(J)}var U="",oe=!1,L=["{","}"];if(_(J)&&(oe=!0,L=["[","]"]),P(J)&&(U=" [Function"+(J.name?": "+J.name:"")+"]"),M(J)&&(U=" "+RegExp.prototype.toString.call(J)),q(J)&&(U=" "+Date.prototype.toUTCString.call(J)),te(J)&&(U=" "+w(J)),A.length===0&&(!oe||J.length==0))return L[0]+U+L[1];if(Q<0)return M(J)?D.stylize(RegExp.prototype.toString.call(J),"regexp"):D.stylize("[Object]","special");D.seen.push(J);var F;return oe?F=p(D,J,Q,b,A):F=A.map(function(y){return d(D,J,Q,b,y,oe)}),D.seen.pop(),v(F,U,L)}function f(D,J){if(O(J))return D.stylize("undefined","undefined");if(T(J)){var Q="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return D.stylize(Q,"string")}if(C(J))return D.stylize(""+J,"number");if(S(J))return D.stylize(""+J,"boolean");if(E(J))return D.stylize("null","null")}function w(D){return"["+Error.prototype.toString.call(D)+"]"}function p(D,J,Q,ne,pe){for(var A=[],b=0,H=J.length;b<H;++b)se(J,String(b))?A.push(d(D,J,Q,ne,String(b),!0)):A.push("");return pe.forEach(function(U){U.match(/^\d+$/)||A.push(d(D,J,Q,ne,U,!0))}),A}function d(D,J,Q,ne,pe,A){var b,H,U=Object.getOwnPropertyDescriptor(J,pe)||{value:J[pe]};if(U.get?U.set?H=D.stylize("[Getter/Setter]","special"):H=D.stylize("[Getter]","special"):U.set&&(H=D.stylize("[Setter]","special")),se(ne,pe)||(b="["+pe+"]"),H||(D.seen.indexOf(U.value)<0?(E(Q)?H=m(D,U.value,null):H=m(D,U.value,Q-1),H.indexOf(`
4
+ `)>-1&&(A?H=H.split(`
5
+ `).map(function(oe){return" "+oe}).join(`
6
+ `).slice(2):H=`
7
+ `+H.split(`
8
+ `).map(function(oe){return" "+oe}).join(`
9
+ `))):H=D.stylize("[Circular]","special")),O(b)){if(A&&pe.match(/^\d+$/))return H;b=JSON.stringify(""+pe),b.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(b=b.slice(1,-1),b=D.stylize(b,"name")):(b=b.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),b=D.stylize(b,"string"))}return b+": "+H}function v(D,J,Q){var ne=0;return D.reduce(function(pe,A){return ne++,A.indexOf(`
10
+ `)>=0&&ne++,pe+A.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Q[0]+(J===""?"":J+`
11
+ `)+" "+D.join(`,
12
+ `)+" "+Q[1]:Q[0]+J+" "+D.join(", ")+" "+Q[1]}e.types=Ml();function _(D){return Array.isArray(D)}e.isArray=_;function S(D){return typeof D=="boolean"}e.isBoolean=S;function E(D){return D===null}e.isNull=E;function N(D){return D==null}e.isNullOrUndefined=N;function C(D){return typeof D=="number"}e.isNumber=C;function T(D){return typeof D=="string"}e.isString=T;function g(D){return typeof D=="symbol"}e.isSymbol=g;function O(D){return D===void 0}e.isUndefined=O;function M(D){return k(D)&&I(D)==="[object RegExp]"}e.isRegExp=M,e.types.isRegExp=M;function k(D){return typeof D=="object"&&D!==null}e.isObject=k;function q(D){return k(D)&&I(D)==="[object Date]"}e.isDate=q,e.types.isDate=q;function te(D){return k(D)&&(I(D)==="[object Error]"||D instanceof Error)}e.isError=te,e.types.isNativeError=te;function P(D){return typeof D=="function"}e.isFunction=P;function G(D){return D===null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||typeof D=="symbol"||typeof D>"u"}e.isPrimitive=G,e.isBuffer=Bl();function I(D){return Object.prototype.toString.call(D)}function $(D){return D<10?"0"+D.toString(10):D.toString(10)}var K=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(){var D=new Date,J=[$(D.getHours()),$(D.getMinutes()),$(D.getSeconds())].join(":");return[D.getDate(),K[D.getMonth()],J].join(" ")}e.log=function(){console.log("%s - %s",j(),e.format.apply(e,arguments))},e.inherits=dt(),e._extend=function(D,J){if(!J||!k(J))return D;for(var Q=Object.keys(J),ne=Q.length;ne--;)D[Q[ne]]=J[Q[ne]];return D};function se(D,J){return Object.prototype.hasOwnProperty.call(D,J)}var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&J[Z]){var Q=J[Z];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,Z,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var ne,pe,A=new Promise(function(U,oe){ne=U,pe=oe}),b=[],H=0;H<arguments.length;H++)b.push(arguments[H]);b.push(function(U,oe){U?pe(U):ne(oe)});try{J.apply(this,b)}catch(U){pe(U)}return A}return Object.setPrototypeOf(Q,Object.getPrototypeOf(J)),Z&&Object.defineProperty(Q,Z,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Q,t(J))},e.promisify.custom=Z;function re(D,J){if(!D){var Q=new Error("Promise was rejected with a falsy value");Q.reason=D,D=Q}return J(D)}function z(D){if(typeof D!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var Q=[],ne=0;ne<arguments.length;ne++)Q.push(arguments[ne]);var pe=Q.pop();if(typeof pe!="function")throw new TypeError("The last argument must be of type Function");var A=this,b=function(){return pe.apply(A,arguments)};D.apply(this,Q).then(function(H){ge.nextTick(b.bind(null,null,H))},function(H){ge.nextTick(re.bind(null,H,b))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(D)),Object.defineProperties(J,t(D)),J}e.callbackify=z})),Ul=de(((e,t)=>{function r(d,v){var _=Object.keys(d);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(d);v&&(S=S.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),_.push.apply(_,S)}return _}function n(d){for(var v=1;v<arguments.length;v++){var _=arguments[v]!=null?arguments[v]:{};v%2?r(Object(_),!0).forEach(function(S){i(d,S,_[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(_)):r(Object(_)).forEach(function(S){Object.defineProperty(d,S,Object.getOwnPropertyDescriptor(_,S))})}return d}function i(d,v,_){return v=u(v),v in d?Object.defineProperty(d,v,{value:_,enumerable:!0,configurable:!0,writable:!0}):d[v]=_,d}function o(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")}function a(d,v){for(var _=0;_<v.length;_++){var S=v[_];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,u(S.key),S)}}function s(d,v,_){return v&&a(d.prototype,v),_&&a(d,_),Object.defineProperty(d,"prototype",{writable:!1}),d}function u(d){var v=h(d,"string");return typeof v=="symbol"?v:String(v)}function h(d,v){if(typeof d!="object"||d===null)return d;var _=d[Symbol.toPrimitive];if(_!==void 0){var S=_.call(d,v||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(d)}var m=Pr().Buffer,f=Sa().inspect,w=f&&f.custom||"inspect";function p(d,v,_){m.prototype.copy.call(d,v,_)}t.exports=(function(){function d(){o(this,d),this.head=null,this.tail=null,this.length=0}return s(d,[{key:"push",value:function(_){var S={data:_,next:null};this.length>0?this.tail.next=S:this.head=S,this.tail=S,++this.length}},{key:"unshift",value:function(_){var S={data:_,next:this.head};this.length===0&&(this.tail=S),this.head=S,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var S=this.head,E=""+S.data;S=S.next;)E+=_+S.data;return E}},{key:"concat",value:function(_){if(this.length===0)return m.alloc(0);for(var S=m.allocUnsafe(_>>>0),E=this.head,N=0;E;)p(E.data,S,N),N+=E.data.length,E=E.next;return S}},{key:"consume",value:function(_,S){var E;return _<this.head.data.length?(E=this.head.data.slice(0,_),this.head.data=this.head.data.slice(_)):_===this.head.data.length?E=this.shift():E=S?this._getString(_):this._getBuffer(_),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_){var S=this.head,E=1,N=S.data;for(_-=N.length;S=S.next;){var C=S.data,T=_>C.length?C.length:_;if(T===C.length?N+=C:N+=C.slice(0,_),_-=T,_===0){T===C.length?(++E,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=C.slice(T));break}++E}return this.length-=E,N}},{key:"_getBuffer",value:function(_){var S=m.allocUnsafe(_),E=this.head,N=1;for(E.data.copy(S),_-=E.data.length;E=E.next;){var C=E.data,T=_>C.length?C.length:_;if(C.copy(S,S.length-_,0,T),_-=T,_===0){T===C.length?(++N,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=C.slice(T));break}++N}return this.length-=N,S}},{key:w,value:function(_,S){return f(this,n(n({},S),{},{depth:0,customInspect:!1}))}}]),d})()})),Aa=de(((e,t)=>{ft();function r(u,h){var m=this,f=this._readableState&&this._readableState.destroyed,w=this._writableState&&this._writableState.destroyed;return f||w?(h?h(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ge.nextTick(a,this,u)):ge.nextTick(a,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(p){!h&&p?m._writableState?m._writableState.errorEmitted?ge.nextTick(i,m):(m._writableState.errorEmitted=!0,ge.nextTick(n,m,p)):ge.nextTick(n,m,p):h?(ge.nextTick(i,m),h(p)):ge.nextTick(i,m)}),this)}function n(u,h){a(u,h),i(u)}function i(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}function o(){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)}function a(u,h){u.emit("error",h)}function s(u,h){var m=u._readableState,f=u._writableState;m&&m.autoDestroy||f&&f.autoDestroy?u.destroy(h):u.emit("error",h)}t.exports={destroy:r,undestroy:o,errorOrDestroy:s}})),Ft=de(((e,t)=>{function r(h,m){h.prototype=Object.create(m.prototype),h.prototype.constructor=h,h.__proto__=m}var n={};function i(h,m,f){f||(f=Error);function w(d,v,_){return typeof m=="string"?m:m(d,v,_)}var p=(function(d){r(v,d);function v(_,S,E){return d.call(this,w(_,S,E))||this}return v})(f);p.prototype.name=f.name,p.prototype.code=h,n[h]=p}function o(h,m){if(Array.isArray(h)){var f=h.length;return h=h.map(function(w){return String(w)}),f>2?"one of ".concat(m," ").concat(h.slice(0,f-1).join(", "),", or ")+h[f-1]:f===2?"one of ".concat(m," ").concat(h[0]," or ").concat(h[1]):"of ".concat(m," ").concat(h[0])}else return"of ".concat(m," ").concat(String(h))}function a(h,m,f){return h.substr(!f||f<0?0:+f,m.length)===m}function s(h,m,f){return(f===void 0||f>h.length)&&(f=h.length),h.substring(f-m.length,f)===m}function u(h,m,f){return typeof f!="number"&&(f=0),f+m.length>h.length?!1:h.indexOf(m,f)!==-1}i("ERR_INVALID_OPT_VALUE",function(h,m){return'The value "'+m+'" is invalid for option "'+h+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(h,m,f){var w;typeof m=="string"&&a(m,"not ")?(w="must not be",m=m.replace(/^not /,"")):w="must be";var p;if(s(h," argument"))p="The ".concat(h," ").concat(w," ").concat(o(m,"type"));else{var d=u(h,".")?"property":"argument";p='The "'.concat(h,'" ').concat(d," ").concat(w," ").concat(o(m,"type"))}return p+=". Received type ".concat(typeof f),p},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n})),ka=de(((e,t)=>{var r=Ft().codes.ERR_INVALID_OPT_VALUE;function n(o,a,s){return o.highWaterMark!=null?o.highWaterMark:a?o[s]:null}function i(o,a,s,u){var h=n(a,u,s);if(h!=null){if(!(isFinite(h)&&Math.floor(h)===h)||h<0)throw new r(u?s:"highWaterMark",h);return Math.floor(h)}return o.objectMode?16:16384}t.exports={getHighWaterMark:i}})),Hl=de(((e,t)=>{Lt(),t.exports=r;function r(i,o){if(n("noDeprecation"))return i;var a=!1;function s(){if(!a){if(n("throwDeprecation"))throw new Error(o);n("traceDeprecation")?console.trace(o):console.warn(o),a=!0}return i.apply(this,arguments)}return s}function n(i){try{if(!Oe.localStorage)return!1}catch{return!1}var o=Oe.localStorage[i];return o==null?!1:String(o).toLowerCase()==="true"}})),Ia=de(((e,t)=>{Lt(),ft(),t.exports=k;function r(A){var b=this;this.next=null,this.entry=null,this.finish=function(){pe(b,A)}}var n;k.WritableState=O;var i={deprecate:Hl()},o=pa(),a=Pr().Buffer,s=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(A){return a.from(A)}function h(A){return a.isBuffer(A)||A instanceof s}var m=Aa(),f=ka().getHighWaterMark,w=Ft().codes,p=w.ERR_INVALID_ARG_TYPE,d=w.ERR_METHOD_NOT_IMPLEMENTED,v=w.ERR_MULTIPLE_CALLBACK,_=w.ERR_STREAM_CANNOT_PIPE,S=w.ERR_STREAM_DESTROYED,E=w.ERR_STREAM_NULL_VALUES,N=w.ERR_STREAM_WRITE_AFTER_END,C=w.ERR_UNKNOWN_ENCODING,T=m.errorOrDestroy;dt()(k,o);function g(){}function O(A,b,H){n=n||Ot(),A=A||{},typeof H!="boolean"&&(H=b instanceof n),this.objectMode=!!A.objectMode,H&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=f(this,A,"writableHighWaterMark",H),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=A.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){j(b,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=A.emitClose!==!1,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}O.prototype.getBuffer=function(){for(var b=this.bufferedRequest,H=[];b;)H.push(b),b=b.next;return H},(function(){try{Object.defineProperty(O.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var M;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(b){return M.call(this,b)?!0:this!==k?!1:b&&b._writableState instanceof O}})):M=function(b){return b instanceof this};function k(A){n=n||Ot();var b=this instanceof n;if(!b&&!M.call(k,this))return new k(A);this._writableState=new O(A,this,b),this.writable=!0,A&&(typeof A.write=="function"&&(this._write=A.write),typeof A.writev=="function"&&(this._writev=A.writev),typeof A.destroy=="function"&&(this._destroy=A.destroy),typeof A.final=="function"&&(this._final=A.final)),o.call(this)}k.prototype.pipe=function(){T(this,new _)};function q(A,b){var H=new N;T(A,H),ge.nextTick(b,H)}function te(A,b,H,U){var oe;return H===null?oe=new E:typeof H!="string"&&!b.objectMode&&(oe=new p("chunk",["string","Buffer"],H)),oe?(T(A,oe),ge.nextTick(U,oe),!1):!0}k.prototype.write=function(A,b,H){var U=this._writableState,oe=!1,L=!U.objectMode&&h(A);return L&&!a.isBuffer(A)&&(A=u(A)),typeof b=="function"&&(H=b,b=null),L?b="buffer":b||(b=U.defaultEncoding),typeof H!="function"&&(H=g),U.ending?q(this,H):(L||te(this,U,A,H))&&(U.pendingcb++,oe=G(this,U,L,A,b,H)),oe},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var A=this._writableState;A.corked&&(A.corked--,!A.writing&&!A.corked&&!A.bufferProcessing&&A.bufferedRequest&&re(this,A))},k.prototype.setDefaultEncoding=function(b){if(typeof b=="string"&&(b=b.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((b+"").toLowerCase())>-1))throw new C(b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function P(A,b,H){return!A.objectMode&&A.decodeStrings!==!1&&typeof b=="string"&&(b=a.from(b,H)),b}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(A,b,H,U,oe,L){if(!H){var F=P(b,U,oe);U!==F&&(H=!0,oe="buffer",U=F)}var y=b.objectMode?1:U.length;b.length+=y;var X=b.length<b.highWaterMark;if(X||(b.needDrain=!0),b.writing||b.corked){var R=b.lastBufferedRequest;b.lastBufferedRequest={chunk:U,encoding:oe,isBuf:H,callback:L,next:null},R?R.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else I(A,b,!1,y,U,oe,L);return X}function I(A,b,H,U,oe,L,F){b.writelen=U,b.writecb=F,b.writing=!0,b.sync=!0,b.destroyed?b.onwrite(new S("write")):H?A._writev(oe,b.onwrite):A._write(oe,L,b.onwrite),b.sync=!1}function $(A,b,H,U,oe){--b.pendingcb,H?(ge.nextTick(oe,U),ge.nextTick(Q,A,b),A._writableState.errorEmitted=!0,T(A,U)):(oe(U),A._writableState.errorEmitted=!0,T(A,U),Q(A,b))}function K(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}function j(A,b){var H=A._writableState,U=H.sync,oe=H.writecb;if(typeof oe!="function")throw new v;if(K(H),b)$(A,H,U,b,oe);else{var L=z(H)||A.destroyed;!L&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&re(A,H),U?ge.nextTick(se,A,H,L,oe):se(A,H,L,oe)}}function se(A,b,H,U){H||Z(A,b),b.pendingcb--,U(),Q(A,b)}function Z(A,b){b.length===0&&b.needDrain&&(b.needDrain=!1,A.emit("drain"))}function re(A,b){b.bufferProcessing=!0;var H=b.bufferedRequest;if(A._writev&&H&&H.next){var U=b.bufferedRequestCount,oe=new Array(U),L=b.corkedRequestsFree;L.entry=H;for(var F=0,y=!0;H;)oe[F]=H,H.isBuf||(y=!1),H=H.next,F+=1;oe.allBuffers=y,I(A,b,!0,b.length,oe,"",L.finish),b.pendingcb++,b.lastBufferedRequest=null,L.next?(b.corkedRequestsFree=L.next,L.next=null):b.corkedRequestsFree=new r(b),b.bufferedRequestCount=0}else{for(;H;){var X=H.chunk,R=H.encoding,l=H.callback;if(I(A,b,!1,b.objectMode?1:X.length,X,R,l),H=H.next,b.bufferedRequestCount--,b.writing)break}H===null&&(b.lastBufferedRequest=null)}b.bufferedRequest=H,b.bufferProcessing=!1}k.prototype._write=function(A,b,H){H(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(A,b,H){var U=this._writableState;return typeof A=="function"?(H=A,A=null,b=null):typeof b=="function"&&(H=b,b=null),A!=null&&this.write(A,b),U.corked&&(U.corked=1,this.uncork()),U.ending||ne(this,U,H),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function z(A){return A.ending&&A.length===0&&A.bufferedRequest===null&&!A.finished&&!A.writing}function D(A,b){A._final(function(H){b.pendingcb--,H&&T(A,H),b.prefinished=!0,A.emit("prefinish"),Q(A,b)})}function J(A,b){!b.prefinished&&!b.finalCalled&&(typeof A._final=="function"&&!b.destroyed?(b.pendingcb++,b.finalCalled=!0,ge.nextTick(D,A,b)):(b.prefinished=!0,A.emit("prefinish")))}function Q(A,b){var H=z(b);if(H&&(J(A,b),b.pendingcb===0&&(b.finished=!0,A.emit("finish"),b.autoDestroy))){var U=A._readableState;(!U||U.autoDestroy&&U.endEmitted)&&A.destroy()}return H}function ne(A,b,H){b.ending=!0,Q(A,b),H&&(b.finished?ge.nextTick(H):A.once("finish",H)),b.ended=!0,A.writable=!1}function pe(A,b,H){var U=A.entry;for(A.entry=null;U;){var oe=U.callback;b.pendingcb--,oe(H),U=U.next}b.corkedRequestsFree.next=A}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(b){this._writableState&&(this._writableState.destroyed=b)}}),k.prototype.destroy=m.destroy,k.prototype._undestroy=m.undestroy,k.prototype._destroy=function(A,b){b(A)}})),Ot=de(((e,t)=>{ft();var r=Object.keys||function(f){var w=[];for(var p in f)w.push(p);return w};t.exports=u;var n=Ra(),i=Ia();dt()(u,n);for(var o=r(i.prototype),a=0;a<o.length;a++){var s=o[a];u.prototype[s]||(u.prototype[s]=i.prototype[s])}function u(f){if(!(this instanceof u))return new u(f);n.call(this,f),i.call(this,f),this.allowHalfOpen=!0,f&&(f.readable===!1&&(this.readable=!1),f.writable===!1&&(this.writable=!1),f.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||ge.nextTick(m,this)}function m(f){f.end()}Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(w){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=w,this._writableState.destroyed=w)}})})),Wl=de(((e,t)=>{var r=Pr(),n=r.Buffer;function i(a,s){for(var u in a)s[u]=a[u]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o);function o(a,s,u){return n(a,s,u)}i(n,o),o.from=function(a,s,u){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,u)},o.alloc=function(a,s,u){if(typeof a!="number")throw new TypeError("Argument must be a number");var h=n(a);return s!==void 0?typeof u=="string"?h.fill(s,u):h.fill(s):h.fill(0),h},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})),An=de((e=>{var t=Wl().Buffer,r=t.isEncoding||function(E){switch(E=""+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 n(E){if(!E)return"utf8";for(var N;;)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(N)return;E=(""+E).toLowerCase(),N=!0}}function i(E){var N=n(E);if(typeof N!="string"&&(t.isEncoding===r||!r(E)))throw new Error("Unknown encoding: "+E);return N||E}e.StringDecoder=o;function o(E){this.encoding=i(E);var N;switch(this.encoding){case"utf16le":this.text=w,this.end=p,N=4;break;case"utf8":this.fillLast=h,N=4;break;case"base64":this.text=d,this.end=v,N=3;break;default:this.write=_,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(N)}o.prototype.write=function(E){if(E.length===0)return"";var N,C;if(this.lastNeed){if(N=this.fillLast(E),N===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<E.length?N?N+this.text(E,C):this.text(E,C):N||""},o.prototype.end=f,o.prototype.text=m,o.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};function a(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function s(E,N,C){var T=N.length-1;if(T<C)return 0;var g=a(N[T]);return g>=0?(g>0&&(E.lastNeed=g-1),g):--T<C||g===-2?0:(g=a(N[T]),g>=0?(g>0&&(E.lastNeed=g-2),g):--T<C||g===-2?0:(g=a(N[T]),g>=0?(g>0&&(g===2?g=0:E.lastNeed=g-3),g):0))}function u(E,N,C){if((N[0]&192)!==128)return E.lastNeed=0,"\uFFFD";if(E.lastNeed>1&&N.length>1){if((N[1]&192)!==128)return E.lastNeed=1,"\uFFFD";if(E.lastNeed>2&&N.length>2&&(N[2]&192)!==128)return E.lastNeed=2,"\uFFFD"}}function h(E){var N=this.lastTotal-this.lastNeed,C=u(this,E,N);if(C!==void 0)return C;if(this.lastNeed<=E.length)return E.copy(this.lastChar,N,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,N,0,E.length),this.lastNeed-=E.length}function m(E,N){var C=s(this,E,N);if(!this.lastNeed)return E.toString("utf8",N);this.lastTotal=C;var T=E.length-(C-this.lastNeed);return E.copy(this.lastChar,0,T),E.toString("utf8",N,T)}function f(E){var N=E&&E.length?this.write(E):"";return this.lastNeed?N+"\uFFFD":N}function w(E,N){if((E.length-N)%2===0){var C=E.toString("utf16le",N);if(C){var T=C.charCodeAt(C.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",N,E.length-1)}function p(E){var N=E&&E.length?this.write(E):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return N+this.lastChar.toString("utf16le",0,C)}return N}function d(E,N){var C=(E.length-N)%3;return C===0?E.toString("base64",N):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",N,E.length-C))}function v(E){var N=E&&E.length?this.write(E):"";return this.lastNeed?N+this.lastChar.toString("base64",0,3-this.lastNeed):N}function _(E){return E.toString(this.encoding)}function S(E){return E&&E.length?this.write(E):""}})),jn=de(((e,t)=>{var r=Ft().codes.ERR_STREAM_PREMATURE_CLOSE;function n(s){var u=!1;return function(){if(!u){u=!0;for(var h=arguments.length,m=new Array(h),f=0;f<h;f++)m[f]=arguments[f];s.apply(this,m)}}}function i(){}function o(s){return s.setHeader&&typeof s.abort=="function"}function a(s,u,h){if(typeof u=="function")return a(s,null,u);u||(u={}),h=n(h||i);var m=u.readable||u.readable!==!1&&s.readable,f=u.writable||u.writable!==!1&&s.writable,w=function(){s.writable||d()},p=s._writableState&&s._writableState.finished,d=function(){f=!1,p=!0,m||h.call(s)},v=s._readableState&&s._readableState.endEmitted,_=function(){m=!1,v=!0,f||h.call(s)},S=function(T){h.call(s,T)},E=function(){var T;if(m&&!v)return(!s._readableState||!s._readableState.ended)&&(T=new r),h.call(s,T);if(f&&!p)return(!s._writableState||!s._writableState.ended)&&(T=new r),h.call(s,T)},N=function(){s.req.on("finish",d)};return o(s)?(s.on("complete",d),s.on("abort",E),s.req?N():s.on("request",N)):f&&!s._writableState&&(s.on("end",w),s.on("close",w)),s.on("end",_),s.on("finish",d),u.error!==!1&&s.on("error",S),s.on("close",E),function(){s.removeListener("complete",d),s.removeListener("abort",E),s.removeListener("request",N),s.req&&s.req.removeListener("finish",d),s.removeListener("end",w),s.removeListener("close",w),s.removeListener("finish",d),s.removeListener("end",_),s.removeListener("error",S),s.removeListener("close",E)}}t.exports=a})),jl=de(((e,t)=>{ft();var r;function n(C,T,g){return T=i(T),T in C?Object.defineProperty(C,T,{value:g,enumerable:!0,configurable:!0,writable:!0}):C[T]=g,C}function i(C){var T=o(C,"string");return typeof T=="symbol"?T:String(T)}function o(C,T){if(typeof C!="object"||C===null)return C;var g=C[Symbol.toPrimitive];if(g!==void 0){var O=g.call(C,T||"default");if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(C)}var a=jn(),s=Symbol("lastResolve"),u=Symbol("lastReject"),h=Symbol("error"),m=Symbol("ended"),f=Symbol("lastPromise"),w=Symbol("handlePromise"),p=Symbol("stream");function d(C,T){return{value:C,done:T}}function v(C){var T=C[s];if(T!==null){var g=C[p].read();g!==null&&(C[f]=null,C[s]=null,C[u]=null,T(d(g,!1)))}}function _(C){ge.nextTick(v,C)}function S(C,T){return function(g,O){C.then(function(){if(T[m]){g(d(void 0,!0));return}T[w](g,O)},O)}}var E=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((r={get stream(){return this[p]},next:function(){var T=this,g=this[h];if(g!==null)return Promise.reject(g);if(this[m])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(q,te){ge.nextTick(function(){T[h]?te(T[h]):q(d(void 0,!0))})});var O=this[f],M;if(O)M=new Promise(S(O,this));else{var k=this[p].read();if(k!==null)return Promise.resolve(d(k,!1));M=new Promise(this[w])}return this[f]=M,M}},n(r,Symbol.asyncIterator,function(){return this}),n(r,"return",function(){var T=this;return new Promise(function(g,O){T[p].destroy(null,function(M){if(M){O(M);return}g(d(void 0,!0))})})}),r),E);t.exports=function(T){var g,O=Object.create(N,(g={},n(g,p,{value:T,writable:!0}),n(g,s,{value:null,writable:!0}),n(g,u,{value:null,writable:!0}),n(g,h,{value:null,writable:!0}),n(g,m,{value:T._readableState.endEmitted,writable:!0}),n(g,w,{value:function(k,q){var te=O[p].read();te?(O[f]=null,O[s]=null,O[u]=null,k(d(te,!1))):(O[s]=k,O[u]=q)},writable:!0}),g));return O[f]=null,a(T,function(M){if(M&&M.code!=="ERR_STREAM_PREMATURE_CLOSE"){var k=O[u];k!==null&&(O[f]=null,O[s]=null,O[u]=null,k(M)),O[h]=M;return}var q=O[s];q!==null&&(O[f]=null,O[s]=null,O[u]=null,q(d(void 0,!0))),O[m]=!0}),T.on("readable",_.bind(null,O)),O}})),Gl=de(((e,t)=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}})),Ra=de(((e,t)=>{Lt(),ft(),t.exports=q;var r;q.ReadableState=k,Mn().EventEmitter;var n=function(F,y){return F.listeners(y).length},i=pa(),o=Pr().Buffer,a=(typeof Oe<"u"?Oe:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(L){return o.from(L)}function u(L){return o.isBuffer(L)||L instanceof a}var h=Sa(),m;h&&h.debuglog?m=h.debuglog("stream"):m=function(){};var f=Ul(),w=Aa(),p=ka().getHighWaterMark,d=Ft().codes,v=d.ERR_INVALID_ARG_TYPE,_=d.ERR_STREAM_PUSH_AFTER_EOF,S=d.ERR_METHOD_NOT_IMPLEMENTED,E=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,N,C,T;dt()(q,i);var g=w.errorOrDestroy,O=["error","close","destroy","pause","resume"];function M(L,F,y){if(typeof L.prependListener=="function")return L.prependListener(F,y);!L._events||!L._events[F]?L.on(F,y):Array.isArray(L._events[F])?L._events[F].unshift(y):L._events[F]=[y,L._events[F]]}function k(L,F,y){r=r||Ot(),L=L||{},typeof y!="boolean"&&(y=F instanceof r),this.objectMode=!!L.objectMode,y&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=p(this,L,"readableHighWaterMark",y),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=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(N||(N=An().StringDecoder),this.decoder=new N(L.encoding),this.encoding=L.encoding)}function q(L){if(r=r||Ot(),!(this instanceof q))return new q(L);var F=this instanceof r;this._readableState=new k(L,this,F),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),i.call(this)}Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(F){this._readableState&&(this._readableState.destroyed=F)}}),q.prototype.destroy=w.destroy,q.prototype._undestroy=w.undestroy,q.prototype._destroy=function(L,F){F(L)},q.prototype.push=function(L,F){var y=this._readableState,X;return y.objectMode?X=!0:typeof L=="string"&&(F=F||y.defaultEncoding,F!==y.encoding&&(L=o.from(L,F),F=""),X=!0),te(this,L,F,!1,X)},q.prototype.unshift=function(L){return te(this,L,null,!0,!1)};function te(L,F,y,X,R){m("readableAddChunk",F);var l=L._readableState;if(F===null)l.reading=!1,j(L,l);else{var c;if(R||(c=G(l,F)),c)g(L,c);else if(l.objectMode||F&&F.length>0)if(typeof F!="string"&&!l.objectMode&&Object.getPrototypeOf(F)!==o.prototype&&(F=s(F)),X)l.endEmitted?g(L,new E):P(L,l,F,!0);else if(l.ended)g(L,new _);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!y?(F=l.decoder.write(F),l.objectMode||F.length!==0?P(L,l,F,!1):re(L,l)):P(L,l,F,!1)}else X||(l.reading=!1,re(L,l))}return!l.ended&&(l.length<l.highWaterMark||l.length===0)}function P(L,F,y,X){F.flowing&&F.length===0&&!F.sync?(F.awaitDrain=0,L.emit("data",y)):(F.length+=F.objectMode?1:y.length,X?F.buffer.unshift(y):F.buffer.push(y),F.needReadable&&se(L)),re(L,F)}function G(L,F){var y;return!u(F)&&typeof F!="string"&&F!==void 0&&!L.objectMode&&(y=new v("chunk",["string","Buffer","Uint8Array"],F)),y}q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(L){N||(N=An().StringDecoder);var F=new N(L);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;for(var y=this._readableState.buffer.head,X="";y!==null;)X+=F.write(y.data),y=y.next;return this._readableState.buffer.clear(),X!==""&&this._readableState.buffer.push(X),this._readableState.length=X.length,this};var I=1073741824;function $(L){return L>=I?L=I:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function K(L,F){return L<=0||F.length===0&&F.ended?0:F.objectMode?1:L!==L?F.flowing&&F.length?F.buffer.head.data.length:F.length:(L>F.highWaterMark&&(F.highWaterMark=$(L)),L<=F.length?L:F.ended?F.length:(F.needReadable=!0,0))}q.prototype.read=function(L){m("read",L),L=parseInt(L,10);var F=this._readableState,y=L;if(L!==0&&(F.emittedReadable=!1),L===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended))return m("read: emitReadable",F.length,F.ended),F.length===0&&F.ended?H(this):se(this),null;if(L=K(L,F),L===0&&F.ended)return F.length===0&&H(this),null;var X=F.needReadable;m("need readable",X),(F.length===0||F.length-L<F.highWaterMark)&&(X=!0,m("length less than watermark",X)),F.ended||F.reading?(X=!1,m("reading or ended",X)):X&&(m("do read"),F.reading=!0,F.sync=!0,F.length===0&&(F.needReadable=!0),this._read(F.highWaterMark),F.sync=!1,F.reading||(L=K(y,F)));var R;return L>0?R=b(L,F):R=null,R===null?(F.needReadable=F.length<=F.highWaterMark,L=0):(F.length-=L,F.awaitDrain=0),F.length===0&&(F.ended||(F.needReadable=!0),y!==L&&F.ended&&H(this)),R!==null&&this.emit("data",R),R};function j(L,F){if(m("onEofChunk"),!F.ended){if(F.decoder){var y=F.decoder.end();y&&y.length&&(F.buffer.push(y),F.length+=F.objectMode?1:y.length)}F.ended=!0,F.sync?se(L):(F.needReadable=!1,F.emittedReadable||(F.emittedReadable=!0,Z(L)))}}function se(L){var F=L._readableState;m("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,F.emittedReadable||(m("emitReadable",F.flowing),F.emittedReadable=!0,ge.nextTick(Z,L))}function Z(L){var F=L._readableState;m("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended)&&(L.emit("readable"),F.emittedReadable=!1),F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,A(L)}function re(L,F){F.readingMore||(F.readingMore=!0,ge.nextTick(z,L,F))}function z(L,F){for(;!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0);){var y=F.length;if(m("maybeReadMore read 0"),L.read(0),y===F.length)break}F.readingMore=!1}q.prototype._read=function(L){g(this,new S("_read()"))},q.prototype.pipe=function(L,F){var y=this,X=this._readableState;switch(X.pipesCount){case 0:X.pipes=L;break;case 1:X.pipes=[X.pipes,L];break;default:X.pipes.push(L)}X.pipesCount+=1,m("pipe count=%d opts=%j",X.pipesCount,F);var R=(!F||F.end!==!1)&&L!==ge.stdout&&L!==ge.stderr?c:fe;X.endEmitted?ge.nextTick(R):y.once("end",R),L.on("unpipe",l);function l(ve,we){m("onunpipe"),ve===y&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,V())}function c(){m("onend"),L.end()}var x=D(y);L.on("drain",x);var B=!1;function V(){m("cleanup"),L.removeListener("close",ce),L.removeListener("finish",ue),L.removeListener("drain",x),L.removeListener("error",le),L.removeListener("unpipe",l),y.removeListener("end",c),y.removeListener("end",fe),y.removeListener("data",W),B=!0,X.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&x()}y.on("data",W);function W(ve){m("ondata");var we=L.write(ve);m("dest.write",we),we===!1&&((X.pipesCount===1&&X.pipes===L||X.pipesCount>1&&oe(X.pipes,L)!==-1)&&!B&&(m("false write response, pause",X.awaitDrain),X.awaitDrain++),y.pause())}function le(ve){m("onerror",ve),fe(),L.removeListener("error",le),n(L,"error")===0&&g(L,ve)}M(L,"error",le);function ce(){L.removeListener("finish",ue),fe()}L.once("close",ce);function ue(){m("onfinish"),L.removeListener("close",ce),fe()}L.once("finish",ue);function fe(){m("unpipe"),y.unpipe(L)}return L.emit("pipe",y),X.flowing||(m("pipe resume"),y.resume()),L};function D(L){return function(){var y=L._readableState;m("pipeOnDrain",y.awaitDrain),y.awaitDrain&&y.awaitDrain--,y.awaitDrain===0&&n(L,"data")&&(y.flowing=!0,A(L))}}q.prototype.unpipe=function(L){var F=this._readableState,y={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1)return L&&L!==F.pipes?this:(L||(L=F.pipes),F.pipes=null,F.pipesCount=0,F.flowing=!1,L&&L.emit("unpipe",this,y),this);if(!L){var X=F.pipes,R=F.pipesCount;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var l=0;l<R;l++)X[l].emit("unpipe",this,{hasUnpiped:!1});return this}var c=oe(F.pipes,L);return c===-1?this:(F.pipes.splice(c,1),F.pipesCount-=1,F.pipesCount===1&&(F.pipes=F.pipes[0]),L.emit("unpipe",this,y),this)},q.prototype.on=function(L,F){var y=i.prototype.on.call(this,L,F),X=this._readableState;return L==="data"?(X.readableListening=this.listenerCount("readable")>0,X.flowing!==!1&&this.resume()):L==="readable"&&!X.endEmitted&&!X.readableListening&&(X.readableListening=X.needReadable=!0,X.flowing=!1,X.emittedReadable=!1,m("on readable",X.length,X.reading),X.length?se(this):X.reading||ge.nextTick(Q,this)),y},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(L,F){var y=i.prototype.removeListener.call(this,L,F);return L==="readable"&&ge.nextTick(J,this),y},q.prototype.removeAllListeners=function(L){var F=i.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&ge.nextTick(J,this),F};function J(L){var F=L._readableState;F.readableListening=L.listenerCount("readable")>0,F.resumeScheduled&&!F.paused?F.flowing=!0:L.listenerCount("data")>0&&L.resume()}function Q(L){m("readable nexttick read 0"),L.read(0)}q.prototype.resume=function(){var L=this._readableState;return L.flowing||(m("resume"),L.flowing=!L.readableListening,ne(this,L)),L.paused=!1,this};function ne(L,F){F.resumeScheduled||(F.resumeScheduled=!0,ge.nextTick(pe,L,F))}function pe(L,F){m("resume",F.reading),F.reading||L.read(0),F.resumeScheduled=!1,L.emit("resume"),A(L),F.flowing&&!F.reading&&L.read(0)}q.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function A(L){var F=L._readableState;for(m("flow",F.flowing);F.flowing&&L.read()!==null;);}q.prototype.wrap=function(L){var F=this,y=this._readableState,X=!1;L.on("end",function(){if(m("wrapped end"),y.decoder&&!y.ended){var c=y.decoder.end();c&&c.length&&F.push(c)}F.push(null)}),L.on("data",function(c){m("wrapped data"),y.decoder&&(c=y.decoder.write(c)),!(y.objectMode&&c==null)&&(!y.objectMode&&(!c||!c.length)||F.push(c)||(X=!0,L.pause()))});for(var R in L)this[R]===void 0&&typeof L[R]=="function"&&(this[R]=(function(x){return function(){return L[x].apply(L,arguments)}})(R));for(var l=0;l<O.length;l++)L.on(O[l],this.emit.bind(this,O[l]));return this._read=function(c){m("wrapped _read",c),X&&(X=!1,L.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=jl()),C(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){this._readableState&&(this._readableState.flowing=F)}}),q._fromList=b,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function b(L,F){if(F.length===0)return null;var y;return F.objectMode?y=F.buffer.shift():!L||L>=F.length?(F.decoder?y=F.buffer.join(""):F.buffer.length===1?y=F.buffer.first():y=F.buffer.concat(F.length),F.buffer.clear()):y=F.buffer.consume(L,F.decoder),y}function H(L){var F=L._readableState;m("endReadable",F.endEmitted),F.endEmitted||(F.ended=!0,ge.nextTick(U,F,L))}function U(L,F){if(m("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,F.readable=!1,F.emit("end"),L.autoDestroy)){var y=F._writableState;(!y||y.autoDestroy&&y.finished)&&F.destroy()}}typeof Symbol=="function"&&(q.from=function(L,F){return T===void 0&&(T=Gl()),T(q,L,F)});function oe(L,F){for(var y=0,X=L.length;y<X;y++)if(L[y]===F)return y;return-1}})),Ca=de(((e,t)=>{t.exports=h;var r=Ft().codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,s=Ot();dt()(h,s);function u(w,p){var d=this._transformState;d.transforming=!1;var v=d.writecb;if(v===null)return this.emit("error",new i);d.writechunk=null,d.writecb=null,p!=null&&this.push(p),v(w);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}function h(w){if(!(this instanceof h))return new h(w);s.call(this,w),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",m)}function m(){var w=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(p,d){f(w,p,d)}):f(this,null,null)}h.prototype.push=function(w,p){return this._transformState.needTransform=!1,s.prototype.push.call(this,w,p)},h.prototype._transform=function(w,p,d){d(new n("_transform()"))},h.prototype._write=function(w,p,d){var v=this._transformState;if(v.writecb=d,v.writechunk=w,v.writeencoding=p,!v.transforming){var _=this._readableState;(v.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},h.prototype._read=function(w){var p=this._transformState;p.writechunk!==null&&!p.transforming?(p.transforming=!0,this._transform(p.writechunk,p.writeencoding,p.afterTransform)):p.needTransform=!0},h.prototype._destroy=function(w,p){s.prototype._destroy.call(this,w,function(d){p(d)})};function f(w,p,d){if(p)return w.emit("error",p);if(d!=null&&w.push(d),w._writableState.length)throw new a;if(w._transformState.transforming)throw new o;return w.push(null)}})),$l=de(((e,t)=>{t.exports=n;var r=Ca();dt()(n,r);function n(i){if(!(this instanceof n))return new n(i);r.call(this,i)}n.prototype._transform=function(i,o,a){a(null,i)}})),zl=de(((e,t)=>{var r;function n(d){var v=!1;return function(){v||(v=!0,d.apply(void 0,arguments))}}var i=Ft().codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(d){if(d)throw d}function u(d){return d.setHeader&&typeof d.abort=="function"}function h(d,v,_,S){S=n(S);var E=!1;d.on("close",function(){E=!0}),r===void 0&&(r=jn()),r(d,{readable:v,writable:_},function(C){if(C)return S(C);E=!0,S()});var N=!1;return function(C){if(!E&&!N){if(N=!0,u(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();S(C||new a("pipe"))}}}function m(d){d()}function f(d,v){return d.pipe(v)}function w(d){return!d.length||typeof d[d.length-1]!="function"?s:d.pop()}function p(){for(var d=arguments.length,v=new Array(d),_=0;_<d;_++)v[_]=arguments[_];var S=w(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new o("streams");var E,N=v.map(function(C,T){var g=T<v.length-1;return h(C,g,T>0,function(O){E||(E=O),O&&N.forEach(m),!g&&(N.forEach(m),S(E))})});return v.reduce(f)}t.exports=p})),Gn=de(((e,t)=>{t.exports=n;var r=Mn().EventEmitter;dt()(n,r),n.Readable=Ra(),n.Writable=Ia(),n.Duplex=Ot(),n.Transform=Ca(),n.PassThrough=$l(),n.finished=jn(),n.pipeline=zl(),n.Stream=n;function n(){r.call(this)}n.prototype.pipe=function(i,o){var a=this;function s(d){i.writable&&i.write(d)===!1&&a.pause&&a.pause()}a.on("data",s);function u(){a.readable&&a.resume&&a.resume()}i.on("drain",u),!i._isStdio&&(!o||o.end!==!1)&&(a.on("end",m),a.on("close",f));var h=!1;function m(){h||(h=!0,i.end())}function f(){h||(h=!0,typeof i.destroy=="function"&&i.destroy())}function w(d){if(p(),r.listenerCount(this,"error")===0)throw d}a.on("error",w),i.on("error",w);function p(){a.removeListener("data",s),i.removeListener("drain",u),a.removeListener("end",m),a.removeListener("close",f),a.removeListener("error",w),i.removeListener("error",w),a.removeListener("end",p),a.removeListener("close",p),i.removeListener("close",p)}return a.on("end",p),a.on("close",p),i.on("close",p),i.emit("pipe",a),i}})),Kl=de((e=>{(function(t){t.parser=function(A,b){return new n(A,b)},t.SAXParser=n,t.SAXStream=m,t.createStream=h,t.MAX_BUFFER_LENGTH=65536;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(A,b){if(!(this instanceof n))return new n(A,b);var H=this;o(H),H.q=H.c="",H.bufferCheckPosition=t.MAX_BUFFER_LENGTH,H.opt=b||{},H.opt.lowercase=H.opt.lowercase||H.opt.lowercasetags,H.looseCase=H.opt.lowercase?"toLowerCase":"toUpperCase",H.tags=[],H.closed=H.closedRoot=H.sawRoot=!1,H.tag=H.error=null,H.strict=!!A,H.noscript=!!(A||H.opt.noscript),H.state=k.BEGIN,H.strictEntities=H.opt.strictEntities,H.ENTITIES=H.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),H.attribList=[],H.opt.xmlns&&(H.ns=Object.create(v)),H.trackPosition=H.opt.position!==!1,H.trackPosition&&(H.position=H.line=H.column=0),te(H,"onready")}Object.create||(Object.create=function(A){function b(){}return b.prototype=A,new b}),Object.keys||(Object.keys=function(A){var b=[];for(var H in A)A.hasOwnProperty(H)&&b.push(H);return b});function i(A){for(var b=Math.max(t.MAX_BUFFER_LENGTH,10),H=0,U=0,oe=r.length;U<oe;U++){var L=A[r[U]].length;if(L>b)switch(r[U]){case"textNode":G(A);break;case"cdata":P(A,"oncdata",A.cdata),A.cdata="";break;case"script":P(A,"onscript",A.script),A.script="";break;default:$(A,"Max buffer length exceeded: "+r[U])}H=Math.max(H,L)}A.bufferCheckPosition=t.MAX_BUFFER_LENGTH-H+A.position}function o(A){for(var b=0,H=r.length;b<H;b++)A[r[b]]=""}function a(A){G(A),A.cdata!==""&&(P(A,"oncdata",A.cdata),A.cdata=""),A.script!==""&&(P(A,"onscript",A.script),A.script="")}n.prototype={end:function(){K(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};var s;try{s=Gn().Stream}catch{s=function(){}}var u=t.EVENTS.filter(function(A){return A!=="error"&&A!=="end"});function h(A,b){return new m(A,b)}function m(A,b){if(!(this instanceof m))return new m(A,b);s.apply(this),this._parser=new n(A,b),this.writable=!0,this.readable=!0;var H=this;this._parser.onend=function(){H.emit("end")},this._parser.onerror=function(U){H.emit("error",U),H._parser.error=null},this._decoder=null,u.forEach(function(U){Object.defineProperty(H,"on"+U,{get:function(){return H._parser["on"+U]},set:function(oe){if(!oe)return H.removeAllListeners(U),H._parser["on"+U]=oe,oe;H.on(U,oe)},enumerable:!0,configurable:!1})})}m.prototype=Object.create(s.prototype,{constructor:{value:m}}),m.prototype.write=function(A){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(A)){if(!this._decoder){var b=An().StringDecoder;this._decoder=new b("utf8")}A=this._decoder.write(A)}return this._parser.write(A.toString()),this.emit("data",A),!0},m.prototype.end=function(A){return A&&A.length&&this.write(A),this._parser.end(),!0},m.prototype.on=function(A,b){var H=this;return!H._parser["on"+A]&&u.indexOf(A)!==-1&&(H._parser["on"+A]=function(){var U=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);U.splice(0,0,A),H.emit.apply(H,U)}),s.prototype.on.call(H,A,b)};var f="[CDATA[",w="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",v={xml:p,xmlns: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]/,S=/[:_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-]/,E=/[#:_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]/,N=/[#:_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 C(A){return A===" "||A===`
13
+ `||A==="\r"||A===" "}function T(A){return A==='"'||A==="'"}function g(A){return A===">"||C(A)}function O(A,b){return A.test(b)}function M(A,b){return!O(A,b)}var k=0;t.STATE={BEGIN:k++,BEGIN_WHITESPACE:k++,TEXT:k++,TEXT_ENTITY:k++,OPEN_WAKA:k++,SGML_DECL:k++,SGML_DECL_QUOTED:k++,DOCTYPE:k++,DOCTYPE_QUOTED:k++,DOCTYPE_DTD:k++,DOCTYPE_DTD_QUOTED:k++,COMMENT_STARTING:k++,COMMENT:k++,COMMENT_ENDING:k++,COMMENT_ENDED:k++,CDATA:k++,CDATA_ENDING:k++,CDATA_ENDING_2:k++,PROC_INST:k++,PROC_INST_BODY:k++,PROC_INST_ENDING:k++,OPEN_TAG:k++,OPEN_TAG_SLASH:k++,ATTRIB:k++,ATTRIB_NAME:k++,ATTRIB_NAME_SAW_WHITE:k++,ATTRIB_VALUE:k++,ATTRIB_VALUE_QUOTED:k++,ATTRIB_VALUE_CLOSED:k++,ATTRIB_VALUE_UNQUOTED:k++,ATTRIB_VALUE_ENTITY_Q:k++,ATTRIB_VALUE_ENTITY_U:k++,CLOSE_TAG:k++,CLOSE_TAG_SAW_WHITE:k++,SCRIPT:k++,SCRIPT_ENDING:k++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.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(t.ENTITIES).forEach(function(A){var b=t.ENTITIES[A],H=typeof b=="number"?String.fromCharCode(b):b;t.ENTITIES[A]=H});for(var q in t.STATE)t.STATE[t.STATE[q]]=q;k=t.STATE;function te(A,b,H){A[b]&&A[b](H)}function P(A,b,H){A.textNode&&G(A),te(A,b,H)}function G(A){A.textNode=I(A.opt,A.textNode),A.textNode&&te(A,"ontext",A.textNode),A.textNode=""}function I(A,b){return A.trim&&(b=b.trim()),A.normalize&&(b=b.replace(/\s+/g," ")),b}function $(A,b){return G(A),A.trackPosition&&(b+=`
14
+ Line: `+A.line+`
15
+ Column: `+A.column+`
16
+ Char: `+A.c),b=new Error(b),A.error=b,te(A,"onerror",b),A}function K(A){return A.sawRoot&&!A.closedRoot&&j(A,"Unclosed root tag"),A.state!==k.BEGIN&&A.state!==k.BEGIN_WHITESPACE&&A.state!==k.TEXT&&$(A,"Unexpected end"),G(A),A.c="",A.closed=!0,te(A,"onend"),n.call(A,A.strict,A.opt),A}function j(A,b){if(typeof A!="object"||!(A instanceof n))throw new Error("bad call to strictFail");A.strict&&$(A,b)}function se(A){A.strict||(A.tagName=A.tagName[A.looseCase]());var b=A.tags[A.tags.length-1]||A,H=A.tag={name:A.tagName,attributes:{}};A.opt.xmlns&&(H.ns=b.ns),A.attribList.length=0,P(A,"onopentagstart",H)}function Z(A,b){var H=A.indexOf(":")<0?["",A]:A.split(":"),U=H[0],oe=H[1];return b&&A==="xmlns"&&(U="xmlns",oe=""),{prefix:U,local:oe}}function re(A){if(A.strict||(A.attribName=A.attribName[A.looseCase]()),A.attribList.indexOf(A.attribName)!==-1||A.tag.attributes.hasOwnProperty(A.attribName)){A.attribName=A.attribValue="";return}if(A.opt.xmlns){var b=Z(A.attribName,!0),H=b.prefix,U=b.local;if(H==="xmlns")if(U==="xml"&&A.attribValue!==p)j(A,"xml: prefix must be bound to "+p+`
17
+ Actual: `+A.attribValue);else if(U==="xmlns"&&A.attribValue!==d)j(A,"xmlns: prefix must be bound to "+d+`
18
+ Actual: `+A.attribValue);else{var oe=A.tag,L=A.tags[A.tags.length-1]||A;oe.ns===L.ns&&(oe.ns=Object.create(L.ns)),oe.ns[U]=A.attribValue}A.attribList.push([A.attribName,A.attribValue])}else A.tag.attributes[A.attribName]=A.attribValue,P(A,"onattribute",{name:A.attribName,value:A.attribValue});A.attribName=A.attribValue=""}function z(A,b){if(A.opt.xmlns){var H=A.tag,U=Z(A.tagName);H.prefix=U.prefix,H.local=U.local,H.uri=H.ns[U.prefix]||"",H.prefix&&!H.uri&&(j(A,"Unbound namespace prefix: "+JSON.stringify(A.tagName)),H.uri=U.prefix);var oe=A.tags[A.tags.length-1]||A;H.ns&&oe.ns!==H.ns&&Object.keys(H.ns).forEach(function(W){P(A,"onopennamespace",{prefix:W,uri:H.ns[W]})});for(var L=0,F=A.attribList.length;L<F;L++){var y=A.attribList[L],X=y[0],R=y[1],l=Z(X,!0),c=l.prefix,x=l.local,B=c===""?"":H.ns[c]||"",V={name:X,value:R,prefix:c,local:x,uri:B};c&&c!=="xmlns"&&!B&&(j(A,"Unbound namespace prefix: "+JSON.stringify(c)),V.uri=c),A.tag.attributes[X]=V,P(A,"onattribute",V)}A.attribList.length=0}A.tag.isSelfClosing=!!b,A.sawRoot=!0,A.tags.push(A.tag),P(A,"onopentag",A.tag),b||(!A.noscript&&A.tagName.toLowerCase()==="script"?A.state=k.SCRIPT:A.state=k.TEXT,A.tag=null,A.tagName=""),A.attribName=A.attribValue="",A.attribList.length=0}function D(A){if(!A.tagName){j(A,"Weird empty close tag."),A.textNode+="</>",A.state=k.TEXT;return}if(A.script){if(A.tagName!=="script"){A.script+="</"+A.tagName+">",A.tagName="",A.state=k.SCRIPT;return}P(A,"onscript",A.script),A.script=""}var b=A.tags.length,H=A.tagName;A.strict||(H=H[A.looseCase]());for(var U=H;b--&&A.tags[b].name!==U;)j(A,"Unexpected close tag");if(b<0){j(A,"Unmatched closing tag: "+A.tagName),A.textNode+="</"+A.tagName+">",A.state=k.TEXT;return}A.tagName=H;for(var oe=A.tags.length;oe-- >b;){var L=A.tag=A.tags.pop();A.tagName=A.tag.name,P(A,"onclosetag",A.tagName);var F={};for(var y in L.ns)F[y]=L.ns[y];var X=A.tags[A.tags.length-1]||A;A.opt.xmlns&&L.ns!==X.ns&&Object.keys(L.ns).forEach(function(R){var l=L.ns[R];P(A,"onclosenamespace",{prefix:R,uri:l})})}b===0&&(A.closedRoot=!0),A.tagName=A.attribValue=A.attribName="",A.attribList.length=0,A.state=k.TEXT}function J(A){var b=A.entity,H=b.toLowerCase(),U,oe="";return A.ENTITIES[b]?A.ENTITIES[b]:A.ENTITIES[H]?A.ENTITIES[H]:(b=H,b.charAt(0)==="#"&&(b.charAt(1)==="x"?(b=b.slice(2),U=parseInt(b,16),oe=U.toString(16)):(b=b.slice(1),U=parseInt(b,10),oe=U.toString(10))),b=b.replace(/^0+/,""),isNaN(U)||oe.toLowerCase()!==b?(j(A,"Invalid character entity"),"&"+A.entity+";"):String.fromCodePoint(U))}function Q(A,b){b==="<"?(A.state=k.OPEN_WAKA,A.startTagPosition=A.position):C(b)||(j(A,"Non-whitespace before first tag."),A.textNode=b,A.state=k.TEXT)}function ne(A,b){var H="";return b<A.length&&(H=A.charAt(b)),H}function pe(A){var b=this;if(this.error)throw this.error;if(b.closed)return $(b,"Cannot write after close. Assign an onready handler.");if(A===null)return K(b);typeof A=="object"&&(A=A.toString());for(var H=0,U="";U=ne(A,H++),b.c=U,!!U;)switch(b.trackPosition&&(b.position++,U===`
19
+ `?(b.line++,b.column=0):b.column++),b.state){case k.BEGIN:if(b.state=k.BEGIN_WHITESPACE,U==="\uFEFF")continue;Q(b,U);continue;case k.BEGIN_WHITESPACE:Q(b,U);continue;case k.TEXT:if(b.sawRoot&&!b.closedRoot){for(var oe=H-1;U&&U!=="<"&&U!=="&";)U=ne(A,H++),U&&b.trackPosition&&(b.position++,U===`
20
+ `?(b.line++,b.column=0):b.column++);b.textNode+=A.substring(oe,H-1)}U==="<"&&!(b.sawRoot&&b.closedRoot&&!b.strict)?(b.state=k.OPEN_WAKA,b.startTagPosition=b.position):(!C(U)&&(!b.sawRoot||b.closedRoot)&&j(b,"Text data outside of root node."),U==="&"?b.state=k.TEXT_ENTITY:b.textNode+=U);continue;case k.SCRIPT:U==="<"?b.state=k.SCRIPT_ENDING:b.script+=U;continue;case k.SCRIPT_ENDING:U==="/"?b.state=k.CLOSE_TAG:(b.script+="<"+U,b.state=k.SCRIPT);continue;case k.OPEN_WAKA:if(U==="!")b.state=k.SGML_DECL,b.sgmlDecl="";else if(!C(U))if(O(_,U))b.state=k.OPEN_TAG,b.tagName=U;else if(U==="/")b.state=k.CLOSE_TAG,b.tagName="";else if(U==="?")b.state=k.PROC_INST,b.procInstName=b.procInstBody="";else{if(j(b,"Unencoded <"),b.startTagPosition+1<b.position){var L=b.position-b.startTagPosition;U=new Array(L).join(" ")+U}b.textNode+="<"+U,b.state=k.TEXT}continue;case k.SGML_DECL:(b.sgmlDecl+U).toUpperCase()===f?(P(b,"onopencdata"),b.state=k.CDATA,b.sgmlDecl="",b.cdata=""):b.sgmlDecl+U==="--"?(b.state=k.COMMENT,b.comment="",b.sgmlDecl=""):(b.sgmlDecl+U).toUpperCase()===w?(b.state=k.DOCTYPE,(b.doctype||b.sawRoot)&&j(b,"Inappropriately located doctype declaration"),b.doctype="",b.sgmlDecl=""):U===">"?(P(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=k.TEXT):(T(U)&&(b.state=k.SGML_DECL_QUOTED),b.sgmlDecl+=U);continue;case k.SGML_DECL_QUOTED:U===b.q&&(b.state=k.SGML_DECL,b.q=""),b.sgmlDecl+=U;continue;case k.DOCTYPE:U===">"?(b.state=k.TEXT,P(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=U,U==="["?b.state=k.DOCTYPE_DTD:T(U)&&(b.state=k.DOCTYPE_QUOTED,b.q=U));continue;case k.DOCTYPE_QUOTED:b.doctype+=U,U===b.q&&(b.q="",b.state=k.DOCTYPE);continue;case k.DOCTYPE_DTD:b.doctype+=U,U==="]"?b.state=k.DOCTYPE:T(U)&&(b.state=k.DOCTYPE_DTD_QUOTED,b.q=U);continue;case k.DOCTYPE_DTD_QUOTED:b.doctype+=U,U===b.q&&(b.state=k.DOCTYPE_DTD,b.q="");continue;case k.COMMENT:U==="-"?b.state=k.COMMENT_ENDING:b.comment+=U;continue;case k.COMMENT_ENDING:U==="-"?(b.state=k.COMMENT_ENDED,b.comment=I(b.opt,b.comment),b.comment&&P(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+U,b.state=k.COMMENT);continue;case k.COMMENT_ENDED:U!==">"?(j(b,"Malformed comment"),b.comment+="--"+U,b.state=k.COMMENT):b.state=k.TEXT;continue;case k.CDATA:U==="]"?b.state=k.CDATA_ENDING:b.cdata+=U;continue;case k.CDATA_ENDING:U==="]"?b.state=k.CDATA_ENDING_2:(b.cdata+="]"+U,b.state=k.CDATA);continue;case k.CDATA_ENDING_2:U===">"?(b.cdata&&P(b,"oncdata",b.cdata),P(b,"onclosecdata"),b.cdata="",b.state=k.TEXT):U==="]"?b.cdata+="]":(b.cdata+="]]"+U,b.state=k.CDATA);continue;case k.PROC_INST:U==="?"?b.state=k.PROC_INST_ENDING:C(U)?b.state=k.PROC_INST_BODY:b.procInstName+=U;continue;case k.PROC_INST_BODY:if(!b.procInstBody&&C(U))continue;U==="?"?b.state=k.PROC_INST_ENDING:b.procInstBody+=U;continue;case k.PROC_INST_ENDING:U===">"?(P(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=k.TEXT):(b.procInstBody+="?"+U,b.state=k.PROC_INST_BODY);continue;case k.OPEN_TAG:O(S,U)?b.tagName+=U:(se(b),U===">"?z(b):U==="/"?b.state=k.OPEN_TAG_SLASH:(C(U)||j(b,"Invalid character in tag name"),b.state=k.ATTRIB));continue;case k.OPEN_TAG_SLASH:U===">"?(z(b,!0),D(b)):(j(b,"Forward-slash in opening tag not followed by >"),b.state=k.ATTRIB);continue;case k.ATTRIB:if(C(U))continue;U===">"?z(b):U==="/"?b.state=k.OPEN_TAG_SLASH:O(_,U)?(b.attribName=U,b.attribValue="",b.state=k.ATTRIB_NAME):j(b,"Invalid attribute name");continue;case k.ATTRIB_NAME:U==="="?b.state=k.ATTRIB_VALUE:U===">"?(j(b,"Attribute without value"),b.attribValue=b.attribName,re(b),z(b)):C(U)?b.state=k.ATTRIB_NAME_SAW_WHITE:O(S,U)?b.attribName+=U:j(b,"Invalid attribute name");continue;case k.ATTRIB_NAME_SAW_WHITE:if(U==="=")b.state=k.ATTRIB_VALUE;else{if(C(U))continue;j(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",P(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",U===">"?z(b):O(_,U)?(b.attribName=U,b.state=k.ATTRIB_NAME):(j(b,"Invalid attribute name"),b.state=k.ATTRIB)}continue;case k.ATTRIB_VALUE:if(C(U))continue;T(U)?(b.q=U,b.state=k.ATTRIB_VALUE_QUOTED):(j(b,"Unquoted attribute value"),b.state=k.ATTRIB_VALUE_UNQUOTED,b.attribValue=U);continue;case k.ATTRIB_VALUE_QUOTED:if(U!==b.q){U==="&"?b.state=k.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=U;continue}re(b),b.q="",b.state=k.ATTRIB_VALUE_CLOSED;continue;case k.ATTRIB_VALUE_CLOSED:C(U)?b.state=k.ATTRIB:U===">"?z(b):U==="/"?b.state=k.OPEN_TAG_SLASH:O(_,U)?(j(b,"No whitespace between attributes"),b.attribName=U,b.attribValue="",b.state=k.ATTRIB_NAME):j(b,"Invalid attribute name");continue;case k.ATTRIB_VALUE_UNQUOTED:if(!g(U)){U==="&"?b.state=k.ATTRIB_VALUE_ENTITY_U:b.attribValue+=U;continue}re(b),U===">"?z(b):b.state=k.ATTRIB;continue;case k.CLOSE_TAG:if(b.tagName)U===">"?D(b):O(S,U)?b.tagName+=U:b.script?(b.script+="</"+b.tagName,b.tagName="",b.state=k.SCRIPT):(C(U)||j(b,"Invalid tagname in closing tag"),b.state=k.CLOSE_TAG_SAW_WHITE);else{if(C(U))continue;M(_,U)?b.script?(b.script+="</"+U,b.state=k.SCRIPT):j(b,"Invalid tagname in closing tag."):b.tagName=U}continue;case k.CLOSE_TAG_SAW_WHITE:if(C(U))continue;U===">"?D(b):j(b,"Invalid characters in closing tag");continue;case k.TEXT_ENTITY:case k.ATTRIB_VALUE_ENTITY_Q:case k.ATTRIB_VALUE_ENTITY_U:var F,y;switch(b.state){case k.TEXT_ENTITY:F=k.TEXT,y="textNode";break;case k.ATTRIB_VALUE_ENTITY_Q:F=k.ATTRIB_VALUE_QUOTED,y="attribValue";break;case k.ATTRIB_VALUE_ENTITY_U:F=k.ATTRIB_VALUE_UNQUOTED,y="attribValue"}U===";"?(b[y]+=J(b),b.entity="",b.state=F):O(b.entity.length?N:E,U)?b.entity+=U:(j(b,"Invalid character in entity name"),b[y]+="&"+b.entity+U,b.entity="",b.state=F);continue;default:throw new Error(b,"Unknown state: "+b.state)}return b.position>=b.bufferCheckPosition&&i(b),b}String.fromCodePoint||(function(){var A=String.fromCharCode,b=Math.floor,H=function(){var U=16384,oe=[],L,F,y=-1,X=arguments.length;if(!X)return"";for(var R="";++y<X;){var l=Number(arguments[y]);if(!isFinite(l)||l<0||l>1114111||b(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?oe.push(l):(l-=65536,L=(l>>10)+55296,F=l%1024+56320,oe.push(L,F)),(y+1===X||oe.length>U)&&(R+=A.apply(null,oe),oe.length=0)}return R};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:H,configurable:!0,writable:!0}):String.fromCodePoint=H})()})(typeof e>"u"?e.sax={}:e)})),$n=de(((e,t)=>{t.exports={isArray:function(r){return Array.isArray?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"}}})),zn=de(((e,t)=>{var r=$n().isArray;t.exports={copyOptions:function(n){var i,o={};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o},ensureFlagExists:function(n,i){(!(n in i)||typeof i[n]!="boolean")&&(i[n]=!1)},ensureSpacesExists:function(n){(!("spaces"in n)||typeof n.spaces!="number"&&typeof n.spaces!="string")&&(n.spaces=0)},ensureAlwaysArrayExists:function(n){(!("alwaysArray"in n)||typeof n.alwaysArray!="boolean"&&!r(n.alwaysArray))&&(n.alwaysArray=!1)},ensureKeyExists:function(n,i){(!(n+"Key"in i)||typeof i[n+"Key"]!="string")&&(i[n+"Key"]=i.compact?"_"+n:n)},checkFnExists:function(n,i){return n+"Fn"in i}}})),Na=de(((e,t)=>{var r=Kl(),n={on:function(){},parse:function(){}},i=zn(),o=$n().isArray,a,s=!0,u;function h(T){return a=i.copyOptions(T),i.ensureFlagExists("ignoreDeclaration",a),i.ensureFlagExists("ignoreInstruction",a),i.ensureFlagExists("ignoreAttributes",a),i.ensureFlagExists("ignoreText",a),i.ensureFlagExists("ignoreComment",a),i.ensureFlagExists("ignoreCdata",a),i.ensureFlagExists("ignoreDoctype",a),i.ensureFlagExists("compact",a),i.ensureFlagExists("alwaysChildren",a),i.ensureFlagExists("addParent",a),i.ensureFlagExists("trim",a),i.ensureFlagExists("nativeType",a),i.ensureFlagExists("nativeTypeAttributes",a),i.ensureFlagExists("sanitize",a),i.ensureFlagExists("instructionHasAttributes",a),i.ensureFlagExists("captureSpacesBetweenElements",a),i.ensureAlwaysArrayExists(a),i.ensureKeyExists("declaration",a),i.ensureKeyExists("instruction",a),i.ensureKeyExists("attributes",a),i.ensureKeyExists("text",a),i.ensureKeyExists("comment",a),i.ensureKeyExists("cdata",a),i.ensureKeyExists("doctype",a),i.ensureKeyExists("type",a),i.ensureKeyExists("name",a),i.ensureKeyExists("elements",a),i.ensureKeyExists("parent",a),i.checkFnExists("doctype",a),i.checkFnExists("instruction",a),i.checkFnExists("cdata",a),i.checkFnExists("comment",a),i.checkFnExists("text",a),i.checkFnExists("instructionName",a),i.checkFnExists("elementName",a),i.checkFnExists("attributeName",a),i.checkFnExists("attributeValue",a),i.checkFnExists("attributes",a),a}function m(T){var g=Number(T);if(!isNaN(g))return g;var O=T.toLowerCase();return O==="true"?!0:O==="false"?!1:T}function f(T,g){var O;if(a.compact){if(!u[a[T+"Key"]]&&(o(a.alwaysArray)?a.alwaysArray.indexOf(a[T+"Key"])!==-1:a.alwaysArray)&&(u[a[T+"Key"]]=[]),u[a[T+"Key"]]&&!o(u[a[T+"Key"]])&&(u[a[T+"Key"]]=[u[a[T+"Key"]]]),T+"Fn"in a&&typeof g=="string"&&(g=a[T+"Fn"](g,u)),T==="instruction"&&("instructionFn"in a||"instructionNameFn"in a)){for(O in g)if(g.hasOwnProperty(O))if("instructionFn"in a)g[O]=a.instructionFn(g[O],O,u);else{var M=g[O];delete g[O],g[a.instructionNameFn(O,M,u)]=M}}o(u[a[T+"Key"]])?u[a[T+"Key"]].push(g):u[a[T+"Key"]]=g}else{u[a.elementsKey]||(u[a.elementsKey]=[]);var k={};if(k[a.typeKey]=T,T==="instruction"){for(O in g)if(g.hasOwnProperty(O))break;k[a.nameKey]="instructionNameFn"in a?a.instructionNameFn(O,g,u):O,a.instructionHasAttributes?(k[a.attributesKey]=g[O][a.attributesKey],"instructionFn"in a&&(k[a.attributesKey]=a.instructionFn(k[a.attributesKey],O,u))):("instructionFn"in a&&(g[O]=a.instructionFn(g[O],O,u)),k[a.instructionKey]=g[O])}else T+"Fn"in a&&(g=a[T+"Fn"](g,u)),k[a[T+"Key"]]=g;a.addParent&&(k[a.parentKey]=u),u[a.elementsKey].push(k)}}function w(T){if("attributesFn"in a&&T&&(T=a.attributesFn(T,u)),(a.trim||"attributeValueFn"in a||"attributeNameFn"in a||a.nativeTypeAttributes)&&T){var g;for(g in T)if(T.hasOwnProperty(g)&&(a.trim&&(T[g]=T[g].trim()),a.nativeTypeAttributes&&(T[g]=m(T[g])),"attributeValueFn"in a&&(T[g]=a.attributeValueFn(T[g],g,u)),"attributeNameFn"in a)){var O=T[g];delete T[g],T[a.attributeNameFn(g,T[g],u)]=O}}return T}function p(T){var g={};if(T.body&&(T.name.toLowerCase()==="xml"||a.instructionHasAttributes)){for(var O=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,M;(M=O.exec(T.body))!==null;)g[M[1]]=M[2]||M[3]||M[4];g=w(g)}if(T.name.toLowerCase()==="xml"){if(a.ignoreDeclaration)return;u[a.declarationKey]={},Object.keys(g).length&&(u[a.declarationKey][a.attributesKey]=g),a.addParent&&(u[a.declarationKey][a.parentKey]=u)}else{if(a.ignoreInstruction)return;a.trim&&(T.body=T.body.trim());var k={};a.instructionHasAttributes&&Object.keys(g).length?(k[T.name]={},k[T.name][a.attributesKey]=g):k[T.name]=T.body,f("instruction",k)}}function d(T,g){var O;if(typeof T=="object"&&(g=T.attributes,T=T.name),g=w(g),"elementNameFn"in a&&(T=a.elementNameFn(T,u)),a.compact){if(O={},!a.ignoreAttributes&&g&&Object.keys(g).length){O[a.attributesKey]={};var M;for(M in g)g.hasOwnProperty(M)&&(O[a.attributesKey][M]=g[M])}!(T in u)&&(o(a.alwaysArray)?a.alwaysArray.indexOf(T)!==-1:a.alwaysArray)&&(u[T]=[]),u[T]&&!o(u[T])&&(u[T]=[u[T]]),o(u[T])?u[T].push(O):u[T]=O}else u[a.elementsKey]||(u[a.elementsKey]=[]),O={},O[a.typeKey]="element",O[a.nameKey]=T,!a.ignoreAttributes&&g&&Object.keys(g).length&&(O[a.attributesKey]=g),a.alwaysChildren&&(O[a.elementsKey]=[]),u[a.elementsKey].push(O);O[a.parentKey]=u,u=O}function v(T){a.ignoreText||!T.trim()&&!a.captureSpacesBetweenElements||(a.trim&&(T=T.trim()),a.nativeType&&(T=m(T)),a.sanitize&&(T=T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),f("text",T))}function _(T){a.ignoreComment||(a.trim&&(T=T.trim()),f("comment",T))}function S(T){var g=u[a.parentKey];a.addParent||delete u[a.parentKey],u=g}function E(T){a.ignoreCdata||(a.trim&&(T=T.trim()),f("cdata",T))}function N(T){a.ignoreDoctype||(T=T.replace(/^ /,""),a.trim&&(T=T.trim()),f("doctype",T))}function C(T){T.note=T}t.exports=function(T,g){var O=s?r.parser(!0,{}):O=new n.Parser("UTF-8"),M={};if(u=M,a=h(g),s?(O.opt={strictEntities:!0},O.onopentag=d,O.ontext=v,O.oncomment=_,O.onclosetag=S,O.onerror=C,O.oncdata=E,O.ondoctype=N,O.onprocessinginstruction=p):(O.on("startElement",d),O.on("text",v),O.on("comment",_),O.on("endElement",S),O.on("error",C)),s)O.write(T).close();else if(!O.parse(T))throw new Error("XML parsing error: "+O.getError());if(M[a.elementsKey]){var k=M[a.elementsKey];delete M[a.elementsKey],M[a.elementsKey]=k,delete M.text}return M}})),Vl=de(((e,t)=>{var r=zn(),n=Na();function i(o){var a=r.copyOptions(o);return r.ensureSpacesExists(a),a}t.exports=function(o,a){var s=i(a),u=n(o,s),h,m="compact"in s&&s.compact?"_parent":"parent";return"addParent"in s&&s.addParent?h=JSON.stringify(u,function(f,w){return f===m?"_":w},s.spaces):h=JSON.stringify(u,null,s.spaces),h.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}})),Oa=de(((e,t)=>{var r=zn(),n=$n().isArray,i,o;function a(T){var g=r.copyOptions(T);return r.ensureFlagExists("ignoreDeclaration",g),r.ensureFlagExists("ignoreInstruction",g),r.ensureFlagExists("ignoreAttributes",g),r.ensureFlagExists("ignoreText",g),r.ensureFlagExists("ignoreComment",g),r.ensureFlagExists("ignoreCdata",g),r.ensureFlagExists("ignoreDoctype",g),r.ensureFlagExists("compact",g),r.ensureFlagExists("indentText",g),r.ensureFlagExists("indentCdata",g),r.ensureFlagExists("indentAttributes",g),r.ensureFlagExists("indentInstruction",g),r.ensureFlagExists("fullTagEmptyElement",g),r.ensureFlagExists("noQuotesForNativeAttributes",g),r.ensureSpacesExists(g),typeof g.spaces=="number"&&(g.spaces=Array(g.spaces+1).join(" ")),r.ensureKeyExists("declaration",g),r.ensureKeyExists("instruction",g),r.ensureKeyExists("attributes",g),r.ensureKeyExists("text",g),r.ensureKeyExists("comment",g),r.ensureKeyExists("cdata",g),r.ensureKeyExists("doctype",g),r.ensureKeyExists("type",g),r.ensureKeyExists("name",g),r.ensureKeyExists("elements",g),r.checkFnExists("doctype",g),r.checkFnExists("instruction",g),r.checkFnExists("cdata",g),r.checkFnExists("comment",g),r.checkFnExists("text",g),r.checkFnExists("instructionName",g),r.checkFnExists("elementName",g),r.checkFnExists("attributeName",g),r.checkFnExists("attributeValue",g),r.checkFnExists("attributes",g),r.checkFnExists("fullTagEmptyElement",g),g}function s(T,g,O){return(!O&&T.spaces?`
21
+ `:"")+Array(g+1).join(T.spaces)}function u(T,g,O){if(g.ignoreAttributes)return"";"attributesFn"in g&&(T=g.attributesFn(T,o,i));var M,k,q,te,P=[];for(M in T)T.hasOwnProperty(M)&&T[M]!==null&&T[M]!==void 0&&(te=g.noQuotesForNativeAttributes&&typeof T[M]!="string"?"":'"',k=""+T[M],k=k.replace(/"/g,"&quot;"),q="attributeNameFn"in g?g.attributeNameFn(M,k,o,i):M,P.push(g.spaces&&g.indentAttributes?s(g,O+1,!1):" "),P.push(q+"="+te+("attributeValueFn"in g?g.attributeValueFn(k,M,o,i):k)+te));return T&&Object.keys(T).length&&g.spaces&&g.indentAttributes&&P.push(s(g,O,!1)),P.join("")}function h(T,g,O){return i=T,o="xml",g.ignoreDeclaration?"":"<?xml"+u(T[g.attributesKey],g,O)+"?>"}function m(T,g,O){if(g.ignoreInstruction)return"";var M;for(M in T)if(T.hasOwnProperty(M))break;var k="instructionNameFn"in g?g.instructionNameFn(M,T[M],o,i):M;if(typeof T[M]=="object")return i=T,o=k,"<?"+k+u(T[M][g.attributesKey],g,O)+"?>";var q=T[M]?T[M]:"";return"instructionFn"in g&&(q=g.instructionFn(q,M,o,i)),"<?"+k+(q?" "+q:"")+"?>"}function f(T,g){return g.ignoreComment?"":"<!--"+("commentFn"in g?g.commentFn(T,o,i):T)+"-->"}function w(T,g){return g.ignoreCdata?"":"<![CDATA["+("cdataFn"in g?g.cdataFn(T,o,i):T.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function p(T,g){return g.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in g?g.doctypeFn(T,o,i):T)+">"}function d(T,g){return g.ignoreText?"":(T=""+T,T=T.replace(/&amp;/g,"&"),T=T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in g?g.textFn(T,o,i):T)}function v(T,g){var O;if(T.elements&&T.elements.length)for(O=0;O<T.elements.length;++O)switch(T.elements[O][g.typeKey]){case"text":if(g.indentText)return!0;break;case"cdata":if(g.indentCdata)return!0;break;case"instruction":if(g.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function _(T,g,O){i=T,o=T.name;var M=[],k="elementNameFn"in g?g.elementNameFn(T.name,T):T.name;M.push("<"+k),T[g.attributesKey]&&M.push(u(T[g.attributesKey],g,O));var q=T[g.elementsKey]&&T[g.elementsKey].length||T[g.attributesKey]&&T[g.attributesKey]["xml:space"]==="preserve";return q||("fullTagEmptyElementFn"in g?q=g.fullTagEmptyElementFn(T.name,T):q=g.fullTagEmptyElement),q?(M.push(">"),T[g.elementsKey]&&T[g.elementsKey].length&&(M.push(S(T[g.elementsKey],g,O+1)),i=T,o=T.name),M.push(g.spaces&&v(T,g)?`
22
+ `+Array(O+1).join(g.spaces):""),M.push("</"+k+">")):M.push("/>"),M.join("")}function S(T,g,O,M){return T.reduce(function(k,q){var te=s(g,O,M&&!k);switch(q.type){case"element":return k+te+_(q,g,O);case"comment":return k+te+f(q[g.commentKey],g);case"doctype":return k+te+p(q[g.doctypeKey],g);case"cdata":return k+(g.indentCdata?te:"")+w(q[g.cdataKey],g);case"text":return k+(g.indentText?te:"")+d(q[g.textKey],g);case"instruction":var P={};return P[q[g.nameKey]]=q[g.attributesKey]?q:q[g.instructionKey],k+(g.indentInstruction?te:"")+m(P,g,O)}},"")}function E(T,g,O){var M;for(M in T)if(T.hasOwnProperty(M))switch(M){case g.parentKey:case g.attributesKey:break;case g.textKey:if(g.indentText||O)return!0;break;case g.cdataKey:if(g.indentCdata||O)return!0;break;case g.instructionKey:if(g.indentInstruction||O)return!0;break;case g.doctypeKey:case g.commentKey:return!0;default:return!0}return!1}function N(T,g,O,M,k){i=T,o=g;var q="elementNameFn"in O?O.elementNameFn(g,T):g;if(typeof T>"u"||T===null||T==="")return"fullTagEmptyElementFn"in O&&O.fullTagEmptyElementFn(g,T)||O.fullTagEmptyElement?"<"+q+"></"+q+">":"<"+q+"/>";var te=[];if(g){if(te.push("<"+q),typeof T!="object")return te.push(">"+d(T,O)+"</"+q+">"),te.join("");T[O.attributesKey]&&te.push(u(T[O.attributesKey],O,M));var P=E(T,O,!0)||T[O.attributesKey]&&T[O.attributesKey]["xml:space"]==="preserve";if(P||("fullTagEmptyElementFn"in O?P=O.fullTagEmptyElementFn(g,T):P=O.fullTagEmptyElement),P)te.push(">");else return te.push("/>"),te.join("")}return te.push(C(T,O,M+1,!1)),i=T,o=g,g&&te.push((k?s(O,M,!1):"")+"</"+q+">"),te.join("")}function C(T,g,O,M){var k,q,te,P=[];for(q in T)if(T.hasOwnProperty(q))for(te=n(T[q])?T[q]:[T[q]],k=0;k<te.length;++k){switch(q){case g.declarationKey:P.push(h(te[k],g,O));break;case g.instructionKey:P.push((g.indentInstruction?s(g,O,M):"")+m(te[k],g,O));break;case g.attributesKey:case g.parentKey:break;case g.textKey:P.push((g.indentText?s(g,O,M):"")+d(te[k],g));break;case g.cdataKey:P.push((g.indentCdata?s(g,O,M):"")+w(te[k],g));break;case g.doctypeKey:P.push(s(g,O,M)+p(te[k],g));break;case g.commentKey:P.push(s(g,O,M)+f(te[k],g));break;default:P.push(s(g,O,M)+N(te[k],q,g,O,E(te[k],g)))}M=M&&!P.length}return P.join("")}t.exports=function(T,g){g=a(g);var O=[];return i=T,o="_root_",g.compact?O.push(C(T,g,0,!0)):(T[g.declarationKey]&&O.push(h(T[g.declarationKey],g,0)),T[g.elementsKey]&&T[g.elementsKey].length&&O.push(S(T[g.elementsKey],g,0,!O.length))),O.join("")}})),ql=de(((e,t)=>{var r=Oa();t.exports=function(n,i){n instanceof Buffer&&(n=n.toString());var o=null;if(typeof n=="string")try{o=JSON.parse(n)}catch{throw new Error("The JSON structure is invalid")}else o=n;return r(o,i)}})),Fr=de(((e,t)=>{t.exports={xml2js:Na(),xml2json:Vl(),js2xml:Oa(),json2xml:ql()}}))(),Kn=e=>{switch(e.type){case void 0:case"element":let t=new Yl(e.name,e.attributes),r=e.elements||[];for(let n of r){let i=Kn(n);i!==void 0&&t.push(i)}return t;case"text":return e.text;default:return}},Xl=class extends me{},Yl=class extends ee{static fromXmlString(e){return Kn((0,Fr.xml2js)(e,{compact:!1}))}constructor(e,t){super(e),t&&this.root.push(new Xl(t))}push(e){this.root.push(e)}},Zl=class extends ee{constructor(e){super(""),Y(this,"_attr",void 0),this._attr=e}prepForXml(e){return{_attr:this._attr}}},Pa=class extends ee{constructor(e,t){super(e),t&&(this.root=t.root)}},Te=e=>{if(isNaN(e))throw new Error(`Invalid value '${e}' specified. Must be an integer.`);return Math.floor(e)},Mr=e=>{let t=Te(e);if(t<0)throw new Error(`Invalid value '${e}' specified. Must be a positive integer.`);return t},Br=(e,t)=>{let r=t*2;if(e.length!==r||isNaN(+`0x${e}`))throw new Error(`Invalid hex value '${e}'. Expected ${r} digit hex value`);return e},Hv=e=>Br(e,4),Jl=e=>Br(e,2),xi=e=>Br(e,1),Ur=e=>{let t=e.slice(-2),r=e.substring(0,e.length-2);return`${Number(r)}${t}`},Ql={in:1440,cm:1440/2.54,mm:1440/25.4,pt:20,pc:240,pi:240},Rt=e=>{if(typeof e=="number")return e;let t=e.slice(-2),r=Number(e.substring(0,e.length-2)),n=Ql[t];if(n===void 0||Number.isNaN(r))throw new Error(`Invalid universal measure '${e}'. Expected a number followed by mm, cm, in, pt, pc or pi.`);return r*n},Da=e=>{let t=Ur(e);if(parseFloat(t)<0)throw new Error(`Invalid value '${t}' specified. Expected a positive number.`);return t},La=e=>e==="auto"?e:Br(e.charAt(0)==="#"?e.substring(1):e,3),Xe=e=>typeof e=="string"?Ur(e):Te(e),eu=e=>typeof e=="string"?Da(e):Mr(e),Wv=e=>typeof e=="string"?Ur(e):Te(e),Se=e=>typeof e=="string"?Da(e):Mr(e),tu=e=>{let t=e.substring(0,e.length-1);return`${Number(t)}%`},Fa=e=>typeof e=="number"?Te(e):e.slice(-1)==="%"?tu(e):Ur(e),ru=Mr,nu=Mr,iu=e=>e.toISOString(),he=class extends ee{constructor(e,t=!0){super(e),t!==!0&&this.root.push(new Ne({val:t}))}},Yr=class extends ee{constructor(e,t){super(e),this.root.push(new Ne({val:eu(t)}))}},Ie=class extends ee{},at=class extends ee{constructor(e,t){super(e),this.root.push(new Ne({val:t}))}},jt=(e,t)=>new ae({name:e,attributes:{value:{key:"w:val",value:t}}}),Zt=class extends ee{constructor(e,t){super(e),this.root.push(new Ne({val:t}))}},jv=class extends ee{constructor(e,t){super(e),this.root.push(new Ne({val:t}))}},wt=class extends ee{constructor(e,t){super(e),this.root.push(t)}},ae=class extends ee{constructor({name:e,attributes:t,children:r}){super(e),t&&this.root.push(new Or(t)),r&&this.root.push(...r)}},Me={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},Ma=e=>new ae({name:"w:jc",attributes:{val:{key:"w:val",value:e}}}),Vn={dark1:"dk1",light1:"lt1",dark2:"dk2",light2:"lt2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hyperlink:"hlink",followedHyperlink:"folHlink"},Ba={dark2:"44546A",light2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hyperlink:"0563C1",followedHyperlink:"954F72"},Ua={dark1:{value:"windowText",lastColor:"000000"},light1:{value:"window",lastColor:"FFFFFF"}},Ha=(e,t)=>{if(t==="auto")throw new Error(`Invalid theme color ${e} 'auto'. Expected 6 digit hex value`);return La(t)},qn=(e={})=>Object.fromEntries(Object.keys(Vn).map(t=>{let r=e[t],n=t==="dark1"||t==="light1"?Ua[t].lastColor:Ba[t];return[t,r===void 0?n:Ha(t,r)]})),au=(e,t)=>new ae({name:"a:srgbClr",attributes:{value:{key:"val",value:Ha(e,t)}}}),su=(e,t)=>{let r=t[e],n=e==="dark1"||e==="light1"?Ua[e]:void 0;return new ae({name:`a:${Vn[e]}`,children:[r===void 0&&n?new ae({name:"a:sysClr",attributes:{value:{key:"val",value:n.value},lastColor:{key:"lastClr",value:n.lastColor}}}):au(e,r??Ba[e])]})},ou=(e,t={})=>new ae({name:"a:clrScheme",attributes:{name:{key:"name",value:e}},children:Object.keys(Vn).map(r=>su(r,t))}),Ti=new Set(["dark1","light1","dark2","light2","accent1","accent2","accent3","accent4","accent5","accent6","hyperlink","followedHyperlink"]),lu=new Map([["dk1","dark1"],["lt1","light1"],["dk2","dark2"],["lt2","light2"],["hlink","hyperlink"],["folHlink","followedHyperlink"],["text1","dark1"],["background1","light1"],["text2","dark2"],["background2","light2"]]),Si=(e,t)=>{if(!(e>=0&&e<=100))throw new Error(`Invalid ${t} ${e}. Expected a number from 0 to 100`);return Math.round(255*(1-e/100))},uu=({theme:e,lighter:t,darker:r})=>{if(!Ti.has(e)){let o=lu.get(e);throw new Error(`Invalid theme color "${e}". ${o?`Did you mean "${o}"?`:`Expected one of ${[...Ti].join(", ")}`}`)}if(t!==void 0&&r!==void 0)throw new Error("Invalid theme color. Expected lighter or darker, not both");let n=t===void 0?void 0:Si(t,"lighter"),i=r===void 0?void 0:Si(r,"darker");return{tint:n===255?void 0:n,shade:i===255?void 0:i}},cu=e=>{let[t,r,n]=[0,2,4].map(u=>parseInt(e.slice(u,u+2),16)/255),i=Math.max(t,r,n),o=Math.min(t,r,n),a=(i+o)/2,s=i-o;return s===0?{hue:0,saturation:0,lightness:a}:{hue:(i===t?((r-n)/s+6)%6:i===r?(n-t)/s+2:(t-r)/s+4)*60,saturation:s/(1-Math.abs(2*a-1)),lightness:a}},hu=({hue:e,saturation:t,lightness:r})=>{let n=(1-Math.abs(2*r-1))*t,i=n*(1-Math.abs(e/60%2-1)),[o,a,s]=e<60?[n,i,0]:e<120?[i,n,0]:e<180?[0,n,i]:e<240?[0,i,n]:e<300?[i,0,n]:[n,0,i],u=r-n/2;return[o,a,s].map(h=>Math.floor((h+u)*255+1e-9).toString(16).padStart(2,"0")).join("").toUpperCase()},du=(e,{tint:t,shade:r})=>{if(t===void 0&&r===void 0)return e;let n=cu(e),i=t===void 0?n.lightness*r/255:n.lightness*t/255+(1-t/255);return hu(ie(ie({},n),{},{lightness:i}))},Ai=e=>e===void 0?void 0:e.toString(16).padStart(2,"0").toUpperCase(),fu=e=>typeof e=="string"?{type:"hex",value:La(e)}:{type:"theme",color:e,change:uu(e)},pu=(e,t)=>e.type==="hex"?{color:e.value}:{color:du(t[e.color.theme],e.change),theme:e.color.theme,tint:Ai(e.change.tint),shade:Ai(e.change.shade)},mu=qn(),Xn=class extends Qt{constructor(e){super("_attr"),Y(this,"attributes",void 0),this.attributes=e.map(t=>"keys"in t?{keys:t.keys,color:t.color===void 0?void 0:fu(t.color)}:t)}prepForXml(e){var t,r;let n=(t=(r=e.file)===null||r===void 0||(r=r.Theme)===null||r===void 0?void 0:r.Colors)!==null&&t!==void 0?t:mu,i=this.attributes.flatMap(o=>{if(!("keys"in o))return[[o.key,o.value]];if(o.color===void 0)return[];let{keys:a}=o,s=pu(o.color,n);return[[a.color,s.color],[a.theme,s.theme],[a.tint,s.tint],[a.shade,s.shade]]});return{_attr:Object.fromEntries(i.filter(([,o])=>o!==void 0))}}},vu=class extends ee{constructor(e,t){super(e),this.root.push(new Xn(t))}},Yn=(e,t)=>new vu(e,t),ar={color:"w:color",theme:"w:themeColor",tint:"w:themeTint",shade:"w:themeShade"},be=(e,{color:t,size:r,space:n,style:i})=>Yn(e,[{key:"w:val",value:i},{keys:ar,color:t},{key:"w:sz",value:r===void 0?void 0:ru(r)},{key:"w:space",value:n===void 0?void 0:nu(n)}]),Zn={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"},wu=class extends ht{constructor(e){super("w:pBdr"),e.top&&this.root.push(be("w:top",e.top)),e.left&&this.root.push(be("w:left",e.left)),e.bottom&&this.root.push(be("w:bottom",e.bottom)),e.right&&this.root.push(be("w:right",e.right)),e.between&&this.root.push(be("w:between",e.between))}},gu=class extends ee{constructor(){super("w:pBdr");let e=be("w:bottom",{color:"auto",space:1,style:Zn.SINGLE,size:6});this.root.push(e)}},yu=({start:e,end:t,left:r,right:n,hanging:i,firstLine:o,firstLineChars:a})=>new ae({name:"w:ind",attributes:{start:{key:"w:start",value:e===void 0?void 0:Xe(e)},end:{key:"w:end",value:t===void 0?void 0:Xe(t)},left:{key:"w:left",value:r===void 0?void 0:Xe(r)},right:{key:"w:right",value:n===void 0?void 0:Xe(n)},hanging:{key:"w:hanging",value:i===void 0?void 0:Se(i)},firstLine:{key:"w:firstLine",value:o===void 0?void 0:Se(o)},firstLineChars:{key:"w:firstLineChars",value:a===void 0?void 0:Te(a)}}}),Wa=()=>new ae({name:"w:br"}),Hr={BEGIN:"begin",END:"end",SEPARATE:"separate"},Jn=(e,t)=>new ae({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:e},dirty:{key:"w:dirty",value:t}}}),ut=e=>Jn(Hr.BEGIN,e),ja=new WeakSet,bu=class extends ae{constructor(){super({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:Hr.BEGIN},dirty:{key:"w:dirty",value:!0}}})}prepForXml(e){let t=super.prepForXml(e);return ja.add(t),t}},Qn=()=>new bu,_u=e=>typeof e=="object"&&e!==null&&ja.has(e),We=e=>Jn(Hr.SEPARATE,e),je=e=>Jn(Hr.END,e),Gv={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},$v={BOTTOM:"bottom",CENTER:"center",INSIDE:"inside",OUTSIDE:"outside",TOP:"top"},zv={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH_DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH_2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULL_STOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PAREN:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_TEN_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL_2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW_1:"hebrew1",HEBREW_2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"},De={DEFAULT:"default",PRESERVE:"preserve"},Le=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{space:"xml:space"})}},Eu=class extends ee{constructor(){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("PAGE")}},xu=class extends ee{constructor(){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("NUMPAGES")}},Tu=class extends ee{constructor(){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("SECTIONPAGES")}},Su=class extends ee{constructor(){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("SECTION")}},Wr=({fill:e,color:t,type:r})=>Yn("w:shd",[{keys:{color:"w:fill",theme:"w:themeFill",tint:"w:themeFillTint",shade:"w:themeFillShade"},color:e},{keys:ar,color:t},{key:"w:val",value:r??Au.CLEAR}]),Au={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"},Pe=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}},ku=class extends ee{constructor(e){super("w:del"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},Iu=class extends ee{constructor(e){super("w:ins"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},Ga={DOT:"dot"},$a=(e=Ga.DOT)=>new ae({name:"w:em",attributes:{val:{key:"w:val",value:e}}}),Kv=()=>$a(Ga.DOT),Ru=class extends ee{constructor(e){super("w:spacing"),this.root.push(new Ne({val:Xe(e)}))}},Cu=class extends ee{constructor(e){super("w:color"),this.root.push(new Xn([{keys:ie(ie({},ar),{},{color:"w:val"}),color:e}]))}},Nu=class extends ee{constructor(e){super("w:highlight"),this.root.push(new Ne({val:e}))}},Ou=e=>new ae({name:"w:lang",attributes:{value:{key:"w:val",value:e.value},eastAsia:{key:"w:eastAsia",value:e.eastAsia},bidirectional:{key:"w:bidi",value:e.bidirectional}}}),Zr=(e,t)=>{if(typeof e=="string"){let n=e;return new ae({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:n},cs:{key:"w:cs",value:n},eastAsia:{key:"w:eastAsia",value:n},hAnsi:{key:"w:hAnsi",value:n},hint:{key:"w:hint",value:t}}})}if("theme"in e){let n=e.theme==="headings"?"major":"minor";return new ae({name:"w:rFonts",attributes:{ascii:{key:"w:asciiTheme",value:`${n}HAnsi`},eastAsia:{key:"w:eastAsiaTheme",value:`${n}EastAsia`},hAnsi:{key:"w:hAnsiTheme",value:`${n}HAnsi`},cs:{key:"w:cstheme",value:`${n}Bidi`}}})}let r=e;return new ae({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:r.ascii},cs:{key:"w:cs",value:r.cs},eastAsia:{key:"w:eastAsia",value:r.eastAsia},hAnsi:{key:"w:hAnsi",value:r.hAnsi},hint:{key:"w:hint",value:r.hint}}})},za=e=>new ae({name:"w:vertAlign",attributes:{val:{key:"w:val",value:e}}}),Pu=()=>za("superscript"),Du=()=>za("subscript"),Ka={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"},Lu=(e=Ka.SINGLE,t)=>Yn("w:u",[{key:"w:val",value:e},{keys:ar,color:t}]),Vv={BLINK_BACKGROUND:"blinkBackground",LIGHTS:"lights",ANTS_BLACK:"antsBlack",ANTS_RED:"antsRed",SHIMMER:"shimmer",SPARKLE:"sparkle",NONE:"none"},qv={BLACK:"black",BLUE:"blue",CYAN:"cyan",DARK_BLUE:"darkBlue",DARK_CYAN:"darkCyan",DARK_GRAY:"darkGray",DARK_GREEN:"darkGreen",DARK_MAGENTA:"darkMagenta",DARK_RED:"darkRed",DARK_YELLOW:"darkYellow",GREEN:"green",LIGHT_GRAY:"lightGray",MAGENTA:"magenta",NONE:"none",RED:"red",WHITE:"white",YELLOW:"yellow"},st=class extends ht{constructor(e){if(super("w:rPr"),!e)return;if(e.style&&this.push(new at("w:rStyle",e.style)),e.font&&(typeof e.font=="string"?this.push(Zr(e.font)):"name"in e.font?this.push(Zr(e.font.name,e.font.hint)):this.push(Zr(e.font))),e.bold!==void 0&&this.push(new he("w:b",e.bold)),e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript){var t;this.push(new he("w:bCs",(t=e.boldComplexScript)!==null&&t!==void 0?t:e.bold))}if(e.italics!==void 0&&this.push(new he("w:i",e.italics)),e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript){var r;this.push(new he("w:iCs",(r=e.italicsComplexScript)!==null&&r!==void 0?r:e.italics))}e.smallCaps!==void 0?this.push(new he("w:smallCaps",e.smallCaps)):e.allCaps!==void 0&&this.push(new he("w:caps",e.allCaps)),e.strike!==void 0&&this.push(new he("w:strike",e.strike)),e.doubleStrike!==void 0&&this.push(new he("w:dstrike",e.doubleStrike)),e.emboss!==void 0&&this.push(new he("w:emboss",e.emboss)),e.imprint!==void 0&&this.push(new he("w:imprint",e.imprint)),e.noProof!==void 0&&this.push(new he("w:noProof",e.noProof)),e.snapToGrid!==void 0&&this.push(new he("w:snapToGrid",e.snapToGrid)),e.vanish&&this.push(new he("w:vanish",e.vanish)),e.color&&this.push(new Cu(e.color)),e.characterSpacing&&this.push(new Ru(e.characterSpacing)),e.scale!==void 0&&this.push(new Zt("w:w",e.scale)),e.kern&&this.push(new Yr("w:kern",e.kern)),e.position&&this.push(new at("w:position",e.position)),e.size!==void 0&&this.push(new Yr("w:sz",e.size));let n=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;n&&this.push(new Yr("w:szCs",n)),e.highlight&&this.push(new Nu(e.highlight)),e.underline&&this.push(Lu(e.underline.type,e.underline.color)),e.effect&&this.push(new at("w:effect",e.effect)),e.border&&this.push(be("w:bdr",e.border)),e.shading&&this.push(Wr(e.shading)),e.subScript&&this.push(Du()),e.superScript&&this.push(Pu()),e.rightToLeft!==void 0&&this.push(new he("w:rtl",e.rightToLeft)),e.emphasisMark&&this.push($a(e.emphasisMark.type)),e.language&&this.push(Ou(e.language)),e.specVanish&&this.push(new he("w:specVanish",e.vanish)),e.math&&this.push(new he("w:oMath",e.math)),e.revision&&this.push(new Mu(e.revision))}push(e){this.root.push(e)}},Fu=class extends st{constructor(e){super(e),e?.insertion&&this.push(new Iu(e.insertion)),e?.deletion&&this.push(new ku(e.deletion))}},Mu=class extends ee{constructor(e){super("w:rPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.addChildElement(new st(e))}},er=class extends ee{constructor(e){if(super("w:t"),typeof e=="string")this.root.push(new Le({space:De.PRESERVE})),this.root.push(e);else{var t;this.root.push(new Le({space:(t=e.space)!==null&&t!==void 0?t:De.DEFAULT})),this.root.push(e.text)}}},yt={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"},xe=class kn extends ee{constructor(t){if(super("w:r"),Y(this,"properties",void 0),Y(this,"following",[]),this.properties=new st(t),this.root.push(this.properties),t.break)for(let r=0;r<t.break;r++)this.root.push(Wa());if(t.children)for(let[r,n]of t.children.entries()){if(n instanceof kn){let i=t.children.slice(r+1);this.following=[n,...i.length>0?[new kn(ie(ie({},t),{},{break:void 0,children:i}))]:[]];break}if(typeof n=="string"){switch(n){case yt.CURRENT:this.root.push(ut()),this.root.push(new Eu),this.root.push(We()),this.root.push(je());break;case yt.TOTAL_PAGES:this.root.push(ut()),this.root.push(new xu),this.root.push(We()),this.root.push(je());break;case yt.TOTAL_PAGES_IN_SECTION:this.root.push(ut()),this.root.push(new Tu),this.root.push(We()),this.root.push(je());break;case yt.CURRENT_SECTION:this.root.push(ut()),this.root.push(new Su),this.root.push(We()),this.root.push(je());break;default:this.root.push(new er(n))}continue}this.root.push(n)}else t.text!==void 0&&this.root.push(new er(t.text))}get writtenAs(){return this.following.length>0?[this,...this.following.flatMap(t=>{var r;return(r=t.writtenAs)!==null&&r!==void 0?r:t})]:void 0}},Pt=class extends xe{constructor(e){super(typeof e=="string"?{text:e}:e)}},Bu=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{char:"w:char",symbolfont:"w:font"})}},ki=class extends ee{constructor(e="",t="Wingdings"){super("w:sym"),this.root.push(new Bu({char:e,symbolfont:t}))}},Uu=class extends xe{constructor(e){super(typeof e=="string"?{}:e),this.root.push(typeof e=="string"?new ki(e):new ki(e.char,e.symbolfont))}},sr=de(((e,t)=>{t.exports=r;function r(n,i){if(!n)throw new Error(i||"Assertion failed")}r.equal=function(i,o,a){if(i!=o)throw new Error(a||"Assertion failed: "+i+" != "+o)}})),Qe=de((e=>{var t=sr();e.inherits=dt();function r(P,G){return(P.charCodeAt(G)&64512)!==55296||G<0||G+1>=P.length?!1:(P.charCodeAt(G+1)&64512)===56320}function n(P,G){if(Array.isArray(P))return P.slice();if(!P)return[];var I=[];if(typeof P=="string")if(G){if(G==="hex")for(P=P.replace(/[^a-z0-9]+/gi,""),P.length%2!==0&&(P="0"+P),K=0;K<P.length;K+=2)I.push(parseInt(P[K]+P[K+1],16))}else for(var $=0,K=0;K<P.length;K++){var j=P.charCodeAt(K);j<128?I[$++]=j:j<2048?(I[$++]=j>>6|192,I[$++]=j&63|128):r(P,K)?(j=65536+((j&1023)<<10)+(P.charCodeAt(++K)&1023),I[$++]=j>>18|240,I[$++]=j>>12&63|128,I[$++]=j>>6&63|128,I[$++]=j&63|128):(I[$++]=j>>12|224,I[$++]=j>>6&63|128,I[$++]=j&63|128)}else for(K=0;K<P.length;K++)I[K]=P[K]|0;return I}e.toArray=n;function i(P){for(var G="",I=0;I<P.length;I++)G+=s(P[I].toString(16));return G}e.toHex=i;function o(P){return(P>>>24|P>>>8&65280|P<<8&16711680|(P&255)<<24)>>>0}e.htonl=o;function a(P,G){for(var I="",$=0;$<P.length;$++){var K=P[$];G==="little"&&(K=o(K)),I+=u(K.toString(16))}return I}e.toHex32=a;function s(P){return P.length===1?"0"+P:P}e.zero2=s;function u(P){return P.length===7?"0"+P:P.length===6?"00"+P:P.length===5?"000"+P:P.length===4?"0000"+P:P.length===3?"00000"+P:P.length===2?"000000"+P:P.length===1?"0000000"+P:P}e.zero8=u;function h(P,G,I,$){var K=I-G;t(K%4===0);for(var j=new Array(K/4),se=0,Z=G;se<j.length;se++,Z+=4){var re;$==="big"?re=P[Z]<<24|P[Z+1]<<16|P[Z+2]<<8|P[Z+3]:re=P[Z+3]<<24|P[Z+2]<<16|P[Z+1]<<8|P[Z],j[se]=re>>>0}return j}e.join32=h;function m(P,G){for(var I=new Array(P.length*4),$=0,K=0;$<P.length;$++,K+=4){var j=P[$];G==="big"?(I[K]=j>>>24,I[K+1]=j>>>16&255,I[K+2]=j>>>8&255,I[K+3]=j&255):(I[K+3]=j>>>24,I[K+2]=j>>>16&255,I[K+1]=j>>>8&255,I[K]=j&255)}return I}e.split32=m;function f(P,G){return P>>>G|P<<32-G}e.rotr32=f;function w(P,G){return P<<G|P>>>32-G}e.rotl32=w;function p(P,G){return P+G>>>0}e.sum32=p;function d(P,G,I){return P+G+I>>>0}e.sum32_3=d;function v(P,G,I,$){return P+G+I+$>>>0}e.sum32_4=v;function _(P,G,I,$,K){return P+G+I+$+K>>>0}e.sum32_5=_;function S(P,G,I,$){var K=P[G],j=$+P[G+1]>>>0;P[G]=(j<$?1:0)+I+K>>>0,P[G+1]=j}e.sum64=S;function E(P,G,I,$){return(G+$>>>0<G?1:0)+P+I>>>0}e.sum64_hi=E;function N(P,G,I,$){return G+$>>>0}e.sum64_lo=N;function C(P,G,I,$,K,j,se,Z){var re=0,z=G;return z=z+$>>>0,re+=z<G?1:0,z=z+j>>>0,re+=z<j?1:0,z=z+Z>>>0,re+=z<Z?1:0,P+I+K+se+re>>>0}e.sum64_4_hi=C;function T(P,G,I,$,K,j,se,Z){return G+$+j+Z>>>0}e.sum64_4_lo=T;function g(P,G,I,$,K,j,se,Z,re,z){var D=0,J=G;return J=J+$>>>0,D+=J<G?1:0,J=J+j>>>0,D+=J<j?1:0,J=J+Z>>>0,D+=J<Z?1:0,J=J+z>>>0,D+=J<z?1:0,P+I+K+se+re+D>>>0}e.sum64_5_hi=g;function O(P,G,I,$,K,j,se,Z,re,z){return G+$+j+Z+z>>>0}e.sum64_5_lo=O;function M(P,G,I){return(G<<32-I|P>>>I)>>>0}e.rotr64_hi=M;function k(P,G,I){return(P<<32-I|G>>>I)>>>0}e.rotr64_lo=k;function q(P,G,I){return P>>>I}e.shr64_hi=q;function te(P,G,I){return(P<<32-I|G>>>I)>>>0}e.shr64_lo=te})),or=de((e=>{var t=Qe(),r=sr();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=n,n.prototype.update=function(o,a){if(o=t.toArray(o,a),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var s=o.length%this._delta8;this.pending=o.slice(o.length-s,o.length),this.pending.length===0&&(this.pending=null),o=t.join32(o,0,o.length-s,this.endian);for(var u=0;u<o.length;u+=this._delta32)this._update(o,u,u+this._delta32)}return this},n.prototype.digest=function(o){return this.update(this._pad()),r(this.pending===null),this._digest(o)},n.prototype._pad=function(){var o=this.pendingTotal,a=this._delta8,s=a-(o+this.padLength)%a,u=new Array(s+this.padLength);u[0]=128;for(var h=1;h<s;h++)u[h]=0;if(o<<=3,this.endian==="big"){for(var m=8;m<this.padLength;m++)u[h++]=0;u[h++]=0,u[h++]=0,u[h++]=0,u[h++]=0,u[h++]=o>>>24&255,u[h++]=o>>>16&255,u[h++]=o>>>8&255,u[h++]=o&255}else for(u[h++]=o&255,u[h++]=o>>>8&255,u[h++]=o>>>16&255,u[h++]=o>>>24&255,u[h++]=0,u[h++]=0,u[h++]=0,u[h++]=0,m=8;m<this.padLength;m++)u[h++]=0;return u}})),Va=de((e=>{var t=Qe().rotr32;function r(m,f,w,p){if(m===0)return n(f,w,p);if(m===1||m===3)return o(f,w,p);if(m===2)return i(f,w,p)}e.ft_1=r;function n(m,f,w){return m&f^~m&w}e.ch32=n;function i(m,f,w){return m&f^m&w^f&w}e.maj32=i;function o(m,f,w){return m^f^w}e.p32=o;function a(m){return t(m,2)^t(m,13)^t(m,22)}e.s0_256=a;function s(m){return t(m,6)^t(m,11)^t(m,25)}e.s1_256=s;function u(m){return t(m,7)^t(m,18)^m>>>3}e.g0_256=u;function h(m){return t(m,17)^t(m,19)^m>>>10}e.g1_256=h})),Hu=de(((e,t)=>{var r=Qe(),n=or(),i=Va(),o=r.rotl32,a=r.sum32,s=r.sum32_5,u=i.ft_1,h=n.BlockHash,m=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,h),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(p,d){for(var v=this.W,_=0;_<16;_++)v[_]=p[d+_];for(;_<v.length;_++)v[_]=o(v[_-3]^v[_-8]^v[_-14]^v[_-16],1);var S=this.h[0],E=this.h[1],N=this.h[2],C=this.h[3],T=this.h[4];for(_=0;_<v.length;_++){var g=~~(_/20),O=s(o(S,5),u(g,E,N,C),T,v[_],m[g]);T=C,C=N,N=o(E,30),E=S,S=O}this.h[0]=a(this.h[0],S),this.h[1]=a(this.h[1],E),this.h[2]=a(this.h[2],N),this.h[3]=a(this.h[3],C),this.h[4]=a(this.h[4],T)},f.prototype._digest=function(p){return p==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")}})),qa=de(((e,t)=>{var r=Qe(),n=or(),i=Va(),o=sr(),a=r.sum32,s=r.sum32_4,u=r.sum32_5,h=i.ch32,m=i.maj32,f=i.s0_256,w=i.s1_256,p=i.g0_256,d=i.g1_256,v=n.BlockHash,_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function S(){if(!(this instanceof S))return new S;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}r.inherits(S,v),t.exports=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(N,C){for(var T=this.W,g=0;g<16;g++)T[g]=N[C+g];for(;g<T.length;g++)T[g]=s(d(T[g-2]),T[g-7],p(T[g-15]),T[g-16]);var O=this.h[0],M=this.h[1],k=this.h[2],q=this.h[3],te=this.h[4],P=this.h[5],G=this.h[6],I=this.h[7];for(o(this.k.length===T.length),g=0;g<T.length;g++){var $=u(I,w(te),h(te,P,G),this.k[g],T[g]),K=a(f(O),m(O,M,k));I=G,G=P,P=te,te=a(q,$),q=k,k=M,M=O,O=a($,K)}this.h[0]=a(this.h[0],O),this.h[1]=a(this.h[1],M),this.h[2]=a(this.h[2],k),this.h[3]=a(this.h[3],q),this.h[4]=a(this.h[4],te),this.h[5]=a(this.h[5],P),this.h[6]=a(this.h[6],G),this.h[7]=a(this.h[7],I)},S.prototype._digest=function(N){return N==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")}})),Wu=de(((e,t)=>{var r=Qe(),n=qa();function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,n),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(a){return a==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}})),Xa=de(((e,t)=>{var r=Qe(),n=or(),i=sr(),o=r.rotr64_hi,a=r.rotr64_lo,s=r.shr64_hi,u=r.shr64_lo,h=r.sum64,m=r.sum64_hi,f=r.sum64_lo,w=r.sum64_4_hi,p=r.sum64_4_lo,d=r.sum64_5_hi,v=r.sum64_5_lo,_=n.BlockHash,S=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function E(){if(!(this instanceof E))return new E;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=S,this.W=new Array(160)}r.inherits(E,_),t.exports=E,E.blockSize=1024,E.outSize=512,E.hmacStrength=192,E.padLength=128,E.prototype._prepareBlock=function(K,j){for(var se=this.W,Z=0;Z<32;Z++)se[Z]=K[j+Z];for(;Z<se.length;Z+=2){var re=G(se[Z-4],se[Z-3]),z=I(se[Z-4],se[Z-3]),D=se[Z-14],J=se[Z-13],Q=te(se[Z-30],se[Z-29]),ne=P(se[Z-30],se[Z-29]),pe=se[Z-32],A=se[Z-31];se[Z]=w(re,z,D,J,Q,ne,pe,A),se[Z+1]=p(re,z,D,J,Q,ne,pe,A)}},E.prototype._update=function(K,j){this._prepareBlock(K,j);var se=this.W,Z=this.h[0],re=this.h[1],z=this.h[2],D=this.h[3],J=this.h[4],Q=this.h[5],ne=this.h[6],pe=this.h[7],A=this.h[8],b=this.h[9],H=this.h[10],U=this.h[11],oe=this.h[12],L=this.h[13],F=this.h[14],y=this.h[15];i(this.k.length===se.length);for(var X=0;X<se.length;X+=2){var R=F,l=y,c=k(A,b),x=q(A,b),B=N(A,b,H,U,oe,L),V=C(A,b,H,U,oe,L),W=this.k[X],le=this.k[X+1],ce=se[X],ue=se[X+1],fe=d(R,l,c,x,B,V,W,le,ce,ue),ve=v(R,l,c,x,B,V,W,le,ce,ue);R=O(Z,re),l=M(Z,re),c=T(Z,re,z,D,J,Q),x=g(Z,re,z,D,J,Q);var we=m(R,l,c,x),Ae=f(R,l,c,x);F=oe,y=L,oe=H,L=U,H=A,U=b,A=m(ne,pe,fe,ve),b=f(pe,pe,fe,ve),ne=J,pe=Q,J=z,Q=D,z=Z,D=re,Z=m(fe,ve,we,Ae),re=f(fe,ve,we,Ae)}h(this.h,0,Z,re),h(this.h,2,z,D),h(this.h,4,J,Q),h(this.h,6,ne,pe),h(this.h,8,A,b),h(this.h,10,H,U),h(this.h,12,oe,L),h(this.h,14,F,y)},E.prototype._digest=function(K){return K==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function N($,K,j,se,Z){var re=$&j^~$&Z;return re<0&&(re+=4294967296),re}function C($,K,j,se,Z,re){var z=K&se^~K&re;return z<0&&(z+=4294967296),z}function T($,K,j,se,Z){var re=$&j^$&Z^j&Z;return re<0&&(re+=4294967296),re}function g($,K,j,se,Z,re){var z=K&se^K&re^se&re;return z<0&&(z+=4294967296),z}function O($,K){var j=o($,K,28),se=o(K,$,2),Z=o(K,$,7),re=j^se^Z;return re<0&&(re+=4294967296),re}function M($,K){var j=a($,K,28),se=a(K,$,2),Z=a(K,$,7),re=j^se^Z;return re<0&&(re+=4294967296),re}function k($,K){var j=o($,K,14),se=o($,K,18),Z=o(K,$,9),re=j^se^Z;return re<0&&(re+=4294967296),re}function q($,K){var j=a($,K,14),se=a($,K,18),Z=a(K,$,9),re=j^se^Z;return re<0&&(re+=4294967296),re}function te($,K){var j=o($,K,1),se=o($,K,8),Z=s($,K,7),re=j^se^Z;return re<0&&(re+=4294967296),re}function P($,K){var j=a($,K,1),se=a($,K,8),Z=u($,K,7),re=j^se^Z;return re<0&&(re+=4294967296),re}function G($,K){var j=o($,K,19),se=o(K,$,29),Z=s($,K,6),re=j^se^Z;return re<0&&(re+=4294967296),re}function I($,K){var j=a($,K,19),se=a(K,$,29),Z=u($,K,6),re=j^se^Z;return re<0&&(re+=4294967296),re}})),ju=de(((e,t)=>{var r=Qe(),n=Xa();function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,n),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(a){return a==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}})),Gu=de((e=>{e.sha1=Hu(),e.sha224=Wu(),e.sha256=qa(),e.sha384=ju(),e.sha512=Xa()})),$u=de((e=>{var t=Qe(),r=or(),n=t.rotl32,i=t.sum32,o=t.sum32_3,a=t.sum32_4,s=r.BlockHash;function u(){if(!(this instanceof u))return new u;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}t.inherits(u,s),e.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(S,E){for(var N=this.h[0],C=this.h[1],T=this.h[2],g=this.h[3],O=this.h[4],M=N,k=C,q=T,te=g,P=O,G=0;G<80;G++){var I=i(n(a(N,h(G,C,T,g),S[w[G]+E],m(G)),d[G]),O);N=O,O=g,g=n(T,10),T=C,C=I,I=i(n(a(M,h(79-G,k,q,te),S[p[G]+E],f(G)),v[G]),P),M=P,P=te,te=n(q,10),q=k,k=I}I=o(this.h[1],T,te),this.h[1]=o(this.h[2],g,P),this.h[2]=o(this.h[3],O,M),this.h[3]=o(this.h[4],N,k),this.h[4]=o(this.h[0],C,q),this.h[0]=I},u.prototype._digest=function(S){return S==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")};function h(_,S,E,N){return _<=15?S^E^N:_<=31?S&E|~S&N:_<=47?(S|~E)^N:_<=63?S&N|E&~N:S^(E|~N)}function m(_){return _<=15?0:_<=31?1518500249:_<=47?1859775393:_<=63?2400959708:2840853838}function f(_){return _<=15?1352829926:_<=31?1548603684:_<=47?1836072691:_<=63?2053994217:0}var w=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]})),zu=de(((e,t)=>{var r=Qe(),n=sr();function i(o,a,s){if(!(this instanceof i))return new i(o,a,s);this.Hash=o,this.blockSize=o.blockSize/8,this.outSize=o.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(a,s))}t.exports=i,i.prototype._init=function(a){a.length>this.blockSize&&(a=new this.Hash().update(a).digest()),n(a.length<=this.blockSize);for(var s=a.length;s<this.blockSize;s++)a.push(0);for(s=0;s<a.length;s++)a[s]^=54;for(this.inner=new this.Hash().update(a),s=0;s<a.length;s++)a[s]^=106;this.outer=new this.Hash().update(a)},i.prototype.update=function(a,s){return this.inner.update(a,s),this},i.prototype.digest=function(a){return this.outer.update(this.inner.digest()),this.outer.digest(a)}})),Ku=Fn(de((e=>{var t=e;t.utils=Qe(),t.common=or(),t.sha=Gu(),t.ripemd=$u(),t.hmac=zu(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}))(),1),Vu="57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9",qu=(e,t=21)=>(r=t)=>{let n="",i=r|0;for(;i-- >0;)n+=e[Math.random()*e.length|0];return n},Xu=(e=21)=>{let t="",r=e|0;for(;r-- >0;)t+=Vu[Math.random()*64|0];return t},Xv=e=>Math.floor(e/25.4*72*20),He=e=>Math.floor(e*72*20),jr=(e=0)=>{let t=e;return()=>++t},Yu=()=>jr(),Zu=()=>jr(1),Ju=()=>jr(),Qu=Ju(),ec=()=>jr(),Ya=ec(),Tt=()=>Xu().toLowerCase(),Ii=e=>Ku.default.sha1().update(e instanceof ArrayBuffer?new Uint8Array(e):e).digest("hex"),Gt=e=>qu("1234567890abcdef",e)(),tc=()=>`${Gt(8)}-${Gt(4)}-${Gt(4)}-${Gt(4)}-${Gt(12)}`,bt=e=>new Uint8Array(new TextEncoder().encode(e)),rc={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},nc={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"},ic=()=>new ae({name:"wp:simplePos",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),Za=e=>new ae({name:"wp:align",children:[e]}),Ja=e=>new ae({name:"wp:posOffset",children:[e.toString()]}),ac=({relative:e,align:t,offset:r})=>new ae({name:"wp:positionH",attributes:{relativeFrom:{key:"relativeFrom",value:e??rc.PAGE}},children:[(()=>{if(t)return Za(t);if(r!==void 0)return Ja(r);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]}),sc=({relative:e,align:t,offset:r})=>new ae({name:"wp:positionV",attributes:{relativeFrom:{key:"relativeFrom",value:e??nc.PAGE}},children:[(()=>{if(t)return Za(t);if(r!==void 0)return Ja(r);throw new Error("There is no configuration provided for floating position (Align or offset)")})()]}),Yv=(function(e){return e.CENTER="ctr",e.TOP="t",e.BOTTOM="b",e})({}),oc=(e={})=>{var t,r,n,i;return new ae({name:"wps:bodyPr",attributes:{lIns:{key:"lIns",value:(t=e.margins)===null||t===void 0?void 0:t.left},rIns:{key:"rIns",value:(r=e.margins)===null||r===void 0?void 0:r.right},tIns:{key:"tIns",value:(n=e.margins)===null||n===void 0?void 0:n.top},bIns:{key:"bIns",value:(i=e.margins)===null||i===void 0?void 0:i.bottom},anchor:{key:"anchor",value:e.verticalAnchor}},children:[...e.noAutoFit?[new he("a:noAutofit",e.noAutoFit)]:[]]})},lc=(e={txBox:"1"})=>new ae({name:"wps:cNvSpPr",attributes:{txBox:{key:"txBox",value:e.txBox}}}),uc=e=>new ae({name:"w:txbxContent",children:[...e]}),cc=e=>new ae({name:"wps:txbx",children:[uc(e)]}),hc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{cx:"cx",cy:"cy"})}},Qa=class extends ee{constructor(e,t){super("a:ext"),Y(this,"attributes",void 0),this.attributes=new hc({cx:e,cy:t}),this.root.push(this.attributes)}},dc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{x:"x",y:"y"})}},es=class extends ee{constructor(e,t){super("a:off"),this.root.push(new dc({x:e??0,y:t??0}))}},fc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}},pc=class extends ee{constructor(e){var t,r,n,i;super("a:xfrm"),Y(this,"extents",void 0),Y(this,"offset",void 0),this.root.push(new fc({flipVertical:(t=e.flip)===null||t===void 0?void 0:t.vertical,flipHorizontal:(r=e.flip)===null||r===void 0?void 0:r.horizontal,rotation:e.rotation})),this.offset=new es((n=e.offset)===null||n===void 0||(n=n.emus)===null||n===void 0?void 0:n.x,(i=e.offset)===null||i===void 0||(i=i.emus)===null||i===void 0?void 0:i.y),this.extents=new Qa(e.emus.x,e.emus.y),this.root.push(this.offset),this.root.push(this.extents)}},ts=()=>new ae({name:"a:noFill"}),mc=e=>new ae({name:"a:srgbClr",attributes:{value:{key:"val",value:e.value}}}),Zv={BG1:"bg1",TX1:"tx1",BG2:"bg2",TX2:"tx2",ACCENT1:"accent1",ACCENT2:"accent2",ACCENT3:"accent3",ACCENT4:"accent4",ACCENT5:"accent5",ACCENT6:"accent6",HLINK:"hlink",FOLHLINK:"folHlink",DK1:"dk1",LT1:"lt1",DK2:"dk2",LT2:"lt2",PHCLR:"phClr"},vc=e=>new ae({name:"a:schemeClr",attributes:{value:{key:"val",value:e.value}}}),In=e=>new ae({name:"a:solidFill",children:[e.type==="rgb"?mc(e):vc(e)]}),wc={ROUND:"rnd",SQUARE:"sq",FLAT:"flat"},gc={SINGLE:"sng",DOUBLE:"dbl",THICK_THIN:"thickThin",THIN_THICK:"thinThick",TRI:"tri"},yc={CENTER:"ctr",INSET:"in"},bc=e=>new ae({name:"a:ln",attributes:{width:{key:"w",value:e.width},cap:{key:"cap",value:e.cap===void 0?void 0:wc[e.cap]},compoundLine:{key:"cmpd",value:e.compoundLine===void 0?void 0:gc[e.compoundLine]},align:{key:"algn",value:e.align===void 0?void 0:yc[e.align]}},children:[e.type==="noFill"?ts():e.solidFillType==="rgb"?In({type:"rgb",value:e.value}):In({type:"scheme",value:e.value})]}),_c=class extends ee{constructor(){super("a:avLst")}},Ec=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{prst:"prst"})}},xc=class extends ee{constructor(){super("a:prstGeom"),this.root.push(new Ec({prst:"rect"})),this.root.push(new _c)}},Tc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{bwMode:"bwMode"})}},rs=class extends ee{constructor({element:e,outline:t,solidFill:r,transform:n}){super(`${e}:spPr`),Y(this,"form",void 0),this.root.push(new Tc({bwMode:"auto"})),this.form=new pc(n),this.root.push(this.form),this.root.push(new xc),r?this.root.push(In(r)):t&&this.root.push(ts()),t&&this.root.push(bc(t))}},Ri=e=>new ae({name:"wps:wsp",children:[lc(e.nonVisualProperties),new rs({element:"wps",transform:e.transformation,outline:e.outline,solidFill:e.solidFill}),cc(e.children),oc(e.bodyProperties)]}),vr=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{uri:"uri"})}},Sc=e=>new ae({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${e.fileName}}`}}}),Ac=e=>new ae({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[Sc(e)]}),kc=e=>new ae({name:"a:extLst",children:[Ac(e)]}),Ic=e=>new ae({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${e.type==="svg"?e.fallback.fileName:e.fileName}}`},cstate:{key:"cstate",value:"none"}},children:e.type==="svg"?[kc(e)]:[]}),Rc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{left:"l",top:"t",right:"r",bottom:"b"})}},wr=(e,t)=>{if(e!==void 0){if(!(e>=0&&e<=100))throw new Error(`Invalid crop ${t} ${e}. Expected a number from 0 to 100`);return Math.round(e*1e3)}},Cc=class extends ee{constructor(e){super("a:srcRect"),e&&this.root.push(new Rc({left:wr(e.left,"left"),top:wr(e.top,"top"),right:wr(e.right,"right"),bottom:wr(e.bottom,"bottom")}))}},Nc=class extends ee{constructor(){super("a:fillRect")}},Oc=class extends ee{constructor(){super("a:stretch"),this.root.push(new Nc)}},Pc=class extends ee{constructor(e,t){super("pic:blipFill"),this.root.push(Ic(e)),this.root.push(new Cc(t)),this.root.push(new Oc)}},Dc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}},Lc=class extends ee{constructor(){super("a:picLocks"),this.root.push(new Dc({noChangeAspect:1,noChangeArrowheads:1}))}},Fc=class extends ee{constructor(){super("pic:cNvPicPr"),this.root.push(new Lc)}},Mc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}},Bc=class extends ee{constructor(){super("pic:cNvPr"),this.root.push(new Mc({id:0,name:"",descr:""}))}prepForXml(e){for(let r=e.stack.length-1;r>=0;r--){let n=e.stack[r];if(n instanceof ur){this.root.push(n.createDrawingClick(e,!1));break}}let t=super.prepForXml(e);return this.root.splice(1),t}},Uc=class extends ee{constructor(){super("pic:nvPicPr"),this.root.push(new Bc),this.root.push(new Fc)}},Hc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns:pic"})}},Ci=class extends ee{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:i}){super("pic:pic"),this.root.push(new Hc({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new Uc),this.root.push(new Pc(e,i)),this.root.push(new rs({element:"pic",transform:t,outline:r,solidFill:n}))}},Wc=e=>{var t,r,n,i;return new ae({name:"a:xfrm",attributes:{flipVertical:{key:"flipV",value:(t=e.flip)===null||t===void 0?void 0:t.vertical},flipHorizontal:{key:"flipH",value:(r=e.flip)===null||r===void 0?void 0:r.horizontal},rotation:{key:"rot",value:e.rotation}},children:[new es((n=e.offset)===null||n===void 0||(n=n.emus)===null||n===void 0?void 0:n.x,(i=e.offset)===null||i===void 0||(i=i.emus)===null||i===void 0?void 0:i.y),new Qa(e.emus.x,e.emus.y),new ae({name:"a:chOff",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),new ae({name:"a:chExt",attributes:{x:{key:"cx",value:e.emus.x},y:{key:"cy",value:e.emus.y}}})]})},jc=()=>new ae({name:"wpg:cNvGrpSpPr"}),Gc=e=>new ae({name:"wpg:wgp",children:[jc(),new ae({name:"wpg:grpSpPr",children:[Wc(e.transformation)]}),...e.children]}),$c=class extends ee{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:i}){if(super("a:graphicData"),e.type==="graphic")this.root.push(new vr({uri:e.uri})),this.root.push(e.content);else if(e.type==="wps"){this.root.push(new vr({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));let o=Ri(ie(ie({},e.data),{},{transformation:t,outline:r,solidFill:n}));this.root.push(o)}else if(e.type==="wpg"){this.root.push(new vr({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"}));let o=Gc({children:e.children.map(a=>a.type==="wps"?Ri(ie(ie({},a.data),{},{transformation:a.transformation,outline:a.outline,solidFill:a.solidFill})):new Ci({mediaData:a,transform:a.transformation,outline:a.outline,solidFill:a.solidFill})),transformation:t});this.root.push(o)}else{this.root.push(new vr({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"}));let o=new Ci({mediaData:e,transform:t,outline:r,solidFill:n,crop:i});this.root.push(o)}}},zc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{a:"xmlns:a"})}},ns=class extends ee{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:i}){super("a:graphic"),Y(this,"data",void 0),this.root.push(new zc({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new $c({mediaData:e,transform:t,outline:r,solidFill:n,crop:i}),this.root.push(this.data)}},$t={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3,THROUGH:4},is={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"},Ni=()=>new ae({name:"wp:wrapNone"}),Kc=(e,t={top:0,bottom:0,left:0,right:0})=>new ae({name:"wp:wrapSquare",attributes:{wrapText:{key:"wrapText",value:e.side||is.BOTH_SIDES},distT:{key:"distT",value:t.top},distB:{key:"distB",value:t.bottom},distL:{key:"distL",value:t.left},distR:{key:"distR",value:t.right}}}),gr=21600,zt=(e,{x:t,y:r})=>new ae({name:e,attributes:{x:{key:"x",value:t},y:{key:"y",value:r}}}),Vc=()=>new ae({name:"wp:wrapPolygon",attributes:{edited:{key:"edited",value:!1}},children:[zt("wp:start",{x:0,y:0}),zt("wp:lineTo",{x:0,y:gr}),zt("wp:lineTo",{x:gr,y:gr}),zt("wp:lineTo",{x:gr,y:0}),zt("wp:lineTo",{x:0,y:0})]}),as=(e,t={},r)=>{var n;return new ae({name:e,attributes:{wrapText:{key:"wrapText",value:(n=r?.side)!==null&&n!==void 0?n:is.BOTH_SIDES},distL:{key:"distL",value:t.left},distR:{key:"distR",value:t.right}},children:[Vc()]})},qc=(e,t)=>as("wp:wrapTight",e,t),Xc=(e,t)=>as("wp:wrapThrough",e,t),Yc=(e={top:0,bottom:0})=>new ae({name:"wp:wrapTopAndBottom",attributes:{distT:{key:"distT",value:e.top},distB:{key:"distB",value:e.bottom}}}),ei={EXTERNAL:"External"},Zc=(e,t,r,n)=>new ae({name:"Relationship",attributes:{id:{key:"Id",value:e},type:{key:"Type",value:t},target:{key:"Target",value:r},targetMode:{key:"TargetMode",value:n}}}),ss=(e,t)=>new ae({name:"a:hlinkClick",attributes:ie(ie({},t?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{},{id:{key:"r:id",value:`rId${e}`}})}),Jc="{C183D7F6-B498-43B3-948B-1728B52AA6E4}",os=e=>new ae({name:"a:extLst",attributes:{namespace:{key:"xmlns:a",value:e?"http://schemas.openxmlformats.org/drawingml/2006/main":void 0}},children:[new ae({name:"a:ext",attributes:{uri:{key:"uri",value:Jc}},children:[new ae({name:"adec:decorative",attributes:{namespace:{key:"xmlns:adec",value:"http://schemas.microsoft.com/office/drawing/2017/decorative"},value:{key:"val",value:1}}})]})]}),ti=class{constructor(e){Y(this,"link",void 0),Y(this,"linkId",Tt()),Y(this,"addedTo",new WeakSet),this.link=e}createClick(e){return ss(this.linkId,e)}addRelationship(e){let t=e.viewWrapper.Relationships;this.addedTo.has(t)||(this.addedTo.add(t),t.addRelationship(this.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",this.link,ei.EXTERNAL))}},Jv=class extends ee{constructor(e,{id:t,name:r,description:n,title:i,link:o,decorative:a}){super(e),Y(this,"link",void 0),this.link=o===void 0?void 0:new ti(o),this.root.push(new Or({id:{key:"id",value:t},name:{key:"name",value:r},description:{key:"descr",value:n},title:{key:"title",value:i}})),this.link&&this.root.push(this.link.createClick(!1)),a&&this.root.push(os(!1))}prepForXml(e){var t;return(t=this.link)===null||t===void 0||t.addRelationship(e),super.prepForXml(e)}},ls=class extends ee{constructor({name:e,description:t,title:r,id:n}={name:"",description:"",title:""},{link:i,decorative:o}={}){super("wp:docPr"),Y(this,"link",void 0),Y(this,"decorative",void 0);let a={id:{key:"id",value:n??Qu()},name:{key:"name",value:e}};t!=null&&(a.description={key:"descr",value:t}),r!=null&&(a.title={key:"title",value:r}),this.root.push(new Or(a)),this.link=i===void 0?void 0:new ti(i),this.decorative=o}prepForXml(e){if(this.link)this.link.addRelationship(e),this.root.push(this.link.createClick(!0));else for(let r=e.stack.length-1;r>=0;r--){let n=e.stack[r];if(n instanceof ur){this.root.push(n.createDrawingClick(e,!0));break}}this.decorative&&this.root.push(os(!0));let t=super.prepForXml(e);return this.root.splice(1),t}},us=({top:e,right:t,bottom:r,left:n})=>new ae({name:"wp:effectExtent",attributes:{top:{key:"t",value:e},right:{key:"r",value:t},bottom:{key:"b",value:r},left:{key:"l",value:n}}}),Jr=2147483647,Oi=9525,Pi=(e,t)=>{if(t!==void 0&&t>Jr)throw new Error(`Invalid drawing ${e} ${t} EMUs (${Math.round(t/Oi)} pixels). Word won't open a drawing with a ${e} over ${Jr} EMUs (${Math.floor(Jr/Oi)} pixels). Sizes such as an ImageRun's transformation are in pixels, not EMUs`);return t},cs=({x:e,y:t})=>new ae({name:"wp:extent",attributes:{x:{key:"cx",value:Pi("width",e)},y:{key:"cy",value:Pi("height",t)}}}),Qc=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}},eh=class extends ee{constructor(){super("a:graphicFrameLocks"),this.root.push(new Qc({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}},hs=(e=!0)=>new ae({name:"wp:cNvGraphicFramePr",children:e?[new eh]:[]}),th=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}},rh=class extends ee{constructor({mediaData:e,transform:t,drawingOptions:r}){var n;super("wp:anchor");let i=ie({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},r.floating);if(this.root.push(new th({distT:i.margins&&i.margins.top||0,distB:i.margins&&i.margins.bottom||0,distL:i.margins&&i.margins.left||0,distR:i.margins&&i.margins.right||0,simplePos:"0",allowOverlap:i.allowOverlap===!0?"1":"0",behindDoc:i.behindDocument===!0?"1":"0",locked:i.lockAnchor===!0?"1":"0",layoutInCell:i.layoutInCell===!0?"1":"0",relativeHeight:i.zIndex?i.zIndex:t.emus.y})),this.root.push(ic()),this.root.push(ac(i.horizontalPosition)),this.root.push(sc(i.verticalPosition)),this.root.push(cs({x:t.emus.x,y:t.emus.y})),this.root.push(us((n=r.effectExtent)!==null&&n!==void 0?n:{top:0,right:0,bottom:0,left:0})),r.floating!==void 0&&r.floating.wrap!==void 0)switch(r.floating.wrap.type){case $t.SQUARE:this.root.push(Kc(r.floating.wrap,r.floating.margins));break;case $t.TIGHT:this.root.push(qc(r.floating.margins,r.floating.wrap));break;case $t.THROUGH:this.root.push(Xc(r.floating.margins,r.floating.wrap));break;case $t.TOP_AND_BOTTOM:this.root.push(Yc(r.floating.margins));break;case $t.NONE:default:this.root.push(Ni())}else this.root.push(Ni());this.root.push(new ls(r.docProperties,{link:r.link,decorative:r.decorative})),this.root.push(hs(e.type!=="graphic"||e.lockAspectRatio!==!1)),this.root.push(new ns({mediaData:e,transform:t,outline:r.outline,solidFill:r.solidFill,crop:r.crop}))}},nh=({mediaData:e,transform:t,docProperties:r,outline:n,solidFill:i,crop:o,effectExtent:a,link:s,decorative:u})=>{var h,m,f,w;return new ae({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[cs({x:t.emus.x,y:t.emus.y}),us(a??(n?{top:((h=n.width)!==null&&h!==void 0?h:9525)*2,right:((m=n.width)!==null&&m!==void 0?m:9525)*2,bottom:((f=n.width)!==null&&f!==void 0?f:9525)*2,left:((w=n.width)!==null&&w!==void 0?w:9525)*2}:{top:0,right:0,bottom:0,left:0})),new ls(r,{link:s,decorative:u}),hs(e.type!=="graphic"||e.lockAspectRatio!==!1),new ns({mediaData:e,transform:t,outline:n,solidFill:i,crop:o})]})},ri=class extends ee{constructor(e,t={}){super("w:drawing"),t.floating?this.root.push(new rh({mediaData:e,transform:e.transformation,drawingOptions:t})):this.root.push(nh({mediaData:e,transform:e.transformation,docProperties:t.docProperties,outline:t.outline,solidFill:t.solidFill,crop:t.crop,effectExtent:t.effectExtent,link:t.link,decorative:t.decorative}))}},ih=e=>{let t=e.indexOf(";base64,"),r=t===-1?0:t+8;return new Uint8Array(atob(e.substring(r)).split("").map(n=>n.charCodeAt(0)))},ah=e=>typeof e=="string"?ih(e):e,Qr=(e,t)=>({data:ah(e.data),fileName:t,transformation:{pixels:{x:Math.round(e.transformation.width),y:Math.round(e.transformation.height)},emus:{x:Math.round(e.transformation.width*9525),y:Math.round(e.transformation.height*9525)},flip:e.transformation.flip,rotation:e.transformation.rotation?e.transformation.rotation*6e4:void 0}}),sh=({id:e,author:t,date:r},n)=>new ae({name:"w:del",attributes:{id:{key:"w:id",value:e},author:{key:"w:author",value:t},date:{key:"w:date",value:r}},children:[n]}),Qv=class extends ee{constructor(e){var t;let r=`${Ii(e.data)}.${e.type}`,n=e.type==="svg"?ie(ie({type:e.type},Qr(e,r)),{},{fallback:ie({type:e.fallback.type},Qr(ie(ie({},e.fallback),{},{transformation:e.transformation}),`${Ii(e.fallback.data)}.${e.fallback.type}`))}):ie({type:e.type},Qr(e,r)),i=new ri(n,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill,crop:e.crop,link:e.link,decorative:e.decorative}),o=new st(e.run),a=(t=e.insertion)!==null&&t!==void 0?t:e.deletion,s=e.insertion?"w:ins":e.deletion?"w:del":"w:r";if(super(s),Y(this,"imageData",void 0),a){this.root.push(new Pe({id:a.id,author:a.author,date:a.date}));let u=new ae({name:"w:r",children:[o,i]});this.addChildElement(e.insertion&&e.deletion?sh(e.deletion,u):u)}else this.root.push(o),this.root.push(i);this.imageData=n}prepForXml(e){return e.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type==="svg"&&e.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback),super.prepForXml(e)}},ds=e=>{var t,r,n,i,o,a,s,u;return{offset:{pixels:{x:Math.round((t=(r=e.offset)===null||r===void 0?void 0:r.left)!==null&&t!==void 0?t:0),y:Math.round((n=(i=e.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0)},emus:{x:Math.round(((o=(a=e.offset)===null||a===void 0?void 0:a.left)!==null&&o!==void 0?o:0)*9525),y:Math.round(((s=(u=e.offset)===null||u===void 0?void 0:u.top)!==null&&s!==void 0?s:0)*9525)}},pixels:{x:Math.round(e.width),y:Math.round(e.height)},emus:{x:Math.round(e.width*9525),y:Math.round(e.height*9525)},flip:e.flip,rotation:e.rotation?e.rotation*6e4:void 0}},ew=class extends xe{constructor(e){super({}),Y(this,"wpsShapeData",void 0),this.wpsShapeData={type:e.type,transformation:ds(e.transformation),data:ie({},e)};let t=new ri(this.wpsShapeData,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill});this.root.push(t)}},tw=class extends xe{constructor(e){super({}),Y(this,"wpgGroupData",void 0),Y(this,"mediaDatas",void 0),this.wpgGroupData={type:e.type,transformation:ds(e.transformation),children:e.children};let t=new ri(this.wpgGroupData,{floating:e.floating,docProperties:e.altText});this.mediaDatas=e.children.filter(r=>r.type!=="wps").map(r=>r),this.root.push(t)}prepForXml(e){return this.mediaDatas.forEach(t=>{e.file.Media.addImage(t.fileName,t),t.type==="svg"&&e.file.Media.addImage(t.fallback.fileName,t.fallback)}),super.prepForXml(e)}},oh=class extends ee{constructor(e){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push(`SEQ ${e}`)}},rw=class extends xe{constructor(e){super({}),this.root.push(Qn()),this.root.push(new oh(e)),this.root.push(We()),this.root.push(je())}},lh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{instr:"w:instr",fldLock:"w:fldLock"})}},fs=class extends ee{constructor(e,t,r={}){super("w:fldSimple"),this.root.push(new lh({instr:e,fldLock:r.locked?!0:void 0})),t!==void 0&&this.root.push(new Pt(t))}},nw=class extends fs{constructor(e){super(` MERGEFIELD ${e} `,`\xAB${e}\xBB`)}},uh=32767,ch=780,hh=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],dh=e=>e<=uh?hh.reduce(({rest:t,text:r},[n,i])=>({rest:t%n,text:r+i.repeat(Math.floor(t/n))}),{rest:e,text:""}).text:void 0,fh=e=>e===0?"":e<=ch?String.fromCharCode(65+(e-1)%26).repeat(Math.ceil(e/26)):void 0,ph=e=>{var t;return`${e}${e%100>=11&&e%100<=13?"th":(t=["th","st","nd","rd"][e%10])!==null&&t!==void 0?t:"th"}`},ni=e=>{let t=e.charAt(0)!==e.charAt(0).toUpperCase(),r=n=>i=>{var o;return t?(o=n(i))===null||o===void 0?void 0:o.toLowerCase():n(i)};switch(e.toLowerCase()){case"arabic":return String;case"roman":return r(dh);case"alphabetic":return r(fh);case"ordinal":return n=>n>0?ph(n):void 0;case"arabicdash":return n=>`- ${n} -`;default:return}},ps=new Set(["mergeformat","charformat","mergeformatinet"]),ms=new Set(["upper","lower","firstcap","caps"]),mh=e=>/^[#0,]*[#0][#0,]*$/.test(e),vh=(e,t)=>{let r=[...t].filter(o=>o==="0").length,n=r+[...t].filter(o=>o==="#").length,i=String(e).padStart(r,"0");if(!(i.length<n||r===0&&e===0))return t.includes(",")?i.replace(/\B(?=(\d{3})+$)/g,","):i},wh=(e,t)=>{switch(t){case"upper":return e.toUpperCase();case"lower":return e.toLowerCase();case"firstcap":return e.charAt(0).toUpperCase()+e.slice(1);default:return e}},gh=e=>{var t;let r=new RegExp("^\\s*(PAGEREF|NUMPAGES|SECTIONPAGES)\\b(.*)$","is").exec(e),n=r?.[1].toUpperCase()==="PAGEREF"?new RegExp('^\\s*("?)([^\\s"\\\\]+)\\1(.*)$',"s").exec(r[2]):void 0;if(!r||r[1].toUpperCase()==="PAGEREF"&&!n)return;let i=(t=(n?n[3]:r[2]).match(/"[^"]*"|\S+/g))!==null&&t!==void 0?t:[],o,a,s=[],u=!1,h=!0;for(let p=0;p<i.length;p++){let d=i[p],v=()=>{var _;return(d.length>2?d.slice(2):(_=i[++p])!==null&&_!==void 0?_:"").replace(/^"(.*)"$/,"$1")};if(/^\\p$/i.test(d))u=!0;else if(d.startsWith("\\#")){var m;let _=v();h&&(h=a===void 0&&mh(_)),(m=a)!==null&&m!==void 0||(a=_)}else if(d.startsWith("\\*")){let _=v(),S=_.toLowerCase();if(ms.has(S))s.push(S);else if(_!==""&&!ps.has(S)){var f;h&&(h=o===void 0&&ni(_)!==void 0),(f=o)!==null&&f!==void 0||(o=_)}}}let w=ie(ie(ie(ie({},o===void 0?{}:{numberFormat:o}),a===void 0?{}:{picture:a}),s.length===0?{}:{capitals:s[0]}),{},{written:h&&s.length<=1&&s[0]!=="caps"&&(o===void 0||a===void 0)});return ie(n?{type:"pageReference",bookmark:n[2],relative:u}:{type:"pageCount",scope:r[1].toUpperCase()==="NUMPAGES"?"document":"section"},w)},yh=e=>new RegExp("^\\s*TOC\\b.*\\\\s\\b","is").test(e),vs=(e,{enclosing:t,within:r,inTextBox:n},{estimate:i,sectionPageCount:o,blank:a,relativeTo:s})=>{let u=gh(e);if(u===void 0)return;let{bookmarks:h,pageCount:m,bookmarkPageNumbers:f}=i,{numberFormat:w,picture:p,capitals:d,written:v}=u,_=w!==void 0||p!==void 0,S=C=>C===void 0?void 0:p===void 0?ni(w??"arabic")(C):vh(C,p),E=u.type==="pageReference"&&u.relative&&r==="counted"&&!n?s?.(u.bookmark):void 0,N;return v?u.type==="pageCount"?N=S(u.scope==="document"?m:o):t.some(yh)?N=void 0:_?N=S(f?.get(u.bookmark)):N=u.relative?E:h.get(u.bookmark):N=void 0,N===void 0?a?"":void 0:wh(N,d)},bh=(e,t)=>e==="mc:Fallback"||t==="fallback"?"fallback":e==="w:del"||e==="w:moveFrom"?"deleted":t,tr=(e,t,r,n,i="counted",o=!1)=>{for(let h=0;h<t.length;h++){let m=t[h],f=e.nameOf(m);if(f===void 0)continue;let w=r[r.length-1];if(f==="w:fldChar"){let p=e.attributeOf(m,"w:fldCharType");p==="begin"?r.push({begin:m,instruction:"",inResult:!1}):p==="separate"&&w?(e.writeClean(w.begin,w.instruction),w.inResult=!0,w.result=n.resultOf(w.instruction,{within:i,enclosing:r.slice(0,-1).map(d=>d.instruction),inTextBox:o}),w.result!==void 0&&(t.splice(h+1,0,e.textElement(w.result)),h++)):p==="end"&&r.pop()}else if(f==="w:instrText"&&w&&!w.inResult)w.instruction+=e.textOf(m);else if((f==="w:t"||f==="w:tab"||f==="w:br"||f==="w:cr")&&w?.result!==void 0)t.splice(h,1),h--;else if(f==="w:fldSimple"){let p=n.resultOf(String(e.attributeOf(m,"w:instr")),{within:i,enclosing:r.map(d=>d.instruction),inTextBox:o});if(p===void 0){var a;tr(e,(a=e.contentOf(m))!==null&&a!==void 0?a:[],[],n,i,o)}else e.setSimpleFieldResult(m,p)}else{var s;if(f==="w:p"){var u;(u=n.beforeParagraph)===null||u===void 0||u.call(n,m)}tr(e,(s=e.contentOf(m))!==null&&s!==void 0?s:[],r,n,bh(f,i),o||f==="w:txbxContent"),f==="w:p"&&n.afterParagraph(m)}}},ws=(e,t)=>t.flatMap(r=>{var n;let i=e.nameOf(r);return i===void 0?[]:i==="w:sectPr"?[r]:ws(e,(n=e.contentOf(r))!==null&&n!==void 0?n:[])}),_h=(e,t)=>{var r;return((r=e.contentOf(t))!==null&&r!==void 0?r:[]).some(n=>{var i;return e.nameOf(n)==="w:pPr"&&((i=e.contentOf(n))!==null&&i!==void 0?i:[]).some(o=>e.nameOf(o)==="w:sectPr")})},Eh=(e,t,r)=>{let n=ws(e,[t]).reduce((i,o)=>{var a,s;let u=((a=e.contentOf(o))!==null&&a!==void 0?a:[]).flatMap(h=>{let m=e.nameOf(h);return m==="w:headerReference"||m==="w:footerReference"?[[`${m} ${String(e.attributeOf(h,"w:type"))}`,String(e.attributeOf(h,"r:id"))]]:[]});return[...i,new Map([...(s=i[i.length-1])!==null&&s!==void 0?s:[],...u])]},[]).reduce((i,o,a)=>{for(let u of o.values()){var s;i.set(u,[...(s=i.get(u))!==null&&s!==void 0?s:[],r[a]])}return i},new Map);return new Map([...n].flatMap(([i,[o,...a]])=>o!==void 0&&a.every(s=>s===o)?[[i,o]]:[]))},gs=(e,t,r,{blank:n})=>{let{sectionPageCounts:i=[],relativePositions:o}=r,a=0,s=new Map,u=h=>{var m,f;let w=(m=s.get(h))!==null&&m!==void 0?m:0;return s.set(h,w+1),o==null||(f=o.get(h))===null||f===void 0?void 0:f[w]};return tr(e,[t],[],{resultOf:(h,m)=>vs(h,m,{estimate:r,sectionPageCount:i[a],blank:n,relativeTo:u}),afterParagraph:h=>{a+=_h(e,h)?1:0}}),Eh(e,t,i)},ys=(e,t,r,{blank:n,sectionPageCount:i,notes:o=!1})=>{let a=s=>{let u=r.bookmarks.get(s);return u===void 0?void 0:`on page ${u}`};tr(e,[t],[],{resultOf:(s,u)=>vs(s,u,ie({estimate:r,sectionPageCount:i,blank:n},o?{relativeTo:a}:{})),afterParagraph:()=>{}})},xh=(e,t,{beforeParagraph:r,resultOf:n})=>tr(e,[t],[],{resultOf:(i,{within:o})=>n(i,o),beforeParagraph:r,afterParagraph:()=>{}}),bs=class extends ee{constructor(e={}){super("w:instrText"),Y(this,"properties",void 0),this.properties=e,this.root.push(new Le({space:De.PRESERVE}));let t="TOC";if(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){let r=this.properties.stylesWithLevels.map(n=>`${n.styleName},${n.level}`).join(",");t=`${t} \\t "${r}"`}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)}},ii=class extends ee{constructor(){super("w:sdtContent")}},_s=e=>e===void 0?Qn():ut(e),ai=new WeakMap,Th=(e,t)=>{ai.set(e,t)},Sh=class{constructor(){Y(this,"ids",[])}get(e){var t,r;return(r=(t=this.ids)[e])!==null&&r!==void 0||(t[e]=Ya()),this.ids[e]}},Ze=e=>typeof e=="object"&&e!==null?Object.keys(e)[0]:void 0,Je=e=>{let t=Ze(e),r=t===void 0?void 0:e[t];return Array.isArray(r)?r:r===void 0?[]:[r]},Ge=(e,t)=>Je(e).find(r=>Ze(r)===t),Ue=(e,t)=>{var r;return(r=Ge(e,"_attr"))===null||r===void 0||(r=r._attr)===null||r===void 0?void 0:r[t]},si=(e,t)=>{let r=Ue(e,t);return r===void 0?void 0:Number(r)},Ah=new Set(["w:tbl","w:tr","w:tc","w:sdt","w:sdtContent","w:customXml"]),Es=e=>e.flatMap(t=>{let r=Ze(t);return r==="w:p"||ai.has(t)?[t]:r!==void 0&&Ah.has(r)?Es(Je(t)):[]}),kh=new Set(["w:r","w:hyperlink","w:ins","w:moveTo","w:smartTag","w:customXml","w:sdt","w:sdtContent","w:fldSimple","w:dir","w:bdo"]),Ih=e=>{switch(Ze(e)){case"w:t":return Je(e).filter(t=>typeof t=="string").join("");case"w:tab":return" ";case"w:br":return[void 0,"textWrapping"].includes(Ue(e,"w:type"))?`
23
+ `:"";case"w:cr":return`
24
+ `;case"w:noBreakHyphen":return"-";default:return""}},Rh=e=>{let t=[],r=n=>{let i=Ze(n);if(i!==void 0&&kh.has(i))return Je(n).map(r).join("");if(i==="w:fldChar"){let o=Ue(n,"w:fldCharType");return o==="begin"?t.push(!1):o==="separate"?t[t.length-1]=!0:t.pop(),""}return t.every(Boolean)?Ih(n):""};return Je(e).map(r).join("")},xs=e=>{let t=Ze(e);return t==="w:bookmarkStart"?[{start:!0,id:Ue(e,"w:id"),name:Ue(e,"w:name")}]:t==="w:bookmarkEnd"?[{start:!1,id:Ue(e,"w:id")}]:t===void 0||t==="_attr"?[]:Je(e).flatMap(xs)},Ch=e=>{let t=new Map;return e.map(r=>{let n=xs(r),i=new Set([...t.values(),...n.flatMap(o=>o.start?[o.name]:[])]);for(let o of n)o.start?t.set(o.id,o.name):t.delete(o.id);return i})},Nh=(e,t)=>{let r=t?Ch(e):[];return e.map((n,i)=>{var o;let a=Ge(n,"w:pPr");return{element:n,styleId:Ue(Ge(a,"w:pStyle"),"w:val"),outlineLevel:si(Ge(a,"w:outlineLvl"),"w:val"),text:Rh(n),bookmarks:(o=r[i])!==null&&o!==void 0?o:new Set}})},Ts=e=>{var t;let r=(t=e.file)===null||t===void 0||(t=t.Styles)===null||t===void 0?void 0:t.prepForXml(e);return new Map(Je(r).filter(n=>Ze(n)==="w:style"&&["paragraph",void 0].includes(Ue(n,"w:type"))).map(n=>[Ue(n,"w:styleId"),{name:Ue(Ge(n,"w:name"),"w:val"),basedOn:Ue(Ge(n,"w:basedOn"),"w:val"),outlineLevel:si(Ge(Ge(n,"w:pPr"),"w:outlineLvl"),"w:val")}]))},Ss=e=>{let t=/^\s*(\d+)\s*-\s*(\d+)\s*$/.exec(e);return t?[Number(t[1]),Number(t[2])]:void 0},Rn=(e,[t,r])=>e>=t&&e<=r,oi=(e,t)=>{var r,n;if(e===void 0)return;let i=/^heading ?([1-9])$/i.exec((r=(n=t.get(e))===null||n===void 0?void 0:n.name)!==null&&r!==void 0?r:e);return i?Number(i[1]):void 0},As=(e,t,r=0)=>{var n;if(e===void 0||r>t.size)return;let i=t.get(e),o=oi(e,t);return(n=i?.outlineLevel)!==null&&n!==void 0?n:o===void 0?As(i?.basedOn,t,r+1):o-1},Oh=e=>{let t=Ts(e);return r=>{let n=Ge(r,"w:pPr"),i=Ue(Ge(n,"w:pStyle"),"w:val"),o=oi(i,t),a=ks({styleId:i,outlineLevel:si(Ge(n,"w:outlineLvl"),"w:val")},t),s=a===void 0||a>=9?void 0:a+1;return o!==void 0&&(s===void 0||s===o)?o:s===void 0?void 0:"unclear"}},ks=(e,t)=>{var r;return(r=e.outlineLevel)!==null&&r!==void 0?r:As(e.styleId,t)},Ph=(e,t,r)=>{var n;let{entriesFromBookmark:i,headingStyleRange:o,stylesWithLevels:a=[],useAppliedParagraphOutlineLevel:s}=e;if(t.text.trim()===""||i&&!t.bookmarks.has(i))return;let u=[t.styleId,t.styleId===void 0||(n=r.get(t.styleId))===null||n===void 0?void 0:n.name].filter(d=>d!==void 0).map(d=>d.toLowerCase()),h=a.find(d=>u.includes(d.styleName.toLowerCase()));if(h)return h.level;let m=!!o||a.length>0||!!s||!!e.tcFieldIdentifier||!!e.tcFieldLevelRange||!!e.captionLabel||!!e.captionLabelIncludingNumbers,f=o?Ss(o):m?void 0:[1,9],w=oi(t.styleId,r);if(f&&w!==void 0&&Rn(w,f))return w;let p=s?ks(t,r):void 0;return p!==void 0&&Rn(p+1,f??[1,9])?p+1:void 0},Dh=(e,t)=>{let r=t.preserveTabInEntries?e:e.replace(/\t/g," ");return(t.preserveNewLineInEntries?r.split(`
25
+ `):[r.replace(/\n/g," ")]).map((n,i)=>new Pt({break:i>0?1:void 0,children:n.split(" ").flatMap((o,a)=>[...a>0?[new ci]:[],...o===""?[]:[o]])}))},Lh=(e,t)=>{var r;let n=(r=[...t].find(([,o])=>{var a;return((a=o.name)===null||a===void 0?void 0:a.toLowerCase())===`toc ${e}`}))===null||r===void 0?void 0:r[0],i=n??`TOC${e}`;return n!==void 0||t.has(i)||e===1?{id:i}:{id:i,indent:(e-1)*220}},Fh=({properties:e,beginDirty:t,textWidth:r},n,i,o)=>{var a;let s=e.pageNumbersEntryLevelsRange?(a=Ss(e.pageNumbersEntryLevelsRange))!==null&&a!==void 0?a:[1,9]:void 0,u=new ii;return n.forEach((h,m)=>{let f=s===void 0||!Rn(h.level,s),w=[...Dh(h.title,e),...f?[new Pt({children:[e.entryAndPageNumberSeparator||new ci]}),new yd(h.bookmark,{hyperlink:e.hyperlink})]:[]],p=Lh(h.level,i);u.addChildElement(new Ce({style:p.id,indent:p.indent===void 0?void 0:{left:p.indent},tabStops:[{type:"right",position:r,leader:"dot"}],children:[...m===0?[new xe({children:[_s(t),new bs(e),We()]})]:[],...e.hyperlink?[new Os({anchor:h.bookmark,children:w})]:w]}))}),u.addChildElement(new Ce({children:[new xe({children:[je()]})]})),u.prepForXml(o)},Mh=(e,t,r,n)=>{let i=Je(e),o=i.findIndex(a=>Ze(a)==="w:pPr")+1;e["w:p"]=[...i.slice(0,o),new Fs(t,r).prepForXml(n),...i.slice(o),new Ms(r).prepForXml(n)]},Bh=(e,t,r)=>{let n=Es(Je(e)),i=n.flatMap(u=>{let h=ai.get(u);return h?[[u,h]]:[]});if(i.length===0)return;let o=Ts(t),a=i.some(([,{properties:u}])=>!!u.entriesFromBookmark),s=Nh(n.filter(u=>Ze(u)==="w:p"),a).map(u=>({paragraph:u,levels:i.map(([,{properties:h}])=>Ph(h,u,o))})).filter(({levels:u})=>u.some(h=>h!==void 0)).map((u,h)=>ie(ie({},u),{},{id:r.get(h)}));for(let{paragraph:u,id:h}of s)Mh(u.element,`_Toc${h}`,h,t);i.forEach(([u,h],m)=>{let f=s.flatMap(({paragraph:w,levels:p,id:d})=>{let v=p[m];return v===void 0?[]:[{title:w.text,level:v,bookmark:`_Toc${d}`}]});f.length!==0&&(u["w:sdt"]=Je(u).map(w=>Ze(w)==="w:sdtContent"?Fh(h,f,o,t):w))})},Uh=new RegExp("^\\p{L}[\\p{L}\\p{N}_]*$","u"),Hh=e=>{var t,r;let n,i=!1,o,a=!1,s=!1;for(let f=0;f<e.length;f++){var u,h;let w=e[f],p=(u=e[f+1])!==null&&u!==void 0?u:"",d;if(f===0&&!w.startsWith("\\"))d={type:"bookmark"};else if(w==="\\c"||w==="\\n")d={type:w==="\\c"?"repeat":"next"};else if((w==="\\r"||w==="\\s")&&/^\d+$/.test(p))f++,d=w==="\\r"?{type:"reset",to:Number(p)}:{type:"heading",level:Number(p)};else if(w==="\\h")i=!0;else if(w==="\\#"&&f+1<e.length)f++,s=!0;else if(w==="\\*"&&f+1<e.length){let v=e[++f];if(ms.has(v.toLowerCase()))a=!0;else if(!ps.has(v.toLowerCase())){if(o!==void 0)return;o=v}}else return;if(d&&n)return;n=(h=d)!==null&&h!==void 0?h:n}if(n?.type==="bookmark"&&e.length>1)return;let m=!s&&!(a&&o!==void 0&&o.toLowerCase()!=="arabic");return{step:(t=n)!==null&&t!==void 0?t:{type:"next"},hidden:i&&o===void 0,format:m?(r=o)!==null&&r!==void 0?r:"ARABIC":""}},li=e=>{var t;let r=new RegExp("^\\s*SEQ\\b(.*)$","is").exec(e);if(!r)return;let[n,...i]=(t=r[1].match(/"[^"]*"|\S+/g))!==null&&t!==void 0?t:[];if(n===void 0)return{};let o=n.replace(/^"(.*)"$/,"$1");return Uh.test(o)?{identifier:o,sequence:Hh(i)}:{identifier:o}},Wh=e=>li(e)!==void 0,Cn=e=>typeof e!="object"||e===null?[]:Array.isArray(e)?e.flatMap(Cn):Object.entries(e).flatMap(([t,r])=>[...(t==="w:instrText"&&Array.isArray(r)?r:t==="_attr"?[r["w:instr"]]:[]).flatMap(n=>{let i=typeof n=="string"?li(n):void 0;return i?.identifier===void 0?[]:[i.identifier.toLowerCase()]}),...Cn(r)]),jh=e=>{var t;let r=(t=e.file)===null||t===void 0?void 0:t.Comments;if(!r)return new Set;let n={View:r,Relationships:r.Relationships};return new Set(Cn(r.prepForXml(ie(ie({},e),{},{viewWrapper:n,stack:[]}))))},Gh=e=>{let t=Oh(e),r=new Map,n=new Map,i=[],o=-1,a=-1,s,u=(h,m)=>{var f;let w=Math.max(-1,...i.slice(1,m+1).filter(v=>v!==void 0)),p=((f=n.get(h))!==null&&f!==void 0?f:[]).filter(v=>v.paragraph>=w),d=p.every(({step:v})=>v?.type==="next"||v?.type==="heading"&&v.level===m);if(!(o>w||!d))return p.length+1};return{startParagraph:h=>{a++;let m=t(h);m==="unclear"?o=a:m!==void 0&&(i[m]=a)},numberOf:(h,m)=>{var f,w,p;let{identifier:d,sequence:v}=li(h);if(d===void 0||m==="fallback")return;(f=s)!==null&&f!==void 0||(s=jh(e));let _=d.toLowerCase();if(v?.step.type==="bookmark"&&m==="counted"&&!s.has(_))return;let S=r.has(_)?r.get(_):0,E=s.has(_)||m==="deleted"?void 0:v?.step,N=E?.type==="reset"?E.to:E?.type==="repeat"?S:E?.type==="heading"?u(_,E.level):E?.type==="next"&&S!==void 0?S+1:void 0;return r.set(_,N),n.set(_,[...(w=n.get(_))!==null&&w!==void 0?w:[],ie({paragraph:a},N===void 0?{}:{step:E})]),N===void 0||v===void 0?void 0:v.hidden?"":(p=ni(v.format))===null||p===void 0?void 0:p(N)}}},en=e=>{let t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.keys(e)[0]:void 0;return t==="_attr"?void 0:t},Di=e=>({"w:t":[{_attr:{"xml:space":"preserve"}},e]}),Gr={nameOf:en,contentOf:e=>{let t=e[en(e)];return Array.isArray(t)?t:void 0},attributeOf:(e,t)=>{var r;let n=e[en(e)],i=Array.isArray(n)?n.find(o=>typeof o=="object"&&o!==null&&"_attr"in o):n;return i==null||(r=i._attr)===null||r===void 0?void 0:r[t]},textOf:e=>Gr.contentOf(e).filter(t=>typeof t=="string").join(""),textElement:Di,writeClean:e=>{if(_u(e)){let t=e["w:fldChar"]._attr;e["w:fldChar"]={_attr:Object.fromEntries(Object.entries(t).filter(([r])=>r!=="w:dirty"))}}},setSimpleFieldResult:(e,t)=>{let r=e["w:fldSimple"];e["w:fldSimple"]=[...(Array.isArray(r)?r:[r]).filter(n=>typeof n=="object"&&n!==null&&"_attr"in n),{"w:r":[Di(t)]}]}},Is=new WeakMap,$h=(e,t)=>{let{startParagraph:r,numberOf:n}=Gh(t);xh(Gr,e,{beforeParagraph:i=>r(i),resultOf:(i,o)=>Wh(i)?n(i,o):void 0})},zh=(e,t,r)=>{let n=r(e,t),i=gs(Gr,e,n,{blank:!1});t.file&&Is.set(t.file,{estimate:n,partPageCounts:i})},lr=(e,t,r)=>{let n=t.file&&Is.get(t.file);if(!e||!n)return;let i=r===void 0?void 0:n.partPageCounts.get(`rId${r}`),o="w:footnotes"in e||"w:endnotes"in e;ys(Gr,e,n.estimate,{blank:!1,sectionPageCount:i,notes:o})},Kh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns"})}},Re=class Rs extends ee{constructor(){super("Relationships"),this.root.push(new Kh({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(t,r,n,i){this.root.push(Zc(`rId${t}`,r,n,i))}static copy(t){let r=new Rs;return r.root.push(...t.root.slice(1)),r}get RelationshipCount(){return this.root.length-1}},Vh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}},ui=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id"})}},qh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{"xmlns:wpc":"xmlns:wpc","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","mc:Ignorable":"mc:Ignorable"})}},iw=class extends ee{constructor(e){super("w:commentRangeStart"),this.root.push(new ui({id:e}))}},aw=class extends ee{constructor(e){super("w:commentRangeEnd"),this.root.push(new ui({id:e}))}},sw=class extends ee{constructor(e){super("w:commentReference"),this.root.push(new ui({id:e}))}},Li=class extends ee{constructor({id:e,initials:t,author:r,date:n=new Date,children:i},o){super("w:comment"),Y(this,"paraId",void 0),this.paraId=o,this.root.push(new Vh({id:e,initials:t,author:r,date:n.toISOString()}));for(let a of i)this.root.push(a)}prepForXml(e){let t=super.prepForXml(e);if(!t||!this.paraId)return t;let r=t["w:comment"];if(!Array.isArray(r))return t;for(let n=r.length-1;n>=0;n--){let i=r[n];if(i&&typeof i=="object"&&"w:p"in i){let o=i["w:p"];Array.isArray(o)&&o.unshift({_attr:{"w14:paraId":this.paraId,"w14:textId":this.paraId}});break}}return t}},Xh=e=>(e+1).toString(16).toUpperCase().padStart(8,"0"),Yh=class extends ee{constructor({children:e}){super("w:comments"),Y(this,"relationships",void 0),Y(this,"threadData",void 0),Y(this,"commentIdsData",void 0),Y(this,"isEmpty",void 0),this.isEmpty=e.length===0,this.root.push(new qh({"xmlns:wpc":"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","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","mc:Ignorable":"w14 w15 wp14"}));let t=e.some(n=>n.parentId!==void 0),r=e.some(n=>n.durableId!==void 0);if(t||r){let n=new Map(e.map(i=>[i.id,Xh(i.id)]));for(let i of e)this.root.push(new Li(i,n.get(i.id)));t&&(this.threadData=e.map(i=>({paraId:n.get(i.id),parentParaId:i.parentId!==void 0?n.get(i.parentId):void 0,done:i.resolved}))),r&&(this.commentIdsData=e.map(i=>{var o;return{paraId:n.get(i.id),durableId:(o=i.durableId)!==null&&o!==void 0?o:n.get(i.id)}}))}else for(let n of e)this.root.push(new Li(n));this.relationships=new Re}get Relationships(){return this.relationships}get ThreadData(){return this.threadData}get CommentIdsData(){return this.commentIdsData}get IsEmpty(){return this.isEmpty}prepForXml(e){let t=super.prepForXml(e);return lr(t,e),t}},Zh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{"xmlns:wpc":"xmlns:wpc","xmlns:mc":"xmlns:mc","xmlns:w15":"xmlns:w15","mc:Ignorable":"mc:Ignorable"})}},Jh=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{paraId:"w15:paraId",paraIdParent:"w15:paraIdParent",done:"w15:done"})}},Qh=class extends ee{constructor(e){super("w15:commentEx"),this.root.push(new Jh({paraId:e.paraId,paraIdParent:e.parentParaId,done:e.done!==void 0?e.done?"1":"0":void 0}))}},ed=class extends ee{constructor(e){super("w15:commentsEx"),this.root.push(new Zh({"xmlns:wpc":"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","mc:Ignorable":"w15"}));for(let t of e)this.root.push(new Qh(t))}},td=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{paraId:"w16cid:paraId",durableId:"w16cid:durableId"})}},rd=class extends ee{constructor(e){super("w16cid:commentId"),this.root.push(new td({paraId:e.paraId,durableId:e.durableId}))}},nd=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{"xmlns:w16cid":"xmlns:w16cid","xmlns:mc":"xmlns:mc","mc:Ignorable":"mc:Ignorable"})}},id=class extends ee{constructor(e){super("w16cid:commentsIds"),this.root.push(new nd({"xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"w16cid"}));for(let t of e)this.root.push(new rd(t))}},ow=class extends Ie{constructor(){super("w:noBreakHyphen")}},lw=class extends Ie{constructor(){super("w:softHyphen")}},uw=class extends Ie{constructor(){super("w:dayShort")}},cw=class extends Ie{constructor(){super("w:monthShort")}},hw=class extends Ie{constructor(){super("w:yearShort")}},dw=class extends Ie{constructor(){super("w:dayLong")}},fw=class extends Ie{constructor(){super("w:monthLong")}},pw=class extends Ie{constructor(){super("w:yearLong")}},mw=class extends Ie{constructor(){super("w:annotationRef")}},vw=class extends Ie{constructor(){super("w:footnoteRef")}},ad=class extends Ie{constructor(){super("w:endnoteRef")}},ww=class extends Ie{constructor(){super("w:separator")}},gw=class extends Ie{constructor(){super("w:continuationSeparator")}},yw=class extends Ie{constructor(){super("w:pgNum")}},bw=class extends Ie{constructor(){super("w:cr")}},ci=class extends Ie{constructor(){super("w:tab")}},_w=class extends Ie{constructor(){super("w:lastRenderedPageBreak")}},Ew={LEFT:"left",CENTER:"center",RIGHT:"right"},xw={MARGIN:"margin",INDENT:"indent"},Tw={NONE:"none",DOT:"dot",HYPHEN:"hyphen",UNDERSCORE:"underscore",MIDDLE_DOT:"middleDot"},sd=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{alignment:"w:alignment",relativeTo:"w:relativeTo",leader:"w:leader"})}},Sw=class extends ee{constructor(e){super("w:ptab"),this.root.push(new sd({alignment:e.alignment,relativeTo:e.relativeTo,leader:e.leader}))}},Cs={COLUMN:"column",PAGE:"page"},Ns=class extends ee{constructor(e){super("w:br"),this.root.push(new Ne({type:e}))}},Aw=class extends xe{constructor(){super({}),this.root.push(new Ns(Cs.PAGE))}},kw=class extends xe{constructor(){super({}),this.root.push(new Ns(Cs.COLUMN))}},od=class extends ee{constructor(){super("w:pageBreakBefore")}},Dt={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"},ld=({after:e,before:t,line:r,lineRule:n,beforeAutoSpacing:i,afterAutoSpacing:o})=>new ae({name:"w:spacing",attributes:{after:{key:"w:after",value:e},before:{key:"w:before",value:t},line:{key:"w:line",value:r},lineRule:{key:"w:lineRule",value:n},beforeAutoSpacing:{key:"w:beforeAutospacing",value:i},afterAutoSpacing:{key:"w:afterAutospacing",value:o}}}),Iw={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"},Xt=e=>new ae({name:"w:pStyle",attributes:{val:{key:"w:val",value:e}}}),Fi={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},Rw={DOT:"dot",HYPHEN:"hyphen",MIDDLE_DOT:"middleDot",NONE:"none",UNDERSCORE:"underscore"},Cw={MAX:9026},ud=({type:e,position:t,leader:r})=>new ae({name:"w:tab",attributes:{val:{key:"w:val",value:e},pos:{key:"w:pos",value:Xe(t)},leader:{key:"w:leader",value:r}}}),cd=e=>new ae({name:"w:tabs",children:e.map(t=>ud(t))}),tn=class extends ee{constructor(e,t){super("w:numPr"),this.root.push(new hd(t)),this.root.push(new dd(e))}},hd=class extends ee{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 Ne({val:e}))}},dd=class extends ee{constructor(e){super("w:numId"),this.root.push(new Ne({val:typeof e=="string"?`{${e}}`:e}))}},$r=class extends ee{constructor(...e){super(...e),Y(this,"fileChild",Symbol())}},fd=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}},Nw={INTERNAL:"INTERNAL",EXTERNAL:"EXTERNAL"},ur=class extends ee{constructor(e,t,r,n){super("w:hyperlink"),Y(this,"linkId",void 0),Y(this,"drawingLink",void 0),this.linkId=t,this.drawingLink=r&&n!==void 0?new ti(n):void 0;let i=new fd({history:1,anchor:r||void 0,id:!r||n!==void 0?`rId${this.linkId}`:void 0});this.root.push(i),e.forEach(o=>{this.root.push(o)})}createDrawingClick(e,t){return this.drawingLink?(this.drawingLink.addRelationship(e),this.drawingLink.createClick(t)):ss(this.linkId,t)}},Os=class extends ur{constructor(e){super(e.children,Tt(),e.anchor)}},Ps=class extends ee{constructor(e){super("w:externalHyperlink"),Y(this,"options",void 0),this.options=e}},pd=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id",name:"w:name"})}},md=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id"})}},Ds=class Ls{constructor(t){Y(this,"start",void 0),Y(this,"children",void 0),Y(this,"end",void 0);let r=Ya();this.start=new Fs(t.id,r),this.children=t.children,this.end=new Ms(r)}get writtenAs(){return[this.start,...this.children.flatMap(t=>t instanceof Ls?t.writtenAs:[t]),this.end]}},Fs=class extends ee{constructor(e,t){super("w:bookmarkStart");let r=new pd({name:e,id:t});this.root.push(r)}},Ms=class extends ee{constructor(e){super("w:bookmarkEnd");let t=new md({id:e});this.root.push(t)}},Ow=(function(e){return e.NONE="none",e.RELATIVE="relative",e.NO_CONTEXT="no_context",e.FULL_CONTEXT="full_context",e})({}),vd={relative:"\\r",no_context:"\\n",full_context:"\\w",none:void 0},Pw=class extends fs{constructor(e,t,r={}){let{hyperlink:n=!0,referenceFormat:i="full_context"}=r,o=`${`REF ${e}`} ${[...n?["\\h"]:[],...[vd[i]].filter(a=>!!a)].join(" ")}`;super(o,t)}},wd=e=>new ae({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:e}}}),gd=class extends ee{constructor(e,t={}){super("w:instrText"),this.root.push(new Le({space:De.PRESERVE}));let r=`PAGEREF ${e}`;t.hyperlink&&(r=`${r} \\h`),t.useRelativePosition&&(r=`${r} \\p`),this.root.push(r)}},yd=class extends xe{constructor(e,t={}){super({children:[Qn(),new gd(e,t),We(),je()]})}},bd=255,Bs=e=>{let t=e.indexOf("#"),r=e.length-t-1;return t>0&&r>0&&r<=bd?{target:e.slice(0,t),anchor:e.slice(t+1)}:{target:e}},Dw={ANSI:"00",DEFAULT:"01",SYMBOL:"02",MAC:"4D",JIS:"80",HANGUL:"81",JOHAB:"82",GB_2312:"86",CHINESEBIG5:"88",GREEK:"A1",TURKISH:"A2",VIETNAMESE:"A3",HEBREW:"B1",ARABIC:"B2",BALTIC:"BA",RUSSIAN:"CC",THAI:"DE",EASTEUROPE:"EE",OEM:"FF"},yr=({id:e,fontKey:t,subsetted:r},n)=>new ae({name:n,attributes:ie({id:{key:"r:id",value:e}},t?{fontKey:{key:"w:fontKey",value:`{${t.toUpperCase()}}`}}:{}),children:[...r?[new he("w:subsetted",r)]:[]]}),_d=({name:e,altName:t,panose1:r,charset:n,family:i,notTrueType:o,pitch:a,sig:s,embedRegular:u,embedBold:h,embedItalic:m,embedBoldItalic:f})=>new ae({name:"w:font",attributes:{name:{key:"w:name",value:e}},children:[...t?[jt("w:altName",t)]:[],...r?[jt("w:panose1",r)]:[],...n?[jt("w:charset",n)]:[],...i?[jt("w:family",i)]:[],...o?[new he("w:notTrueType",o)]:[],...a?[jt("w:pitch",a)]:[],...s?[new ae({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:s.usb0},usb1:{key:"w:usb1",value:s.usb1},usb2:{key:"w:usb2",value:s.usb2},usb3:{key:"w:usb3",value:s.usb3},csb0:{key:"w:csb0",value:s.csb0},csb1:{key:"w:csb1",value:s.csb1}}})]:[],...u?[yr(u,"w:embedRegular")]:[],...h?[yr(h,"w:embedBold")]:[],...m?[yr(m,"w:embedItalic")]:[],...f?[yr(f,"w:embedBoldItalic")]:[]]}),Ed=({name:e,characterSet:t,embedRegular:r,embedBold:n,embedItalic:i,embedBoldItalic:o})=>_d({name:e,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:t,family:"auto",pitch:"variable",embedRegular:r,embedBold:n,embedItalic:i,embedBoldItalic:o}),xd=e=>new ae({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:e.map(Ed)}),Td=[{option:"data",element:"embedRegular",bold:!1,italic:!1},{option:"bold",element:"embedBold",bold:!0,italic:!1},{option:"italic",element:"embedItalic",bold:!1,italic:!0},{option:"boldItalic",element:"embedBoldItalic",bold:!0,italic:!0}],Us=class{constructor(e){Y(this,"options",void 0),Y(this,"fontTable",void 0),Y(this,"relationships",void 0),Y(this,"fontOptionsWithKey",[]),Y(this,"files",[]),this.options=e;let t=e.map(r=>Td.flatMap(({option:n,element:i,bold:o,italic:a})=>{let s=r[n];return s?[{element:i,file:{name:r.name,data:s,bold:o,italic:a,fontKey:tc()}}]:[]}));this.files=t.flatMap(r=>r.map(({file:n})=>n)),this.fontOptionsWithKey=e.map((r,n)=>ie(ie({},r),{},{fontKey:t[n][0].file.fontKey})),this.fontTable=xd(e.map((r,n)=>ie({name:r.name,characterSet:r.characterSet},Object.fromEntries(t[n].map(({element:i,file:o})=>[i,{id:`rId${this.files.indexOf(o)+1}`,fontKey:o.fontKey}]))))),this.relationships=new Re;for(let r=0;r<this.files.length;r++)this.relationships.addRelationship(r+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",`fonts/font${r+1}.odttf`)}get View(){return this.fontTable}get Relationships(){return this.relationships}},Sd=()=>new ae({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),Lw={NONE:"none",DROP:"drop",MARGIN:"margin"},Fw={MARGIN:"margin",PAGE:"page",TEXT:"text"},Mw={AROUND:"around",AUTO:"auto",NONE:"none",NOT_BESIDE:"notBeside",THROUGH:"through",TIGHT:"tight"},Ad=e=>{var t,r;return new ae({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:e.anchorLock},dropCap:{key:"w:dropCap",value:e.dropCap},width:{key:"w:w",value:e.width},height:{key:"w:h",value:e.height},x:{key:"w:x",value:e.position?e.position.x:void 0},y:{key:"w:y",value:e.position?e.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:e.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:e.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(t=e.space)===null||t===void 0?void 0:t.horizontal},spaceVertical:{key:"w:vSpace",value:(r=e.space)===null||r===void 0?void 0:r.vertical},rule:{key:"w:hRule",value:e.rule},alignmentX:{key:"w:xAlign",value:e.alignment?e.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:e.alignment?e.alignment.y:void 0},lines:{key:"w:lines",value:e.lines},wrap:{key:"w:wrap",value:e.wrap}}})},kd={left:"right",right:"left"},xt=class extends ht{constructor(e,{implicitListParagraphStyle:t=!0}={}){if(super("w:pPr",e?.includeIfEmpty),Y(this,"numberingReferences",[]),!e)return this;if(e.heading&&this.push(Xt(e.heading)),t&&(e.bullet&&this.push(Xt("ListParagraph")),e.numbering&&!e.numbering.custom&&!e.style&&!e.heading&&this.push(Xt("ListParagraph"))),e.style&&this.push(Xt(e.style)),e.keepNext!==void 0&&this.push(new he("w:keepNext",e.keepNext)),e.keepLines!==void 0&&this.push(new he("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new od),e.frame&&this.push(Ad(e.frame)),e.widowControl!==void 0&&this.push(new he("w:widowControl",e.widowControl)),e.bullet&&this.push(new tn(1,e.bullet.level)),e.numbering){var r,n;this.numberingReferences.push({reference:e.numbering.reference,instance:(r=e.numbering.instance)!==null&&r!==void 0?r:0}),this.push(new tn(`${e.numbering.reference}-${(n=e.numbering.instance)!==null&&n!==void 0?n:0}`,e.numbering.level))}else e.numbering===!1&&this.push(new tn(0,0));e.border&&this.push(new wu(e.border)),e.thematicBreak&&this.push(new gu),e.shading&&this.push(Wr(e.shading)),e.wordWrap&&this.push(Sd()),e.overflowPunctuation&&this.push(new he("w:overflowPunct",e.overflowPunctuation));let i=[...e.rightTabStop!==void 0?[{type:Fi.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:Fi.LEFT,position:e.leftTabStop}]:[]];i.length>0&&this.push(cd(i)),e.bidirectional!==void 0&&this.push(new he("w:bidi",e.bidirectional)),e.spacing&&this.push(ld(e.spacing)),e.indent&&this.push(yu(e.indent)),e.contextualSpacing!==void 0&&this.push(new he("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(Ma(e.bidirectional&&kd[e.alignment]||e.alignment)),e.outlineLevel!==void 0&&this.push(wd(e.outlineLevel)),e.suppressLineNumbers!==void 0&&this.push(new he("w:suppressLineNumbers",e.suppressLineNumbers)),e.autoSpaceEastAsianText!==void 0&&this.push(new he("w:autoSpaceDN",e.autoSpaceEastAsianText)),e.run&&this.push(new Fu(e.run)),e.revision&&this.push(new Mi(e.revision))}push(e){this.root.push(e)}addSectionProperties(e){let t=this.root.findIndex(r=>r instanceof Mi);if(t===-1){this.root.push(e);return}this.root.splice(t,0,e)}removeSectionProperties(e){let t=this.root.indexOf(e);t!==-1&&this.root.splice(t,1)}prepForXml(e){if(!(e.viewWrapper instanceof Us))for(let t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}},Mi=class extends ee{constructor(e){super("w:pPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.root.push(new xt(ie(ie({},e),{},{includeIfEmpty:!0})))}},Ce=class extends $r{constructor(e){if(super("w:p"),Y(this,"properties",void 0),typeof e=="string")return this.properties=new xt({}),this.root.push(this.properties),this.root.push(new Pt(e)),this;if(this.properties=new xt(e),this.root.push(this.properties),e.text&&this.root.push(new Pt(e.text)),e.children)for(let t of e.children){if(t instanceof Ds){this.root.push(...t.writtenAs);continue}this.root.push(t)}}prepForXml(e){for(let t of this.root)if(t instanceof Ps){let r=this.root.indexOf(t),{target:n,anchor:i}=Bs(t.options.link),o=new ur(t.options.children,Tt(),i,t.options.link);e.viewWrapper.Relationships.addRelationship(o.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",n,ei.EXTERNAL),this.root[r]=o}return super.prepForXml(e)}addSectionProperties(e){this.properties.addSectionProperties(e)}removeSectionProperties(e){this.properties.removeSectionProperties(e)}addRunToFront(e){return this.root.splice(1,0,e),this}},Bw=class extends ee{constructor(e){super("m:oMath");for(let t of e.children)this.root.push(t)}},Id=class extends ee{constructor(e){super("m:t"),/^[\s\u200B]|[\s\u200B]$/.test(e)&&this.root.push(new Le({space:De.PRESERVE})),this.root.push(e)}};function Rd(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function zr(e,t){if(e==null)return{};var r,n,i=Rd(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Cd=["text","normalText","script","literal"],rn={plain:"p",bold:"b",italic:"i",boldItalic:"bi"},nn={roman:"roman",script:"script",fraktur:"fraktur",doubleStruck:"double-struck",sansSerif:"sans-serif",monospace:"monospace"},br=(e,t)=>new ae({name:e,attributes:{value:{key:"m:val",value:t}}}),Uw=class extends ee{constructor(e){var t;super("m:r");let r=typeof e=="string"?{text:e}:e,{text:n,normalText:i,script:o,literal:a}=r,s=(t=zr(r,Cd).style)!==null&&t!==void 0?t:o===void 0||o==="roman"?void 0:"plain";if(i&&(s!==void 0||o!==void 0))throw new Error("MathRun: normalText can't be given with style or script, which are for math. Give one or the other");if(s!==void 0&&!Object.keys(rn).includes(s))throw new Error(`MathRun: style is "${s}", which isn't one of ${Object.keys(rn).join(", ")}`);if(o!==void 0&&!Object.keys(nn).includes(o))throw new Error(`MathRun: script is "${o}", which isn't one of ${Object.keys(nn).join(", ")}`);let u=[...a?[br("m:lit",1)]:[],...i?[br("m:nor",1)]:[],...o===void 0?[]:[br("m:scr",nn[o])],...s===void 0?[]:[br("m:sty",rn[s])]];u.length>0&&this.root.push(new ae({name:"m:rPr",children:u})),this.root.push(new Id(n))}},Nd=class extends ee{constructor(e){super("m:den");for(let t of e)this.root.push(t)}},Od=class extends ee{constructor(e){super("m:num");for(let t of e)this.root.push(t)}},an={stacked:"bar",skewed:"skw",linear:"lin",noBar:"noBar"},Hw=class extends ee{constructor(e){if(super("m:f"),e.type!==void 0){if(!Object.keys(an).includes(e.type))throw new Error(`MathFraction: type is "${e.type}", which isn't one of ${Object.keys(an).join(", ")}`);this.root.push(new ae({name:"m:fPr",children:[new ae({name:"m:type",attributes:{value:{key:"m:val",value:an[e.type]}}})]}))}this.root.push(new Od(e.numerator)),this.root.push(new Nd(e.denominator))}},Pd=({accent:e})=>new ae({name:"m:chr",attributes:{accent:{key:"m:val",value:e}}}),Fe=({children:e})=>new ae({name:"m:e",children:e}),Dd=({value:e})=>new ae({name:"m:limLoc",attributes:{value:{key:"m:val",value:e||"undOvr"}}}),Ld=()=>new ae({name:"m:subHide",attributes:{hide:{key:"m:val",value:1}}}),Fd=()=>new ae({name:"m:supHide",attributes:{hide:{key:"m:val",value:1}}}),Hs=({accent:e,hasSuperScript:t,hasSubScript:r,limitLocationVal:n})=>new ae({name:"m:naryPr",children:[...e?[Pd({accent:e})]:[],Dd({value:n}),...r?[]:[Ld()],...t?[]:[Fd()]]}),cr=({children:e})=>new ae({name:"m:sub",children:e}),sn={aboveBelow:"undOvr",side:"subSup"},Ws=(e,t,r)=>{if(t===void 0)return r;if(!Object.keys(sn).includes(t))throw new Error(`${e}: limits is "${t}", which isn't one of ${Object.keys(sn).join(", ")}`);return sn[t]},hr=({children:e})=>new ae({name:"m:sup",children:e}),Ww=class extends ee{constructor(e){var t,r;super("m:nary"),this.root.push(Hs({accent:"\u2211",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:Ws("MathSum",e.limits,"undOvr")})),this.root.push(cr({children:(t=e.subScript)!==null&&t!==void 0?t:[]})),this.root.push(hr({children:(r=e.superScript)!==null&&r!==void 0?r:[]})),this.root.push(Fe({children:e.children}))}},jw=class extends ee{constructor(e){var t,r;super("m:nary"),this.root.push(Hs({accent:"",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:Ws("MathIntegral",e.limits,"subSup")})),this.root.push(cr({children:(t=e.subScript)!==null&&t!==void 0?t:[]})),this.root.push(hr({children:(r=e.superScript)!==null&&r!==void 0?r:[]})),this.root.push(Fe({children:e.children}))}},js=class extends ee{constructor(e){super("m:lim");for(let t of e)this.root.push(t)}},Gw=class extends ee{constructor(e){super("m:limUpp"),this.root.push(Fe({children:e.children})),this.root.push(new js(e.limit))}},$w=class extends ee{constructor(e){super("m:limLow"),this.root.push(Fe({children:e.children})),this.root.push(new js(e.limit))}},Md=()=>new ae({name:"m:sSupPr"}),zw=class extends ee{constructor(e){super("m:sSup"),this.root.push(Md()),this.root.push(Fe({children:e.children})),this.root.push(hr({children:e.superScript}))}},Bd=()=>new ae({name:"m:sSubPr"}),Kw=class extends ee{constructor(e){super("m:sSub"),this.root.push(Bd()),this.root.push(Fe({children:e.children})),this.root.push(cr({children:e.subScript}))}},Ud=()=>new ae({name:"m:sSubSupPr"}),Vw=class extends ee{constructor(e){super("m:sSubSup"),this.root.push(Ud()),this.root.push(Fe({children:e.children})),this.root.push(cr({children:e.subScript})),this.root.push(hr({children:e.superScript}))}},Hd=()=>new ae({name:"m:sPrePr"}),qw=class extends ae{constructor({children:e,subScript:t,superScript:r}){super({name:"m:sPre",children:[Hd(),cr({children:t}),hr({children:r}),Fe({children:e})]})}},Wd=class extends ee{constructor(e){if(super("m:deg"),e)for(let t of e)this.root.push(t)}},jd=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{hide:"m:val"})}},Gd=class extends ee{constructor(){super("m:degHide"),this.root.push(new jd({hide:1}))}},$d=class extends ee{constructor(e){super("m:radPr"),e||this.root.push(new Gd)}},Xw=class extends ee{constructor(e){super("m:rad"),this.root.push(new $d(!!e.degree)),this.root.push(new Wd(e.degree)),this.root.push(Fe({children:e.children}))}},zd=class extends ee{constructor(e){super("m:fName");for(let t of e)this.root.push(t)}},Kd=class extends ee{constructor(){super("m:funcPr")}},Yw=class extends ee{constructor(e){super("m:func"),this.root.push(new Kd),this.root.push(new zd(e.name)),this.root.push(Fe({children:e.children}))}},Vd=({character:e})=>new ae({name:"m:begChr",attributes:{character:{key:"m:val",value:e}}}),qd=({character:e})=>new ae({name:"m:endChr",attributes:{character:{key:"m:val",value:e}}}),Kr=({characters:e})=>new ae({name:"m:dPr",children:e?[Vd({character:e.beginningCharacter}),qd({character:e.endingCharacter})]:[]}),Zw=class extends ee{constructor(e){super("m:d"),this.root.push(Kr({})),this.root.push(Fe({children:e.children}))}},Jw=class extends ee{constructor(e){super("m:d"),this.root.push(Kr({characters:{beginningCharacter:"[",endingCharacter:"]"}})),this.root.push(Fe({children:e.children}))}},Qw=class extends ee{constructor(e){super("m:d"),this.root.push(Kr({characters:{beginningCharacter:"{",endingCharacter:"}"}})),this.root.push(Fe({children:e.children}))}},e0=class extends ee{constructor(e){super("m:d"),this.root.push(Kr({characters:{beginningCharacter:"\u27E8",endingCharacter:"\u27E9"}})),this.root.push(Fe({children:e.children}))}},Xd={TOP:"top",CENTER:"center",BOTTOM:"bottom"},Yd=ie(ie({},Xd),{},{BOTH:"both"}),t0=Yd,Gs=e=>new ae({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:e}}}),Zd=({space:e,count:t,separate:r,equalWidth:n,children:i})=>new ae({name:"w:cols",attributes:{space:{key:"w:space",value:e===void 0?void 0:Se(e)},count:{key:"w:num",value:t===void 0?void 0:Te(t)},separate:{key:"w:sep",value:r},equalWidth:{key:"w:equalWidth",value:n}},children:!n&&i?i:void 0}),r0={DEFAULT:"default",LINES:"lines",LINES_AND_CHARS:"linesAndChars",SNAP_TO_CHARS:"snapToChars"},Jd=({type:e,linePitch:t,charSpace:r})=>new ae({name:"w:docGrid",attributes:{type:{key:"w:type",value:e},linePitch:{key:"w:linePitch",value:Te(t)},charSpace:{key:"w:charSpace",value:r?Te(r):void 0}}}),Nt={DEFAULT:"default",FIRST:"first",EVEN:"even"},Bi={HEADER:"w:headerReference",FOOTER:"w:footerReference"},on=(e,t)=>new ae({name:e,attributes:{type:{key:"w:type",value:t.type||Nt.DEFAULT},id:{key:"r:id",value:`rId${t.id}`}}}),n0={NEW_PAGE:"newPage",NEW_SECTION:"newSection",CONTINUOUS:"continuous"},Qd=({countBy:e,start:t,restart:r,distance:n})=>new ae({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:e===void 0?void 0:Te(e)},start:{key:"w:start",value:t===void 0?void 0:Te(t)},restart:{key:"w:restart",value:r},distance:{key:"w:distance",value:n===void 0?void 0:Se(n)}}}),i0={PAGE_BOTTOM:"pageBottom",BENEATH_TEXT:"beneathText",SECTION_END:"sectEnd",DOCUMENT_END:"docEnd"},a0={SECTION_END:"sectEnd",DOCUMENT_END:"docEnd"},s0={CONTINUOUS:"continuous",EACH_SECTION:"eachSect",EACH_PAGE:"eachPage"},$s=({name:e,position:t,numberFormat:r,start:n,restart:i})=>new ae({name:e,children:[...t===void 0?[]:[new ae({name:"w:pos",attributes:{val:{key:"w:val",value:t}}})],...r?[new ae({name:"w:numFmt",attributes:{val:{key:"w:val",value:r.type},format:{key:"w:format",value:r.format}}})]:[],...n===void 0?[]:[new ae({name:"w:numStart",attributes:{val:{key:"w:val",value:Te(n)}}})],...i===void 0?[]:[new ae({name:"w:numRestart",attributes:{val:{key:"w:val",value:i}}})]]}),ef=e=>$s(ie({name:"w:footnotePr"},e)),tf=e=>$s(ie({name:"w:endnotePr"},e)),o0={ALL_PAGES:"allPages",FIRST_PAGE:"firstPage",NOT_FIRST_PAGE:"notFirstPage"},l0={PAGE:"page",TEXT:"text"},u0={BACK:"back",FRONT:"front"},Ui=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}},rf=class extends ht{constructor(e){if(super("w:pgBorders"),!e)return this;e.pageBorders?this.root.push(new Ui({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new Ui({})),e.pageBorderTop&&this.root.push(be("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(be("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(be("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(be("w:right",e.pageBorderRight))}},nf=(e,t,r,n,i,o,a)=>new ae({name:"w:pgMar",attributes:{top:{key:"w:top",value:Xe(e)},right:{key:"w:right",value:Se(t)},bottom:{key:"w:bottom",value:Xe(r)},left:{key:"w:left",value:Se(n)},header:{key:"w:header",value:Se(i)},footer:{key:"w:footer",value:Se(o)},gutter:{key:"w:gutter",value:Se(a)}}}),af={HYPHEN:"hyphen",PERIOD:"period",COLON:"colon",EM_DASH:"emDash",EN_DASH:"endash"},sf=({start:e,formatType:t,separator:r,chapterHeadingLevel:n})=>new ae({name:"w:pgNumType",attributes:{start:{key:"w:start",value:e===void 0?void 0:Te(e)},formatType:{key:"w:fmt",value:t},separator:{key:"w:chapSep",value:r===af.EN_DASH?"enDash":r},chapterHeadingLevel:{key:"w:chapStyle",value:n===void 0?void 0:Te(n)}}}),Rr={PORTRAIT:"portrait",LANDSCAPE:"landscape"},of=({width:e,height:t,orientation:r,code:n})=>{let i=Se(e),o=Se(t);return new ae({name:"w:pgSz",attributes:{width:{key:"w:w",value:r===Rr.LANDSCAPE?o:i},height:{key:"w:h",value:r===Rr.LANDSCAPE?i:o},orientation:{key:"w:orient",value:r},code:{key:"w:code",value:n}}})},c0={LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},lf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},uf=class extends ee{constructor(e){super("w:textDirection"),this.root.push(new lf({val:e}))}},h0={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"},cf=e=>new ae({name:"w:type",attributes:{val:{key:"w:val",value:e}}}),Ve={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},xr={WIDTH:11906,HEIGHT:16838,ORIENTATION:Rr.PORTRAIT},Nn=class zs extends ee{constructor({page:{size:{width:t=xr.WIDTH,height:r=xr.HEIGHT,orientation:n=xr.ORIENTATION,code:i}={},margin:{top:o=Ve.TOP,right:a=Ve.RIGHT,bottom:s=Ve.BOTTOM,left:u=Ve.LEFT,header:h=Ve.HEADER,footer:m=Ve.FOOTER,gutter:f=Ve.GUTTER}={},pageNumbers:w={},borders:p,textDirection:d}={},grid:{linePitch:v=360,charSpace:_,type:S}={},headerWrapperGroup:E={},footerWrapperGroup:N={},lineNumbers:C,titlePage:T,verticalAlign:g,column:O,type:M,footnoteProperties:k,endnoteProperties:q,revision:te}={}){super("w:sectPr"),Y(this,"availableTextWidth",void 0),this.availableTextWidth=zs.calculateAvailableTextWidth({pageWidth:n===Rr.LANDSCAPE?r:t,left:u,right:a,gutter:f,column:O}),this.addHeaderFooterGroup(Bi.HEADER,E),this.addHeaderFooterGroup(Bi.FOOTER,N),k&&this.root.push(ef(k)),q&&this.root.push(tf(q)),M&&this.root.push(cf(M)),this.root.push(of({width:t,height:r,orientation:n,code:i})),this.root.push(nf(o,a,s,u,h,m,f)),p&&this.root.push(new rf(p)),C&&this.root.push(Qd(C)),this.root.push(sf(w)),O&&this.root.push(Zd(O)),g&&this.root.push(Gs(g)),T!==void 0&&this.root.push(new he("w:titlePg",T)),d&&this.root.push(new uf(d)),this.root.push(Jd({linePitch:v,charSpace:_,type:S})),te&&this.root.push(new hf(te))}get AvailableTextWidth(){return this.availableTextWidth}static calculateAvailableTextWidth({pageWidth:t,left:r,right:n,gutter:i,column:o}){var a,s;let u=Rt(t)-Rt(r)-Rt(n)-Rt(i),h=(a=o?.count)!==null&&a!==void 0?a:1;return h<=1?u:(u-Rt((s=o?.space)!==null&&s!==void 0?s:720)*(h-1))/h}addHeaderFooterGroup(t,r){r.default&&this.root.push(on(t,{type:Nt.DEFAULT,id:r.default.View.ReferenceId})),r.first&&this.root.push(on(t,{type:Nt.FIRST,id:r.first.View.ReferenceId})),r.even&&this.root.push(on(t,{type:Nt.EVEN,id:r.even.View.ReferenceId}))}},hf=class extends ee{constructor(e){super("w:sectPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.root.push(new Nn(e))}},Ks=class extends ee{constructor({pageNumbers:e}={}){super("w:body"),Y(this,"sections",[]),Y(this,"sectionParagraphs",new Map),Y(this,"headingBookmarkIds",new Sh),Y(this,"pageNumbers",void 0),this.pageNumbers=e}getSectionPropertiesFor(e){let t=e?Math.max(this.root.indexOf(e),0):0;for(let r=t;r<this.root.length;r++){let n=this.root[r];if(n instanceof Nn)return n;let i=this.sectionParagraphs.get(n);if(i)return i}return this.sections[this.sections.length-1]}addSection(e){let t=this.sections.pop(),r=this.lastParagraphOfSection();if(t&&r)this.sectionParagraphs.set(r,t);else{let n=this.createSectionParagraph();this.root.push(n),t&&this.sectionParagraphs.set(n,t)}this.sections.push(new Nn(e))}prepForXml(e){this.sections.length===1&&(this.root.splice(0,1),this.root.push(this.sections.pop()));for(let[r,n]of this.sectionParagraphs)r.addSectionProperties(n);let t;try{t=super.prepForXml(e)}finally{for(let[r,n]of this.sectionParagraphs)r.removeSectionProperties(n)}return Bh(t,e,this.headingBookmarkIds),this.pageNumbers&&($h(t,e),zh(t,e,this.pageNumbers)),t}push(e){let t=e instanceof Ce?this.sectionParagraphs.get(e):void 0;if(t){let r=this.createSectionParagraph();this.root.splice(this.root.indexOf(e)+1,0,r),this.sectionParagraphs.delete(e),this.sectionParagraphs.set(r,t)}this.root.push(e)}lastParagraphOfSection(){let e=this.root[this.root.length-1];return e instanceof Ce&&e!==this.root[0]&&!this.sectionParagraphs.has(e)&&this.root.indexOf(e)===this.root.length-1?e:void 0}createSectionParagraph(){return new Ce({})}},it={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"},rr=(e,{type:t=it.AUTO,size:r})=>{let n=r;return t===it.PERCENTAGE&&typeof r=="number"&&(n=Math.round(r*50)),new ae({name:e,attributes:{type:{key:"w:type",value:t},size:{key:"w:w",value:Fa(n)}}})},Tr=xr.WIDTH-Ve.LEFT-Ve.RIGHT-Ve.GUTTER,Vs=e=>e.options.columnSpan||1,hi=(e,t)=>{if(!e)return;let{type:r=it.AUTO,size:n}=e;if(r!==it.PERCENTAGE&&r!==it.DXA)return;let i=typeof n=="number"?r===it.PERCENTAGE?n/100*t:n:n.endsWith("%")?Number(n.slice(0,-1))/100*t:Rt(n);return i>0?i:void 0},df=(e,t)=>{var r;return(r=hi(e,t))!==null&&r!==void 0?r:t},ff=e=>Math.max(0,...e.map(t=>t.cells.reduce((r,n)=>r+Vs(n),0))),Hi=({rows:e,width:t,availableWidth:r})=>{let n=ff(e);if(n===0)return[];let i=df(t,r),o=Array.from({length:n},()=>{}),a=[];for(let m of e){let f=0;for(let w of m.cells){let p=Vs(w),d=hi(w.options.width,i);if(d!==void 0)if(p===1){var s,u;(u=o[s=f])!==null&&u!==void 0||(o[s]=d)}else a.push({start:f,span:p,width:d});f+=p}}for(let{start:m,span:f,width:w}of a){let p=Array.from({length:f},(_,S)=>m+S).filter(_=>_<n),d=p.filter(_=>o[_]===void 0),v=w-p.reduce((_,S)=>{var E;return _+((E=o[S])!==null&&E!==void 0?E:0)},0);if(d.length>0&&v>0)for(let _ of d)o[_]=v/d.length}let h=o.flatMap((m,f)=>m===void 0?[f]:[]);if(h.length>0){let m=i-o.reduce((w,p)=>w+(p??0),0),f=m>0?m/h.length:i/n;for(let w of h)o[w]=f}return o.map(m=>Math.round(m))},pf=e=>new ae({name:"w:gridCol",attributes:e!==void 0?{width:{key:"w:w",value:Se(e)}}:void 0}),Sr=class extends ee{constructor(e,t){super("w:tblGrid");for(let r of e)this.root.push(pf(r));t&&this.root.push(new vf(t))}},mf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id"})}},vf=class extends ee{constructor(e){super("w:tblGridChange"),this.root.push(new mf({id:e.id})),this.root.push(new Sr(e.columnWidths))}},d0=class extends ee{constructor(e){super("w:ins"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.addChildElement(new Pt(e))}},wf=class extends ee{constructor(){super("w:delInstrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("PAGE")}},gf=class extends ee{constructor(){super("w:delInstrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("NUMPAGES")}},yf=class extends ee{constructor(){super("w:delInstrText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push("SECTIONPAGES")}},Wi=class extends ee{constructor(e){super("w:delText"),this.root.push(new Le({space:De.PRESERVE})),this.root.push(e)}},f0=class extends ee{constructor(e){super("w:del"),Y(this,"deletedTextRunWrapper",void 0),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new bf(e),this.addChildElement(this.deletedTextRunWrapper)}},bf=class qs extends ee{constructor(t){if(super("w:r"),Y(this,"following",[]),this.root.push(new st(t)),t.children)for(let[r,n]of t.children.entries()){if(n instanceof xe){let i=t.children.slice(r+1);this.following=[n,...i.length>0?[new qs(ie(ie({},t),{},{break:void 0,children:i}))]:[]];break}if(typeof n=="string"){switch(n){case yt.CURRENT:this.root.push(ut()),this.root.push(new wf),this.root.push(We()),this.root.push(je());break;case yt.TOTAL_PAGES:this.root.push(ut()),this.root.push(new gf),this.root.push(We()),this.root.push(je());break;case yt.TOTAL_PAGES_IN_SECTION:this.root.push(ut()),this.root.push(new yf),this.root.push(We()),this.root.push(je());break;default:this.root.push(new Wi(n))}continue}this.root.push(n)}else t.text&&this.root.push(new Wi(t.text));if(t.break)for(let r=0;r<t.break;r++)this.root.splice(1,0,Wa())}get writtenAs(){return this.following.length>0?[this,...this.following.flatMap(t=>{var r;return(r=t.writtenAs)!==null&&r!==void 0?r:t})]:void 0}},_f=class extends ee{constructor(e){super("w:ins"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},Ef=class extends ee{constructor(e){super("w:del"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},xf=class extends ee{constructor(e){super("w:cellIns"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},Tf=class extends ee{constructor(e){super("w:cellDel"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date}))}},p0={CONTINUE:"cont",RESTART:"rest"},Sf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date",verticalMerge:"w:vMerge",verticalMergeOriginal:"w:vMergeOrig"})}},Af=class extends ee{constructor(e){super("w:cellMerge"),this.root.push(new Sf(e))}},Xs=({marginUnitType:e=it.DXA,top:t,left:r,bottom:n,right:i})=>[{name:"w:top",size:t},{name:"w:left",size:r},{name:"w:bottom",size:n},{name:"w:right",size:i}].filter(o=>o.size!==void 0).map(({name:o,size:a})=>rr(o,{type:e,size:a})),kf=e=>{let t=Xs(e);if(t.length!==0)return new ae({name:"w:tblCellMar",children:t})},If=e=>{let t=Xs(e);if(t.length!==0)return new ae({name:"w:tcMar",children:t})},Rf=class extends ht{constructor(e){super("w:tcBorders"),e.top&&this.root.push(be("w:top",e.top)),e.start&&this.root.push(be("w:start",e.start)),e.left&&this.root.push(be("w:left",e.left)),e.bottom&&this.root.push(be("w:bottom",e.bottom)),e.end&&this.root.push(be("w:end",e.end)),e.right&&this.root.push(be("w:right",e.right))}},Cf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},Nf=class extends ee{constructor(e){super("w:gridSpan"),this.root.push(new Cf({val:Te(e)}))}},Ys={CONTINUE:"continue",RESTART:"restart"},Of=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},ji=class extends ee{constructor(e){super("w:vMerge"),this.root.push(new Of({val:e}))}},m0={BOTTOM_TO_TOP_LEFT_TO_RIGHT:"btLr",LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},Pf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},Df=class extends ee{constructor(e){super("w:textDirection"),this.root.push(new Pf({val:e}))}},Zs=class extends ht{constructor(e){if(super("w:tcPr",e.includeIfEmpty),Y(this,"hasWidth",void 0),Y(this,"hasColumnWidth",!1),this.hasWidth=e.width!==void 0,e.width&&this.root.push(rr("w:tcW",e.width)),e.columnSpan&&this.root.push(new Nf(e.columnSpan)),e.verticalMerge?this.root.push(new ji(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new ji(Ys.RESTART)),e.borders&&this.root.push(new Rf(e.borders)),e.shading&&this.root.push(Wr(e.shading)),e.margins){let t=If(e.margins);t&&this.root.push(t)}e.textDirection&&this.root.push(new Df(e.textDirection)),e.verticalAlign&&this.root.push(Gs(e.verticalAlign)),e.insertion&&this.root.push(new xf(e.insertion)),e.deletion&&this.root.push(new Tf(e.deletion)),e.cellMerge&&this.root.push(new Af(e.cellMerge)),e.revision&&this.root.push(new Lf(e.revision))}setColumnWidth(e){this.hasWidth||(this.root.splice(0,this.hasColumnWidth?1:0,rr("w:tcW",{size:e,type:it.DXA})),this.hasColumnWidth=!0)}},Lf=class extends ee{constructor(e){super("w:tcPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.root.push(new Zs(ie(ie({},e),{},{includeIfEmpty:!0})))}},On=class extends ee{constructor(e){super("w:tc"),Y(this,"options",void 0),Y(this,"properties",void 0),this.options=e,this.properties=new Zs(e),this.root.push(this.properties);for(let t of e.children)this.root.push(t)}setColumnWidth(e){this.properties.setColumnWidth(e)}prepForXml(e){return this.root[this.root.length-1]instanceof Ce||this.root.push(new Ce({})),super.prepForXml(e)}},Pn=(e,t)=>t?new he(e):new at(e,"off"),St={style:Zn.NONE,size:0,color:"auto"},At={style:Zn.SINGLE,size:4,color:"auto"},Js=class extends ee{constructor(e){var t,r,n,i,o,a;super("w:tblBorders"),this.root.push(be("w:top",(t=e.top)!==null&&t!==void 0?t:At)),this.root.push(be("w:left",(r=e.left)!==null&&r!==void 0?r:At)),this.root.push(be("w:bottom",(n=e.bottom)!==null&&n!==void 0?n:At)),this.root.push(be("w:right",(i=e.right)!==null&&i!==void 0?i:At)),this.root.push(be("w:insideH",(o=e.insideHorizontal)!==null&&o!==void 0?o:At)),this.root.push(be("w:insideV",(a=e.insideVertical)!==null&&a!==void 0?a:At))}};Y(Js,"NONE",{top:St,bottom:St,left:St,right:St,insideHorizontal:St,insideVertical:St});var v0={MARGIN:"margin",PAGE:"page",TEXT:"text"},w0={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},g0={CENTER:"center",INSIDE:"inside",BOTTOM:"bottom",OUTSIDE:"outside",INLINE:"inline",TOP:"top"},y0={NEVER:"never",OVERLAP:"overlap"},Ff=({horizontalAnchor:e,verticalAnchor:t,absoluteHorizontalPosition:r,relativeHorizontalPosition:n,absoluteVerticalPosition:i,relativeVerticalPosition:o,bottomFromText:a,topFromText:s,leftFromText:u,rightFromText:h})=>new ae({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:u===void 0?void 0:Se(u)},rightFromText:{key:"w:rightFromText",value:h===void 0?void 0:Se(h)},topFromText:{key:"w:topFromText",value:s===void 0?void 0:Se(s)},bottomFromText:{key:"w:bottomFromText",value:a===void 0?void 0:Se(a)},absoluteHorizontalPosition:{key:"w:tblpX",value:r===void 0?void 0:Xe(r)},absoluteVerticalPosition:{key:"w:tblpY",value:i===void 0?void 0:Xe(i)},horizontalAnchor:{key:"w:horzAnchor",value:e},relativeHorizontalPosition:{key:"w:tblpXSpec",value:n},relativeVerticalPosition:{key:"w:tblpYSpec",value:o},verticalAnchor:{key:"w:vertAnchor",value:t}}}),b0={AUTOFIT:"autofit",FIXED:"fixed"},Mf=e=>new ae({name:"w:tblLayout",attributes:{type:{key:"w:type",value:e}}}),Bf={DXA:"dxa",NIL:"nil"},Qs=({type:e=Bf.DXA,value:t})=>new ae({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:e},value:{key:"w:w",value:Fa(t)}}}),Uf=({firstRow:e,lastRow:t,firstColumn:r,lastColumn:n,noHBand:i,noVBand:o})=>new ae({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:e},lastRow:{key:"w:lastRow",value:t},firstColumn:{key:"w:firstColumn",value:r},lastColumn:{key:"w:lastColumn",value:n},noHBand:{key:"w:noHBand",value:i},noVBand:{key:"w:noVBand",value:o}}}),Hf=e=>new ae({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:e}}}),di=class extends ht{constructor(e){var t;if(super("w:tblPr",e.includeIfEmpty),e.style&&this.root.push(new at("w:tblStyle",e.style)),e.float&&this.root.push(Ff(e.float)),!((t=e.float)===null||t===void 0)&&t.overlap&&this.root.push(Hf(e.float.overlap)),e.visuallyRightToLeft!==void 0&&this.root.push(Pn("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(rr("w:tblW",e.width)),e.alignment&&this.root.push(Ma(e.alignment)),e.cellSpacing&&this.root.push(Qs(e.cellSpacing)),e.indent&&this.root.push(rr("w:tblInd",e.indent)),e.borders&&this.root.push(new Js(e.borders)),e.shading&&this.root.push(Wr(e.shading)),e.layout&&this.root.push(Mf(e.layout)),e.cellMargin){let r=kf(e.cellMargin);r&&this.root.push(r)}e.tableLook&&this.root.push(Uf(e.tableLook)),e.revision&&this.root.push(new Wf(e.revision))}},Wf=class extends ee{constructor(e){super("w:tblPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.root.push(new di(ie(ie({},e),{},{includeIfEmpty:!0})))}},_0={AUTO:"auto",ATLEAST:"atLeast",EXACT:"exact"},jf=(e,t)=>new ae({name:"w:trHeight",attributes:{value:{key:"w:val",value:Se(e)},rule:{key:"w:hRule",value:t}}}),eo=class extends ht{constructor(e){super("w:trPr",e.includeIfEmpty),e.cantSplit!==void 0&&this.root.push(Pn("w:cantSplit",e.cantSplit)),e.tableHeader!==void 0&&this.root.push(Pn("w:tblHeader",e.tableHeader)),e.height&&this.root.push(jf(e.height.value,e.height.rule)),e.cellSpacing&&this.root.push(Qs(e.cellSpacing)),e.insertion&&this.root.push(new _f(e.insertion)),e.deletion&&this.root.push(new Ef(e.deletion)),e.revision&&this.root.push(new Gf(e.revision))}},Gf=class extends ee{constructor(e){super("w:trPrChange"),this.root.push(new Pe({id:e.id,author:e.author,date:e.date})),this.root.push(new eo(ie(ie({},e),{},{includeIfEmpty:!0})))}},$f=class extends ee{constructor(e){super("w:tr"),Y(this,"options",void 0),this.options=e,this.root.push(new eo(e));for(let t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter(e=>e instanceof On)}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){let 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<e;r++){let n=this.root[r];t+=n.options.columnSpan||1}return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let r=0,n=1;for(;r<=e;){if(n>=this.root.length){if(t)return this.root.length;throw new Error(`cell 'columnIndex' should not great than ${r-1}`)}let i=this.root[n];n+=1,r+=i&&i.options.columnSpan||1}return n-1}},E0=class to extends $r{constructor({rows:t,width:r,columnWidths:n,columnWidthsRevision:i,margins:o,indent:a,float:s,layout:u,style:h,borders:m,alignment:f,visuallyRightToLeft:w,tableLook:p,cellSpacing:d,revision:v}){super("w:tbl"),Y(this,"rows",void 0),Y(this,"width",void 0),Y(this,"columnWidths",void 0),Y(this,"columnWidthsRevision",void 0),Y(this,"resolvedColumnWidths",void 0),this.rows=t,this.width=r??{size:100},this.columnWidths=n,this.columnWidthsRevision=i,t.forEach((_,S)=>{if(S===t.length-1)return;let E=0;_.cells.forEach(N=>{if(N.options.rowSpan&&N.options.rowSpan>1){let C=new On({rowSpan:N.options.rowSpan-1,columnSpan:N.options.columnSpan,borders:N.options.borders,children:[],verticalMerge:Ys.CONTINUE});t[S+1].addCellToColumnIndex(C,E)}E+=N.options.columnSpan||1})}),this.setCellWidths(Tr),this.resolvedColumnWidths=n??Hi({rows:t,width:this.width,availableWidth:Tr}),this.root.push(new di({borders:m??{},width:this.width,indent:a,float:s,layout:u,style:h,alignment:f,cellMargin:o,visuallyRightToLeft:w,tableLook:p,cellSpacing:d,revision:v})),this.root.push(new Sr(this.resolvedColumnWidths,i));for(let _ of t)this.root.push(_)}get ColumnWidths(){return this.resolvedColumnWidths}getCellWidth(t,r){let{cells:n}=t,i=n.indexOf(r);if(i===-1)return;let o=n.slice(0,i).reduce((s,u)=>s+(u.options.columnSpan||1),0),a=this.resolvedColumnWidths.slice(o,o+(r.options.columnSpan||1));return a.length===0?void 0:a.reduce((s,u)=>s+u,0)}prepForXml(t){if(this.setCellWidths(this.resolveAvailableWidth(t)),this.columnWidths===void 0){this.resolvedColumnWidths=Hi({rows:this.rows,width:this.width,availableWidth:this.resolveAvailableWidth(t)});let r=this.root.findIndex(n=>n instanceof Sr);this.root[r]=new Sr(this.resolvedColumnWidths,this.columnWidthsRevision)}return super.prepForXml(t)}setCellWidths(t){var r;if(this.columnWidths===void 0)return;let n=this.columnWidths.reduce((a,s)=>a+s,0),i=(r=hi(this.width,t))!==null&&r!==void 0?r:0,o=n>0&&i>n?i/n:1;for(let a of this.rows){let s=0;for(let u of a.cells){let h=u.options.columnSpan||1,m=this.columnWidths.slice(s,s+h),f=Math.round(m.reduce((w,p)=>w+p,0)*o);m.length===h&&f>0&&u.setColumnWidth(f),s+=h}}}resolveAvailableWidth(t){var r,n,i;let{stack:o}=t,a=o[o.length-1],s=o[o.length-2],u=o[o.length-3];if(a instanceof On&&s instanceof $f&&u instanceof to){let w=u.getCellWidth(s,a);if(w!==void 0)return w}let h=o.findIndex(w=>w instanceof Ks),m=(r=t.file)===null||r===void 0||(r=r.Document)===null||r===void 0?void 0:r.View.Body,f=h>=0?o[h].getSectionPropertiesFor((n=o[h+1])!==null&&n!==void 0?n:this):m?.getSectionPropertiesFor();return(i=f?.AvailableTextWidth)!==null&&i!==void 0?i:Tr}},zf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},Kf=class extends ee{constructor(){super("Properties"),this.root.push(new zf({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}},Vf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns"})}},rt=(e,t)=>new ae({name:"Default",attributes:{contentType:{key:"ContentType",value:e},extension:{key:"Extension",value:t}}}),ke=(e,t)=>new ae({name:"Override",attributes:{contentType:{key:"ContentType",value:e},partName:{key:"PartName",value:t}}}),qf=class extends ee{constructor(){super("Types"),this.root.push(new Vf({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(rt("image/png","png")),this.root.push(rt("image/jpeg","jpeg")),this.root.push(rt("image/jpeg","jpg")),this.root.push(rt("image/bmp","bmp")),this.root.push(rt("image/gif","gif")),this.root.push(rt("image/svg+xml","svg")),this.root.push(rt("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(rt("application/xml","xml")),this.root.push(rt("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(ke("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml")),this.root.push(ke("application/vnd.openxmlformats-officedocument.theme+xml","/word/theme/theme1.xml"))}addComments(){this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml"))}addCommentsExtended(){this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml","/word/commentsExtended.xml"))}addCommentsIds(){this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml","/word/commentsIds.xml"))}addFooter(e){this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addOverride(e,t){this.root.push(ke(e,t))}addHeader(e){this.root.push(ke("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}},Dn={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",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",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"},Vr=class extends me{constructor(e,t){super(ie({Ignorable:t},Object.fromEntries(e.map(r=>[r,Dn[r]])))),Y(this,"xmlKeys",ie({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(Dn).map(r=>[r,`xmlns:${r}`]))))}},Xf=class extends ee{constructor(e){super("cp:coreProperties"),this.root.push(new Vr(["cp","dc","dcterms","dcmitype","xsi"])),e.title&&this.root.push(new wt("dc:title",e.title)),e.subject&&this.root.push(new wt("dc:subject",e.subject)),e.creator&&this.root.push(new wt("dc:creator",e.creator)),e.keywords&&this.root.push(new wt("cp:keywords",e.keywords)),e.description&&this.root.push(new wt("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new wt("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new wt("cp:revision",String(e.revision))),this.root.push(new Gi("dcterms:created")),this.root.push(new Gi("dcterms:modified"))}},Yf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{type:"xsi:type"})}},Gi=class extends ee{constructor(e){super(e),this.root.push(new Yf({type:"dcterms:W3CDTF"})),this.root.push(iu(new Date))}},Zf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},Jf=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}},Qf=class extends ee{constructor(e,t){super("property"),this.root.push(new Jf({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new ep(t.value))}},ep=class extends ee{constructor(e){super("vt:lpwstr"),this.root.push(e)}},tp=class extends ee{constructor(e){super("Properties"),Y(this,"nextId",void 0),Y(this,"properties",[]),this.root.push(new Zf({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(let t of e)this.addCustomProperty(t)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.properties),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new Qf(this.nextId++,e))}},rp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{width:"w:w",space:"w:space"})}},x0=class extends ee{constructor(e){super("w:col"),this.root.push(new rp({width:Se(e.width),space:e.space===void 0?void 0:Se(e.space)}))}},T0=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}},np=class extends ee{constructor({color:e,themeColor:t,themeShade:r,themeTint:n}){if(super("w:background"),typeof e=="object"&&(t!==void 0||r!==void 0||n!==void 0))throw new Error("Invalid background. Expected a theme color in color, or themeColor, themeShade and themeTint, not both");this.root.push(new Xn([{keys:ar,color:e},{key:"w:themeColor",value:t},{key:"w:themeShade",value:r===void 0?void 0:xi(r)},{key:"w:themeTint",value:n===void 0?void 0:xi(n)}]))}},ip=class extends ee{constructor(e){super("w:document"),Y(this,"body",void 0),this.root.push(new Vr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new Ks({pageNumbers:e.pageNumbers}),e.background&&this.root.push(new np(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}},ap=class{constructor(e){Y(this,"document",void 0),Y(this,"relationships",void 0),this.document=new ip(e),this.relationships=new Re}get View(){return this.document}get Relationships(){return this.relationships}},sp=class extends me{constructor(...e){super(...e),Y(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"})}},op=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{type:"w:type",id:"w:id"})}},ro=class extends xe{constructor(){super({style:"EndnoteReference"}),this.root.push(new ad)}},$i={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"},ln=class extends ee{constructor(e){super("w:endnote"),this.root.push(new op({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){let r=e.children[t];t===0&&r.addRunToFront(new ro),this.root.push(r)}}},lp=class extends ee{constructor(){super("w:continuationSeparator")}},no=class extends xe{constructor(){super({}),this.root.push(new lp)}},up=class extends ee{constructor(){super("w:separator")}},io=class extends xe{constructor(){super({}),this.root.push(new up)}},ao=class extends ee{constructor(){super("w:endnotes"),this.root.push(new sp({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"}));let e=new ln({id:-1,type:$i.SEPARATOR,children:[new Ce({spacing:{after:0,line:240,lineRule:Dt.AUTO},children:[new io]})]});this.root.push(e);let t=new ln({id:0,type:$i.CONTINUATION_SEPARATOR,children:[new Ce({spacing:{after:0,line:240,lineRule:Dt.AUTO},children:[new no]})]});this.root.push(t)}createEndnote(e,t){let r=new ln({id:e,children:t});this.root.push(r)}prepForXml(e){let t=super.prepForXml(e);return lr(t,e),t}},cp=class{constructor(){Y(this,"endnotes",void 0),Y(this,"relationships",void 0),this.endnotes=new ao,this.relationships=new Re}get View(){return this.endnotes}get Relationships(){return this.relationships}},hp=class extends me{constructor(...e){super(...e),Y(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"})}},dp=class extends Pa{constructor(e,t){super("w:ftr",t),Y(this,"refId",void 0),this.refId=e,t||this.root.push(new hp({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)}prepForXml(e){let t=super.prepForXml(e);return lr(t,e,this.refId),t}},fp=class{constructor(e,t,r){Y(this,"media",void 0),Y(this,"footer",void 0),Y(this,"relationships",void 0),this.media=e,this.footer=new dp(t,r),this.relationships=new Re}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}},pp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{type:"w:type",id:"w:id"})}},mp=class extends ee{constructor(){super("w:footnoteRef")}},so=class extends xe{constructor(){super({style:"FootnoteReference"}),this.root.push(new mp)}},zi={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"},un=class extends ee{constructor(e){super("w:footnote"),this.root.push(new pp({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){let r=e.children[t];t===0&&r.addRunToFront(new so),this.root.push(r)}}},vp=class extends me{constructor(...e){super(...e),Y(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"})}},oo=class extends ee{constructor(){super("w:footnotes"),this.root.push(new vp({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"}));let e=new un({id:-1,type:zi.SEPERATOR,children:[new Ce({spacing:{after:0,line:240,lineRule:Dt.AUTO},children:[new io]})]});this.root.push(e);let t=new un({id:0,type:zi.CONTINUATION_SEPERATOR,children:[new Ce({spacing:{after:0,line:240,lineRule:Dt.AUTO},children:[new no]})]});this.root.push(t)}createFootNote(e,t){let r=new un({id:e,children:t});this.root.push(r)}prepForXml(e){let t=super.prepForXml(e);return lr(t,e),t}},wp=class{constructor(){Y(this,"footnotess",void 0),Y(this,"relationships",void 0),this.footnotess=new oo,this.relationships=new Re}get View(){return this.footnotess}get Relationships(){return this.relationships}},gp=class extends me{constructor(...e){super(...e),Y(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",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",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}},yp=class extends Pa{constructor(e,t){super("w:hdr",t),Y(this,"refId",void 0),this.refId=e,t||this.root.push(new gp({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",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);return lr(t,e,this.refId),t}},bp=class{constructor(e,t,r){Y(this,"media",void 0),Y(this,"header",void 0),Y(this,"relationships",void 0),this.media=e,this.header=new yp(t,r),this.relationships=new Re}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}},lo=class{constructor(){Y(this,"map",void 0),this.map=new Map}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}},nt={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH__DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULLSTOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PARENTHESES:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW1:"hebrew1",HEBREW2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"},_p=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w:tentative"})}},Ep=class extends ee{constructor(e){super("w:numFmt"),this.root.push(new Ne({val:e}))}},xp=class extends ee{constructor(e){super("w:lvlText"),this.root.push(new Ne({val:e}))}},Tp=e=>{switch(e){case Me.CENTER:return"center";case Me.END:case Me.RIGHT:return"right";default:return"left"}},Sp=class extends ee{constructor(e){super("w:lvlJc"),this.root.push(new Ne({val:Tp(e)}))}},S0={NOTHING:"nothing",SPACE:"space",TAB:"tab"},Ap=class extends ee{constructor(e){super("w:suff"),this.root.push(new Ne({val:e}))}},kp=class extends ee{constructor(){super("w:isLgl")}},uo=class extends ee{constructor({level:e,format:t,text:r,alignment:n=Me.START,start:i=1,style:o,suffix:a,isLegalNumberingStyle:s}){if(super("w:lvl"),Y(this,"paragraphProperties",void 0),Y(this,"runProperties",void 0),this.root.push(new Zt("w:start",Te(i))),t&&this.root.push(new Ep(t)),o?.style&&this.root.push(Xt(o.style)),s&&this.root.push(new kp),a&&this.root.push(new Ap(a)),r&&this.root.push(new xp(r)),this.root.push(new Sp(n)),this.paragraphProperties=new xt(o&&o.paragraph,{implicitListParagraphStyle:!1}),this.runProperties=new st(o?.run&&ie(ie({},o.run),{},{highlight:void 0,math:void 0,revision:void 0})),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 _p({ilvl:Te(e),tentative:1}))}},Ip=class extends uo{},A0=class extends uo{},Rp=class extends ee{constructor(e){super("w:multiLevelType"),this.root.push(new Ne({val:e}))}},Cp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}},Ki=class extends ee{constructor(e,t){super("w:abstractNum"),Y(this,"id",void 0),this.root.push(new Cp({abstractNumId:Te(e),restartNumberingAfterBreak:0})),this.root.push(new Rp("hybridMultilevel")),this.id=e;for(let r of t)this.root.push(new Ip(r))}},Np=class extends ee{constructor(e){super("w:abstractNumId"),this.root.push(new Ne({val:e}))}},Op=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{numId:"w:numId"})}},Vi=class extends ee{constructor(e){if(super("w:num"),Y(this,"numId",void 0),Y(this,"reference",void 0),Y(this,"instance",void 0),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new Op({numId:Te(e.numId)})),this.root.push(new Np(Te(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(let t of e.overrideLevels)this.root.push(new Dp(t.num,t.start))}},Pp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{ilvl:"w:ilvl"})}},Dp=class extends ee{constructor(e,t){super("w:lvlOverride"),this.root.push(new Pp({ilvl:e})),t!==void 0&&this.root.push(new Fp(t))}},Lp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},Fp=class extends ee{constructor(e){super("w:startOverride"),this.root.push(new Lp({val:e}))}},Mp=class extends ee{constructor(e){super("w:numbering"),Y(this,"abstractNumberingMap",new Map),Y(this,"concreteNumberingMap",new Map),Y(this,"referenceConfigMap",new Map),Y(this,"abstractNumUniqueNumericId",Yu()),Y(this,"concreteNumUniqueNumericId",Zu()),this.root.push(new Vr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));let t=new Ki(this.abstractNumUniqueNumericId(),[{level:0,format:nt.BULLET,text:"\u25CF",alignment:Me.LEFT,style:{paragraph:{indent:{left:He(.5),hanging:He(.25)}}}},{level:1,format:nt.BULLET,text:"\u25CB",alignment:Me.LEFT,style:{paragraph:{indent:{left:He(1),hanging:He(.25)}}}},{level:2,format:nt.BULLET,text:"\u25A0",alignment:Me.LEFT,style:{paragraph:{indent:{left:2160,hanging:He(.25)}}}},{level:3,format:nt.BULLET,text:"\u25CF",alignment:Me.LEFT,style:{paragraph:{indent:{left:2880,hanging:He(.25)}}}},{level:4,format:nt.BULLET,text:"\u25CB",alignment:Me.LEFT,style:{paragraph:{indent:{left:3600,hanging:He(.25)}}}},{level:5,format:nt.BULLET,text:"\u25A0",alignment:Me.LEFT,style:{paragraph:{indent:{left:4320,hanging:He(.25)}}}},{level:6,format:nt.BULLET,text:"\u25CF",alignment:Me.LEFT,style:{paragraph:{indent:{left:5040,hanging:He(.25)}}}},{level:7,format:nt.BULLET,text:"\u25CF",alignment:Me.LEFT,style:{paragraph:{indent:{left:5760,hanging:He(.25)}}}},{level:8,format:nt.BULLET,text:"\u25CF",alignment:Me.LEFT,style:{paragraph:{indent:{left:6480,hanging:He(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new Vi({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(let r of e.config)this.abstractNumberingMap.set(r.reference,new Ki(this.abstractNumUniqueNumericId(),r.levels)),this.referenceConfigMap.set(r.reference,r.levels)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.abstractNumberingMap.values(),...this.concreteNumberingMap.values()),super.prepForXml(e)}createConcreteNumberingInstance(e,t){let r=this.abstractNumberingMap.get(e);if(!r)return;let n=`${e}-${t}`;if(this.concreteNumberingMap.has(n))return;let i=this.referenceConfigMap.get(e),o=i&&i[0].start,a={numId:this.concreteNumUniqueNumericId(),abstractNumId:r.id,reference:e,instance:t,overrideLevels:[typeof o=="number"&&Number.isInteger(o)?{num:0,start:o}:{num:0,start:1}]};this.concreteNumberingMap.set(n,new Vi(a))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}},cn=/^[\w-]+$/,Bp=new Set(["_rels","fonts","media","theme"]),k0=class{constructor(e){if(Y(this,"options",void 0),Y(this,"id",Tt()),Y(this,"relationshipId",`rId${this.id}`),Y(this,"addedTo",new WeakSet),this.options=e,!cn.test(e.folder)||Bp.has(e.folder))throw new Error(`Invalid package part folder "${e.folder}". Expected a folder name docx doesn't use, such as "charts"`);if(!cn.test(e.name))throw new Error(`Invalid package part name "${e.name}". Expected letters, digits, "_" and "-", such as "chart"`);if(!cn.test(e.extension))throw new Error(`Invalid package part extension "${e.extension}". Expected letters, digits, "_" and "-", such as "xml"`)}addTo(e){let t=e.file.PackageParts,r=t.add(this),n=e.viewWrapper.Relationships;this.addedTo.has(n)||(this.addedTo.add(n),n.addRelationship(this.id,this.options.relationshipType,t.getTarget(n,r)))}},co=class{constructor(e,t=new Set){Y(this,"contentTypes",void 0),Y(this,"existingPaths",void 0),Y(this,"paths",new Map),Y(this,"folders",new WeakMap),this.contentTypes=e,this.existingPaths=t}add(e){let t=this.paths.get(e);if(t!==void 0)return t;let{folder:r,name:n,extension:i,contentType:o}=e.options,a=new Set([...this.existingPaths,...this.paths.values()]),s=1;for(;a.has(`${r}/${n}${s}.${i}`);)s++;let u=`${r}/${n}${s}.${i}`;return this.paths.set(e,u),this.contentTypes.addOverride(o,`/word/${u}`),u}get Array(){return[...this.paths].map(([e,t])=>({part:e,path:t}))}createRelationships(e){let t=new Re;return this.folders.set(t,e.slice(0,e.indexOf("/"))),t}getTarget(e,t){let r=this.folders.get(e);return r===void 0?t:t.startsWith(`${r}/`)?t.slice(r.length+1):`../${t}`}},Up=e=>new ae({name:"w:compatSetting",attributes:{version:{key:"w:val",value:e},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}}),Hp=class extends ee{constructor(e){super("w:compat"),e.useSingleBorderforContiguousCells&&this.root.push(new he("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells)),e.wordPerfectJustification&&this.root.push(new he("w:wpJustification",e.wordPerfectJustification)),e.noTabStopForHangingIndent&&this.root.push(new he("w:noTabHangInd",e.noTabStopForHangingIndent)),e.noLeading&&this.root.push(new he("w:noLeading",e.noLeading)),e.spaceForUnderline&&this.root.push(new he("w:spaceForUL",e.spaceForUnderline)),e.noColumnBalance&&this.root.push(new he("w:noColumnBalance",e.noColumnBalance)),e.balanceSingleByteDoubleByteWidth&&this.root.push(new he("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth)),e.noExtraLineSpacing&&this.root.push(new he("w:noExtraLineSpacing",e.noExtraLineSpacing)),e.doNotLeaveBackslashAlone&&this.root.push(new he("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone)),e.underlineTrailingSpaces&&this.root.push(new he("w:ulTrailSpace",e.underlineTrailingSpaces)),e.doNotExpandShiftReturn&&this.root.push(new he("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.spacingInWholePoints&&this.root.push(new he("w:spacingInWholePoints",e.spacingInWholePoints)),e.lineWrapLikeWord6&&this.root.push(new he("w:lineWrapLikeWord6",e.lineWrapLikeWord6)),e.printBodyTextBeforeHeader&&this.root.push(new he("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader)),e.printColorsBlack&&this.root.push(new he("w:printColBlack",e.printColorsBlack)),e.spaceWidth&&this.root.push(new he("w:wpSpaceWidth",e.spaceWidth)),e.showBreaksInFrames&&this.root.push(new he("w:showBreaksInFrames",e.showBreaksInFrames)),e.subFontBySize&&this.root.push(new he("w:subFontBySize",e.subFontBySize)),e.suppressBottomSpacing&&this.root.push(new he("w:suppressBottomSpacing",e.suppressBottomSpacing)),e.suppressTopSpacing&&this.root.push(new he("w:suppressTopSpacing",e.suppressTopSpacing)),e.suppressSpacingAtTopOfPage&&this.root.push(new he("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage)),e.suppressTopSpacingWP&&this.root.push(new he("w:suppressTopSpacingWP",e.suppressTopSpacingWP)),e.suppressSpBfAfterPgBrk&&this.root.push(new he("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk)),e.swapBordersFacingPages&&this.root.push(new he("w:swapBordersFacingPages",e.swapBordersFacingPages)),e.convertMailMergeEsc&&this.root.push(new he("w:convMailMergeEsc",e.convertMailMergeEsc)),e.truncateFontHeightsLikeWP6&&this.root.push(new he("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6)),e.macWordSmallCaps&&this.root.push(new he("w:mwSmallCaps",e.macWordSmallCaps)),e.usePrinterMetrics&&this.root.push(new he("w:usePrinterMetrics",e.usePrinterMetrics)),e.doNotSuppressParagraphBorders&&this.root.push(new he("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders)),e.wrapTrailSpaces&&this.root.push(new he("w:wrapTrailSpaces",e.wrapTrailSpaces)),e.footnoteLayoutLikeWW8&&this.root.push(new he("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8)),e.shapeLayoutLikeWW8&&this.root.push(new he("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8)),e.alignTablesRowByRow&&this.root.push(new he("w:alignTablesRowByRow",e.alignTablesRowByRow)),e.forgetLastTabAlignment&&this.root.push(new he("w:forgetLastTabAlignment",e.forgetLastTabAlignment)),e.adjustLineHeightInTable&&this.root.push(new he("w:adjustLineHeightInTable",e.adjustLineHeightInTable)),e.autoSpaceLikeWord95&&this.root.push(new he("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95)),e.noSpaceRaiseLower&&this.root.push(new he("w:noSpaceRaiseLower",e.noSpaceRaiseLower)),e.doNotUseHTMLParagraphAutoSpacing&&this.root.push(new he("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing)),e.layoutRawTableWidth&&this.root.push(new he("w:layoutRawTableWidth",e.layoutRawTableWidth)),e.layoutTableRowsApart&&this.root.push(new he("w:layoutTableRowsApart",e.layoutTableRowsApart)),e.useWord97LineBreakRules&&this.root.push(new he("w:useWord97LineBreakRules",e.useWord97LineBreakRules)),e.doNotBreakWrappedTables&&this.root.push(new he("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables)),e.doNotSnapToGridInCell&&this.root.push(new he("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell)),e.selectFieldWithFirstOrLastCharacter&&this.root.push(new he("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter)),e.applyBreakingRules&&this.root.push(new he("w:applyBreakingRules",e.applyBreakingRules)),e.doNotWrapTextWithPunctuation&&this.root.push(new he("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation)),e.doNotUseEastAsianBreakRules&&this.root.push(new he("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules)),e.useWord2002TableStyleRules&&this.root.push(new he("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules)),e.growAutofit&&this.root.push(new he("w:growAutofit",e.growAutofit)),e.useFELayout&&this.root.push(new he("w:useFELayout",e.useFELayout)),e.useNormalStyleForList&&this.root.push(new he("w:useNormalStyleForList",e.useNormalStyleForList)),e.doNotUseIndentAsNumberingTabStop&&this.root.push(new he("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop)),e.useAlternateEastAsianLineBreakRules&&this.root.push(new he("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules)),e.allowSpaceOfSameStyleInTable&&this.root.push(new he("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable)),e.doNotSuppressIndentation&&this.root.push(new he("w:doNotSuppressIndentation",e.doNotSuppressIndentation)),e.doNotAutofitConstrainedTables&&this.root.push(new he("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables)),e.autofitToFirstFixedWidthCell&&this.root.push(new he("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell)),e.underlineTabInNumberingList&&this.root.push(new he("w:underlineTabInNumList",e.underlineTabInNumberingList)),e.displayHangulFixedWidth&&this.root.push(new he("w:displayHangulFixedWidth",e.displayHangulFixedWidth)),e.splitPgBreakAndParaMark&&this.root.push(new he("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark)),e.doNotVerticallyAlignCellWithSp&&this.root.push(new he("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp)),e.doNotBreakConstrainedForcedTable&&this.root.push(new he("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable)),e.ignoreVerticalAlignmentInTextboxes&&this.root.push(new he("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes)),e.useAnsiKerningPairs&&this.root.push(new he("w:useAnsiKerningPairs",e.useAnsiKerningPairs)),e.cachedColumnBalance&&this.root.push(new he("w:cachedColBalance",e.cachedColumnBalance)),e.version&&this.root.push(Up(e.version))}},Wp=class extends me{constructor(...e){super(...e),Y(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"})}},jp=class extends ee{constructor(e){var t,r,n,i,o,a,s,u;super("w:settings"),this.root.push(new Wp({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 he("w:displayBackgroundShape",!0)),e.embedFonts!==void 0&&this.root.push(new he("w:embedTrueTypeFonts",e.embedFonts)),e.trackRevisions!==void 0&&this.root.push(new he("w:trackRevisions",e.trackRevisions)),e.defaultTabStop!==void 0&&this.root.push(new Zt("w:defaultTabStop",e.defaultTabStop)),((t=e.hyphenation)===null||t===void 0?void 0:t.autoHyphenation)!==void 0&&this.root.push(new he("w:autoHyphenation",e.hyphenation.autoHyphenation)),((r=e.hyphenation)===null||r===void 0?void 0:r.consecutiveHyphenLimit)!==void 0&&this.root.push(new Zt("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit)),((n=e.hyphenation)===null||n===void 0?void 0:n.hyphenationZone)!==void 0&&this.root.push(new Zt("w:hyphenationZone",e.hyphenation.hyphenationZone)),((i=e.hyphenation)===null||i===void 0?void 0:i.doNotHyphenateCaps)!==void 0&&this.root.push(new he("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps)),e.evenAndOddHeaders!==void 0&&this.root.push(new he("w:evenAndOddHeaders",e.evenAndOddHeaders)),e.updateFields!==void 0&&this.root.push(new he("w:updateFields",e.updateFields)),this.root.push(new Hp(ie(ie({},(o=e.compatibility)!==null&&o!==void 0?o:{}),{},{version:(a=(s=(u=e.compatibility)===null||u===void 0?void 0:u.version)!==null&&s!==void 0?s:e.compatibilityModeVersion)!==null&&a!==void 0?a:15})))}},ho=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w:val"})}},Gp=class extends ee{constructor(e){super("w:name"),this.root.push(new ho({val:e}))}},$p=class extends ee{constructor(e){super("w:uiPriority"),this.root.push(new ho({val:Te(e)}))}},zp=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}},fi=class extends ee{constructor(e,t){super("w:style"),this.root.push(new zp(e)),t.name&&this.root.push(new Gp(t.name)),t.basedOn&&this.root.push(new at("w:basedOn",t.basedOn)),t.next&&this.root.push(new at("w:next",t.next)),t.link&&this.root.push(new at("w:link",t.link)),t.uiPriority!==void 0&&this.root.push(new $p(t.uiPriority)),t.semiHidden!==void 0&&this.root.push(new he("w:semiHidden",t.semiHidden)),t.unhideWhenUsed!==void 0&&this.root.push(new he("w:unhideWhenUsed",t.unhideWhenUsed)),t.quickFormat!==void 0&&this.root.push(new he("w:qFormat",t.quickFormat))}},Mt=class extends fi{constructor(e){super({type:"paragraph",styleId:e.id},e),Y(this,"paragraphProperties",void 0),Y(this,"runProperties",void 0),this.paragraphProperties=new xt(e.paragraph,{implicitListParagraphStyle:!1}),this.runProperties=new st(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}},Bt=class extends fi{constructor(e){super({type:"character",styleId:e.id},ie({uiPriority:99,unhideWhenUsed:!0},e)),Y(this,"runProperties",void 0),this.runProperties=new st(e.run),this.root.push(this.runProperties)}},pt=class extends Mt{constructor(e){super(ie({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}},Kp=class extends pt{constructor(e){super(ie({id:"Title",name:"Title"},e))}},Vp=class extends pt{constructor(e){super(ie({id:"Heading1",name:"Heading 1"},e))}},qp=class extends pt{constructor(e){super(ie({id:"Heading2",name:"Heading 2"},e))}},Xp=class extends pt{constructor(e){super(ie({id:"Heading3",name:"Heading 3"},e))}},Yp=class extends pt{constructor(e){super(ie({id:"Heading4",name:"Heading 4"},e))}},Zp=class extends pt{constructor(e){super(ie({id:"Heading5",name:"Heading 5"},e))}},Jp=class extends pt{constructor(e){super(ie({id:"Heading6",name:"Heading 6"},e))}},Qp=class extends pt{constructor(e){super(ie({id:"Strong",name:"Strong"},e))}},em=class extends Mt{constructor(e){super(ie({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}},fo=class extends Mt{constructor(e){super(ie({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Dt.AUTO}},run:{size:20}},e))}},po=class extends Bt{constructor(e){super(ie({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}},mo=class extends Bt{constructor(e){super(ie({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}},vo=class extends Mt{constructor(e){super(ie({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Dt.AUTO}},run:{size:20}},e))}},wo=class extends Bt{constructor(e){super(ie({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}},go=class extends Bt{constructor(e){super(ie({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},e))}},tm=class extends Bt{constructor(e){super(ie({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:Ka.SINGLE}}},e))}},rm=class extends fi{constructor(){super({type:"table",styleId:"TableNormal",default:!0},{name:"Normal Table",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0}),this.root.push(new di({indent:{size:0,type:it.DXA},cellMargin:{top:0,left:108,bottom:0,right:108}}))}},Kt=e=>typeof e=="object"?Object.keys(e)[0]:void 0,pi=e=>{var t;return(t=[e["w:style"]].flat().find(r=>r._attr))===null||t===void 0?void 0:t._attr},qi=e=>{var t;return(t=pi(e))===null||t===void 0?void 0:t["w:styleId"]},nm=e=>{var t;let r=pi(e);return((t=r?.["w:type"])!==null&&t!==void 0?t:"paragraph")==="paragraph"&&r?.["w:default"]!==void 0&&!["0","false","off"].includes(String(r["w:default"]))},im=e=>({"w:style":[e["w:style"]].flat().map(t=>t._attr?{_attr:ie(ie({},t._attr),{},{"w:default":"1"})}:t)}),hn=class extends ee{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(let t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(let t of e.paragraphStyles)this.root.push(new Mt(t));if(e.characterStyles)for(let t of e.characterStyles)this.root.push(new Bt(t))}prepForXml(e){let t=super.prepForXml(e),r=t["w:styles"];if(!Array.isArray(r))return t;let n=s=>r.filter(u=>Kt(u)===s),i=r.map(s=>Kt(s)==="w:style"?qi(s):void 0),o=r.filter((s,u)=>!["_attr","w:docDefaults","w:latentStyles"].includes(Kt(s))&&(i[u]===void 0||i.lastIndexOf(i[u])===u)),a=o.some(s=>Kt(s)==="w:style"&&nm(s))?o:o.map(s=>{var u,h;return Kt(s)==="w:style"&&qi(s)==="Normal"&&((u=(h=pi(s))===null||h===void 0?void 0:h["w:type"])!==null&&u!==void 0?u:"paragraph")==="paragraph"?im(s):s});return{"w:styles":[...n("_attr"),...n("w:docDefaults").slice(-1),...n("w:latentStyles").slice(-1),...a]}}},am=class extends ee{constructor(e){super("w:pPrDefault"),this.root.push(new xt(e,{implicitListParagraphStyle:!1}))}},sm=class extends ee{constructor(e){super("w:rPrDefault"),this.root.push(new st(e))}},om=class extends ee{constructor(e){super("w:docDefaults"),Y(this,"runPropertiesDefaults",void 0),Y(this,"paragraphPropertiesDefaults",void 0),this.runPropertiesDefaults=new sm(e.run),this.paragraphPropertiesDefaults=new am(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}},lm=class{newInstance(e){let t=(0,Fr.xml2js)(e,{compact:!1}),r;for(let i of t.elements||[])i.name==="w:styles"&&(r=i);if(r===void 0)throw new Error("can not find styles element");let n=r.elements||[];return{initialStyles:new Zl(r.attributes),importedStyles:n.map(i=>Kn(i))}}},yo=(e={})=>{var t;return{normal:new Mt({id:"Normal",name:"Normal",quickFormat:!0}),normalTable:new rm,document:new om((t=e.document)!==null&&t!==void 0?t:{}),title:new Kp(ie({run:{size:56}},e.title)),heading1:new Vp(ie({run:{color:"2E74B5",size:32}},e.heading1)),heading2:new qp(ie({run:{color:"2E74B5",size:26}},e.heading2)),heading3:new Xp(ie({run:{color:"1F4D78",size:24}},e.heading3)),heading4:new Yp(ie({run:{color:"2E74B5",italics:!0}},e.heading4)),heading5:new Zp(ie({run:{color:"2E74B5"}},e.heading5)),heading6:new Jp(ie({run:{color:"1F4D78"}},e.heading6)),strong:new Qp(ie({run:{bold:!0}},e.strong)),listParagraph:new em(e.listParagraph||{}),hyperlink:new tm(e.hyperlink||{}),footnoteReference:new po(e.footnoteReference||{}),footnoteText:new fo(e.footnoteText||{}),footnoteTextChar:new mo(e.footnoteTextChar||{}),endnoteReference:new wo(e.endnoteReference||{}),endnoteText:new vo(e.endnoteText||{}),endnoteTextChar:new go(e.endnoteTextChar||{})}},Xi=class{newInstance(e={}){return{initialStyles:new Vr(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:Object.values(yo(e))}}},bo={headings:{latin:"Calibri Light",panose:"020F0302020204030204"},body:{latin:"Calibri",panose:"020F0502020204030204"}},um=[["Jpan","\u6E38\u30B4\u30B7\u30C3\u30AF Light","\u6E38\u660E\u671D"],["Hang","\uB9D1\uC740 \uACE0\uB515"],["Hans","\u7B49\u7EBF Light","\u7B49\u7EBF"],["Hant","\u65B0\u7D30\u660E\u9AD4"],["Arab","Times New Roman","Arial"],["Hebr","Times New Roman","Arial"],["Thai","Angsana New","Cordia New"],["Ethi","Nyala"],["Beng","Vrinda"],["Gujr","Shruti"],["Khmr","MoolBoran","DaunPenh"],["Knda","Tunga"],["Guru","Raavi"],["Cans","Euphemia"],["Cher","Plantagenet Cherokee"],["Yiii","Microsoft Yi Baiti"],["Tibt","Microsoft Himalaya"],["Thaa","MV Boli"],["Deva","Mangal"],["Telu","Gautami"],["Taml","Latha"],["Syrc","Estrangelo Edessa"],["Orya","Kalinga"],["Mlym","Kartika"],["Laoo","DokChampa"],["Sinh","Iskoola Pota"],["Mong","Mongolian Baiti"],["Viet","Times New Roman","Arial"],["Uigh","Microsoft Uighur"],["Geor","Sylfaen"],["Armn","Arial"],["Bugi","Leelawadee UI"],["Bopo","Microsoft JhengHei"],["Java","Javanese Text"],["Lisu","Segoe UI"],["Mymr","Myanmar Text"],["Nkoo","Ebrima"],["Olck","Nirmala UI"],["Osma","Ebrima"],["Phag","Phagspa"],["Syrn","Estrangelo Edessa"],["Syrj","Estrangelo Edessa"],["Syre","Estrangelo Edessa"],["Sora","Nirmala UI"],["Tale","Microsoft Tai Le"],["Talu","Microsoft New Tai Lue"],["Tfng","Ebrima"]],dn=(e,t,r)=>new ae({name:e,attributes:{typeface:{key:"typeface",value:t},panose:{key:"panose",value:r}}}),cm=(e,t)=>{let r=t[e],n=typeof r=="string"?r:r?.latin;return n??bo[e].latin},Yi=(e,t)=>{let r=t[e],{eastAsia:n="",complexScript:i=""}=typeof r=="object"?r:{},o=cm(e,t),a=bo[e];return new ae({name:e==="headings"?"a:majorFont":"a:minorFont",children:[dn("a:latin",o,o===a.latin?a.panose:void 0),dn("a:ea",n),dn("a:cs",i),...um.map(([s,u,h=u])=>new ae({name:"a:font",attributes:{script:{key:"script",value:s},typeface:{key:"typeface",value:e==="headings"?u:h}}}))]})},hm=(e,t={})=>new ae({name:"a:fontScheme",attributes:{name:{key:"name",value:e}},children:[Yi("headings",t),Yi("body",t)]}),_o=(e=[])=>new ae({name:"a:schemeClr",attributes:{value:{key:"val",value:"phClr"}},children:e.map(([t,r])=>new ae({name:`a:${t}`,attributes:{value:{key:"val",value:r}}}))}),Ar=e=>new ae({name:"a:solidFill",children:[_o(e)]}),fn=e=>new ae({name:"a:gradFill",attributes:{rotateWithShape:{key:"rotWithShape",value:!0}},children:[new ae({name:"a:gsLst",children:e.map((t,r)=>new ae({name:"a:gs",attributes:{position:{key:"pos",value:r*5e4}},children:[_o(t)]}))}),new ae({name:"a:lin",attributes:{angle:{key:"ang",value:54e5},scaled:{key:"scaled",value:!1}}})]}),pn=e=>new ae({name:"a:ln",attributes:{width:{key:"w",value:e},cap:{key:"cap",value:"flat"},compound:{key:"cmpd",value:"sng"},alignment:{key:"algn",value:"ctr"}},children:[Ar(),new ae({name:"a:prstDash",attributes:{value:{key:"val",value:"solid"}}}),new ae({name:"a:miter",attributes:{limit:{key:"lim",value:8e5}}})]}),mn=e=>new ae({name:"a:effectStyle",children:[new ae({name:"a:effectLst",children:e})]}),dm=()=>new ae({name:"a:outerShdw",attributes:{blurRadius:{key:"blurRad",value:57150},distance:{key:"dist",value:19050},direction:{key:"dir",value:54e5},alignment:{key:"algn",value:"ctr"},rotateWithShape:{key:"rotWithShape",value:!1}},children:[new ae({name:"a:srgbClr",attributes:{value:{key:"val",value:"000000"}},children:[new ae({name:"a:alpha",attributes:{value:{key:"val",value:63e3}}})]})]}),fm=()=>new ae({name:"a:fmtScheme",attributes:{name:{key:"name",value:"Office"}},children:[new ae({name:"a:fillStyleLst",children:[Ar(),fn([[["lumMod",11e4],["satMod",105e3],["tint",67e3]],[["lumMod",105e3],["satMod",103e3],["tint",73e3]],[["lumMod",105e3],["satMod",109e3],["tint",81e3]]]),fn([[["satMod",103e3],["lumMod",102e3],["tint",94e3]],[["satMod",11e4],["lumMod",1e5],["shade",1e5]],[["lumMod",99e3],["satMod",12e4],["shade",78e3]]])]}),new ae({name:"a:lnStyleLst",children:[pn(6350),pn(12700),pn(19050)]}),new ae({name:"a:effectStyleLst",children:[mn([]),mn([]),mn([dm()])]}),new ae({name:"a:bgFillStyleLst",children:[Ar(),Ar([["tint",95e3],["satMod",17e4]]),fn([[["tint",93e3],["satMod",15e4],["shade",98e3],["lumMod",102e3]],[["tint",98e3],["satMod",13e4],["shade",9e4],["lumMod",103e3]],[["shade",63e3],["satMod",12e4]]])]})]}),pm=class extends ee{constructor({name:e="Office Theme",colors:t,fonts:r}={}){super("a:theme"),Y(this,"colors",void 0),this.colors=qn(t),this.root.push(new Or({namespace:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"},name:{key:"name",value:e}})),this.root.push(new ae({name:"a:themeElements",children:[ou(t?e:"Office",t),hm(r?e:"Office",r),fm()]})),this.root.push(new ae({name:"a:objectDefaults"})),this.root.push(new ae({name:"a:extraClrSchemeLst"}))}get Colors(){return this.colors}},I0=class{constructor(e){var t,r,n,i,o,a,s,u,h,m,f,w,p;if(Y(this,"currentRelationshipId",1),Y(this,"documentWrapper",void 0),Y(this,"headers",[]),Y(this,"footers",[]),Y(this,"coreProperties",void 0),Y(this,"numbering",void 0),Y(this,"media",void 0),Y(this,"fileRelationships",void 0),Y(this,"footnotesWrapper",void 0),Y(this,"endnotesWrapper",void 0),Y(this,"settings",void 0),Y(this,"contentTypes",void 0),Y(this,"customProperties",void 0),Y(this,"appProperties",void 0),Y(this,"styles",void 0),Y(this,"comments",void 0),Y(this,"commentsExtended",void 0),Y(this,"commentsIds",void 0),Y(this,"fontWrapper",void 0),Y(this,"theme",void 0),Y(this,"packageParts",void 0),this.coreProperties=new Xf(ie(ie({},e),{},{creator:(t=e.creator)!==null&&t!==void 0?t:"Un-named",revision:(r=e.revision)!==null&&r!==void 0?r:1,lastModifiedBy:(n=e.lastModifiedBy)!==null&&n!==void 0?n:"Un-named"})),this.numbering=new Mp(e.numbering?e.numbering:{config:[]}),this.comments=new Yh((i=e.comments)!==null&&i!==void 0?i:{children:[]}),this.comments.ThreadData&&(this.commentsExtended=new ed(this.comments.ThreadData)),this.comments.CommentIdsData&&(this.commentsIds=new id(this.comments.CommentIdsData)),this.fileRelationships=new Re,this.customProperties=new tp((o=e.customProperties)!==null&&o!==void 0?o:[]),this.appProperties=new Kf,this.footnotesWrapper=new wp,this.endnotesWrapper=new cp,this.contentTypes=new qf,this.packageParts=new co(this.contentTypes),this.documentWrapper=new ap({background:e.background,pageNumbers:e.pageNumbers}),this.settings=new jp({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:(a=e.features)===null||a===void 0?void 0:a.trackRevisions,updateFields:(s=e.features)===null||s===void 0?void 0:s.updateFields,embedFonts:!((u=e.fonts)===null||u===void 0)&&u.length?!0:void 0,defaultTabStop:e.defaultTabStop,hyphenation:{autoHyphenation:(h=e.hyphenation)===null||h===void 0?void 0:h.autoHyphenation,hyphenationZone:(m=e.hyphenation)===null||m===void 0?void 0:m.hyphenationZone,consecutiveHyphenLimit:(f=e.hyphenation)===null||f===void 0?void 0:f.consecutiveHyphenLimit,doNotHyphenateCaps:(w=e.hyphenation)===null||w===void 0?void 0:w.doNotHyphenateCaps}}),this.media=new lo,e.externalStyles!==void 0){var d,v,_,S;let E=(d=(v=e.styles)===null||v===void 0?void 0:v.default)!==null&&d!==void 0?d:{},N=Object.entries(yo(E)),C=([g])=>E[g]!==void 0,T=new lm().newInstance(e.externalStyles);this.styles=new hn(ie(ie({},T),{},{paragraphStyles:(_=e.styles)===null||_===void 0?void 0:_.paragraphStyles,characterStyles:(S=e.styles)===null||S===void 0?void 0:S.characterStyles,importedStyles:[...N.filter(g=>!C(g)).map(([,g])=>g),...T.importedStyles,...N.filter(C).map(([,g])=>g)]}))}else if(e.styles){let E=new Xi().newInstance(e.styles.default);this.styles=new hn(ie(ie({},E),e.styles))}else{let E=new Xi;this.styles=new hn(E.newInstance())}this.addDefaultRelationships();for(let E of e.sections)this.addSection(E);if(e.footnotes)for(let E in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(E),e.footnotes[E].children);if(e.endnotes)for(let E in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(E),e.endnotes[E].children);this.fontWrapper=new Us((p=e.fonts)!==null&&p!==void 0?p:[]),this.theme=new pm(e.theme),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme","theme/theme1.xml")}addSection({headers:e={},footers:t={},children:r,properties:n}){this.documentWrapper.View.Body.addSection(ie(ie({},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(let i of r)this.documentWrapper.View.add(i)}createHeader(e){let t=new bp(this.media,this.currentRelationshipId++);for(let r of e.options.children)t.add(r);return this.addHeaderToDocument(t),t}createFooter(e){let t=new fp(this.media,this.currentRelationshipId++);for(let r of e.options.children)t.add(r);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Nt.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(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=Nt.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(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.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.comments.IsEmpty||(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml"),this.contentTypes.addComments()),this.commentsExtended&&(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2011/relationships/commentsExtended","commentsExtended.xml"),this.contentTypes.addCommentsExtended()),this.commentsIds&&(this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds","commentsIds.xml"),this.contentTypes.addCommentsIds())}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 Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get CommentsExtended(){return this.commentsExtended}get CommentsIds(){return this.commentsIds}get FontTable(){return this.fontWrapper}get Theme(){return this.theme}get PackageParts(){return this.packageParts}},Eo=class extends ee{constructor(e){super("w:sdtPr"),e&&this.root.push(new at("w:alias",e))}},mm=["contentChildren","cachedEntries","beginDirty"],R0=class extends $r{constructor(e="Table of Contents",t={}){let{contentChildren:r=[],cachedEntries:n=[],beginDirty:i}=t,o=zr(t,mm);super("w:sdt"),Y(this,"fromHeadings",void 0),this.root.push(new Eo(e));let a=new ii,s=[new xe({children:[_s(i),new bs(o),We()]})],u=[new xe({children:[je()]})];if(n!==void 0&&n.length>0){let{stylesWithLevels:h}=o,m=n.map((w,p)=>{var d,v;let _=this.buildCachedContentParagraphChild(w,o),S=(d=h==null||(v=h.find(N=>N.level===w.level))===null||v===void 0?void 0:v.styleName)!==null&&d!==void 0?d:`TOC${w.level}`,E=p===0?[...s,_]:p===n.length-1?[_,...u]:[_];return new Ce({style:S,tabStops:this.getTabStopsForLevel(w.level),children:E})}),f=m;n.length<=1&&(f=[...m,new Ce({children:u})]);for(let w of f)a.addChildElement(w)}else{let h=new Ce({children:s});a.addChildElement(h);for(let f of r)a.addChildElement(f);let m=new Ce({children:u});a.addChildElement(m),r.length===0&&(this.fromHeadings={properties:o,beginDirty:i})}this.root.push(a)}prepForXml(e){let t=super.prepForXml(e);return Th(t,this.fromHeadings&&ie(ie({},this.fromHeadings),{},{textWidth:this.textWidthIn(e)})),t}textWidthIn(e){var t,r;return(t=(r=e.file)===null||r===void 0||(r=r.Document)===null||r===void 0||(r=r.View.Body.getSectionPropertiesFor(this))===null||r===void 0?void 0:r.AvailableTextWidth)!==null&&t!==void 0?t:Tr}getTabStopsForLevel(e,t=9025){return[{type:"clear",position:t+1-(e-1)*240},{type:"right",position:t,leader:"dot"}]}buildCachedContentRun(e,t){var r,n;return new xe({style:t?.hyperlink&&e.href!==void 0?"IndexLink":void 0,children:[new er({text:e.title}),new ci,new er({text:(r=(n=e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:""})]})}buildCachedContentParagraphChild(e,t){let r=this.buildCachedContentRun(e,t);return t?.hyperlink&&e.href!==void 0?new Os({anchor:e.href,children:[r]}):r}},C0=class{constructor(e,t){Y(this,"styleName",void 0),Y(this,"level",void 0),this.styleName=e,this.level=t}},N0=class{constructor(e={children:[]}){Y(this,"options",void 0),this.options=e}},O0=class{constructor(e={children:[]}){Y(this,"options",void 0),this.options=e}},vm=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id"})}},wm=class extends ee{constructor(e){super("w:footnoteReference"),this.root.push(new vm({id:e}))}},P0=class extends xe{constructor(e){super({style:"FootnoteReference"}),this.root.push(new wm(e))}},gm=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{id:"w:id"})}},ym=class extends ee{constructor(e){super("w:endnoteReference"),this.root.push(new gm({id:e}))}},D0=class extends xe{constructor(e){super({style:"EndnoteReference"}),this.root.push(new ym(e))}},Zi=class extends me{constructor(...e){super(...e),Y(this,"xmlKeys",{val:"w14:val",symbolfont:"w14:font"})}},vn=class extends ee{constructor(e,t,r){super(e),r?this.root.push(new Zi({val:Jl(t),symbolfont:r})):this.root.push(new Zi({val:t}))}},bm=class extends ee{constructor(e){var t,r,n,i,o,a,s,u;super("w14:checkbox"),Y(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),Y(this,"DEFAULT_CHECKED_SYMBOL","2612"),Y(this,"DEFAULT_FONT","MS Gothic");let h=e?.checked?"1":"0",m,f;this.root.push(new vn("w14:checked",h)),m=!(e==null||(t=e.checkedState)===null||t===void 0)&&t.value?e==null||(r=e.checkedState)===null||r===void 0?void 0:r.value:this.DEFAULT_CHECKED_SYMBOL,f=!(e==null||(n=e.checkedState)===null||n===void 0)&&n.font?e==null||(i=e.checkedState)===null||i===void 0?void 0:i.font:this.DEFAULT_FONT,this.root.push(new vn("w14:checkedState",m,f)),m=!(e==null||(o=e.uncheckedState)===null||o===void 0)&&o.value?e==null||(a=e.uncheckedState)===null||a===void 0?void 0:a.value:this.DEFAULT_UNCHECKED_SYMBOL,f=!(e==null||(s=e.uncheckedState)===null||s===void 0)&&s.font?e==null||(u=e.uncheckedState)===null||u===void 0?void 0:u.font:this.DEFAULT_FONT,this.root.push(new vn("w14:uncheckedState",m,f))}},L0=class extends ee{constructor(e){var t,r,n,i;super("w:sdt"),Y(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),Y(this,"DEFAULT_CHECKED_SYMBOL","2612"),Y(this,"DEFAULT_FONT","MS Gothic");let o=new Eo(e?.alias);o.addChildElement(new bm(e)),this.root.push(o);let a=new ii,s=e==null||(t=e.checkedState)===null||t===void 0?void 0:t.font,u=e==null||(r=e.checkedState)===null||r===void 0?void 0:r.value,h=e==null||(n=e.uncheckedState)===null||n===void 0?void 0:n.font,m=e==null||(i=e.uncheckedState)===null||i===void 0?void 0:i.value,f,w;e?.checked?(f=s||this.DEFAULT_FONT,w=u||this.DEFAULT_CHECKED_SYMBOL):(f=h||this.DEFAULT_FONT,w=m||this.DEFAULT_UNCHECKED_SYMBOL);let p=new Uu({char:w,symbolfont:f});a.addChildElement(p),this.root.push(a)}},wn=e=>e===void 0?void 0:e?"t":"f",_m=({children:e})=>new ae({name:"w:pict",children:e}),Em={flip:"flip",height:"height",left:"left",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",positionHorizontal:"mso-position-horizontal",positionHorizontalRelative:"mso-position-horizontal-relative",positionVertical:"mso-position-vertical",positionVerticalRelative:"mso-position-vertical-relative",wrapDistanceBottom:"mso-wrap-distance-bottom",wrapDistanceLeft:"mso-wrap-distance-left",wrapDistanceRight:"mso-wrap-distance-right",wrapDistanceTop:"mso-wrap-distance-top",wrapEdited:"mso-wrap-edited",wrapStyle:"mso-wrap-style",position:"position",rotation:"rotation",top:"top",visibility:"visibility",width:"width",zIndex:"z-index"},xm=e=>e?Object.entries(e).filter(([,t])=>t!==void 0).map(([t,r])=>`${Em[t]}:${r}`).join(";"):void 0,Tm=({id:e,type:t,style:r,coordinateSize:n,adjustment:i,path:o,presetShapeType:a,allowInCell:s,alt:u,title:h,fillColor:m,filled:f,stroked:w,strokeColor:p,strokeWeight:d,children:v=[]})=>new ae({name:"v:shape",attributes:{id:{key:"id",value:e},type:{key:"type",value:t},style:{key:"style",value:xm(r)},coordinateSize:{key:"coordsize",value:n},adjustment:{key:"adj",value:i},path:{key:"path",value:o},presetShapeType:{key:"o:spt",value:a},allowInCell:{key:"o:allowincell",value:wn(s)},alt:{key:"alt",value:u},title:{key:"title",value:h},fillColor:{key:"fillcolor",value:m},filled:{key:"filled",value:wn(f)},stroked:{key:"stroked",value:wn(w)},strokeColor:{key:"strokecolor",value:p},strokeWeight:{key:"strokeweight",value:d}},children:v}),Sm=({shape:e})=>_m({children:[e]}),Am=({children:e=[]})=>new ae({name:"w:txbxContent",children:e}),km=({style:e,children:t,inset:r})=>new ae({name:"v:textbox",attributes:{style:{key:"style",value:e},inset:{key:"inset",value:r?`${r.left}, ${r.top}, ${r.right}, ${r.bottom}`:void 0}},children:[Am({children:t})]}),Im="#_x0000_t202",Rm=({id:e,children:t,type:r=Im,style:n})=>Tm({id:e,type:r,style:n,children:[km({style:"mso-fit-shape-to-text:t;",children:t})]}),Cm=["style","children"],F0=class extends $r{constructor(e){let{style:t,children:r}=e,n=zr(e,Cm);super("w:p"),Y(this,"run",void 0),this.root.push(new xt(n)),this.run=new ae({name:"w:r",children:[Sm({shape:Rm({children:r,id:Tt(),style:t})})]}),this.root.push(this.run)}prepForXml(e){return e.stack[e.stack.length-1]instanceof Ce?this.run.prepForXml(e):super.prepForXml(e)}},Nm=de(((e,t)=>{Lt(),ft();(function(r){typeof e=="object"&&typeof t<"u"?t.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof Oe<"u"?Oe:typeof self<"u"?self:this).JSZip=r()})(function(){return(function r(n,i,o){function a(h,m){if(!i[h]){if(!n[h]){var f=typeof mr=="function"&&mr;if(!m&&f)return f(h,!0);if(s)return s(h,!0);var w=new Error("Cannot find module '"+h+"'");throw w.code="MODULE_NOT_FOUND",w}var p=i[h]={exports:{}};n[h][0].call(p.exports,function(d){var v=n[h][1][d];return a(v||d)},p,p.exports,r,n,i,o)}return i[h].exports}for(var s=typeof mr=="function"&&mr,u=0;u<o.length;u++)a(o[u]);return a})({1:[function(r,n,i){"use strict";var o=r("./utils"),a=r("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(u){for(var h,m,f,w,p,d,v,_=[],S=0,E=u.length,N=E,C=o.getTypeOf(u)!=="string";S<u.length;)N=E-S,f=C?(h=u[S++],m=S<E?u[S++]:0,S<E?u[S++]:0):(h=u.charCodeAt(S++),m=S<E?u.charCodeAt(S++):0,S<E?u.charCodeAt(S++):0),w=h>>2,p=(3&h)<<4|m>>4,d=1<N?(15&m)<<2|f>>6:64,v=2<N?63&f:64,_.push(s.charAt(w)+s.charAt(p)+s.charAt(d)+s.charAt(v));return _.join("")},i.decode=function(u){var h,m,f,w,p,d,v=0,_=0,S="data:";if(u.substr(0,S.length)===S)throw new Error("Invalid base64 input, it looks like a data url.");var E,N=3*(u=u.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(u.charAt(u.length-1)===s.charAt(64)&&N--,u.charAt(u.length-2)===s.charAt(64)&&N--,N%1!=0)throw new Error("Invalid base64 input, bad content length.");for(E=a.uint8array?new Uint8Array(0|N):new Array(0|N);v<u.length;)h=s.indexOf(u.charAt(v++))<<2|(w=s.indexOf(u.charAt(v++)))>>4,m=(15&w)<<4|(p=s.indexOf(u.charAt(v++)))>>2,f=(3&p)<<6|(d=s.indexOf(u.charAt(v++))),E[_++]=h,p!==64&&(E[_++]=m),d!==64&&(E[_++]=f);return E}},{"./support":30,"./utils":32}],2:[function(r,n,i){"use strict";var o=r("./external"),a=r("./stream/DataWorker"),s=r("./stream/Crc32Probe"),u=r("./stream/DataLengthProbe");function h(m,f,w,p,d){this.compressedSize=m,this.uncompressedSize=f,this.crc32=w,this.compression=p,this.compressedContent=d}h.prototype={getContentWorker:function(){var m=new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),f=this;return m.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(m,f,w){return m.pipe(new s).pipe(new u("uncompressedSize")).pipe(f.compressWorker(w)).pipe(new u("compressedSize")).withStreamInfo("compression",f)},n.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,i){"use strict";var o=r("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},i.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,i){"use strict";var o=r("./utils"),a=(function(){for(var s,u=[],h=0;h<256;h++){s=h;for(var m=0;m<8;m++)s=1&s?3988292384^s>>>1:s>>>1;u[h]=s}return u})();n.exports=function(s,u){return s!==void 0&&s.length?o.getTypeOf(s)!=="string"?(function(h,m,f,w){var p=a,d=w+f;h^=-1;for(var v=w;v<d;v++)h=h>>>8^p[255&(h^m[v])];return-1^h})(0|u,s,s.length,0):(function(h,m,f,w){var p=a,d=w+f;h^=-1;for(var v=w;v<d;v++)h=h>>>8^p[255&(h^m.charCodeAt(v))];return-1^h})(0|u,s,s.length,0):0}},{"./utils":32}],5:[function(r,n,i){"use strict";i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(r,n,i){"use strict";var o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,i){"use strict";var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=r("pako"),s=r("./utils"),u=r("./stream/GenericWorker"),h=o?"uint8array":"array";function m(f,w){u.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=w,this.meta={}}i.magic="\b\0",s.inherits(m,u),m.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(s.transformTo(h,f.data),!1)},m.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(w){f.push({data:w,meta:f.meta})}},i.compressWorker=function(f){return new m("Deflate",f)},i.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,i){"use strict";function o(p,d){var v,_="";for(v=0;v<d;v++)_+=String.fromCharCode(255&p),p>>>=8;return _}function a(p,d,v,_,S,E){var N,C,T=p.file,g=p.compression,O=E!==h.utf8encode,M=s.transformTo("string",E(T.name)),k=s.transformTo("string",h.utf8encode(T.name)),q=T.comment,te=s.transformTo("string",E(q)),P=s.transformTo("string",h.utf8encode(q)),G=k.length!==T.name.length,I=P.length!==q.length,$="",K="",j="",se=T.dir,Z=T.date,re={crc32:0,compressedSize:0,uncompressedSize:0};d&&!v||(re.crc32=p.crc32,re.compressedSize=p.compressedSize,re.uncompressedSize=p.uncompressedSize);var z=0;d&&(z|=8),O||!G&&!I||(z|=2048);var D=0,J=0;se&&(D|=16),S==="UNIX"?(J=798,D|=(function(ne,pe){var A=ne;return ne||(A=pe?16893:33204),(65535&A)<<16})(T.unixPermissions,se)):(J=20,D|=(function(ne){return 63&(ne||0)})(T.dosPermissions)),N=Z.getUTCHours(),N<<=6,N|=Z.getUTCMinutes(),N<<=5,N|=Z.getUTCSeconds()/2,C=Z.getUTCFullYear()-1980,C<<=4,C|=Z.getUTCMonth()+1,C<<=5,C|=Z.getUTCDate(),G&&(K=o(1,1)+o(m(M),4)+k,$+="up"+o(K.length,2)+K),I&&(j=o(1,1)+o(m(te),4)+P,$+="uc"+o(j.length,2)+j);var Q="";return Q+=`
26
+ \0`,Q+=o(z,2),Q+=g.magic,Q+=o(N,2),Q+=o(C,2),Q+=o(re.crc32,4),Q+=o(re.compressedSize,4),Q+=o(re.uncompressedSize,4),Q+=o(M.length,2),Q+=o($.length,2),{fileRecord:f.LOCAL_FILE_HEADER+Q+M+$,dirRecord:f.CENTRAL_FILE_HEADER+o(J,2)+Q+o(te.length,2)+"\0\0\0\0"+o(D,4)+o(_,4)+M+$+te}}var s=r("../utils"),u=r("../stream/GenericWorker"),h=r("../utf8"),m=r("../crc32"),f=r("../signature");function w(p,d,v,_){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=v,this.encodeFileName=_,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(w,u),w.prototype.push=function(p){var d=p.meta.percent||0,v=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,u.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:v?(d+100*(v-_-1))/v:100}}))},w.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var d=this.streamFiles&&!p.file.dir;if(d){var v=a(p,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:v.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(p){this.accumulate=!1;var d=this.streamFiles&&!p.file.dir,v=a(p,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(v.dirRecord),d)this.push({data:(function(_){return f.DATA_DESCRIPTOR+o(_.crc32,4)+o(_.compressedSize,4)+o(_.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:v.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var p=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var v=this.bytesWritten-p,_=(function(S,E,N,C,T){var g=s.transformTo("string",T(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(S,2)+o(S,2)+o(E,4)+o(N,4)+o(g.length,2)+g})(this.dirRecords.length,v,p,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},w.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},w.prototype.registerPrevious=function(p){this._sources.push(p);var d=this;return p.on("data",function(v){d.processChunk(v)}),p.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),p.on("error",function(v){d.error(v)}),this},w.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},w.prototype.error=function(p){var d=this._sources;if(!u.prototype.error.call(this,p))return!1;for(var v=0;v<d.length;v++)try{d[v].error(p)}catch{}return!0},w.prototype.lock=function(){u.prototype.lock.call(this);for(var p=this._sources,d=0;d<p.length;d++)p[d].lock()},n.exports=w},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,i){"use strict";var o=r("../compressions"),a=r("./ZipFileWorker");i.generateWorker=function(s,u,h){var m=new a(u.streamFiles,h,u.platform,u.encodeFileName),f=0;try{s.forEach(function(w,p){f++;var d=(function(E,N){var C=E||N,T=o[C];if(!T)throw new Error(C+" is not a valid compression method !");return T})(p.options.compression,u.compression),v=p.options.compressionOptions||u.compressionOptions||{},_=p.dir,S=p.date;p._compressWorker(d,v).withStreamInfo("file",{name:w,dir:_,date:S,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(m)}),m.entriesCount=f}catch(w){m.error(w)}return m}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,i){"use strict";function o(){if(!(this instanceof o))return new o;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 a=new o;for(var s in this)typeof this[s]!="function"&&(a[s]=this[s]);return a}}(o.prototype=r("./object")).loadAsync=r("./load"),o.support=r("./support"),o.defaults=r("./defaults"),o.version="3.10.2",o.loadAsync=function(a,s){return new o().loadAsync(a,s)},o.external=r("./external"),n.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,i){"use strict";var o=r("./utils"),a=r("./external"),s=r("./utf8"),u=r("./zipEntries"),h=r("./stream/Crc32Probe"),m=r("./nodejsUtils");function f(w){return new a.Promise(function(p,d){var v=w.decompressed.getContentWorker().pipe(new h);v.on("error",function(_){d(_)}).on("end",function(){v.streamInfo.crc32!==w.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(w,p){var d=this;return p=o.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),m.isNode&&m.isStream(w)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",w,!0,p.optimizedBinaryString,p.base64).then(function(v){var _=new u(p);return _.load(v),_}).then(function(v){var _=[a.Promise.resolve(v)],S=v.files;if(p.checkCRC32)for(var E=0;E<S.length;E++)_.push(f(S[E]));return a.Promise.all(_)}).then(function(v){for(var _=v.shift(),S=_.files,E=0;E<S.length;E++){var N=S[E],C=N.fileNameStr,T=o.resolve(N.fileNameStr);d.file(T,N.decompressed,{binary:!0,optimizedBinaryString:!0,date:N.date,dir:N.dir,comment:N.fileCommentStr.length?N.fileCommentStr:null,unixPermissions:N.unixPermissions,dosPermissions:N.dosPermissions,createFolders:p.createFolders}),N.dir||(d.file(T).unsafeOriginalName=C)}return _.zipComment.length&&(d.comment=_.zipComment),d})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,i){"use strict";var o=r("../utils"),a=r("../stream/GenericWorker");function s(u,h){a.call(this,"Nodejs stream input adapter for "+u),this._upstreamEnded=!1,this._bindStream(h)}o.inherits(s,a),s.prototype._bindStream=function(u){var h=this;(this._stream=u).pause(),u.on("data",function(m){h.push({data:m,meta:{percent:0}})}).on("error",function(m){h.isPaused?this.generatedError=m:h.error(m)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},s.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,i){"use strict";var o=r("readable-stream").Readable;function a(s,u,h){o.call(this,u),this._helper=s;var m=this;s.on("data",function(f,w){m.push(f)||m._helper.pause(),h&&h(w)}).on("error",function(f){m.emit("error",f)}).on("end",function(){m.push(null)})}r("../utils").inherits(a,o),a.prototype._read=function(){this._helper.resume()},n.exports=a},{"../utils":32,"readable-stream":16}],14:[function(r,n,i){"use strict";n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,a);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,a)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var a=new Buffer(o);return a.fill(0),a},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(r,n,i){"use strict";function o(C,T,g){var O,M=s.getTypeOf(T),k=s.extend(g||{},m);k.date=k.date||new Date,k.compression!==null&&(k.compression=k.compression.toUpperCase()),typeof k.unixPermissions=="string"&&(k.unixPermissions=parseInt(k.unixPermissions,8)),k.unixPermissions&&16384&k.unixPermissions&&(k.dir=!0),k.dosPermissions&&16&k.dosPermissions&&(k.dir=!0),k.dir&&(C=S(C)),k.createFolders&&(O=_(C))&&E.call(this,O,!0);var q=M==="string"&&k.binary===!1&&k.base64===!1;g&&g.binary!==void 0||(k.binary=!q),(T instanceof f&&T.uncompressedSize===0||k.dir||!T||T.length===0)&&(k.base64=!1,k.binary=!0,T="",k.compression="STORE",M="string");var te=null;te=T instanceof f||T instanceof u?T:d.isNode&&d.isStream(T)?new v(C,T):s.prepareContent(C,T,k.binary,k.optimizedBinaryString,k.base64);var P=new w(C,te,k);this.files[C]=P}var a=r("./utf8"),s=r("./utils"),u=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),m=r("./defaults"),f=r("./compressedObject"),w=r("./zipObject"),p=r("./generate"),d=r("./nodejsUtils"),v=r("./nodejs/NodejsStreamInputAdapter"),_=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var T=C.lastIndexOf("/");return 0<T?C.substring(0,T):""},S=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},E=function(C,T){return T=T!==void 0?T:m.createFolders,C=S(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:T}),this.files[C]};function N(C){return Object.prototype.toString.call(C)==="[object RegExp]"}n.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var T,g,O;for(T in this.files)O=this.files[T],(g=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&C(g,O)},filter:function(C){var T=[];return this.forEach(function(g,O){C(g,O)&&T.push(O)}),T},file:function(C,T,g){if(arguments.length!==1)return C=this.root+C,o.call(this,C,T,g),this;if(N(C)){var O=C;return this.filter(function(k,q){return!q.dir&&O.test(k)})}var M=this.files[this.root+C];return M&&!M.dir?M:null},folder:function(C){if(!C)return this;if(N(C))return this.filter(function(M,k){return k.dir&&C.test(M)});var T=this.root+C,g=E.call(this,T),O=this.clone();return O.root=g.name,O},remove:function(C){C=this.root+C;var T=this.files[C];if(T||(C.slice(-1)!=="/"&&(C+="/"),T=this.files[C]),T&&!T.dir)delete this.files[C];else for(var g=this.filter(function(M,k){return k.name.slice(0,C.length)===C}),O=0;O<g.length;O++)delete this.files[g[O].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var T,g={};try{if((g=s.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=g.type.toLowerCase(),g.compression=g.compression.toUpperCase(),g.type==="binarystring"&&(g.type="string"),!g.type)throw new Error("No output type specified.");s.checkSupport(g.type),g.platform!=="darwin"&&g.platform!=="freebsd"&&g.platform!=="linux"&&g.platform!=="sunos"||(g.platform="UNIX"),g.platform==="win32"&&(g.platform="DOS");var O=g.comment||this.comment||"";T=p.generateWorker(this,g,O)}catch(M){(T=new u("error")).error(M)}return new h(T,g.type||"string",g.mimeType)},generateAsync:function(C,T){return this.generateInternalStream(C).accumulate(T)},generateNodeStream:function(C,T){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(T)}}},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,i){"use strict";n.exports=r("stream")},{stream:void 0}],17:[function(r,n,i){"use strict";var o=r("./DataReader");function a(s){o.call(this,s);for(var u=0;u<this.data.length;u++)s[u]=255&s[u]}r("../utils").inherits(a,o),a.prototype.byteAt=function(s){return this.data[this.zero+s]},a.prototype.lastIndexOfSignature=function(s){for(var u=s.charCodeAt(0),h=s.charCodeAt(1),m=s.charCodeAt(2),f=s.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===u&&this.data[w+1]===h&&this.data[w+2]===m&&this.data[w+3]===f)return w-this.zero;return-1},a.prototype.readAndCheckSignature=function(s){var u=s.charCodeAt(0),h=s.charCodeAt(1),m=s.charCodeAt(2),f=s.charCodeAt(3),w=this.readData(4);return u===w[0]&&h===w[1]&&m===w[2]&&f===w[3]},a.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var u=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,u},n.exports=a},{"../utils":32,"./DataReader":18}],18:[function(r,n,i){"use strict";var o=r("../utils");function a(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var u,h=0;for(this.checkOffset(s),u=this.index+s-1;u>=this.index;u--)h=(h<<8)+this.byteAt(u);return this.index+=s,h},readString:function(s){return o.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},n.exports=a},{"../utils":32}],19:[function(r,n,i){"use strict";var o=r("./Uint8ArrayReader");function a(s){o.call(this,s)}r("../utils").inherits(a,o),a.prototype.readData=function(s){this.checkOffset(s);var u=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,u},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,i){"use strict";var o=r("./DataReader");function a(s){o.call(this,s)}r("../utils").inherits(a,o),a.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},a.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},a.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},a.prototype.readData=function(s){this.checkOffset(s);var u=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,u},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(r,n,i){"use strict";var o=r("./ArrayReader");function a(s){o.call(this,s)}r("../utils").inherits(a,o),a.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,u},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,i){"use strict";var o=r("../utils"),a=r("../support"),s=r("./ArrayReader"),u=r("./StringReader"),h=r("./NodeBufferReader"),m=r("./Uint8ArrayReader");n.exports=function(f){var w=o.getTypeOf(f);return o.checkSupport(w),w!=="string"||a.uint8array?w==="nodebuffer"?new h(f):a.uint8array?new m(o.transformTo("uint8array",f)):new s(o.transformTo("array",f)):new u(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,i){"use strict";i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,i){"use strict";var o=r("./GenericWorker"),a=r("../utils");function s(u){o.call(this,"ConvertWorker to "+u),this.destType=u}a.inherits(s,o),s.prototype.processChunk=function(u){this.push({data:a.transformTo(this.destType,u.data),meta:u.meta})},n.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,i){"use strict";var o=r("./GenericWorker"),a=r("../crc32");function s(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(s,o),s.prototype.processChunk=function(u){this.streamInfo.crc32=a(u.data,this.streamInfo.crc32||0),this.push(u)},n.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,i){"use strict";var o=r("../utils"),a=r("./GenericWorker");function s(u){a.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}o.inherits(s,a),s.prototype.processChunk=function(u){if(u){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+u.data.length}a.prototype.processChunk.call(this,u)},n.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,i){"use strict";var o=r("../utils"),a=r("./GenericWorker");function s(u){a.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(m){h.dataIsReady=!0,h.data=m,h.max=m&&m.length||0,h.type=o.getTypeOf(m),h.isPaused||h._tickAndRepeat()},function(m){h.error(m)})}o.inherits(s,a),s.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,h);break;case"uint8array":u=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":u=this.data.slice(this.index,h)}return this.index=h,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,i){"use strict";function o(a){this.name=a||"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}o.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,s){return this._listeners[a].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,s){if(this._listeners[a])for(var u=0;u<this._listeners[a].length;u++)this._listeners[a][u].call(this,s)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var s=this;return a.on("data",function(u){s.processChunk(u)}),a.on("end",function(){s.end()}),a.on("error",function(u){s.error(u)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,s){return this.extraStreamInfo[a]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},n.exports=o},{}],29:[function(r,n,i){"use strict";var o=r("../utils"),a=r("./ConvertWorker"),s=r("./GenericWorker"),u=r("../base64"),h=r("../support"),m=r("../external"),f=null;if(h.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(d,v){return new m.Promise(function(_,S){var E=[],N=d._internalType,C=d._outputType,T=d._mimeType;d.on("data",function(g,O){E.push(g),v&&v(O)}).on("error",function(g){E=[],S(g)}).on("end",function(){try{_((function(g,O,M){switch(g){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),M);case"base64":return u.encode(O);default:return o.transformTo(g,O)}})(C,(function(g,O){var M,k=0,q=null,te=0;for(M=0;M<O.length;M++)te+=O[M].length;switch(g){case"string":return O.join("");case"array":return Array.prototype.concat.apply([],O);case"uint8array":for(q=new Uint8Array(te),M=0;M<O.length;M++)q.set(O[M],k),k+=O[M].length;return q;case"nodebuffer":return Buffer.concat(O);default:throw new Error("concat : unsupported type '"+g+"'")}})(N,E),T))}catch(g){S(g)}E=[]}).resume()})}function p(d,v,_){var S=v;switch(v){case"blob":case"arraybuffer":S="uint8array";break;case"base64":S="string"}try{this._internalType=S,this._outputType=v,this._mimeType=_,o.checkSupport(S),this._worker=d.pipe(new a(S)),d.lock()}catch(E){this._worker=new s("error"),this._worker.error(E)}}p.prototype={accumulate:function(d){return w(this,d)},on:function(d,v){var _=this;return d==="data"?this._worker.on(d,function(S){v.call(_,S.data,S.meta)}):this._worker.on(d,function(){o.delay(v,arguments,_)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(d){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},d)}},n.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var o=new ArrayBuffer(0);try{i.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(o),i.blob=a.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!r("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,i){"use strict";for(var o=r("./utils"),a=r("./support"),s=r("./nodejsUtils"),u=r("./stream/GenericWorker"),h=new Array(256),m=0;m<256;m++)h[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;h[254]=h[254]=1;function f(){u.call(this,"utf-8 decode"),this.leftOver=null}function w(){u.call(this,"utf-8 encode")}i.utf8encode=function(p){return a.nodebuffer?s.newBufferFrom(p,"utf-8"):(function(d){var v,_,S,E,N,C=d.length,T=0;for(E=0;E<C;E++)(64512&(_=d.charCodeAt(E)))==55296&&E+1<C&&(64512&(S=d.charCodeAt(E+1)))==56320&&(_=65536+(_-55296<<10)+(S-56320),E++),T+=_<128?1:_<2048?2:_<65536?3:4;for(v=a.uint8array?new Uint8Array(T):new Array(T),E=N=0;N<T;E++)(64512&(_=d.charCodeAt(E)))==55296&&E+1<C&&(64512&(S=d.charCodeAt(E+1)))==56320&&(_=65536+(_-55296<<10)+(S-56320),E++),_<128?v[N++]=_:(_<2048?v[N++]=192|_>>>6:(_<65536?v[N++]=224|_>>>12:(v[N++]=240|_>>>18,v[N++]=128|_>>>12&63),v[N++]=128|_>>>6&63),v[N++]=128|63&_);return v})(p)},i.utf8decode=function(p){return a.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):(function(d){var v,_,S,E,N=d.length,C=new Array(2*N);for(v=_=0;v<N;)if((S=d[v++])<128)C[_++]=S;else if(4<(E=h[S]))C[_++]=65533,v+=E-1;else{for(S&=E===2?31:E===3?15:7;1<E&&v<N;)S=S<<6|63&d[v++],E--;1<E?C[_++]=65533:S<65536?C[_++]=S:(S-=65536,C[_++]=55296|S>>10&1023,C[_++]=56320|1023&S)}return C.length!==_&&(C.subarray?C=C.subarray(0,_):C.length=_),o.applyFromCharCode(C)})(p=o.transformTo(a.uint8array?"uint8array":"array",p))},o.inherits(f,u),f.prototype.processChunk=function(p){var d=o.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var v=d;(d=new Uint8Array(v.length+this.leftOver.length)).set(this.leftOver,0),d.set(v,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var _=(function(E,N){var C;for((N=N||E.length)>E.length&&(N=E.length),C=N-1;0<=C&&(192&E[C])==128;)C--;return C<0||C===0?N:C+h[E[C]]>N?C:N})(d),S=d;_!==d.length&&(a.uint8array?(S=d.subarray(0,_),this.leftOver=d.subarray(_,d.length)):(S=d.slice(0,_),this.leftOver=d.slice(_,d.length))),this.push({data:i.utf8decode(S),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=f,o.inherits(w,u),w.prototype.processChunk=function(p){this.push({data:i.utf8encode(p.data),meta:p.meta})},i.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,i){"use strict";var o=r("./support"),a=r("./base64"),s=r("./nodejsUtils"),u=r("./external");function h(v){return v}function m(v,_){for(var S=0;S<v.length;++S)_[S]=255&v.charCodeAt(S);return _}r("setimmediate"),i.newBlob=function(v,_){i.checkSupport("blob");try{return new Blob([v],{type:_})}catch{try{var S=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return S.append(v),S.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(v,_,S){var E=[],N=0,C=v.length;if(C<=S)return String.fromCharCode.apply(null,v);for(;N<C;)_==="array"||_==="nodebuffer"?E.push(String.fromCharCode.apply(null,v.slice(N,Math.min(N+S,C)))):E.push(String.fromCharCode.apply(null,v.subarray(N,Math.min(N+S,C)))),N+=S;return E.join("")},stringifyByChar:function(v){for(var _="",S=0;S<v.length;S++)_+=String.fromCharCode(v[S]);return _},applyCanBeUsed:{uint8array:(function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,s.allocBuffer(1)).length===1}catch{return!1}})()}};function w(v){var _=65536,S=i.getTypeOf(v),E=!0;if(S==="uint8array"?E=f.applyCanBeUsed.uint8array:S==="nodebuffer"&&(E=f.applyCanBeUsed.nodebuffer),E)for(;1<_;)try{return f.stringifyByChunk(v,S,_)}catch{_=Math.floor(_/2)}return f.stringifyByChar(v)}function p(v,_){for(var S=0;S<v.length;S++)_[S]=v[S];return _}i.applyFromCharCode=w;var d={};d.string={string:h,array:function(v){return m(v,new Array(v.length))},arraybuffer:function(v){return d.string.uint8array(v).buffer},uint8array:function(v){return m(v,new Uint8Array(v.length))},nodebuffer:function(v){return m(v,s.allocBuffer(v.length))}},d.array={string:w,array:h,arraybuffer:function(v){return new Uint8Array(v).buffer},uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return s.newBufferFrom(v)}},d.arraybuffer={string:function(v){return w(new Uint8Array(v))},array:function(v){return p(new Uint8Array(v),new Array(v.byteLength))},arraybuffer:h,uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return s.newBufferFrom(new Uint8Array(v))}},d.uint8array={string:w,array:function(v){return p(v,new Array(v.length))},arraybuffer:function(v){return v.buffer},uint8array:h,nodebuffer:function(v){return s.newBufferFrom(v)}},d.nodebuffer={string:w,array:function(v){return p(v,new Array(v.length))},arraybuffer:function(v){return d.nodebuffer.uint8array(v).buffer},uint8array:function(v){return p(v,new Uint8Array(v.length))},nodebuffer:h},i.transformTo=function(v,_){return _=_||"",v?(i.checkSupport(v),d[i.getTypeOf(_)][v](_)):_},i.resolve=function(v){for(var _=v.split("/"),S=[],E=0;E<_.length;E++){var N=_[E];N==="."||N===""&&E!==0&&E!==_.length-1||(N===".."?S.pop():S.push(N))}return S.join("/")},i.getTypeOf=function(v){if(typeof v=="string")return"string";var _=Object.prototype.toString.call(v);return _==="[object Array]"?"array":o.nodebuffer&&s.isBuffer(v)?"nodebuffer":o.uint8array&&_==="[object Uint8Array]"?"uint8array":o.arraybuffer&&_==="[object ArrayBuffer]"?"arraybuffer":void 0},i.checkSupport=function(v){if(!o[v.toLowerCase()])throw new Error(v+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(v){var _,S,E="";for(S=0;S<(v||"").length;S++)E+="\\x"+((_=v.charCodeAt(S))<16?"0":"")+_.toString(16).toUpperCase();return E},i.delay=function(v,_,S){setImmediate(function(){v.apply(S||null,_||[])})},i.inherits=function(v,_){function S(){}S.prototype=_.prototype,v.prototype=new S},i.extend=function(){var v,_,S={};for(v=0;v<arguments.length;v++)for(_ in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],_)&&S[_]===void 0&&(S[_]=arguments[v][_]);return S},i.prepareContent=function(v,_,S,E,N){return u.Promise.resolve(_).then(function(C){return o.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)?Blob.prototype.arrayBuffer!==void 0?C.arrayBuffer():typeof FileReader<"u"?new u.Promise(function(T,g){var O=new FileReader;O.onload=function(M){T(M.target.result)},O.onerror=function(M){g(M.target.error)},O.readAsArrayBuffer(C)}):u.Promise.reject(new Error(v+" is a Blob, but we have no way of reading it.")):C}).then(function(C){var T=i.getTypeOf(C);return T?(T==="arraybuffer"?C=i.transformTo("uint8array",C):T==="string"&&(N?C=a.decode(C):S&&E!==!0&&(C=(function(g){return m(g,o.uint8array?new Uint8Array(g.length):new Array(g.length))})(C))),C):u.Promise.reject(new Error("Can't read the data of '"+v+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,i){"use strict";var o=r("./reader/readerFor"),a=r("./utils"),s=r("./signature"),u=r("./zipEntry"),h=r("./support");function m(f){this.files=[],this.loadOptions=f}m.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(w)+", expected "+a.pretty(f)+")")}},isSignature:function(f,w){var p=this.reader.index;this.reader.setIndex(f);var d=this.reader.readString(4)===w;return this.reader.setIndex(p),d},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 f=this.reader.readData(this.zipCommentLength),w=h.uint8array?"uint8array":"array",p=a.transformTo(w,f);this.zipComment=this.loadOptions.decodeFileName(p)},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 f,w,p,d=this.zip64EndOfCentralSize-44;0<d;)f=this.reader.readInt(2),w=this.reader.readInt(4),p=this.reader.readData(w),this.zip64ExtensibleData[f]={id:f,length:w,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){for(var f=0,w;f<this.files.length;f++)w=this.files[f],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(f=new u({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var w=f;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var d=w-p;if(0<d)this.isSignature(w,s.CENTRAL_FILE_HEADER)||(this.reader.zero=d);else if(d<0)throw new Error("Corrupted zip: missing "+Math.abs(d)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=m},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,i){"use strict";var o=r("./reader/readerFor"),a=r("./utils"),s=r("./compressedObject"),u=r("./crc32"),h=r("./utf8"),m=r("./compressions"),f=r("./support");function w(p,d){this.options=p,this.loadOptions=d}w.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var d,v;if(p.skip(22),this.fileNameLength=p.readInt(2),v=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(v),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((d=(function(_){for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)&&m[S].magic===_)return m[S];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,d,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var d=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(d),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var d,v,_,S=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<S;)d=p.readInt(2),v=p.readInt(2),_=p.readData(v),this.extraFields[d]={id:d,length:v,value:_};p.setIndex(S)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var d=this.findExtraFieldUnicodePath();if(d!==null)this.fileNameStr=d;else{var v=a.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(v)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var S=a.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(S)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var d=o(p.value);return d.readInt(1)!==1||u(this.fileName)!==d.readInt(4)?null:h.utf8decode(d.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var d=o(p.value);return d.readInt(1)!==1||u(this.fileComment)!==d.readInt(4)?null:h.utf8decode(d.readData(p.length-5))}return null}},n.exports=w},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,i){"use strict";function o(d,v,_){this.name=d,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=v,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var a=r("./stream/StreamHelper"),s=r("./stream/DataWorker"),u=r("./utf8"),h=r("./compressedObject"),m=r("./stream/GenericWorker");o.prototype={internalStream:function(d){var v=null,_="string";try{if(!d)throw new Error("No output type specified.");var S=(_=d.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),v=this._decompressWorker();var E=!this._dataBinary;E&&!S&&(v=v.pipe(new u.Utf8EncodeWorker)),!E&&S&&(v=v.pipe(new u.Utf8DecodeWorker))}catch(N){(v=new m("error")).error(N)}return new a(v,_,"")},async:function(d,v){return this.internalStream(d).accumulate(v)},nodeStream:function(d,v){return this.internalStream(d||"nodebuffer").toNodejsStream(v)},_compressWorker:function(d,v){if(this._data instanceof h&&this._data.compression.magic===d.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new u.Utf8EncodeWorker)),h.createWorkerFrom(_,d,v)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof m?this._data:new s(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],w=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)o.prototype[f[p]]=w;n.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,i){(function(o){"use strict";var a,s,u=o.MutationObserver||o.WebKitMutationObserver;if(u){var h=0,m=new u(d),f=o.document.createTextNode("");m.observe(f,{characterData:!0}),a=function(){f.data=h=++h%2}}else if(o.setImmediate||o.MessageChannel===void 0)a="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var v=o.document.createElement("script");v.onreadystatechange=function(){d(),v.onreadystatechange=null,v.parentNode.removeChild(v),v=null},o.document.documentElement.appendChild(v)}:function(){setTimeout(d,0)};else{var w=new o.MessageChannel;w.port1.onmessage=d,a=function(){w.port2.postMessage(0)}}var p=[];function d(){var v,_;s=!0;for(var S=p.length;S;){for(_=p,p=[],v=-1;++v<S;)_[v]();S=p.length}s=!1}n.exports=function(v){p.push(v)!==1||s||a()}}).call(this,typeof Oe<"u"?Oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,i){"use strict";var o=r("immediate");function a(){}var s={},u=["REJECTED"],h=["FULFILLED"],m=["PENDING"];function f(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=m,this.queue=[],this.outcome=void 0,S!==a&&v(this,S)}function w(S,E,N){this.promise=S,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof N=="function"&&(this.onRejected=N,this.callRejected=this.otherCallRejected)}function p(S,E,N){o(function(){var C;try{C=E(N)}catch(T){return s.reject(S,T)}C===S?s.reject(S,new TypeError("Cannot resolve promise with itself")):s.resolve(S,C)})}function d(S){var E=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof E=="function")return function(){E.apply(S,arguments)}}function v(S,E){var N=!1;function C(O){N||(N=!0,s.reject(S,O))}function T(O){N||(N=!0,s.resolve(S,O))}var g=_(function(){E(T,C)});g.status==="error"&&C(g.value)}function _(S,E){var N={};try{N.value=S(E),N.status="success"}catch(C){N.status="error",N.value=C}return N}(n.exports=f).prototype.finally=function(S){if(typeof S!="function")return this;var E=this.constructor;return this.then(function(N){return E.resolve(S()).then(function(){return N})},function(N){return E.resolve(S()).then(function(){throw N})})},f.prototype.catch=function(S){return this.then(null,S)},f.prototype.then=function(S,E){if(typeof S!="function"&&this.state===h||typeof E!="function"&&this.state===u)return this;var N=new this.constructor(a);return this.state!==m?p(N,this.state===h?S:E,this.outcome):this.queue.push(new w(N,S,E)),N},w.prototype.callFulfilled=function(S){s.resolve(this.promise,S)},w.prototype.otherCallFulfilled=function(S){p(this.promise,this.onFulfilled,S)},w.prototype.callRejected=function(S){s.reject(this.promise,S)},w.prototype.otherCallRejected=function(S){p(this.promise,this.onRejected,S)},s.resolve=function(S,E){var N=_(d,E);if(N.status==="error")return s.reject(S,N.value);var C=N.value;if(C)v(S,C);else{S.state=h,S.outcome=E;for(var T=-1,g=S.queue.length;++T<g;)S.queue[T].callFulfilled(E)}return S},s.reject=function(S,E){S.state=u,S.outcome=E;for(var N=-1,C=S.queue.length;++N<C;)S.queue[N].callRejected(E);return S},f.resolve=function(S){return S instanceof this?S:s.resolve(new this(a),S)},f.reject=function(S){var E=new this(a);return s.reject(E,S)},f.all=function(S){var E=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var N=S.length,C=!1;if(!N)return this.resolve([]);for(var T=new Array(N),g=0,O=-1,M=new this(a);++O<N;)k(S[O],O);return M;function k(q,te){E.resolve(q).then(function(P){T[te]=P,++g!==N||C||(C=!0,s.resolve(M,T))},function(P){C||(C=!0,s.reject(M,P))})}},f.race=function(S){var E=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var N=S.length,C=!1;if(!N)return this.resolve([]);for(var T=-1,g=new this(a);++T<N;)O=S[T],E.resolve(O).then(function(M){C||(C=!0,s.resolve(g,M))},function(M){C||(C=!0,s.reject(g,M))});var O;return g}},{immediate:36}],38:[function(r,n,i){"use strict";var o={};(0,r("./lib/utils/common").assign)(o,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,i){"use strict";var o=r("./zlib/deflate"),a=r("./utils/common"),s=r("./utils/strings"),u=r("./zlib/messages"),h=r("./zlib/zstream"),m=Object.prototype.toString,f=0,w=-1,p=0,d=8;function v(S){if(!(this instanceof v))return new v(S);this.options=a.assign({level:w,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},S||{});var E=this.options;E.raw&&0<E.windowBits?E.windowBits=-E.windowBits:E.gzip&&0<E.windowBits&&E.windowBits<16&&(E.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var N=o.deflateInit2(this.strm,E.level,E.method,E.windowBits,E.memLevel,E.strategy);if(N!==f)throw new Error(u[N]);if(E.header&&o.deflateSetHeader(this.strm,E.header),E.dictionary){var C=typeof E.dictionary=="string"?s.string2buf(E.dictionary):m.call(E.dictionary)==="[object ArrayBuffer]"?new Uint8Array(E.dictionary):E.dictionary;if((N=o.deflateSetDictionary(this.strm,C))!==f)throw new Error(u[N]);this._dict_set=!0}}function _(S,E){var N=new v(E);if(N.push(S,!0),N.err)throw N.msg||u[N.err];return N.result}v.prototype.push=function(S,E){var N,C,T=this.strm,g=this.options.chunkSize;if(this.ended)return!1;C=E===~~E?E:E===!0?4:0,typeof S=="string"?T.input=s.string2buf(S):m.call(S)==="[object ArrayBuffer]"?T.input=new Uint8Array(S):T.input=S,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new a.Buf8(g),T.next_out=0,T.avail_out=g),(N=o.deflate(T,C))!==1&&N!==f)return this.onEnd(N),!(this.ended=!0);T.avail_out!==0&&(T.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(a.shrinkBuf(T.output,T.next_out))):this.onData(a.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||T.avail_out===0)&&N!==1);return C===4?(N=o.deflateEnd(this.strm),this.onEnd(N),this.ended=!0,N===f):C!==2||(this.onEnd(f),!(T.avail_out=0))},v.prototype.onData=function(S){this.chunks.push(S)},v.prototype.onEnd=function(S){S===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg},i.Deflate=v,i.deflate=_,i.deflateRaw=function(S,E){return(E=E||{}).raw=!0,_(S,E)},i.gzip=function(S,E){return(E=E||{}).gzip=!0,_(S,E)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,i){"use strict";var o=r("./zlib/inflate"),a=r("./utils/common"),s=r("./utils/strings"),u=r("./zlib/constants"),h=r("./zlib/messages"),m=r("./zlib/zstream"),f=r("./zlib/gzheader"),w=Object.prototype.toString;function p(v){if(!(this instanceof p))return new p(v);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},v||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||v&&v.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&(15&_.windowBits)==0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var S=o.inflateInit2(this.strm,_.windowBits);if(S!==u.Z_OK)throw new Error(h[S]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function d(v,_){var S=new p(_);if(S.push(v,!0),S.err)throw S.msg||h[S.err];return S.result}p.prototype.push=function(v,_){var S,E,N,C,T,g,O=this.strm,M=this.options.chunkSize,k=this.options.dictionary,q=!1;if(this.ended)return!1;E=_===~~_?_:_===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof v=="string"?O.input=s.binstring2buf(v):w.call(v)==="[object ArrayBuffer]"?O.input=new Uint8Array(v):O.input=v,O.next_in=0,O.avail_in=O.input.length;do{if(O.avail_out===0&&(O.output=new a.Buf8(M),O.next_out=0,O.avail_out=M),(S=o.inflate(O,u.Z_NO_FLUSH))===u.Z_NEED_DICT&&k&&(g=typeof k=="string"?s.string2buf(k):w.call(k)==="[object ArrayBuffer]"?new Uint8Array(k):k,S=o.inflateSetDictionary(this.strm,g)),S===u.Z_BUF_ERROR&&q===!0&&(S=u.Z_OK,q=!1),S!==u.Z_STREAM_END&&S!==u.Z_OK)return this.onEnd(S),!(this.ended=!0);O.next_out&&(O.avail_out!==0&&S!==u.Z_STREAM_END&&(O.avail_in!==0||E!==u.Z_FINISH&&E!==u.Z_SYNC_FLUSH)||(this.options.to==="string"?(N=s.utf8border(O.output,O.next_out),C=O.next_out-N,T=s.buf2string(O.output,N),O.next_out=C,O.avail_out=M-C,C&&a.arraySet(O.output,O.output,N,C,0),this.onData(T)):this.onData(a.shrinkBuf(O.output,O.next_out)))),O.avail_in===0&&O.avail_out===0&&(q=!0)}while((0<O.avail_in||O.avail_out===0)&&S!==u.Z_STREAM_END);return S===u.Z_STREAM_END&&(E=u.Z_FINISH),E===u.Z_FINISH?(S=o.inflateEnd(this.strm),this.onEnd(S),this.ended=!0,S===u.Z_OK):E!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),!(O.avail_out=0))},p.prototype.onData=function(v){this.chunks.push(v)},p.prototype.onEnd=function(v){v===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},i.Inflate=p,i.inflate=d,i.inflateRaw=function(v,_){return(_=_||{}).raw=!0,d(v,_)},i.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,i){"use strict";var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(u){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var m=h.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var f in m)m.hasOwnProperty(f)&&(u[f]=m[f])}}return u},i.shrinkBuf=function(u,h){return u.length===h?u:u.subarray?u.subarray(0,h):(u.length=h,u)};var a={arraySet:function(u,h,m,f,w){if(h.subarray&&u.subarray)u.set(h.subarray(m,m+f),w);else for(var p=0;p<f;p++)u[w+p]=h[m+p]},flattenChunks:function(u){for(var h=f=0,m=u.length,f,w,p,d;h<m;h++)f+=u[h].length;for(d=new Uint8Array(f),h=w=0,m=u.length;h<m;h++)p=u[h],d.set(p,w),w+=p.length;return d}},s={arraySet:function(u,h,m,f,w){for(var p=0;p<f;p++)u[w+p]=h[m+p]},flattenChunks:function(u){return[].concat.apply([],u)}};i.setTyped=function(u){u?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,a)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,s))},i.setTyped(o)},{}],42:[function(r,n,i){"use strict";var o=r("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s=!1}for(var u=new o.Buf8(256),h=0;h<256;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function m(f,w){if(w<65537&&(f.subarray&&s||!f.subarray&&a))return String.fromCharCode.apply(null,o.shrinkBuf(f,w));for(var p="",d=0;d<w;d++)p+=String.fromCharCode(f[d]);return p}u[254]=u[254]=1,i.string2buf=function(f){var w,p,d,v,_,S=f.length,E=0;for(v=0;v<S;v++)(64512&(p=f.charCodeAt(v)))==55296&&v+1<S&&(64512&(d=f.charCodeAt(v+1)))==56320&&(p=65536+(p-55296<<10)+(d-56320),v++),E+=p<128?1:p<2048?2:p<65536?3:4;for(w=new o.Buf8(E),v=_=0;_<E;v++)(64512&(p=f.charCodeAt(v)))==55296&&v+1<S&&(64512&(d=f.charCodeAt(v+1)))==56320&&(p=65536+(p-55296<<10)+(d-56320),v++),p<128?w[_++]=p:(p<2048?w[_++]=192|p>>>6:(p<65536?w[_++]=224|p>>>12:(w[_++]=240|p>>>18,w[_++]=128|p>>>12&63),w[_++]=128|p>>>6&63),w[_++]=128|63&p);return w},i.buf2binstring=function(f){return m(f,f.length)},i.binstring2buf=function(f){for(var w=new o.Buf8(f.length),p=0,d=w.length;p<d;p++)w[p]=f.charCodeAt(p);return w},i.buf2string=function(f,w){var p,d,v,_,S=w||f.length,E=new Array(2*S);for(p=d=0;p<S;)if((v=f[p++])<128)E[d++]=v;else if(4<(_=u[v]))E[d++]=65533,p+=_-1;else{for(v&=_===2?31:_===3?15:7;1<_&&p<S;)v=v<<6|63&f[p++],_--;1<_?E[d++]=65533:v<65536?E[d++]=v:(v-=65536,E[d++]=55296|v>>10&1023,E[d++]=56320|1023&v)}return m(E,d)},i.utf8border=function(f,w){var p;for((w=w||f.length)>f.length&&(w=f.length),p=w-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?w:p+u[f[p]]>w?p:w}},{"./common":41}],43:[function(r,n,i){"use strict";n.exports=function(o,a,s,u){for(var h=65535&o|0,m=o>>>16&65535|0,f=0;s!==0;){for(s-=f=2e3<s?2e3:s;m=m+(h=h+a[u++]|0)|0,--f;);h%=65521,m%=65521}return h|m<<16|0}},{}],44:[function(r,n,i){"use strict";n.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}},{}],45:[function(r,n,i){"use strict";var o=(function(){for(var a,s=[],u=0;u<256;u++){a=u;for(var h=0;h<8;h++)a=1&a?3988292384^a>>>1:a>>>1;s[u]=a}return s})();n.exports=function(a,s,u,h){var m=o,f=h+u;a^=-1;for(var w=h;w<f;w++)a=a>>>8^m[255&(a^s[w])];return-1^a}},{}],46:[function(r,n,i){"use strict";var o,a=r("../utils/common"),s=r("./trees"),u=r("./adler32"),h=r("./crc32"),m=r("./messages"),f=0,w=4,p=0,d=-2,v=-1,_=4,S=2,E=8,N=9,C=286,T=30,g=19,O=2*C+1,M=15,k=3,q=258,te=q+k+1,P=42,G=113,I=1,$=2,K=3,j=4;function se(y,X){return y.msg=m[X],X}function Z(y){return(y<<1)-(4<y?9:0)}function re(y){for(var X=y.length;0<=--X;)y[X]=0}function z(y){var X=y.state,R=X.pending;R>y.avail_out&&(R=y.avail_out),R!==0&&(a.arraySet(y.output,X.pending_buf,X.pending_out,R,y.next_out),y.next_out+=R,X.pending_out+=R,y.total_out+=R,y.avail_out-=R,X.pending-=R,X.pending===0&&(X.pending_out=0))}function D(y,X){s._tr_flush_block(y,0<=y.block_start?y.block_start:-1,y.strstart-y.block_start,X),y.block_start=y.strstart,z(y.strm)}function J(y,X){y.pending_buf[y.pending++]=X}function Q(y,X){y.pending_buf[y.pending++]=X>>>8&255,y.pending_buf[y.pending++]=255&X}function ne(y,X){var R,l,c=y.max_chain_length,x=y.strstart,B=y.prev_length,V=y.nice_match,W=y.strstart>y.w_size-te?y.strstart-(y.w_size-te):0,le=y.window,ce=y.w_mask,ue=y.prev,fe=y.strstart+q,ve=le[x+B-1],we=le[x+B];y.prev_length>=y.good_match&&(c>>=2),V>y.lookahead&&(V=y.lookahead);do if(le[(R=X)+B]===we&&le[R+B-1]===ve&&le[R]===le[x]&&le[++R]===le[x+1]){x+=2,R++;do;while(le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&le[++x]===le[++R]&&x<fe);if(l=q-(fe-x),x=fe-q,B<l){if(y.match_start=X,V<=(B=l))break;ve=le[x+B-1],we=le[x+B]}}while((X=ue[X&ce])>W&&--c!=0);return B<=y.lookahead?B:y.lookahead}function pe(y){var X,R,l,c,x,B,V,W,le,ce,ue=y.w_size;do{if(c=y.window_size-y.lookahead-y.strstart,y.strstart>=ue+(ue-te)){for(a.arraySet(y.window,y.window,ue,ue,0),y.match_start-=ue,y.strstart-=ue,y.block_start-=ue,X=R=y.hash_size;l=y.head[--X],y.head[X]=ue<=l?l-ue:0,--R;);for(X=R=ue;l=y.prev[--X],y.prev[X]=ue<=l?l-ue:0,--R;);c+=ue}if(y.strm.avail_in===0)break;if(B=y.strm,V=y.window,W=y.strstart+y.lookahead,le=c,ce=void 0,ce=B.avail_in,le<ce&&(ce=le),R=ce===0?0:(B.avail_in-=ce,a.arraySet(V,B.input,B.next_in,ce,W),B.state.wrap===1?B.adler=u(B.adler,V,ce,W):B.state.wrap===2&&(B.adler=h(B.adler,V,ce,W)),B.next_in+=ce,B.total_in+=ce,ce),y.lookahead+=R,y.lookahead+y.insert>=k)for(x=y.strstart-y.insert,y.ins_h=y.window[x],y.ins_h=(y.ins_h<<y.hash_shift^y.window[x+1])&y.hash_mask;y.insert&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[x+k-1])&y.hash_mask,y.prev[x&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=x,x++,y.insert--,!(y.lookahead+y.insert<k)););}while(y.lookahead<te&&y.strm.avail_in!==0)}function A(y,X){for(var R,l;;){if(y.lookahead<te){if(pe(y),y.lookahead<te&&X===f)return I;if(y.lookahead===0)break}if(R=0,y.lookahead>=k&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+k-1])&y.hash_mask,R=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),R!==0&&y.strstart-R<=y.w_size-te&&(y.match_length=ne(y,R)),y.match_length>=k)if(l=s._tr_tally(y,y.strstart-y.match_start,y.match_length-k),y.lookahead-=y.match_length,y.match_length<=y.max_lazy_match&&y.lookahead>=k){for(y.match_length--;y.strstart++,y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+k-1])&y.hash_mask,R=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart,--y.match_length!=0;);y.strstart++}else y.strstart+=y.match_length,y.match_length=0,y.ins_h=y.window[y.strstart],y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+1])&y.hash_mask;else l=s._tr_tally(y,0,y.window[y.strstart]),y.lookahead--,y.strstart++;if(l&&(D(y,!1),y.strm.avail_out===0))return I}return y.insert=y.strstart<k-1?y.strstart:k-1,X===w?(D(y,!0),y.strm.avail_out===0?K:j):y.last_lit&&(D(y,!1),y.strm.avail_out===0)?I:$}function b(y,X){for(var R,l,c;;){if(y.lookahead<te){if(pe(y),y.lookahead<te&&X===f)return I;if(y.lookahead===0)break}if(R=0,y.lookahead>=k&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+k-1])&y.hash_mask,R=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),y.prev_length=y.match_length,y.prev_match=y.match_start,y.match_length=k-1,R!==0&&y.prev_length<y.max_lazy_match&&y.strstart-R<=y.w_size-te&&(y.match_length=ne(y,R),y.match_length<=5&&(y.strategy===1||y.match_length===k&&4096<y.strstart-y.match_start)&&(y.match_length=k-1)),y.prev_length>=k&&y.match_length<=y.prev_length){for(c=y.strstart+y.lookahead-k,l=s._tr_tally(y,y.strstart-1-y.prev_match,y.prev_length-k),y.lookahead-=y.prev_length-1,y.prev_length-=2;++y.strstart<=c&&(y.ins_h=(y.ins_h<<y.hash_shift^y.window[y.strstart+k-1])&y.hash_mask,R=y.prev[y.strstart&y.w_mask]=y.head[y.ins_h],y.head[y.ins_h]=y.strstart),--y.prev_length!=0;);if(y.match_available=0,y.match_length=k-1,y.strstart++,l&&(D(y,!1),y.strm.avail_out===0))return I}else if(y.match_available){if((l=s._tr_tally(y,0,y.window[y.strstart-1]))&&D(y,!1),y.strstart++,y.lookahead--,y.strm.avail_out===0)return I}else y.match_available=1,y.strstart++,y.lookahead--}return y.match_available&&(l=s._tr_tally(y,0,y.window[y.strstart-1]),y.match_available=0),y.insert=y.strstart<k-1?y.strstart:k-1,X===w?(D(y,!0),y.strm.avail_out===0?K:j):y.last_lit&&(D(y,!1),y.strm.avail_out===0)?I:$}function H(y,X,R,l,c){this.good_length=y,this.max_lazy=X,this.nice_length=R,this.max_chain=l,this.func=c}function U(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=E,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*O),this.dyn_dtree=new a.Buf16(2*(2*T+1)),this.bl_tree=new a.Buf16(2*(2*g+1)),re(this.dyn_ltree),re(this.dyn_dtree),re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(M+1),this.heap=new a.Buf16(2*C+1),re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*C+1),re(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function oe(y){var X;return y&&y.state?(y.total_in=y.total_out=0,y.data_type=S,(X=y.state).pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap?P:G,y.adler=X.wrap===2?0:1,X.last_flush=f,s._tr_init(X),p):se(y,d)}function L(y){var X=oe(y);return X===p&&(function(R){R.window_size=2*R.w_size,re(R.head),R.max_lazy_match=o[R.level].max_lazy,R.good_match=o[R.level].good_length,R.nice_match=o[R.level].nice_length,R.max_chain_length=o[R.level].max_chain,R.strstart=0,R.block_start=0,R.lookahead=0,R.insert=0,R.match_length=R.prev_length=k-1,R.match_available=0,R.ins_h=0})(y.state),X}function F(y,X,R,l,c,x){if(!y)return d;var B=1;if(X===v&&(X=6),l<0?(B=0,l=-l):15<l&&(B=2,l-=16),c<1||N<c||R!==E||l<8||15<l||X<0||9<X||x<0||_<x)return se(y,d);l===8&&(l=9);var V=new U;return(y.state=V).strm=y,V.wrap=B,V.gzhead=null,V.w_bits=l,V.w_size=1<<V.w_bits,V.w_mask=V.w_size-1,V.hash_bits=c+7,V.hash_size=1<<V.hash_bits,V.hash_mask=V.hash_size-1,V.hash_shift=~~((V.hash_bits+k-1)/k),V.window=new a.Buf8(2*V.w_size),V.head=new a.Buf16(V.hash_size),V.prev=new a.Buf16(V.w_size),V.lit_bufsize=1<<c+6,V.pending_buf_size=4*V.lit_bufsize,V.pending_buf=new a.Buf8(V.pending_buf_size),V.d_buf=1*V.lit_bufsize,V.l_buf=3*V.lit_bufsize,V.level=X,V.strategy=x,V.method=R,L(y)}o=[new H(0,0,0,0,function(y,X){var R=65535;for(R>y.pending_buf_size-5&&(R=y.pending_buf_size-5);;){if(y.lookahead<=1){if(pe(y),y.lookahead===0&&X===f)return I;if(y.lookahead===0)break}y.strstart+=y.lookahead,y.lookahead=0;var l=y.block_start+R;if((y.strstart===0||y.strstart>=l)&&(y.lookahead=y.strstart-l,y.strstart=l,D(y,!1),y.strm.avail_out===0)||y.strstart-y.block_start>=y.w_size-te&&(D(y,!1),y.strm.avail_out===0))return I}return y.insert=0,X===w?(D(y,!0),y.strm.avail_out===0?K:j):(y.strstart>y.block_start&&(D(y,!1),y.strm.avail_out),I)}),new H(4,4,8,4,A),new H(4,5,16,8,A),new H(4,6,32,32,A),new H(4,4,16,16,b),new H(8,16,32,32,b),new H(8,16,128,128,b),new H(8,32,128,256,b),new H(32,128,258,1024,b),new H(32,258,258,4096,b)],i.deflateInit=function(y,X){return F(y,X,E,15,8,0)},i.deflateInit2=F,i.deflateReset=L,i.deflateResetKeep=oe,i.deflateSetHeader=function(y,X){return y&&y.state?y.state.wrap!==2?d:(y.state.gzhead=X,p):d},i.deflate=function(y,X){var R,l,c,x;if(!y||!y.state||5<X||X<0)return y?se(y,d):d;if(l=y.state,!y.output||!y.input&&y.avail_in!==0||l.status===666&&X!==w)return se(y,y.avail_out===0?-5:d);if(l.strm=y,R=l.last_flush,l.last_flush=X,l.status===P)if(l.wrap===2)y.adler=0,J(l,31),J(l,139),J(l,8),l.gzhead?(J(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),J(l,255&l.gzhead.time),J(l,l.gzhead.time>>8&255),J(l,l.gzhead.time>>16&255),J(l,l.gzhead.time>>24&255),J(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),J(l,255&l.gzhead.os),l.gzhead.extra&&l.gzhead.extra.length&&(J(l,255&l.gzhead.extra.length),J(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(y.adler=h(y.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=69):(J(l,0),J(l,0),J(l,0),J(l,0),J(l,0),J(l,l.level===9?2:2<=l.strategy||l.level<2?4:0),J(l,3),l.status=G);else{var B=E+(l.w_bits-8<<4)<<8;B|=(2<=l.strategy||l.level<2?0:l.level<6?1:l.level===6?2:3)<<6,l.strstart!==0&&(B|=32),B+=31-B%31,l.status=G,Q(l,B),l.strstart!==0&&(Q(l,y.adler>>>16),Q(l,65535&y.adler)),y.adler=1}if(l.status===69)if(l.gzhead.extra){for(c=l.pending;l.gzindex<(65535&l.gzhead.extra.length)&&(l.pending!==l.pending_buf_size||(l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),z(y),c=l.pending,l.pending!==l.pending_buf_size));)J(l,255&l.gzhead.extra[l.gzindex]),l.gzindex++;l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=73)}else l.status=73;if(l.status===73)if(l.gzhead.name){c=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),z(y),c=l.pending,l.pending===l.pending_buf_size)){x=1;break}x=l.gzindex<l.gzhead.name.length?255&l.gzhead.name.charCodeAt(l.gzindex++):0,J(l,x)}while(x!==0);l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),x===0&&(l.gzindex=0,l.status=91)}else l.status=91;if(l.status===91)if(l.gzhead.comment){c=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),z(y),c=l.pending,l.pending===l.pending_buf_size)){x=1;break}x=l.gzindex<l.gzhead.comment.length?255&l.gzhead.comment.charCodeAt(l.gzindex++):0,J(l,x)}while(x!==0);l.gzhead.hcrc&&l.pending>c&&(y.adler=h(y.adler,l.pending_buf,l.pending-c,c)),x===0&&(l.status=103)}else l.status=103;if(l.status===103&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&z(y),l.pending+2<=l.pending_buf_size&&(J(l,255&y.adler),J(l,y.adler>>8&255),y.adler=0,l.status=G)):l.status=G),l.pending!==0){if(z(y),y.avail_out===0)return l.last_flush=-1,p}else if(y.avail_in===0&&Z(X)<=Z(R)&&X!==w)return se(y,-5);if(l.status===666&&y.avail_in!==0)return se(y,-5);if(y.avail_in!==0||l.lookahead!==0||X!==f&&l.status!==666){var V=l.strategy===2?(function(W,le){for(var ce;;){if(W.lookahead===0&&(pe(W),W.lookahead===0)){if(le===f)return I;break}if(W.match_length=0,ce=s._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++,ce&&(D(W,!1),W.strm.avail_out===0))return I}return W.insert=0,le===w?(D(W,!0),W.strm.avail_out===0?K:j):W.last_lit&&(D(W,!1),W.strm.avail_out===0)?I:$})(l,X):l.strategy===3?(function(W,le){for(var ce,ue,fe,ve,we=W.window;;){if(W.lookahead<=q){if(pe(W),W.lookahead<=q&&le===f)return I;if(W.lookahead===0)break}if(W.match_length=0,W.lookahead>=k&&0<W.strstart&&(ue=we[fe=W.strstart-1])===we[++fe]&&ue===we[++fe]&&ue===we[++fe]){ve=W.strstart+q;do;while(ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&ue===we[++fe]&&fe<ve);W.match_length=q-(ve-fe),W.match_length>W.lookahead&&(W.match_length=W.lookahead)}if(W.match_length>=k?(ce=s._tr_tally(W,1,W.match_length-k),W.lookahead-=W.match_length,W.strstart+=W.match_length,W.match_length=0):(ce=s._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++),ce&&(D(W,!1),W.strm.avail_out===0))return I}return W.insert=0,le===w?(D(W,!0),W.strm.avail_out===0?K:j):W.last_lit&&(D(W,!1),W.strm.avail_out===0)?I:$})(l,X):o[l.level].func(l,X);if(V!==K&&V!==j||(l.status=666),V===I||V===K)return y.avail_out===0&&(l.last_flush=-1),p;if(V===$&&(X===1?s._tr_align(l):X!==5&&(s._tr_stored_block(l,0,0,!1),X===3&&(re(l.head),l.lookahead===0&&(l.strstart=0,l.block_start=0,l.insert=0))),z(y),y.avail_out===0))return l.last_flush=-1,p}return X!==w?p:l.wrap<=0?1:(l.wrap===2?(J(l,255&y.adler),J(l,y.adler>>8&255),J(l,y.adler>>16&255),J(l,y.adler>>24&255),J(l,255&y.total_in),J(l,y.total_in>>8&255),J(l,y.total_in>>16&255),J(l,y.total_in>>24&255)):(Q(l,y.adler>>>16),Q(l,65535&y.adler)),z(y),0<l.wrap&&(l.wrap=-l.wrap),l.pending!==0?p:1)},i.deflateEnd=function(y){var X;return y&&y.state?(X=y.state.status)!==P&&X!==69&&X!==73&&X!==91&&X!==103&&X!==G&&X!==666?se(y,d):(y.state=null,X===G?se(y,-3):p):d},i.deflateSetDictionary=function(y,X){var R,l,c,x,B,V,W,le,ce=X.length;if(!y||!y.state||(x=(R=y.state).wrap)===2||x===1&&R.status!==P||R.lookahead)return d;for(x===1&&(y.adler=u(y.adler,X,ce,0)),R.wrap=0,ce>=R.w_size&&(x===0&&(re(R.head),R.strstart=0,R.block_start=0,R.insert=0),le=new a.Buf8(R.w_size),a.arraySet(le,X,ce-R.w_size,R.w_size,0),X=le,ce=R.w_size),B=y.avail_in,V=y.next_in,W=y.input,y.avail_in=ce,y.next_in=0,y.input=X,pe(R);R.lookahead>=k;){for(l=R.strstart,c=R.lookahead-(k-1);R.ins_h=(R.ins_h<<R.hash_shift^R.window[l+k-1])&R.hash_mask,R.prev[l&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=l,l++,--c;);R.strstart=l,R.lookahead=k-1,pe(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=k-1,R.match_available=0,y.next_in=V,y.input=W,y.avail_in=B,R.wrap=x,p},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,i){"use strict";n.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}},{}],48:[function(r,n,i){"use strict";n.exports=function(o,a){var s=o.state,u=o.next_in,h,m,f,w,p,d,v,_,S,E,N,C,T,g,O,M,k,q,te,P,G,I=o.input,$;h=u+(o.avail_in-5),m=o.next_out,$=o.output,f=m-(a-o.avail_out),w=m+(o.avail_out-257),p=s.dmax,d=s.wsize,v=s.whave,_=s.wnext,S=s.window,E=s.hold,N=s.bits,C=s.lencode,T=s.distcode,g=(1<<s.lenbits)-1,O=(1<<s.distbits)-1;e:do{N<15&&(E+=I[u++]<<N,N+=8,E+=I[u++]<<N,N+=8),M=C[E&g];t:for(;;){if(E>>>=k=M>>>24,N-=k,(k=M>>>16&255)===0)$[m++]=65535&M;else{if(!(16&k)){if((64&k)==0){M=C[(65535&M)+(E&(1<<k)-1)];continue t}if(32&k){s.mode=12;break e}o.msg="invalid literal/length code",s.mode=30;break e}q=65535&M,(k&=15)&&(N<k&&(E+=I[u++]<<N,N+=8),q+=E&(1<<k)-1,E>>>=k,N-=k),N<15&&(E+=I[u++]<<N,N+=8,E+=I[u++]<<N,N+=8),M=T[E&O];r:for(;;){if(E>>>=k=M>>>24,N-=k,!(16&(k=M>>>16&255))){if((64&k)==0){M=T[(65535&M)+(E&(1<<k)-1)];continue r}o.msg="invalid distance code",s.mode=30;break e}if(te=65535&M,N<(k&=15)&&(E+=I[u++]<<N,(N+=8)<k&&(E+=I[u++]<<N,N+=8)),p<(te+=E&(1<<k)-1)){o.msg="invalid distance too far back",s.mode=30;break e}if(E>>>=k,N-=k,(k=m-f)<te){if(v<(k=te-k)&&s.sane){o.msg="invalid distance too far back",s.mode=30;break e}if(G=S,(P=0)===_){if(P+=d-k,k<q){for(q-=k;$[m++]=S[P++],--k;);P=m-te,G=$}}else if(_<k){if(P+=d+_-k,(k-=_)<q){for(q-=k;$[m++]=S[P++],--k;);if(P=0,_<q){for(q-=k=_;$[m++]=S[P++],--k;);P=m-te,G=$}}}else if(P+=_-k,k<q){for(q-=k;$[m++]=S[P++],--k;);P=m-te,G=$}for(;2<q;)$[m++]=G[P++],$[m++]=G[P++],$[m++]=G[P++],q-=3;q&&($[m++]=G[P++],1<q&&($[m++]=G[P++]))}else{for(P=m-te;$[m++]=$[P++],$[m++]=$[P++],$[m++]=$[P++],2<(q-=3););q&&($[m++]=$[P++],1<q&&($[m++]=$[P++]))}break}}break}}while(u<h&&m<w);u-=q=N>>3,E&=(1<<(N-=q<<3))-1,o.next_in=u,o.next_out=m,o.avail_in=u<h?h-u+5:5-(u-h),o.avail_out=m<w?w-m+257:257-(m-w),s.hold=E,s.bits=N}},{}],49:[function(r,n,i){"use strict";var o=r("../utils/common"),a=r("./adler32"),s=r("./crc32"),u=r("./inffast"),h=r("./inftrees"),m=1,f=2,w=0,p=-2,d=1,v=852,_=592;function S(P){return(P>>>24&255)+(P>>>8&65280)+((65280&P)<<8)+((255&P)<<24)}function E(){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 o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function N(P){var G;return P&&P.state?(G=P.state,P.total_in=P.total_out=G.total=0,P.msg="",G.wrap&&(P.adler=1&G.wrap),G.mode=d,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new o.Buf32(v),G.distcode=G.distdyn=new o.Buf32(_),G.sane=1,G.back=-1,w):p}function C(P){var G;return P&&P.state?((G=P.state).wsize=0,G.whave=0,G.wnext=0,N(P)):p}function T(P,G){var I,$;return P&&P.state?($=P.state,G<0?(I=0,G=-G):(I=1+(G>>4),G<48&&(G&=15)),G&&(G<8||15<G)?p:($.window!==null&&$.wbits!==G&&($.window=null),$.wrap=I,$.wbits=G,C(P))):p}function g(P,G){var I,$;return P?($=new E,(P.state=$).window=null,(I=T(P,G))!==w&&(P.state=null),I):p}var O,M,k=!0;function q(P){if(k){var G;for(O=new o.Buf32(512),M=new o.Buf32(32),G=0;G<144;)P.lens[G++]=8;for(;G<256;)P.lens[G++]=9;for(;G<280;)P.lens[G++]=7;for(;G<288;)P.lens[G++]=8;for(h(m,P.lens,0,288,O,0,P.work,{bits:9}),G=0;G<32;)P.lens[G++]=5;h(f,P.lens,0,32,M,0,P.work,{bits:5}),k=!1}P.lencode=O,P.lenbits=9,P.distcode=M,P.distbits=5}function te(P,G,I,$){var K,j=P.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new o.Buf8(j.wsize)),$>=j.wsize?(o.arraySet(j.window,G,I-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):($<(K=j.wsize-j.wnext)&&(K=$),o.arraySet(j.window,G,I-$,K,j.wnext),($-=K)?(o.arraySet(j.window,G,I-$,$,0),j.wnext=$,j.whave=j.wsize):(j.wnext+=K,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=K))),0}i.inflateReset=C,i.inflateReset2=T,i.inflateResetKeep=N,i.inflateInit=function(P){return g(P,15)},i.inflateInit2=g,i.inflate=function(P,G){var I,$,K,j,se,Z,re,z,D,J,Q,ne,pe,A,b,H,U,oe,L,F,y,X,R,l,c=0,x=new o.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!P||!P.state||!P.output||!P.input&&P.avail_in!==0)return p;(I=P.state).mode===12&&(I.mode=13),se=P.next_out,K=P.output,re=P.avail_out,j=P.next_in,$=P.input,Z=P.avail_in,z=I.hold,D=I.bits,J=Z,Q=re,X=w;e:for(;;)switch(I.mode){case d:if(I.wrap===0){I.mode=13;break}for(;D<16;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(2&I.wrap&&z===35615){x[I.check=0]=255&z,x[1]=z>>>8&255,I.check=s(I.check,x,2,0),D=z=0,I.mode=2;break}if(I.flags=0,I.head&&(I.head.done=!1),!(1&I.wrap)||(((255&z)<<8)+(z>>8))%31){P.msg="incorrect header check",I.mode=30;break}if((15&z)!=8){P.msg="unknown compression method",I.mode=30;break}if(D-=4,y=8+(15&(z>>>=4)),I.wbits===0)I.wbits=y;else if(y>I.wbits){P.msg="invalid window size",I.mode=30;break}I.dmax=1<<y,P.adler=I.check=1,I.mode=512&z?10:12,D=z=0;break;case 2:for(;D<16;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(I.flags=z,(255&I.flags)!=8){P.msg="unknown compression method",I.mode=30;break}if(57344&I.flags){P.msg="unknown header flags set",I.mode=30;break}I.head&&(I.head.text=z>>8&1),512&I.flags&&(x[0]=255&z,x[1]=z>>>8&255,I.check=s(I.check,x,2,0)),D=z=0,I.mode=3;case 3:for(;D<32;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.head&&(I.head.time=z),512&I.flags&&(x[0]=255&z,x[1]=z>>>8&255,x[2]=z>>>16&255,x[3]=z>>>24&255,I.check=s(I.check,x,4,0)),D=z=0,I.mode=4;case 4:for(;D<16;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.head&&(I.head.xflags=255&z,I.head.os=z>>8),512&I.flags&&(x[0]=255&z,x[1]=z>>>8&255,I.check=s(I.check,x,2,0)),D=z=0,I.mode=5;case 5:if(1024&I.flags){for(;D<16;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.length=z,I.head&&(I.head.extra_len=z),512&I.flags&&(x[0]=255&z,x[1]=z>>>8&255,I.check=s(I.check,x,2,0)),D=z=0}else I.head&&(I.head.extra=null);I.mode=6;case 6:if(1024&I.flags&&(Z<(ne=I.length)&&(ne=Z),ne&&(I.head&&(y=I.head.extra_len-I.length,I.head.extra||(I.head.extra=new Array(I.head.extra_len)),o.arraySet(I.head.extra,$,j,ne,y)),512&I.flags&&(I.check=s(I.check,$,ne,j)),Z-=ne,j+=ne,I.length-=ne),I.length))break e;I.length=0,I.mode=7;case 7:if(2048&I.flags){if(Z===0)break e;for(ne=0;y=$[j+ne++],I.head&&y&&I.length<65536&&(I.head.name+=String.fromCharCode(y)),y&&ne<Z;);if(512&I.flags&&(I.check=s(I.check,$,ne,j)),Z-=ne,j+=ne,y)break e}else I.head&&(I.head.name=null);I.length=0,I.mode=8;case 8:if(4096&I.flags){if(Z===0)break e;for(ne=0;y=$[j+ne++],I.head&&y&&I.length<65536&&(I.head.comment+=String.fromCharCode(y)),y&&ne<Z;);if(512&I.flags&&(I.check=s(I.check,$,ne,j)),Z-=ne,j+=ne,y)break e}else I.head&&(I.head.comment=null);I.mode=9;case 9:if(512&I.flags){for(;D<16;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(z!==(65535&I.check)){P.msg="header crc mismatch",I.mode=30;break}D=z=0}I.head&&(I.head.hcrc=I.flags>>9&1,I.head.done=!0),P.adler=I.check=0,I.mode=12;break;case 10:for(;D<32;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}P.adler=I.check=S(z),D=z=0,I.mode=11;case 11:if(I.havedict===0)return P.next_out=se,P.avail_out=re,P.next_in=j,P.avail_in=Z,I.hold=z,I.bits=D,2;P.adler=I.check=1,I.mode=12;case 12:if(G===5||G===6)break e;case 13:if(I.last){z>>>=7&D,D-=7&D,I.mode=27;break}for(;D<3;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}switch(I.last=1&z,D-=1,3&(z>>>=1)){case 0:I.mode=14;break;case 1:if(q(I),I.mode=20,G!==6)break;z>>>=2,D-=2;break e;case 2:I.mode=17;break;case 3:P.msg="invalid block type",I.mode=30}z>>>=2,D-=2;break;case 14:for(z>>>=7&D,D-=7&D;D<32;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if((65535&z)!=(z>>>16^65535)){P.msg="invalid stored block lengths",I.mode=30;break}if(I.length=65535&z,D=z=0,I.mode=15,G===6)break e;case 15:I.mode=16;case 16:if(ne=I.length){if(Z<ne&&(ne=Z),re<ne&&(ne=re),ne===0)break e;o.arraySet(K,$,j,ne,se),Z-=ne,j+=ne,re-=ne,se+=ne,I.length-=ne;break}I.mode=12;break;case 17:for(;D<14;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(I.nlen=257+(31&z),z>>>=5,D-=5,I.ndist=1+(31&z),z>>>=5,D-=5,I.ncode=4+(15&z),z>>>=4,D-=4,286<I.nlen||30<I.ndist){P.msg="too many length or distance symbols",I.mode=30;break}I.have=0,I.mode=18;case 18:for(;I.have<I.ncode;){for(;D<3;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.lens[B[I.have++]]=7&z,z>>>=3,D-=3}for(;I.have<19;)I.lens[B[I.have++]]=0;if(I.lencode=I.lendyn,I.lenbits=7,R={bits:I.lenbits},X=h(0,I.lens,0,19,I.lencode,0,I.work,R),I.lenbits=R.bits,X){P.msg="invalid code lengths set",I.mode=30;break}I.have=0,I.mode=19;case 19:for(;I.have<I.nlen+I.ndist;){for(;H=(c=I.lencode[z&(1<<I.lenbits)-1])>>>16&255,U=65535&c,!((b=c>>>24)<=D);){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(U<16)z>>>=b,D-=b,I.lens[I.have++]=U;else{if(U===16){for(l=b+2;D<l;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(z>>>=b,D-=b,I.have===0){P.msg="invalid bit length repeat",I.mode=30;break}y=I.lens[I.have-1],ne=3+(3&z),z>>>=2,D-=2}else if(U===17){for(l=b+3;D<l;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}D-=b,y=0,ne=3+(7&(z>>>=b)),z>>>=3,D-=3}else{for(l=b+7;D<l;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}D-=b,y=0,ne=11+(127&(z>>>=b)),z>>>=7,D-=7}if(I.have+ne>I.nlen+I.ndist){P.msg="invalid bit length repeat",I.mode=30;break}for(;ne--;)I.lens[I.have++]=y}}if(I.mode===30)break;if(I.lens[256]===0){P.msg="invalid code -- missing end-of-block",I.mode=30;break}if(I.lenbits=9,R={bits:I.lenbits},X=h(m,I.lens,0,I.nlen,I.lencode,0,I.work,R),I.lenbits=R.bits,X){P.msg="invalid literal/lengths set",I.mode=30;break}if(I.distbits=6,I.distcode=I.distdyn,R={bits:I.distbits},X=h(f,I.lens,I.nlen,I.ndist,I.distcode,0,I.work,R),I.distbits=R.bits,X){P.msg="invalid distances set",I.mode=30;break}if(I.mode=20,G===6)break e;case 20:I.mode=21;case 21:if(6<=Z&&258<=re){P.next_out=se,P.avail_out=re,P.next_in=j,P.avail_in=Z,I.hold=z,I.bits=D,u(P,Q),se=P.next_out,K=P.output,re=P.avail_out,j=P.next_in,$=P.input,Z=P.avail_in,z=I.hold,D=I.bits,I.mode===12&&(I.back=-1);break}for(I.back=0;H=(c=I.lencode[z&(1<<I.lenbits)-1])>>>16&255,U=65535&c,!((b=c>>>24)<=D);){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(H&&(240&H)==0){for(oe=b,L=H,F=U;H=(c=I.lencode[F+((z&(1<<oe+L)-1)>>oe)])>>>16&255,U=65535&c,!(oe+(b=c>>>24)<=D);){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}z>>>=oe,D-=oe,I.back+=oe}if(z>>>=b,D-=b,I.back+=b,I.length=U,H===0){I.mode=26;break}if(32&H){I.back=-1,I.mode=12;break}if(64&H){P.msg="invalid literal/length code",I.mode=30;break}I.extra=15&H,I.mode=22;case 22:if(I.extra){for(l=I.extra;D<l;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.length+=z&(1<<I.extra)-1,z>>>=I.extra,D-=I.extra,I.back+=I.extra}I.was=I.length,I.mode=23;case 23:for(;H=(c=I.distcode[z&(1<<I.distbits)-1])>>>16&255,U=65535&c,!((b=c>>>24)<=D);){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if((240&H)==0){for(oe=b,L=H,F=U;H=(c=I.distcode[F+((z&(1<<oe+L)-1)>>oe)])>>>16&255,U=65535&c,!(oe+(b=c>>>24)<=D);){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}z>>>=oe,D-=oe,I.back+=oe}if(z>>>=b,D-=b,I.back+=b,64&H){P.msg="invalid distance code",I.mode=30;break}I.offset=U,I.extra=15&H,I.mode=24;case 24:if(I.extra){for(l=I.extra;D<l;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}I.offset+=z&(1<<I.extra)-1,z>>>=I.extra,D-=I.extra,I.back+=I.extra}if(I.offset>I.dmax){P.msg="invalid distance too far back",I.mode=30;break}I.mode=25;case 25:if(re===0)break e;if(ne=Q-re,I.offset>ne){if((ne=I.offset-ne)>I.whave&&I.sane){P.msg="invalid distance too far back",I.mode=30;break}pe=ne>I.wnext?(ne-=I.wnext,I.wsize-ne):I.wnext-ne,ne>I.length&&(ne=I.length),A=I.window}else A=K,pe=se-I.offset,ne=I.length;for(re<ne&&(ne=re),re-=ne,I.length-=ne;K[se++]=A[pe++],--ne;);I.length===0&&(I.mode=21);break;case 26:if(re===0)break e;K[se++]=I.length,re--,I.mode=21;break;case 27:if(I.wrap){for(;D<32;){if(Z===0)break e;Z--,z|=$[j++]<<D,D+=8}if(Q-=re,P.total_out+=Q,I.total+=Q,Q&&(P.adler=I.check=I.flags?s(I.check,K,Q,se-Q):a(I.check,K,Q,se-Q)),Q=re,(I.flags?z:S(z))!==I.check){P.msg="incorrect data check",I.mode=30;break}D=z=0}I.mode=28;case 28:if(I.wrap&&I.flags){for(;D<32;){if(Z===0)break e;Z--,z+=$[j++]<<D,D+=8}if(z!==(4294967295&I.total)){P.msg="incorrect length check",I.mode=30;break}D=z=0}I.mode=29;case 29:X=1;break e;case 30:X=-3;break e;case 31:return-4;default:return p}return P.next_out=se,P.avail_out=re,P.next_in=j,P.avail_in=Z,I.hold=z,I.bits=D,(I.wsize||Q!==P.avail_out&&I.mode<30&&(I.mode<27||G!==4))&&te(P,P.output,P.next_out,Q-P.avail_out)?(I.mode=31,-4):(J-=P.avail_in,Q-=P.avail_out,P.total_in+=J,P.total_out+=Q,I.total+=Q,I.wrap&&Q&&(P.adler=I.check=I.flags?s(I.check,K,Q,P.next_out-Q):a(I.check,K,Q,P.next_out-Q)),P.data_type=I.bits+(I.last?64:0)+(I.mode===12?128:0)+(I.mode===20||I.mode===15?256:0),(J==0&&Q===0||G===4)&&X===w&&(X=-5),X)},i.inflateEnd=function(P){if(!P||!P.state)return p;var G=P.state;return G.window&&(G.window=null),P.state=null,w},i.inflateGetHeader=function(P,G){var I;return P&&P.state?(2&(I=P.state).wrap)==0?p:((I.head=G).done=!1,w):p},i.inflateSetDictionary=function(P,G){var I,$=G.length;return P&&P.state?(I=P.state).wrap!==0&&I.mode!==11?p:I.mode===11&&a(1,G,$,0)!==I.check?-3:te(P,G,$,$)?(I.mode=31,-4):(I.havedict=1,w):p},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,i){"use strict";var o=r("../utils/common"),a=[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],s=[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],u=[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],h=[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];n.exports=function(m,f,w,p,d,v,_,S){var E,N,C,T,g,O,M,k,q,te=S.bits,P=0,G=0,I=0,$=0,K=0,j=0,se=0,Z=0,re=0,z=0,D=null,J=0,Q=new o.Buf16(16),ne=new o.Buf16(16),pe=null,A=0;for(P=0;P<=15;P++)Q[P]=0;for(G=0;G<p;G++)Q[f[w+G]]++;for(K=te,$=15;1<=$&&Q[$]===0;$--);if($<K&&(K=$),$===0)return d[v++]=20971520,d[v++]=20971520,S.bits=1,0;for(I=1;I<$&&Q[I]===0;I++);for(K<I&&(K=I),P=Z=1;P<=15;P++)if(Z<<=1,(Z-=Q[P])<0)return-1;if(0<Z&&(m===0||$!==1))return-1;for(ne[1]=0,P=1;P<15;P++)ne[P+1]=ne[P]+Q[P];for(G=0;G<p;G++)f[w+G]!==0&&(_[ne[f[w+G]]++]=G);if(O=m===0?(D=pe=_,19):m===1?(D=a,J-=257,pe=s,A-=257,256):(D=u,pe=h,-1),P=I,g=v,se=G=z=0,C=-1,T=(re=1<<(j=K))-1,m===1&&852<re||m===2&&592<re)return 1;for(;;){for(M=P-se,q=_[G]<O?(k=0,_[G]):_[G]>O?(k=pe[A+_[G]],D[J+_[G]]):(k=96,0),E=1<<P-se,I=N=1<<j;d[g+(z>>se)+(N-=E)]=M<<24|k<<16|q|0,N!==0;);for(E=1<<P-1;z&E;)E>>=1;if(E!==0?(z&=E-1,z+=E):z=0,G++,--Q[P]==0){if(P===$)break;P=f[w+_[G]]}if(K<P&&(z&T)!==C){for(se===0&&(se=K),g+=I,Z=1<<(j=P-se);j+se<$&&!((Z-=Q[j+se])<=0);)j++,Z<<=1;if(re+=1<<j,m===1&&852<re||m===2&&592<re)return 1;d[C=z&T]=K<<24|j<<16|g-v|0}}return z!==0&&(d[g+z]=P-se<<24|4194304),S.bits=K,0}},{"../utils/common":41}],51:[function(r,n,i){"use strict";n.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"}},{}],52:[function(r,n,i){"use strict";var o=r("../utils/common"),a=0,s=1;function u(c){for(var x=c.length;0<=--x;)c[x]=0}var h=0,m=29,f=256,w=f+1+m,p=30,d=19,v=2*w+1,_=15,S=16,E=7,N=256,C=16,T=17,g=18,O=[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],M=[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],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],te=new Array(2*(w+2));u(te);var P=new Array(2*p);u(P);var G=new Array(512);u(G);var I=new Array(256);u(I);var $=new Array(m);u($);var K,j,se,Z=new Array(p);function re(c,x,B,V,W){this.static_tree=c,this.extra_bits=x,this.extra_base=B,this.elems=V,this.max_length=W,this.has_stree=c&&c.length}function z(c,x){this.dyn_tree=c,this.max_code=0,this.stat_desc=x}function D(c){return c<256?G[c]:G[256+(c>>>7)]}function J(c,x){c.pending_buf[c.pending++]=255&x,c.pending_buf[c.pending++]=x>>>8&255}function Q(c,x,B){c.bi_valid>S-B?(c.bi_buf|=x<<c.bi_valid&65535,J(c,c.bi_buf),c.bi_buf=x>>S-c.bi_valid,c.bi_valid+=B-S):(c.bi_buf|=x<<c.bi_valid&65535,c.bi_valid+=B)}function ne(c,x,B){Q(c,B[2*x],B[2*x+1])}function pe(c,x){for(var B=0;B|=1&c,c>>>=1,B<<=1,0<--x;);return B>>>1}function A(c,x,B){var V,W,le=new Array(_+1),ce=0;for(V=1;V<=_;V++)le[V]=ce=ce+B[V-1]<<1;for(W=0;W<=x;W++){var ue=c[2*W+1];ue!==0&&(c[2*W]=pe(le[ue]++,ue))}}function b(c){for(var x=0;x<w;x++)c.dyn_ltree[2*x]=0;for(x=0;x<p;x++)c.dyn_dtree[2*x]=0;for(x=0;x<d;x++)c.bl_tree[2*x]=0;c.dyn_ltree[2*N]=1,c.opt_len=c.static_len=0,c.last_lit=c.matches=0}function H(c){8<c.bi_valid?J(c,c.bi_buf):0<c.bi_valid&&(c.pending_buf[c.pending++]=c.bi_buf),c.bi_buf=0,c.bi_valid=0}function U(c,x,B,V){var W=2*x,le=2*B;return c[W]<c[le]||c[W]===c[le]&&V[x]<=V[B]}function oe(c,x,B){for(var V=c.heap[B],W=B<<1;W<=c.heap_len&&(W<c.heap_len&&U(x,c.heap[W+1],c.heap[W],c.depth)&&W++,!U(x,V,c.heap[W],c.depth));)c.heap[B]=c.heap[W],B=W,W<<=1;c.heap[B]=V}function L(c,x,B){var V,W,le,ce,ue=0;if(c.last_lit!==0)for(;V=c.pending_buf[c.d_buf+2*ue]<<8|c.pending_buf[c.d_buf+2*ue+1],W=c.pending_buf[c.l_buf+ue],ue++,V===0?ne(c,W,x):(ne(c,(le=I[W])+f+1,x),(ce=O[le])!==0&&Q(c,W-=$[le],ce),ne(c,le=D(--V),B),(ce=M[le])!==0&&Q(c,V-=Z[le],ce)),ue<c.last_lit;);ne(c,N,x)}function F(c,x){var B,V,W,le=x.dyn_tree,ce=x.stat_desc.static_tree,ue=x.stat_desc.has_stree,fe=x.stat_desc.elems,ve=-1;for(c.heap_len=0,c.heap_max=v,B=0;B<fe;B++)le[2*B]!==0?(c.heap[++c.heap_len]=ve=B,c.depth[B]=0):le[2*B+1]=0;for(;c.heap_len<2;)le[2*(W=c.heap[++c.heap_len]=ve<2?++ve:0)]=1,c.depth[W]=0,c.opt_len--,ue&&(c.static_len-=ce[2*W+1]);for(x.max_code=ve,B=c.heap_len>>1;1<=B;B--)oe(c,le,B);for(W=fe;B=c.heap[1],c.heap[1]=c.heap[c.heap_len--],oe(c,le,1),V=c.heap[1],c.heap[--c.heap_max]=B,c.heap[--c.heap_max]=V,le[2*W]=le[2*B]+le[2*V],c.depth[W]=(c.depth[B]>=c.depth[V]?c.depth[B]:c.depth[V])+1,le[2*B+1]=le[2*V+1]=W,c.heap[1]=W++,oe(c,le,1),2<=c.heap_len;);c.heap[--c.heap_max]=c.heap[1],(function(we,Ae){var lt,$e,Ht,Ee,fr,qr,et=Ae.dyn_tree,gi=Ae.max_code,$o=Ae.stat_desc.static_tree,zo=Ae.stat_desc.has_stree,Ko=Ae.stat_desc.extra_bits,yi=Ae.stat_desc.extra_base,Wt=Ae.stat_desc.max_length,pr=0;for(Ee=0;Ee<=_;Ee++)we.bl_count[Ee]=0;for(et[2*we.heap[we.heap_max]+1]=0,lt=we.heap_max+1;lt<v;lt++)Wt<(Ee=et[2*et[2*($e=we.heap[lt])+1]+1]+1)&&(Ee=Wt,pr++),et[2*$e+1]=Ee,gi<$e||(we.bl_count[Ee]++,fr=0,yi<=$e&&(fr=Ko[$e-yi]),qr=et[2*$e],we.opt_len+=qr*(Ee+fr),zo&&(we.static_len+=qr*($o[2*$e+1]+fr)));if(pr!==0){do{for(Ee=Wt-1;we.bl_count[Ee]===0;)Ee--;we.bl_count[Ee]--,we.bl_count[Ee+1]+=2,we.bl_count[Wt]--,pr-=2}while(0<pr);for(Ee=Wt;Ee!==0;Ee--)for($e=we.bl_count[Ee];$e!==0;)gi<(Ht=we.heap[--lt])||(et[2*Ht+1]!==Ee&&(we.opt_len+=(Ee-et[2*Ht+1])*et[2*Ht],et[2*Ht+1]=Ee),$e--)}})(c,x),A(le,ve,c.bl_count)}function y(c,x,B){var V,W,le=-1,ce=x[1],ue=0,fe=7,ve=4;for(ce===0&&(fe=138,ve=3),x[2*(B+1)+1]=65535,V=0;V<=B;V++)W=ce,ce=x[2*(V+1)+1],++ue<fe&&W===ce||(ue<ve?c.bl_tree[2*W]+=ue:W!==0?(W!==le&&c.bl_tree[2*W]++,c.bl_tree[2*C]++):ue<=10?c.bl_tree[2*T]++:c.bl_tree[2*g]++,le=W,ve=(ue=0)===ce?(fe=138,3):W===ce?(fe=6,3):(fe=7,4))}function X(c,x,B){var V,W,le=-1,ce=x[1],ue=0,fe=7,ve=4;for(ce===0&&(fe=138,ve=3),V=0;V<=B;V++)if(W=ce,ce=x[2*(V+1)+1],!(++ue<fe&&W===ce)){if(ue<ve)for(;ne(c,W,c.bl_tree),--ue!=0;);else W!==0?(W!==le&&(ne(c,W,c.bl_tree),ue--),ne(c,C,c.bl_tree),Q(c,ue-3,2)):ue<=10?(ne(c,T,c.bl_tree),Q(c,ue-3,3)):(ne(c,g,c.bl_tree),Q(c,ue-11,7));le=W,ve=(ue=0)===ce?(fe=138,3):W===ce?(fe=6,3):(fe=7,4)}}u(Z);var R=!1;function l(c,x,B,V){Q(c,(h<<1)+(V?1:0),3),(function(W,le,ce,ue){H(W),ue&&(J(W,ce),J(W,~ce)),o.arraySet(W.pending_buf,W.window,le,ce,W.pending),W.pending+=ce})(c,x,B,!0)}i._tr_init=function(c){R||((function(){var x,B,V,W,le,ce=new Array(_+1);for(W=V=0;W<m-1;W++)for($[W]=V,x=0;x<1<<O[W];x++)I[V++]=W;for(I[V-1]=W,W=le=0;W<16;W++)for(Z[W]=le,x=0;x<1<<M[W];x++)G[le++]=W;for(le>>=7;W<p;W++)for(Z[W]=le<<7,x=0;x<1<<M[W]-7;x++)G[256+le++]=W;for(B=0;B<=_;B++)ce[B]=0;for(x=0;x<=143;)te[2*x+1]=8,x++,ce[8]++;for(;x<=255;)te[2*x+1]=9,x++,ce[9]++;for(;x<=279;)te[2*x+1]=7,x++,ce[7]++;for(;x<=287;)te[2*x+1]=8,x++,ce[8]++;for(A(te,w+1,ce),x=0;x<p;x++)P[2*x+1]=5,P[2*x]=pe(x,5);K=new re(te,O,f+1,w,_),j=new re(P,M,0,p,_),se=new re(new Array(0),k,0,d,E)})(),R=!0),c.l_desc=new z(c.dyn_ltree,K),c.d_desc=new z(c.dyn_dtree,j),c.bl_desc=new z(c.bl_tree,se),c.bi_buf=0,c.bi_valid=0,b(c)},i._tr_stored_block=l,i._tr_flush_block=function(c,x,B,V){var W,le,ce=0;0<c.level?(c.strm.data_type===2&&(c.strm.data_type=(function(ue){var fe,ve=4093624447;for(fe=0;fe<=31;fe++,ve>>>=1)if(1&ve&&ue.dyn_ltree[2*fe]!==0)return a;if(ue.dyn_ltree[18]!==0||ue.dyn_ltree[20]!==0||ue.dyn_ltree[26]!==0)return s;for(fe=32;fe<f;fe++)if(ue.dyn_ltree[2*fe]!==0)return s;return a})(c)),F(c,c.l_desc),F(c,c.d_desc),ce=(function(ue){var fe;for(y(ue,ue.dyn_ltree,ue.l_desc.max_code),y(ue,ue.dyn_dtree,ue.d_desc.max_code),F(ue,ue.bl_desc),fe=d-1;3<=fe&&ue.bl_tree[2*q[fe]+1]===0;fe--);return ue.opt_len+=3*(fe+1)+5+5+4,fe})(c),W=c.opt_len+3+7>>>3,(le=c.static_len+3+7>>>3)<=W&&(W=le)):W=le=B+5,B+4<=W&&x!==-1?l(c,x,B,V):c.strategy===4||le===W?(Q(c,2+(V?1:0),3),L(c,te,P)):(Q(c,4+(V?1:0),3),(function(ue,fe,ve,we){var Ae;for(Q(ue,fe-257,5),Q(ue,ve-1,5),Q(ue,we-4,4),Ae=0;Ae<we;Ae++)Q(ue,ue.bl_tree[2*q[Ae]+1],3);X(ue,ue.dyn_ltree,fe-1),X(ue,ue.dyn_dtree,ve-1)})(c,c.l_desc.max_code+1,c.d_desc.max_code+1,ce+1),L(c,c.dyn_ltree,c.dyn_dtree)),b(c),V&&H(c)},i._tr_tally=function(c,x,B){return c.pending_buf[c.d_buf+2*c.last_lit]=x>>>8&255,c.pending_buf[c.d_buf+2*c.last_lit+1]=255&x,c.pending_buf[c.l_buf+c.last_lit]=255&B,c.last_lit++,x===0?c.dyn_ltree[2*B]++:(c.matches++,x--,c.dyn_ltree[2*(I[B]+f+1)]++,c.dyn_dtree[2*D(x)]++),c.last_lit===c.lit_bufsize-1},i._tr_align=function(c){Q(c,2,3),ne(c,N,te),(function(x){x.bi_valid===16?(J(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):8<=x.bi_valid&&(x.pending_buf[x.pending++]=255&x.bi_buf,x.bi_buf>>=8,x.bi_valid-=8)})(c)}},{"../utils/common":41}],53:[function(r,n,i){"use strict";n.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}},{}],54:[function(r,n,i){(function(o){(function(a,s){"use strict";if(!a.setImmediate){var u,h,m,f,w=1,p={},d=!1,v=a.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(a);_=_&&_.setTimeout?_:a,u={}.toString.call(a.process)==="[object process]"?function(C){ge.nextTick(function(){E(C)})}:(function(){if(a.postMessage&&!a.importScripts){var C=!0,T=a.onmessage;return a.onmessage=function(){C=!1},a.postMessage("","*"),a.onmessage=T,C}})()?(f="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",N,!1):a.attachEvent("onmessage",N),function(C){a.postMessage(f+C,"*")}):a.MessageChannel?((m=new MessageChannel).port1.onmessage=function(C){E(C.data)},function(C){m.port2.postMessage(C)}):v&&"onreadystatechange"in v.createElement("script")?(h=v.documentElement,function(C){var T=v.createElement("script");T.onreadystatechange=function(){E(C),T.onreadystatechange=null,h.removeChild(T),T=null},h.appendChild(T)}):function(C){setTimeout(E,0,C)},_.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var T=new Array(arguments.length-1),g=0;g<T.length;g++)T[g]=arguments[g+1];return p[w]={callback:C,args:T},u(w),w++},_.clearImmediate=S}function S(C){delete p[C]}function E(C){if(d)setTimeout(E,0,C);else{var T=p[C];if(T){d=!0;try{(function(g){var O=g.callback,M=g.args;switch(M.length){case 0:O();break;case 1:O(M[0]);break;case 2:O(M[0],M[1]);break;case 3:O(M[0],M[1],M[2]);break;default:O.apply(s,M)}})(T)}finally{S(C),d=!1}}}}function N(C){C.source===a&&typeof C.data=="string"&&C.data.indexOf(f)===0&&E(+C.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Oe<"u"?Oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})),Om=de(((e,t)=>{var r={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};function n(i){return i&&i.replace?i.replace(/([&"<>'])/g,function(o,a){return r[a]}):i}t.exports=n})),Pm=de(((e,t)=>{ft();var r=Om(),n=Gn().Stream,i=" ";function o(f,w){typeof w!="object"&&(w={indent:w});var p=w.stream?new n:null,d="",v=!1,_=w.indent?w.indent===!0?i:w.indent:"",S=!0;function E(O){S?ge.nextTick(O):O()}function N(O,M){if(M!==void 0&&(d+=M),O&&!v&&(p=p||new n,v=!0),O&&v){var k=d;E(function(){p.emit("data",k)}),d=""}}function C(O,M){h(N,u(O,_,_?1:0),M)}function T(){if(p){var O=d;E(function(){p.emit("data",O),p.emit("end"),p.readable=!1,p.emit("close")})}}function g(O){var M={version:"1.0",encoding:O.encoding||"UTF-8"};O.standalone&&(M.standalone=O.standalone),C({"?xml":{_attr:M}}),d=d.replace("/>","?>")}return E(function(){S=!1}),w.declaration&&g(w.declaration),f&&f.forEach?f.forEach(function(O,M){var k;M+1===f.length&&(k=T),C(O,k)}):C(f,T),p?(p.readable=!0,p):d}function a(){var f={_elem:u(Array.prototype.slice.call(arguments))};return f.push=function(w){if(!this.append)throw new Error("not assigned to a parent!");var p=this,d=this._elem.indent;h(this.append,u(w,d,this._elem.icount+(d?1:0)),function(){p.append(!0)})},f.close=function(w){w!==void 0&&this.push(w),this.end&&this.end()},f}function s(f,w){return new Array(w||0).join(f||"")}function u(f,w,p){p=p||0;var d=s(w,p),v,_=f,S=!1;if(typeof f=="object"&&(v=Object.keys(f)[0],_=f[v],_&&_._elem))return _._elem.name=v,_._elem.icount=p,_._elem.indent=w,_._elem.indents=d,_._elem.interrupt=_,_._elem;var E=[],N=[],C;function T(g){Object.keys(g).forEach(function(O){E.push(m(O,g[O]))})}switch(typeof _){case"object":if(_===null)break;_._attr&&T(_._attr),_._cdata&&N.push(("<![CDATA["+_._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),_.forEach&&(C=!1,N.push(""),_.forEach(function(g){typeof g=="object"?Object.keys(g)[0]=="_attr"?T(g._attr):N.push(u(g,w,p+1)):(N.pop(),C=!0,N.push(r(g)))}),C||N.push(""));break;default:N.push(r(_))}return{name:v,interrupt:S,attributes:E,content:N,icount:p,indents:d,indent:w}}function h(f,w,p){if(typeof w!="object")return f(!1,w);var d=w.interrupt?1:w.content.length;function v(){for(;w.content.length;){var S=w.content.shift();if(S!==void 0){if(_(S))return;h(f,S)}}f(!1,(d>1?w.indents:"")+(w.name?"</"+w.name+">":"")+(w.indent&&!p?`
27
+ `:"")),p&&p()}function _(S){return S.interrupt?(S.interrupt.append=f,S.interrupt.end=v,S.interrupt=!1,f(!0),!0):!1}if(f(!1,w.indents+(w.name?"<"+w.name:"")+(w.attributes.length?" "+w.attributes.join(" "):"")+(d?w.name?">":"":w.name?"/>":"")+(w.indent&&d>1?`
28
+ `:"")),!d)return f(!1,w.indent?`
29
+ `:"");_(w)||v()}function m(f,w){return f+'="'+r(w)+'"'}t.exports=o,t.exports.element=t.exports.Element=a})),Dm=Gn(),ct=Fn(Nm(),1),ye=Fn(Pm(),1),Vt=0,gn=32,Lm=32,Fm=(e,t)=>{let r=t.replace(/-/g,"");if(r.length!==Lm)throw new Error(`Error: Cannot extract GUID from font filename: ${t}`);let n=r.replace(/(..)/g,"$1 ").trim().split(" ").map(a=>parseInt(a,16));n.reverse();let i=e.slice(Vt,gn).map((a,s)=>a^n[s%n.length]),o=new Uint8Array(Vt+i.length+Math.max(0,e.length-gn));return o.set(e.slice(0,Vt)),o.set(i,Vt),o.set(e.slice(gn),Vt+i.length),o},Ut=class{format(e,t={stack:[]}){let r=e.prepForXml(t);if(r)return r;throw Error("XMLComponent did not format correctly")}},xo=class{replace(e,t,r){let n=e;return t.forEach((i,o)=>{n=n.replace(new RegExp(`{${i.fileName}}`,"g"),(r+o).toString())}),n}getMediaData(e,t){return t.Array.filter(r=>e.search(`{${r.fileName}}`)>0)}},Mm=class{replace(e,t){let r=e;for(let n of t)r=r.replace(new RegExp(`{${n.reference}-${n.instance}}`,"g"),n.numId.toString());return r}},Bm=new Ut,yn=(e,t,r,n,i=!0)=>(0,ye.default)(Bm.format(t,{viewWrapper:{View:t,Relationships:n},file:e,stack:[]}),{indent:r,declaration:i?{standalone:"yes",encoding:"UTF-8"}:{encoding:"UTF-8"}}),Um=(e,t,r,n)=>{let{content:i}=t.options;if(i instanceof Uint8Array)return[{data:i,path:`word/${r}`}];if("files"in i){let h=new ct.default;for(let{path:m,content:f}of i.files)h.file(m,f instanceof Uint8Array?f:bt(yn(e,f,n,new Re)));return[{data:h.generateAsync({type:"uint8array",compression:"DEFLATE"}),path:`word/${r}`}]}let o=e.PackageParts.createRelationships(r),a=yn(e,i,n,o),s=r.slice(0,r.lastIndexOf("/")),u=r.slice(r.lastIndexOf("/")+1);return[{data:a,path:`word/${r}`},...o.RelationshipCount>0?[{data:yn(e,o,n,o,!1),path:`word/${s}/_rels/${u}.rels`}]:[]]},mi=(e,t,r=0)=>{let n=e.PackageParts.Array.slice(r);return n.length===0?[]:[...n.flatMap(({part:i,path:o})=>Um(e,i,o,t)),...mi(e,t,r+n.length)]},Hm=["PackageParts"],Wm=class{constructor(){Y(this,"formatter",void 0),Y(this,"imageReplacer",void 0),Y(this,"numberingReplacer",void 0),this.formatter=new Ut,this.imageReplacer=new xo,this.numberingReplacer=new Mm}compile(e,t,r=[]){let n=new ct.default,i=this.xmlifyFile(e,t),{PackageParts:o}=i,a=zr(i,Hm),s=new Map(Object.entries(a));for(let[,u]of s)if(Array.isArray(u))for(let h of u)n.file(h.path,bt(h.data));else n.file(u.path,bt(u.data));for(let{path:u,data:h}of o)n.file(u,typeof h=="string"?bt(h):h);for(let u of r)n.file(u.path,bt(u.data));for(let u of e.Media.Array)u.type!=="svg"?n.file(`word/media/${u.fileName}`,u.data):(n.file(`word/media/${u.fileName}`,u.data),n.file(`word/media/${u.fallback.fileName}`,u.fallback.data));for(let[u,{data:h,fontKey:m}]of e.FontTable.files.entries())n.file(`word/fonts/font${u+1}.odttf`,Fm(h,m));return n}xmlifyFile(e,t){let r=(0,ye.default)(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),n=(0,ye.default)(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),i=(0,ye.default)(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),o=(0,ye.default)(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),a=e.Document.Relationships.RelationshipCount+1,s=e.Comments.Relationships.RelationshipCount+1,u=e.FootNotes.Relationships.RelationshipCount+1,h=e.Endnotes.Relationships.RelationshipCount+1,m=this.imageReplacer.getMediaData(r,e.Media),f=this.imageReplacer.getMediaData(n,e.Media),w=this.imageReplacer.getMediaData(i,e.Media),p=this.imageReplacer.getMediaData(o,e.Media);return ie(ie(ie(ie({Relationships:{data:(()=>{let d=Re.copy(e.Document.Relationships);return m.forEach((v,_)=>{d.addRelationship(a+_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),d.addRelationship(d.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),(0,ye.default)(this.formatter.format(d,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{let d=this.imageReplacer.replace(r,m,a);return this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{let d=(0,ye.default)(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:(0,ye.default)(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},FileRelationships:{data:(0,ye.default)(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((d,v)=>{let _=(0,ye.default)(this.formatter.format(d.View,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),S=this.imageReplacer.getMediaData(_,e.Media),E=Re.copy(d.Relationships);return S.forEach((N,C)=>{E.addRelationship(C,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${N.fileName}`)}),{data:(0,ye.default)(this.formatter.format(E,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${v+1}.xml.rels`}}),FooterRelationships:e.Footers.map((d,v)=>{let _=(0,ye.default)(this.formatter.format(d.View,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),S=this.imageReplacer.getMediaData(_,e.Media),E=Re.copy(d.Relationships);return S.forEach((N,C)=>{E.addRelationship(C,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${N.fileName}`)}),{data:(0,ye.default)(this.formatter.format(E,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${v+1}.xml.rels`}}),Headers:e.Headers.map((d,v)=>{let _=(0,ye.default)(this.formatter.format(d.View,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),S=this.imageReplacer.getMediaData(_,e.Media),E=this.imageReplacer.replace(_,S,0);return{data:this.numberingReplacer.replace(E,e.Numbering.ConcreteNumbering),path:`word/header${v+1}.xml`}}),Footers:e.Footers.map((d,v)=>{let _=(0,ye.default)(this.formatter.format(d.View,{viewWrapper:d,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),S=this.imageReplacer.getMediaData(_,e.Media),E=this.imageReplacer.replace(_,S,0);return{data:this.numberingReplacer.replace(E,e.Numbering.ConcreteNumbering),path:`word/footer${v+1}.xml`}}),CustomProperties:{data:(0,ye.default)(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:(0,ye.default)(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{let d=this.imageReplacer.replace(i,w,u);return this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(()=>{let d=Re.copy(e.FootNotes.Relationships);return w.forEach((v,_)=>{d.addRelationship(u+_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),(0,ye.default)(this.formatter.format(d,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:(()=>{let d=this.imageReplacer.replace(o,p,h);return this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering)})(),path:"word/endnotes.xml"},EndnotesRelationships:{data:(()=>{let d=Re.copy(e.Endnotes.Relationships);return p.forEach((v,_)=>{d.addRelationship(h+_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),(0,ye.default)(this.formatter.format(d,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/endnotes.xml.rels"},Settings:{data:(0,ye.default)(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"}},e.Comments.IsEmpty?{}:{Comments:{data:(()=>{let d=this.imageReplacer.replace(n,f,s);return this.numberingReplacer.replace(d,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(()=>{let d=Re.copy(e.Comments.Relationships);return f.forEach((v,_)=>{d.addRelationship(s+_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${v.fileName}`)}),(0,ye.default)(this.formatter.format(d,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/comments.xml.rels"}}),e.CommentsExtended?{CommentsExtended:{data:(0,ye.default)(this.formatter.format(e.CommentsExtended,{viewWrapper:{View:e.CommentsExtended,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/commentsExtended.xml"}}:{}),e.CommentsIds?{CommentsIds:{data:(0,ye.default)(this.formatter.format(e.CommentsIds,{viewWrapper:{View:e.CommentsIds,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/commentsIds.xml"}}:{}),{},{FontTable:{data:(0,ye.default)(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:(0,ye.default)(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"},Theme:{data:(0,ye.default)(this.formatter.format(e.Theme,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/theme/theme1.xml"},PackageParts:mi(e,t),Numbering:{data:(0,ye.default)(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},ContentTypes:{data:(0,ye.default)(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"}})}};function Ji(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(h){r(h);return}s.done?t(u):Promise.resolve(u).then(n,i)}function ot(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(u){Ji(o,n,i,a,s,"next",u)}function s(u){Ji(o,n,i,a,s,"throw",u)}a(void 0)})}}var jm={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:" "},Qi=e=>e===!0?jm.WITH_2_BLANKS:e===!1?void 0:e,Gm=class Ct{static pack(t,r,n){var i=this;return ot(function*(o,a,s,u=[]){return i.compiler.compile(o,Qi(s),u).generateAsync({type:a,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}).apply(this,arguments)}static toString(t,r,n=[]){return Ct.pack(t,"string",r,n)}static toBuffer(t,r,n=[]){return Ct.pack(t,"nodebuffer",r,n)}static toBase64String(t,r,n=[]){return Ct.pack(t,"base64",r,n)}static toBlob(t,r,n=[]){return Ct.pack(t,"blob",r,n)}static toArrayBuffer(t,r,n=[]){return Ct.pack(t,"arraybuffer",r,n)}static toStream(t,r,n=[]){let i=new Dm.Stream;return this.compiler.compile(t,Qi(r),n).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then(o=>{i.emit("data",o),i.emit("end")}),i}};Y(Gm,"compiler",new Wm);var To=e=>{var t;if(e.name!=="w:bookmarkStart"&&e.name!=="w:bookmarkEnd")return;let r=Number((t=e.attributes)===null||t===void 0?void 0:t["w:id"]);return Number.isInteger(r)?r:void 0},So=e=>{var t;let r=To(e);return[...r===void 0?[]:[r],...((t=e.elements)!==null&&t!==void 0?t:[]).flatMap(So)]},$m=e=>{let t=new Set(e),r=new Map,n=e.reduce((a,s)=>Math.max(a,s),0),i=a=>{let s=r.get(a);if(s!==void 0)return s;let u=t.has(a)?n+1:a;return n=Math.max(n,u),t.add(u),r.set(a,u),u},o=a=>{let s=To(a);return ie(ie(ie({},a),s===void 0?{}:{attributes:ie(ie({},a.attributes),{},{"w:id":String(i(s))})}),a.elements===void 0?{}:{elements:a.elements.map(o)})};return a=>a.map(o)},zm=new Ut,mt=e=>(0,Fr.xml2js)(e,{compact:!1,captureSpacesBetweenElements:!0}),Ao=e=>{var t;return(t=mt((0,ye.default)(zm.format(new er({text:e})))).elements[0].elements)!==null&&t!==void 0?t:[]},ko=e=>ie(ie({},e),{},{attributes:{"xml:space":"preserve"}}),Ye=(e,t)=>{var r,n;let i=(r=e.elements)===null||r===void 0?void 0:r.find(o=>o.name===t);return i===void 0?[]:((n=i.elements)!==null&&n!==void 0||(i.elements=[]),i.elements)},kt=(e,t,r)=>{let n=Ye(e,"Types");n.some(i=>{var o,a;return i.type==="element"&&i.name==="Default"&&(i==null||(o=i.attributes)===null||o===void 0?void 0:o.ContentType)===t&&(i==null||(a=i.attributes)===null||a===void 0?void 0:a.Extension)===r})||n.push({attributes:{ContentType:t,Extension:r},name:"Default",type:"element"})},Km=(e,t,r)=>{let n=Ye(e,"Types");n.some(i=>{var o;return i.type==="element"&&i.name==="Override"&&((o=i.attributes)===null||o===void 0?void 0:o.PartName)===r})||n.push({attributes:{ContentType:t,PartName:r},name:"Override",type:"element"})},Vm=(e,t)=>{var r;let n=(r=e.elements)===null||r===void 0?void 0:r.find(i=>i.name==="Types");n?.elements!==void 0&&(n.elements=n.elements.filter(i=>{var o,a;return!(i.name==="Override"&&String((o=(a=i.attributes)===null||a===void 0?void 0:a.PartName)!==null&&o!==void 0?o:"").toLowerCase()===t.toLowerCase())}))},Be={DOCUMENT:"file",PARAGRAPH:"paragraph",TABLE_ROWS:"tableRows",DRAWING:"drawing"},qm=e=>{let t=parseInt(e.substring(3),10);return isNaN(t)?0:t},Io=e=>Ye(e,"Relationships").map(t=>{var r,n;return qm((r=(n=t.attributes)===null||n===void 0||(n=n.Id)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"")}).reduce((t,r)=>Math.max(t,r),0)+1,ea=(e,t,r,n,i)=>{let o=Ye(e,"Relationships");return o.push({attributes:{Id:`rId${t}`,Type:r,Target:n,TargetMode:i},name:"Relationship",type:"element"}),o},Cr=()=>({declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"Relationships",attributes:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},elements:[]}]}),M0=class{constructor(){Y(this,"type",Be.DRAWING)}},Xm=new Map([["wp:inline","wp:docPr"],["wp:anchor","wp:docPr"],["wpg:graphicFrame","wpg:cNvPr"],["wpc:graphicFrame","wpg:cNvPr"]]),vi=e=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).flatMap(r=>{var n;let i=r.name===void 0?void 0:Xm.get(r.name),o=i===void 0||(n=r.elements)===null||n===void 0?void 0:n.find(a=>a.name===i);return[...o?[{element:r,properties:o}]:[],...vi(r)]})},Ro=e=>{var t,r;return[(t=e.attributes)===null||t===void 0?void 0:t.descr,(r=e.attributes)===null||r===void 0?void 0:r.title].flatMap(n=>n===void 0?[]:[String(n)])},Et=e=>{let t=e.lastIndexOf("/");return`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`},Co=e=>e.replace(/(^|\/)_rels\/([^/]*)\.rels$/,"$1$2"),No=e=>e.slice(0,e.lastIndexOf("/")+1),dr=(e,t)=>{let r=t.replace(/\\/g,"/");return(r.startsWith("/")?r:`${No(e)}${r}`).split("/").reduce((n,i)=>i===""||i==="."?n:i===".."?n.slice(0,-1):[...n,i],[]).join("/")},Oo=(e,t)=>{let r=No(e).split("/").filter(Boolean),n=t.split("/"),i=r.findIndex((a,s)=>s>=n.length-1||n[s]!==a),o=i===-1?r.length:i;return[...r.slice(o).map(()=>".."),...n.slice(o)].join("/")},ta="[Content_Types].xml",Ym=e=>{var t;if(!(!((t=e.elements)===null||t===void 0)&&t.some(n=>n.name==="Relationships"))){var r;e.elements=[...(r=e.elements)!==null&&r!==void 0?r:[],...Cr().elements]}return Ye(e,"Relationships")},Zm=(e,t,r,n)=>{let i=new Ut,o=f=>e.has(f)||t.has(f),a=f=>{if(o(f))return f;let w=(()=>{try{return decodeURI(f)}catch{return}})();if(w!==void 0&&o(w))return w;let p=f.toLowerCase();return[...e.keys(),...t.keys()].find(d=>d.toLowerCase()===p)},s=(f,w)=>{let p=e.get(Et(f));return p===void 0?void 0:Ye(p,"Relationships").find(d=>{var v;return d.name==="Relationship"&&((v=d.attributes)===null||v===void 0?void 0:v.Id)===w})},u=(f,w)=>{var p,d;let v=(p=w.attributes)===null||p===void 0?void 0:p.Target;return((d=w.attributes)===null||d===void 0?void 0:d.TargetMode)==="External"||v===void 0?void 0:a(dr(f,String(v)))},h=f=>[...e].some(([w,p])=>w.endsWith(".rels")&&Ye(p,"Relationships").some(d=>u(Co(w),d)===f)),m=f=>{e.delete(f),t.delete(f),e.delete(Et(f));let w=e.get(ta);w!==void 0&&Vm(w,`/${f}`)};return{getRelatedPart:(f,w)=>{let p=s(f.path,w),d=p===void 0?void 0:u(f.path,p);return d===void 0?void 0:{path:d,xml:e.get(d)}},replaceRelatedPart:(f,w,p)=>{let d=`word/${r.PackageParts.add(p)}`,{relationshipType:v}=p.options,_=Oo(f.path,d),S=w===void 0?void 0:s(f.path,w);if(S===void 0){var E;let C=Et(f.path),T=(E=e.get(C))!==null&&E!==void 0?E:Cr();e.set(C,T);let g=w??`rId${Io(T)}`;return Ym(T).push({type:"element",name:"Relationship",attributes:{Id:g,Type:v,Target:_}}),g}let N=u(f.path,S);return S.attributes=ie(ie({},Object.fromEntries(Object.entries(S.attributes).filter(([C])=>C!=="TargetMode"))),{},{Type:v,Target:_}),N!==void 0&&N!==f.path&&N!==ta&&!N.endsWith(".rels")&&!h(N)&&m(N),String(S.attributes.Id)},format:f=>mt((0,ye.default)(i.format(f,n))).elements[0]}},Jm=({parts:e,binaryParts:t,file:r,patches:n,delimiters:i},o)=>{let a=n.map(([u,h])=>({placeholder:`${i.start}${u}${i.end}`,patch:h})),s=[...e].filter(([u])=>u.startsWith("word/")&&!u.endsWith(".rels")).flatMap(([u,h])=>vi(h).flatMap(m=>{let f=Ro(m.properties),w=a.filter(({placeholder:v})=>f.some(_=>_.includes(v)));if(w.length>1){var p,d;throw new Error(`The drawing "${(p=(d=m.properties.attributes)===null||d===void 0?void 0:d.name)!==null&&p!==void 0?p:""}" in ${u} has the placeholders ${w.map(({placeholder:v})=>v).join(" and ")} in its alt text. A drawing can only be patched once`)}return w.map(({placeholder:v,patch:_})=>({drawing:ie(ie({placeholder:v},m),{},{part:{path:u,xml:h}}),patch:_}))}));for(let{drawing:u,patch:h}of s)h.patch(u,Zm(e,t,r,o(u.part.path)))},Qm=new Ut,_r="word/document.xml",ev={path:"word/footnotes.xml",rootName:"w:footnotes",noteName:"w:footnote",referenceName:"w:footnoteReference",contentType:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",create:{part:()=>new oo,mark:()=>new so,styles:()=>[new fo({}),new mo({}),new po({})]}},tv={path:"word/endnotes.xml",rootName:"w:endnotes",noteName:"w:endnote",referenceName:"w:endnoteReference",contentType:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",create:{part:()=>new ao,mark:()=>new ro,styles:()=>[new vo({}),new go({}),new wo({})]}},Er=(e,t)=>mt((0,ye.default)(Qm.format(e,t))).elements[0],Po=(e,t)=>{var r,n,i;let o=t.includes((r=e.name)!==null&&r!==void 0?r:"")?Number((n=e.attributes)===null||n===void 0?void 0:n["w:id"]):NaN;return[...Number.isInteger(o)?[o]:[],...((i=e.elements)!==null&&i!==void 0?i:[]).flatMap(a=>Po(a,t))]},rv=(e,t)=>{var r,n;let i=(r=e.elements)!==null&&r!==void 0?r:[],o=((n=i[0])===null||n===void 0?void 0:n.name)==="w:pPr"?1:0;return ie(ie({},e),{},{elements:[...i.slice(0,o),t,...i.slice(o)]})},ra=(e,t,r,{createContext:n,addContentTypeOverride:i,renumberBookmarks:o})=>{let a=new Map(Object.entries(t).map(([w,p])=>[Number(w),p])),s=new Map,u,h=w=>{var p,d;let v=w.name===e.referenceName?a.get(Number((p=w.attributes)===null||p===void 0?void 0:p["w:id"])):void 0;return v===void 0?w.elements===void 0?w:ie(ie({},w),{},{elements:w.elements.map(h)}):(u=((d=u)!==null&&d!==void 0?d:[...r.values()].flatMap(_=>Po(_,[e.noteName,e.referenceName])).reduce((_,S)=>Math.max(_,S),0))+1,s.set(u,v),ie(ie({},w),{},{attributes:ie(ie({},w.attributes),{},{"w:id":String(u)})}))},m=()=>{var w;let p=Ye((w=r.get(Et(_r)))!==null&&w!==void 0?w:{},"Relationships").find(v=>{var _;return((_=v.attributes)===null||_===void 0?void 0:_.Type)===e.relationshipType}),d=p?dr(_r,String(p.attributes.Target)):e.path;return r.has(d)||(r.set(d,{declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[Er(e.create.part(),n(d))]}),i(e.contentType,`/${d}`)),p||n(_r).viewWrapper.Relationships.addRelationship(Tt(),e.relationshipType,Oo(_r,d)),d};return{renumber:w=>w.map(h),write:()=>{if(s.size===0)return;let w=m(),p=n(w),d=new Map([...new Set(s.values())].map(_=>{let S=Er(e.create.mark(),p);return[_,o(_.children.map(E=>Er(E,p)).map((E,N)=>N===0?rv(E,S):E))]}));Ye(r.get(w),e.rootName).push(...[...s].map(([_,S])=>({type:"element",name:e.noteName,attributes:{"w:id":String(_)},elements:[...d.get(S)]})));let v=r.get("word/styles.xml");if(v){let _=Ye(v,"w:styles"),S=new Set(_.map(E=>{var N;return(N=E.attributes)===null||N===void 0?void 0:N["w:styleId"]}));_.push(...e.create.styles().map(E=>Er(E,p)).filter(E=>{var N;return!S.has((N=E.attributes)===null||N===void 0?void 0:N["w:styleId"])}))}}}},nv=({footnotes:e={},endnotes:t={}},r,n)=>{let i=[ra(ev,e,r,n),ra(tv,t,r,n)];return{renumber:o=>i.reduce((a,s)=>s.renumber(a),o),write:()=>{for(let o of i)o.write()}}},Ln={nameOf:e=>e.type==="element"?e.name:void 0,contentOf:e=>e.elements,attributeOf:(e,t)=>{var r;return(r=e.attributes)===null||r===void 0?void 0:r[t]},textOf:e=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).filter(({type:r})=>r==="text").map(({text:r})=>String(r)).join("")},textElement:e=>({type:"element",name:"w:t",attributes:{"xml:space":"preserve"},elements:[{type:"text",text:e}]}),writeClean:(e,t)=>{var r;/^\s*(PAGEREF|TOC)\b/i.test(t)&&((r=e.attributes)===null||r===void 0?void 0:r["w:dirty"])!==void 0&&(e.attributes=Object.fromEntries(Object.entries(e.attributes).filter(([n])=>n!=="w:dirty")))},setSimpleFieldResult:(e,t)=>{e.elements=[{type:"element",name:"w:r",elements:[Ln.textElement(t)]}]}},bn="word/document.xml",iv="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk",av=[80,75,3,4],sv=(function(){var e=ot(function*(t){if(av.every((r,n)=>t[n]===r))try{let r=yield ct.default.loadAsync(t),n=new Map,i=new Map;for(let[a,s]of Object.entries(r.files))s.dir||(/\.(xml|rels)$/.test(a)?n.set(a,mt(yield s.async("text"))):i.set(a,yield s.async("uint8array")));let o=yield Do(n,i);return ie({parts:n,binaryParts:i},o.size>0?{importedDocuments:o}:{})}catch{return}});return function(r){return e.apply(this,arguments)}})(),Do=(function(){var e=ot(function*(t,r){let n=new Map;for(let[a,s]of t){var i,o;if(a.endsWith(".rels"))for(let{attributes:u={}}of(i=(o=kr(s))===null||o===void 0?void 0:o.elements)!==null&&i!==void 0?i:[]){let h=dr(Co(a),String(u.Target)),m=r.get(h),f=u.Type===iv&&u.TargetMode!=="External"&&m?yield sv(m):void 0;f&&n.set(h,f)}}return n});return function(r,n){return e.apply(this,arguments)}})(),kr=e=>{var t;return e==null||(t=e.elements)===null||t===void 0?void 0:t.find(({type:r})=>r==="element")},ov=(function(){var e=ot(function*(t,r,n=new Map){var i,o;let a=kr(t.get(bn));if(!a)return;let s=yield Do(t,n),u=r(ie({parts:t,binaryParts:n},s.size>0?{importedDocuments:s}:{})),h=gs(Ln,a,u,{blank:!0}),m=(i=(o=kr(t.get(Et(bn))))===null||o===void 0?void 0:o.elements)!==null&&i!==void 0?i:[];for(let{attributes:f={}}of m){let w=/\/(header|footer)$/.test(String(f.Type))?kr(t.get(dr(bn,String(f.Target)))):void 0;w&&ys(Ln,w,u,{blank:!0,sectionPageCount:h.get(String(f.Id))})}});return function(r,n){return e.apply(this,arguments)}})(),lv=class extends Error{constructor(e){super(`Token ${e} not found`),this.name="TokenNotFoundError"}},uv=(e,t)=>{var r;for(let a=0;a<((r=e.elements)!==null&&r!==void 0?r:[]).length;a++){let s=e.elements[a];if(s.type==="element"&&s.name==="w:r"){var n;let u=((n=s.elements)!==null&&n!==void 0?n:[]).filter(h=>h.type==="element"&&h.name==="w:t");for(let h of u){var i,o;if(!((i=h.elements)===null||i===void 0)&&i[0]&&!((o=h.elements[0].text)===null||o===void 0)&&o.includes(t))return a}}}throw new lv(t)},cv=(e,t)=>{var r,n;let i=-1,o=(r=(n=e.elements)===null||n===void 0?void 0:n.map((a,s)=>{if(i!==-1)return a;if(a.type==="element"&&a.name==="w:t"){var u,h;let m=((u=(h=a.elements)===null||h===void 0||(h=h[0])===null||h===void 0?void 0:h.text)!==null&&u!==void 0?u:"").split(t),f=m.map(w=>ie(ie(ie({},a),ko(a)),{},{elements:Ao(w)}));return m.length>1&&(i=s),f}else return a}).flat())!==null&&r!==void 0?r:[];return{left:ie(ie({},JSON.parse(JSON.stringify(e))),{},{elements:o.slice(0,i+1)}),right:ie(ie({},JSON.parse(JSON.stringify(e))),{},{elements:o.slice(i+1)})}},qt={START:0,MIDDLE:1,END:2},hv=({paragraphElement:e,renderedParagraph:t,originalText:r,replacementText:n,fromIndex:i=0})=>{let o=t.text.indexOf(r,i),a=o+r.length-1,s=qt.START;for(let u of t.runs)for(let{text:h,index:m,start:f,end:w}of u.parts)switch(s){case qt.START:if(o>=f&&o<=w){let p=o-f,d=Math.min(a,w)-f;if(h.substring(p,d+1)==="")continue;let v=h.substring(0,p)+n+h.substring(d+1);_n(e.elements[u.index].elements[m],v),s=qt.MIDDLE;continue}break;case qt.MIDDLE:if(a<=w){let p=h.substring(a-f+1);_n(e.elements[u.index].elements[m],p);let d=e.elements[u.index].elements[m];e.elements[u.index].elements[m]=ko(d),s=qt.END}else _n(e.elements[u.index].elements[m],"")}return e},_n=(e,t)=>(e.elements=Ao(t),e),Lo=e=>{if(e.element.name!=="w:p")throw new Error(`Invalid node type: ${e.element.name}`);if(!e.element.elements)return{text:"",runs:[],index:-1,pathToParagraph:[]};let t=0,r=e.element.elements.map((n,i)=>({element:n,i})).filter(({element:n})=>n.name==="w:r").map(({element:n,i})=>{let o=dv(n,i,t);return t+=o.text.length,o}).filter(n=>!!n);return{text:r.reduce((n,i)=>n+i.text,""),runs:r,index:e.index,pathToParagraph:Fo(e)}},dv=(e,t,r)=>{if(!e.elements)return{text:"",parts:[],index:-1,start:r,end:r};let n=r,i=e.elements.map((o,a)=>{var s,u;if(o.name!=="w:t"||!o.elements||o.elements.length===0)return;let h=(s=(u=o.elements[0].text)===null||u===void 0?void 0:u.toString())!==null&&s!==void 0?s:"",m=n;return n+=h.length,{text:h,index:a,start:m,end:m+h.length-1}}).filter(o=>!!o).map(o=>o);return{text:i.reduce((o,a)=>o+a.text,""),parts:i,index:t,start:r,end:i.length>0?i[i.length-1].end:r}},Fo=e=>e.parent?[...Fo(e.parent),e.index]:[e.index],na=e=>{var t,r;return(t=(r=e.element.elements)===null||r===void 0?void 0:r.map((n,i)=>({element:n,index:i,parent:e})))!==null&&t!==void 0?t:[]},Mo=e=>{let t=[],r=[...na({element:e,index:0,parent:void 0})],n;for(;r.length>0;)n=r.shift(),n.element.name==="w:p"&&(t=[...t,Lo(n)]),r.push(...na(n));return t},wi=(e,t)=>Mo(e).filter(r=>r.text.includes(t)),fv=new Ut,En="\uFFFF",pv=({json:e,patch:t,patchText:r,context:n,keepOriginalStyles:i=!0,recursive:o=!0,renumberIds:a=s=>s})=>{let s=wi(e,r);if(s.length===0)return{element:e,didFindOccurrence:!1};let u=[...s].reverse(),h=t.type===Be.DOCUMENT?gv(u):u;for(let f of h)switch(t.type){case Be.DOCUMENT:{var m;let w=yv(e,f.pathToParagraph),p=bv(f.pathToParagraph),d=ia(t,n,a),v=w.name==="w:tc"&&p===w.elements.length-1&&((m=d[d.length-1])===null||m===void 0?void 0:m.name)!=="w:p"?[{type:"element",name:"w:p"}]:[];w.elements.splice(p,1,...d,...v);break}case Be.PARAGRAPH:default:{let w=Uo(e,f.pathToParagraph),p=f,d=0;do{let v=mv({paragraphElement:w,renderedParagraph:p,patchText:r,fromIndex:d,children:ia(t,n,a),keepOriginalStyles:i});p=Lo({element:w,index:f.index,parent:void 0}),d=p.runs.filter(_=>_.index<v).reduce((_,S)=>_+S.text.length,0)}while(o&&p.text.includes(r,d));break}}return{element:e,didFindOccurrence:!0}},ia=(e,t,r)=>r(e.children.flatMap(n=>{var i;return(i=n.writtenAs)!==null&&i!==void 0?i:n}).map(n=>mt((0,ye.default)(fv.format(n,t)))).map(n=>n.elements[0])),mv=({paragraphElement:e,renderedParagraph:t,patchText:r,fromIndex:n,children:i,keepOriginalStyles:o})=>{hv({paragraphElement:e,renderedParagraph:t,originalText:r,replacementText:En,fromIndex:n});let a=uv(e,En),s=e.elements[a],{left:u,right:h}=cv(s,En),m=s.elements.find(p=>p.type==="element"&&p.name==="w:rPr"),f=o&&m?i.map(p=>Bo(p,m)):i,w=m?ie(ie({},h),{},{elements:[m,...h.elements]}):h;return e.elements.splice(a,1,u,...f,w),a+1+f.length},Bo=(e,t)=>e.name==="w:r"?vv(e,t):e.elements?ie(ie({},e),{},{elements:e.elements.map(r=>Bo(r,t))}):e,vv=(e,t)=>{let r=It(e).find(a=>a.type==="element"&&a.name==="w:rPr");if(!r)return ie(ie({},e),{},{elements:[t,...It(e)]});let n=new Set(It(r).map(a=>a.name)),i=[...It(t).filter(a=>!n.has(a.name)),...It(r)],o=ie(ie({},r),{},{elements:[...i].sort((a,s)=>aa(a)-aa(s))});return ie(ie({},e),{},{elements:It(e).map(a=>a===r?o:a)})},xn=["w:rStyle","w:rFonts","w:b","w:bCs","w:i","w:iCs","w:caps","w:smallCaps","w:strike","w:dstrike","w:outline","w:shadow","w:emboss","w:imprint","w:noProof","w:snapToGrid","w:vanish","w:webHidden","w:color","w:spacing","w:w","w:kern","w:position","w:sz","w:szCs","w:highlight","w:u","w:effect","w:bdr","w:shd","w:fitText","w:vertAlign","w:rtl","w:cs","w:em","w:lang","w:eastAsianLayout","w:specVanish","w:oMath","w14:glow","w14:shadow","w14:reflection","w14:textOutline","w14:textFill","w14:scene3d","w14:props3d","w14:ligatures","w14:numForm","w14:numSpacing","w14:stylisticSets","w14:cntxtAlts"],aa=e=>{var t;if(e.name==="w:rPrChange")return xn.length+1;let r=xn.indexOf((t=e.name)!==null&&t!==void 0?t:"");return r===-1?xn.length:r},It=e=>{var t;return(t=e.elements)!==null&&t!==void 0?t:[]},wv=(e,t)=>e.length>t.length&&t.every((r,n)=>e[n]===r),gv=e=>e.filter(t=>!e.some(r=>wv(t.pathToParagraph,r.pathToParagraph))),Uo=(e,t)=>{let r=e;for(let n=1;n<t.length;n++){let i=t[n];r=r.elements[i]}return r},yv=(e,t)=>Uo(e,t.slice(0,t.length-1)),bv=e=>e[e.length-1],_v={type:Be.PARAGRAPH,children:[]},Ev=({json:e,key:t,patch:r,delimiters:{start:n,end:i},patchPlaceholder:o})=>{let a=`${n}${t}.`;for(let s of xv(e,a)){let u=Av(s.elements,a,i),h=r.rows.flatMap((m,f)=>{let w={type:"element",name:"w:tbl",elements:[...f===0?s.elements.map(kv):Wo(s.elements)]},p=new Map(Object.entries(m).flatMap(([d,v])=>v===void 0?[]:[[d,v]]));for(let[d,v]of p)o(w,`${t}.${d}`,v);for(let d of u.filter(v=>!p.has(v)))o(w,`${t}.${d}`,_v);return w.elements});s.parent.elements.splice(s.parent.elements.indexOf(s.elements[0]),s.elements.length,...h),s.table&&!Ho(s.table.element)&&s.table.parent.elements.splice(s.table.parent.elements.indexOf(s.table.element),1)}},xv=(e,t)=>{let r=wi(e,t).flatMap(i=>{let o=Tv(e,i.pathToParagraph);return o?[o]:[]}),n=r.filter(i=>!r.some(o=>Sv(i.path,o.path))).filter((i,o,a)=>a.findIndex(s=>s.row===i.row)===o);return[...new Set(n.map(i=>i.parent))].flatMap(i=>{let o=i.elements.filter(u=>u.name==="w:tr"),a=n.filter(u=>u.parent===i).map(u=>o.indexOf(u.row)).sort((u,h)=>u-h),{table:s}=n.find(u=>u.parent===i);return a.reduce((u,h)=>{let m=u[u.length-1];return m?.[m.length-1]===h-1?[...u.slice(0,-1),[...m,h]]:[...u,[h]]},[]).map(u=>{let h=i.elements.indexOf(o[u[0]]),m=i.elements.indexOf(o[u[u.length-1]]);return{parent:i,table:s,elements:i.elements.slice(h,m+1)}})})},Tv=(e,t)=>{let r=e,n,i;for(let o=1;o<t.length;o++){let a=r.elements[t[o]];a.name==="w:tbl"&&(i={element:a,parent:r}),a.name==="w:tr"&&(n={parent:r,table:i,row:a,path:t.slice(0,o+1)}),r=a}return n},Sv=(e,t)=>e.length>t.length&&t.every((r,n)=>e[n]===r),Ho=e=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).some(r=>r.name==="w:tr"||r.name!=="w:tblPr"&&r.name!=="w:tblGrid"&&Ho(r))},Av=(e,t,r)=>{let n=wi({elements:[...e]},t).flatMap(({text:i})=>i.split(t).slice(1).flatMap(o=>{let a=o.indexOf(r);return a>0?[o.slice(0,a)]:[]}));return[...new Set(n)]},kv=e=>JSON.parse(JSON.stringify(e)),Iv=["w14:paraId","w14:textId"],Rv=["w:bookmarkStart","w:bookmarkEnd"],Wo=(e,t)=>e.filter(r=>{var n;return!Rv.includes((n=r.name)!==null&&n!==void 0?n:"")&&!(t?.name==="w:sdtPr"&&r.name==="w:id")}).map(r=>ie(ie(ie({},r),r.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(r.attributes).filter(([n])=>!Iv.includes(n)))}),r.elements===void 0?{}:{elements:[...Wo(r.elements,r)]})),Cv="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Nv=new Map([["dk1","dark1"],["lt1","light1"],["dk2","dark2"],["lt2","light2"],["accent1","accent1"],["accent2","accent2"],["accent3","accent3"],["accent4","accent4"],["accent5","accent5"],["accent6","accent6"],["hlink","hyperlink"],["folHlink","followedHyperlink"]]),Nr=e=>{var t;return(t=e.name)===null||t===void 0?void 0:t.slice(e.name.indexOf(":")+1)},Ir=(e,t)=>{var r;return e==null||(r=e.elements)===null||r===void 0?void 0:r.find(n=>Nr(n)===t)},Ov=e=>{var t;let r=(t=e.elements)===null||t===void 0?void 0:t.map(n=>{var i,o;return Nr(n)==="srgbClr"?(i=n.attributes)===null||i===void 0?void 0:i.val:Nr(n)==="sysClr"?(o=n.attributes)===null||o===void 0?void 0:o.lastClr:void 0}).find(n=>n!==void 0);return typeof r=="string"&&/^[0-9A-Fa-f]{6}$/.test(r)?r.toUpperCase():void 0},Pv=e=>e[0]===255&&e[1]===254||e[0]===254&&e[1]===255,sa=(function(){var e=ot(function*(t,r){let n=t.file(r);if(n!==null)return Pv(yield n.async("uint8array"))?void 0:mt(yield n.async("text"))});return function(r,n){return e.apply(this,arguments)}})(),Dv=(function(){var e=ot(function*(t){var r,n;let i=(r=Ir(yield sa(t,"word/_rels/document.xml.rels"),"Relationships"))===null||r===void 0||(r=r.elements)===null||r===void 0?void 0:r.find(a=>{var s;return((s=a.attributes)===null||s===void 0?void 0:s.Type)===Cv}),o=i==null||(n=i.attributes)===null||n===void 0?void 0:n.Target;return typeof o=="string"?sa(t,dr("word/document.xml",o)):void 0});return function(r){return e.apply(this,arguments)}})(),Lv=(function(){var e=ot(function*(t){var r;let n=yield Dv(t);if(n===void 0)return;let i=Ir(Ir(Ir(n,"theme"),"themeElements"),"clrScheme"),o=((r=i?.elements)!==null&&r!==void 0?r:[]).flatMap(a=>{var s;let u=Nv.get((s=Nr(a))!==null&&s!==void 0?s:""),h=Ov(a);return u&&h?[[u,h]]:[]});return qn(Object.fromEntries(o))});return function(r){return e.apply(this,arguments)}})(),jo=(e,t,{inTableRow:r})=>{if(t?.type===Be.TABLE_ROWS&&Array.isArray(t.rows)){for(let n of t.rows){if(typeof n!="object"||n===null)throw new Error(`Invalid patch "${e}". Expected each of its rows to be an object of patches, by the name of their field`);for(let[i,o]of Object.entries(n))o!==void 0&&jo(`${e}.${i}`,o,{inTableRow:!0})}return}if(!(t?.type===Be.DRAWING?!r&&typeof t.patch=="function":t?.type!==Be.TABLE_ROWS&&Array.isArray(t?.children)))throw new Error(`Invalid patch "${e}". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${r?"or { type: PatchType.TABLE_ROWS, rows: [...] }":"{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ChartDataPatch from docx/charts"}`)},oa=new xo,Fv=new Uint8Array([255,254]),Mv=new Uint8Array([254,255]),la=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},B0=(function(){var e=ot(function*({outputType:t,data:r,patches:n,keepOriginalStyles:i,placeholderDelimiters:o={start:"{{",end:"}}"},recursive:a=!0,footnotes:s,endnotes:u,pageNumbers:h}){let m=r instanceof ct.default?r:yield ct.default.loadAsync(r),f=new Map,w=yield Lv(m),p=[],d={Media:new lo,Theme:w&&{Colors:w},PackageParts:new co({addOverride:(K,j)=>p.push({contentType:K,partName:j})},new Set(Object.keys(m.files).filter(K=>K.startsWith("word/")).map(K=>K.slice(5))))},v=new Map,_=[],S=[],E=!1,N=new Map;if(!o?.start.trim()||!o?.end.trim())throw new Error("Both start and end delimiters must be non-empty strings.");let{start:C,end:T}=o;for(let[K,j]of Object.entries(n))jo(K,j,{inTableRow:!1});for(let[K,j]of Object.entries(m.files)){let se=yield j.async("uint8array"),Z=se.slice(0,2);if(la(Z,Fv)||la(Z,Mv)){N.set(K,se);continue}if(!K.endsWith(".xml")&&!K.endsWith(".rels")){N.set(K,se);continue}let re=mt(yield j.async("text"));if(K==="word/document.xml"){var g;let z=(g=re.elements)===null||g===void 0?void 0:g.find(D=>D.name==="w:document");if(z&&z.attributes){for(let D of["mc","wp","r","w15","m"])z.attributes[`xmlns:${D}`]=Dn[D];z.attributes["mc:Ignorable"]=`${z.attributes["mc:Ignorable"]||""} w15`.trim()}}v.set(K,re)}let O=$m([...v.values()].flatMap(So)),M=K=>({file:d,viewWrapper:{Relationships:{addRelationship:(j,se,Z,re)=>{S.push({key:K,id:j,type:se,target:Z,targetMode:re})}}},stack:[]}),k=nv({footnotes:s,endnotes:u},v,{createContext:M,addContentTypeOverride:(K,j)=>p.push({contentType:K,partName:j}),renumberBookmarks:O});Jm({parts:v,binaryParts:N,file:d,patches:Object.entries(n).flatMap(([K,j])=>j.type===Be.DRAWING?[[K,j]]:[]),delimiters:{start:C,end:T}},M);let q=Object.entries(n).flatMap(([K,j])=>j.type===Be.DRAWING?[]:[[K,j]]),te=[...q.filter(([,K])=>K.type===Be.TABLE_ROWS),...q.filter(([,K])=>K.type!==Be.TABLE_ROWS)];for(let[K,j]of[...v]){if(!K.startsWith("word/")||K.endsWith(".xml.rels"))continue;let se=M(K);f.set(K,se);let Z=(re,z,D)=>{if(D.type===Be.TABLE_ROWS){Ev({json:re,key:z,patch:D,delimiters:{start:C,end:T},patchPlaceholder:Z});return}let J=[],{didFindOccurrence:Q}=pv({json:re,patch:ie(ie({},D),{},{children:D.children.flatMap(ne=>ne instanceof Ds?ne.writtenAs:[ne]).map(ne=>{if(ne instanceof Ps){let{target:pe,anchor:A}=Bs(ne.options.link),b=new ur(ne.options.children,Tt(),A,ne.options.link);return J.push({key:K,id:b.linkId,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",target:pe,targetMode:ei.EXTERNAL}),b}else return ne})}),patchText:`${C}${z}${T}`,context:se,keepOriginalStyles:i,recursive:a,renumberIds:ne=>k.renumber(O(ne))});Q&&S.push(...J)};for(let[re,z]of te)Z(j,re,z)}k.write();for(let[K,j]of v){if(!K.startsWith("word/")||K.endsWith(".xml.rels"))continue;let se=oa.getMediaData(JSON.stringify(j),d.Media);se.length>0&&(E=!0,_.push({key:K,mediaDatas:se}))}for(let{key:K,mediaDatas:j}of _){var P;let se=Et(K),Z=(P=v.get(se))!==null&&P!==void 0?P:Cr();v.set(se,Z);let re=Io(Z),z=oa.replace(JSON.stringify(v.get(K)),j,re);v.set(K,JSON.parse(z));for(let D=0;D<j.length;D++){let{fileName:J}=j[D];ea(Z,re+D,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${J}`)}}for(let{key:K,id:j,type:se,target:Z,targetMode:re}of S){var G;let z=Et(K),D=(G=v.get(z))!==null&&G!==void 0?G:Cr();v.set(z,D),ea(D,j,se,Z,re)}h&&(yield ov(v,h,N));let I=mi(d,void 0);if(E||p.length>0){let K=v.get("[Content_Types].xml");if(!K)throw new Error("Could not find content types file");E&&(kt(K,"image/png","png"),kt(K,"image/jpeg","jpeg"),kt(K,"image/jpeg","jpg"),kt(K,"image/bmp","bmp"),kt(K,"image/gif","gif"),kt(K,"image/svg+xml","svg"));for(let{contentType:j,partName:se}of p)Km(K,j,se)}let $=new ct.default;for(let[K,j]of v){let se=Bv(j);$.file(K,bt(se))}for(let[K,j]of N)$.file(K,j);for(let{data:K,fileName:j}of d.Media.Array)$.file(`word/media/${j}`,K);for(let{path:K,data:j}of I)$.file(K,typeof j=="string"?bt(j):j);return $.generateAsync({type:t,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})});return function(r){return e.apply(this,arguments)}})(),Go=e=>ie(ie(ie({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).map(([t,r])=>[t,r===void 0?r:String(r).replace(/&/g,"&amp;")]))}),e.elements===void 0?{}:{elements:e.elements.map(t=>t.type==="text"?ie(ie({},t),{},{text:String(t.text).replace(/&/g,"&amp;")}):Go(t))}),Bv=e=>(0,Fr.js2xml)(Go(e),{attributeValueFn:t=>String(t).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;")}),U0=(function(){var e=ot(function*({data:t}){let r=t instanceof ct.default?t:yield ct.default.loadAsync(t),n=new Set;for(let[i,o]of Object.entries(r.files))if(!(!i.endsWith(".xml")&&!i.endsWith(".rels"))&&i.startsWith("word/")&&!i.endsWith(".xml.rels")){let a=mt(yield o.async("text"));[...Mo(a).map(s=>s.text),...vi(a).flatMap(({properties:s})=>Ro(s))].forEach(s=>Uv(s).forEach(u=>n.add(u)))}return Array.from(n)});return function(r){return e.apply(this,arguments)}})(),Uv=e=>{var t;let r=new RegExp("(?<=\\{\\{).+?(?=\\}\\})","gs");return(t=e.match(r))!==null&&t!==void 0?t:[]};export{Ki as AbstractNumbering,Me as AlignmentType,mw as AnnotationReference,Ne as Attributes,Qt as BaseXmlComponent,Ks as Body,Ds as Bookmark,Ms as BookmarkEnd,Fs as BookmarkStart,wu as Border,Zn as BorderStyle,ae as BuilderElement,bw as CarriageReturn,Af as CellMerge,Sf as CellMergeAttributes,Dw as CharacterSet,L0 as CheckBox,vn as CheckBoxSymbolElement,bm as CheckBoxUtil,x0 as Column,kw as ColumnBreak,Li as Comment,aw as CommentRangeEnd,iw as CommentRangeStart,sw as CommentReference,Yh as Comments,ed as CommentsExtended,id as CommentsIds,ur as ConcreteHyperlink,Vi as ConcreteNumbering,gw as ContinuationSeparator,dw as DayLong,uw as DayShort,Tf as DeletedTableCell,Ef as DeletedTableRow,f0 as DeletedTextRun,I0 as Document,Dn as DocumentAttributeNamespaces,Vr as DocumentAttributes,np as DocumentBackground,T0 as DocumentBackgroundAttributes,om as DocumentDefaults,r0 as DocumentGridType,ri as Drawing,M0 as DrawingPatch,Lw as DropCapType,el as EMPTY_OBJECT,Ga as EmphasisMarkType,Ie as EmptyElement,ym as EndnoteIdReference,a0 as EndnotePosition,ad as EndnoteReference,D0 as EndnoteReferenceRun,gm as EndnoteReferenceRunAttributes,ao as Endnotes,Ps as ExternalHyperlink,I0 as File,$r as FileChild,vm as FootNoteReferenceRunAttributes,oo as FootNotes,O0 as Footer,fp as FooterWrapper,i0 as FootnotePosition,wm as FootnoteReference,vw as FootnoteReferenceElement,P0 as FootnoteReferenceRun,Fw as FrameAnchorType,Mw as FrameWrap,Nf as GridSpan,N0 as Header,Nt as HeaderFooterReferenceType,Bi as HeaderFooterType,bp as HeaderWrapper,Iw as HeadingLevel,_0 as HeightRule,qv as HighlightColor,Gv as HorizontalPositionAlign,rc as HorizontalPositionRelativeFrom,Yr as HpsMeasureElement,Nw as HyperlinkType,ht as IgnoreIfEmptyXmlComponent,Qv as ImageRun,Zl as ImportedRootElementAttributes,Yl as ImportedXmlComponent,Pa as InitializableXmlComponent,xf as InsertedTableCell,_f as InsertedTableRow,d0 as InsertedTextRun,Os as InternalHyperlink,_w as LastRenderedPageBreak,Rw as LeaderType,Ip as Level,uo as LevelBase,A0 as LevelForOverride,nt as LevelFormat,Dp as LevelOverride,S0 as LevelSuffix,n0 as LineNumberRestartFormat,Dt as LineRuleType,Bw as Math,e0 as MathAngledBrackets,Qw as MathCurlyBrackets,Wd as MathDegree,Nd as MathDenominator,Hw as MathFraction,Yw as MathFunction,zd as MathFunctionName,Kd as MathFunctionProperties,jw as MathIntegral,js as MathLimit,$w as MathLimitLower,Gw as MathLimitUpper,Od as MathNumerator,qw as MathPreSubSuperScript,Xw as MathRadical,$d as MathRadicalProperties,Zw as MathRoundBrackets,Uw as MathRun,Jw as MathSquareBrackets,Kw as MathSubScript,Vw as MathSubSuperScript,Ww as MathSum,zw as MathSuperScript,lo as Media,fw as MonthLong,cw as MonthShort,Or as NextAttributeComponent,ow as NoBreakHyphen,Jv as NonVisualDrawingProperties,s0 as NoteNumberRestart,zv as NumberFormat,tn as NumberProperties,Zt as NumberValueElement,Pw as NumberedItemReference,Ow as NumberedItemReferenceFormat,Mp as Numbering,he as OnOffElement,y0 as OverlapType,k0 as PackagePart,Gm as Packer,o0 as PageBorderDisplay,l0 as PageBorderOffsetFrom,u0 as PageBorderZOrder,rf as PageBorders,Aw as PageBreak,od as PageBreakBefore,yt as PageNumber,yw as PageNumberElement,af as PageNumberSeparator,Rr as PageOrientation,yd as PageReference,uf as PageTextDirection,c0 as PageTextDirectionType,Ce as Paragraph,xt as ParagraphProperties,Mi as ParagraphPropertiesChange,am as ParagraphPropertiesDefaults,Fu as ParagraphRunProperties,Be as PatchType,Sw as PositionalTab,Ew as PositionalTabAlignment,Tw as PositionalTabLeader,xw as PositionalTabRelativeTo,jm as PrettifyType,w0 as RelativeHorizontalPosition,g0 as RelativeVerticalPosition,xe as Run,st as RunProperties,Mu as RunPropertiesChange,sm as RunPropertiesDefaults,Zv as SchemeColor,Nn as SectionProperties,hf as SectionPropertiesChange,h0 as SectionType,ww as Separator,rw as SequentialIdentifier,Au as ShadingType,fs as SimpleField,nw as SimpleMailMergeField,lw as SoftHyphen,De as SpaceType,wt as StringContainer,jv as StringEnumValueElement,at as StringValueElement,Bt as StyleForCharacter,Mt as StyleForParagraph,C0 as StyleLevel,hn as Styles,Uu as SymbolRun,Df as TDirection,ci as Tab,Cw as TabStopPosition,Fi as TabStopType,E0 as Table,v0 as TableAnchorType,Js as TableBorders,On as TableCell,Rf as TableCellBorders,b0 as TableLayoutType,R0 as TableOfContents,di as TableProperties,$f as TableRow,eo as TableRowProperties,Gf as TableRowPropertiesChange,m0 as TextDirection,Vv as TextEffect,Pt as TextRun,is as TextWrappingSide,$t as TextWrappingType,F0 as Textbox,gu as ThematicBreak,pm as Theme,Ka as UnderlineType,t0 as VerticalAlign,Yd as VerticalAlignSection,Xd as VerticalAlignTable,Yv as VerticalAnchor,ji as VerticalMerge,p0 as VerticalMergeRevisionType,Ys as VerticalMergeType,$v as VerticalPositionAlign,nc as VerticalPositionRelativeFrom,it as WidthType,tw as WpgGroupRun,ew as WpsShapeRun,me as XmlAttributeComponent,ee as XmlComponent,pw as YearLong,hw as YearShort,Yu as abstractNumUniqueNumericIdGen,Ya as bookmarkUniqueNumericId,ec as bookmarkUniqueNumericIdGen,Xh as commentIdToParaId,Zu as concreteNumUniqueNumericIdGen,He as convertInchesToTwip,Xv as convertMillimetersToTwip,Kn as convertToXmlComponent,Ma as createAlignment,oc as createBodyProperties,be as createBorderElement,Zd as createColumns,Jd as createDocumentGrid,Kv as createDotEmphasisMark,$a as createEmphasisMark,tf as createEndnoteProperties,ef as createFootnoteProperties,Ad as createFrameProperties,on as createHeaderFooterReference,ac as createHorizontalPosition,yu as createIndent,Qd as createLineNumberType,Pd as createMathAccentCharacter,Fe as createMathBase,Dd as createMathLimitLocation,Hs as createMathNAryProperties,Hd as createMathPreSubSuperScriptProperties,cr as createMathSubScriptElement,Bd as createMathSubScriptProperties,Ud as createMathSubSuperScriptProperties,hr as createMathSuperScriptElement,Md as createMathSuperScriptProperties,wd as createOutlineLevel,nf as createPageMargin,sf as createPageNumberType,of as createPageSize,Xt as createParagraphStyle,Zr as createRunFonts,cf as createSectionType,Wr as createShading,ic as createSimplePos,ld as createSpacing,jt as createStringElement,cd as createTabStop,ud as createTabStopItem,Ff as createTableFloatProperties,Mf as createTableLayout,Uf as createTableLook,jf as createTableRowHeight,rr as createTableWidthElement,ds as createTransformation,Lu as createUnderline,Gs as createVerticalAlign,sc as createVerticalPosition,Tm as createVmlShape,Ni as createWrapNone,Kc as createWrapSquare,Xc as createWrapThrough,qc as createWrapTight,Yc as createWrapTopAndBottom,iu as dateTimeValue,Te as decimalNumber,Qu as docPropertiesUniqueNumericId,Ju as docPropertiesUniqueNumericIdGen,ru as eighthPointMeasureValue,bt as encodeUtf8,zh as fillPageNumbers,lr as fillPartPageNumbers,$h as fillSequenceNumbers,Ii as hashedId,La as hexColorValue,eu as hpsMeasureValue,Hv as longHexNumber,Fa as measurementOrPercentValue,U0 as patchDetector,B0 as patchDocument,tu as percentageValue,nu as pointMeasureValue,Da as positiveUniversalMeasureValue,Ve as sectionMarginDefaults,xr as sectionPageSizeDefaults,Jl as shortHexNumber,Wv as signedHpsMeasureValue,Xe as signedTwipsMeasureValue,ah as standardizeData,Se as twipsMeasureValue,xi as uCharHexNumber,Tt as uniqueId,jr as uniqueNumericIdCreator,tc as uniqueUuid,Rt as universalMeasureToTwips,Ur as universalMeasureValue,Mr as unsignedDecimalNumber};