import{w as writable,d as derived}from"./index.dfa28cb8.js";import{_ as __vitePreload}from"./preload-helper.41c905a7.js";import{a1 as get_store_value}from"./index.787ce9b5.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(e,t)=>{loadingStateStore.set({loading:!0,message:e});const r=await t;return loadingStateStore.set({loading:!1}),r};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){if(this instanceof o){var n=[null];n.push.apply(n,arguments);var a=Function.bind.apply(t,n);return new a}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),r}var bundle={};(function(exports){(()=>{var __webpack_modules__={607:(module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});var serializer_1=__webpack_require__(810),deserializer_1=__webpack_require__(496),Module;typeof process<"u"&&process.release&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function e(){}return e.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},e.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),e.originRequire=Module.prototype.require,Module.prototype.require=function(){var t=e.originRequire.apply(this,arguments),r=t.name;return e.requiredClasses[r]||(e.requiredClasses[r]=t),t})},e.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=e.originRequire,this.isRequireIntercepted=!1},e.isInterceptingRequire=function(){return this.isRequireIntercepted},e.getRequiredClasses=function(){return this.requiredClasses},e.clearRequiredClasses=function(){this.requiredClasses={}},e.registerClass=function(t){this.registeredClasses.push(t)},e.registerClasses=function(t){this.registeredClasses=this.registeredClasses.concat(t)},e.clearRegisteredClasses=function(){this.registeredClasses=[]},e.serialize=function(t,r){return r===void 0&&(r={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(t,r))},e.deserialize=function(t,r,o){return r===void 0&&(r=[]),o===void 0&&(o={}),deserializer_1.deserializeFromParsedObj(JSON.parse(t),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(r),o)},e.originRequire=null,e.isRequireIntercepted=!1,e.requiredClasses={},e.registeredClasses=[],e}();module.exports=ESSerializer},917:function(e,t){var r=this&&this.__spreadArrays||function(){for(var L=0,P=0,U=arguments.length;P{Object.defineProperty(t,"__esModule",{value:!0}),t.isClass=t.notObject=t.getValueFromToStringResult=void 0,t.notObject=function(r){return r===null||typeof r!="object"},t.getValueFromToStringResult=function(r){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},t.isClass=function(r){if(function(o){return[Date].indexOf(o)>=0}(r))return!0;try{Reflect.construct(String,[],r)}catch{return!1}return!0}},810:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializeValueWithClassName=void 0;var o=r(917),n=r(821);function a(l,h){h===void 0&&(h={});var c=function(f){var d,m,C;return f===void 0?((d={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_UNDEFINED,d):typeof f!="number"||isFinite(f)?typeof f=="bigint"?((C={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_BIG_INT,C[o.TO_STRING_FIELD]=f.toString(),C):n.notObject(f)?f:o.ESSERIALIZER_NULL:((m={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_NOT_FINITE,m[o.TO_STRING_FIELD]=f.toString(),m)}(l);if(c!==o.ESSERIALIZER_NULL)return c;if(Array.isArray(l))return s(l);var u={};if(!function(f){var d=f.__proto__.constructor.name;return o.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(d)}(l)){if(h.ignoreProperties&&h.ignoreProperties.forEach(function(f){delete l[f]}),h.interceptProperties)for(var g in h.interceptProperties)l[g]=h.interceptProperties[g].call(l,l[g]);(function(f,d){for(var m in f)typeof f[m]!="function"&&(d[m]=a(f[m]))})(l,u)}return function(f,d){var m=f.__proto__.constructor.name;return m==="Object"&&(m=f.constructor.name),m!=="Object"&&(d[o.CLASS_NAME_FIELD]=m,m===o.BUILTIN_CLASS_ARRAYBUFFER||m===o.BUILTIN_CLASS_SHAREDARRAYBUFFER?d[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(f))):m===o.BUILTIN_CLASS_BOOLEAN?d[o.BOOLEAN_FIELD]=f.valueOf():m===o.BUILTIN_CLASS_DATAVIEW?d[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(f.buffer))):m===o.BUILTIN_CLASS_DATE?d[o.TIMESTAMP_FIELD]=f.getTime():m===o.BUILTIN_CLASS_INTL_LOCALE||m===o.BUILTIN_CLASS_REGEXP?d[o.TO_STRING_FIELD]=f.toString():m===o.BUILTIN_CLASS_SET?d[o.ARRAY_FIELD]=s(Array.from(f)):m===o.BUILTIN_CLASS_STRING?d[o.TO_STRING_FIELD]=f.toString():o.ALL_BUILTIN_ARRAYS.includes(m)?d[o.ARRAY_FIELD]=s(Array.from(f)):o.ALL_BUILTIN_ERRORS.includes(m)?function(C,v,b){C.name!=="Error"&&(v.name=C.name),C.message&&(v.message=C.message),C.stack&&(v.stack=C.stack),b===o.BUILTIN_CLASS_AGGREGATE_ERROR&&(v.errors=a(C.errors))}(f,d,m):o.ALL_BUILTIN_INTLS.includes(m)&&(d[o.OPTIONS_FIELD]=f.resolvedOptions())),d}(l,u)}function s(l){return l.map(function(h){return a(h)})}t.getSerializeValueWithClassName=a}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(t!==void 0)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__(607),__webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})()})(bundle);const ESSerializer=getDefaultExportFromCjs(bundle),alreadyWarnFor=[],warnStorageNotFound=e=>{const t=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(e)&&!t){let r=`Unable to find the ${e}. No data will be persisted.`;typeof window>"u"&&(r+=` Are you running on a server? Most of storages are not available while running on a server.`),console.warn(r),alreadyWarnFor.push(e)}},serialize$1=e=>ESSerializer.serialize(e),deserialize=e=>{if(e!=="undefined"){if(e!=null){try{return ESSerializer.deserialize(e)}catch{}try{return JSON.parse(e)}catch{}}return e}};function persist(e,t,r){const o=t.getValue(r);return o!==null&&e.set(o),"addListener"in t&&t.addListener(r,n=>{e.set(n)}),e.subscribe(n=>{t.setValue(r,n)}),{...e,delete(){t.deleteValue(r)}}}function getBrowserStorage(e,t=!1){const r=[],o=s=>{const l=s.key;if(s.storageArea===e)for(const{listener:h}of r.filter(({key:c})=>c===l))h(deserialize(s.newValue))},n=()=>{t&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",o)},a=()=>{t&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",o)};return{addListener(s,l){r.push({key:s,listener:l}),r.length===1&&n()},removeListener(s,l){const h=r.indexOf({key:s,listener:l});h!==-1&&r.splice(h,1),r.length===0&&a()},getValue(s){const l=e.getItem(s);return deserialize(l)},deleteValue(s){e.removeItem(s)},setValue(s,l){e.setItem(s,serialize$1(l))}}}function localStorage(e=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,e):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}let analytics;const initAnalytics=async()=>{if(!analytics)try{const[{Analytics:e},{default:t}]=await Promise.all([__vitePreload(()=>import("./analytics.browser.es.3fafad63.js"),[],import.meta.url),__vitePreload(()=>import("./plausible.103ebb93.js").then(r=>r.p),[],import.meta.url)]);analytics=e({app:"mermaid-live-editor",plugins:[t({domain:"mermaid.live",hashMode:!1,trackLocalhost:!1,apiHost:"https://plausible.io"})]})}catch(e){console.log(e),console.info("Analytics blocked ;)")}},detectType$1=e=>{const t=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram"],r=e.replace(/^\s*%%.*\n/g,` `).trimStart().split(" ")[0].toLowerCase();return t.find(n=>r.includes(n.toLowerCase()))},countLines=e=>{var t;return(((t=e.match(/\n/g))==null?void 0:t.length)??0)+1},saveStatistics=e=>{const t=detectType$1(e);if(!t)return;const r=countLines(e);logEvent("render",{graphType:t,length:r})},minutesToMilliSeconds=e=>e*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay},timeouts=new Map,logEvent=(e,t)=>{if(!analytics)return;const r=t?JSON.stringify({name:e,data:t}):e;timeouts.has(r)?clearTimeout(timeouts.get(r)):analytics.track(e,t),timeouts.set(r,window.setTimeout(()=>timeouts.delete(r),delaysPerEvent[e]))};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(e){let t=e.length;for(;--t>=0;)e[t]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([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]),extra_dbits=new Uint8Array([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]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(e,t,r,o,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=o,this.max_length=n,this.has_stree=e&&e.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const d_code=e=>e<256?_dist_code[e]:_dist_code[256+(e>>>7)],put_short=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},send_bits=(e,t,r)=>{e.bi_valid>Buf_size-r?(e.bi_buf|=t<>Buf_size-e.bi_valid,e.bi_valid+=r-Buf_size):(e.bi_buf|=t<{send_bits(e,r[t*2],r[t*2+1])},bi_reverse=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},bi_flush=e=>{e.bi_valid===16?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},gen_bitlen=(e,t)=>{const r=t.dyn_tree,o=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,h=t.stat_desc.max_length;let c,u,g,f,d,m,C=0;for(f=0;f<=MAX_BITS$1;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;ch&&(f=h,C++),r[u*2+1]=f,!(u>o)&&(e.bl_count[f]++,d=0,u>=l&&(d=s[u-l]),m=r[u*2],e.opt_len+=m*(f+d),a&&(e.static_len+=m*(n[u*2+1]+d)));if(C!==0){do{for(f=h-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[h]--,C-=2}while(C>0);for(f=h;f!==0;f--)for(u=e.bl_count[f];u!==0;)g=e.heap[--c],!(g>o)&&(r[g*2+1]!==f&&(e.opt_len+=(f-r[g*2+1])*r[g*2],r[g*2+1]=f),u--)}},gen_codes=(e,t,r)=>{const o=new Array(MAX_BITS$1+1);let n=0,a,s;for(a=1;a<=MAX_BITS$1;a++)n=n+r[a-1]<<1,o[a]=n;for(s=0;s<=t;s++){let l=e[s*2+1];l!==0&&(e[s*2]=bi_reverse(o[l]++,l))}},tr_static_init=()=>{let e,t,r,o,n;const a=new Array(MAX_BITS$1+1);for(r=0,o=0;o>=7;o{let t;for(t=0;t{e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},smaller=(e,t,r,o)=>{const n=t*2,a=r*2;return e[n]{const o=e.heap[r];let n=r<<1;for(;n<=e.heap_len&&(n{let o,n,a=0,s,l;if(e.sym_next!==0)do o=e.pending_buf[e.sym_buf+a++]&255,o+=(e.pending_buf[e.sym_buf+a++]&255)<<8,n=e.pending_buf[e.sym_buf+a++],o===0?send_code(e,n,t):(s=_length_code[n],send_code(e,s+LITERALS$1+1,t),l=extra_lbits[s],l!==0&&(n-=base_length[s],send_bits(e,n,l)),o--,s=d_code(o),send_code(e,s,r),l=extra_dbits[s],l!==0&&(o-=base_dist[s],send_bits(e,o,l)));while(a{const r=t.dyn_tree,o=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems;let s,l,h=-1,c;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,s=0;s>1;s>=1;s--)pqdownheap(e,r,s);c=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,r[c*2]=r[s*2]+r[l*2],e.depth[c]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,r[s*2+1]=r[l*2+1]=c,e.heap[1]=c++,pqdownheap(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,t),gen_codes(r,h,e.bl_count)},scan_tree=(e,t,r)=>{let o,n=-1,a,s=t[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),t[(r+1)*2+1]=65535,o=0;o<=r;o++)a=s,s=t[(o+1)*2+1],!(++l{let o,n=-1,a,s=t[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),o=0;o<=r;o++)if(a=s,s=t[(o+1)*2+1],!(++l{let t;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),t=BL_CODES$1-1;t>=3&&e.bl_tree[bl_order[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},send_all_trees=(e,t,r,o)=>{let n;for(send_bits(e,t-257,5),send_bits(e,r-1,5),send_bits(e,o-4,4),n=0;n{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Z_BINARY;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Z_TEXT;for(r=32;r{static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)},_tr_stored_block$1=(e,t,r,o)=>{send_bits(e,(STORED_BLOCK<<1)+(o?1:0),3),bi_windup(e),put_short(e,r),put_short(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},_tr_align$1=e=>{send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)},_tr_flush_block$1=(e,t,r,o)=>{let n,a,s=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),s=build_bl_tree(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?_tr_stored_block$1(e,t,r,o):e.strategy===Z_FIXED$1||a===n?(send_bits(e,(STATIC_TREES<<1)+(o?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(o?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),o&&bi_windup(e)},_tr_tally$1=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(_length_code[r]+LITERALS$1+1)*2]++,e.dyn_dtree[d_code(t)*2]++),e.sym_next===e.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(e,t,r,o)=>{let n=e&65535|0,a=e>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do n=n+t[o++]|0,a=a+n|0;while(--s);n%=65521,a%=65521}return n|a<<16|0};var adler32_1=adler32;const makeTable=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var o=0;o<8;o++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},crcTable=new Uint32Array(makeTable()),crc32=(e,t,r,o)=>{const n=crcTable,a=o+r;e^=-1;for(let s=o;s>>8^n[(e^t[s])&255];return e^-1};var crc32_1=crc32,messages={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"},constants$2={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_MEM_ERROR:-4,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};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(e,t)=>(e.msg=messages[t],t),rank=e=>e*2-(e>4?9:0),zero$2=e=>{let t=e.length;for(;--t>=0;)e[t]=0},slide_hash=e=>{let t,r,o,n=e.w_size;t=e.hash_size,o=t;do r=e.head[--o],e.head[o]=r>=n?r-n:0;while(--t);t=n,o=t;do r=e.prev[--o],e.prev[o]=r>=n?r-n:0;while(--t)};let HASH_ZLIB=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},flush_block_only=(e,t)=>{_tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,flush_pending(e.strm)},put_byte=(e,t)=>{e.pending_buf[e.pending++]=t},putShortMSB=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},read_buf=(e,t,r,o)=>{let n=e.avail_in;return n>o&&(n=o),n===0?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),r),e.state.wrap===1?e.adler=adler32_1(e.adler,t,n,r):e.state.wrap===2&&(e.adler=crc32_1(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)},longest_match=(e,t)=>{let r=e.max_chain_length,o=e.strstart,n,a,s=e.prev_length,l=e.nice_match;const h=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,c=e.window,u=e.w_mask,g=e.prev,f=e.strstart+MAX_MATCH;let d=c[o+s-1],m=c[o+s];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do if(n=t,!(c[n+s]!==m||c[n+s-1]!==d||c[n]!==c[o]||c[++n]!==c[o+1])){o+=2,n++;do;while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&os){if(e.match_start=t,s=a,a>=l)break;d=c[o+s-1],m=c[o+s]}}while((t=g[t&u])>h&&--r!==0);return s<=e.lookahead?s:e.lookahead},fill_window=e=>{const t=e.w_size;let r,o,n;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-MIN_LOOKAHEAD)&&(e.window.set(e.window.subarray(t,t+t-o),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),slide_hash(e),o+=t),e.strm.avail_in===0)break;if(r=read_buf(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=MIN_MATCH)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=HASH(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=HASH(e,e.ins_h,e.window[n+MIN_MATCH-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o,n,a,s=0,l=e.strm.avail_in;do{if(o=65535,a=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(o=n+e.strm.avail_in),o>a&&(o=a),o>8,e.pending_buf[e.pending-2]=~o,e.pending_buf[e.pending-1]=~o>>8,flush_pending(e.strm),n&&(n>o&&(n=o),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,o-=n),o&&(read_buf(e.strm,e.strm.output,e.strm.next_out,o),e.strm.next_out+=o,e.strm.avail_out-=o,e.strm.total_out+=o)}while(s===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watera&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(read_buf(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,n=e.strstart-e.block_start,(n>=r||(n||t===Z_FINISH$3)&&t!==Z_NO_FLUSH$2&&e.strm.avail_in===0&&n<=a)&&(o=n>a?a:n,s=t===Z_FINISH$3&&e.strm.avail_in===0&&o===n?1:0,_tr_stored_block(e,e.block_start,o,s),e.block_start+=o,flush_pending(e.strm)),s?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(e,t)=>{let r,o;for(;;){if(e.lookahead=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r)),e.match_length>=MIN_MATCH)if(o=_tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do e.strstart++,e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+1]);else o=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(o&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=e.strstart{let r,o,n;for(;;){if(e.lookahead=MIN_MATCH&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,r!==0&&e.prev_length4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-MIN_MATCH,o=_tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=HASH(e,e.ins_h,e.window[e.strstart+MIN_MATCH-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,o&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}else if(e.match_available){if(o=_tr_tally(e,0,e.window[e.strstart-1]),o&&flush_block_only(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(o=_tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let r,o,n,a;const s=e.window;for(;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&t===Z_NO_FLUSH$2)return BS_NEED_MORE;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(n=e.strstart-1,o=s[n],o===s[++n]&&o===s[++n]&&o===s[++n])){a=e.strstart+MAX_MATCH;do;while(o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&ne.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(r=_tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(fill_window(e),e.lookahead===0)){if(t===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(e.match_length=0,r=_tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(flush_block_only(e,!1),e.strm.avail_out===0))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$3?(flush_block_only(e,!0),e.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):e.sym_next&&(flush_block_only(e,!1),e.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(e,t,r,o,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=o,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=e=>{e.window_size=2*e.w_size,zero$2(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0};function DeflateState(){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=Z_DEFLATED$2,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 Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero$2(this.dyn_ltree),zero$2(this.dyn_dtree),zero$2(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero$2(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero$2(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==INIT_STATE&&t.status!==GZIP_STATE&&t.status!==EXTRA_STATE&&t.status!==NAME_STATE&&t.status!==COMMENT_STATE&&t.status!==HCRC_STATE&&t.status!==BUSY_STATE&&t.status!==FINISH_STATE?1:0},deflateResetKeep=e=>{if(deflateStateCheck(e))return err(e,Z_STREAM_ERROR$2);e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?GZIP_STATE:t.wrap?INIT_STATE:BUSY_STATE,e.adler=t.wrap===2?0:1,t.last_flush=-2,_tr_init(t),Z_OK$3},deflateReset=e=>{const t=deflateResetKeep(e);return t===Z_OK$3&&lm_init(e.state),t},deflateSetHeader=(e,t)=>deflateStateCheck(e)||e.state.wrap!==2?Z_STREAM_ERROR$2:(e.state.gzhead=t,Z_OK$3),deflateInit2=(e,t,r,o,n,a)=>{if(!e)return Z_STREAM_ERROR$2;let s=1;if(t===Z_DEFAULT_COMPRESSION$1&&(t=6),o<0?(s=0,o=-o):o>15&&(s=2,o-=16),n<1||n>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||o<8||o>15||t<0||t>9||a<0||a>Z_FIXED||o===8&&s!==1)return err(e,Z_STREAM_ERROR$2);o===8&&(o=9);const l=new DeflateState;return e.state=l,l.strm=e,l.status=INIT_STATE,l.wrap=s,l.gzhead=null,l.w_bits=o,l.w_size=1<deflateInit2(e,t,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(e,t)=>{if(deflateStateCheck(e)||t>Z_BLOCK$1||t<0)return e?err(e,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===FINISH_STATE&&t!==Z_FINISH$3)return err(e,e.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const o=r.last_flush;if(r.last_flush=t,r.pending!==0){if(flush_pending(e),e.avail_out===0)return r.last_flush=-1,Z_OK$3}else if(e.avail_in===0&&rank(t)<=rank(o)&&t!==Z_FINISH$3)return err(e,Z_BUF_ERROR$1);if(r.status===FINISH_STATE&&e.avail_in!==0)return err(e,Z_BUF_ERROR$1);if(r.status===INIT_STATE&&r.wrap===0&&(r.status=BUSY_STATE),r.status===INIT_STATE){let n=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,a=-1;if(r.strategy>=Z_HUFFMAN_ONLY||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,n|=a<<6,r.strstart!==0&&(n|=PRESET_DICT),n+=31-n%31,putShortMSB(r,n),r.strstart!==0&&(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),e.adler=1,r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===GZIP_STATE){if(e.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead)put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,r.gzhead.time&255),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,r.gzhead.extra.length&255),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE;else if(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===EXTRA_STATE){if(r.gzhead.extra){let n=r.pending,a=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+a>r.pending_buf_size;){let l=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+l),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>n&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex+=l,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0,a-=l}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+a),r.pending),r.pending+=a,r.gzhead.hcrc&&r.pending>n&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=NAME_STATE}if(r.status===NAME_STATE){if(r.gzhead.name){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n)),flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindexn&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=COMMENT_STATE}if(r.status===COMMENT_STATE){if(r.gzhead.comment){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n)),flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindexn&&(e.adler=crc32_1(e.adler,r.pending_buf,r.pending-n,n))}r.status=HCRC_STATE}if(r.status===HCRC_STATE){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(flush_pending(e),r.pending!==0))return r.last_flush=-1,Z_OK$3;put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),e.adler=0}if(r.status=BUSY_STATE,flush_pending(e),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(e.avail_in!==0||r.lookahead!==0||t!==Z_NO_FLUSH$2&&r.status!==FINISH_STATE){let n=r.level===0?deflate_stored(r,t):r.strategy===Z_HUFFMAN_ONLY?deflate_huff(r,t):r.strategy===Z_RLE?deflate_rle(r,t):configuration_table[r.level].func(r,t);if((n===BS_FINISH_STARTED||n===BS_FINISH_DONE)&&(r.status=FINISH_STATE),n===BS_NEED_MORE||n===BS_FINISH_STARTED)return e.avail_out===0&&(r.last_flush=-1),Z_OK$3;if(n===BS_BLOCK_DONE&&(t===Z_PARTIAL_FLUSH?_tr_align(r):t!==Z_BLOCK$1&&(_tr_stored_block(r,0,0,!1),t===Z_FULL_FLUSH$1&&(zero$2(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(e),e.avail_out===0))return r.last_flush=-1,Z_OK$3}return t!==Z_FINISH$3?Z_OK$3:r.wrap<=0?Z_STREAM_END$3:(r.wrap===2?(put_byte(r,e.adler&255),put_byte(r,e.adler>>8&255),put_byte(r,e.adler>>16&255),put_byte(r,e.adler>>24&255),put_byte(r,e.total_in&255),put_byte(r,e.total_in>>8&255),put_byte(r,e.total_in>>16&255),put_byte(r,e.total_in>>24&255)):(putShortMSB(r,e.adler>>>16),putShortMSB(r,e.adler&65535)),flush_pending(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=e=>{if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const t=e.state.status;return e.state=null,t===BUSY_STATE?err(e,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(e,t)=>{let r=t.length;if(deflateStateCheck(e))return Z_STREAM_ERROR$2;const o=e.state,n=o.wrap;if(n===2||n===1&&o.status!==INIT_STATE||o.lookahead)return Z_STREAM_ERROR$2;if(n===1&&(e.adler=adler32_1(e.adler,t,r,0)),o.wrap=0,r>=o.w_size){n===0&&(zero$2(o.head),o.strstart=0,o.block_start=0,o.insert=0);let h=new Uint8Array(o.w_size);h.set(t.subarray(r-o.w_size,r),0),t=h,r=o.w_size}const a=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,fill_window(o);o.lookahead>=MIN_MATCH;){let h=o.strstart,c=o.lookahead-(MIN_MATCH-1);do o.ins_h=HASH(o,o.ins_h,o.window[h+MIN_MATCH-1]),o.prev[h&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=h,h++;while(--c);o.strstart=h,o.lookahead=MIN_MATCH-1,fill_window(o)}return o.strstart+=o.lookahead,o.block_start=o.strstart,o.insert=o.lookahead,o.lookahead=0,o.match_length=o.prev_length=MIN_MATCH-1,o.match_available=0,e.next_in=s,e.input=l,e.avail_in=a,o.wrap=n,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var assign=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const o in r)_has(r,o)&&(e[o]=r[o])}}return e},flattenChunks=e=>{let t=0;for(let o=0,n=e.length;o=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,o,n,a,s=e.length,l=0;for(n=0;n>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};const buf2binstring=(e,t)=>{if(t<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let o=0;o{const r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let o,n;const a=new Array(r*2);for(n=0,o=0;o4){a[n++]=65533,o+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&o1){a[n++]=65533;continue}s<65536?a[n++]=s:(s-=65536,a[n++]=55296|s>>10&1023,a[n++]=56320|s&1023)}return buf2binstring(a,n)},utf8border=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+_utf8len[e[r]]>t?r:t},strings={string2buf,buf2string,utf8border};function ZStream(){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}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(e){this.options=common$2.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=deflate_1$2.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Z_OK$2)throw new Error(messages[r]);if(t.header&&deflate_1$2.deflateSetHeader(this.strm,t.header),t.dictionary){let o;if(typeof t.dictionary=="string"?o=strings.string2buf(t.dictionary):toString$1.call(t.dictionary)==="[object ArrayBuffer]"?o=new Uint8Array(t.dictionary):o=t.dictionary,r=deflate_1$2.deflateSetDictionary(this.strm,o),r!==Z_OK$2)throw new Error(messages[r]);this._dict_set=!0}}Deflate$1.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize;let n,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof e=="string"?r.input=strings.string2buf(e):toString$1.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(a===Z_SYNC_FLUSH||a===Z_FULL_FLUSH)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(n=deflate_1$2.deflate(r,a),n===Z_STREAM_END$2)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(e){this.chunks.push(e)};Deflate$1.prototype.onEnd=function(e){e===Z_OK$2&&(this.result=common$2.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function deflate$1(e,t){const r=new Deflate$1(t);if(r.push(e,!0),r.err)throw r.msg||messages[r.err];return r.result}function deflateRaw$1(e,t){return t=t||{},t.raw=!0,deflate$1(e,t)}function gzip$1(e,t){return t=t||{},t.gzip=!0,deflate$1(e,t)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function e(t,r){let o,n,a,s,l,h,c,u,g,f,d,m,C,v,b,y,S,w,R,F,x,N,T,A;const D=t.state;o=t.next_in,T=t.input,n=o+(t.avail_in-5),a=t.next_out,A=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),h=D.dmax,c=D.wsize,u=D.whave,g=D.wnext,f=D.window,d=D.hold,m=D.bits,C=D.lencode,v=D.distcode,b=(1<>>24,d>>>=w,m-=w,w=S>>>16&255,w===0)A[a++]=S&65535;else if(w&16){R=S&65535,w&=15,w&&(m>>=w,m-=w),m<15&&(d+=T[o++]<>>24,d>>>=w,m-=w,w=S>>>16&255,w&16){if(F=S&65535,w&=15,mh){t.msg="invalid distance too far back",D.mode=BAD$1;break e}if(d>>>=w,m-=w,w=a-s,F>w){if(w=F-w,w>u&&D.sane){t.msg="invalid distance too far back",D.mode=BAD$1;break e}if(x=0,N=f,g===0){if(x+=c-w,w2;)A[a++]=N[x++],A[a++]=N[x++],A[a++]=N[x++],R-=3;R&&(A[a++]=N[x++],R>1&&(A[a++]=N[x++]))}else{x=a-F;do A[a++]=A[x++],A[a++]=A[x++],A[a++]=A[x++],R-=3;while(R>2);R&&(A[a++]=A[x++],R>1&&(A[a++]=A[x++]))}}else if(w&64){t.msg="invalid distance code",D.mode=BAD$1;break e}else{S=v[(S&65535)+(d&(1<>3,o-=R,m-=R<<3,d&=(1<{const h=l.bits;let c=0,u=0,g=0,f=0,d=0,m=0,C=0,v=0,b=0,y=0,S,w,R,F,x,N=null,T;const A=new Uint16Array(MAXBITS+1),D=new Uint16Array(MAXBITS+1);let z=null,I,E,$;for(c=0;c<=MAXBITS;c++)A[c]=0;for(u=0;u=1&&A[f]===0;f--);if(d>f&&(d=f),f===0)return n[a++]=1<<24|64<<16|0,n[a++]=1<<24|64<<16|0,l.bits=1,0;for(g=1;g0&&(e===CODES$1||f!==1))return-1;for(D[1]=0,c=1;cENOUGH_LENS$1||e===DISTS$1&&b>ENOUGH_DISTS$1)return 1;for(;;){I=c-C,s[u]+1=T?(E=z[s[u]-T],$=N[s[u]-T]):(E=32+64,$=0),S=1<>C)+w]=I<<24|E<<16|$|0;while(w!==0);for(S=1<>=1;if(S!==0?(y&=S-1,y+=S):y=0,u++,--A[c]===0){if(c===f)break;c=t[r+s[u]]}if(c>d&&(y&F)!==R){for(C===0&&(C=d),x+=g,m=c-C,v=1<ENOUGH_LENS$1||e===DISTS$1&&b>ENOUGH_DISTS$1)return 1;R=y&F,n[R]=d<<24|m<<16|x-a|0}}return y!==0&&(n[x+y]=c-C<<24|64<<16|0),l.bits=d,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT$1=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE$2=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.modeSYNC?1:0},inflateResetKeep=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=HEAD,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ENOUGH_LENS),t.distcode=t.distdyn=new Int32Array(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK$1},inflateReset=e=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)},inflateReset2=(e,t)=>{let r;if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const o=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR$1:(o.window!==null&&o.wbits!==t&&(o.window=null),o.wrap=r,o.wbits=t,inflateReset(e))},inflateInit2=(e,t)=>{if(!e)return Z_STREAM_ERROR$1;const r=new InflateState;e.state=r,r.strm=e,r.window=null,r.mode=HEAD;const o=inflateReset2(e,t);return o!==Z_OK$1&&(e.state=null),o},inflateInit=e=>inflateInit2(e,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=e=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=(e,t,r,o)=>{let n;const a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>o&&(n=o),a.window.set(t.subarray(r-o,r-o+n),a.wnext),o-=n,o?(a.window.set(t.subarray(r-o,r),0),a.wnext=o,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave{let r,o,n,a,s,l,h,c,u,g,f,d,m,C,v=0,b,y,S,w,R,F,x,N;const T=new Uint8Array(4);let A,D;const z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0)return Z_STREAM_ERROR$1;r=e.state,r.mode===TYPE$2&&(r.mode=TYPEDO),s=e.next_out,n=e.output,h=e.avail_out,a=e.next_in,o=e.input,l=e.avail_in,c=r.hold,u=r.bits,g=l,f=h,N=Z_OK$1;e:for(;;)switch(r.mode){case HEAD:if(r.wrap===0){r.mode=TYPEDO;break}for(;u<16;){if(l===0)break e;l--,c+=o[a++]<>>8&255,r.check=crc32_1(r.check,T,2,0),c=0,u=0,r.mode=FLAGS;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((c&15)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(c>>>=4,u-=4,x=(c&15)+8,r.wbits===0&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<>8&1),r.flags&512&&r.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0,r.mode=TIME;case TIME:for(;u<32;){if(l===0)break e;l--,c+=o[a++]<>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=crc32_1(r.check,T,4,0)),c=0,u=0,r.mode=OS;case OS:for(;u<16;){if(l===0)break e;l--,c+=o[a++]<>8),r.flags&512&&r.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0,r.mode=EXLEN;case EXLEN:if(r.flags&1024){for(;u<16;){if(l===0)break e;l--,c+=o[a++]<>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(r.flags&1024&&(d=r.length,d>l&&(d=l),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(o.subarray(a,a+d),x)),r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,o,d,a)),l-=d,a+=d,r.length-=d),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(r.flags&2048){if(l===0)break e;d=0;do x=o[a+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x));while(x&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE$2;break;case DICTID:for(;u<32;){if(l===0)break e;l--,c+=o[a++]<>>=u&7,u-=u&7,r.mode=CHECK;break}for(;u<3;){if(l===0)break e;l--,c+=o[a++]<>>=1,u-=1,c&3){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){c>>>=2,u-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}c>>>=2,u-=2;break;case STORED:for(c>>>=u&7,u-=u&7;u<32;){if(l===0)break e;l--,c+=o[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=c&65535,c=0,u=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(d=r.length,d){if(d>l&&(d=l),d>h&&(d=h),d===0)break e;n.set(o.subarray(a,a+d),s),l-=d,a+=d,h-=d,s+=d,r.length-=d;break}r.mode=TYPE$2;break;case TABLE:for(;u<14;){if(l===0)break e;l--,c+=o[a++]<>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},N=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,N){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have>>24,y=v>>>16&255,S=v&65535,!(b<=u);){if(l===0)break e;l--,c+=o[a++]<>>=b,u-=b,r.lens[r.have++]=S;else{if(S===16){for(D=b+2;u>>=b,u-=b,r.have===0){e.msg="invalid bit length repeat",r.mode=BAD;break}x=r.lens[r.have-1],d=3+(c&3),c>>>=2,u-=2}else if(S===17){for(D=b+3;u>>=b,u-=b,x=0,d=3+(c&7),c>>>=3,u-=3}else{for(D=b+7;u>>=b,u-=b,x=0,d=11+(c&127),c>>>=7,u-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;d--;)r.lens[r.have++]=x}}if(r.mode===BAD)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,A={bits:r.lenbits},N=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,N){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},N=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,N){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(l>=6&&h>=258){e.next_out=s,e.avail_out=h,e.next_in=a,e.avail_in=l,r.hold=c,r.bits=u,inffast(e,f),s=e.next_out,n=e.output,h=e.avail_out,a=e.next_in,o=e.input,l=e.avail_in,c=r.hold,u=r.bits,r.mode===TYPE$2&&(r.back=-1);break}for(r.back=0;v=r.lencode[c&(1<>>24,y=v>>>16&255,S=v&65535,!(b<=u);){if(l===0)break e;l--,c+=o[a++]<>w)],b=v>>>24,y=v>>>16&255,S=v&65535,!(w+b<=u);){if(l===0)break e;l--,c+=o[a++]<>>=w,u-=w,r.back+=w}if(c>>>=b,u-=b,r.back+=b,r.length=S,y===0){r.mode=LIT;break}if(y&32){r.back=-1,r.mode=TYPE$2;break}if(y&64){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=y&15,r.mode=LENEXT;case LENEXT:if(r.extra){for(D=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;v=r.distcode[c&(1<>>24,y=v>>>16&255,S=v&65535,!(b<=u);){if(l===0)break e;l--,c+=o[a++]<>w)],b=v>>>24,y=v>>>16&255,S=v&65535,!(w+b<=u);){if(l===0)break e;l--,c+=o[a++]<>>=w,u-=w,r.back+=w}if(c>>>=b,u-=b,r.back+=b,y&64){e.msg="invalid distance code",r.mode=BAD;break}r.offset=S,r.extra=y&15,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(D=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(h===0)break e;if(d=f-h,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}d>r.wnext?(d-=r.wnext,m=r.wsize-d):m=r.wnext-d,d>r.length&&(d=r.length),C=r.window}else C=n,m=s-r.offset,d=r.length;d>h&&(d=h),h-=d,r.length-=d;do n[s++]=C[m++];while(--d);r.length===0&&(r.mode=LEN);break;case LIT:if(h===0)break e;n[s++]=r.length,h--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;u<32;){if(l===0)break e;l--,c|=o[a++]<{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;let t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK$1},inflateGetHeader=(e,t)=>{if(inflateStateCheck(e))return Z_STREAM_ERROR$1;const r=e.state;return r.wrap&2?(r.head=t,t.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(e,t)=>{const r=t.length;let o,n,a;return inflateStateCheck(e)||(o=e.state,o.wrap!==0&&o.mode!==DICT)?Z_STREAM_ERROR$1:o.mode===DICT&&(n=1,n=adler32_1(n,t,r,0),n!==o.check)?Z_DATA_ERROR$1:(a=updatewindow(e,t,r,r),a?(o.mode=MEM,Z_MEM_ERROR$1):(o.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){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}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(e){this.options=common$2.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=inflate_1$2.inflateInit2(this.strm,t.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=strings.string2buf(t.dictionary):toString.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,t.dictionary),r!==Z_OK)))throw new Error(messages[r])}Inflate$1.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize,n=this.options.dictionary;let a,s,l;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?Z_FINISH:Z_NO_FLUSH,toString.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),a=inflate_1$2.inflate(r,s),a===Z_NEED_DICT&&n&&(a=inflate_1$2.inflateSetDictionary(r,n),a===Z_OK?a=inflate_1$2.inflate(r,s):a===Z_DATA_ERROR&&(a=Z_NEED_DICT));r.avail_in>0&&a===Z_STREAM_END&&r.state.wrap>0&&e[r.next_in]!==0;)inflate_1$2.inflateReset(r),a=inflate_1$2.inflate(r,s);switch(a){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(a),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(r.avail_out===0||a===Z_STREAM_END))if(this.options.to==="string"){let h=strings.utf8border(r.output,r.next_out),c=r.next_out-h,u=strings.buf2string(r.output,h);r.next_out=c,r.avail_out=o-c,c&&r.output.set(r.output.subarray(h,h+c),0),this.onData(u)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===Z_OK&&l===0)){if(a===Z_STREAM_END)return a=inflate_1$2.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(e){this.chunks.push(e)};Inflate$1.prototype.onEnd=function(e){e===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common$2.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function inflate$1(e,t){const r=new Inflate$1(t);if(r.push(e),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(e,t){return t=t||{},t.raw=!0,inflate$1(e,t)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(e=>{let t={};return e.forEach((r,o)=>t[r]=o),t})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),_mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),_tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=e=>{let t,r,o,n,a="";const s=e.length%3;for(let l=0;l255||(o=e.charCodeAt(l++))>255||(n=e.charCodeAt(l++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,a+=b64chs[t>>18&63]+b64chs[t>>12&63]+b64chs[t>>6&63]+b64chs[t&63]}return s?a.slice(0,s-3)+"===".substring(s):a},_btoa=_hasbtoa?e=>btoa(e):_hasBuffer?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let o=0,n=e.length;ot?_mkUriSafe(_fromUint8Array(e)):_fromUint8Array(e),cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?_fromCC(192|t>>>6)+_fromCC(128|t&63):_fromCC(224|t>>>12&15)+_fromCC(128|t>>>6&63)+_fromCC(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return _fromCC(240|t>>>18&7)+_fromCC(128|t>>>12&63)+_fromCC(128|t>>>6&63)+_fromCC(128|t&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=e=>e.replace(re_utob,cb_utob),_encode=_hasBuffer?e=>Buffer.from(e,"utf8").toString("base64"):_TE?e=>_fromUint8Array(_TE.encode(e)):e=>_btoa(utob(e)),encode=(e,t=!1)=>t?_mkUriSafe(_encode(e)):_encode(e),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return _fromCC((r>>>10)+55296)+_fromCC((r&1023)+56320);case 3:return _fromCC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _fromCC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=e=>e.replace(re_btou,cb_btou),atobPolyfill=e=>{if(e=e.replace(/\s+/g,""),!b64re.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",o,n;for(let a=0;a>16&255):n===64?_fromCC(t>>16&255,t>>8&255):_fromCC(t>>16&255,t>>8&255,t&255);return r},_atob=_hasatob?e=>atob(_tidyB64(e)):_hasBuffer?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?e=>_U8Afrom(Buffer.from(e,"base64")):e=>_U8Afrom(_atob(e).split("").map(t=>t.charCodeAt(0))),toUint8Array=e=>_toUint8Array(_unURI(e)),_decode=_hasBuffer?e=>Buffer.from(e,"base64").toString("utf8"):_TD?e=>_TD.decode(_toUint8Array(e)):e=>btou(_atob(e)),_unURI=e=>_tidyB64(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),decode=e=>_decode(_unURI(e)),base64Serde={serialize:e=>encode(e,!0),deserialize:e=>decode(e)},pakoSerde={serialize:e=>{const t=new TextEncoder().encode(e),r=deflate_1(t,{level:9});return fromUint8Array(r,!0)},deserialize:e=>{const t=toUint8Array(e);return inflate_1(t,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(e,t="pako")=>{if(!(t in serdes))throw new Error(`Unknown serde type: ${t}`);const r=JSON.stringify(e),o=serdes[t].serialize(r);return`${t}:${o}`},deserializeState=e=>{let t,r;if(e.includes(":")){let n;if([n,r]=e.split(":"),n in serdes)t=n;else throw new Error(`Unknown serde type: ${n}`)}else t="base64",r=e;const o=serdes[t].deserialize(r);return JSON.parse(o)};var dist$1={},words={};(function(e){var t=commonjsGlobal&&commonjsGlobal.__values||function(o){var n=typeof Symbol=="function"&&Symbol.iterator,a=n&&o[n],s=0;if(a)return a.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&s>=o.length&&(o=void 0),{value:o&&o[s++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.getWordsByCategory=e.wordList=void 0,e.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"ability",categories:["thing"]},{word:"accident",categories:["thing"]},{word:"account",categories:["thing"]},{word:"action",categories:["thing"]},{word:"activity",categories:["thing"]},{word:"actor",categories:["profession"]},{word:"ad",categories:["media"]},{word:"addition",categories:["thing"]},{word:"address",categories:["thing"]},{word:"adult",categories:["people"]},{word:"advantage",categories:["thing"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"agency",categories:["thing"]},{word:"agent",categories:["people"]},{word:"air",categories:["thing"]},{word:"airline",categories:["transportation"]},{word:"airplane",categories:["transportation"]},{word:"airport",categories:["transportation","place"]},{word:"alarm",categories:["thing"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"analyst",categories:["profession"]},{word:"angle",categories:["thing"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apartment",categories:["place"]},{word:"apple",categories:["food"]},{word:"application",categories:["thing"]},{word:"appointment",categories:["thing"]},{word:"architect",categories:["profession"]},{word:"argument",categories:["thing"]},{word:"area",categories:["thing"]},{word:"arm",categories:["thing"]},{word:"army",categories:["thing"]},{word:"art",categories:["thing"]},{word:"article",categories:["thing"]},{word:"artist",categories:["profession"]},{word:"australia",categories:["place"]},{word:"author",categories:["profession"]},{word:"autumn",categories:["time"]},{word:"baby",categories:["people","family"]},{word:"baker",categories:["profession"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"barista",categories:["profession"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"bear",categories:["animals"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"bird",categories:["animals"]},{word:"bit",categories:["thing","technology"]},{word:"book",categories:["thing","education"]},{word:"boots",categories:["thing"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"businessperson",categories:["people","business"]},{word:"butcher",categories:["profession"]},{word:"byte",categories:["thing","technology"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpenter",categories:["profession"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"cat",categories:["animals"]},{word:"chef",categories:["profession"]},{word:"child",categories:["people","family"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"city",categories:["place"]},{word:"coat",categories:["thing"]},{word:"coffeeshop",categories:["place"]},{word:"computer",categories:["thing","technology"]},{word:"continent",categories:["place"]},{word:"controller",categories:["thing","technology"]},{word:"country",categories:["place"]},{word:"cpu",categories:["thing","technology"]},{word:"crayon",categories:["thing"]},{word:"cricket",categories:["animals"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"dawn",categories:["time"]},{word:"daybreak",categories:["time"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"dentist",categories:["profession"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"dusk",categories:["time"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"electrician",categories:["profession"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"engineer",categories:["profession"]},{word:"england",categories:["place"]},{word:"eve",categories:["time"]},{word:"evening",categories:["time"]},{word:"eventide",categories:["time"]},{word:"exabyte",categories:["thing","technology"]},{word:"eye",categories:["thing"]},{word:"fall",categories:["time"]},{word:"family",categories:["family"]},{word:"farmer",categories:["profession"]},{word:"father",categories:["people","family"]},{word:"finland",categories:["place"]},{word:"fireman",categories:["profession"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"florist",categories:["profession"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"ghost",categories:["thing"]},{word:"gigabyte",categories:["thing","technology"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]},{word:"gold",categories:["thing"]},{word:"gpu",categories:["thing","technology"]},{word:"grandmother",categories:["people","family"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hairdresser",categories:["profession"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"intern",categories:["profession"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"journalist",categories:["profession"]},{word:"joystick",categories:["thing","technology"]},{word:"judge",categories:["profession"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"keyboard",categories:["thing","technology"]},{word:"kilobyte",categories:["thing","technology"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"laptop",categories:["thing","technology"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"librarian",categories:["profession"]},{word:"library",categories:["place"]},{word:"lifeguard",categories:["profession"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"man",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"mechanic",categories:["profession"]},{word:"megabyte",categories:["thing","technology"]},{word:"memory",categories:["thing","technology"]},{word:"microphone",categories:["thing"]},{word:"midnight",categories:["time"]},{word:"minister",categories:["people","religion"]},{word:"monitor",categories:["thing","technology"]},{word:"monkey",categories:["animals"]},{word:"morn",categories:["time"]},{word:"morning",categories:["time"]},{word:"mother",categories:["people","family"]},{word:"motherboard",categories:["thing","technology"]},{word:"motorcycle",categories:["transportation"]},{word:"mouse",categories:["thing","technology","animals"]},{word:"musician",categories:["profession"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["time"]},{word:"nightfall",categories:["time"]},{word:"noon",categories:["time"]},{word:"notebook",categories:["thing"]},{word:"nurse",categories:["profession"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"optician",categories:["profession"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"pager",categories:["thing","technology"]},{word:"painter",categories:["profession"]},{word:"painting",categories:["media"]},{word:"park",categories:["place"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing","education"]},{word:"petabyte",categories:["thing","technology"]},{word:"pharmacist",categories:["profession"]},{word:"photographer",categories:["profession"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pilot",categories:["profession"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"plumber",categories:["profession"]},{word:"policeman",categories:["profession"]},{word:"portugal",categories:["place"]},{word:"postman",categories:["profession"]},{word:"potato",categories:["food"]},{word:"printer",categories:["thing","technology"]},{word:"processor",categories:["thing","technology"]},{word:"psychiatrist",categories:["profession"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"ram",categories:["thing","technology"]},{word:"receptionist",categories:["profession"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"salesclerk",categories:["people","business"]},{word:"salesmen",categories:["profession"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scientist",categories:["profession"]},{word:"scooter",categories:["transportation"]},{word:"secretary",categories:["profession"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"smartphone",categories:["thing","technology"]},{word:"soccer",categories:["sports"]},{word:"solstice",categories:["time"]},{word:"spoon",categories:["thing"]},{word:"spring",categories:["time"]},{word:"state",categories:["place"]},{word:"stone",categories:["thing"]},{word:"student",categories:["people","education"]},{word:"sugar",categories:["food"]},{word:"summer",categories:["time"]},{word:"sundown",categories:["time"]},{word:"sunset",categories:["time"]},{word:"sweden",categories:["place"]},{word:"table",categories:["thing"]},{word:"tailor",categories:["profession"]},{word:"teacher",categories:["people","education","profession"]},{word:"teenager",categories:["people","family"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"terabyte",categories:["thing","technology"]},{word:"thailand",categories:["place"]},{word:"tiger",categories:["animals"]},{word:"toddler",categories:["people","family"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"translator",categories:["profession"]},{word:"truck",categories:["thing","transportation"]},{word:"twilight",categories:["time"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vr",categories:["thing","technology"]},{word:"vulture",categories:["animals"]},{word:"waiter",categories:["profession"]},{word:"waitress",categories:["profession"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"winter",categories:["time"]},{word:"wire",categories:["thing"]},{word:"wolf",categories:["animals"]},{word:"woman",categories:["people"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"yottabyte",categories:["thing","technology"]},{word:"zebra",categories:["animals"]},{word:"zettabyte",categories:["thing","technology"]},{word:"zoo",categories:["animals"]}],adjective:[{word:"abandoned",categories:["condition"]},{word:"abiding",categories:["personality"]},{word:"able",categories:["condition"]},{word:"abrasive",categories:["condition","personality"]},{word:"abnormal",categories:["condition"]},{word:"absurd",categories:["condition"]},{word:"abundant",categories:["quantity"]},{word:"acceptable",categories:["condition"]},{word:"acidic",categories:["taste"]},{word:"acoustic",categories:["sounds"]},{word:"acrid",categories:["condition"]},{word:"adamant",categories:["personality"]},{word:"adorable",categories:["personality"]},{word:"adventurous",categories:["personality"]},{word:"aggressive",categories:["personality"]},{word:"agitated",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alert",categories:["condition"]},{word:"alive",categories:["condition"]},{word:"aloof",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"annoyed",categories:["personality"]},{word:"antsy",categories:["personality"]},{word:"anxious",categories:["personality"]},{word:"appalling",categories:["personality"]},{word:"appetizing",categories:["taste"]},{word:"apprehensive",categories:["personality"]},{word:"arrogant",categories:["personality"]},{word:"ashamed",categories:["personality"]},{word:"astonishing",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"average",categories:["appearance"]},{word:"bad",categories:["condition"]},{word:"bald",categories:["appearance"]},{word:"bashful",categories:["personality"]},{word:"beautiful",categories:["appearance"]},{word:"beefy",categories:["appearance"]},{word:"belligerent",categories:["personality"]},{word:"bent",categories:["condition"]},{word:"best",categories:["condition"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"billowy",categories:["appearance"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"bland",categories:["taste"]},{word:"blue",categories:["color"]},{word:"blushing",categories:["appearance"]},{word:"bored",categories:["personality"]},{word:"boring",categories:["personality"]},{word:"boundless",categories:["personality"]},{word:"brainy",categories:["personality"]},{word:"brash",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"bright",categories:["appearance"]},{word:"broad",categories:["shapes"]},{word:"broken",categories:["condition"]},{word:"brown",categories:["color"]},{word:"bulky",categories:["appearance"]},{word:"bumpy",categories:["touch"]},{word:"burly",categories:["appearance"]},{word:"busy",categories:["personality"]},{word:"cagey",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"callous",categories:["personality"]},{word:"careful",categories:["condition"]},{word:"chilly",categories:["touch"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"clever",categories:["condition"]},{word:"clumsy",categories:["personality"]},{word:"cold",categories:["touch"]},{word:"colossal",categories:["size"]},{word:"cool",categories:["touch"]},{word:"crashing",categories:["sounds"]},{word:"creamy",categories:["taste"]},{word:"crooked",categories:["shapes"]},{word:"cuddly",categories:["touch"]},{word:"curved",categories:["shapes"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dazzling",categories:["appearance"]},{word:"dead",categories:["condition"]},{word:"deafening",categories:["sounds"]},{word:"deep",categories:["shapes"]},{word:"defeated",categories:["personality"]},{word:"delicious",categories:["taste"]},{word:"delightful",categories:["personality"]},{word:"dirty",categories:["touch"]},{word:"disgusting",categories:["taste"]},{word:"drab",categories:["appearance"]},{word:"dry",categories:["touch"]},{word:"eager",categories:["personality"]},{word:"early",categories:["time"]},{word:"easy",categories:["condition"]},{word:"echoing",categories:["sounds"]},{word:"elegant",categories:["appearance"]},{word:"embarrassed",categories:["personality"]},{word:"enough",categories:["quantity"]},{word:"faint",categories:["sounds"]},{word:"faithful",categories:["personality"]},{word:"famous",categories:["condition"]},{word:"fancy",categories:["appearance"]},{word:"fast",categories:["time"]},{word:"fat",categories:["size"]},{word:"few",categories:["quantity"]},{word:"fierce",categories:["personality"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"flaky",categories:["touch"]},{word:"flat",categories:["shapes"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"fresh",categories:["taste"]},{word:"full",categories:["quantity"]},{word:"future",categories:["time"]},{word:"gentle",categories:["personality"]},{word:"gifted",categories:["condition"]},{word:"gigantic",categories:["size"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"gray",categories:["color"]},{word:"greasy",categories:["touch","taste"]},{word:"great",categories:["size"]},{word:"green",categories:["color"]},{word:"grumpy",categories:["personality"]},{word:"hallowed",categories:["condition"]},{word:"handsome",categories:["appearance"]},{word:"happy",categories:["personality"]},{word:"harsh",categories:["sounds"]},{word:"helpful",categories:["condition"]},{word:"helpless",categories:["personality"]},{word:"high",categories:["shapes"]},{word:"hissing",categories:["sounds"]},{word:"hollow",categories:["shapes"]},{word:"hot",categories:["touch","taste"]},{word:"howling",categories:["sounds"]},{word:"huge",categories:["size"]},{word:"hundreds",categories:["quantity"]},{word:"icy",categories:["touch"]},{word:"immense",categories:["size"]},{word:"important",categories:["condition"]},{word:"incalculable",categories:["quantity"]},{word:"inexpensive",categories:["condition"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"juicy",categories:["taste"]},{word:"kind",categories:["personality"]},{word:"large",categories:["size"]},{word:"late",categories:["time"]},{word:"lazy",categories:["personality"]},{word:"lemon",categories:["color"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["size","quantity"]},{word:"lively",categories:["personality"]},{word:"long",categories:["time","appearance"]},{word:"loose",categories:["touch"]},{word:"loud",categories:["sounds"]},{word:"low",categories:["shapes"]},{word:"magnificent",categories:["appearance"]},{word:"mammoth",categories:["size"]},{word:"mango",categories:["color"]},{word:"many",categories:["quantity"]},{word:"massive",categories:["size"]},{word:"mealy",categories:["condition"]},{word:"melodic",categories:["sounds"]},{word:"melted",categories:["touch"]},{word:"microscopic",categories:["size"]},{word:"millions",categories:["quantity"]},{word:"miniature",categories:["size"]},{word:"modern",categories:["time"]},{word:"moldy",categories:["taste"]},{word:"most",categories:["quantity"]},{word:"muscular",categories:["appearance"]},{word:"mushy",categories:["condition"]},{word:"mysterious",categories:["personality"]},{word:"narrow",categories:["shapes"]},{word:"nervous",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"noisy",categories:["sounds"]},{word:"numerous",categories:["quantity"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"obedient",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"odd",categories:["condition"]},{word:"old",categories:["time"]},{word:"orange",categories:["color"]},{word:"panicky",categories:["personality"]},{word:"petite",categories:["size"]},{word:"pitiful",categories:["personality"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"polite",categories:["personality"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"prehistoric",categories:["time"]},{word:"prickly",categories:["touch"]},{word:"proud",categories:["personality"]},{word:"puny",categories:["size"]},{word:"purple",categories:["color"]},{word:"purring",categories:["sounds"]},{word:"putrid",categories:["taste"]},{word:"quaint",categories:["appearance"]},{word:"quick",categories:["time"]},{word:"quiet",categories:["sounds"]},{word:"rancid",categories:["taste"]},{word:"rapid",categories:["time"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"red",categories:["color"]},{word:"refined",categories:["shapes"]},{word:"repulsive",categories:["personality"]},{word:"rhythmic",categories:["sounds"]},{word:"rich",categories:["condition"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"rough",categories:["touch"]},{word:"round",categories:["shapes"]},{word:"salmon",categories:["color"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"scarce",categories:["quantity"]},{word:"scary",categories:["personality"]},{word:"scrawny",categories:["size"]},{word:"screeching",categories:["sounds"]},{word:"scruffy",categories:["appearance"]},{word:"shaggy",categories:["touch"]},{word:"shallow",categories:["shapes"]},{word:"shapely",categories:["appearance"]},{word:"sharp",categories:["touch"]},{word:"short",categories:["size","appearance","time"]},{word:"shrilling",categories:["sounds"]},{word:"shy",categories:["condition"]},{word:"silly",categories:["personality"]},{word:"skinny",categories:["appearance","shapes"]},{word:"slimy",categories:["touch"]},{word:"slow",categories:["time"]},{word:"small",categories:["size"]},{word:"some",categories:["quantity"]},{word:"sour",categories:["taste"]},{word:"sparse",categories:["quantity"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"square",categories:["shapes"]},{word:"squeaking",categories:["sounds"]},{word:"stale",categories:["taste"]},{word:"steep",categories:["shapes"]},{word:"sticky",categories:["touch"]},{word:"stocky",categories:["appearance"]},{word:"straight",categories:["shapes"]},{word:"strong",categories:["touch"]},{word:"substantial",categories:["quantity"]},{word:"sweet",categories:["taste"]},{word:"swift",categories:["time"]},{word:"tall",categories:["size"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"teeny",categories:["size"]},{word:"tender",categories:["condition"]},{word:"thankful",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"thousands",categories:["quantity"]},{word:"thundering",categories:["sounds"]},{word:"tight",categories:["touch"]},{word:"tinkling",categories:["sounds"]},{word:"tiny",categories:["size"]},{word:"ugly",categories:["appearance"]},{word:"uneven",categories:["touch"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"uptight",categories:["personality"]},{word:"vast",categories:["condition"]},{word:"victorious",categories:["personality"]},{word:"wailing",categories:["sounds"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"white",categories:["color"]},{word:"wide",categories:["shapes"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"wooden",categories:["touch"]},{word:"worried",categories:["personality"]},{word:"wrong",categories:["condition"]},{word:"yellow",categories:["color"]},{word:"young",categories:["time"]},{word:"yummy",categories:["taste"]},{word:"zealous",categories:["personality"]}]};function r(o,n){var a,s;n===void 0&&(n=[]);var l=new Set(n),h=[];try{for(var c=t(e.wordList[o]),u=c.next();!u.done;u=c.next()){var g=u.value;(n.length===0||g.categories.some(function(f){return l.has(f)}))&&h.push(g.word)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}return h}e.getWordsByCategory=r})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{switch(e){case"auto":{n(t);break}case"manual":{n(r);break}case"loader":{n(o);break}default:n(t)}}),addHistoryEntry=e=>{const t={...e,id:v4()};if(t.type==="loader"){loaderHistoryStore.update(r=>[t,...r]);return}t.name||(t.name=generateSlug_1(2)),t.type==="auto"?autoHistoryStore.update(r=>(r.length>=MAX_AUTO_HISTORY_LENGTH&&(r=r.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[t,...r])):t.type==="manual"&&(manualHistoryStore.update(r=>[t,...r]),logEvent("history",{action:"save"}))},clearHistoryData=e=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(t=>(get_store_value(historyModeStore)!=="loader"&&(t=t.filter(({id:r})=>e&&r!=e),logEvent("history",{action:"clear",type:e?"single":"all"})),t))},getPreviousState=e=>{const t=get_store_value(e?autoHistoryStore:manualHistoryStore);return t.length>0?JSON.stringify(t[0].state):""},restoreHistory=e=>{const t=e.filter(o=>validateEntry(o)),r=e.length-t.length;if(r>0&&(console.error(`${r} invalid history entries were removed.`),console.error(e)),t.length>0){let o=0;(t[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(n=>{const a=new Set(n.map(({id:h})=>h)),s=t.filter(({id:h})=>!a.has(h));o=s.length;const l=[...n,...s];return l.sort((h,c)=>c.time-h.time),l}),alert(`${o} entries restored. ${r} invalid, ${t.length-o} duplicates.`),logEvent("history",{action:"restore",success:o,invalid:r,duplicates:t.length-o})}else alert("No valid entries found.")},setIDs=e=>{for(const t of e)t.id||(t.id=v4());return e},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=e=>e.type&&e.state&&e.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=e=>codeFileName in e,getFileContent=async e=>e.truncated?await fetchText(e.raw_url):e.content,getGistData=async e=>{const t=e.split("github.com").pop();if(!t)throw new Error("Invalid GitHub URL"+e);const[r,o,n,a]=t.split("/"),{html_url:s,files:l,history:h}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`);if(isValidGist(l)){const c=await getFileContent(l[codeFileName]);let u="{}";configFileName in l&&(u=await getFileContent(l[configFileName]));const g=h[0];return{url:`${s}/${g.version}`,code:c,config:u,author:g.user.login,time:new Date(g.committed_at).getTime(),version:g.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(e,t=e.url)=>{const r={...defaultState,code:e.code,loader:{type:"gist",config:{url:t}}};return e.config&&(r.mermaid=e.config),r},loadGistData=async e=>{const t=e.split("github.com").pop();if(!t)throw new Error("Invalid GitHub URL"+e);const[r,o,n,a]=t.split("/"),{history:s}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`),l=[];for(const u of s){const g=await getGistData(u.url).catch();g&&l.push(g)}if(l.length===0)throw new Error("Invalid gist provided");l.reverse();const h=l.slice(-1).pop();if(!h)throw new Error("Invalid gist provided");const c=getStateFromGist(h,e);for(const u of l)addHistoryEntry({state:getStateFromGist(u),time:u.time,type:"loader",url:u.url,name:`${u.author} v${u.version}`});return c},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const e=new URLSearchParams(window.location.search);let t=defaultState,r=!1;const o=e.get("code")??void 0,n=e.get("config")??void 0;let a;const s=n?await fetchText(n):defaultState.mermaid;if(o&&(a=await fetchText(o),r=!0),a){if(!o)throw new Error("Code URL is not defined");t={code:a,mermaid:s,loader:{type:"files",config:{codeURL:o,configURL:n}}}}else for(const[l,h]of e.entries())if(l in loaders)try{t=await loaders[l](h),r=!0;break}catch(c){console.error(c)}r&&updateCodeStore({...t,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:e}=get_store_value(migrationStore),t=Object.entries(migrations);if(e!==t.length-1){console.log(`Current migration version: v${e}. Migrating to v${t.length-1}.`);for(let r=e+1;r{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),await(analytics==null?void 0:analytics.page())},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(e=100)=>{if(count+=1,count>e){console.log(count,e);debugger}},formatJSON=e=>JSON.stringify(e,void 0,2),fetchJSON=async e=>(await fetch(e)).json(),fetchText=async e=>(await fetch(e)).text();function dedent(e){for(var t=[],r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(e,t,r){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(n,a,s){var l=[null];l.push.apply(l,a);var h=Function.bind.apply(n,l),c=new h;return s&&_setPrototypeOf(c,s.prototype),c},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r1?r-1:0),n=1;n/gm),TMPLIT_EXPR=seal(/\${[\w\W]*}/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),getGlobal=function e(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function e(t,r){if(_typeof(t)!=="object"||typeof t.createPolicy!="function")return null;var o=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(o=r.currentScript.getAttribute(n));var a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function createDOMPurify(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal(),t=function(p){return createDOMPurify(p)};if(t.version="2.4.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;var r=e.document,o=e.document,n=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,l=e.Element,h=e.NodeFilter,c=e.NamedNodeMap,u=c===void 0?e.NamedNodeMap||e.MozNamedAttrMap:c,g=e.HTMLFormElement,f=e.DOMParser,d=e.trustedTypes,m=l.prototype,C=lookupGetter(m,"cloneNode"),v=lookupGetter(m,"nextSibling"),b=lookupGetter(m,"childNodes"),y=lookupGetter(m,"parentNode");if(typeof a=="function"){var S=o.createElement("template");S.content&&S.content.ownerDocument&&(o=S.content.ownerDocument)}var w=_createTrustedTypesPolicy(d,r),R=w?w.createHTML(""):"",F=o,x=F.implementation,N=F.createNodeIterator,T=F.createDocumentFragment,A=F.getElementsByTagName,D=r.importNode,z={};try{z=clone(o).documentMode?o.documentMode:{}}catch{}var I={};t.isSupported=typeof y=="function"&&x&&typeof x.createHTMLDocument<"u"&&z!==9;var E=MUSTACHE_EXPR,$=ERB_EXPR,O=TMPLIT_EXPR,L=DATA_ATTR,P=ARIA_ATTR,U=IS_SCRIPT_OR_DATA,j=ATTR_WHITESPACE,Z=IS_ALLOWED_URI,H=null,q=addToSet({},[].concat(_toConsumableArray(html$1),_toConsumableArray(svg$1),_toConsumableArray(svgFilters),_toConsumableArray(mathMl$1),_toConsumableArray(text))),Y=null,te=addToSet({},[].concat(_toConsumableArray(html),_toConsumableArray(svg),_toConsumableArray(mathMl),_toConsumableArray(xml))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,oe=null,K=!0,re=!0,ue=!1,le=!0,de=!1,ce=!1,Ee=!1,Ae=!1,fe=!1,we=!1,Ce=!1,De=!0,Me=!1,Je="user-content-",ke=!0,ye=!1,ge={},_e=null,Fe=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Pe=null,ze=addToSet({},["audio","video","img","source","image","track"]),$e=null,Ue=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Se="http://www.w3.org/1998/Math/MathML",Te="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml",pe=ne,Le=!1,Ie=null,Qe=addToSet({},[Se,Te,ne],stringToString),he,et=["application/xhtml+xml","text/html"],tt="text/html",V,me=null,rt=o.createElement("form"),He=function(p){return p instanceof RegExp||p instanceof Function},Re=function(p){me&&me===p||((!p||_typeof(p)!=="object")&&(p={}),p=clone(p),he=et.indexOf(p.PARSER_MEDIA_TYPE)===-1?he=tt:he=p.PARSER_MEDIA_TYPE,V=he==="application/xhtml+xml"?stringToString:stringToLowerCase,H="ALLOWED_TAGS"in p?addToSet({},p.ALLOWED_TAGS,V):q,Y="ALLOWED_ATTR"in p?addToSet({},p.ALLOWED_ATTR,V):te,Ie="ALLOWED_NAMESPACES"in p?addToSet({},p.ALLOWED_NAMESPACES,stringToString):Qe,$e="ADD_URI_SAFE_ATTR"in p?addToSet(clone(Ue),p.ADD_URI_SAFE_ATTR,V):Ue,Pe="ADD_DATA_URI_TAGS"in p?addToSet(clone(ze),p.ADD_DATA_URI_TAGS,V):ze,_e="FORBID_CONTENTS"in p?addToSet({},p.FORBID_CONTENTS,V):Fe,ie="FORBID_TAGS"in p?addToSet({},p.FORBID_TAGS,V):{},oe="FORBID_ATTR"in p?addToSet({},p.FORBID_ATTR,V):{},ge="USE_PROFILES"in p?p.USE_PROFILES:!1,K=p.ALLOW_ARIA_ATTR!==!1,re=p.ALLOW_DATA_ATTR!==!1,ue=p.ALLOW_UNKNOWN_PROTOCOLS||!1,le=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=p.SAFE_FOR_TEMPLATES||!1,ce=p.WHOLE_DOCUMENT||!1,fe=p.RETURN_DOM||!1,we=p.RETURN_DOM_FRAGMENT||!1,Ce=p.RETURN_TRUSTED_TYPE||!1,Ae=p.FORCE_BODY||!1,De=p.SANITIZE_DOM!==!1,Me=p.SANITIZE_NAMED_PROPS||!1,ke=p.KEEP_CONTENT!==!1,ye=p.IN_PLACE||!1,Z=p.ALLOWED_URI_REGEXP||Z,pe=p.NAMESPACE||ne,G=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&He(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&He(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(re=!1),we&&(fe=!0),ge&&(H=addToSet({},_toConsumableArray(text)),Y=[],ge.html===!0&&(addToSet(H,html$1),addToSet(Y,html)),ge.svg===!0&&(addToSet(H,svg$1),addToSet(Y,svg),addToSet(Y,xml)),ge.svgFilters===!0&&(addToSet(H,svgFilters),addToSet(Y,svg),addToSet(Y,xml)),ge.mathMl===!0&&(addToSet(H,mathMl$1),addToSet(Y,mathMl),addToSet(Y,xml))),p.ADD_TAGS&&(H===q&&(H=clone(H)),addToSet(H,p.ADD_TAGS,V)),p.ADD_ATTR&&(Y===te&&(Y=clone(Y)),addToSet(Y,p.ADD_ATTR,V)),p.ADD_URI_SAFE_ATTR&&addToSet($e,p.ADD_URI_SAFE_ATTR,V),p.FORBID_CONTENTS&&(_e===Fe&&(_e=clone(_e)),addToSet(_e,p.FORBID_CONTENTS,V)),ke&&(H["#text"]=!0),ce&&addToSet(H,["html","head","body"]),H.table&&(addToSet(H,["tbody"]),delete ie.tbody),freeze&&freeze(p),me=p)},je=addToSet({},["mi","mo","mn","ms","mtext"]),We=addToSet({},["foreignobject","desc","title","annotation-xml"]),it=addToSet({},["title","style","font","a","script"]),ve=addToSet({},svg$1);addToSet(ve,svgFilters),addToSet(ve,svgDisallowed);var Be=addToSet({},mathMl$1);addToSet(Be,mathMlDisallowed);var ot=function(p){var k=y(p);(!k||!k.tagName)&&(k={namespaceURI:pe,tagName:"template"});var B=stringToLowerCase(p.tagName),W=stringToLowerCase(k.tagName);return Ie[p.namespaceURI]?p.namespaceURI===Te?k.namespaceURI===ne?B==="svg":k.namespaceURI===Se?B==="svg"&&(W==="annotation-xml"||je[W]):!!ve[B]:p.namespaceURI===Se?k.namespaceURI===ne?B==="math":k.namespaceURI===Te?B==="math"&&We[W]:!!Be[B]:p.namespaceURI===ne?k.namespaceURI===Te&&!We[W]||k.namespaceURI===Se&&!je[W]?!1:!Be[B]&&(it[B]||!ve[B]):!!(he==="application/xhtml+xml"&&Ie[p.namespaceURI]):!1},ae=function(p){arrayPush(t.removed,{element:p});try{p.parentNode.removeChild(p)}catch{try{p.outerHTML=R}catch{p.remove()}}},Oe=function(p,k){try{arrayPush(t.removed,{attribute:k.getAttributeNode(p),from:k})}catch{arrayPush(t.removed,{attribute:null,from:k})}if(k.removeAttribute(p),p==="is"&&!Y[p])if(fe||we)try{ae(k)}catch{}else try{k.setAttribute(p,"")}catch{}},Ye=function(p){var k,B;if(Ae)p=""+p;else{var W=stringMatch(p,/^[\r\n\t ]+/);B=W&&W[0]}he==="application/xhtml+xml"&&pe===ne&&(p=''+p+"");var ee=w?w.createHTML(p):p;if(pe===ne)try{k=new f().parseFromString(ee,he)}catch{}if(!k||!k.documentElement){k=x.createDocument(pe,"template",null);try{k.documentElement.innerHTML=Le?R:ee}catch{}}var Q=k.body||k.documentElement;return p&&B&&Q.insertBefore(o.createTextNode(B),Q.childNodes[0]||null),pe===ne?A.call(k,ce?"html":"body")[0]:ce?k.documentElement:Q},Ze=function(p){return N.call(p.ownerDocument||p,p,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},nt=function(p){return p instanceof g&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof u)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},be=function(p){return _typeof(s)==="object"?p instanceof s:p&&_typeof(p)==="object"&&typeof p.nodeType=="number"&&typeof p.nodeName=="string"},se=function(p,k,B){I[p]&&arrayForEach(I[p],function(W){W.call(t,k,B,me)})},Ge=function(p){var k;if(se("beforeSanitizeElements",p,null),nt(p)||regExpTest(/[\u0080-\uFFFF]/,p.nodeName))return ae(p),!0;var B=V(p.nodeName);if(se("uponSanitizeElement",p,{tagName:B,allowedTags:H}),p.hasChildNodes()&&!be(p.firstElementChild)&&(!be(p.content)||!be(p.content.firstElementChild))&®ExpTest(/<[/\w]/g,p.innerHTML)&®ExpTest(/<[/\w]/g,p.textContent)||B==="select"&®ExpTest(/