@squidcloud/cli 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|| ${s} === "boolean" || ${i} === null`).assign(p,o._`[${i}]`)}}r.else(),h(e),r.endIf(),r.if(o._`${p} !== undefined`,(()=>{r.assign(i,p),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${n}]`,r)))}(e,p)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function l(e,t,n,r=p.Correct){const i=r===p.Correct?o.operators.EQ:o.operators.NEQ;let a;switch(e){case"null":return o._`${t} ${i} null`;case"array":a=o._`Array.isArray(${t})`;break;case"object":a=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return o._`typeof ${t} ${i} ${e}`}return r===p.Correct?a:(0,o.not)(a);function s(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,n?o._`isFinite(${t})`:o.nil)}}function d(e,t,n,r){if(1===e.length)return l(e[0],t,n,r);let i;const a=(0,s.toHash)(e);if(a.array&&a.object){const e=o._`typeof ${t} != "object"`;i=a.null?e:o._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=o.nil;a.number&&delete a.integer;for(const e in a)i=(0,o.and)(i,l(e,t,n,r));return i}t.checkDataType=l,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,i=(0,s.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);(0,a.reportError)(t,f)}t.reportTypeError=h},91481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(15669),i=n(88936);function a(e,t,n){const{gen:a,compositeRule:o,data:s,opts:p}=e;if(void 0===n)return;const c=r._`${s}${(0,r.getProperty)(t)}`;if(o)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===p.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),a.if(u,r._`${c} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const t in n)a(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>a(e,n,t.default)))}},91686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(12171),i=n(97332),a=n(89073),o=n(97332),s=n(91481),p=n(95782),c=n(38878),u=n(15669),l=n(17250),d=n(96696),f=n(88936),h=n(6930);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,u._`${l.default.data}, ${l.default.valCxt}`,r.$async,(()=>{e.code(u._`"use strict"; ${v(n,i)}`),function(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,u._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,u._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,u._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,u._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,u._`""`),e.var(l.default.parentData,u._`undefined`),e.var(l.default.parentDataProperty,u._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(a)})):e.func(t,u._`${l.default.data}, ${function(e){return u._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?u._`, ${l.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,r.$async,(()=>e.code(v(n,i)).code(a)))}function v(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function g(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function w(e,t){if(e.opts.jtd)return x(e,[],!1,t);const n=(0,i.getSchemaTypes)(e.schema);x(e,n,!(0,i.coerceAndCheckDataType)(e,n),t)}function _({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){const a=n.$comment;if(!0===i.$comment)e.code(u._`${l.default.self}.logger.log(${a})`);else if("function"==typeof i.$comment){const n=u.str`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function x(e,t,n,r){const{gen:i,schema:s,data:p,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function v(f){(0,a.shouldUseGroup)(s,f)&&(f.type?(i.if((0,o.checkDataType)(f.type,p,d.strictNumbers)),D(e,f),1===t.length&&t[0]===f.type&&n&&(i.else(),(0,o.reportTypeError)(e)),i.endIf()):D(e,f),c||i.if(u._`${l.default.errors} === ${r||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(s,m)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{O(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const n=[];for(const r of e.dataTypes)O(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const n=e.self.RULES.all;for(const r in n){const i=n[r];if("object"==typeof i&&(0,a.shouldUseRule)(e.schema,i)){const{type:n}=i.definition;n.length&&!n.some((e=>{return r=e,(n=t).includes(r)||"number"===r&&n.includes("integer");var n,r}))&&E(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of m.rules)v(e);v(m.post)}))):i.block((()=>j(e,"$ref",m.all.$ref.definition)))}function D(e,t){const{gen:n,schema:r,opts:{useDefaults:i}}=e;i&&(0,s.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,a.shouldUseRule)(r,n)&&j(e,n.keyword,n.definition,t.type)}))}function O(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(g(e),y(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,(()=>{n.$comment&&t.$comment&&_(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",u._`${n}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if(u._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(u._`new ${i}(${l.default.vErrors})`))):(t.assign(u._`${r}.errors`,l.default.vErrors),a.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof u.Name&&e.assign(u._`${t}.props`,n),r instanceof u.Name&&e.assign(u._`${t}.items`,r)}(e),t.return(u._`${l.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,r.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,n){if((0,p.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,p.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,n){this.failResult((0,u.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=u.nil){this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,u.or)(u._`${r} === undefined`,t)),e!==u.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:i}=this;return(0,u.or)(function(){if(n.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return u._`${(0,o.checkDataTypes)(e,t,i.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return u._`!${n}(${t})`}return u.nil}())}subschema(e,t){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return function(e,t){b(e)&&(g(e),y(e))?function(e,t){const{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&_(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const a=r.const("_errs",l.default.errors);w(e,a),r.var(t,u._`${a} === ${l.default.errors}`)}(e,t):(0,r.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=f.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=f.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function j(e,t,n,r){const i=new S(e,n,t);"code"in n?n.code(i,r):i.$data&&n.validate?(0,p.funcKeywordCode)(i,n):"macro"in n?(0,p.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,p.funcKeywordCode)(i,n)}t.KeywordCxt=S;const k=/^\/(?:[^~]|~0|~1)*$/,T=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(""===e)return l.default.rootData;if("/"===e[0]){if(!k.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{const o=T.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+o[1];if(i=o[2],"#"===i){if(s>=t)throw new Error(p("property/index",s));return r[t-s]}if(s>t)throw new Error(p("data",s));if(a=n[t-s],!i)return a}let o=a;const s=i.split("/");for(const e of s)e&&(a=u._`${a}${(0,u.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=u._`${o} && ${a}`);return o;function p(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=N},95782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const r=n(15669),i=n(17250),a=n(3499),o=n(6930);function s(e){const{gen:t,data:n,it:i}=e;t.if(i.parentData,(()=>t.assign(n,r._`${i.parentData}[${i.parentDataProperty}]`)))}function p(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:i,schema:a,parentSchema:o,it:s}=e,c=t.macro.call(s.self,a,o,s),u=p(n,i,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const l=n.name("valid");e.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:c,keyword:u,schema:l,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,l,d,h):t.validate,v=p(c,u,m),y=c.let("valid");function b(n=(t.async?r._`await `:r.nil)){const o=h.opts.passContext?i.default.this:i.default.self,s=!("compile"in t&&!f||!1===t.schema);c.assign(y,r._`${n}${(0,a.callValidateCode)(e,v,o,s)}`,t.modifying)}function g(e){var n;c.if((0,r.not)(null!==(n=t.valid)&&void 0!==n?n:y),e)}e.block$data(y,(function(){if(!1===t.errors)b(),t.modifying&&s(e),g((()=>e.error()));else{const n=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(r._`await `)),(t=>c.assign(y,!1).if(r._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,r._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=r._`${v}.errors`;return c.assign(e,null),b(r.nil),e}();t.modifying&&s(e),g((()=>function(e,t){const{gen:n}=e;n.if(r._`Array.isArray(${t})`,(()=>{n.assign(i.default.vErrors,r._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,r._`${i.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:y)},t.validSchemaType=function(e,t,n=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const o=i.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){const e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);n.logger.error(e)}}},38878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const r=n(15669),i=n(88936);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:p}){if(void 0!==t&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const a=e.schema[t];return void 0===n?{schema:a,schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[n],schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(n)}`}}if(void 0!==a){if(void 0===o||void 0===s||void 0===p)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:o,topSchemaRef:p,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:a,data:o,dataTypes:s,propertyName:p}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==n){const{errorPath:o,dataPathArr:s,opts:p}=t;u(c.let("data",r._`${t.data}${(0,r.getProperty)(n)}`,!0)),e.errorPath=r.str`${o}${(0,i.getErrorPath)(n,a,p.jsPropertySyntax)}`,e.parentDataProperty=r._`${n}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==o&&(u(o instanceof r.Name?o:c.let("data",o,!0)),void 0!==p&&(e.propertyName=p)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){void 0!==r&&(e.compositeRule=r),void 0!==i&&(e.createErrors=i),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}},38355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=n(91686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var i=n(15669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const a=n(46448),o=n(91578),s=n(82881),p=n(87382),c=n(15669),u=n(96696),l=n(97332),d=n(88936),f=n(71143),h=n(10407),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,n,r,i,a,o,s,p,c,u,l,d,f,v,y,b,g,w,_,x,D,O,E,S,j;const k=e.strict,T=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===T||void 0===T?1:T||0,P=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:m,C=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(o=null!==(a=e.strictSchema)&&void 0!==a?a:k)||void 0===o||o,strictNumbers:null===(p=null!==(s=e.strictNumbers)&&void 0!==s?s:k)||void 0===p||p,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:k)&&void 0!==u?u:"log",strictTuples:null!==(d=null!==(l=e.strictTuples)&&void 0!==l?l:k)&&void 0!==d?d:"log",strictRequired:null!==(v=null!==(f=e.strictRequired)&&void 0!==f?f:k)&&void 0!==v&&v,code:e.code?{...e.code,optimize:N,regExp:P}:{optimize:N,regExp:P},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==(x=e.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(D=e.addUsedSchema)||void 0===D||D,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:C}}class _{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:n}),this.logger=function(e){if(!1===e)return k;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,b,e,"NOT SUPPORTED"),x.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=j.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),O.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=f;"id"===n&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||a.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await p.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function p(e){const n=await c.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,r);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=D.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new p.SchemaEnv({schema:{},schemaId:n});if(t=p.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=D.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(N.call(this,n,t),!t)return(0,d.eachItem)(n,(e=>P.call(this,e))),this;A.call(this,t);const r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,0===r.type.length?e=>P.call(this,e,r):e=>r.type.forEach((t=>P.call(this,e,r,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=F(a))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a;const{schemaId:o}=this.opts;if("object"==typeof e)a=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;n=(0,u.normalizeId)(a||n);const c=u.getSchemaRefs.call(this,e,n);return s=new p.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=s),r&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):p.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{p.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,n,r="error"){for(const i in e){const a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function D(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function O(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function j(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=_,_.ValidationError=a.default,_.MissingRefError=o.default;const k={log(){},warn(){},error(){}},T=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){const{RULES:n}=this;if((0,d.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!T.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function P(e,t,n){var r;const i=null==t?void 0:t.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let o=i?a.post:a.rules.find((({type:e})=>e===n));if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?C.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function C(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function A(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=F(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function F(e){return{anyOf:[e,I]}}},94285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(66471);r.code='require("ajv/dist/runtime/equal").default',t.default=r},49161:(e,t)=>{"use strict";function n(e){const t=e.length;let n,r=0,i=0;for(;i<t;)r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t&&(n=e.charCodeAt(i),56320==(64512&n)&&i++);return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},10407:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(22371);r.code='require("ajv/dist/runtime/uri").default',t.default=r},46448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=n},78891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r=n(15669),i=n(88936),a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?o(e,r):(0,i.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:n,schema:a,data:o,keyword:s,it:p}=e;p.items=!0;const c=n.const("len",r._`${o}.length`);if(!1===a)e.setParams({len:t.length}),e.pass(r._`${c} <= ${t.length}`);else if("object"==typeof a&&!(0,i.alwaysValidSchema)(p,a)){const a=n.var("valid",r._`${c} <= ${t.length}`);n.if((0,r.not)(a),(()=>function(a){n.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:i.Type.Num},a),p.allErrors||n.if((0,r.not)(a),(()=>n.break()))}))}(a))),e.ok(a)}}t.validateAdditionalItems=o,t.default=a},24943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a=n(17250),o=n(88936),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:s,data:p,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:l,opts:d}=u;if(u.props=!0,"all"!==d.removeAdditional&&(0,o.alwaysValidSchema)(u,n))return;const f=(0,r.allSchemaProperties)(s.properties),h=(0,r.allSchemaProperties)(s.patternProperties);function m(e){t.code(i._`delete ${p}[${e}]`)}function v(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===n)m(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(l||t.break());if("object"==typeof n&&!(0,o.alwaysValidSchema)(u,n)){const n=t.name("valid");"failing"===d.removeAdditional?(y(r,n,!1),t.if((0,i.not)(n),(()=>{e.reset(),m(r)}))):(y(r,n),l||t.if((0,i.not)(n),(()=>t.break())))}}}function y(t,n,r){const i={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,n)}t.forIn("key",p,(n=>{f.length||h.length?t.if(function(n){let a;if(f.length>8){const e=(0,o.schemaRefOrVal)(u,s.properties,"properties");a=(0,r.isOwnProperty)(t,e,n)}else a=f.length?(0,i.or)(...f.map((e=>i._`${n} === ${e}`))):i.nil;return h.length&&(a=(0,i.or)(a,...h.map((t=>i._`${(0,r.usePattern)(e,t)}.test(${n})`)))),(0,i.not)(a)}(n),(()=>v(n))):v(n)})),e.ok(i._`${c} === ${a.default.errors}`)}};t.default=s},22609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(88936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach(((t,n)=>{if((0,r.alwaysValidSchema)(i,t))return;const o=e.subschema({keyword:"allOf",schemaProp:n},a);e.ok(a),e.mergeEvaluated(o)}))}};t.default=i},54279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},95609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?r.str`must contain at least ${e} valid item(s)`:r.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?r._`{minContains: ${e}}`:r._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:a,data:o,it:s}=e;let p,c;const{minContains:u,maxContains:l}=a;s.opts.next?(p=void 0===u?1:u,c=l):p=1;const d=t.const("len",r._`${o}.length`);if(e.setParams({min:p,max:c}),void 0===c&&0===p)return void(0,i.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&p>c)return(0,i.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(s,n)){let t=r._`${d} >= ${p}`;return void 0!==c&&(t=r._`${t} && ${d} <= ${c}`),void e.pass(t)}s.items=!0;const f=t.name("valid");function h(){const e=t.name("_valid"),n=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(r._`${e}++`),void 0===c?t.if(r._`${e} >= ${p}`,(()=>t.assign(f,!0).break())):(t.if(r._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===p?t.assign(f,!0):t.if(r._`${e} >= ${p}`,(()=>t.assign(f,!0))))}(n)))))}function m(n,r){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},n),r()}))}void 0===c&&1===p?m(f,(()=>t.if(f,(()=>t.break())))):0===p?(t.let(f,!0),void 0!==c&&t.if(r._`${o}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,(()=>e.reset()))}};t.default=a},5463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const r=n(15669),i=n(88936),a=n(3499);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>{const i=1===t?"property":"properties";return r.str`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>r._`{property: ${e},
|
|
7
7
|
missingProperty: ${i},
|
|
8
8
|
depsCount: ${t},
|
|
9
|
-
deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);s(e,t),p(e,n)}};function s(e,t=e.schema){const{gen:n,data:i,it:o}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const p in t){const c=t[p];if(0===c.length)continue;const u=(0,a.propertyInData)(n,i,p,o.opts.ownProperties);e.setParams({property:p,depsCount:c.length,deps:c.join(", ")}),o.allErrors?n.if(u,(()=>{for(const t of c)(0,a.checkReportMissingProp)(e,t)})):(n.if(r._`${u} && (${(0,a.checkMissingProp)(e,c,s)})`),(0,a.reportMissingProp)(e,s),n.else())}}function p(e,t=e.schema){const{gen:n,data:r,keyword:o,it:s}=e,p=n.name("valid");for(const c in t)(0,i.alwaysValidSchema)(s,t[c])||(n.if((0,a.propertyInData)(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:c},p);e.mergeValidEvaluated(t,p)}),(()=>n.var(p,!0))),e.ok(p))}t.validatePropertyDeps=s,t.validateSchemaDeps=p,t.default=o},50076:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:a}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(a,'"if" without "then" and "else" is ignored');const s=o(a,"then"),p=o(a,"else");if(!s&&!p)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&p){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,l("then",n),l("else",n))}else s?t.if(u,l("then")):t.if((0,r.not)(u),l("else"));function l(n,i){return()=>{const a=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(a,c),i?t.assign(i,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function o(e,t){const n=e.schema[t];return void 0!==n&&!(0,i.alwaysValidSchema)(e,n)}t.default=a},46951:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(78891),i=n(21162),a=n(98634),o=n(65151),s=n(95609),p=n(5463),c=n(53021),u=n(24943),l=n(34243),d=n(98103),f=n(72869),h=n(54279),m=n(14880),v=n(22609),y=n(50076),b=n(25316);t.default=function(e=!1){const t=[f.default,h.default,m.default,v.default,y.default,b.default,c.default,u.default,p.default,l.default,d.default];return e?t.push(i.default,o.default):t.push(r.default,a.default),t.push(s.default),t}},98634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(15669),i=n(88936),a=n(3499),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,(0,i.alwaysValidSchema)(n,t)||e.ok((0,a.validateArray)(e))}};function s(e,t,n=e.schema){const{gen:a,parentSchema:o,data:s,keyword:p,it:c}=e;!function(e){const{opts:r,errSchemaPath:a}=c,o=n.length,s=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${p}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,i.checkStrictMode)(c,e,r.strictTuples)}}(o),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(a,n.length,c.items));const u=a.name("valid"),l=a.const("len",r._`${s}.length`);n.forEach(((t,n)=>{(0,i.alwaysValidSchema)(c,t)||(a.if(r._`${l} > ${n}`,(()=>e.subschema({keyword:p,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=o},65151:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(3499),o=n(78891),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:s}=n;r.items=!0,(0,i.alwaysValidSchema)(r,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,a.validateArray)(e)))}};t.default=s},72869:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(88936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:i}=e;if((0,r.alwaysValidSchema)(i,n))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},14880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>r._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:a,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const s=n,p=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((n,a)=>{let s;(0,i.alwaysValidSchema)(o,n)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if(r._`${u} && ${p}`).assign(p,!1).assign(c,r._`[${c}, ${a}]`).else(),t.if(u,(()=>{t.assign(p,!0),t.assign(c,a),s&&e.mergeEvaluated(s,r.Name)}))}))})),e.result(p,(()=>e.reset()),(()=>e.error(!0)))}};t.default=a},98103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a=n(88936),o=n(88936),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:s,parentSchema:p,it:c}=e,{opts:u}=c,l=(0,r.allSchemaProperties)(n),d=l.filter((e=>(0,a.alwaysValidSchema)(c,n[e])));if(0===l.length||d.length===l.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&p.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,o.evaluatedPropsToName)(t,c.props));const{props:m}=c;function v(e){for(const t in f)new RegExp(e).test(t)&&(0,a.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(n){t.forIn("key",s,(a=>{t.if(i._`${(0,r.usePattern)(e,n)}.test(${a})`,(()=>{const r=d.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:a,dataPropType:o.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${a}]`,!0):r||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of l)f&&v(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},21162:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(98634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")};t.default=i},34243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91686),i=n(3499),a=n(88936),o=n(24943),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:s,data:p,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new r.KeywordCxt(c,o.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(n);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=a.mergeEvaluated.props(t,(0,a.toHash)(u),c.props));const l=u.filter((e=>!(0,a.alwaysValidSchema)(c,n[e])));if(0===l.length)return;const d=t.name("valid");for(const n of l)f(n)?h(n):(t.if((0,i.propertyInData)(t,p,n,c.opts.ownProperties)),h(n),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(d);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=s},53021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>r._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:a,it:o}=e;if((0,i.alwaysValidSchema)(o,n))return;const s=t.name("valid");t.forIn("key",a,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},s),t.if((0,r.not)(s),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(s)}};t.default=a},25316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(88936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(15669),i=n(88936),a=n(17250),o=n(88936);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function p(e,t,n){return r._`${s(e)}.call(${t}, ${n})`}function c(e,t,n,i){const a=r._`${t}${(0,r.getProperty)(n)} === undefined`;return i?(0,r.or)(a,(0,r.not)(p(e,t,n))):a}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:i,it:a}=e;n.if(c(n,i,t,a.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},i,a){return(0,r.or)(...i.map((i=>(0,r.and)(c(e,t,i,n.ownProperties),r._`${a} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=p,t.propertyInData=function(e,t,n,i){const a=r._`${t}${(0,r.getProperty)(n)} !== undefined`;return i?r._`${a} && ${p(e,t,n)}`:a},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((n=>!(0,i.alwaysValidSchema)(e,t[n])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:o,errorPath:s},it:p},c,u,l){const d=l?r._`${e}, ${t}, ${i}${o}`:t,f=[[a.default.instancePath,(0,r.strConcat)(a.default.instancePath,s)],[a.default.parentData,p.parentData],[a.default.parentDataProperty,p.parentDataProperty],[a.default.rootData,a.default.rootData]];p.opts.dynamicRef&&f.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);const h=r._`${d}, ${n.object(...f)}`;return u!==r.nil?r._`${c}.call(${u}, ${h})`:r._`${c}(${h})`};const l=r._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},n){const i=t.unicodeRegExp?"u":"",{regExp:a}=t.code,s=a(n,i);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:r._`${"new RegExp"===a.code?l:(0,o.useFunc)(e,a)}(${n}, ${i})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:a,it:o}=e,s=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return p((()=>t.assign(e,!1))),e}return t.var(s,!0),p((()=>t.break())),s;function p(o){const p=t.const("len",r._`${n}.length`);t.forRange("i",0,p,(n=>{e.subschema({keyword:a,dataProp:n,dataPropType:i.Type.Num},s),t.if((0,r.not)(s),o)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:a,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>(0,i.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),p=t.name("_valid");t.block((()=>n.forEach(((n,i)=>{const o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},p);t.assign(s,r._`${s} || ${p}`),e.mergeValidEvaluated(o,p)||t.if((0,r.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},71018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},32101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(71018),i=n(41939),a=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default];t.default=a},41939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(91578),i=n(3499),a=n(15669),o=n(17250),s=n(87382),p=n(88936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:i}=e,{baseId:o,schemaEnv:p,validateName:c,opts:d,self:f}=i,{root:h}=p;if(("#"===n||"#/"===n)&&o===h.baseId)return function(){if(p===h)return l(e,c,p,p.$async);const n=t.scopeValue("root",{ref:h});return l(e,a._`${n}.validate`,h,h.$async)}();const m=s.resolveRef.call(f,h,o,n);if(void 0===m)throw new r.default(i.opts.uriResolver,o,n);return m instanceof s.SchemaEnv?function(t){const n=u(e,t);l(e,n,t,t.$async)}(m):function(r){const i=t.scopeValue("schema",!0===d.code.source?{ref:r,code:(0,a.stringify)(r)}:{ref:r}),o=t.name("valid"),s=e.subschema({schema:r,dataTypes:[],schemaPath:a.nil,topSchemaRef:i,errSchemaPath:n},o);e.mergeEvaluated(s),e.ok(o)}(m)}};function u(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):a._`${n.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,n,r){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:l,opts:d}=c,f=d.passContext?o.default.this:a.nil;function h(e){const t=a._`${e}.errors`;s.assign(o.default.vErrors,a._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),s.assign(o.default.errors,a._`${o.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=p.mergeEvaluated.props(s,r.props,c.props));else{const t=s.var("props",a._`${e}.evaluated.props`);c.props=p.mergeEvaluated.props(s,t,c.props,a.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=p.mergeEvaluated.items(s,r.items,c.items));else{const t=s.var("items",a._`${e}.evaluated.items`);c.items=p.mergeEvaluated.items(s,t,c.items,a.Name)}}r?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const n=s.let("valid");s.try((()=>{s.code(a._`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),u||s.assign(n,!0)}),(e=>{s.if(a._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(n,!1)})),e.ok(n)}():e.result((0,i.callValidateCode)(e,t,f),(()=>m(t)),(()=>h(t)))}t.getValidate=u,t.callRef=l,t.default=c},30002:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(77421),a=n(87382),o=n(88936),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>r._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:s,parentSchema:p,it:c}=e,{oneOf:u}=p;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=s.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),f=t.const("tag",r._`${n}${(0,r.getProperty)(l)}`);function h(n){const i=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:n},i);return e.mergeEvaluated(a,r.Name),i}t.if(r._`typeof ${f} == "string"`,(()=>function(){const n=function(){var e;const t={},n=i(p);let r=!0;for(let t=0;t<u.length;t++){let p=u[t];(null==p?void 0:p.$ref)&&!(0,o.schemaHasRulesButRef)(p,c.self.RULES)&&(p=a.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==p?void 0:p.$ref),p instanceof a.SchemaEnv&&(p=p.schema));const d=null===(e=null==p?void 0:p.properties)||void 0===e?void 0:e[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);r=r&&(n||i(p)),s(d,t)}if(!r)throw new Error(`discriminator: "${l}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(l)}function s(e,t){if(e.const)d(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const n of e.enum)d(n,t)}}function d(e,n){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${l}" values must be unique strings`);t[e]=n}}();t.if(!1);for(const e in n)t.elseIf(r._`${f} === ${e}`),t.assign(d,h(n[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:f,tagName:l}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:f,tagName:l}))),e.ok(d)}};t.default=s},77421:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"},35671:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(32101),i=n(37499),a=n(46951),o=n(4480),s=n(32480),p=[r.default,i.default,(0,a.default)(),o.default,s.metadataVocabulary,s.contentVocabulary];t.default=p},73599:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match format "${e}"`,params:({schemaCode:e})=>r._`{format: ${e}}`},code(e,t){const{gen:n,data:i,$data:a,schema:o,schemaCode:s,it:p}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=p;c.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),o=n.const("fDef",r._`${a}[${s}]`),p=n.let("fType"),u=n.let("format");n.if(r._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>n.assign(p,r._`${o}.type || "string"`).assign(u,r._`${o}.validate`)),(()=>n.assign(p,r._`"string"`).assign(u,o))),e.fail$data((0,r.or)(!1===c.strictSchema?r.nil:r._`${s} && !${u}`,function(){const e=l.$async?r._`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:r._`${u}(${i})`,n=r._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return r._`${u} && ${u} !== true && ${p} === ${t} && !${n}`}()))}():function(){const a=d.formats[o];if(!a)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}d.logger.warn(e())}();if(!0===a)return;const[s,p,f]=function(e){const t=e instanceof RegExp?(0,r.regexpCode)(e):c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(o)}`:void 0,i=n.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,r._`${i}.validate`]}(a);s===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!l.$async)throw new Error("async format in sync schema");return r._`await ${f}(${i})`}return"function"==typeof p?r._`${f}(${i})`:r._`${f}.test(${i})`}())}())}};t.default=i},4480:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(73599).default];t.default=r},32480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},36577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(94285),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>r._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:o,schemaCode:s,schema:p}=e;o||p&&"object"==typeof p?e.fail$data(r._`!${(0,i.useFunc)(t,a.default)}(${n}, ${s})`):e.fail(r._`${p} !== ${n}`)}};t.default=o},59450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(94285),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>r._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:o,schema:s,schemaCode:p,it:c}=e;if(!o&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let l;const d=()=>null!=l?l:l=(0,i.useFunc)(t,a.default);let f;if(u||o)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",p,(e=>t.if(r._`${d()}(${n}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",p);f=(0,r.or)(...s.map(((t,i)=>function(e,t){const i=s[t];return"object"==typeof i&&null!==i?r._`${d()}(${n}, ${e}[${t}])`:r._`${n} === ${i}`}(e,i))))}e.pass(f)}};t.default=o},37499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(31337),i=n(59706),a=n(99507),o=n(51216),s=n(70034),p=n(96962),c=n(61135),u=n(10194),l=n(36577),d=n(59450),f=[r.default,i.default,a.default,o.default,s.default,p.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];t.default=f},61135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxItems"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,a="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${a} ${i}`)}};t.default=i},99507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(49161),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxLength"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:o,it:s}=e,p="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===s.opts.unicode?r._`${n}.length`:r._`${(0,i.useFunc)(e.gen,a.default)}(${n})`;e.fail$data(r._`${c} ${p} ${o}`)}};t.default=o},31337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=r.operators,a={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:e,schemaCode:t})=>r.str`must be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${a[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:n,schemaCode:i}=e;e.fail$data(r._`${n} ${a[t].fail} ${i} || isNaN(${n})`)}};t.default=s},70034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,a="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${a} ${i}`)}};t.default=i},59706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>r.str`must be multiple of ${e}`,params:({schemaCode:e})=>r._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),p=o?r._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:r._`${s} !== parseInt(${s})`;e.fail$data(r._`(${i} === 0 || (${s} = ${n}/${i}, ${p}))`)}};t.default=i},51216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:a,schemaCode:o,it:s}=e,p=s.opts.unicodeRegExp?"u":"",c=n?i._`(new RegExp(${o}, ${p}))`:(0,r.usePattern)(e,a);e.fail$data(i._`!${c}.test(${t})`)}};t.default=a},96962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a=n(88936),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:o,data:s,$data:p,it:c}=e,{opts:u}=c;if(!p&&0===n.length)return;const l=n.length>=u.loopRequired;if(c.allErrors?function(){if(l||p)e.block$data(i.nil,d);else for(const t of n)(0,r.checkReportMissingProp)(e,t)}():function(){const a=t.let("missing");if(l||p){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,a){e.setParams({missingProperty:n}),t.forOf(n,o,(()=>{t.assign(a,(0,r.propertyInData)(t,s,n,u.ownProperties)),t.if((0,i.not)(a),(()=>{e.error(),t.break()}))}),i.nil)}(a,n))),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,a)),(0,r.reportMissingProp)(e,a),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,a.checkStrictMode)(c,t,c.opts.strictRequired)}}function d(){t.forOf("prop",o,(n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,s,n,u.ownProperties),(()=>e.error()))}))}}};t.default=o},10194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(97332),i=n(15669),a=n(88936),o=n(94285),s={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},p={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s,code(e){const{gen:t,data:n,$data:s,schema:p,parentSchema:c,schemaCode:u,it:l}=e;if(!s&&!p)return;const d=t.let("valid"),f=c.items?(0,r.getSchemaTypes)(c.items):[];function h(a,o){const s=t.name("item"),p=(0,r.checkDataTypes)(f,s,l.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${a}--;`,(()=>{t.let(s,i._`${n}[${a}]`),t.if(p,i._`continue`),f.length>1&&t.if(i._`typeof ${s} == "string"`,i._`${s} += "_"`),t.if(i._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(o,i._`${c}[${s}]`),e.error(),t.assign(d,!1).break()})).code(i._`${c}[${s}] = ${a}`)}))}function m(r,s){const p=(0,a.useFunc)(t,o.default),c=t.name("outer");t.label(c).for(i._`;${r}--;`,(()=>t.for(i._`${s} = ${r}; ${s}--;`,(()=>t.if(i._`${p}(${n}[${r}], ${n}[${s}])`,(()=>{e.error(),t.assign(d,!1).break(c)}))))))}e.block$data(d,(function(){const r=t.let("i",i._`${n}.length`),a=t.let("j");e.setParams({i:r,j:a}),t.assign(d,!0),t.if(i._`${r} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(r,a)))}),i._`${u} === false`),e.ok(d)}};t.default=p},22943:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,i,a,o,s,p,c,u,l){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var d in r(a,o,s,p,c,u,l),a){var f=a[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var h=0;h<f.length;h++)n(e,r,i,f[h],o+"/"+d+"/"+h,s,o,d,a,h)}else if(d in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)n(e,r,i,f[m],o+"/"+d+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,d,a,m)}else(d in t.keywords||e.allKeys&&!(d in t.skipKeywords))&&n(e,r,i,f,o+"/"+d,s,o,d,a)}i(a,o,s,p,c,u,l)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},21865:e=>{"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},84878:(e,t,n)=>{e.exports={parallel:n(79050),serial:n(32451),serialOrdered:n(86709)}},88813:e=>{function t(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(t.bind(e)),e.jobs={}}},9127:(e,t,n)=>{var r=n(4701);e.exports=function(e){var t=!1;return r((function(){t=!0})),function(n,i){t?e(n,i):r((function(){e(n,i)}))}}},4701:e=>{e.exports=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}},72751:(e,t,n)=>{var r=n(9127),i=n(88813);e.exports=function(e,t,n,a){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=function(e,t,n,i){return 2==e.length?e(n,r(i)):e(n,t,r(i))}(t,o,e[o],(function(e,t){o in n.jobs&&(delete n.jobs[o],e?i(n):n.results[o]=t,a(e,n.results))}))}},37178:e=>{e.exports=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])}),r}},78694:(e,t,n)=>{var r=n(88813),i=n(9127);e.exports=function(e){Object.keys(this.jobs).length&&(this.index=this.size,r(this),i(e)(null,this.results))}},79050:(e,t,n)=>{var r=n(72751),i=n(37178),a=n(78694);e.exports=function(e,t,n){for(var o=i(e);o.index<(o.keyedList||e).length;)r(e,t,o,(function(e,t){e?n(e,t):0!==Object.keys(o.jobs).length||n(null,o.results)})),o.index++;return a.bind(o,n)}},32451:(e,t,n)=>{var r=n(86709);e.exports=function(e,t,n){return r(e,t,null,n)}},86709:(e,t,n)=>{var r=n(72751),i=n(37178),a=n(78694);function o(e,t){return e<t?-1:e>t?1:0}e.exports=function(e,t,n,o){var s=i(e,n);return r(e,t,s,(function n(i,a){i?o(i,a):(s.index++,s.index<(s.keyedList||e).length?r(e,t,s,n):o(null,s.results))})),a.bind(s,o)},e.exports.ascending=o,e.exports.descending=function(e,t){return-1*o(e,t)}},11137:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BSONError:()=>s,BSONRegExp:()=>qe,BSONSymbol:()=>Ue,BSONTypeError:()=>p,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ne,BSON_BINARY_SUBTYPE_COLUMN:()=>se,BSON_BINARY_SUBTYPE_DEFAULT:()=>ee,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>oe,BSON_BINARY_SUBTYPE_FUNCTION:()=>te,BSON_BINARY_SUBTYPE_MD5:()=>ae,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>pe,BSON_BINARY_SUBTYPE_UUID:()=>re,BSON_BINARY_SUBTYPE_UUID_NEW:()=>ie,BSON_DATA_ARRAY:()=>R,BSON_DATA_BINARY:()=>M,BSON_DATA_BOOLEAN:()=>L,BSON_DATA_CODE:()=>W,BSON_DATA_CODE_W_SCOPE:()=>H,BSON_DATA_DATE:()=>V,BSON_DATA_DBPOINTER:()=>z,BSON_DATA_DECIMAL128:()=>Y,BSON_DATA_INT:()=>K,BSON_DATA_LONG:()=>J,BSON_DATA_MAX_KEY:()=>X,BSON_DATA_MIN_KEY:()=>Z,BSON_DATA_NULL:()=>q,BSON_DATA_NUMBER:()=>A,BSON_DATA_OBJECT:()=>F,BSON_DATA_OID:()=>B,BSON_DATA_REGEXP:()=>U,BSON_DATA_STRING:()=>I,BSON_DATA_SYMBOL:()=>Q,BSON_DATA_TIMESTAMP:()=>G,BSON_DATA_UNDEFINED:()=>$,BSON_INT32_MAX:()=>j,BSON_INT32_MIN:()=>k,BSON_INT64_MAX:()=>T,BSON_INT64_MIN:()=>N,Binary:()=>ce,Code:()=>le,DBRef:()=>fe,Decimal128:()=>Ae,Double:()=>Ie,EJSON:()=>tt,Int32:()=>Fe,Long:()=>we,LongWithoutOverridesClass:()=>ze,Map:()=>nt,MaxKey:()=>Re,MinKey:()=>Me,ObjectID:()=>Ve,ObjectId:()=>Ve,Timestamp:()=>We,UUID:()=>ue,calculateObjectSize:()=>Ht,default:()=>Gt,deserialize:()=>Qt,deserializeStream:()=>Kt,serialize:()=>zt,serializeWithBufferAndIndex:()=>Wt,setInternalBufferSize:()=>Ut});const r=require("buffer");var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)};function a(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},s=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return a(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),p=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return a(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function c(e){return e&&e.Math==Math&&e}function u(){return c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof global&&global)||Function("return this")()}function l(e){return e.toString().replace("function(","function (")}var d=function(e){var t,n="object"==typeof(t=u()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var i=r.Buffer.alloc(e),a=0;a<e;++a)i[a]=Math.floor(256*Math.random());return i},f=function(){var e=void 0;try{e=n(6113).randomBytes}catch(e){}return e||d}();function h(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function m(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function v(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function y(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function g(e){return w(e)&&"[object Date]"===Object.prototype.toString.call(e)}function w(e){return"object"==typeof e&&null!==e}function _(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(t),n=!0),e.apply(this,r)}}function x(e){if(ArrayBuffer.isView(e))return r.Buffer.from(e.buffer,e.byteOffset,e.byteLength);if(h(e))return r.Buffer.from(e);throw new p("Must use either Buffer or TypedArray")}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,O=function(e){return"string"==typeof e&&D.test(e)},E=function(e){if(!O(e))throw new p('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return r.Buffer.from(t,"hex")},S=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},j=2147483647,k=-2147483648,T=Math.pow(2,63)-1,N=-Math.pow(2,63),P=Math.pow(2,53),C=-Math.pow(2,53),A=1,I=2,F=3,R=4,M=5,$=6,B=7,L=8,V=9,q=10,U=11,z=12,W=13,Q=14,H=15,K=16,G=17,J=18,Y=19,Z=255,X=127,ee=0,te=1,ne=2,re=3,ie=4,ae=5,oe=6,se=7,pe=128,ce=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new p("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=r.Buffer.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=r.Buffer.from(t,"binary"):Array.isArray(t)?this.buffer=r.Buffer.from(t):this.buffer=x(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new p("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new p("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||n>255)throw new p("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var i=r.Buffer.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i,this.buffer[this.position++]=n}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var n=r.Buffer.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(x(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===n.length?"0"+n:n}:{$binary:{base64:t,subType:1===n.length?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new ue(this.buffer.slice(0,this.position));throw new s('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){var i,a;if(n=n||{},"$binary"in t?n.legacy&&"string"==typeof t.$binary&&"$type"in t?(a=t.$type?parseInt(t.$type,16):0,i=r.Buffer.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(a=t.$binary.subType?parseInt(t.$binary.subType,16):0,i=r.Buffer.from(t.$binary.base64,"base64")):"$uuid"in t&&(a=4,i=E(t.$uuid)),!i)throw new p("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return a===ie?new ue(i):new e(i,a)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(ce.prototype,"_bsontype",{value:"Binary"});var ue=function(e){function t(n){var i,a,o=this;if(null==n)i=t.generate();else if(n instanceof t)i=r.Buffer.from(n.buffer),a=n.__id;else if(ArrayBuffer.isView(n)&&16===n.byteLength)i=x(n);else{if("string"!=typeof n)throw new p("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");i=E(n)}return(o=e.call(this,i,ie)||this).__id=a,o}return a(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=S(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var n=S(this.id,e);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new ce(this.id,ce.SUBTYPE_UUID)},t.generate=function(){var e=f(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,r.Buffer.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?O(e):!!m(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(E(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(ce),le=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function de(e){return w(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(le.prototype,"_bsontype",{value:"Code"});var fe=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var a=t.split(".");2===a.length&&(r=a.shift(),t=a.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(fe.prototype,"_bsontype",{value:"DBRef"});var he=void 0;try{he=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var me=4294967296,ve=0x10000000000000000,ye=ve/2,be={},ge={},we=function(){function e(t,n,r){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,n,r);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!n)):"string"==typeof t?Object.assign(this,e.fromString(t,!!n)):(this.low=0|t,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,a;return n?(a=0<=(t>>>=0)&&t<256)&&(i=ge[t])?i:(r=e.fromBits(t,(0|t)<0?-1:0,!0),a&&(ge[t]=r),r):(a=-128<=(t|=0)&&t<128)&&(i=be[t])?i:(r=e.fromBits(t,t<0?-1:0,!1),a&&(be[t]=r),r)},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=ve)return e.MAX_UNSIGNED_VALUE}else{if(t<=-ye)return e.MIN_VALUE;if(t+1>=ye)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%me|0,t/me|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),n,r).neg();for(var a=e.fromNumber(Math.pow(r,8)),o=e.ZERO,s=0;s<t.length;s+=8){var p=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+p),r);if(p<8){var u=e.fromNumber(Math.pow(r,p));o=o.mul(u).add(e.fromNumber(c))}else o=(o=o.mul(a)).add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(e){return w(e)&&!0===e.__isLong__},e.fromValue=function(t,n){return"number"==typeof t?e.fromNumber(t,n):"string"==typeof t?e.fromString(t,n):e.fromBits(t.low,t.high,"boolean"==typeof n?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,o=t.high>>>16,s=65535&t.high,p=t.low>>>16,c=0,u=0,l=0,d=0;return l+=(d+=a+(65535&t.low))>>>16,d&=65535,u+=(l+=i+p)>>>16,l&=65535,c+=(u+=r+s)>>>16,u&=65535,c+=n+o,c&=65535,e.fromBits(l<<16|d,c<<16|u,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(he){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var n=(this.unsigned?he.div_u:he.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;a=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(r=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),a=r.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),s=o<=48?1:Math.pow(2,o-48),p=e.fromNumber(r),c=p.mul(t);c.isNegative()||c.gt(i);)r-=s,c=(p=e.fromNumber(r,this.unsigned)).mul(t);p.isZero()&&(p=e.ONE),a=a.add(p),i=i.sub(c)}return a},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,n=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(n&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),he){var n=(this.unsigned?he.rem_u:he.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),he){var n=he.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,a=this.low>>>16,o=65535&this.low,s=t.high>>>16,p=65535&t.high,c=t.low>>>16,u=65535&t.low,l=0,d=0,f=0,h=0;return f+=(h+=o*u)>>>16,h&=65535,d+=(f+=a*u)>>>16,f&=65535,d+=(f+=o*c)>>>16,f&=65535,l+=(d+=i*u)>>>16,d&=65535,l+=(d+=a*c)>>>16,d&=65535,l+=(d+=o*p)>>>16,d&=65535,l+=r*u+i*c+a*p+o*s,l&=65535,e.fromBits(f<<16|h,l<<16|d,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*me+(this.low>>>0):this.high*me+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var a=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,s="";;){var p=o.div(a),c=(o.sub(p.mul(a)).toInt()>>>0).toString(t);if((o=p).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(we.prototype,"__isLong__",{value:!0}),Object.defineProperty(we.prototype,"_bsontype",{value:"Long"});var _e=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,xe=/^(\+|-)?(Infinity|inf)$/i,De=/^(\+|-)?NaN$/i,Oe=6111,Ee=-6176,Se=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),je=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ke=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Te=/^([-+])?(\d+)?$/;function Ne(e){return!isNaN(parseInt(e,10))}function Pe(e){var t=we.fromNumber(1e9),n=we.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new we(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function Ce(e,t){throw new p('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var Ae=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!m(t))throw new p("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new p("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var n,i=!1,a=!1,o=!1,s=0,c=0,u=0,l=0,d=0,f=[0],h=0,m=0,v=0,y=0,b=0,g=0,w=new we(0,0),_=new we(0,0),x=0;if(t.length>=7e3)throw new p(t+" not a valid Decimal128 string");var D=t.match(_e),O=t.match(xe),E=t.match(De);if(!D&&!O&&!E||0===t.length)throw new p(t+" not a valid Decimal128 string");if(D){var S=D[2],j=D[4],k=D[5],T=D[6];j&&void 0===T&&Ce(t,"missing exponent power"),j&&void 0===S&&Ce(t,"missing exponent base"),void 0===j&&(k||T)&&Ce(t,"missing e before exponent")}if("+"!==t[x]&&"-"!==t[x]||(i="-"===t[x++]),!Ne(t[x])&&"."!==t[x]){if("i"===t[x]||"I"===t[x])return new e(r.Buffer.from(i?je:ke));if("N"===t[x])return new e(r.Buffer.from(Se))}for(;Ne(t[x])||"."===t[x];)"."!==t[x]?(h<34&&("0"!==t[x]||o)&&(o||(d=c),o=!0,f[m++]=parseInt(t[x],10),h+=1),o&&(u+=1),a&&(l+=1),c+=1,x+=1):(a&&Ce(t,"contains multiple periods"),a=!0,x+=1);if(a&&!c)throw new p(t+" not a valid Decimal128 string");if("e"===t[x]||"E"===t[x]){var N=t.substr(++x).match(Te);if(!N||!N[2])return new e(r.Buffer.from(Se));b=parseInt(N[0],10),x+=N[0].length}if(t[x])return new e(r.Buffer.from(Se));if(v=0,h){if(y=h-1,1!==(s=u))for(;0===f[d+s-1];)s-=1}else v=0,y=0,f[0]=0,u=1,h=1,s=0;for(b<=l&&l-b>16384?b=Ee:b-=l;b>Oe;){if((y+=1)-v>34){if(f.join("").match(/^0+$/)){b=Oe;break}Ce(t,"overflow")}b-=1}for(;b<Ee||h<u;){if(0===y&&s<h){b=Ee,s=0;break}if(h<u?u-=1:y-=1,b<Oe)b+=1;else{if(f.join("").match(/^0+$/)){b=Oe;break}Ce(t,"overflow")}}if(y-v+1<s){var P=c;a&&(d+=1,P+=1),i&&(d+=1,P+=1);var C=parseInt(t[d+y+1],10),A=0;if(C>=5&&(A=1,5===C))for(A=f[y]%2==1?1:0,g=d+y+2;g<P;g++)if(parseInt(t[g],10)){A=1;break}if(A)for(var I=y;I>=0;I--)if(++f[I]>9&&(f[I]=0,0===I)){if(!(b<Oe))return new e(r.Buffer.from(i?je:ke));b+=1,f[I]=1}}if(w=we.fromNumber(0),_=we.fromNumber(0),0===s)w=we.fromNumber(0),_=we.fromNumber(0);else if(y-v<17)for(I=v,_=we.fromNumber(f[I++]),w=new we(0,0);I<=y;I++)_=(_=_.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]));else{for(I=v,w=we.fromNumber(f[I++]);I<=y-17;I++)w=(w=w.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]));for(_=we.fromNumber(f[I++]);I<=y;I++)_=(_=_.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]))}var F,R,M,$,B=function(e,t){if(!e&&!t)return{high:we.fromNumber(0),low:we.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new we(e.getLowBits(),0),i=t.shiftRightUnsigned(32),a=new we(t.getLowBits(),0),o=n.multiply(i),s=n.multiply(a),p=r.multiply(i),c=r.multiply(a);return o=o.add(s.shiftRightUnsigned(32)),s=new we(s.getLowBits(),0).add(p).add(c.shiftRightUnsigned(32)),{high:o=o.add(s.shiftRightUnsigned(32)),low:c=s.shiftLeft(32).add(new we(c.getLowBits(),0))}}(w,we.fromString("100000000000000000"));B.low=B.low.add(_),R=_,((M=(F=B.low).high>>>0)<($=R.high>>>0)||M===$&&F.low>>>0<R.low>>>0)&&(B.high=B.high.add(we.fromNumber(1))),n=b+6176;var L={low:we.fromNumber(0),high:we.fromNumber(0)};B.high.shiftRightUnsigned(49).and(we.fromNumber(1)).equals(we.fromNumber(1))?(L.high=L.high.or(we.fromNumber(3).shiftLeft(61)),L.high=L.high.or(we.fromNumber(n).and(we.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(B.high.and(we.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(we.fromNumber(16383&n).shiftLeft(49)),L.high=L.high.or(B.high.and(we.fromNumber(562949953421311)))),L.low=B.low,i&&(L.high=L.high.or(we.fromString("9223372036854775808")));var V=r.Buffer.alloc(16);return x=0,V[x++]=255&L.low.low,V[x++]=L.low.low>>8&255,V[x++]=L.low.low>>16&255,V[x++]=L.low.low>>24&255,V[x++]=255&L.low.high,V[x++]=L.low.high>>8&255,V[x++]=L.low.high>>16&255,V[x++]=L.low.high>>24&255,V[x++]=255&L.high.low,V[x++]=L.high.low>>8&255,V[x++]=L.high.low>>16&255,V[x++]=L.high.low>>24&255,V[x++]=255&L.high.high,V[x++]=L.high.high>>8&255,V[x++]=L.high.high>>16&255,V[x++]=L.high.high>>24&255,new e(V)},e.prototype.toString=function(){for(var e,t=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,a,o,s=0,p=!1,c={parts:[0,0,0,0]},u=[];s=0;var l=this.bytes,d=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,f=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,h=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,m=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24;s=0,(new we(d,f),new we(h,m)).lessThan(we.ZERO)&&u.push("-");var v=m>>26&31;if(v>>3==3){if(30===v)return u.join("")+"Infinity";if(31===v)return"NaN";e=m>>15&16383,i=8+(m>>14&1)}else i=m>>14&7,e=m>>17&16383;var y=e-6176;if(c.parts[0]=(16383&m)+((15&i)<<14),c.parts[1]=h,c.parts[2]=f,c.parts[3]=d,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])p=!0;else for(o=3;o>=0;o--){var b=0,g=Pe(c);if(c=g.quotient,b=g.rem.low)for(a=8;a>=0;a--)n[9*o+a]=b%10,b=Math.floor(b/10)}if(p)t=1,n[s]=0;else for(t=36;!n[s];)t-=1,s+=1;var w=t-1+y;if(w>=34||w<=-7||y>0){if(t>34)return u.push("".concat(0)),y>0?u.push("E+".concat(y)):y<0&&u.push("E".concat(y)),u.join("");for(u.push("".concat(n[s++])),(t-=1)&&u.push("."),r=0;r<t;r++)u.push("".concat(n[s++]));u.push("E"),w>0?u.push("+".concat(w)):u.push("".concat(w))}else if(y>=0)for(r=0;r<t;r++)u.push("".concat(n[s++]));else{var _=t+y;if(_>0)for(r=0;r<_;r++)u.push("".concat(n[s++]));else u.push("0");for(u.push(".");_++<0;)u.push("0");for(r=0;r<t-Math.max(_-1,0);r++)u.push("".concat(n[s++]))}return u.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(Ae.prototype,"_bsontype",{value:"Decimal128"});var Ie=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(Ie.prototype,"_bsontype",{value:"Double"});var Fe=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Fe.prototype,"_bsontype",{value:"Int32"});var Re=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Re.prototype,"_bsontype",{value:"MaxKey"});var Me=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Me.prototype,"_bsontype",{value:"MinKey"});var $e=new RegExp("^[0-9a-fA-F]{24}$"),Be=null,Le=Symbol("id"),Ve=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new p("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in t&&"function"==typeof t.toHexString?r.Buffer.from(t.toHexString(),"hex"):t.id}else n=t;if(null==n||"number"==typeof n)this[Le]=e.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[Le]=n instanceof r.Buffer?n:x(n);else{if("string"!=typeof n)throw new p("Argument passed in does not match the accepted types");if(12===n.length){var i=r.Buffer.from(n);if(12!==i.byteLength)throw new p("Argument passed in must be a string of 12 bytes");this[Le]=i}else{if(24!==n.length||!$e.test(n))throw new p("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[Le]=r.Buffer.from(n,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[Le]},set:function(t){this[Le]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),i=r.Buffer.alloc(12);return i.writeUInt32BE(t,0),null===Be&&(Be=f(5)),i[4]=Be[0],i[5]=Be[1],i[6]=Be[2],i[7]=Be[3],i[8]=Be[4],i[11]=255&n,i[10]=n>>8&255,i[9]=n>>16&255,i},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[Le][11]===t[Le][11]&&this[Le].equals(t[Le]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&m(this.id))return t===r.Buffer.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return r.Buffer.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var n=t.toHexString(),i=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===i}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var n=r.Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new p("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(r.Buffer.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(Ve.prototype,"generate",{value:_((function(e){return Ve.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(Ve.prototype,"getInc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve.prototype,"get_inc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve,"get_inc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve.prototype,"_bsontype",{value:"ObjectID"});var qe=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new s("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new s("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new s("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new p("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(qe.prototype,"_bsontype",{value:"BSONRegExp"});var Ue=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(Ue.prototype,"_bsontype",{value:"Symbol"});var ze=we,We=function(e){function t(n,r){var i=this;return i instanceof t?(i=we.isLong(n)?e.call(this,n.low,n.high,!0)||this:w(n)&&void 0!==n.t&&void 0!==n.i?e.call(this,n.i,n.t,!0)||this:e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return a(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(we.fromInt(e,!0))},t.fromNumber=function(e){return new t(we.fromNumber(e,!0))},t.fromBits=function(e,n){return new t(e,n)},t.fromString=function(e,n){return new t(we.fromString(e,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=we.MAX_UNSIGNED_VALUE,t}(ze);function Qe(e){return w(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var He=2147483647,Ke=-2147483648,Ge=0x8000000000000000,Je=-0x8000000000000000,Ye={$oid:Ve,$binary:ce,$uuid:ce,$symbol:Ue,$numberInt:Fe,$numberDecimal:Ae,$numberDouble:Ie,$numberLong:we,$minKey:Me,$maxKey:Re,$regex:qe,$regularExpression:qe,$timestamp:We};function Ze(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=Ke&&e<=He)return new Fe(e);if(e>=Je&&e<=Ge)return we.fromNumber(e)}return new Ie(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),r=0;r<n.length;r++){var i=Ye[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var a=e.$date,o=new Date;return t.legacy?"number"==typeof a?o.setTime(a):"string"==typeof a&&o.setTime(Date.parse(a)):"string"==typeof a?o.setTime(Date.parse(a)):we.isLong(a)?o.setTime(a.toNumber()):"number"==typeof a&&t.relaxed&&o.setTime(a),o}if(null!=e.$code){var s=Object.assign({},e);return e.$scope&&(s.$scope=Ze(e.$scope)),le.fromExtendedJSON(e)}if(de(e)||e.$dbPointer){var p=e.$ref?e:e.$dbPointer;if(p instanceof fe)return p;var c=Object.keys(p).filter((function(e){return e.startsWith("$")})),u=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(u=!1)})),u)return fe.fromExtendedJSON(p)}return e}function Xe(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function et(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var n=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==n){var r=t.seenObjects.map((function(e){return e.propertyName})),i=r.slice(0,n).map((function(e){return"".concat(e," -> ")})).join(""),a=r[n],o=" -> "+r.slice(n+1,r.length-1).map((function(e){return"".concat(e," -> ")})).join(""),c=r[r.length-1],u=" ".repeat(i.length+a.length/2),l="-".repeat(o.length+(a.length+c.length)/2-1);throw new p("Converting circular structure to EJSON:\n"+" ".concat(i).concat(a).concat(o).concat(c,"\n")+" ".concat(u,"\\").concat(l,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return et(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||g(e)){var d=e.getTime(),f=d>-1&&d<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:Xe(e)}:t.relaxed&&f?{$date:Xe(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var h=e>=Je&&e<=Ge;if(e>=Ke&&e<=He)return{$numberInt:e.toString()};if(h)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||b(e)){var m=e.flags;if(void 0===m){var v=e.toString().match(/[gimuy]*$/);v&&(m=v[0])}return new qe(e.source,m).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new s("not an object instance");var n=e._bsontype;if(void 0===n){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var a=et(e[i],t);"__proto__"===i?Object.defineProperty(r,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):r[i]=a}finally{t.seenObjects.pop()}}return r}if(Qe(e)){var o=e;if("function"!=typeof o.toExtendedJSON){var c=rt[e._bsontype];if(!c)throw new p("Unrecognized or invalid _bsontype: "+e._bsontype);o=c(o)}return"Code"===n&&o.scope?o=new le(o.code,et(o.scope,t)):"DBRef"===n&&o.oid&&(o=new fe(et(o.collection,t),et(o.oid,t),et(o.db,t),et(o.fields,t))),o.toExtendedJSON(t)}throw new s("_bsontype must be a string, but was: "+typeof n)}(e,t):e}var tt,nt,rt={Binary:function(e){return new ce(e.value(),e.sub_type)},Code:function(e){return new le(e.code,e.scope)},DBRef:function(e){return new fe(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new Ae(e.bytes)},Double:function(e){return new Ie(e.value)},Int32:function(e){return new Fe(e.value)},Long:function(e){return we.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Re},MinKey:function(){return new Me},ObjectID:function(e){return new Ve(e)},ObjectId:function(e){return new Ve(e)},BSONRegExp:function(e){return new qe(e.pattern,e.options)},Symbol:function(e){return new Ue(e.value)},Timestamp:function(e){return We.fromBits(e.low,e.high)}};!function(e){function t(e,t){var n=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new s("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return Ze(t,n)}))}function n(e,t,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==t||"object"!=typeof t||Array.isArray(t)||(r=t,t=void 0,n=0);var i=et(e,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,n)}e.parse=t,e.stringify=n,e.serialize=function(e,t){return t=t||{},JSON.parse(n(e,t))},e.deserialize=function(e,n){return n=n||{},t(JSON.stringify(e),n)}}(tt||(tt={}));var it=u();function at(e,t,n){var r=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)r+=ot(i.toString(),e[i],t,!0,n);else for(var a in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)r+=ot(a,e[a],t,!1,n);return r}function ot(e,t,n,i,a){switch(void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===a&&(a=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+r.Buffer.byteLength(e,"utf8")+1+4+r.Buffer.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=C&&t<=P&&t>=k&&t<=j?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+5:(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;case"undefined":return i||!a?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||g(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||h(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+4+r.Buffer.byteLength(t.code.toString(),"utf8")+1+at(t.scope,n,a):(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+r.Buffer.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===ce.SUBTYPE_BYTE_ARRAY?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+r.Buffer.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+at(s,n,a)}return t instanceof RegExp||b(t)?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.pattern,"utf8")+1+r.Buffer.byteLength(t.options,"utf8")+1:(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+at(t,n,a)+1;case"function":if(t instanceof RegExp||b(t)||"[object RegExp]"===String.call(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(n&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+4+r.Buffer.byteLength(l(t),"utf8")+1+at(t.scope,n,a);if(n)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+r.Buffer.byteLength(l(t),"utf8")+1}return 0}function st(e,t,n){for(var r=0,i=t;i<n;i+=1){var a=e[i];if(r){if(128!=(192&a))return!1;r-=1}else if(128&a)if(192==(224&a))r=1;else if(224==(240&a))r=2;else{if(240!=(248&a))return!1;r=3}}return!r}nt=it.Map?it.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var n=e[t],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?[n,e._values[n].v]:void 0,done:void 0===n}}}},e.prototype.forEach=function(e,t){t=t||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];e.call(t,this._values[r].v,r,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?e._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var pt=we.fromNumber(P),ct=we.fromNumber(C),ut={};function lt(e,t,n){var r=(t=null==t?{}:t)&&t.index?t.index:0,i=e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24;if(i<5)throw new s("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new s("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new s("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+r>e.byteLength)throw new s("(bson size ".concat(i," + options.index ").concat(r," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[r+i-1])throw new s("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return ft(e,r,t,n)}var dt=/^\$ref$|^\$id$|^\$db$/;function ft(e,t,n,i){void 0===i&&(i=!1);var a,p=null!=n.evalFunctions&&n.evalFunctions,c=null!=n.cacheFunctions&&n.cacheFunctions,u=null==n.fieldsAsRaw?null:n.fieldsAsRaw,l=null!=n.raw&&n.raw,d="boolean"==typeof n.bsonRegExp&&n.bsonRegExp,f=null!=n.promoteBuffers&&n.promoteBuffers,h=null==n.promoteLongs||n.promoteLongs,m=null==n.promoteValues||n.promoteValues,v=null==n.validation?{utf8:!0}:n.validation,y=!0,b=new Set,g=v.utf8;if("boolean"==typeof g)a=g;else{y=!1;var w=Object.keys(g).map((function(e){return g[e]}));if(0===w.length)throw new s("UTF-8 validation setting cannot be empty");if("boolean"!=typeof w[0])throw new s("Invalid UTF-8 validation option, must specify boolean values");if(a=w[0],!w.every((function(e){return e===a})))throw new s("Invalid UTF-8 validation option - keys must be all true or all false")}if(!y)for(var _=0,x=Object.keys(g);_<x.length;_++){var D=x[_];b.add(D)}var O=t;if(e.length<5)throw new s("corrupt bson message < 5 bytes long");var E=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(E<5||E>e.length)throw new s("corrupt bson message");for(var S=i?[]:{},j=0,k=!i&&null,T=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var N=e[t++];if(0===N)break;for(var P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.byteLength)throw new s("Bad BSON Document: illegal CString");var C,ee=i?j++:e.toString("utf8",t,P);C=y||b.has(ee)?a:!a,!1!==k&&"$"===ee[0]&&(k=dt.test(ee));var te=void 0;if(t=P+1,N===I){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");te=mt(e,t,t+Pe-1,C),t+=Pe}else if(N===B){var ne=r.Buffer.alloc(12);e.copy(ne,0,t,t+12),te=new Ve(ne),t+=12}else if(N===K&&!1===m)te=new Fe(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(N===K)te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(N===A&&!1===m)te=new Ie(T.getFloat64(t,!0)),t+=8;else if(N===A)te=T.getFloat64(t,!0),t+=8;else if(N===V){var re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;te=new Date(new we(re,ae).toNumber())}else if(N===L){if(0!==e[t]&&1!==e[t])throw new s("illegal boolean type value");te=1===e[t++]}else if(N===F){var oe=t;if((Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Te>e.length-t)throw new s("bad embedded document length in bson");if(l)te=e.slice(t,t+Te);else{var se=n;y||(se=o(o({},n),{validation:{utf8:C}})),te=ft(e,oe,se,!1)}t+=Te}else if(N===R){oe=t;var pe=n,ue=t+(Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(u&&u[ee]){for(var he in pe={},n)pe[he]=n[he];pe.raw=!0}if(y||(pe=o(o({},pe),{validation:{utf8:C}})),te=ft(e,oe,pe,!0),0!==e[(t+=Te)-1])throw new s("invalid array terminator byte");if(t!==ue)throw new s("corrupted array bson")}else if(N===$)te=void 0;else if(N===q)te=null;else if(N===J){re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var me=new we(re,ae);te=h&&!0===m&&me.lessThanOrEqual(pt)&&me.greaterThanOrEqual(ct)?me.toNumber():me}else if(N===Y){var ve=r.Buffer.alloc(16);e.copy(ve,0,t,t+16),t+=16;var ye=new Ae(ve);te="toObject"in ye&&"function"==typeof ye.toObject?ye.toObject():ye}else if(N===M){var be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ge=be,_e=e[t++];if(be<0)throw new s("Negative binary type element size found");if(be>e.byteLength)throw new s("Binary type size larger than document size");if(null!=e.slice){if(_e===ce.SUBTYPE_BYTE_ARRAY){if((be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new s("Negative binary type element size found for subtype 0x02");if(be>ge-4)throw new s("Binary type with subtype 0x02 contains too long binary size");if(be<ge-4)throw new s("Binary type with subtype 0x02 contains too short binary size")}f&&m?te=e.slice(t,t+be):(te=new ce(e.slice(t,t+be),_e),_e===ie&&(te=te.toUUID()))}else{var xe=r.Buffer.alloc(be);if(_e===ce.SUBTYPE_BYTE_ARRAY){if((be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new s("Negative binary type element size found for subtype 0x02");if(be>ge-4)throw new s("Binary type with subtype 0x02 contains too long binary size");if(be<ge-4)throw new s("Binary type with subtype 0x02 contains too short binary size")}for(P=0;P<be;P++)xe[P]=e[t+P];te=f&&m?xe:_e===ie?new ce(e.slice(t,t+be),_e).toUUID():new ce(e.slice(t,t+be),_e)}t+=be}else if(N===U&&!1===d){for(P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");var De=e.toString("utf8",t,P);for(P=t=P+1;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");var Oe=e.toString("utf8",t,P);t=P+1;var Ee=new Array(Oe.length);for(P=0;P<Oe.length;P++)switch(Oe[P]){case"m":Ee[P]="m";break;case"s":Ee[P]="g";break;case"i":Ee[P]="i"}te=new RegExp(De,Ee.join(""))}else if(N===U&&!0===d){for(P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");for(De=e.toString("utf8",t,P),P=t=P+1;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");Oe=e.toString("utf8",t,P),t=P+1,te=new qe(De,Oe)}else if(N===Q){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");var Se=mt(e,t,t+Pe-1,C);te=m?Se:new Ue(Se),t+=Pe}else if(N===G)re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,te=new We(re,ae);else if(N===Z)te=new Me;else if(N===X)te=new Re;else if(N===W){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");var je=mt(e,t,t+Pe-1,C);te=p?c?ht(je,ut,S):ht(je):new le(je),t+=Pe}else if(N===H){var ke=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(ke<13)throw new s("code_w_scope total size shorter minimum expected length");if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");je=mt(e,t,t+Pe-1,C),oe=t+=Pe;var Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,Ne=ft(e,oe,n,!1);if(t+=Te,ke<8+Te+Pe)throw new s("code_w_scope total size is too short, truncating scope");if(ke>8+Te+Pe)throw new s("code_w_scope total size is too long, clips outer document");p?(te=c?ht(je,ut,S):ht(je)).scope=Ne:te=new le(je,Ne)}else{if(N!==z)throw new s("Detected unknown BSON type ".concat(N.toString(16),' for fieldname "').concat(ee,'"'));var Pe;if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");if(null!=v&&v.utf8&&!st(e,t,t+Pe-1))throw new s("Invalid UTF-8 string in BSON document");var Ce=e.toString("utf8",t,t+Pe-1);t+=Pe;var $e=r.Buffer.alloc(12);e.copy($e,0,t,t+12),ne=new Ve($e),t+=12,te=new fe(Ce,ne)}"__proto__"===ee?Object.defineProperty(S,ee,{value:te,writable:!0,enumerable:!0,configurable:!0}):S[ee]=te}if(E!==t-O){if(i)throw new s("corrupt array bson");throw new s("corrupt object bson")}if(!k)return S;if(de(S)){var Be=Object.assign({},S);return delete Be.$ref,delete Be.$id,delete Be.$db,new fe(S.$ref,S.$id,S.$db,Be)}return S}function ht(e,t,n){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(n)):new Function(e)}function mt(e,t,n,r){var i=e.toString("utf8",t,n);if(r)for(var a=0;a<i.length;a++)if(65533===i.charCodeAt(a)){if(!st(e,t,n))throw new s("Invalid UTF-8 string in BSON document");break}return i}var vt=/\x00/,yt=new Set(["$db","$ref","$id","$clusterTime"]);function bt(e,t,n,r,i){e[r++]=I;var a=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8");e[(r=r+a+1)-1]=0;var o=e.write(n,r+4,void 0,"utf8");return e[r+3]=o+1>>24&255,e[r+2]=o+1>>16&255,e[r+1]=o+1>>8&255,e[r]=o+1&255,r=r+4+o,e[r++]=0,r}var gt=new Uint8Array(8),wt=new DataView(gt.buffer,gt.byteOffset,gt.byteLength);function _t(e,t,n,r,i){return Number.isInteger(n)&&n>=k&&n<=j?(e[r++]=K,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255):(e[r++]=A,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,wt.setFloat64(0,n,!0),e.set(gt,r),r+=8),r}function xt(e,t,n,r,i){return e[r++]=q,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Dt(e,t,n,r,i){return e[r++]=L,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=n?1:0,r}function Ot(e,t,n,r,i){e[r++]=V,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=we.fromNumber(n.getTime()),o=a.getLowBits(),s=a.getHighBits();return e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,r}function Et(e,t,n,r,i){if(e[r++]=U,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,n.source&&null!=n.source.match(vt))throw Error("value "+n.source+" must not contain null bytes");return r+=e.write(n.source,r,void 0,"utf8"),e[r++]=0,n.ignoreCase&&(e[r++]=105),n.global&&(e[r++]=115),n.multiline&&(e[r++]=109),e[r++]=0,r}function St(e,t,n,r,i){if(e[r++]=U,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,null!=n.pattern.match(vt))throw Error("pattern "+n.pattern+" must not contain null bytes");return r+=e.write(n.pattern,r,void 0,"utf8"),e[r++]=0,r+=e.write(n.options.split("").sort().join(""),r,void 0,"utf8"),e[r++]=0,r}function jt(e,t,n,r,i){return null===n?e[r++]=q:"MinKey"===n._bsontype?e[r++]=Z:e[r++]=X,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function kt(e,t,n,r,i){if(e[r++]=B,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,"string"==typeof n.id)e.write(n.id,r,void 0,"binary");else{if(!m(n.id))throw new p("object ["+JSON.stringify(n)+"] is not a valid ObjectId");e.set(n.id.subarray(0,12),r)}return r+12}function Tt(e,t,n,r,i){e[r++]=M,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.length;return e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,e[r++]=ee,e.set(x(n),r),r+a}function Nt(e,t,n,r,i,a,o,p,c,u){void 0===i&&(i=!1),void 0===a&&(a=0),void 0===o&&(o=!1),void 0===p&&(p=!0),void 0===c&&(c=!1),void 0===u&&(u=[]);for(var l=0;l<u.length;l++)if(u[l]===n)throw new s("cyclic dependency detected");u.push(n),e[r++]=Array.isArray(n)?R:F,r+=c?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var d=Lt(e,n,i,r,a+1,o,p,u);return u.pop(),d}function Pt(e,t,n,r,i){return e[r++]=Y,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e.set(n.bytes.subarray(0,16),r),r+16}function Ct(e,t,n,r,i){e[r++]="Long"===n._bsontype?J:G,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.getLowBits(),o=n.getHighBits();return e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,r}function At(e,t,n,r,i){return n=n.valueOf(),e[r++]=K,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255,r}function It(e,t,n,r,i){return e[r++]=A,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,wt.setFloat64(0,n.value,!0),e.set(gt,r),r+8}function Ft(e,t,n,r,i,a,o){e[r++]=W,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=l(n),p=e.write(s,r+4,void 0,"utf8")+1;return e[r]=255&p,e[r+1]=p>>8&255,e[r+2]=p>>16&255,e[r+3]=p>>24&255,r=r+4+p-1,e[r++]=0,r}function Rt(e,t,n,r,i,a,o,s,p){if(void 0===i&&(i=!1),void 0===a&&(a=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===p&&(p=!1),n.scope&&"object"==typeof n.scope){e[r++]=H,r+=p?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var c=r,u="string"==typeof n.code?n.code:n.code.toString();r+=4;var l=e.write(u,r+4,void 0,"utf8")+1;e[r]=255&l,e[r+1]=l>>8&255,e[r+2]=l>>16&255,e[r+3]=l>>24&255,e[r+4+l-1]=0,r=r+l+4;var d=Lt(e,n.scope,i,r,a+1,o,s);r=d-1;var f=d-c;e[c++]=255&f,e[c++]=f>>8&255,e[c++]=f>>16&255,e[c++]=f>>24&255,e[r++]=0}else{e[r++]=W,r+=p?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,u=n.code.toString();var h=e.write(u,r+4,void 0,"utf8")+1;e[r]=255&h,e[r+1]=h>>8&255,e[r+2]=h>>16&255,e[r+3]=h>>24&255,r=r+4+h-1,e[r++]=0}return r}function Mt(e,t,n,r,i){e[r++]=M,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.value(!0),o=n.position;return n.sub_type===ce.SUBTYPE_BYTE_ARRAY&&(o+=4),e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=n.sub_type,n.sub_type===ce.SUBTYPE_BYTE_ARRAY&&(o-=4,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255),e.set(a,r),r+n.position}function $t(e,t,n,r,i){e[r++]=Q,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=e.write(n.value,r+4,void 0,"utf8")+1;return e[r]=255&a,e[r+1]=a>>8&255,e[r+2]=a>>16&255,e[r+3]=a>>24&255,r=r+4+a-1,e[r++]=0,r}function Bt(e,t,n,r,i,a,o){e[r++]=F,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=r,p={$ref:n.collection||n.namespace,$id:n.oid};null!=n.db&&(p.$db=n.db);var c=Lt(e,p=Object.assign(p,n.fields),!1,r,i+1,a),u=c-s;return e[s++]=255&u,e[s++]=u>>8&255,e[s++]=u>>16&255,e[s++]=u>>24&255,c}function Lt(e,t,n,r,i,a,o,s){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===s&&(s=[]),r=r||0,(s=s||[]).push(t);var c,u=r+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var d="".concat(l);if("function"==typeof(null==(x=t[l])?void 0:x.toBSON)&&(x=x.toBSON()),"string"==typeof x)u=bt(e,d,x,u,!0);else if("number"==typeof x)u=_t(e,d,x,u,!0);else{if("bigint"==typeof x)throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof x)u=Dt(e,d,x,u,!0);else if(x instanceof Date||g(x))u=Ot(e,d,x,u,!0);else if(void 0===x)u=xt(e,d,0,u,!0);else if(null===x)u=xt(e,d,0,u,!0);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u,!0);else if(m(x))u=Tt(e,d,x,u,!0);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u,!0);else if("object"==typeof x&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!0,s);else if("object"==typeof x&&Qe(x)&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u,!0);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u,!0);else if("Double"===x._bsontype)u=It(e,d,x,u,!0);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,!0);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o,!0);else if("Binary"===x._bsontype)u=Mt(e,d,x,u,!0);else if("Symbol"===x._bsontype)u=$t(e,d,x,u,!0);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a,!0);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u,!0);else if("Int32"===x._bsontype)u=At(e,d,x,u,!0);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u,!0);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}else if(t instanceof nt||(c=t,"[object Map]"===Object.prototype.toString.call(c)))for(var f=t.entries(),h=!1;!h;){var w=f.next();if(!(h=!!w.done)){d=w.value[0];var _=typeof(x=w.value[1]);if("string"==typeof d&&!yt.has(d)){if(null!=d.match(vt))throw Error("key "+d+" must not contain null bytes");if(n){if("$"===d[0])throw Error("key "+d+" must not start with '$'");if(~d.indexOf("."))throw Error("key "+d+" must not contain '.'")}}if("string"===_)u=bt(e,d,x,u);else if("number"===_)u=_t(e,d,x,u);else{if("bigint"===_||v(x)||y(x))throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"===_)u=Dt(e,d,x,u);else if(x instanceof Date||g(x))u=Ot(e,d,x,u);else if(null===x||void 0===x&&!1===o)u=xt(e,d,0,u);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u);else if(m(x))u=Tt(e,d,x,u);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u);else if("object"===_&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!1,s);else if("object"===_&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u);else if("Double"===x._bsontype)u=It(e,d,x,u);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,a);else if("Binary"===x._bsontype)u=Mt(e,d,x,u);else if("Symbol"===x._bsontype)u=$t(e,d,x,u);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u);else if("Int32"===x._bsontype)u=At(e,d,x,u);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new p("toBSON function did not return an object");for(var d in t){var x;if("function"==typeof(null==(x=t[d])?void 0:x.toBSON)&&(x=x.toBSON()),_=typeof x,"string"==typeof d&&!yt.has(d)){if(null!=d.match(vt))throw Error("key "+d+" must not contain null bytes");if(n){if("$"===d[0])throw Error("key "+d+" must not start with '$'");if(~d.indexOf("."))throw Error("key "+d+" must not contain '.'")}}if("string"===_)u=bt(e,d,x,u);else if("number"===_)u=_t(e,d,x,u);else{if("bigint"===_)throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"===_)u=Dt(e,d,x,u);else if(x instanceof Date||g(x))u=Ot(e,d,x,u);else if(void 0===x)!1===o&&(u=xt(e,d,0,u));else if(null===x)u=xt(e,d,0,u);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u);else if(m(x))u=Tt(e,d,x,u);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u);else if("object"===_&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!1,s);else if("object"===_&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u);else if("Double"===x._bsontype)u=It(e,d,x,u);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,a);else if("Binary"===x._bsontype)u=Mt(e,d,x,u);else if("Symbol"===x._bsontype)u=$t(e,d,x,u);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u);else if("Int32"===x._bsontype)u=At(e,d,x,u);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}}s.pop(),e[u++]=0;var D=u-r;return e[r++]=255&D,e[r++]=D>>8&255,e[r++]=D>>16&255,e[r++]=D>>24&255,u}var Vt=17825792,qt=r.Buffer.alloc(Vt);function Ut(e){qt.length<e&&(qt=r.Buffer.alloc(e))}function zt(e,t){void 0===t&&(t={});var n="boolean"==typeof t.checkKeys&&t.checkKeys,i="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,a="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:Vt;qt.length<o&&(qt=r.Buffer.alloc(o));var s=Lt(qt,e,n,0,0,i,a,[]),p=r.Buffer.alloc(s);return qt.copy(p,0,0,p.length),p}function Wt(e,t,n){void 0===n&&(n={});var r="boolean"==typeof n.checkKeys&&n.checkKeys,i="boolean"==typeof n.serializeFunctions&&n.serializeFunctions,a="boolean"!=typeof n.ignoreUndefined||n.ignoreUndefined,o="number"==typeof n.index?n.index:0,s=Lt(qt,e,r,0,0,i,a);return qt.copy(t,o,0,s),o+s-1}function Qt(e,t){return void 0===t&&(t={}),lt(e instanceof r.Buffer?e:x(e),t)}function Ht(e,t){return void 0===t&&(t={}),at(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function Kt(e,t,n,r,i,a){for(var o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},a),s=x(e),p=t,c=0;c<n;c++){var u=s[p]|s[p+1]<<8|s[p+2]<<16|s[p+3]<<24;o.index=p,r[i+c]=lt(s,o),p+=u}return p}const Gt={Binary:ce,Code:le,DBRef:fe,Decimal128:Ae,Double:Ie,Int32:Fe,Long:we,UUID:ue,Map:nt,MaxKey:Re,MinKey:Me,ObjectId:Ve,ObjectID:Ve,BSONRegExp:qe,BSONSymbol:Ue,Timestamp:We,EJSON:tt,setInternalBufferSize:Ut,serialize:zt,serializeWithBufferAndIndex:Wt,deserialize:Qt,calculateObjectSize:Ht,deserializeStream:Kt,BSONError:s,BSONTypeError:p}},74464:(e,t,n)=>{var r=n(73837),i=n(12781).Stream,a=n(59444);function o(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=o,r.inherits(o,i),o.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},o.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},o.prototype.append=function(e){if(o.isStreamLike(e)){if(!(e instanceof a)){var t=a.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},o.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},o.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},o.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){o.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},o.prototype._pipeNext=function(e){if(this._currentStream=e,o.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},o.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},o.prototype.write=function(e){this.emit("data",e)},o.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},o.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},o.prototype.end=function(){this._reset(),this.emit("end")},o.prototype.destroy=function(){this._reset(),this.emit("close")},o.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},o.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},o.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},o.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},15699:(e,t,n)=>{const r=n(32889),i=r.default||r,a=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),i.call(this,e,t)};a.ponyfill=!0,e.exports=t=a,t.fetch=a,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,t.default=a},36926:(e,t,n)=>{"use strict";var r=n(85477),i=n(64847),a={TRANSITIONAL:0,NONTRANSITIONAL:1};function o(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function s(e){for(var t=0,n=i.length-1;t<=n;){var r=Math.floor((t+n)/2),a=i[r];if(a[0][0]<=e&&a[0][1]>=e)return a;a[0][0]>e?n=r-1:t=r+1}return null}var p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function c(e){return e.replace(p,"_").length}var u=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function l(e,t){"xn--"===e.substr(0,4)&&(e=r.toUnicode(e));var n=!1;(o(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(u))&&(n=!0);for(var i=c(e),p=0;p<i;++p){var l=s(e.codePointAt(p));if(d===a.TRANSITIONAL&&"valid"!==l[1]||d===a.NONTRANSITIONAL&&"valid"!==l[1]&&"deviation"!==l[1]){n=!0;break}}return{label:e,error:n}}function d(e,t,n){var r=function(e,t,n){for(var r=!1,i="",o=c(e),p=0;p<o;++p){var u=e.codePointAt(p),l=s(u);switch(l[1]){case"disallowed":r=!0,i+=String.fromCodePoint(u);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,l[2]);break;case"deviation":i+=n===a.TRANSITIONAL?String.fromCodePoint.apply(String,l[2]):String.fromCodePoint(u);break;case"valid":i+=String.fromCodePoint(u);break;case"disallowed_STD3_mapped":t?(r=!0,i+=String.fromCodePoint(u)):i+=String.fromCodePoint.apply(String,l[2]);break;case"disallowed_STD3_valid":t&&(r=!0),i+=String.fromCodePoint(u)}}return{string:i,error:r}}(e,t,n);r.string=o(r.string);for(var i=r.string.split("."),p=0;p<i.length;++p)try{var u=l(i[p]);i[p]=u.label,r.error=r.error||u.error}catch(e){r.error=!0}return{string:i.join("."),error:r.error}}e.exports.toASCII=function(e,t,n,i){var a=d(e,t,n),o=a.string.split(".");if(o=o.map((function(e){try{return r.toASCII(e)}catch(t){return a.error=!0,e}})),i){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(a.error=!0);for(var p=0;p<o.length;++p)if(o.length>63||0===o.length){a.error=!0;break}}return a.error?null:o.join(".")},e.exports.toUnicode=function(e,t){var n=d(e,t,a.NONTRANSITIONAL);return{domain:n.string,error:n.error}},e.exports.PROCESSING_OPTIONS=a},71396:e=>{"use strict";var t={};function n(e){return e<0?-1:1}function r(e,t){t.unsigned||--e;const r=t.unsigned?0:-Math.pow(2,e),i=Math.pow(2,e)-1,a=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),o=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let p=+e;if(s.enforceRange){if(!Number.isFinite(p))throw new TypeError("Argument is not a finite number");if(p=n(p)*Math.floor(Math.abs(p)),p<r||p>i)throw new TypeError("Argument is not in byte range");return p}if(!isNaN(p)&&s.clamp)return p=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(p),p<r&&(p=r),p>i&&(p=i),p;if(!Number.isFinite(p)||0===p)return 0;if(p=n(p)*Math.floor(Math.abs(p)),p%=a,!t.unsigned&&p>=o)return p-a;if(t.unsigned)if(p<0)p+=a;else if(-0===p)return 0;return p}}e.exports=t,t.void=function(){},t.boolean=function(e){return!!e},t.byte=r(8,{unsigned:!1}),t.octet=r(8,{unsigned:!0}),t.short=r(16,{unsigned:!1}),t["unsigned short"]=r(16,{unsigned:!0}),t.long=r(32,{unsigned:!1}),t["unsigned long"]=r(32,{unsigned:!0}),t["long long"]=r(32,{unsigned:!1,moduloBitLength:64}),t["unsigned long long"]=r(32,{unsigned:!0,moduloBitLength:64}),t.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},t["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},t.float=t.double,t["unrestricted float"]=t["unrestricted double"],t.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},t.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},t.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const i=t.charCodeAt(e);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&i,a=1023&n;r.push(String.fromCodePoint(65536+1024*t+a)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},t.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},t.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e}},98911:(e,t,n)=>{"use strict";const r=n(19715);t.implementation=class{constructor(e){const t=e[0],n=e[1];let i=null;if(void 0!==n&&(i=r.basicURLParse(n),"failure"===i))throw new TypeError("Invalid base URL");const a=r.basicURLParse(t,{baseURL:i});if("failure"===a)throw new TypeError("Invalid URL");this._url=a}get href(){return r.serializeURL(this._url)}set href(e){const t=r.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return r.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){r.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){r.cannotHaveAUsernamePasswordPort(this._url)||r.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){r.cannotHaveAUsernamePasswordPort(this._url)||r.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?r.serializeHost(e.host):r.serializeHost(e.host)+":"+r.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||r.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":r.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||r.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":r.serializeInteger(this._url.port)}set port(e){r.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:r.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],r.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",r.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",r.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},46700:(e,t,n)=>{"use strict";const r=n(71396),i=n(22689),a=n(98911),o=i.implSymbol;function s(t){if(!this||this[o]||!(this instanceof s))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const n=[];for(let e=0;e<arguments.length&&e<2;++e)n[e]=arguments[e];n[0]=r.USVString(n[0]),void 0!==n[1]&&(n[1]=r.USVString(n[1])),e.exports.setup(this,n)}s.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const t=[];for(let e=0;e<arguments.length&&e<0;++e)t[e]=arguments[e];return this[o].toJSON.apply(this[o],t)},Object.defineProperty(s.prototype,"href",{get(){return this[o].href},set(e){e=r.USVString(e),this[o].href=e},enumerable:!0,configurable:!0}),s.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(s.prototype,"origin",{get(){return this[o].origin},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"protocol",{get(){return this[o].protocol},set(e){e=r.USVString(e),this[o].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"username",{get(){return this[o].username},set(e){e=r.USVString(e),this[o].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"password",{get(){return this[o].password},set(e){e=r.USVString(e),this[o].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"host",{get(){return this[o].host},set(e){e=r.USVString(e),this[o].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hostname",{get(){return this[o].hostname},set(e){e=r.USVString(e),this[o].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"port",{get(){return this[o].port},set(e){e=r.USVString(e),this[o].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pathname",{get(){return this[o].pathname},set(e){e=r.USVString(e),this[o].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"search",{get(){return this[o].search},set(e){e=r.USVString(e),this[o].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hash",{get(){return this[o].hash},set(e){e=r.USVString(e),this[o].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[o]instanceof a.implementation,create(e,t){let n=Object.create(s.prototype);return this.setup(n,e,t),n},setup(e,t,n){n||(n={}),n.wrapper=e,e[o]=new a.implementation(t,n),e[o][i.wrapperSymbol]=e},interface:s,expose:{Window:{URL:s},Worker:{URL:s}}}},74851:(e,t,n)=>{"use strict";t.URL=n(46700).interface,n(19715).serializeURL,n(19715).serializeURLOrigin,n(19715).basicURLParse,n(19715).setTheUsername,n(19715).setThePassword,n(19715).serializeHost,n(19715).serializeInteger,n(19715).parseURL},19715:(e,t,n)=>{"use strict";const r=n(85477),i=n(36926),a={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},o=Symbol("failure");function s(e){return r.ucs2.decode(e).length}function p(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function c(e){return e>=48&&e<=57}function u(e){return e>=65&&e<=90||e>=97&&e<=122}function l(e){return c(e)||e>=65&&e<=70||e>=97&&e<=102}function d(e){return"."===e||"%2e"===e.toLowerCase()}function f(e){return 2===e.length&&u(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function h(e){return void 0!==a[e]}function m(e){return h(e.scheme)}function v(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function y(e){return e<=31||e>126}const b=new Set([32,34,35,60,62,63,96,123,125]);function g(e){return y(e)||b.has(e)}const w=new Set([47,58,59,61,64,91,92,93,94,124]);function _(e){return g(e)||w.has(e)}function x(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=v(t[e]);return n}(n):n}function D(e){let t=10;return e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e?0:(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?o:parseInt(e,t)}function O(e,t){if("["===e[0])return"]"!==e[e.length-1]?o:function(e){const t=[0,0,0,0,0,0,0,0];let n=0,i=null,a=0;if(58===(e=r.ucs2.decode(e))[a]){if(58!==e[a+1])return o;a+=2,++n,i=n}for(;a<e.length;){if(8===n)return o;if(58===e[a]){if(null!==i)return o;++a,++n,i=n;continue}let r=0,s=0;for(;s<4&&l(e[a]);)r=16*r+parseInt(p(e,a),16),++a,++s;if(46===e[a]){if(0===s)return o;if(a-=s,n>6)return o;let r=0;for(;void 0!==e[a];){let i=null;if(r>0){if(!(46===e[a]&&r<4))return o;++a}if(!c(e[a]))return o;for(;c(e[a]);){const t=parseInt(p(e,a));if(null===i)i=t;else{if(0===i)return o;i=10*i+t}if(i>255)return o;++a}t[n]=256*t[n]+i,++r,2!==r&&4!==r||++n}if(4!==r)return o;break}if(58===e[a]){if(++a,void 0===e[a])return o}else if(void 0!==e[a])return o;t[n]=r,++n}if(null!==i){let e=n-i;for(n=7;0!==n&&e>0;){const r=t[i+e-1];t[i+e-1]=t[n],t[n]=r,--n,--e}}else if(null===i&&8!==n)return o;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return o;let t="";const n=r.ucs2.decode(e);for(let e=0;e<n.length;++e)t+=x(n[e],y);return t}(e);const n=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&l(t[e+1])&&l(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),a=i.toASCII(n,!1,i.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===a)return o;if(-1!==a.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return o;const s=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const n=[];for(const r of t){if(""===r)return e;const t=D(r);if(t===o)return e;n.push(t)}for(let e=0;e<n.length-1;++e)if(n[e]>255)return o;if(n[n.length-1]>=Math.pow(256,5-n.length))return o;let r=n.pop(),i=0;for(const e of n)r+=e*Math.pow(256,3-i),++i;return r}(a);return"number"==typeof s||s===o?s:a}function E(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,i=0;for(let a=0;a<e.length;++a)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),{idx:t,len:n}}(e),r=n.idx;let i=!1;for(let n=0;n<=7;++n)i&&0===e[n]||(i&&(i=!1),r!==n?(t+=e[n].toString(16),7!==n&&(t+=":")):(t+=0===n?"::":":",i=!0));return t}(e)+"]":e}function S(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function j(e){return""!==e.username||""!==e.password}function k(e,t,n,i,a){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=n||"utf-8",this.stateOverride=a,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=a||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=r.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),n=this["parse "+this.state](e,t);if(!n)break;if(n===o){this.failure=!0;break}}}k.prototype["parse scheme start"]=function(e,t){if(u(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,o;this.state="no scheme",--this.pointer}return!0},k.prototype["parse scheme"]=function(e,t){if(function(e){return u(e)||c(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(m(this.url)&&!h(this.buffer))return!1;if(!m(this.url)&&h(this.buffer))return!1;if((j(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):m(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":m(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,o;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},k.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?o:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},k.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},k.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},k.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):m(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},k.prototype["parse relative slash"]=function(e){return!m(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},k.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},k.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},k.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=s(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=x(e,_);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,o;this.pointer-=s(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},k.prototype["parse hostname"]=k.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e){if(--this.pointer,m(this.url)&&""===this.buffer)return this.parseError=!0,o;if(this.stateOverride&&""===this.buffer&&(j(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=O(this.buffer,m(this.url));if(e===o)return o;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,o;const e=O(this.buffer,m(this.url));if(e===o)return o;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},k.prototype["parse port"]=function(e,t){if(c(e))this.buffer+=t;else{if(!(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e||this.stateOverride))return this.parseError=!0,o;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,o;this.url.port=e===(n=this.url.scheme,a[n])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var n;return!0};const T=new Set([47,92,63,35]);k.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!u(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!T.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},k.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&u(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},k.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&f(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=O(this.buffer,m(this.url));if(e===o)return o;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},k.prototype["parse path start"]=function(e){return m(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},k.prototype["parse path"]=function(e){if(isNaN(e)||47===e||m(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(m(this.url)&&92===e&&(this.parseError=!0),".."===(t=(t=this.buffer).toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t?(S(this.url),47===e||m(this.url)&&92===e||this.url.path.push("")):!d(this.buffer)||47===e||m(this.url)&&92===e?d(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&f(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=x(e,g);var t;return!0},k.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+x(e,y))),!0},k.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){m(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=v(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},k.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=x(e,y))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=E(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=E(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new k(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=r.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=x(n[t],_)},e.exports.setThePassword=function(e,t){e.password="";const n=r.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=x(n[t],_)},e.exports.serializeHost=E,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}},22689:e=>{"use strict";e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}},96292:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(29374)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},29374:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(48628),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},41241:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(96292):e.exports=n(4428)},4428:(e,t,n)=>{const r=n(76224),i=n(73837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${r} [0m`;n[0]=a+n[0].split("\n").join("\n"+a),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(56974);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(29374)(t);const{formatters:a}=e.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},22091:function(e,t,n){var r,i;i=function(e){var t=["N","E","A","D"];function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,n){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function a(e,t){a.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function o(e,t){o.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function p(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}function l(e){var t=0,n=c(e);if("array"===n)return e.forEach((function(e){t+=l(e)})),t+u("[type: array, hash: "+t+"]");if("object"===n){for(var r in e)if(e.hasOwnProperty(r)){var i="[ type: object, key: "+r+", value hash: "+l(e[r])+"]";t+=u(i)}return t}return t+u("[ type: "+n+" ; value: "+e+"]")}function d(e,t,n,r,p,u,f,h){n=n||[],f=f||[];var m=(p=p||[]).slice(0);if(null!=u){if(r){if("function"==typeof r&&r(m,u))return;if("object"==typeof r){if(r.prefilter&&r.prefilter(m,u))return;if(r.normalize){var v=r.normalize(m,u,e,t);v&&(e=v[0],t=v[1])}}}m.push(u)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var y,b,g,w,_=typeof e,x=typeof t,D="undefined"!==_||f&&f.length>0&&f[f.length-1].lhs&&Object.getOwnPropertyDescriptor(f[f.length-1].lhs,u),O="undefined"!==x||f&&f.length>0&&f[f.length-1].rhs&&Object.getOwnPropertyDescriptor(f[f.length-1].rhs,u);if(!D&&O)n.push(new a(m,t));else if(!O&&D)n.push(new o(m,e));else if(c(e)!==c(t))n.push(new i(m,e,t));else if("date"===c(e)&&e-t!=0)n.push(new i(m,e,t));else if("object"===_&&null!==e&&null!==t){for(y=f.length-1;y>-1;--y)if(f[y].lhs===e){w=!0;break}if(w)e!==t&&n.push(new i(m,e,t));else{if(f.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return l(e)-l(t)})),t.sort((function(e,t){return l(e)-l(t)}))),y=t.length-1,b=e.length-1;y>b;)n.push(new s(m,y,new a(void 0,t[y--])));for(;b>y;)n.push(new s(m,b,new o(void 0,e[b--])));for(;y>=0;--y)d(e[y],t[y],n,r,m,y,f,h)}else{var E=Object.keys(e),S=Object.keys(t);for(y=0;y<E.length;++y)g=E[y],(w=S.indexOf(g))>=0?(d(e[g],t[g],n,r,m,g,f,h),S[w]=null):d(e[g],void 0,n,r,m,g,f,h);for(y=0;y<S.length;++y)(g=S[y])&&d(void 0,t[g],n,r,m,g,f,h)}f.length=f.length-1}}else e!==t&&("number"===_&&isNaN(e)&&isNaN(t)||n.push(new i(m,e,t)))}function f(e,t,n,r,i){var a=[];if(d(e,t,a,r,null,null,null,i),n)for(var o=0;o<a.length;++o)n(a[o]);return a}function h(e,t,n,r){var i=f(e,t,r?function(e){e&&r.push(e)}:void 0,n);return r||(i.length?i:void 0)}function m(e,t,n){if(n.path&&n.path.length){var r,i=e[t],a=n.path.length-1;for(r=0;r<a;r++)i=i[n.path[r]];switch(n.kind){case"A":m(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs}}else switch(n.kind){case"A":m(e[t],n.index,n.item);break;case"D":e=p(e,t);break;case"E":case"N":e[t]=n.rhs}return e}function v(e,n,r){if(void 0===r&&n&&~t.indexOf(n.kind)&&(r=n),e&&r&&r.kind){for(var i=e,a=-1,o=r.path?r.path.length-1:0;++a<o;)void 0===i[r.path[a]]&&(i[r.path[a]]=void 0!==r.path[a+1]&&"number"==typeof r.path[a+1]?[]:{}),i=i[r.path[a]];switch(r.kind){case"A":r.path&&void 0===i[r.path[a]]&&(i[r.path[a]]=[]),m(r.path?i[r.path[a]]:i,r.index,r.item);break;case"D":delete i[r.path[a]];break;case"E":case"N":i[r.path[a]]=r.rhs}}}function y(e,t,n){if(n.path&&n.path.length){var r,i=e[t],a=n.path.length-1;for(r=0;r<a;r++)i=i[n.path[r]];switch(n.kind){case"A":y(i[n.path[r]],n.index,n.item);break;case"D":case"E":i[n.path[r]]=n.lhs;break;case"N":delete i[n.path[r]]}}else switch(n.kind){case"A":y(e[t],n.index,n.item);break;case"D":case"E":e[t]=n.lhs;break;case"N":e=p(e,t)}return e}return n(i,r),n(a,r),n(o,r),n(s,r),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,n,r){var i=f(e,t,r?function(e){e&&r.push(e)}:void 0,n,!0);return r||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:f,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,n,r,i,a,o){return d(e,t,n,r,i,a,o,!0)},enumerable:!0},orderIndepHash:{value:l,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&f(e,t,(function(r){n&&!n(e,t,r)||v(e,t,r)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var r,i,a=e;for(i=n.path.length-1,r=0;r<i;r++)void 0===a[n.path[r]]&&(a[n.path[r]]={}),a=a[n.path[r]];switch(n.kind){case"A":y(a[n.path[r]],n.index,n.item);break;case"D":case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)},59444:(e,t,n)=>{var r=n(12781).Stream,i=n(73837);function a(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=a,i.inherits(a,r),a.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(a.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),a.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},a.prototype.resume=function(){this._released||this.release(),this.source.resume()},a.prototype.pause=function(){this.source.pause()},a.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},a.prototype.pipe=function(){var e=r.prototype.pipe.apply(this,arguments);return this.resume(),e},a.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},a.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},58242:e=>{"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},35814:(e,t,n)=>{"use strict";const r=n(34965);r.createWebSocketStream=n(24291),r.Server=n(46574),r.Receiver=n(41938),r.Sender=n(17204),r.WebSocket=r,r.WebSocketServer=r.Server,e.exports=r},35510:(e,t,n)=>{"use strict";const{EMPTY_BUFFER:r}=n(44543);function i(e,t){if(0===e.length)return r;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const r=e[t];n.set(r,i),i+=r.length}return i<t?n.slice(0,i):n}function a(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[3&a]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}function s(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function p(e){if(p.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),p.readOnly=!1),t}try{const t=n(Object(function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()));e.exports={concat:i,mask(e,n,r,i,o){o<48?a(e,n,r,i,o):t.mask(e,n,r,i,o)},toArrayBuffer:s,toBuffer:p,unmask(e,n){e.length<32?o(e,n):t.unmask(e,n)}}}catch(t){e.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:p,unmask:o}}},44543:e=>{"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},28143:(e,t,n)=>{"use strict";const{kForOnEventAttribute:r,kListener:i}=n(44543),a=Symbol("kCode"),o=Symbol("kData"),s=Symbol("kError"),p=Symbol("kMessage"),c=Symbol("kReason"),u=Symbol("kTarget"),l=Symbol("kType"),d=Symbol("kWasClean");class f{constructor(e){this[u]=null,this[l]=e}get target(){return this[u]}get type(){return this[l]}}Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});class h extends f{constructor(e,t={}){super(e),this[a]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[d]=void 0!==t.wasClean&&t.wasClean}get code(){return this[a]}get reason(){return this[c]}get wasClean(){return this[d]}}Object.defineProperty(h.prototype,"code",{enumerable:!0}),Object.defineProperty(h.prototype,"reason",{enumerable:!0}),Object.defineProperty(h.prototype,"wasClean",{enumerable:!0});class m extends f{constructor(e,t={}){super(e),this[s]=void 0===t.error?null:t.error,this[p]=void 0===t.message?"":t.message}get error(){return this[s]}get message(){return this[p]}}Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});class v extends f{constructor(e,t={}){super(e),this[o]=void 0===t.data?null:t.data}get data(){return this[o]}}Object.defineProperty(v.prototype,"data",{enumerable:!0});const y={addEventListener(e,t,n={}){let a;if("message"===e)a=function(e,n){const r=new v("message",{data:n?e:e.toString()});r[u]=this,t.call(this,r)};else if("close"===e)a=function(e,n){const r=new h("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[u]=this,t.call(this,r)};else if("error"===e)a=function(e){const n=new m("error",{error:e,message:e.message});n[u]=this,t.call(this,n)};else{if("open"!==e)return;a=function(){const e=new f("open");e[u]=this,t.call(this,e)}}a[r]=!!n[r],a[i]=t,n.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[i]===t&&!n[r]){this.removeListener(e,n);break}}};e.exports={CloseEvent:h,ErrorEvent:m,Event:f,EventTarget:y,MessageEvent:v}},71161:(e,t,n)=>{"use strict";const{tokenChars:r}=n(42845);function i(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}e.exports={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,a,o=Object.create(null),s=!1,p=!1,c=!1,u=-1,l=-1,d=-1,f=0;for(;f<e.length;f++)if(l=e.charCodeAt(f),void 0===n)if(-1===d&&1===r[l])-1===u&&(u=f);else if(0===f||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${f}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);const r=e.slice(u,d);44===l?(i(t,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=f);else if(void 0===a)if(-1===d&&1===r[l])-1===u&&(u=f);else if(32===l||9===l)-1===d&&-1!==u&&(d=f);else if(59===l||44===l){if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f),i(o,e.slice(u,d),!0),44===l&&(i(t,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==l||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${f}`);a=e.slice(u,f),u=d=-1}else if(p){if(1!==r[l])throw new SyntaxError(`Unexpected character at index ${f}`);-1===u?u=f:s||(s=!0),p=!1}else if(c)if(1===r[l])-1===u&&(u=f);else if(34===l&&-1!==u)c=!1,d=f;else{if(92!==l)throw new SyntaxError(`Unexpected character at index ${f}`);p=!0}else if(34===l&&61===e.charCodeAt(f-1))c=!0;else if(-1===d&&1===r[l])-1===u&&(u=f);else if(-1===u||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${f}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let r=e.slice(u,d);s&&(r=r.replace(/\\/g,""),s=!1),i(o,a,r),44===l&&(i(t,n,o),o=Object.create(null),n=void 0),a=void 0,u=d=-1}}else-1===d&&(d=f);if(-1===u||c||32===l||9===l)throw new SyntaxError("Unexpected end of input");-1===d&&(d=f);const h=e.slice(u,d);return void 0===n?i(t,h,o):(void 0===a?i(o,h,!0):i(o,a,s?h.replace(/\\/g,""):h),i(t,n,o)),t}}},22553:e=>{"use strict";const t=Symbol("kDone"),n=Symbol("kRun");e.exports=class{constructor(e){this[t]=()=>{this.pending--,this[n]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[n]()}[n](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[t])}}}},57404:(e,t,n)=>{"use strict";const r=n(59796),i=n(35510),a=n(22553),{kStatusCode:o}=n(44543),s=Buffer.from([0,0,255,255]),p=Symbol("permessage-deflate"),c=Symbol("total-length"),u=Symbol("callback"),l=Symbol("buffers"),d=Symbol("error");let f;function h(e){this[l].push(e),this[c]+=e.length}function m(e){this[c]+=e.length,this[p]._maxPayload<1||this[c]<=this[p]._maxPayload?this[l].push(e):(this[d]=new RangeError("Max payload size exceeded"),this[d].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[d][o]=1009,this.removeListener("data",m),this.reset())}function v(e){this[p]._inflate=null,e[o]=1007,this[u](e)}e.exports=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!f){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;f=new a(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[u];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){f.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){f.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const a=this._isServer?"client":"server";if(!this._inflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[p]=this,this._inflate[c]=0,this._inflate[l]=[],this._inflate.on("error",v),this._inflate.on("data",m)}this._inflate[u]=n,this._inflate.write(e),t&&this._inflate.write(s),this._inflate.flush((()=>{const e=this._inflate[d];if(e)return this._inflate.close(),this._inflate=null,void n(e);const r=i.concat(this._inflate[l],this._inflate[c]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[c]=0,this._inflate[l]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)}))}_compress(e,t,n){const a=this._isServer?"server":"client";if(!this._deflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[c]=0,this._deflate[l]=[],this._deflate.on("data",h)}this._deflate[u]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=i.concat(this._deflate[l],this._deflate[c]);t&&(e=e.slice(0,e.length-4)),this._deflate[u]=null,this._deflate[c]=0,this._deflate[l]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}}},41938:(e,t,n)=>{"use strict";const{Writable:r}=n(12781),i=n(57404),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:p}=n(44543),{concat:c,toArrayBuffer:u,unmask:l}=n(35510),{isValidStatusCode:d,isValidUTF8:f}=n(42845);function h(e,t,n,r,i){const a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,h),a.code=i,a[s]=r,a}e.exports=class extends r{constructor(e={}){super(),this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[p]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=t.slice(e),t.slice(0,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=n.slice(e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,h(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[i.extensionName])return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,h(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,h(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,h(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,h(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,h(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,h(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,h(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,h(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,h(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&l(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(h(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?c(t,e):"arraybuffer"===this._binaryType?u(c(t,e)):t,this.emit("message",n,!0)}else{const n=c(t,e);if(!this._skipUTF8Validation&&!f(n))return this._loop=!1,h(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,o),this.end();else{if(1===e.length)return h(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const t=e.readUInt16BE(0);if(!d(t))return h(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=e.slice(2);if(!this._skipUTF8Validation&&!f(n))return h(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}}},17204:(e,t,n)=>{"use strict";n(41808),n(24404);const{randomFillSync:r}=n(6113),i=n(57404),{EMPTY_BUFFER:a}=n(44543),{isValidStatusCode:o}=n(42845),{mask:s,toBuffer:p}=n(35510),c=Buffer.alloc(4);class u{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){const n=t.mask&&t.readOnly;let i=t.mask?6:2,a=e.length;e.length>=65536?(i+=8,a=127):e.length>125&&(i+=2,a=126);const o=Buffer.allocUnsafe(n?e.length+i:i);return o[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(o[0]|=64),o[1]=a,126===a?o.writeUInt16BE(e.length,2):127===a&&(o.writeUInt32BE(0,2),o.writeUInt32BE(e.length,6)),t.mask?(r(c,0,4),o[1]|=128,o[i-4]=c[0],o[i-3]=c[1],o[i-2]=c[2],o[i-1]=c[3],n?(s(e,c,o,i,e.length),[o]):(s(e,c,e,0,e.length),[o,e])):[o,e]}close(e,t,n,r){let i;if(void 0===e)i=a;else{if("number"!=typeof e||!o(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(e,0),"string"==typeof t?i.write(t,2):i.set(t,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0)}this._deflating?this.enqueue([this.doClose,i,n,r]):this.doClose(i,n,r)}doClose(e,t,n){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),n)}ping(e,t,n){const r=p(e);if(r.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,r,t,p.readOnly,n]):this.doPing(r,t,p.readOnly,n)}doPing(e,t,n,r){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:n}),r)}pong(e,t,n){const r=p(e);if(r.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,r,t,p.readOnly,n]):this.doPong(r,t,p.readOnly,n)}doPong(e,t,n,r){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:n}),r)}send(e,t,n){const r=p(e),a=this._extensions[i.extensionName];let o=t.binary?2:1,s=t.compress;if(this._firstFragment?(this._firstFragment=!1,s&&a&&a.params[a._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=r.length>=a._threshold),this._compress=s):(s=!1,o=0),t.fin&&(this._firstFragment=!0),a){const e={fin:t.fin,rsv1:s,opcode:o,mask:t.mask,readOnly:p.readOnly};this._deflating?this.enqueue([this.dispatch,r,this._compress,e,n]):this.dispatch(r,this._compress,e,n)}else this.sendFrame(u.frame(r,{fin:t.fin,rsv1:!1,opcode:o,mask:t.mask,readOnly:p.readOnly}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(u.frame(e,n),r);const a=this._extensions[i.extensionName];this._bufferedBytes+=e.length,this._deflating=!0,a.compress(e,n.fin,((t,i)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t][4];"function"==typeof n&&n(e)}}else this._bufferedBytes-=e.length,this._deflating=!1,n.readOnly=!1,this.sendFrame(u.frame(i,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}e.exports=u},24291:(e,t,n)=>{"use strict";const{Duplex:r}=n(12781);function i(e){e.emit("close")}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener("error",o),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}e.exports=function(e,t){let n=!0,s=!0;function p(){n&&e._socket.resume()}e.readyState===e.CONNECTING?e.once("open",(function(){e._receiver.removeAllListeners("drain"),e._receiver.on("drain",p)})):(e._receiver.removeAllListeners("drain"),e._receiver.on("drain",p));const c=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,r){const i=!r&&c._readableState.objectMode?t.toString():t;c.push(i)||(n=!1,e._socket.pause())})),e.once("error",(function(e){c.destroyed||(s=!1,c.destroy(e))})),e.once("close",(function(){c.destroyed||c.push(null)})),c._destroy=function(t,n){if(e.readyState===e.CLOSED)return n(t),void process.nextTick(i,c);let r=!1;e.once("error",(function(e){r=!0,n(e)})),e.once("close",(function(){r||n(t),process.nextTick(i,c)})),s&&e.terminate()},c._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),c._readableState.endEmitted&&c.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){c._final(t)}))},c._read=function(){e.readyState!==e.OPEN||n||(n=!0,e._receiver._writableState.needDrain||e._socket.resume())},c._write=function(t,n,r){e.readyState!==e.CONNECTING?e.send(t,r):e.once("open",(function(){c._write(t,n,r)}))},c.on("end",a),c.on("error",o),c}},1863:(e,t,n)=>{"use strict";const{tokenChars:r}=n(42845);e.exports={parse:function(e){const t=new Set;let n=-1,i=-1,a=0;for(;a<e.length;a++){const o=e.charCodeAt(a);if(-1===i&&1===r[o])-1===n&&(n=a);else if(0===a||32!==o&&9!==o){if(44!==o)throw new SyntaxError(`Unexpected character at index ${a}`);{if(-1===n)throw new SyntaxError(`Unexpected character at index ${a}`);-1===i&&(i=a);const r=e.slice(n,i);if(t.has(r))throw new SyntaxError(`The "${r}" subprotocol is duplicated`);t.add(r),n=i=-1}}else-1===i&&-1!==n&&(i=a)}if(-1===n||-1!==i)throw new SyntaxError("Unexpected end of input");const o=e.slice(n,a);if(t.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}}},42845:(e,t,n)=>{"use strict";const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function i(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999}function a(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}try{const t=n(Object(function(){var e=new Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e}()));e.exports={isValidStatusCode:i,isValidUTF8:e=>e.length<150?a(e):t(e),tokenChars:r}}catch(t){e.exports={isValidStatusCode:i,isValidUTF8:a,tokenChars:r}}},46574:(e,t,n)=>{"use strict";const r=n(82361),i=n(13685),{createHash:a}=(n(95687),n(41808),n(24404),n(6113)),o=n(71161),s=n(57404),p=n(1863),c=n(34965),{GUID:u,kWebSocket:l}=n(44543),d=/^[+/0-9A-Za-z]{22}==$/;function f(e){e._state=2,e.emit("close")}function h(){this.destroy()}function m(e,t,n,r){e.writable&&(n=n||i.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},e.write(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map((e=>`${e}: ${r[e]}`)).join("\r\n")+"\r\n\r\n"+n)),e.removeListener("error",h),e.destroy()}e.exports=class extends r{constructor(e,t){if(super(),null==(e={maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer(((e,t)=>{const n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),t.end(n)})),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(const n of Object.keys(t))e.on(n,t[n]);return function(){for(const n of Object.keys(t))e.removeListener(n,t[n])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state)return e&&this.once("close",(()=>{e(new Error("The server is not running"))})),void process.nextTick(f,this);if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(f,this);else{const e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close((()=>{f(this)}))}}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on("error",h);const i=void 0!==e.headers["sec-websocket-key"]&&e.headers["sec-websocket-key"],a=+e.headers["sec-websocket-version"];if("GET"!==e.method||"websocket"!==e.headers.upgrade.toLowerCase()||!i||!d.test(i)||8!==a&&13!==a||!this.shouldHandle(e))return m(t,400);const c=e.headers["sec-websocket-protocol"];let u=new Set;if(void 0!==c)try{u=p.parse(c)}catch(e){return m(t,400)}const l=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&void 0!==l){const e=new s(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const t=o.parse(l);t[s.extensionName]&&(e.accept(t[s.extensionName]),f[s.extensionName]=e)}catch(e){return m(t,400)}}if(this.options.verifyClient){const o={origin:e.headers[8===a?"sec-websocket-origin":"origin"],secure:!(!e.socket.authorized&&!e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(o,((a,o,s,p)=>{if(!a)return m(t,o||401,s,p);this.completeUpgrade(f,i,u,e,t,n,r)}));if(!this.options.verifyClient(o))return m(t,401)}this.completeUpgrade(f,i,u,e,t,n,r)}completeUpgrade(e,t,n,r,i,p,d){if(!i.readable||!i.writable)return i.destroy();if(i[l])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return m(i,503);const v=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${a("sha1").update(t+u).digest("base64")}`],y=new c(null);if(n.size){const e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(v.push(`Sec-WebSocket-Protocol: ${e}`),y._protocol=e)}if(e[s.extensionName]){const t=e[s.extensionName].params,n=o.format({[s.extensionName]:[t]});v.push(`Sec-WebSocket-Extensions: ${n}`),y._extensions=e}this.emit("headers",v,r),i.write(v.concat("\r\n").join("\r\n")),i.removeListener("error",h),y.setSocket(i,p,{maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(y),y.on("close",(()=>{this.clients.delete(y),this._shouldEmitClose&&!this.clients.size&&process.nextTick(f,this)}))),d(y,r)}}},34965:(e,t,n)=>{"use strict";const r=n(82361),i=n(95687),a=n(13685),o=n(41808),s=n(24404),{randomBytes:p,createHash:c}=n(6113),{Readable:u}=n(12781),{URL:l}=n(57310),d=n(57404),f=n(41938),h=n(17204),{BINARY_TYPES:m,EMPTY_BUFFER:v,GUID:y,kForOnEventAttribute:b,kListener:g,kStatusCode:w,kWebSocket:_,NOOP:x}=n(44543),{EventTarget:{addEventListener:D,removeEventListener:O}}=n(28143),{format:E,parse:S}=n(71161),{toBuffer:j}=n(35510),k=["CONNECTING","OPEN","CLOSING","CLOSED"],T=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,N=[8,13];class P extends r{constructor(e,t,n){super(),this._binaryType=m[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=P.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),C(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){m.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){const r=new f({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new h(e,this._extensions),this._receiver=r,this._socket=e,r[_]=this,e[_]=this,r.on("conclude",M),r.on("drain",$),r.on("error",B),r.on("message",V),r.on("ping",q),r.on("pong",U),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",W),e.on("data",Q),e.on("end",H),e.on("error",K),this._readyState=P.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=P.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[d.extensionName]&&this._extensions[d.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=P.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return F(this,this._req,e)}this.readyState!==P.CLOSING?(this._readyState=P.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}ping(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||v,t,n)):R(this,e,n)}pong(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||v,t,n)):R(this,e,n)}send(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(n=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)return void R(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[d.extensionName]||(r.compress=!1),this._sender.send(e||v,r,n)}terminate(){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return F(this,this._req,e)}this._socket&&(this._readyState=P.CLOSING,this._socket.destroy())}}}function C(e,t,n,r){const o={protocolVersion:N[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!N.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${N.join(", ")})`);let s;if(t instanceof l)s=t,e._url=t.href;else{try{s=new l(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const u="wss:"===s.protocol,f="ws+unix:"===s.protocol;if("ws:"!==s.protocol&&!u&&!f)throw new SyntaxError('The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"');if(f&&!s.pathname)throw new SyntaxError("The URL's pathname is empty");if(s.hash)throw new SyntaxError("The URL contains a fragment identifier");const h=u?443:80,m=p(16).toString("base64"),v=u?i.get:a.get,b=new Set;let g;if(o.createConnection=u?I:A,o.defaultPort=o.defaultPort||h,o.port=s.port||h,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":m,Connection:"Upgrade",Upgrade:"websocket",...o.headers},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(g=new d(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=E({[d.extensionName]:g.offer()})),n.length){for(const e of n){if("string"!=typeof e||!T.test(e)||b.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");b.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),f){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}let w=e._req=v(o);o.timeout&&w.on("timeout",(()=>{F(e,w,"Opening handshake has timed out")})),w.on("error",(t=>{null===w||w.aborted||(w=e._req=null,e._readyState=P.CLOSING,e.emit("error",t),e.emitClose())})),w.on("response",(i=>{const a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects)return void F(e,w,"Maximum redirects exceeded");w.abort();const i=new l(a,t);C(e,i,n,r)}else e.emit("unexpected-response",w,i)||F(e,w,`Unexpected server response: ${i.statusCode}`)})),w.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==P.CONNECTING)return;w=e._req=null;const i=c("sha1").update(m+y).digest("base64");if(t.headers["sec-websocket-accept"]!==i)return void F(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let s;if(void 0!==a?b.size?b.has(a)||(s="Server sent an invalid subprotocol"):s="Server sent a subprotocol but none was requested":b.size&&(s="Server sent no subprotocol"),s)return void F(e,n,s);a&&(e._protocol=a);const p=t.headers["sec-websocket-extensions"];if(void 0!==p){if(!g)return void F(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");let t;try{t=S(p)}catch(t){return void F(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==d.extensionName)return void F(e,n,"Server indicated an extension that was not requested");try{g.accept(t[d.extensionName])}catch(t){return void F(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[d.extensionName]=g}e.setSocket(n,r,{maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}))}function A(e){return e.path=e.socketPath,o.connect(e)}function I(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=o.isIP(e.host)?"":e.host),s.connect(e)}function F(e,t,n){e._readyState=P.CLOSING;const r=new Error(n);Error.captureStackTrace(r,F),t.setHeader?(t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),t.once("abort",e.emitClose.bind(e)),e.emit("error",r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function R(e,t,n){if(t){const n=j(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}n&&n(new Error(`WebSocket is not open: readyState ${e.readyState} (${k[e.readyState]})`))}function M(e,t){const n=this[_];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[_]&&(n._socket.removeListener("data",Q),process.nextTick(z,n._socket),1005===e?n.close():n.close(e,t))}function $(){this[_]._socket.resume()}function B(e){const t=this[_];void 0!==t._socket[_]&&(t._socket.removeListener("data",Q),process.nextTick(z,t._socket),t.close(e[w])),t.emit("error",e)}function L(){this[_].emitClose()}function V(e,t){this[_].emit("message",e,t)}function q(e){const t=this[_];t.pong(e,!t._isServer,x),t.emit("ping",e)}function U(e){this[_].emit("pong",e)}function z(e){e.resume()}function W(){const e=this[_];let t;this.removeListener("close",W),this.removeListener("data",Q),this.removeListener("end",H),e._readyState=P.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[_]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",L),e._receiver.on("finish",L))}function Q(e){this[_]._receiver.write(e)||this.pause()}function H(){const e=this[_];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function K(){const e=this[_];this.removeListener("error",K),this.on("error",x),e&&(e._readyState=P.CLOSING,this.destroy())}Object.defineProperty(P,"CONNECTING",{enumerable:!0,value:k.indexOf("CONNECTING")}),Object.defineProperty(P.prototype,"CONNECTING",{enumerable:!0,value:k.indexOf("CONNECTING")}),Object.defineProperty(P,"OPEN",{enumerable:!0,value:k.indexOf("OPEN")}),Object.defineProperty(P.prototype,"OPEN",{enumerable:!0,value:k.indexOf("OPEN")}),Object.defineProperty(P,"CLOSING",{enumerable:!0,value:k.indexOf("CLOSING")}),Object.defineProperty(P.prototype,"CLOSING",{enumerable:!0,value:k.indexOf("CLOSING")}),Object.defineProperty(P,"CLOSED",{enumerable:!0,value:k.indexOf("CLOSED")}),Object.defineProperty(P.prototype,"CLOSED",{enumerable:!0,value:k.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach((e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(P.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[b])return t[g];return null},set(t){for(const t of this.listeners(e))if(t[b]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[b]:!0})}})})),P.prototype.addEventListener=D,P.prototype.removeEventListener=O,e.exports=P},32409:(e,t,n)=>{const{dirname:r,resolve:i}=n(71017),{readdirSync:a,statSync:o}=n(57147);e.exports=function(e,t){let n,s=i(".",e);for(o(s).isDirectory()||(s=r(s));;){if(n=t(s,a(s)),n)return i(s,n);if(s=r(n=s),n===s)break}}},66471:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},36276:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(41241)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},64095:(e,t,n)=>{var r=n(57310),i=r.URL,a=n(13685),o=n(95687),s=n(12781).Writable,p=n(39491),c=n(36276),u=["abort","aborted","connect","error","socket","timeout"],l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var d=x("ERR_INVALID_URL","Invalid URL",TypeError),f=x("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),h=x("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),m=x("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=x("ERR_STREAM_WRITE_AFTER_END","write after end");function y(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(a){var o=a+":",s=n[o]=e[a],u=t[a]=Object.create(s);Object.defineProperties(u,{request:{value:function(e,a,s){if(O(e)){var u;try{u=w(new i(e))}catch(t){u=r.parse(e)}if(!O(u.protocol))throw new d({input:e});e=u}else i&&e instanceof i?e=w(e):(s=a,a=e,e={protocol:o});return E(a)&&(s=a,a=null),(a=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,a)).nativeProtocols=n,O(a.host)||O(a.hostname)||(a.hostname="::1"),p.equal(a.protocol,o,"protocol mismatch"),c("options",a),new y(a,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=u.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function g(){}function w(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function _(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function x(e,t,n){function r(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r}function D(e){for(var t of u)e.removeListener(t,l[t]);e.on("error",g),e.abort()}function O(e){return"string"==typeof e||e instanceof String}function E(e){return"function"==typeof e}y.prototype=Object.create(s.prototype),y.prototype.abort=function(){D(this._currentRequest),this.emit("abort")},y.prototype.write=function(e,t,n){if(this._ending)throw new v;if(!(O(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;E(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new m),this.abort()):n&&n()},y.prototype.end=function(e,t,n){if(E(e)?(n=e,e=t=null):E(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},y.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},y.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},y.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),a()}),e),r(t)}function a(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",a),n.removeListener("error",a),n.removeListener("response",a),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){y.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(y.prototype,e,{get:function(){return this._currentRequest[e]}})})),y.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},y.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var a of(i._redirectable=this,u))i.on(a,l[a]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,p=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(o<p.length){var n=p[o++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},y.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(D(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new h);else{var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_(/^content-/i,this._options.headers));var s,u=_(/^host$/i,this._options.headers),l=r.parse(this._currentUrl),d=u||l.host,m=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(l,{host:d}));try{s=r.resolve(m,n)}catch(e){return void this.emit("error",new f({cause:e}))}c("redirecting to",s),this._isRedirect=!0;var v=r.parse(s);if(Object.assign(this._options,v),(v.protocol!==l.protocol&&"https:"!==v.protocol||v.host!==d&&!function(e,t){p(O(e)&&O(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(v.host,d))&&_(/^(?:authorization|cookie)$/i,this._options.headers),E(a)){var y={headers:e.headers,statusCode:t},b={url:m,method:o,headers:i};try{a(this._options,y,b)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new f({cause:e}))}}},e.exports=b({http:a,https:o}),e.exports.wrap=b},54347:(e,t,n)=>{var r=n(74464),i=n(73837),a=n(71017),o=n(13685),s=n(95687),p=n(57310).parse,c=n(57147),u=n(12781).Stream,l=n(72839),d=n(84878),f=n(4071);function h(e){if(!(this instanceof h))return new h(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],r.call(this),e=e||{})this[t]=e[t]}e.exports=h,i.inherits(h,r),h.LINE_BREAK="\r\n",h.DEFAULT_CONTENT_TYPE="application/octet-stream",h.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var a=r.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),i.isArray(t))this._error(new Error("Arrays are not supported."));else{var o=this._multiPartHeader(e,t,n),s=this._multiPartFooter();a(o),a(t),a(s),this._trackLength(o,t,n)}},h.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+h.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof u)&&(n.knownLength||this._valuesToMeasure.push(t))},h.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):c.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},h.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),o="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var p in"object"==typeof n.header&&f(s,n.header),s)s.hasOwnProperty(p)&&null!=(r=s[p])&&(Array.isArray(r)||(r=[r]),r.length&&(o+=p+": "+r.join("; ")+h.LINE_BREAK));return"--"+this.getBoundary()+h.LINE_BREAK+o+h.LINE_BREAK},h.prototype._getContentDisposition=function(e,t){var n,r;return"string"==typeof t.filepath?n=a.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=a.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=a.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r},h.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=l.lookup(e.name)),!n&&e.path&&(n=l.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=l.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=h.DEFAULT_CONTENT_TYPE),n},h.prototype._multiPartFooter=function(){return function(e){var t=h.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},h.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+h.LINE_BREAK},h.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n},h.prototype.setBoundary=function(e){this._boundary=e},h.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},h.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(h.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},h.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},h.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},h.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},h.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?d.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},h.prototype.submit=function(e,t){var n,r,i={method:"post"};return"string"==typeof e?(e=p(e),r=f({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=f(e,i)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?s.request(r):o.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,r)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},h.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},h.prototype.toString=function(){return"[object FormData]"}},4071:e=>{e.exports=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}},35184:e=>{"use strict";e.exports=function(e){if(void 0===e&&(e=2),e>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+e+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var n=(new Error).stack;if(Error.prepareStackTrace=t,null!==n&&"object"==typeof n)return n[e]?n[e].getFileName():void 0}},41875:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}},6385:e=>{"use strict";const t=e=>!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);e.exports=t,e.exports.default=t},98784:function(e,t,n){var r;e=n.nmd(e),function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",p=32,c=128,u=1/0,l=9007199254740991,d=NaN,f=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",p],["partialRight",64],["rearg",256]],m="[object Arguments]",v="[object Array]",y="[object Boolean]",b="[object Date]",g="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",D="[object Number]",O="[object Object]",E="[object Promise]",S="[object RegExp]",j="[object Set]",k="[object String]",T="[object Symbol]",N="[object WeakMap]",P="[object ArrayBuffer]",C="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",R="[object Int16Array]",M="[object Int32Array]",$="[object Uint8Array]",B="[object Uint8ClampedArray]",L="[object Uint16Array]",V="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,H=RegExp(W.source),K=RegExp(Q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",De="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="["+_e+"]",Te="["+je+"]",Ne="["+xe+"]",Pe="\\d+",Ce="["+De+"]",Ae="["+Oe+"]",Ie="[^"+_e+je+Pe+De+Oe+Ee+"]",Fe="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Ee+"]",Le="\\u200d",Ve="(?:"+Ae+"|"+Ie+")",qe="(?:"+Be+"|"+Ie+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Ne+"|"+Fe+")?",Qe="["+Se+"]?",He=Qe+We+"(?:"+Le+"(?:"+[Re,Me,$e].join("|")+")"+Qe+We+")*",Ke="(?:"+[Ce,Me,$e].join("|")+")"+He,Ge="(?:"+[Re+Ne+"?",Ne,Me,$e,ke].join("|")+")",Je=RegExp("['’]","g"),Ye=RegExp(Ne,"g"),Ze=RegExp(Fe+"(?="+Fe+")|"+Ge+He,"g"),Xe=RegExp([Be+"?"+Ae+"+"+Ue+"(?="+[Te,Be,"$"].join("|")+")",qe+"+"+ze+"(?="+[Te,Be+Ve,"$"].join("|")+")",Be+"?"+Ve+"+"+Ue,Be+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ke].join("|"),"g"),et=RegExp("["+Le+_e+xe+Se+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[A]=it[I]=it[F]=it[R]=it[M]=it[$]=it[B]=it[L]=it[V]=!0,it[m]=it[v]=it[P]=it[y]=it[C]=it[b]=it[g]=it[w]=it[x]=it[D]=it[O]=it[S]=it[j]=it[k]=it[N]=!1;var at={};at[m]=at[v]=at[P]=at[C]=at[y]=at[b]=at[A]=at[I]=at[F]=at[R]=at[M]=at[x]=at[D]=at[O]=at[S]=at[j]=at[k]=at[T]=at[$]=at[B]=at[L]=at[V]=!0,at[g]=at[w]=at[N]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,pt=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,ut="object"==typeof self&&self&&self.Object===Object&&self,lt=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,ht=ft&&ft.exports===dt,mt=ht&&ct.process,vt=function(){try{return ft&&ft.require&&ft.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,wt=vt&&vt.isRegExp,_t=vt&&vt.isSet,xt=vt&&vt.isTypedArray;function Dt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function kt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function Nt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ct(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function At(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function It(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Ft(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Ut("length");function Mt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function $t(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):$t(e,Vt,n)}function Lt(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function qt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:d}function Ut(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,r,i){return i(e,(function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)})),n}function Qt(e,t){for(var n,r=-1,a=e.length;++r<a;){var o=t(e[r]);o!==i&&(n=n===i?o:n+o)}return n}function Ht(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,fn(e)+1).replace(re,""):e}function Gt(e){return function(t){return e(t)}}function Jt(e,t){return Pt(t,(function(t){return e[t]}))}function Yt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var tn=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nn=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+ot[e]}function an(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function pn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==s||(e[n]=s,a[i++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function ln(e){return an(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function dn(e){return an(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var hn=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),mn=function e(t){var n,r=(t=null==t?lt:mn.defaults(lt.Object(),t,mn.pick(lt,nt))).Array,ie=t.Date,_e=t.Error,xe=t.Function,De=t.Math,Oe=t.Object,Ee=t.RegExp,Se=t.String,je=t.TypeError,ke=r.prototype,Te=xe.prototype,Ne=Oe.prototype,Pe=t["__core-js_shared__"],Ce=Te.toString,Ae=Ne.hasOwnProperty,Ie=0,Fe=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Ne.toString,Me=Ce.call(Oe),$e=lt._,Be=Ee("^"+Ce.call(Ae).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Ve=t.Symbol,qe=t.Uint8Array,Ue=Le?Le.allocUnsafe:i,ze=sn(Oe.getPrototypeOf,Oe),We=Oe.create,Qe=Ne.propertyIsEnumerable,He=ke.splice,Ke=Ve?Ve.isConcatSpreadable:i,Ge=Ve?Ve.iterator:i,Ze=Ve?Ve.toStringTag:i,et=function(){try{var e=ca(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==lt.Date.now&&ie.now,ut=t.setTimeout!==lt.setTimeout&&t.setTimeout,dt=De.ceil,ft=De.floor,mt=Oe.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Rt=t.isFinite,zt=ke.join,vn=sn(Oe.keys,Oe),yn=De.max,bn=De.min,gn=ie.now,wn=t.parseInt,_n=De.random,xn=ke.reverse,Dn=ca(t,"DataView"),On=ca(t,"Map"),En=ca(t,"Promise"),Sn=ca(t,"Set"),jn=ca(t,"WeakMap"),kn=ca(Oe,"create"),Tn=jn&&new jn,Nn={},Pn=$a(Dn),Cn=$a(On),An=$a(En),In=$a(Sn),Fn=$a(jn),Rn=Ve?Ve.prototype:i,Mn=Rn?Rn.valueOf:i,$n=Rn?Rn.toString:i;function Bn(e){if(ns(e)&&!Wo(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Ae.call(e,"__wrapped__"))return Ba(e)}return new qn(e)}var Ln=function(){function e(){}return function(t){if(!ts(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Qn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Gn(e,t){var n=Wo(e),r=!n&&zo(e),i=!n&&!r&&Go(e),a=!n&&!r&&!i&&us(e),o=n||r||i||a,s=o?Ht(e.length,Se):[],p=s.length;for(var c in e)!t&&!Ae.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||va(c,p))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Qr(0,t-1)]:i}function Yn(e,t){return Aa(ji(e),or(t,0,e.length))}function Zn(e){return Aa(ji(e))}function Xn(e,t,n){(n!==i&&!Vo(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Ae.call(e,t)&&Vo(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Vo(e[n][0],t))return n;return-1}function nr(e,t,n,r){return lr(e,(function(e,i,a){t(r,e,n(e),a)})),r}function rr(e,t){return e&&ki(t,Cs(t),e)}function ir(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var n=-1,a=t.length,o=r(a),s=null==e;++n<a;)o[n]=s?i:js(e,t[n]);return o}function or(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,a,o){var s,p=1&t,c=2&t,u=4&t;if(n&&(s=a?n(e,r,a,o):n(e)),s!==i)return s;if(!ts(e))return e;var l=Wo(e);if(l){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!p)return ji(e,s)}else{var d=da(e),f=d==w||d==_;if(Go(e))return _i(e,p);if(d==O||d==m||f&&!a){if(s=c||f?{}:ha(e),!p)return c?function(e,t){return ki(e,la(e),t)}(e,function(e,t){return e&&ki(t,As(t),e)}(s,e)):function(e,t){return ki(e,ua(e),t)}(e,rr(s,e))}else{if(!at[d])return a?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case P:return xi(e);case y:case b:return new i(+e);case C:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case I:case F:case R:case M:case $:case B:case L:case V:return Di(e,n);case x:return new i;case D:case k:return new i(e);case S:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case T:return r=e,Mn?Oe(Mn.call(r)):{}}}(e,d,p)}}o||(o=new Kn);var h=o.get(e);if(h)return h;o.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,o))})):rs(e)&&e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,o))}));var v=l?i:(u?c?na:ta:c?As:Cs)(e);return Et(v||e,(function(r,i){v&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,o))})),s}function pr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var a=n[r],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new je(a);return Ta((function(){e.apply(i,n)}),t)}function ur(e,t,n,r){var i=-1,a=Tt,o=!0,s=e.length,p=[],c=t.length;if(!s)return p;n&&(t=Pt(t,Gt(n))),r?(a=Nt,o=!1):t.length>=200&&(a=Yt,o=!1,t=new Hn(t));e:for(;++i<s;){var u=e[i],l=null==n?u:n(u);if(u=r||0!==u?u:0,o&&l==l){for(var d=c;d--;)if(t[d]===l)continue e;p.push(u)}else a(t,l,r)||p.push(u)}return p}Bn.templateSettings={escape:G,evaluate:J,interpolate:Y,variable:"",imports:{_:Bn}},Bn.prototype=Vn.prototype,Bn.prototype.constructor=Bn,qn.prototype=Ln(Vn.prototype),qn.prototype.constructor=qn,Un.prototype=Ln(Vn.prototype),Un.prototype.constructor=Un,zn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===o?i:n}return Ae.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==i:Ae.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===i?o:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():He.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Wn.prototype.has=function(e){return tr(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Qn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(On||Wn),string:new zn}},Qn.prototype.delete=function(e){var t=sa(this,e).delete(e);return this.size-=t?1:0,t},Qn.prototype.get=function(e){return sa(this,e).get(e)},Qn.prototype.has=function(e){return sa(this,e).has(e)},Qn.prototype.set=function(e,t){var n=sa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,o),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qn(r)}return n.set(e,t),this.size=n.size,this};var lr=Pi(gr),dr=Pi(wr,!0);function fr(e,t){var n=!0;return lr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function hr(e,t,n){for(var r=-1,a=e.length;++r<a;){var o=e[r],s=t(o);if(null!=s&&(p===i?s==s&&!cs(s):n(s,p)))var p=s,c=o}return c}function mr(e,t){var n=[];return lr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function vr(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=ma),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?vr(s,t-1,n,r,i):Ct(i,s):r||(i[i.length]=s)}return i}var yr=Ci(),br=Ci(!0);function gr(e,t){return e&&yr(e,t,Cs)}function wr(e,t){return e&&br(e,t,Cs)}function _r(e,t){return kt(t,(function(t){return Zo(e[t])}))}function xr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Ma(t[n++])];return n&&n==r?e:i}function Dr(e,t,n){var r=t(e);return Wo(e)?r:Ct(r,n(e))}function Or(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Oe(e)?function(e){var t=Ae.call(e,Ze),n=e[Ze];try{e[Ze]=i;var r=!0}catch(e){}var a=Re.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),a}(e):function(e){return Re.call(e)}(e)}function Er(e,t){return e>t}function Sr(e,t){return null!=e&&Ae.call(e,t)}function jr(e,t){return null!=e&&t in Oe(e)}function kr(e,t,n){for(var a=n?Nt:Tt,o=e[0].length,s=e.length,p=s,c=r(s),u=1/0,l=[];p--;){var d=e[p];p&&t&&(d=Pt(d,Gt(t))),u=bn(d.length,u),c[p]=!n&&(t||o>=120&&d.length>=120)?new Hn(p&&d):i}d=e[0];var f=-1,h=c[0];e:for(;++f<o&&l.length<u;){var m=d[f],v=t?t(m):m;if(m=n||0!==m?m:0,!(h?Yt(h,v):a(l,v,n))){for(p=s;--p;){var y=c[p];if(!(y?Yt(y,v):a(e[p],v,n)))continue e}h&&h.push(v),l.push(m)}}return l}function Tr(e,t,n){var r=null==(e=Ea(e,t=yi(t,e)))?e:e[Ma(Ja(t))];return null==r?i:Dt(r,e,n)}function Nr(e){return ns(e)&&Or(e)==m}function Pr(e,t,n,r,a){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,a,o){var s=Wo(e),p=Wo(t),c=s?v:da(e),u=p?v:da(t),l=(c=c==m?O:c)==O,d=(u=u==m?O:u)==O,f=c==u;if(f&&Go(e)){if(!Go(t))return!1;s=!0,l=!1}if(f&&!l)return o||(o=new Kn),s||us(e)?Xi(e,t,n,r,a,o):function(e,t,n,r,i,a,o){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!a(new qe(e),new qe(t)));case y:case b:case D:return Vo(+e,+t);case g:return e.name==t.name&&e.message==t.message;case S:case k:return e==t+"";case x:var s=on;case j:var p=1&r;if(s||(s=cn),e.size!=t.size&&!p)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var u=Xi(s(e),s(t),r,i,a,o);return o.delete(e),u;case T:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,c,n,r,a,o);if(!(1&n)){var h=l&&Ae.call(e,"__wrapped__"),w=d&&Ae.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,E=w?t.value():t;return o||(o=new Kn),a(_,E,n,r,o)}}return!!f&&(o||(o=new Kn),function(e,t,n,r,a,o){var s=1&n,p=ta(e),c=p.length;if(c!=ta(t).length&&!s)return!1;for(var u=c;u--;){var l=p[u];if(!(s?l in t:Ae.call(t,l)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var h=!0;o.set(e,t),o.set(t,e);for(var m=s;++u<c;){var v=e[l=p[u]],y=t[l];if(r)var b=s?r(y,v,l,t,e,o):r(v,y,l,e,t,o);if(!(b===i?v===y||a(v,y,n,r,o):b)){h=!1;break}m||(m="constructor"==l)}if(h&&!m){var g=e.constructor,w=t.constructor;g==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,a,o))}(e,t,n,r,Pr,a))}function Cr(e,t,n,r){var a=n.length,o=a,s=!r;if(null==e)return!o;for(e=Oe(e);a--;){var p=n[a];if(s&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++a<o;){var c=(p=n[a])[0],u=e[c],l=p[1];if(s&&p[2]){if(u===i&&!(c in e))return!1}else{var d=new Kn;if(r)var f=r(u,l,c,e,t,d);if(!(f===i?Pr(l,u,3,r,d):f))return!1}}return!0}function Ar(e){return!(!ts(e)||(t=e,Fe&&Fe in t))&&(Zo(e)?Be:me).test($a(e));var t}function Ir(e){return"function"==typeof e?e:null==e?ip:"object"==typeof e?Wo(e)?Br(e[0],e[1]):$r(e):fp(e)}function Fr(e){if(!_a(e))return vn(e);var t=[];for(var n in Oe(e))Ae.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Mr(e,t){var n=-1,i=Ho(e)?r(e.length):[];return lr(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}function $r(e){var t=pa(e);return 1==t.length&&t[0][2]?Da(t[0][0],t[0][1]):function(n){return n===e||Cr(n,e,t)}}function Br(e,t){return ba(e)&&xa(t)?Da(Ma(e),t):function(n){var r=js(n,e);return r===i&&r===t?ks(n,e):Pr(t,r,3)}}function Lr(e,t,n,r,a){e!==t&&yr(t,(function(o,s){if(a||(a=new Kn),ts(o))!function(e,t,n,r,a,o,s){var p=ja(e,n),c=ja(t,n),u=s.get(c);if(u)Xn(e,n,u);else{var l=o?o(p,c,n+"",e,t,s):i,d=l===i;if(d){var f=Wo(c),h=!f&&Go(c),m=!f&&!h&&us(c);l=c,f||h||m?Wo(p)?l=p:Ko(p)?l=ji(p):h?(d=!1,l=_i(c,!0)):m?(d=!1,l=Di(c,!0)):l=[]:as(c)||zo(c)?(l=p,zo(p)?l=bs(p):ts(p)&&!Zo(p)||(l=ha(c))):d=!1}d&&(s.set(c,l),a(l,c,r,o,s),s.delete(c)),Xn(e,n,l)}}(e,t,s,n,Lr,r,a);else{var p=r?r(ja(e,s),o,s+"",e,t,a):i;p===i&&(p=o),Xn(e,s,p)}}),As)}function Vr(e,t){var n=e.length;if(n)return va(t+=t<0?n:0,n)?e[t]:i}function qr(e,t,n){t=t.length?Pt(t,(function(e){return Wo(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[ip];var r=-1;t=Pt(t,Gt(oa()));var i=Mr(e,(function(e,n,i){var a=Pt(t,(function(t){return t(e)}));return{criteria:a,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var p=Oi(i[r],a[r]);if(p)return r>=s?p:p*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Ur(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=xr(e,o);n(s,o)&&Yr(a,yi(o,e),s)}return a}function zr(e,t,n,r){var i=r?Lt:Bt,a=-1,o=t.length,s=e;for(e===t&&(t=ji(t)),n&&(s=Pt(e,Gt(n)));++a<o;)for(var p=0,c=t[a],u=n?n(c):c;(p=i(s,u,p,r))>-1;)s!==e&&He.call(s,p,1),He.call(e,p,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;va(i)?He.call(e,i,1):ci(e,i)}}return e}function Qr(e,t){return e+ft(_n()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>l)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Na(Oa(e,t,ip),e+"")}function Gr(e){return Jn(Vs(e))}function Jr(e,t){var n=Vs(e);return Aa(n,or(t,0,n.length))}function Yr(e,t,n,r){if(!ts(e))return e;for(var a=-1,o=(t=yi(t,e)).length,s=o-1,p=e;null!=p&&++a<o;){var c=Ma(t[a]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=s){var l=p[c];(u=r?r(l,c,p):i)===i&&(u=ts(l)?l:va(t[a+1])?[]:{})}er(p,c,u),p=p[c]}return e}var Zr=Tn?function(e,t){return Tn.set(e,t),e}:ip,Xr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:tp(t),writable:!0})}:ip;function ei(e){return Aa(Vs(e))}function ti(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i<a;)o[i]=e[i+t];return o}function ni(e,t){var n;return lr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!cs(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return ii(e,t,ip,n)}function ii(e,t,n,r){var a=0,o=null==e?0:e.length;if(0===o)return 0;for(var s=(t=n(t))!=t,p=null===t,c=cs(t),u=t===i;a<o;){var l=ft((a+o)/2),d=n(e[l]),f=d!==i,h=null===d,m=d==d,v=cs(d);if(s)var y=r||m;else y=u?m&&(r||f):p?m&&f&&(r||!h):c?m&&f&&!h&&(r||!v):!h&&!v&&(r?d<=t:d<t);y?a=l+1:o=l}return bn(o,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Vo(s,p)){var p=s;a[i++]=0===o?0:o}}return a}function oi(e){return"number"==typeof e?e:cs(e)?d:+e}function si(e){if("string"==typeof e)return e;if(Wo(e))return Pt(e,si)+"";if(cs(e))return $n?$n.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pi(e,t,n){var r=-1,i=Tt,a=e.length,o=!0,s=[],p=s;if(n)o=!1,i=Nt;else if(a>=200){var c=t?null:Hi(e);if(c)return cn(c);o=!1,i=Yt,p=new Hn}else p=t?[]:s;e:for(;++r<a;){var u=e[r],l=t?t(u):u;if(u=n||0!==u?u:0,o&&l==l){for(var d=p.length;d--;)if(p[d]===l)continue e;t&&p.push(l),s.push(u)}else i(p,l,n)||(p!==s&&p.push(l),s.push(u))}return s}function ci(e,t){return null==(e=Ea(e,t=yi(t,e)))||delete e[Ma(Ja(t))]}function ui(e,t,n,r){return Yr(e,t,n(xr(e,t)),r)}function li(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?ti(e,r?0:a,r?a+1:i):ti(e,r?a+1:0,r?i:a)}function di(e,t){var n=e;return n instanceof Un&&(n=n.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,Ct([e],t.args))}),n)}function fi(e,t,n){var i=e.length;if(i<2)return i?pi(e[0]):[];for(var a=-1,o=r(i);++a<i;)for(var s=e[a],p=-1;++p<i;)p!=a&&(o[a]=ur(o[a]||s,e[p],t,n));return pi(vr(o,1),t,n)}function hi(e,t,n){for(var r=-1,a=e.length,o=t.length,s={};++r<a;){var p=r<o?t[r]:i;n(s,e[r],p)}return s}function mi(e){return Ko(e)?e:[]}function vi(e){return"function"==typeof e?e:ip}function yi(e,t){return Wo(e)?e:ba(e,t)?[e]:Ra(gs(e))}var bi=Kr;function gi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var wi=ot||function(e){return lt.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Di(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oi(e,t){if(e!==t){var n=e!==i,r=null===e,a=e==e,o=cs(e),s=t!==i,p=null===t,c=t==t,u=cs(t);if(!p&&!u&&!o&&e>t||o&&s&&c&&!p&&!u||r&&s&&c||!n&&c||!a)return 1;if(!r&&!o&&!u&&e<t||u&&n&&a&&!r&&!o||p&&n&&a||!s&&a||!c)return-1}return 0}function Ei(e,t,n,i){for(var a=-1,o=e.length,s=n.length,p=-1,c=t.length,u=yn(o-s,0),l=r(c+u),d=!i;++p<c;)l[p]=t[p];for(;++a<s;)(d||a<o)&&(l[n[a]]=e[a]);for(;u--;)l[p++]=e[a++];return l}function Si(e,t,n,i){for(var a=-1,o=e.length,s=-1,p=n.length,c=-1,u=t.length,l=yn(o-p,0),d=r(l+u),f=!i;++a<l;)d[a]=e[a];for(var h=a;++c<u;)d[h+c]=t[c];for(;++s<p;)(f||a<o)&&(d[h+n[s]]=e[a++]);return d}function ji(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function ki(e,t,n,r){var a=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var p=t[o],c=r?r(n[p],e[p],p,n,e):i;c===i&&(c=e[p]),a?ir(n,p,c):er(n,p,c)}return n}function Ti(e,t){return function(n,r){var i=Wo(n)?Ot:nr,a=t?t():{};return i(n,e,oa(r,2),a)}}function Ni(e){return Kr((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:i,s=a>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&ya(n[0],n[1],s)&&(o=a<3?i:o,a=1),t=Oe(t);++r<a;){var p=n[r];p&&e(t,p,r,o)}return t}))}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ho(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Oe(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function Ci(e){return function(t,n,r){for(var i=-1,a=Oe(t),o=r(t),s=o.length;s--;){var p=o[e?s:++i];if(!1===n(a[p],p,a))break}return t}}function Ai(e){return function(t){var n=an(t=gs(t))?dn(t):i,r=n?n[0]:t.charAt(0),a=n?gi(n,1).join(""):t.slice(1);return r[e]()+a}}function Ii(e){return function(t){return At(Zs(zs(t).replace(Je,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ln(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Ri(e){return function(t,n,r){var a=Oe(t);if(!Ho(t)){var o=oa(n,3);t=Cs(t),n=function(e){return o(a[e],e,a)}}var s=e(t,n,r);return s>-1?a[o?t[s]:s]:i}}function Mi(e){return ea((function(t){var n=t.length,r=n,o=qn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new je(a);if(o&&!p&&"wrapper"==ia(s))var p=new qn([],!0)}for(r=p?r:n;++r<n;){var c=ia(s=t[r]),u="wrapper"==c?ra(s):i;p=u&&ga(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?p[ia(u[0])].apply(p,u[3]):1==s.length&&ga(s)?p[c]():p.thru(s)}return function(){var e=arguments,r=e[0];if(p&&1==e.length&&Wo(r))return p.plant(r).value();for(var i=0,a=n?t[i].apply(this,e):r;++i<n;)a=t[i].call(this,a);return a}}))}function $i(e,t,n,a,o,s,p,u,l,d){var f=t&c,h=1&t,m=2&t,v=24&t,y=512&t,b=m?i:Fi(e);return function i(){for(var c=arguments.length,g=r(c),w=c;w--;)g[w]=arguments[w];if(v)var _=aa(i),x=en(g,_);if(a&&(g=Ei(g,a,o,v)),s&&(g=Si(g,s,p,v)),c-=x,v&&c<d){var D=pn(g,_);return Wi(e,t,$i,i.placeholder,n,g,D,u,l,d-c)}var O=h?n:this,E=m?O[e]:e;return c=g.length,u?g=Sa(g,u):y&&c>1&&g.reverse(),f&&l<c&&(g.length=l),this&&this!==lt&&this instanceof i&&(E=b||Fi(E)),E.apply(O,g)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return gr(e,(function(e,i,a){t(r,n(e),i,a)})),r}(n,e,t(r),{})}}function Li(e,t){return function(n,r){var a;if(n===i&&r===i)return t;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),a=e(n,r)}return a}}function Vi(e){return ea((function(t){return t=Pt(t,Gt(oa())),Kr((function(n){var r=this;return e(t,(function(e){return Dt(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?Hr(t,e):t;var r=Hr(t,dt(e/ln(t)));return an(t)?gi(dn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,a){return a&&"number"!=typeof a&&ya(t,n,a)&&(n=a=i),t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n,i){for(var a=-1,o=yn(dt((t-e)/(n||1)),0),s=r(o);o--;)s[i?o:++a]=e,e+=n;return s}(t,n,a=a===i?t<n?1:-1:hs(a),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Wi(e,t,n,r,a,o,s,c,u,l){var d=8&t;t|=d?p:64,4&(t&=~(d?64:p))||(t&=-4);var f=[e,t,a,d?o:i,d?s:i,d?i:o,d?i:s,c,u,l],h=n.apply(i,f);return ga(e)&&ka(h,f),h.placeholder=r,Pa(h,e,t)}function Qi(e){var t=De[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(ms(n),292))&&Rt(e)){var r=(gs(e)+"e").split("e");return+((r=(gs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Hi=Sn&&1/cn(new Sn([,-0]))[1]==u?function(e){return new Sn(e)}:cp;function Ki(e){return function(t){var n=da(t);return n==x?on(t):n==j?un(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gi(e,t,n,o,u,l,d,f){var h=2&t;if(!h&&"function"!=typeof e)throw new je(a);var m=o?o.length:0;if(m||(t&=-97,o=u=i),d=d===i?d:yn(ms(d),0),f=f===i?f:ms(f),m-=u?u.length:0,64&t){var v=o,y=u;o=u=i}var b=h?i:ra(e),g=[e,t,n,o,u,v,y,l,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var p=t[3];if(p){var u=e[3];e[3]=u?Ei(u,p,t[4]):p,e[4]=u?pn(e[3],s):t[4]}(p=t[5])&&(u=e[5],e[5]=u?Si(u,p,t[6]):p,e[6]=u?pn(e[5],s):t[6]),(p=t[7])&&(e[7]=p),r&c&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],n=g[2],o=g[3],u=g[4],!(f=g[9]=g[9]===i?h?0:e.length:yn(g[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var a=Fi(e);return function o(){for(var s=arguments.length,p=r(s),c=s,u=aa(o);c--;)p[c]=arguments[c];var l=s<3&&p[0]!==u&&p[s-1]!==u?[]:pn(p,u);return(s-=l.length)<n?Wi(e,t,$i,o.placeholder,i,p,l,i,i,n-s):Dt(this&&this!==lt&&this instanceof o?a:e,this,p)}}(e,t,f):t!=p&&33!=t||u.length?$i.apply(i,g):function(e,t,n,i){var a=1&t,o=Fi(e);return function t(){for(var s=-1,p=arguments.length,c=-1,u=i.length,l=r(u+p),d=this&&this!==lt&&this instanceof t?o:e;++c<u;)l[c]=i[c];for(;p--;)l[c++]=arguments[++s];return Dt(d,a?n:this,l)}}(e,t,n,o);else var w=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==lt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Pa((b?Zr:ka)(w,g),e,t)}function Ji(e,t,n,r){return e===i||Vo(e,Ne[n])&&!Ae.call(r,n)?t:e}function Yi(e,t,n,r,a,o){return ts(e)&&ts(t)&&(o.set(t,e),Lr(e,t,i,Yi,o),o.delete(t)),e}function Zi(e){return as(e)?i:e}function Xi(e,t,n,r,a,o){var s=1&n,p=e.length,c=t.length;if(p!=c&&!(s&&c>p))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,h=2&n?new Hn:i;for(o.set(e,t),o.set(t,e);++d<p;){var m=e[d],v=t[d];if(r)var y=s?r(v,m,d,t,e,o):r(m,v,d,e,t,o);if(y!==i){if(y)continue;f=!1;break}if(h){if(!Ft(t,(function(e,t){if(!Yt(h,t)&&(m===e||a(m,e,n,r,o)))return h.push(t)}))){f=!1;break}}else if(m!==v&&!a(m,v,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function ea(e){return Na(Oa(e,i,Wa),e+"")}function ta(e){return Dr(e,Cs,ua)}function na(e){return Dr(e,As,la)}var ra=Tn?function(e){return Tn.get(e)}:cp;function ia(e){for(var t=e.name+"",n=Nn[t],r=Ae.call(Nn,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function aa(e){return(Ae.call(Bn,"placeholder")?Bn:e).placeholder}function oa(){var e=Bn.iteratee||ap;return e=e===ap?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function sa(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function pa(e){for(var t=Cs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xa(i)]}return t}function ca(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Ar(n)?n:i}var ua=mt?function(e){return null==e?[]:(e=Oe(e),kt(mt(e),(function(t){return Qe.call(e,t)})))}:vp,la=mt?function(e){for(var t=[];e;)Ct(t,ua(e)),e=ze(e);return t}:vp,da=Or;function fa(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,a=!1;++r<i;){var o=Ma(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&es(i)&&va(o,i)&&(Wo(e)||zo(e))}function ha(e){return"function"!=typeof e.constructor||_a(e)?{}:Ln(ze(e))}function ma(e){return Wo(e)||zo(e)||!!(Ke&&e&&e[Ke])}function va(e,t){var n=typeof e;return!!(t=null==t?l:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ya(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Ho(n)&&va(t,n.length):"string"==r&&t in n)&&Vo(n[t],e)}function ba(e,t){if(Wo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||X.test(e)||!Z.test(e)||null!=t&&e in Oe(t)}function ga(e){var t=ia(e),n=Bn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ra(n);return!!r&&e===r[0]}(Dn&&da(new Dn(new ArrayBuffer(1)))!=C||On&&da(new On)!=x||En&&da(En.resolve())!=E||Sn&&da(new Sn)!=j||jn&&da(new jn)!=N)&&(da=function(e){var t=Or(e),n=t==O?e.constructor:i,r=n?$a(n):"";if(r)switch(r){case Pn:return C;case Cn:return x;case An:return E;case In:return j;case Fn:return N}return t});var wa=Pe?Zo:yp;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function xa(e){return e==e&&!ts(e)}function Da(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Oe(n))}}function Oa(e,t,n){return t=yn(t===i?e.length-1:t,0),function(){for(var i=arguments,a=-1,o=yn(i.length-t,0),s=r(o);++a<o;)s[a]=i[t+a];a=-1;for(var p=r(t+1);++a<t;)p[a]=i[a];return p[t]=n(s),Dt(e,this,p)}}function Ea(e,t){return t.length<2?e:xr(e,ti(t,0,-1))}function Sa(e,t){for(var n=e.length,r=bn(t.length,n),a=ji(e);r--;){var o=t[r];e[r]=va(o,n)?a[o]:i}return e}function ja(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Ca(Zr),Ta=ut||function(e,t){return lt.setTimeout(e,t)},Na=Ca(Xr);function Pa(e,t,n){var r=t+"";return Na(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(h,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(se):[]}(r),n)))}function Ca(e){var t=0,n=0;return function(){var r=gn(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Aa(e,t){var n=-1,r=e.length,a=r-1;for(t=t===i?r:t;++n<t;){var o=Qr(n,a),s=e[o];e[o]=e[n],e[n]=s}return e.length=t,e}var Ia,Fa,Ra=(Ia=Fo((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Fa.size&&Fa.clear(),e})),Fa=Ia.cache,Ia);function Ma(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $a(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ba(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=ji(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var La=Kr((function(e,t){return Ko(e)?ur(e,vr(t,1,Ko,!0)):[]})),Va=Kr((function(e,t){var n=Ja(t);return Ko(n)&&(n=i),Ko(e)?ur(e,vr(t,1,Ko,!0),oa(n,2)):[]})),qa=Kr((function(e,t){var n=Ja(t);return Ko(n)&&(n=i),Ko(e)?ur(e,vr(t,1,Ko,!0),i,n):[]}));function Ua(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=yn(r+i,0)),$t(e,oa(t,3),i)}function za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r-1;return n!==i&&(a=ms(n),a=n<0?yn(r+a,0):bn(a,r-1)),$t(e,oa(t,3),a,!0)}function Wa(e){return null!=e&&e.length?vr(e,1):[]}function Qa(e){return e&&e.length?e[0]:i}var Ha=Kr((function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?kr(t):[]})),Ka=Kr((function(e){var t=Ja(e),n=Pt(e,mi);return t===Ja(n)?t=i:n.pop(),n.length&&n[0]===e[0]?kr(n,oa(t,2)):[]})),Ga=Kr((function(e){var t=Ja(e),n=Pt(e,mi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?kr(n,i,t):[]}));function Ja(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Kr(Za);function Za(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var Xa=ea((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Wr(e,Pt(t,(function(e){return va(e,n)?+e:e})).sort(Oi)),r}));function eo(e){return null==e?e:xn.call(e)}var to=Kr((function(e){return pi(vr(e,1,Ko,!0))})),no=Kr((function(e){var t=Ja(e);return Ko(t)&&(t=i),pi(vr(e,1,Ko,!0),oa(t,2))})),ro=Kr((function(e){var t=Ja(e);return t="function"==typeof t?t:i,pi(vr(e,1,Ko,!0),i,t)}));function io(e){if(!e||!e.length)return[];var t=0;return e=kt(e,(function(e){if(Ko(e))return t=yn(e.length,t),!0})),Ht(t,(function(t){return Pt(e,Ut(t))}))}function ao(e,t){if(!e||!e.length)return[];var n=io(e);return null==t?n:Pt(n,(function(e){return Dt(t,i,e)}))}var oo=Kr((function(e,t){return Ko(e)?ur(e,t):[]})),so=Kr((function(e){return fi(kt(e,Ko))})),po=Kr((function(e){var t=Ja(e);return Ko(t)&&(t=i),fi(kt(e,Ko),oa(t,2))})),co=Kr((function(e){var t=Ja(e);return t="function"==typeof t?t:i,fi(kt(e,Ko),i,t)})),uo=Kr(io),lo=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ao(e,n)}));function fo(e){var t=Bn(e);return t.__chain__=!0,t}function ho(e,t){return t(e)}var mo=ea((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&va(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[a],thisArg:i}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)})),vo=Ti((function(e,t,n){Ae.call(e,n)?++e[n]:ir(e,n,1)})),yo=Ri(Ua),bo=Ri(za);function go(e,t){return(Wo(e)?Et:lr)(e,oa(t,3))}function wo(e,t){return(Wo(e)?St:dr)(e,oa(t,3))}var _o=Ti((function(e,t,n){Ae.call(e,n)?e[n].push(t):ir(e,n,[t])})),xo=Kr((function(e,t,n){var i=-1,a="function"==typeof t,o=Ho(e)?r(e.length):[];return lr(e,(function(e){o[++i]=a?Dt(t,e,n):Tr(e,t,n)})),o})),Do=Ti((function(e,t,n){ir(e,n,t)}));function Oo(e,t){return(Wo(e)?Pt:Mr)(e,oa(t,3))}var Eo=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),So=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ya(e,t[0],t[1])?t=[]:n>2&&ya(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,vr(t,1),[])})),jo=ct||function(){return lt.Date.now()};function ko(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Gi(e,c,i,i,i,i,t)}function To(e,t){var n;if("function"!=typeof t)throw new je(a);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var No=Kr((function(e,t,n){var r=1;if(n.length){var i=pn(n,aa(No));r|=p}return Gi(e,r,t,n,i)})),Po=Kr((function(e,t,n){var r=3;if(n.length){var i=pn(n,aa(Po));r|=p}return Gi(t,r,e,n,i)}));function Co(e,t,n){var r,o,s,p,c,u,l=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new je(a);function m(t){var n=r,a=o;return r=o=i,l=t,p=e.apply(a,n)}function v(e){return l=e,c=Ta(b,t),d?m(e):p}function y(e){var n=e-u;return u===i||n>=t||n<0||f&&e-l>=s}function b(){var e=jo();if(y(e))return g(e);c=Ta(b,function(e){var n=t-(e-u);return f?bn(n,s-(e-l)):n}(e))}function g(e){return c=i,h&&r?m(e):(r=o=i,p)}function w(){var e=jo(),n=y(e);if(r=arguments,o=this,u=e,n){if(c===i)return v(u);if(f)return wi(c),c=Ta(b,t),m(u)}return c===i&&(c=Ta(b,t)),p}return t=ys(t)||0,ts(n)&&(d=!!n.leading,s=(f="maxWait"in n)?yn(ys(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==i&&wi(c),l=0,r=u=o=c=i},w.flush=function(){return c===i?p:g(jo())},w}var Ao=Kr((function(e,t){return cr(e,1,t)})),Io=Kr((function(e,t,n){return cr(e,ys(t)||0,n)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Fo.Cache||Qn),n}function Ro(e){if("function"!=typeof e)throw new je(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fo.Cache=Qn;var Mo=bi((function(e,t){var n=(t=1==t.length&&Wo(t[0])?Pt(t[0],Gt(oa())):Pt(vr(t,1),Gt(oa()))).length;return Kr((function(r){for(var i=-1,a=bn(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return Dt(e,this,r)}))})),$o=Kr((function(e,t){var n=pn(t,aa($o));return Gi(e,p,i,t,n)})),Bo=Kr((function(e,t){var n=pn(t,aa(Bo));return Gi(e,64,i,t,n)})),Lo=ea((function(e,t){return Gi(e,256,i,i,i,t)}));function Vo(e,t){return e===t||e!=e&&t!=t}var qo=zi(Er),Uo=zi((function(e,t){return e>=t})),zo=Nr(function(){return arguments}())?Nr:function(e){return ns(e)&&Ae.call(e,"callee")&&!Qe.call(e,"callee")},Wo=r.isArray,Qo=yt?Gt(yt):function(e){return ns(e)&&Or(e)==P};function Ho(e){return null!=e&&es(e.length)&&!Zo(e)}function Ko(e){return ns(e)&&Ho(e)}var Go=vt||yp,Jo=bt?Gt(bt):function(e){return ns(e)&&Or(e)==b};function Yo(e){if(!ns(e))return!1;var t=Or(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Zo(e){if(!ts(e))return!1;var t=Or(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xo(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=gt?Gt(gt):function(e){return ns(e)&&da(e)==x};function is(e){return"number"==typeof e||ns(e)&&Or(e)==D}function as(e){if(!ns(e)||Or(e)!=O)return!1;var t=ze(e);if(null===t)return!0;var n=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ce.call(n)==Me}var os=wt?Gt(wt):function(e){return ns(e)&&Or(e)==S},ss=_t?Gt(_t):function(e){return ns(e)&&da(e)==j};function ps(e){return"string"==typeof e||!Wo(e)&&ns(e)&&Or(e)==k}function cs(e){return"symbol"==typeof e||ns(e)&&Or(e)==T}var us=xt?Gt(xt):function(e){return ns(e)&&es(e.length)&&!!it[Or(e)]},ls=zi(Rr),ds=zi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ho(e))return ps(e)?dn(e):ji(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=da(e);return(t==x?on:t==j?cn:Vs)(e)}function hs(e){return e?(e=ys(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function vs(e){return e?or(ms(e),0,f):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return d;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=he.test(e);return n||ve.test(e)?pt(e.slice(2),n?2:8):fe.test(e)?d:+e}function bs(e){return ki(e,As(e))}function gs(e){return null==e?"":si(e)}var ws=Ni((function(e,t){if(_a(t)||Ho(t))ki(t,Cs(t),e);else for(var n in t)Ae.call(t,n)&&er(e,n,t[n])})),_s=Ni((function(e,t){ki(t,As(t),e)})),xs=Ni((function(e,t,n,r){ki(t,As(t),e,r)})),Ds=Ni((function(e,t,n,r){ki(t,Cs(t),e,r)})),Os=ea(ar),Es=Kr((function(e,t){e=Oe(e);var n=-1,r=t.length,a=r>2?t[2]:i;for(a&&ya(t[0],t[1],a)&&(r=1);++n<r;)for(var o=t[n],s=As(o),p=-1,c=s.length;++p<c;){var u=s[p],l=e[u];(l===i||Vo(l,Ne[u])&&!Ae.call(e,u))&&(e[u]=o[u])}return e})),Ss=Kr((function(e){return e.push(i,Yi),Dt(Fs,i,e)}));function js(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function ks(e,t){return null!=e&&fa(e,t,jr)}var Ts=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=n}),tp(ip)),Ns=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ae.call(e,t)?e[t].push(n):e[t]=[n]}),oa),Ps=Kr(Tr);function Cs(e){return Ho(e)?Gn(e):Fr(e)}function As(e){return Ho(e)?Gn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Oe(e))t.push(n);return t}(e);var t=_a(e),n=[];for(var r in e)("constructor"!=r||!t&&Ae.call(e,r))&&n.push(r);return n}(e)}var Is=Ni((function(e,t,n){Lr(e,t,n)})),Fs=Ni((function(e,t,n,r){Lr(e,t,n,r)})),Rs=ea((function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),ki(e,na(e),n),r&&(n=sr(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Ms=ea((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return ks(e,n)}))}(e,t)}));function $s(e,t){if(null==e)return{};var n=Pt(na(e),(function(e){return[e]}));return t=oa(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Bs=Ki(Cs),Ls=Ki(As);function Vs(e){return null==e?[]:Jt(e,Cs(e))}var qs=Ii((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Ys(gs(e).toLowerCase())}function zs(e){return(e=gs(e))&&e.replace(be,tn).replace(Ye,"")}var Ws=Ii((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Qs=Ii((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Hs=Ai("toLowerCase"),Ks=Ii((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gs=Ii((function(e,t,n){return e+(n?" ":"")+Ys(t)})),Js=Ii((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ys=Ai("toUpperCase");function Zs(e,t,n){return e=gs(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(pe)||[]}(e):e.match(t)||[]}var Xs=Kr((function(e,t){try{return Dt(e,i,t)}catch(e){return Yo(e)?e:new _e(e)}})),ep=ea((function(e,t){return Et(t,(function(t){t=Ma(t),ir(e,t,No(e[t],e))})),e}));function tp(e){return function(){return e}}var np=Mi(),rp=Mi(!0);function ip(e){return e}function ap(e){return Ir("function"==typeof e?e:sr(e,1))}var op=Kr((function(e,t){return function(n){return Tr(n,e,t)}})),sp=Kr((function(e,t){return function(n){return Tr(e,n,t)}}));function pp(e,t,n){var r=Cs(t),i=_r(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Cs(t)));var a=!(ts(n)&&"chain"in n&&!n.chain),o=Zo(e);return Et(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=ji(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ct([this.value()],arguments))})})),e}function cp(){}var up=Vi(Pt),lp=Vi(jt),dp=Vi(Ft);function fp(e){return ba(e)?Ut(Ma(e)):function(e){return function(t){return xr(t,e)}}(e)}var hp=Ui(),mp=Ui(!0);function vp(){return[]}function yp(){return!1}var bp,gp=Li((function(e,t){return e+t}),0),wp=Qi("ceil"),_p=Li((function(e,t){return e/t}),1),xp=Qi("floor"),Dp=Li((function(e,t){return e*t}),1),Op=Qi("round"),Ep=Li((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new je(a);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=ko,Bn.assign=ws,Bn.assignIn=_s,Bn.assignInWith=xs,Bn.assignWith=Ds,Bn.at=Os,Bn.before=To,Bn.bind=No,Bn.bindAll=ep,Bn.bindKey=Po,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wo(e)?e:[e]},Bn.chain=fo,Bn.chunk=function(e,t,n){t=(n?ya(e,t,n):t===i)?1:yn(ms(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,p=r(dt(a/t));o<a;)p[s++]=ti(e,o,o+=t);return p},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ct(Wo(n)?ji(n):[n],vr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=oa();return e=t?Pt(e,(function(e){if("function"!=typeof e[1])throw new je(a);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Dt(i[0],this,n))return Dt(i[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=Cs(e);return function(n){return pr(n,e,t)}}(sr(e,1))},Bn.constant=tp,Bn.countBy=vo,Bn.create=function(e,t){var n=Ln(e);return null==t?n:rr(n,t)},Bn.curry=function e(t,n,r){var a=Gi(t,8,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bn.curryRight=function e(t,n,r){var a=Gi(t,16,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bn.debounce=Co,Bn.defaults=Es,Bn.defaultsDeep=Ss,Bn.defer=Ao,Bn.delay=Io,Bn.difference=La,Bn.differenceBy=Va,Bn.differenceWith=qa,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ms(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ms(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!0):[]},Bn.fill=function(e,t,n,r){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&ya(e,t,n)&&(n=0,r=a),function(e,t,n,r){var a=e.length;for((n=ms(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:ms(r))<0&&(r+=a),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Wo(e)?kt:mr)(e,oa(t,3))},Bn.flatMap=function(e,t){return vr(Oo(e,t),1)},Bn.flatMapDeep=function(e,t){return vr(Oo(e,t),u)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:ms(n),vr(Oo(e,t),n)},Bn.flatten=Wa,Bn.flattenDeep=function(e){return null!=e&&e.length?vr(e,u):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?vr(e,t=t===i?1:ms(t)):[]},Bn.flip=function(e){return Gi(e,512)},Bn.flow=np,Bn.flowRight=rp,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:_r(e,Cs(e))},Bn.functionsIn=function(e){return null==e?[]:_r(e,As(e))},Bn.groupBy=_o,Bn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Bn.intersection=Ha,Bn.intersectionBy=Ka,Bn.intersectionWith=Ga,Bn.invert=Ts,Bn.invertBy=Ns,Bn.invokeMap=xo,Bn.iteratee=ap,Bn.keyBy=Do,Bn.keys=Cs,Bn.keysIn=As,Bn.map=Oo,Bn.mapKeys=function(e,t){var n={};return t=oa(t,3),gr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Bn.mapValues=function(e,t){var n={};return t=oa(t,3),gr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Bn.matches=function(e){return $r(sr(e,1))},Bn.matchesProperty=function(e,t){return Br(e,sr(t,1))},Bn.memoize=Fo,Bn.merge=Is,Bn.mergeWith=Fs,Bn.method=op,Bn.methodOf=sp,Bn.mixin=pp,Bn.negate=Ro,Bn.nthArg=function(e){return e=ms(e),Kr((function(t){return Vr(t,e)}))},Bn.omit=Rs,Bn.omitBy=function(e,t){return $s(e,Ro(oa(t)))},Bn.once=function(e){return To(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Wo(t)||(t=null==t?[]:[t]),Wo(n=r?i:n)||(n=null==n?[]:[n]),qr(e,t,n))},Bn.over=up,Bn.overArgs=Mo,Bn.overEvery=lp,Bn.overSome=dp,Bn.partial=$o,Bn.partialRight=Bo,Bn.partition=Eo,Bn.pick=Ms,Bn.pickBy=$s,Bn.property=fp,Bn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Bn.pull=Ya,Bn.pullAll=Za,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,oa(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Bn.pullAt=Xa,Bn.range=hp,Bn.rangeRight=mp,Bn.rearg=Lo,Bn.reject=function(e,t){return(Wo(e)?kt:mr)(e,Ro(oa(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=oa(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Wr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new je(a);return Kr(e,t=t===i?t:ms(t))},Bn.reverse=eo,Bn.sampleSize=function(e,t,n){return t=(n?ya(e,t,n):t===i)?1:ms(t),(Wo(e)?Yn:Jr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Yr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Yr(e,t,n,r)},Bn.shuffle=function(e){return(Wo(e)?Zn:ei)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ya(e,t,n)?(t=0,n=r):(t=null==t?0:ms(t),n=n===i?r:ms(n)),ti(e,t,n)):[]},Bn.sortBy=So,Bn.sortedUniq=function(e){return e&&e.length?ai(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,oa(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&ya(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=si(t))&&an(e)?gi(dn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new je(a);return t=null==t?0:yn(ms(t),0),Kr((function(n){var r=n[t],i=gi(n,0,t);return r&&Ct(i,r),Dt(e,this,i)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ms(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?li(e,oa(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new je(a);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Co(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ho,Bn.toArray=fs,Bn.toPairs=Bs,Bn.toPairsIn=Ls,Bn.toPath=function(e){return Wo(e)?Pt(e,Ma):cs(e)?[e]:ji(Ra(gs(e)))},Bn.toPlainObject=bs,Bn.transform=function(e,t,n){var r=Wo(e),i=r||Go(e)||us(e);if(t=oa(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:ts(e)&&Zo(a)?Ln(ze(e)):{}}return(i?Et:gr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Bn.unary=function(e){return ko(e,1)},Bn.union=to,Bn.unionBy=no,Bn.unionWith=ro,Bn.uniq=function(e){return e&&e.length?pi(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?pi(e,oa(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?pi(e,i,t):[]},Bn.unset=function(e,t){return null==e||ci(e,t)},Bn.unzip=io,Bn.unzipWith=ao,Bn.update=function(e,t,n){return null==e?e:ui(e,t,vi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ui(e,t,vi(n),r)},Bn.values=Vs,Bn.valuesIn=function(e){return null==e?[]:Jt(e,As(e))},Bn.without=oo,Bn.words=Zs,Bn.wrap=function(e,t){return $o(vi(t),e)},Bn.xor=so,Bn.xorBy=po,Bn.xorWith=co,Bn.zip=uo,Bn.zipObject=function(e,t){return hi(e||[],t||[],er)},Bn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Yr)},Bn.zipWith=lo,Bn.entries=Bs,Bn.entriesIn=Ls,Bn.extend=_s,Bn.extendWith=xs,pp(Bn,Bn),Bn.add=gp,Bn.attempt=Xs,Bn.camelCase=qs,Bn.capitalize=Us,Bn.ceil=wp,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ys(n))==n?n:0),t!==i&&(t=(t=ys(t))==t?t:0),or(ys(e),t,n)},Bn.clone=function(e){return sr(e,4)},Bn.cloneDeep=function(e){return sr(e,5)},Bn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||pr(e,t,Cs(t))},Bn.deburr=zs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=_p,Bn.endsWith=function(e,t,n){e=gs(e),t=si(t);var r=e.length,a=n=n===i?r:or(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bn.eq=Vo,Bn.escape=function(e){return(e=gs(e))&&K.test(e)?e.replace(Q,nn):e},Bn.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Bn.every=function(e,t,n){var r=Wo(e)?jt:fr;return n&&ya(e,t,n)&&(t=i),r(e,oa(t,3))},Bn.find=yo,Bn.findIndex=Ua,Bn.findKey=function(e,t){return Mt(e,oa(t,3),gr)},Bn.findLast=bo,Bn.findLastIndex=za,Bn.findLastKey=function(e,t){return Mt(e,oa(t,3),wr)},Bn.floor=xp,Bn.forEach=go,Bn.forEachRight=wo,Bn.forIn=function(e,t){return null==e?e:yr(e,oa(t,3),As)},Bn.forInRight=function(e,t){return null==e?e:br(e,oa(t,3),As)},Bn.forOwn=function(e,t){return e&&gr(e,oa(t,3))},Bn.forOwnRight=function(e,t){return e&&wr(e,oa(t,3))},Bn.get=js,Bn.gt=qo,Bn.gte=Uo,Bn.has=function(e,t){return null!=e&&fa(e,t,Sr)},Bn.hasIn=ks,Bn.head=Qa,Bn.identity=ip,Bn.includes=function(e,t,n,r){e=Ho(e)?e:Vs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ps(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Bt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=yn(r+i,0)),Bt(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<yn(t,n)}(e=ys(e),t,n)},Bn.invoke=Ps,Bn.isArguments=zo,Bn.isArray=Wo,Bn.isArrayBuffer=Qo,Bn.isArrayLike=Ho,Bn.isArrayLikeObject=Ko,Bn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Or(e)==y},Bn.isBuffer=Go,Bn.isDate=Jo,Bn.isElement=function(e){return ns(e)&&1===e.nodeType&&!as(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&(Wo(e)||"string"==typeof e||"function"==typeof e.splice||Go(e)||us(e)||zo(e)))return!e.length;var t=da(e);if(t==x||t==j)return!e.size;if(_a(e))return!Fr(e).length;for(var n in e)if(Ae.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Pr(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Pr(e,t,i,n):!!r},Bn.isError=Yo,Bn.isFinite=function(e){return"number"==typeof e&&Rt(e)},Bn.isFunction=Zo,Bn.isInteger=Xo,Bn.isLength=es,Bn.isMap=rs,Bn.isMatch=function(e,t){return e===t||Cr(e,t,pa(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Cr(e,t,pa(t),n)},Bn.isNaN=function(e){return is(e)&&e!=+e},Bn.isNative=function(e){if(wa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ar(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=is,Bn.isObject=ts,Bn.isObjectLike=ns,Bn.isPlainObject=as,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Xo(e)&&e>=-9007199254740991&&e<=l},Bn.isSet=ss,Bn.isString=ps,Bn.isSymbol=cs,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ns(e)&&da(e)==N},Bn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Or(e)},Bn.join=function(e,t){return null==e?"":zt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Ja,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=ms(n))<0?yn(r+a,0):bn(a,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):$t(e,Vt,a,!0)},Bn.lowerCase=Qs,Bn.lowerFirst=Hs,Bn.lt=ls,Bn.lte=ds,Bn.max=function(e){return e&&e.length?hr(e,ip,Er):i},Bn.maxBy=function(e,t){return e&&e.length?hr(e,oa(t,2),Er):i},Bn.mean=function(e){return qt(e,ip)},Bn.meanBy=function(e,t){return qt(e,oa(t,2))},Bn.min=function(e){return e&&e.length?hr(e,ip,Rr):i},Bn.minBy=function(e,t){return e&&e.length?hr(e,oa(t,2),Rr):i},Bn.stubArray=vp,Bn.stubFalse=yp,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Dp,Bn.nth=function(e,t){return e&&e.length?Vr(e,ms(t)):i},Bn.noConflict=function(){return lt._===this&&(lt._=$e),this},Bn.noop=cp,Bn.now=jo,Bn.pad=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(ft(i),n)+e+qi(dt(i),n)},Bn.padEnd=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;return t&&r<t?e+qi(t-r,n):e},Bn.padStart=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;return t&&r<t?qi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(gs(e).replace(re,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ya(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var a=_n();return bn(e+a*(t-e+st("1e-"+((a+"").length-1))),t)}return Qr(e,t)},Bn.reduce=function(e,t,n){var r=Wo(e)?At:Wt,i=arguments.length<3;return r(e,oa(t,4),n,i,lr)},Bn.reduceRight=function(e,t,n){var r=Wo(e)?It:Wt,i=arguments.length<3;return r(e,oa(t,4),n,i,dr)},Bn.repeat=function(e,t,n){return t=(n?ya(e,t,n):t===i)?1:ms(t),Hr(gs(e),t)},Bn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,a=(t=yi(t,e)).length;for(a||(a=1,e=i);++r<a;){var o=null==e?i:e[Ma(t[r])];o===i&&(r=a,o=n),e=Zo(o)?o.call(e):o}return e},Bn.round=Op,Bn.runInContext=e,Bn.sample=function(e){return(Wo(e)?Jn:Gr)(e)},Bn.size=function(e){if(null==e)return 0;if(Ho(e))return ps(e)?ln(e):e.length;var t=da(e);return t==x||t==j?e.size:Fr(e).length},Bn.snakeCase=Ks,Bn.some=function(e,t,n){var r=Wo(e)?Ft:ni;return n&&ya(e,t,n)&&(t=i),r(e,oa(t,3))},Bn.sortedIndex=function(e,t){return ri(e,t)},Bn.sortedIndexBy=function(e,t,n){return ii(e,t,oa(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Vo(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ii(e,t,oa(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Vo(e[n],t))return n}return-1},Bn.startCase=Gs,Bn.startsWith=function(e,t,n){return e=gs(e),n=null==n?0:or(ms(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Bn.subtract=Ep,Bn.sum=function(e){return e&&e.length?Qt(e,ip):0},Bn.sumBy=function(e,t){return e&&e.length?Qt(e,oa(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&ya(e,t,n)&&(t=i),e=gs(e),t=xs({},t,r,Ji);var a,o,s=xs({},t.imports,r.imports,Ji),p=Cs(s),c=Jt(s,p),u=0,l=t.interpolate||ge,d="__p += '",f=Ee((t.escape||ge).source+"|"+l.source+"|"+(l===Y?le:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(Ae.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,i,s,p){return r||(r=i),d+=e.slice(u,p).replace(we,rn),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=p+t.length,t})),d+="';\n";var m=Ae.call(t,"variable")&&t.variable;if(m){if(ce.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(q,""):d).replace(U,"$1").replace(z,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Xs((function(){return xe(p,h+"return "+d).apply(i,c)}));if(v.source=d,Yo(v))throw v;return v},Bn.times=function(e,t){if((e=ms(e))<1||e>l)return[];var n=f,r=bn(e,f);t=oa(t),e-=f;for(var i=Ht(r,t);++n<e;)t(n);return i},Bn.toFinite=hs,Bn.toInteger=ms,Bn.toLength=vs,Bn.toLower=function(e){return gs(e).toLowerCase()},Bn.toNumber=ys,Bn.toSafeInteger=function(e){return e?or(ms(e),-9007199254740991,l):0===e?e:0},Bn.toString=gs,Bn.toUpper=function(e){return gs(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=gs(e))&&(n||t===i))return Kt(e);if(!e||!(t=si(t)))return e;var r=dn(e),a=dn(t);return gi(r,Zt(r,a),Xt(r,a)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=si(t)))return e;var r=dn(e);return gi(r,0,Xt(r,dn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=dn(e);return gi(r,Zt(r,dn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(ts(t)){var a="separator"in t?t.separator:a;n="length"in t?ms(t.length):n,r="omission"in t?si(t.omission):r}var o=(e=gs(e)).length;if(an(e)){var s=dn(e);o=s.length}if(n>=o)return e;var p=n-ln(r);if(p<1)return r;var c=s?gi(s,0,p).join(""):e.slice(0,p);if(a===i)return c+r;if(s&&(p+=c.length-p),os(a)){if(e.slice(p).search(a)){var u,l=c;for(a.global||(a=Ee(a.source,gs(de.exec(a))+"g")),a.lastIndex=0;u=a.exec(l);)var d=u.index;c=c.slice(0,d===i?p:d)}}else if(e.indexOf(si(a),p)!=p){var f=c.lastIndexOf(a);f>-1&&(c=c.slice(0,f))}return c+r},Bn.unescape=function(e){return(e=gs(e))&&H.test(e)?e.replace(W,hn):e},Bn.uniqueId=function(e){var t=++Ie;return gs(e)+t},Bn.upperCase=Js,Bn.upperFirst=Ys,Bn.each=go,Bn.eachRight=wo,Bn.first=Qa,pp(Bn,(bp={},gr(Bn,(function(e,t){Ae.call(Bn.prototype,t)||(bp[t]=e)})),bp),{chain:!1}),Bn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Et(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:yn(ms(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oa(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ip)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Tr(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Ro(oa(e)))},Un.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(f)},gr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,p=t instanceof Un,c=s[0],u=p||Wo(t),l=function(e){var t=a.apply(Bn,Ct([e],s));return r&&d?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(p=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=o&&!d,m=p&&!f;if(!o&&u){t=m?t:new Un(this);var v=e.apply(t,s);return v.__actions__.push({func:ho,args:[l],thisArg:i}),new qn(v,d)}return h&&m?e.apply(this,s):(v=this.thru(l),h?r?v.value()[0]:v.value():v)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ke[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wo(i)?i:[],e)}return this[n]((function(n){return t.apply(Wo(n)?n:[],e)}))}})),gr(Un.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ae.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[$i(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=ji(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ji(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ji(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wo(e),r=t<0,i=n?e.length:0,a=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=bn(t,e+o);break;case"takeRight":e=yn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,p=s-o,c=r?s:o-1,u=this.__iteratees__,l=u.length,d=0,f=bn(p,this.__takeCount__);if(!n||!r&&i==p&&f==p)return di(e,this.__actions__);var h=[];e:for(;p--&&d<f;){for(var m=-1,v=e[c+=t];++m<l;){var y=u[m],b=y.iteratee,g=y.type,w=b(v);if(2==g)v=w;else if(!w){if(1==g)continue e;break e}}h[d++]=v}return h},Bn.prototype.at=mo,Bn.prototype.chain=function(){return fo(this)},Bn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Ba(n);r.__index__=0,r.__values__=i,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ho,args:[eo],thisArg:i}),new qn(t,this.__chain__)}return this.thru(eo)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Ge&&(Bn.prototype[Ge]=function(){return this}),Bn}();lt._=mn,(r=function(){return mn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},94349:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){return function(){function e(e,t){if(this.app="loki",this.options=t||{},void 0!==e&&(this.app=e),this.catalog=null,!this.checkAvailability())throw new Error("indexedDB does not seem to be supported for your environment")}function t(e){this.db=null,this.initializeLokiCatalog(e)}return e.prototype.closeDatabase=function(){this.catalog&&this.catalog.db&&(this.catalog.db.close(),this.catalog.db=null)},e.prototype.checkAvailability=function(){return!("undefined"==typeof indexedDB||!indexedDB)},e.prototype.loadDatabase=function(e,n){var r=this.app,i=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,e,(function(e){if("function"==typeof n){if(0===e.id)return void n(null);n(e.val)}else console.log(e.val)})):this.catalog=new t((function(t){i.catalog=t,i.loadDatabase(e,n)}))},e.prototype.loadKey=e.prototype.loadDatabase,e.prototype.saveDatabase=function(e,n,r){var i=this.app,a=this;function o(e){e&&!0===e.success?r(null):r(new Error("Error saving database")),a.options.closeAfterSave&&a.closeDatabase()}null!==this.catalog&&null!==this.catalog.db?this.catalog.setAppKey(i,e,n,o):this.catalog=new t((function(t){a.saveDatabase(e,n,o)}))},e.prototype.saveKey=e.prototype.saveDatabase,e.prototype.deleteDatabase=function(e,n){var r=this.app,i=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,e,(function(e){var t=e.id;0!==t?i.catalog.deleteAppKey(t,n):"function"==typeof n&&n({success:!0})})):this.catalog=new t((function(t){i.catalog=t,i.deleteDatabase(e,n)}))},e.prototype.deleteKey=e.prototype.deleteDatabase,e.prototype.deleteDatabasePartitions=function(e){var t=this;this.getDatabaseList((function(n){n.forEach((function(n){n.startsWith(e)&&t.deleteDatabase(n)}))}))},e.prototype.getDatabaseList=function(e){var n=this.app,r=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKeys(n,(function(t){for(var n=[],r=0;r<t.length;r++)n.push(t[r].key);"function"==typeof e?e(n):n.forEach((function(e){console.log(e)}))})):this.catalog=new t((function(t){r.catalog=t,r.getDatabaseList(e)}))},e.prototype.getKeyList=e.prototype.getDatabaseList,e.prototype.getCatalogSummary=function(e){this.app;var n=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAllKeys((function(t){for(var n,r,i,a,o,s=[],p=0;p<t.length;p++)i=(n=t[p]).app||"",a=n.key||"",o=n.val||"",r=2*i.length+2*a.length+o.length+1,s.push({app:n.app,key:n.key,size:r});"function"==typeof e?e(s):s.forEach((function(e){console.log(e)}))})):this.catalog=new t((function(t){n.catalog=t,n.getCatalogSummary(e)}))},t.prototype.initializeLokiCatalog=function(e){var t=indexedDB.open("LokiCatalog",1),n=this;t.onupgradeneeded=function(e){var t=e.target.result;if(t.objectStoreNames.contains("LokiAKV")&&t.deleteObjectStore("LokiAKV"),!t.objectStoreNames.contains("LokiAKV")){var n=t.createObjectStore("LokiAKV",{keyPath:"id",autoIncrement:!0});n.createIndex("app","app",{unique:!1}),n.createIndex("key","key",{unique:!1}),n.createIndex("appkey","appkey",{unique:!0})}},t.onsuccess=function(t){n.db=t.target.result,"function"==typeof e&&e(n)},t.onerror=function(e){throw e}},t.prototype.getAppKey=function(e,t,n){var r,i=e+","+t,a=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("appkey").get(i);a.onsuccess=(r=n,function(e){var t=e.target.result;null==t&&(t={id:0,success:!1}),"function"==typeof r?r(t):console.log(t)}),a.onerror=function(e){return function(t){if("function"!=typeof e)throw t;e({id:0,success:!1})}}(n)},t.prototype.getAppKeyById=function(e,t,n){this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").get(e).onsuccess=function(e,t){return function(n){"function"==typeof t?t(n.target.result,e):console.log(n.target.result)}}(n,t)},t.prototype.setAppKey=function(e,t,n,r){var i,a=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV"),o=a.index("appkey"),s=e+","+t,p=o.get(s);p.onsuccess=function(i){var o=i.target.result;null==o?o={app:e,key:t,appkey:e+","+t,val:n}:o.val=n;var s,c=a.put(o);c.onerror=(s=r,function(e){"function"==typeof s?s({success:!1}):(console.error("LokiCatalog.setAppKey (set) onerror"),console.error(p.error))}),c.onsuccess=function(e){return function(t){"function"==typeof e&&e({success:!0})}}(r)},p.onerror=(i=r,function(e){"function"==typeof i?i({success:!1}):(console.error("LokiCatalog.setAppKey (get) onerror"),console.error(p.error))})},t.prototype.deleteAppKey=function(e,t){var n,r=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV").delete(e);r.onsuccess=(n=t,function(e){"function"==typeof n&&n({success:!0})}),r.onerror=function(e){return function(t){"function"==typeof e?e({success:!1}):(console.error("LokiCatalog.deleteAppKey raised onerror"),console.error(r.error))}}(t)},t.prototype.getAppKeys=function(e,t){var n,r=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("app"),i=IDBKeyRange.only(e),a=r.openCursor(i);a.onsuccess=function(e,t){return function(n){var r=n.target.result;if(r){var i=r.value;e.push(i),r.continue()}else"function"==typeof t?t(e):console.log(e)}}([],t),a.onerror=(n=t,function(e){"function"==typeof n?n(null):(console.error("LokiCatalog.getAppKeys raised onerror"),console.error(e))})},t.prototype.getAllKeys=function(e){var t,n=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").openCursor();n.onsuccess=function(e,t){return function(n){var r=n.target.result;if(r){var i=r.value;e.push(i),r.continue()}else"function"==typeof t?t(e):console.log(e)}}([],e),n.onerror=(t=e,function(e){"function"==typeof t&&t(null)})},e}()})?n.apply(t,[]):n)||(e.exports=r)},57979:function(e,t,n){var r,i;r=function(){return function(){"use strict";var e=Object.prototype.hasOwnProperty;function t(e){var n,i;if(Array.isArray(e)){for(i=0;i<e.length;i++)t(e[i]);r(e)}else if(null!==e&&"object"==typeof e){for(n in e)e.hasOwnProperty(n)&&t(e[n]);r(e)}}function r(e){Object.isFrozen(e)||Object.freeze(e)}function i(e){return Object.isFrozen(e)?v(e,"shallow"):e}var a={copyProperties:function(e,t){var n;for(n in e)t[n]=e[n]},resolveTransformObject:function(e,t,n){var r,i;if("number"!=typeof n&&(n=0),++n>=10)return e;for(r in e)"string"==typeof e[r]&&0===e[r].indexOf("[%lktxp]")?(i=e[r].substring(8),t.hasOwnProperty(i)&&(e[r]=t[i])):"object"==typeof e[r]&&(e[r]=a.resolveTransformObject(e[r],t,n));return e},resolveTransformParams:function(e,t){var n,r,i=[];if(void 0===t)return e;for(n=0;n<e.length;n++)r=v(e[n],"shallow-recurse-objects"),i.push(a.resolveTransformObject(r,t));return i},getIn:function(e,t,n){if(null!=e){if(!n)return e[t];if("string"==typeof t&&(t=t.split(".")),!Array.isArray(t))throw new Error("path must be a string or array. Found "+typeof t);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:void 0}}},o={aeq:s,lt:p,gt:c};function s(e,t){var n,r,i,a;if(e===t)return!0;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:i=1;break;case!1:i=3;break;case!0:i=4;break;case"":i=5;break;default:i=e==e?9:0}switch(t){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=t==t?9:0}if(9!==i||9!==a)return i===a}return n=Number(e),r=Number(t),n==n||r==r?n===r:(n=e.toString())==(r=t.toString())}function p(e,t,n){var r,i,a,o;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t==t?9:0}if(9!==a||9!==o)return a===o?n:a<o}return r=Number(e),i=Number(t),r==r&&i==i?r<i||!(r>i)&&n:r==r&&i!=i||(i!=i||r==r)&&(e<t||!(e>t)&&(e==t?n:(r=e.toString())<(i=t.toString())||r==i&&n))}function c(e,t,n){var r,i,a,o;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t==t?9:0}if(9!==a||9!==o)return a===o?n:a>o}return r=Number(e),i=Number(t),r==r&&i==i?r>i||!(r<i)&&n:(r!=r||i==i)&&(i==i&&r!=r||e>t||!(e<t)&&(e==t?n:(r=e.toString())>(i=t.toString())||r==i&&n))}function u(e,t,n){return o.aeq(e,t)?0:o.lt(e,t,!1)?n?1:-1:o.gt(e,t,!1)?n?-1:1:0}function l(e,t,n,r,i,a){var o,s=a||0,p=t[s],c=!1;if("object"==typeof e&&p in e&&(o=e[p]),s+1>=t.length)c=n(o,r,i);else if(Array.isArray(o))for(var u=0,d=o.length;u<d&&!0!==(c=l(o[u],t,n,r,i,s+1));u+=1);else c=l(o,t,n,r,i,s+1);return c}function d(t){return"string"==typeof t||Array.isArray(t)?function(e){return-1!==t.indexOf(e)}:"object"==typeof t&&null!==t?function(n){return e.call(t,n)}:null}function f(t,n,r){for(var i in n)if(e.call(n,i))return h[i](t,n[i],r);return!1}var h={$eq:function(e,t){return e===t},$aeq:function(e,t){return e==t},$ne:function(e,t){return t!=t?e==e:e!==t},$dteq:function(e,t){return o.aeq(e,t)},$gt:function(e,t){return o.gt(e,t,!1)},$gte:function(e,t){return o.gt(e,t,!0)},$lt:function(e,t){return o.lt(e,t,!1)},$lte:function(e,t){return o.lt(e,t,!0)},$jgt:function(e,t){return e>t},$jgte:function(e,t){return e>=t},$jlt:function(e,t){return e<t},$jlte:function(e,t){return e<=t},$between:function(e,t){return null!=e&&o.gt(e,t[0],!0)&&o.lt(e,t[1],!0)},$jbetween:function(e,t){return null!=e&&e>=t[0]&&e<=t[1]},$in:function(e,t){return-1!==t.indexOf(e)},$inSet:function(e,t){return t.has(e)},$nin:function(e,t){return-1===t.indexOf(e)},$keyin:function(e,t){return e in t},$nkeyin:function(e,t){return!(e in t)},$definedin:function(e,t){return void 0!==t[e]},$undefinedin:function(e,t){return void 0===t[e]},$regex:function(e,t){return t.test(e)},$containsString:function(e,t){return"string"==typeof e&&-1!==e.indexOf(t)},$containsNone:function(e,t){return!h.$containsAny(e,t)},$containsAny:function(e,t){var n=d(e);return null!==n&&(Array.isArray(t)?t.some(n):n(t))},$contains:function(e,t){var n=d(e);return null!==n&&(Array.isArray(t)?t.every(n):n(t))},$elemMatch:function(e,t){return!!Array.isArray(e)&&e.some((function(e){return Object.keys(t).every((function(n){var r=t[n];return"object"==typeof r&&r||(r={$eq:r}),-1!==n.indexOf(".")?l(e,n.split("."),f,t[n],e):f(e[n],r,e)}))}))},$type:function(e,t,n){var r=typeof e;return"object"===r&&(Array.isArray(e)?r="array":e instanceof Date&&(r="date")),"object"!=typeof t?r===t:f(r,t,n)},$finite:function(e,t){return t===isFinite(e)},$size:function(e,t,n){return!!Array.isArray(e)&&("object"!=typeof t?e.length===t:f(e.length,t,n))},$len:function(e,t,n){return"string"==typeof e&&("object"!=typeof t?e.length===t:f(e.length,t,n))},$where:function(e,t){return!0===t(e)},$not:function(e,t,n){return!f(e,t,n)},$and:function(e,t,n){for(var r=0,i=t.length;r<i;r+=1)if(!f(e,t[r],n))return!1;return!0},$or:function(e,t,n){for(var r=0,i=t.length;r<i;r+=1)if(f(e,t[r],n))return!0;return!1},$exists:function(e,t){return t?void 0!==e:void 0===e}};["$eq","$aeq","$ne","$dteq","$gt","$gte","$lt","$lte","$jgt","$jgte","$jlt","$jlte","$type"].forEach((function(e){var t=h[e];h["$"+e]=function(e,n,r){if("string"==typeof n)return t(e,r[n]);if("function"==typeof n)return t(e,n(r));throw new Error("Invalid argument to $$ matcher")}}));var m={$eq:h.$eq,$aeq:!0,$dteq:!0,$gt:!0,$gte:!0,$lt:!0,$lte:!0,$in:!0,$between:!0};function v(e,t){if(null==e)return null;var n;switch(t||"parse-stringify"){case"parse-stringify":n=JSON.parse(JSON.stringify(e));break;case"jquery-extend-deep":n=jQuery.extend(!0,{},e);break;case"shallow":n=Object.create(e.constructor.prototype),Object.keys(e).map((function(t){n[t]=e[t]}));break;case"shallow-assign":n=Object.create(e.constructor.prototype),Object.assign(n,e);break;case"shallow-recurse-objects":n=v(e,"shallow"),Object.keys(e).forEach((function(t){"object"==typeof e[t]&&"Object"===e[t].constructor.name?n[t]=v(e[t],"shallow-recurse-objects"):Array.isArray(e[t])&&(n[t]=function(e,t){if("parse-stringify"==t)return v(e,t);for(var n=[],r=0,i=e.length;r<i;r++)n[r]=v(e[r],t);return n}(e[t],"shallow-recurse-objects"))}))}return n}function y(){try{return window&&void 0!==window.localStorage&&null!==window.localStorage}catch(e){return!1}}function b(){}function g(e,t){this.filename=e||"loki.db",this.collections=[],this.databaseVersion=1.5,this.engineVersion=1.5,this.autosave=!1,this.autosaveInterval=5e3,this.autosaveHandle=null,this.throttledSaves=!0,this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,this.throttledSavePending=!1,this.throttledCallbacks=[],this.verbose=!(!t||!t.hasOwnProperty("verbose"))&&t.verbose,this.events={init:[],loaded:[],flushChanges:[],close:[],changes:[],warning:[]};t&&t.hasOwnProperty("env")?this.ENV=t.env:this.ENV="undefined"!=typeof global&&(global.android||global.NSObject)?"NATIVESCRIPT":"undefined"==typeof window||"undefined"!=typeof global&&global.window&&"undefined"!=typeof process?"NODEJS":"undefined"!=typeof document?-1===document.URL.indexOf("http://")&&-1===document.URL.indexOf("https://")?"CORDOVA":"BROWSER":"CORDOVA","undefined"===this.ENV&&(this.ENV="NODEJS"),this.configureOptions(t,!0),this.on("init",this.clearChanges)}function w(e){this.hashStore={},this.options=e||{},this.options.hasOwnProperty("asyncResponses")||(this.options.asyncResponses=!1),this.options.hasOwnProperty("asyncTimeout")||(this.options.asyncTimeout=50)}function _(e,t){if(this.mode="reference",this.adapter=null,this.options=t||{},this.dbref=null,this.dbname="",this.pageIterator={},!e)throw new Error("LokiPartitioningAdapter requires a (non-reference mode) adapter on construction");if("reference"===e.mode)throw new Error("LokiPartitioningAdapter cannot be instantiated with a reference mode adapter");this.adapter=e,this.options.hasOwnProperty("paging")||(this.options.paging=!1),this.options.hasOwnProperty("pageSize")||(this.options.pageSize=26214400),this.options.hasOwnProperty("delimiter")||(this.options.delimiter="$<\n")}function x(){try{this.fs=n(57147)}catch(e){this.fs=null}}function D(){}function O(e,t){return t=t||{},this.collection=e,this.filteredrows=[],this.filterInitialized=!1,this}function E(e,t){if("$regex"===e)Array.isArray(t)?t=new RegExp(t[0],t[1]):t instanceof RegExp||(t=new RegExp(t));else if("object"==typeof t)for(var n in t)"$regex"!==n&&"object"!=typeof t[n]||(t[n]=E(n,t[n]));return t}function S(e,t,n){this.collection=e,this.name=t,this.rebuildPending=!1,this.options=n||{},this.options.hasOwnProperty("persistent")||(this.options.persistent=!1),this.options.hasOwnProperty("sortPriority")||(this.options.sortPriority="passive"),this.options.hasOwnProperty("minRebuildInterval")||(this.options.minRebuildInterval=1),this.resultset=new O(e),this.resultdata=[],this.resultsdirty=!1,this.cachedresultset=null,this.filterPipeline=[],this.collection.disableFreeze||Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,this.events={rebuild:[],filter:[],sort:[]}}function j(t,n){this.name=t,this.data=[],this.idIndex=null,this.binaryIndices={},this.constraints={unique:{},exact:{}},this.uniqueNames=[],this.transforms={},this.objType=t,this.dirty=!0,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null;var r=this;(n=n||{}).hasOwnProperty("unique")&&(Array.isArray(n.unique)||(n.unique=[n.unique]),n.unique.forEach((function(e){r.uniqueNames.push(e)}))),n.hasOwnProperty("exact")&&n.exact.forEach((function(e){r.constraints.exact[e]=new $(e)})),this.adaptiveBinaryIndices=!n.hasOwnProperty("adaptiveBinaryIndices")||n.adaptiveBinaryIndices,this.transactional=!!n.hasOwnProperty("transactional")&&n.transactional,this.cloneObjects=!!n.hasOwnProperty("clone")&&n.clone,this.cloneMethod=n.hasOwnProperty("cloneMethod")?n.cloneMethod:"parse-stringify",this.asyncListeners=!!n.hasOwnProperty("asyncListeners")&&n.asyncListeners,this.disableMeta=!!n.hasOwnProperty("disableMeta")&&n.disableMeta,this.disableChangesApi=!n.hasOwnProperty("disableChangesApi")||n.disableChangesApi,this.disableDeltaChangesApi=!n.hasOwnProperty("disableDeltaChangesApi")||n.disableDeltaChangesApi,this.disableChangesApi&&(this.disableDeltaChangesApi=!0),this.autoupdate=!!n.hasOwnProperty("autoupdate")&&n.autoupdate,this.serializableIndices=!n.hasOwnProperty("serializableIndices")||n.serializableIndices,this.disableFreeze=!n.hasOwnProperty("disableFreeze")||n.disableFreeze,this.ttl={age:null,ttlInterval:null,daemon:null},this.setTTL(n.ttl||-1,n.ttlInterval),this.maxId=0,this.DynamicViews=[],this.events={insert:[],update:[],"pre-insert":[],"pre-update":[],close:[],flushbuffer:[],error:[],delete:[],warning:[]},this.changes=[],this.dirtyIds=[];var i=[];if(n&&n.indices)if("[object Array]"===Object.prototype.toString.call(n.indices))i=n.indices;else{if("string"!=typeof n.indices)throw new TypeError("Indices needs to be a string or an array of strings");i=[n.indices]}for(var a=0;a<i.length;a++)this.ensureIndex(i[a]);function o(e,t){var n=null!==t&&"object"==typeof t?Object.keys(t):null;if(n&&n.length&&["string","boolean","number"].indexOf(typeof t)<0){for(var i={},a=0;a<n.length;a++){var s=n[a];if(t.hasOwnProperty(s))if(!e.hasOwnProperty(s)||r.uniqueNames.indexOf(s)>=0||"$loki"==s||"meta"==s)i[s]=t[s];else{var p=o(e[s],t[s]);void 0!==p&&p!={}&&(i[s]=p)}}return 0===Object.keys(i).length?void 0:i}return e===t?void 0:t}function s(){r.changes=[]}this.observerCallback=function(t){var n="function"==typeof Set?new Set:[];n.add||(n.add=function(e){return-1===this.indexOf(e)&&this.push(e),this}),t.forEach((function(e){n.add(e.object)})),n.forEach((function(t){if(!e.call(t,"$loki"))return r.removeAutoUpdateObserver(t);try{r.update(t)}catch(e){}}))},this.getChangeDelta=function(e,t){return t?o(t,e):JSON.parse(JSON.stringify(e))},this.getObjectDelta=o,this.getChanges=function(){return r.changes},this.flushChanges=s,this.setChangesApi=function(e){r.disableChangesApi=!e,e||(r.disableDeltaChangesApi=!1)},this.on("delete",(function(e){r.disableChangesApi||r.createChange(r.name,"R",e)})),this.on("warning",(function(e){r.lokiConsoleWrapper.warn(e)})),s()}function k(e){return-1!==e.indexOf(".")}function T(e){return parseFloat(e,10)}function N(e,t){return e+t}function P(e,t){return e-t}function C(e){return e.reduce(N,0)/e.length}function A(e,t,n){if(!1===n)return e[t];for(var r=t.split("."),i=e;r.length>0;)i=i[r.shift()];return i}function I(e,t,n){for(var r,i,a=0,o=e.length;a<o;){if(i=a+o>>1,0===(r=n.apply(null,[t,e[i]])))return{found:!0,index:i};r<0?o=i:a=i+1}return{found:!1,index:o}}function F(e){return function(t,n){return I(t,n,e)}}function R(){}function M(e){this.field=e,this.keyMap=Object.create(null),this.lokiMap=Object.create(null)}function $(e){this.index=Object.create(null),this.field=e}return b.prototype.events={},b.prototype.asyncListeners=!1,b.prototype.on=function(e,t){var n,r=this;return Array.isArray(e)?(e.forEach((function(e){r.on(e,t)})),t):((n=this.events[e])||(n=this.events[e]=[]),n.push(t),t)},b.prototype.emit=function(e){var t,n=this;if(!e||!this.events[e])throw new Error("No event "+e+" defined");this.events[e].length&&(t=Array.prototype.slice.call(arguments,1),this.events[e].forEach((function(e){n.asyncListeners?setTimeout((function(){e.apply(n,t)}),1):e.apply(n,t)})))},b.prototype.addListener=b.prototype.on,b.prototype.removeListener=function(e,t){var n=this;if(Array.isArray(e))e.forEach((function(e){n.removeListener(e,t)}));else if(this.events[e]){var r=this.events[e];r.splice(r.indexOf(t),1)}},g.prototype=new b,g.prototype.constructor=g,g.prototype.getIndexedAdapter=function(){return n(94349)},g.prototype.configureOptions=function(e,t){var n={fs:x,localStorage:D,memory:w};if(this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,void 0!==e){if(this.options=e,this.options.hasOwnProperty("persistenceMethod")&&"function"==typeof n[e.persistenceMethod]&&(this.persistenceMethod=e.persistenceMethod,this.persistenceAdapter=new n[e.persistenceMethod]),this.options.hasOwnProperty("adapter")&&(this.persistenceMethod="adapter",this.persistenceAdapter=e.adapter,this.options.adapter=null,this.isIncremental="incremental"===this.persistenceAdapter.mode),e.autoload&&t){var r=this;setTimeout((function(){r.loadDatabase(e,e.autoloadCallback)}),1)}this.options.hasOwnProperty("autosaveInterval")&&(this.autosaveDisable(),this.autosaveInterval=parseInt(this.options.autosaveInterval,10)),this.options.hasOwnProperty("autosave")&&this.options.autosave&&(this.autosaveDisable(),this.autosave=!0,this.options.hasOwnProperty("autosaveCallback")?this.autosaveEnable(e,e.autosaveCallback):this.autosaveEnable()),this.options.hasOwnProperty("throttledSaves")&&(this.throttledSaves=this.options.throttledSaves)}this.options.hasOwnProperty("serializationMethod")||(this.options.serializationMethod="normal"),this.options.hasOwnProperty("destructureDelimiter")||(this.options.destructureDelimiter="$<\n"),null===this.persistenceAdapter&&(this.persistenceMethod={NODEJS:"fs",BROWSER:"localStorage",CORDOVA:"localStorage",MEMORY:"memory"}[this.ENV],this.persistenceMethod&&(this.persistenceAdapter=new n[this.persistenceMethod]))},g.prototype.copy=function(e){var t,n,r=new g(this.filename,{env:"NA"});if(e=e||{},r.loadJSONObject(this,{retainDirtyFlags:!0}),e.hasOwnProperty("removeNonSerializable")&&!0===e.removeNonSerializable)for(r.autosaveHandle=null,r.persistenceAdapter=null,t=r.collections.length,n=0;n<t;n++)r.collections[n].constraints=null,r.collections[n].ttl=null;return r},g.prototype.addCollection=function(e,t){var n,r=this.collections.length;if(t&&!0===t.disableMeta){if(!1===t.disableChangesApi)throw new Error("disableMeta option cannot be passed as true when disableChangesApi is passed as false");if(!1===t.disableDeltaChangesApi)throw new Error("disableMeta option cannot be passed as true when disableDeltaChangesApi is passed as false");if("number"==typeof t.ttl&&t.ttl>0)throw new Error("disableMeta option cannot be passed as true when ttl is enabled")}for(n=0;n<r;n+=1)if(this.collections[n].name===e)return this.collections[n];var i=new j(e,t);return i.isIncremental=this.isIncremental,this.collections.push(i),this.verbose&&(i.lokiConsoleWrapper=console),i},g.prototype.loadCollection=function(e){if(!e.name)throw new Error("Collection must have a name property to be loaded");this.collections.push(e)},g.prototype.getCollection=function(e){var t,n=this.collections.length;for(t=0;t<n;t+=1)if(this.collections[t].name===e)return this.collections[t];return this.emit("warning","collection "+e+" not found"),null},g.prototype.renameCollection=function(e,t){var n=this.getCollection(e);return n&&(n.name=t),n},g.prototype.listCollections=function(){for(var e=this.collections.length,t=[];e--;)t.push({name:this.collections[e].name,type:this.collections[e].objType,count:this.collections[e].data.length});return t},g.prototype.removeCollection=function(e){var t,n=this.collections.length;for(t=0;t<n;t+=1)if(this.collections[t].name===e){var r=new j(e,{}),i=this.collections[t];for(var a in i)i.hasOwnProperty(a)&&r.hasOwnProperty(a)&&(i[a]=r[a]);return void this.collections.splice(t,1)}},g.prototype.getName=function(){return this.name},g.prototype.serializeReplacer=function(e,t){switch(e){case"autosaveHandle":case"persistenceAdapter":case"constraints":case"ttl":case"lokiConsoleWrapper":return null;case"throttledSavePending":case"throttledCallbacks":return;default:return t}},g.prototype.serialize=function(e){switch((e=e||{}).hasOwnProperty("serializationMethod")||(e.serializationMethod=this.options.serializationMethod),e.serializationMethod){case"normal":default:return JSON.stringify(this,this.serializeReplacer);case"pretty":return JSON.stringify(this,this.serializeReplacer,2);case"destructured":return this.serializeDestructured()}},g.prototype.toJson=g.prototype.serialize,g.prototype.serializeDestructured=function(e){var t,n,r,i,a,o=[];if((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),!0===e.partitioned&&e.hasOwnProperty("partition")&&e.partition>=0)return this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:e.partition});for((a=new g(this.filename)).loadJSONObject(this),t=0;t<a.collections.length;t++)a.collections[t].data=[];if(!0===e.partitioned&&-1===e.partition)return a.serialize({serializationMethod:"normal"});for(o.push(a.serialize({serializationMethod:"normal"})),a=null,t=0;t<this.collections.length;t++)if(r=this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:t}),!1===e.partitioned&&!1===e.delimited){if(!Array.isArray(r))throw new Error("a nondelimited, non partitioned collection serialization did not return an expected array");for(i=r.length,n=0;n<i;n++)o.push(r[n]),r[n]=null;o.push("")}else o.push(r);return e.partitioned?(e.delimited,o):e.delimited?(o.push(""),o.join(e.delimiter)):(o.push(""),o)},g.prototype.serializeCollection=function(e){var t,n,r=[];if((e=e||{}).hasOwnProperty("delimited")||(e.delimited=!0),!e.hasOwnProperty("collectionIndex"))throw new Error("serializeCollection called without 'collectionIndex' option");for(t=this.collections[e.collectionIndex].data.length,r=[],n=0;n<t;n++)r.push(JSON.stringify(this.collections[e.collectionIndex].data[n]));return e.delimited?(r.push(""),r.join(e.delimiter)):r},g.prototype.deserializeDestructured=function(e,t){var n,r,i,a=[],o=0,s=1,p=!1;if((t=t||{}).hasOwnProperty("partitioned")||(t.partitioned=!1),t.hasOwnProperty("delimited")||(t.delimited=!0),t.hasOwnProperty("delimiter")||(t.delimiter=this.options.destructureDelimiter),t.partitioned){if(t.hasOwnProperty("partition"))return-1===t.partition?n=JSON.parse(e[0]):this.deserializeCollection(e[t.partition+1],t);for(r=(n=JSON.parse(e[0])).collections.length,o=0;o<r;o++)n.collections[o].data=this.deserializeCollection(e[o+1],t);return n}if(t.delimited){if(a=e.split(t.delimiter),e=null,0===a.length)return null}else a=e;for(r=(n=JSON.parse(a[0])).collections.length,a[0]=null;!p;)a[s],""===a[s]?++o>r&&(p=!0):(i=JSON.parse(a[s]),n.collections[o].data.push(i)),a[s++]=null;return n},g.prototype.deserializeCollection=function(e,t){var n,r,i=[];for((t=t||{}).hasOwnProperty("partitioned")||(t.partitioned=!1),t.hasOwnProperty("delimited")||(t.delimited=!0),t.hasOwnProperty("delimiter")||(t.delimiter=this.options.destructureDelimiter),t.delimited?(i=e.split(t.delimiter)).pop():i=e,r=i.length,n=0;n<r;n++)i[n]=JSON.parse(i[n]);return i},g.prototype.loadJSON=function(e,t){var n;if(0===e.length)n={};else switch(this.options.serializationMethod){case"normal":case"pretty":default:n=JSON.parse(e);break;case"destructured":n=this.deserializeDestructured(e)}this.loadJSONObject(n,t)},g.prototype.loadJSONObject=function(e,n){var r,i,o,s,p,c,u=0,l=e.collections?e.collections.length:0;function d(e){var t,r=n[e.name];return r.proto?(t=r.inflate||a.copyProperties,function(e){var n=new r.proto;return t(e,n),n}):r.inflate}for(this.name=e.name,e.hasOwnProperty("throttledSaves")&&n&&!n.hasOwnProperty("throttledSaves")&&(this.throttledSaves=e.throttledSaves),this.collections=[];u<l;u+=1){if(r=e.collections[u],(i=this.addCollection(r.name,{disableChangesApi:r.disableChangesApi,disableDeltaChangesApi:r.disableDeltaChangesApi,disableMeta:r.disableMeta,disableFreeze:!r.hasOwnProperty("disableFreeze")||r.disableFreeze})).adaptiveBinaryIndices=!!r.hasOwnProperty("adaptiveBinaryIndices")&&!0===r.adaptiveBinaryIndices,i.transactional=r.transactional,i.asyncListeners=r.asyncListeners,i.cloneObjects=r.cloneObjects,i.cloneMethod=r.cloneMethod||"parse-stringify",i.autoupdate=r.autoupdate,i.changes=r.changes,i.dirtyIds=r.dirtyIds||[],n&&!0===n.retainDirtyFlags?i.dirty=r.dirty:i.dirty=!1,o=r.data.length,s=0,n&&n.hasOwnProperty(r.name))for(p=d(r);s<o;s++)c=p(r.data[s]),i.data[s]=c,i.addAutoUpdateObserver(c),i.disableFreeze||t(i.data[s]);else for(;s<o;s++)i.data[s]=r.data[s],i.addAutoUpdateObserver(i.data[s]),i.disableFreeze||t(i.data[s]);if(i.maxId=void 0===r.maxId?0:r.maxId,void 0!==r.binaryIndices&&(i.binaryIndices=r.binaryIndices),void 0!==r.transforms&&(i.transforms=r.transforms),i.uniqueNames=[],r.hasOwnProperty("uniqueNames")&&(i.uniqueNames=r.uniqueNames),void 0!==r.DynamicViews){for(var f=0;f<r.DynamicViews.length;f++){var h=r.DynamicViews[f],m=i.addDynamicView(h.name,h.options);m.resultdata=h.resultdata,m.resultsdirty=h.resultsdirty,m.filterPipeline=h.filterPipeline,m.sortCriteriaSimple=h.sortCriteriaSimple,m.sortCriteria=h.sortCriteria,m.sortFunction=null,m.sortDirty=h.sortDirty,i.disableFreeze||(t(m.filterPipeline),m.sortCriteriaSimple?t(m.sortCriteriaSimple):m.sortCriteria&&t(m.sortCriteria)),m.resultset.filteredrows=h.resultset.filteredrows,m.resultset.filterInitialized=h.resultset.filterInitialized,m.rematerialize({removeWhereFilters:!0})}e.databaseVersion<1.5&&(i.ensureAllIndexes(!0),i.dirty=!0)}}},g.prototype.close=function(e){this.autosave&&(this.autosaveDisable(),this.autosaveDirty()&&(this.saveDatabase(e),e=void 0)),e&&this.on("close",e),this.emit("close")},g.prototype.generateChangesNotification=function(e){function t(e){return e.name}var n=[],r=e||this.collections.map(t);return this.collections.forEach((function(e){-1!==r.indexOf(t(e))&&(n=n.concat(e.getChanges()))})),n},g.prototype.serializeChanges=function(e){return JSON.stringify(this.generateChangesNotification(e))},g.prototype.clearChanges=function(){this.collections.forEach((function(e){e.flushChanges&&e.flushChanges()}))},w.prototype.loadDatabase=function(e,t){var n=this;this.options.asyncResponses?setTimeout((function(){n.hashStore.hasOwnProperty(e)?t(n.hashStore[e].value):t(null)}),this.options.asyncTimeout):this.hashStore.hasOwnProperty(e)?t(this.hashStore[e].value):t(null)},w.prototype.saveDatabase=function(e,t,n){var r,i=this;this.options.asyncResponses?setTimeout((function(){r=i.hashStore.hasOwnProperty(e)?i.hashStore[e].savecount:0,i.hashStore[e]={savecount:r+1,lastsave:new Date,value:t},n()}),this.options.asyncTimeout):(r=this.hashStore.hasOwnProperty(e)?this.hashStore[e].savecount:0,this.hashStore[e]={savecount:r+1,lastsave:new Date,value:t},n())},w.prototype.deleteDatabase=function(e,t){this.hashStore.hasOwnProperty(e)&&delete this.hashStore[e],"function"==typeof t&&t()},_.prototype.loadDatabase=function(e,t){var n=this;this.dbname=e,this.dbref=new g(e),this.adapter.loadDatabase(e,(function(e){if(e){"string"!=typeof e&&t(new Error("LokiPartitioningAdapter received an unexpected response from inner adapter loadDatabase()"));var r=JSON.parse(e);n.dbref.loadJSONObject(r),r=null,n.dbref.collections.length,0!==n.dbref.collections.length?(n.pageIterator={collection:0,pageIndex:0},n.loadNextPartition(0,(function(){t(n.dbref)}))):t(n.dbref)}else t(e)}))},_.prototype.loadNextPartition=function(e,t){var n=this.dbname+"."+e,r=this;if(!0===this.options.paging)return this.pageIterator.pageIndex=0,void this.loadNextPage(t);this.adapter.loadDatabase(n,(function(n){var i=r.dbref.deserializeCollection(n,{delimited:!0,collectionIndex:e});r.dbref.collections[e].data=i,++e<r.dbref.collections.length?r.loadNextPartition(e,t):t()}))},_.prototype.loadNextPage=function(e){var t=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,n=this;this.adapter.loadDatabase(t,(function(t){var r=t.split(n.options.delimiter);t="";var i,a=r.length,o=""===r[a-1];for(o&&(r.pop(),""===r[(a=r.length)-1]&&1===a&&(r.pop(),a=r.length)),i=0;i<a;i++)n.dbref.collections[n.pageIterator.collection].data.push(JSON.parse(r[i])),r[i]=null;r=[],o?++n.pageIterator.collection<n.dbref.collections.length?n.loadNextPartition(n.pageIterator.collection,e):e():(n.pageIterator.pageIndex++,n.loadNextPage(e))}))},_.prototype.exportDatabase=function(e,t,n){var r,i=t.collections.length;for(this.dbref=t,this.dbname=e,this.dirtyPartitions=[-1],r=0;r<i;r++)t.collections[r].dirty&&this.dirtyPartitions.push(r);this.saveNextPartition((function(e){n(e)}))},_.prototype.saveNextPartition=function(e){var t=this,n=this.dirtyPartitions.shift(),r=this.dbname+(-1===n?"":"."+n);if(this.options.paging&&-1!==n)return this.pageIterator={collection:n,docIndex:0,pageIndex:0},void this.saveNextPage((function(n){0===t.dirtyPartitions.length?e(n):t.saveNextPartition(e)}));var i=this.dbref.serializeDestructured({partitioned:!0,delimited:!0,partition:n});this.adapter.saveDatabase(r,i,(function(n){n?e(n):0===t.dirtyPartitions.length?e(null):t.saveNextPartition(e)}))},_.prototype.saveNextPage=function(e){var t=this,n=this.dbref.collections[this.pageIterator.collection],r=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,i=0,a=n.data.length,o=this.options.delimiter.length,s="",p="",c=!1,u=!1,l=function(n){p="",n&&e(n),c?e(null):(t.pageIterator.pageIndex++,t.saveNextPage(e))};for(0===n.data.length&&(c=!0);;)if(c||(s=JSON.stringify(n.data[this.pageIterator.docIndex]),p+=s,i+=s.length,++this.pageIterator.docIndex>=a&&(c=!0)),i>=this.options.pageSize&&(u=!0),u&&!c||(p+=this.options.delimiter,i+=o),c||u)return void this.adapter.saveDatabase(r,p,l)},x.prototype.loadDatabase=function(e,t){var n=this;this.fs.stat(e,(function(r,i){!r&&i.isFile()?n.fs.readFile(e,{encoding:"utf8"},(function(e,n){t(e?new Error(e):n)})):t(null)}))},x.prototype.saveDatabase=function(e,t,n){var r=this,i=e+"~";this.fs.writeFile(i,t,(function(t){t?n(new Error(t)):r.fs.rename(i,e,n)}))},x.prototype.deleteDatabase=function(e,t){this.fs.unlink(e,(function(e){e?t(new Error(e)):t()}))},D.prototype.loadDatabase=function(e,t){y()?t(localStorage.getItem(e)):t(new Error("localStorage is not available"))},D.prototype.saveDatabase=function(e,t,n){y()?(localStorage.setItem(e,t),n(null)):n(new Error("localStorage is not available"))},D.prototype.deleteDatabase=function(e,t){y()?(localStorage.removeItem(e),t(null)):t(new Error("localStorage is not available"))},g.prototype.throttledSaveDrain=function(e,t){var n=this,r=(new Date).getTime();if(this.throttledSaves||e(!0),(t=t||{}).hasOwnProperty("recursiveWait")||(t.recursiveWait=!0),t.hasOwnProperty("recursiveWaitLimit")||(t.recursiveWaitLimit=!1),t.hasOwnProperty("recursiveWaitLimitDuration")||(t.recursiveWaitLimitDuration=2e3),t.hasOwnProperty("started")||(t.started=(new Date).getTime()),this.throttledSaves&&this.throttledSavePending){if(!t.recursiveWait)return void this.throttledCallbacks.push(e);this.throttledCallbacks.push((function(){return n.throttledSavePending?t.recursiveWaitLimit&&r-t.started>t.recursiveWaitLimitDuration?void e(!1):void n.throttledSaveDrain(e,t):void e(!0)}))}else e(!0)},g.prototype.loadDatabaseInternal=function(e,t){var n=t||function(e,t){if(e)throw e},r=this;null!==this.persistenceAdapter?this.persistenceAdapter.loadDatabase(this.filename,(function(t){if("string"==typeof t){var i=!1;try{r.loadJSON(t,e||{}),i=!0}catch(e){n(e)}i&&(n(null),r.emit("loaded","database "+r.filename+" loaded"))}else{if(!t)return n(null),void r.emit("loaded","empty database "+r.filename+" loaded");if(t instanceof Error)return void n(t);if("object"==typeof t)return r.loadJSONObject(t,e||{}),n(null),void r.emit("loaded","database "+r.filename+" loaded");n("unexpected adapter response : "+t)}})):n(new Error("persistenceAdapter not configured"))},g.prototype.loadDatabase=function(e,t){var n=this;this.throttledSaves?this.throttledSaveDrain((function(r){if(r)return n.throttledSavePending=!0,void n.loadDatabaseInternal(e,(function(e){0===n.throttledCallbacks.length?n.throttledSavePending=!1:n.saveDatabase(),"function"==typeof t&&t(e)}));"function"==typeof t&&t(new Error("Unable to pause save throttling long enough to read database"))}),e):this.loadDatabaseInternal(e,t)},g.prototype.saveDatabaseInternal=function(e){var t,n=e||function(e){if(e)throw e},r=this;this.persistenceAdapter?"incremental"===this.persistenceAdapter.mode?(this.ignoreAutosave=!0,this.persistenceAdapter.saveDatabase(this.filename,(function(){if(r.ignoreAutosave=!1,!t){var e=r.copy({removeNonSerializable:!0});return t=r.collections.map((function(e){return[e.dirty,e.dirtyIds]})),r.collections.forEach((function(e){e.dirty=!1,e.dirtyIds=[]})),e}n(new Error("adapter error - getLokiCopy called more than once"))}),(function(e){r.ignoreAutosave=!1,e&&t&&r.collections.forEach((function(e,n){var r=t[n];e.dirty=e.dirty||r[0],e.dirtyIds=e.dirtyIds.concat(r[1])})),n(e)}))):"reference"===this.persistenceAdapter.mode&&"function"==typeof this.persistenceAdapter.exportDatabase?this.persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}),(function(e){r.autosaveClearFlags(),n(e)})):(this.autosaveClearFlags(),this.persistenceAdapter.saveDatabase(this.filename,this.serialize(),(function(e){n(e)}))):n(new Error("persistenceAdapter not configured"))},g.prototype.saveDatabase=function(e){if(this.throttledSaves)if(this.throttledSavePending)this.throttledCallbacks.push(e);else{var t=this.throttledCallbacks;this.throttledCallbacks=[],t.unshift(e),this.throttledSavePending=!0;var n=this;this.saveDatabaseInternal((function(e){n.throttledSavePending=!1,t.forEach((function(t){"function"==typeof t&&setTimeout((function(){t(e)}),1)})),n.throttledCallbacks.length>0&&n.saveDatabase()}))}else this.saveDatabaseInternal(e)},g.prototype.save=g.prototype.saveDatabase,g.prototype.deleteDatabase=function(e,t){var n=t||function(e,t){if(e)throw e};"function"!=typeof e||t||(n=e),null!==this.persistenceAdapter?this.persistenceAdapter.deleteDatabase(this.filename,(function(e){n(e)})):n(new Error("persistenceAdapter not configured"))},g.prototype.autosaveDirty=function(){for(var e=0;e<this.collections.length;e++)if(this.collections[e].dirty)return!0;return!1},g.prototype.autosaveClearFlags=function(){for(var e=0;e<this.collections.length;e++)this.collections[e].dirty=!1},g.prototype.autosaveEnable=function(e,t){this.autosave=!0;var n=5e3,r=this;void 0!==this.autosaveInterval&&null!==this.autosaveInterval&&(n=this.autosaveInterval),this.autosaveHandle=setInterval((function(){r.autosaveDirty()&&!r.ignoreAutosave&&r.saveDatabase(t)}),n)},g.prototype.autosaveDisable=function(){void 0!==this.autosaveHandle&&null!==this.autosaveHandle&&(clearInterval(this.autosaveHandle),this.autosaveHandle=null)},O.prototype.reset=function(){return this.filteredrows.length>0&&(this.filteredrows=[]),this.filterInitialized=!1,this},O.prototype.toJSON=function(){var e=this.copy();return e.collection=null,e},O.prototype.limit=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t=new O(this.collection);return t.filteredrows=this.filteredrows.slice(0,e),t.filterInitialized=!0,t},O.prototype.offset=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t=new O(this.collection);return t.filteredrows=this.filteredrows.slice(e),t.filterInitialized=!0,t},O.prototype.copy=function(){var e=new O(this.collection);return this.filteredrows.length>0&&(e.filteredrows=this.filteredrows.slice()),e.filterInitialized=this.filterInitialized,e},O.prototype.branch=O.prototype.copy,O.prototype.transform=function(e,t){var n,r,i=this;if("string"==typeof e&&this.collection.transforms.hasOwnProperty(e)&&(e=this.collection.transforms[e]),"object"!=typeof e||!Array.isArray(e))throw new Error("Invalid transform");for(void 0!==t&&(e=a.resolveTransformParams(e,t)),n=0;n<e.length;n++)switch((r=e[n]).type){case"find":i.find(r.value);break;case"where":i.where(r.value);break;case"simplesort":i.simplesort(r.property,r.desc||r.options);break;case"compoundsort":i.compoundsort(r.value);break;case"sort":i.sort(r.value);break;case"limit":i=i.limit(r.value);break;case"offset":i=i.offset(r.value);break;case"map":i=i.map(r.value,r.dataOptions);break;case"eqJoin":i=i.eqJoin(r.joinData,r.leftJoinKey,r.rightJoinKey,r.mapFun,r.dataOptions);break;case"mapReduce":i=i.mapReduce(r.mapFunction,r.reduceFunction);break;case"update":i.update(r.value);break;case"remove":i.remove()}return i},O.prototype.sort=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t,n,r=(t=e,n=this.collection.data,function(e,r){return t(n[e],n[r])});return this.filteredrows.sort(r),this},O.prototype.simplesort=function(e,t){var n,r=10,i=this.collection.data.length,o=this.filteredrows.length,s=this.collection.binaryIndices.hasOwnProperty(e);if(void 0!==t&&!1!==t||(t={desc:!1}),!0===t&&(t={desc:!0}),0===o){if(this.filterInitialized)return this;if(this.collection.binaryIndices.hasOwnProperty(e))return this.collection.ensureIndex(e),this.filteredrows=this.collection.binaryIndices[e].values.slice(0),t.desc&&this.filteredrows.reverse(),this;this.filteredrows=this.collection.prepareFullDocIndex()}else if(!t.disableIndexIntersect&&s&&(n=i/o,t.useJavascriptSorting&&(r=6),n<=r||t.forceIndexIntersect)){var p,c=this.filteredrows,l={};for(p=0;p<o;p++)l[c[p]]=!0;var d=this.collection.binaryIndices[e].values;return this.filteredrows=d.filter((function(e){return l[e]})),t.desc&&this.filteredrows.reverse(),this}if(t.useJavascriptSorting)return this.sort((function(t,n){return t[e]===n[e]?0:t[e]>n[e]?1:t[e]<n[e]?-1:void 0}));var f,h,m,v,y,b,g=(f=e,h=t.desc,m=this.collection.data,function(e,t){return~f.indexOf(".")?(b=f.split("."),v=a.getIn(m[e],b,!0),y=a.getIn(m[t],b,!0)):(v=m[e][f],y=m[t][f]),u(v,y,h)});return this.filteredrows.sort(g),this},O.prototype.compoundsort=function(e){if(0===e.length)throw new Error("Invalid call to compoundsort, need at least one property");var t;if(1===e.length)return t=e[0],Array.isArray(t)?this.simplesort(t[0],t[1]):this.simplesort(t,!1);for(var n=0,r=e.length;n<r;n+=1)t=e[n],Array.isArray(t)||(e[n]=[t,!1]);this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var i,o,s=(i=e,o=this.collection.data,function(e,t){return function(e,t,n){for(var r,i,o,s,p,c=0,l=0,d=e.length;l<d;l++)if(~(i=(r=e[l])[0]).indexOf(".")?(p=i.split("."),o=a.getIn(t,p,!0),s=a.getIn(n,p,!0)):(o=t[i],s=n[i]),0!==(c=u(o,s,r[1])))return c;return 0}(i,o[e],o[t])});return this.filteredrows.sort(s),this},O.prototype.findOr=function(e){for(var t=null,n=0,r=0,i=[],a=[],o=0,s=(this.count(),0),p=e.length;s<p;s++)for(r=(t=this.branch().find(e[s]).filteredrows).length,n=0;n<r;n++)void 0===a[o=t[n]]&&(a[o]=!0,i.push(o));return this.filteredrows=i,this.filterInitialized=!0,this},O.prototype.$or=O.prototype.findOr,O.prototype.findAnd=function(e){for(var t=0,n=e.length;t<n;t++){if(0===this.count())return this;this.find(e[t])}return this},O.prototype.$and=O.prototype.findAnd,O.prototype.find=function(t,n){if(0===this.collection.data.length)return this.filteredrows=[],this.filterInitialized=!0,this;var r,i,o,s,p,c,u,d=t||"getAll",f=!1,v=[],y=[],b=null;if(n=n||!1,"object"==typeof d){for(r in d)(s={})[r]=d[r],y.push(s),e.call(d,r)&&(i=r,o=d[r]);if(y.length>1)return this.find({$and:y},n)}if(!i||"getAll"===d)return n&&(this.filterInitialized?this.filteredrows=this.filteredrows.slice(0,1):(this.filteredrows=this.collection.data.length>0?[0]:[],this.filterInitialized=!0)),this;if("$and"===i||"$or"===i)return this[i](o),n&&this.filteredrows.length>1&&(this.filteredrows=this.filteredrows.slice(0,1)),this;if(null===o||"object"!=typeof o||o instanceof Date)p="$eq",c=o;else{if("object"!=typeof o)throw new Error("Do not know what you want to do.");for(u in o)if(e.call(o,u)){p=u,c=o[u];break}}"$regex"!==p&&"object"!=typeof c||(c=E(p,c));var g=-1!==i.indexOf(".");!this.filterInitialized&&this.collection.binaryIndices[i]&&m[p]&&(!0!==this.collection.adaptiveBinaryIndices&&this.collection.ensureIndex(i),f=!0,b=this.collection.binaryIndices[i]),!f&&"$in"===p&&Array.isArray(c)&&"undefined"!=typeof Set&&(c=new Set(c),p="$inSet");var w,_,x=h[p],D=this.collection.data,O=0,S=0,j=0;if(this.filterInitialized){if(S=(w=this.filteredrows).length,g){for(i=i.split("."),O=0;O<S;O++)if(l(_=D[j=w[O]],i,x,c,_)&&(v.push(j),n))return this.filteredrows=v,this}else for(O=0;O<S;O++)if(x((_=D[j=w[O]])[i],c,_)&&(v.push(j),n))return this.filteredrows=v,this}else if(f){var k=this.collection.calculateRange(p,i,c);if("$in"!==p){for(O=k[0];O<=k[1];O++)if(!0!==m[p]){if(m[p](a.getIn(D[b.values[O]],i,g),c)&&(v.push(b.values[O]),n))return this.filteredrows=v,this.filterInitialized=!0,this}else if(v.push(b.values[O]),n)return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0,S=k.length;O<S;O++)if(v.push(b.values[k[O]]),n)return this.filteredrows=v,this.filterInitialized=!0,this}else if(S=D.length,g){for(i=i.split("."),O=0;O<S;O++)if(l(_=D[O],i,x,c,_)&&(v.push(O),n))return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0;O<S;O++)if(x((_=D[O])[i],c,_)&&(v.push(O),n))return this.filteredrows=v,this.filterInitialized=!0,this;return this.filteredrows=v,this.filterInitialized=!0,this},O.prototype.where=function(e){var t,n=[];if("function"!=typeof e)throw new TypeError("Argument is not a stored view or a function");t=e;try{if(this.filterInitialized){for(var r=this.filteredrows.length;r--;)!0===t(this.collection.data[this.filteredrows[r]])&&n.push(this.filteredrows[r]);return this.filteredrows=n,this}for(var i=this.collection.data.length;i--;)!0===t(this.collection.data[i])&&n.push(i);return this.filteredrows=n,this.filterInitialized=!0,this}catch(e){throw e}},O.prototype.count=function(){return this.filterInitialized?this.filteredrows.length:this.collection.count()},O.prototype.data=function(e){var t,n,r,i,a=[],o=this.collection.data;if((e=e||{}).removeMeta&&!e.forceClones&&(e.forceClones=!0,e.forceCloneMethod=e.forceCloneMethod||"shallow"),!this.collection.disableDeltaChangesApi&&this.collection.disableFreeze&&(e.forceClones=!0,e.forceCloneMethod="parse-stringify"),!this.filterInitialized){if(0===this.filteredrows.length){if(this.collection.cloneObjects||e.forceClones){for(n=o.length,i=e.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)t=v(o[r],i),e.removeMeta&&(delete t.$loki,delete t.meta),a.push(t);return a}return o.slice()}this.filterInitialized=!0}var s=this.filteredrows;if(n=s.length,this.collection.cloneObjects||e.forceClones)for(i=e.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)t=v(o[s[r]],i),e.removeMeta&&(delete t.$loki,delete t.meta),a.push(t);else for(r=0;r<n;r++)a.push(o[s[r]]);return a},O.prototype.update=function(e){if("function"!=typeof e)throw new TypeError("Argument is not a function");this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());for(var t,n=this.filteredrows.length,r=this.collection.data,i=0;i<n;i++)this.disableFreeze&&!this.collection.cloneObjects&&this.collection.disableDeltaChangesApi?(e(r[this.filteredrows[i]]),this.collection.update(r[this.filteredrows[i]])):(e(t=v(r[this.filteredrows[i]],this.collection.cloneMethod)),this.collection.update(t));return this},O.prototype.remove=function(){return this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex()),this.collection.removeBatchByPositions(this.filteredrows),this.filteredrows=[],this},O.prototype.mapReduce=function(e,t){try{return t(this.data().map(e))}catch(e){throw e}},O.prototype.eqJoin=function(e,t,n,r,i){var a,o,s,p,c=[],u=[],l="function"==typeof t,d="function"==typeof n,f={};if(a=(p=this.data(i)).length,e instanceof j)c=e.chain().data(i);else if(e instanceof O)c=e.data(i);else{if(!Array.isArray(e))throw new TypeError("joinData needs to be an array or result set");c=e}o=c.length;for(var h=0;h<o;h++)f[s=d?n(c[h]):c[h][n]]=c[h];r||(r=function(e,t){return{left:e,right:t}});for(var m=0;m<a;m++)s=l?t(p[m]):p[m][t],u.push(r(p[m],f[s]||{}));return this.collection=new j("joinData"),this.collection.insert(u),this.filteredrows=[],this.filterInitialized=!1,this},O.prototype.map=function(e,t){var n=this.data(t).map(e);return this.collection=new j("mappedData"),this.collection.insert(n),this.filteredrows=[],this.filterInitialized=!1,this},S.prototype=new b,S.prototype.constructor=S,S.prototype.getSort=function(){return this.sortFunction||this.sortCriteria||this.sortCriteriaSimple},S.prototype.rematerialize=function(e){var t,n,r;e=e||{},this.resultdata=[],this.resultsdirty=!0,this.resultset=new O(this.collection),(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple)&&(this.sortDirty=!0);var i=Object.isFrozen(this.filterPipeline);if(e.hasOwnProperty("removeWhereFilters"))for(i&&(this.filterPipeline=this.filterPipeline.slice()),n=t=this.filterPipeline.length;n--;)"where"===this.filterPipeline[n].type&&(n!==this.filterPipeline.length-1&&(this.filterPipeline[n]=this.filterPipeline[this.filterPipeline.length-1]),this.filterPipeline.length--);var a=this.filterPipeline;for(this.filterPipeline=[],t=a.length,r=0;r<t;r++)this.applyFind(a[r].val,a[r].uid);return i&&Object.freeze(this.filterPipeline),this.data(),this.emit("rebuild",this),this},S.prototype.branchResultset=function(e,t){var n=this.resultset.branch();return void 0===e?n:n.transform(e,t)},S.prototype.toJSON=function(){var e=new S(this.collection,this.name,this.options);return e.resultset=this.resultset,e.resultdata=[],e.resultsdirty=!0,e.filterPipeline=this.filterPipeline,e.sortFunction=this.sortFunction,e.sortCriteria=this.sortCriteria,e.sortCriteriaSimple=this.sortCriteriaSimple||null,e.sortDirty=this.sortDirty,e.collection=null,e},S.prototype.removeFilters=function(e){e=e||{},this.rebuildPending=!1,this.resultset.reset(),this.resultdata=[],this.resultsdirty=!0,this.cachedresultset=null;var t=Object.isFrozen(this.filterPipeline),n=this.filterPipeline.length>0;this.filterPipeline=[],t&&Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,!0===e.queueSortPhase&&this.queueSortPhase(),n&&this.emit("filter")},S.prototype.applySort=function(e){return this.sortFunction=e,this.sortCriteria=null,this.sortCriteriaSimple=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.applySimpleSort=function(e,n){return this.sortCriteriaSimple={propname:e,options:n||!1},this.collection.disableFreeze||t(this.sortCriteriaSimple),this.sortCriteria=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.applySortCriteria=function(e){return this.sortCriteria=e,this.collection.disableFreeze||t(this.sortCriteria),this.sortCriteriaSimple=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.startTransaction=function(){return this.cachedresultset=this.resultset.copy(),this},S.prototype.commit=function(){return this.cachedresultset=null,this},S.prototype.rollback=function(){return this.resultset=this.cachedresultset,this.options.persistent&&(this.resultdata=this.resultset.data(),this.emit("rebuild",this)),this},S.prototype._indexOfFilterWithId=function(e){if("string"==typeof e||"number"==typeof e)for(var t=0,n=this.filterPipeline.length;t<n;t+=1)if(e===this.filterPipeline[t].uid)return t;return-1},S.prototype._addFilter=function(e){var n=Object.isFrozen(this.filterPipeline);n&&(this.filterPipeline=this.filterPipeline.slice()),this.collection.disableFreeze||t(e),this.filterPipeline.push(e),n&&Object.freeze(this.filterPipeline),this.resultset[e.type](e.val)},S.prototype.reapplyFilters=function(){this.resultset.reset(),this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0);var e=this.filterPipeline,t=Object.isFrozen(e);this.filterPipeline=[];for(var n=0,r=e.length;n<r;n+=1)this._addFilter(e[n]);return t&&Object.freeze(this.filterPipeline),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this.emit("filter"),this},S.prototype.applyFilter=function(e){var t=this._indexOfFilterWithId(e.uid);if(t>=0){var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline[t]=e,n&&(r(e),Object.freeze(this.filterPipeline)),this.reapplyFilters()}return this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0),this._addFilter(e),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this.emit("filter"),this},S.prototype.applyFind=function(e,t){return this.applyFilter({type:"find",val:e,uid:t}),this},S.prototype.applyWhere=function(e,t){return this.applyFilter({type:"where",val:e,uid:t}),this},S.prototype.removeFilter=function(e){var t=this._indexOfFilterWithId(e);if(t<0)throw new Error("Dynamic view does not contain a filter with ID: "+e);var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline.splice(t,1),n&&Object.freeze(this.filterPipeline),this.reapplyFilters(),this},S.prototype.count=function(){return this.resultsdirty&&(this.resultdata=this.resultset.data()),this.resultset.count()},S.prototype.data=function(e){return(this.sortDirty||this.resultsdirty)&&this.performSortPhase({suppressRebuildEvent:!0}),this.options.persistent?this.resultdata:this.resultset.data(e)},S.prototype.queueRebuildEvent=function(){if(!this.rebuildPending){this.rebuildPending=!0;var e=this;setTimeout((function(){e.rebuildPending&&(e.rebuildPending=!1,e.emit("rebuild",e))}),this.options.minRebuildInterval)}},S.prototype.queueSortPhase=function(){if(!this.sortDirty){this.sortDirty=!0;var e=this;"active"===this.options.sortPriority?setTimeout((function(){e.performSortPhase()}),this.options.minRebuildInterval):this.queueRebuildEvent()}},S.prototype.performSortPhase=function(e){(this.sortDirty||this.resultsdirty)&&(e=e||{},this.sortDirty&&(this.sortFunction?this.resultset.sort(this.sortFunction):this.sortCriteria?this.resultset.compoundsort(this.sortCriteria):this.sortCriteriaSimple&&this.resultset.simplesort(this.sortCriteriaSimple.propname,this.sortCriteriaSimple.options),this.sortDirty=!1),this.options.persistent&&(this.resultdata=this.resultset.data(),this.resultsdirty=!1),e.suppressRebuildEvent||this.emit("rebuild",this))},S.prototype.evaluateDocument=function(e,t){if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var n,r=this.resultset.filteredrows,i=t?-1:r.indexOf(+e),a=r.length,o=new O(this.collection);o.filteredrows=[e],o.filterInitialized=!0;for(var s=0,p=this.filterPipeline.length;s<p;s++)o[(n=this.filterPipeline[s]).type](n.val);var c=0===o.filteredrows.length?-1:0;return-1!==i||-1!==c?-1===i&&-1!==c?(r.push(e),this.options.persistent&&this.resultdata.push(this.collection.data[e]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==i&&-1===c?(i<a-1?(r.splice(i,1),this.options.persistent&&this.resultdata.splice(i,1)):(r.length=a-1,this.options.persistent&&(this.resultdata.length=a-1)),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==i&&-1!==c?(this.options.persistent&&(this.resultdata[i]=this.collection.data[e]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):void 0:void 0},S.prototype.removeDocument=function(e){var t,n,r,i={},a={},o=[],s=this.resultset,p=this.resultset.filteredrows,c=p.length;if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());for(Array.isArray(e)||(e=[e]),r=e.length,n=0;n<r;n++)i[e[n]]=!0;for(t=0;t<c;t++)i[p[t]]&&(a[t]=!0);Object.keys(a).length>0&&(this.resultset.filteredrows=this.resultset.filteredrows.filter((function(e,t){return!a[t]})),this.options.persistent&&(this.resultdata=this.resultdata.filter((function(e,t){return!a[t]}))),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var u=function(e){return function(t){return t<s.filteredrows[e]}};for(c=s.filteredrows.length,t=0;t<c;t++)o=e.filter(u(t)),s.filteredrows[t]-=o.length},S.prototype.mapReduce=function(e,t){try{return t(this.data().map(e))}catch(e){throw e}},j.prototype=new b,j.prototype.contructor=j,j.prototype.createChange=function(e,t,n,r){this.changes.push({name:e,operation:t,obj:"U"!=t||this.disableDeltaChangesApi?JSON.parse(JSON.stringify(n)):this.getChangeDelta(n,r)})},j.prototype.insertMeta=function(e){var t,n;if(!this.disableMeta&&e)if(Array.isArray(e))for(t=e.length,n=0;n<t;n++)e[n].hasOwnProperty("meta")||(e[n].meta={}),e[n].meta.created=(new Date).getTime(),e[n].meta.revision=0;else e.meta||(e.meta={}),e.meta.created=(new Date).getTime(),e.meta.revision=0},j.prototype.updateMeta=function(e){return this.disableMeta||!e||(this.disableFreeze||((e=i(e)).meta=i(e.meta)),e.meta.updated=(new Date).getTime(),e.meta.revision+=1),e},j.prototype.createInsertChange=function(e){this.createChange(this.name,"I",e)},j.prototype.createUpdateChange=function(e,t){this.createChange(this.name,"U",e,t)},j.prototype.insertMetaWithChange=function(e){this.insertMeta(e),this.createInsertChange(e)},j.prototype.updateMetaWithChange=function(e,t,n){return e=this.updateMeta(e,n),this.createUpdateChange(e,t),e},j.prototype.lokiConsoleWrapper={log:function(){},warn:function(){},error:function(){}},j.prototype.addAutoUpdateObserver=function(e){this.autoupdate&&"function"==typeof Object.observe&&Object.observe(e,this.observerCallback,["add","update","delete","reconfigure","setPrototype"])},j.prototype.removeAutoUpdateObserver=function(e){this.autoupdate&&"function"==typeof Object.observe&&Object.unobserve(e,this.observerCallback)},j.prototype.addTransform=function(e,t){if(this.transforms.hasOwnProperty(e))throw new Error("a transform by that name already exists");this.transforms[e]=t},j.prototype.getTransform=function(e){return this.transforms[e]},j.prototype.setTransform=function(e,t){this.transforms[e]=t},j.prototype.removeTransform=function(e){delete this.transforms[e]},j.prototype.byExample=function(e){var t,n,r;for(t in r=[],e)e.hasOwnProperty(t)&&r.push(((n={})[t]=e[t],n));return{$and:r}},j.prototype.findObject=function(e){return this.findOne(this.byExample(e))},j.prototype.findObjects=function(e){return this.find(this.byExample(e))},j.prototype.ttlDaemonFuncGen=function(){var e=this,t=this.ttl.age;return function(){var n=Date.now();e.chain().where((function(e){var r=e.meta.updated||e.meta.created;return t<n-r})).remove()}},j.prototype.setTTL=function(e,t){e<0?clearInterval(this.ttl.daemon):(this.ttl.age=e,this.ttl.ttlInterval=t,this.ttl.daemon=setInterval(this.ttlDaemonFuncGen(),t))},j.prototype.prepareFullDocIndex=function(){for(var e=this.data.length,t=new Array(e),n=0;n<e;n+=1)t[n]=n;return t},j.prototype.configureOptions=function(e){(e=e||{}).hasOwnProperty("adaptiveBinaryIndices")&&(this.adaptiveBinaryIndices=e.adaptiveBinaryIndices,this.adaptiveBinaryIndices&&this.ensureAllIndexes())},j.prototype.ensureIndex=function(e,t){if(void 0===t&&(t=!1),null==e)throw new Error("Attempting to set index without an associated property");if((!this.binaryIndices[e]||t||this.binaryIndices[e].dirty)&&(!0!==this.adaptiveBinaryIndices||!this.binaryIndices.hasOwnProperty(e)||t)){var n={name:e,dirty:!0,values:this.prepareFullDocIndex()};this.binaryIndices[e]=n;var r,i,s,p,c,u=(r=e,i=this.data,c=!!~r.indexOf(".")&&r.split("."),function(e,t){if(c?(s=a.getIn(i[e],c,!0),p=a.getIn(i[t],c,!0)):(s=i[e][r],p=i[t][r]),s!==p){if(o.lt(s,p,!1))return-1;if(o.gt(s,p,!1))return 1}return 0});n.values.sort(u),n.dirty=!1,this.dirty=!0}},j.prototype.checkAllIndexes=function(t){var n,r=this.binaryIndices,i=[];for(n in r)e.call(r,n)&&(this.checkIndex(n,t)||i.push(n));return i},j.prototype.checkIndex=function(e,t){(t=t||{}).randomSamplingFactor&&!1!==t.randomSampling&&(t.randomSampling=!0),t.randomSamplingFactor=t.randomSamplingFactor||.1,(t.randomSamplingFactor<0||t.randomSamplingFactor>1)&&(t.randomSamplingFactor=.1);var n,r,i,o,s,p=!0;if(!this.binaryIndices.hasOwnProperty(e))throw new Error("called checkIndex on property without an index: "+e);if(this.adaptiveBinaryIndices||this.ensureIndex(e),(o=(s=this.binaryIndices[e].values).length)!==this.data.length)return t.repair&&this.ensureIndex(e,!0),!1;if(0===o)return!0;var c=-1!==e.indexOf(".");if(1===o)p=0===s[0];else if(t.randomSampling){if(h.$lte(a.getIn(this.data[s[0]],e,c),a.getIn(this.data[s[1]],e,c))||(p=!1),h.$lte(a.getIn(this.data[s[o-2]],e,c),a.getIn(this.data[s[o-1]],e,c))||(p=!1),p)for(r=Math.floor((o-1)*t.randomSamplingFactor),n=0;n<r-1;n++)if(i=Math.floor(Math.random()*(o-1)),!h.$lte(a.getIn(this.data[s[i]],e,c),a.getIn(this.data[s[i+1]],e,c))){p=!1;break}}else for(n=0;n<o-1;n++)if(!h.$lte(a.getIn(this.data[s[n]],e,c),a.getIn(this.data[s[n+1]],e,c))){p=!1;break}return!p&&t.repair&&this.ensureIndex(e,!0),p},j.prototype.getBinaryIndexValues=function(e){var t,n=this.binaryIndices[e].values,r=[];for(t=0;t<n.length;t++)r.push(a.getIn(this.data[n[t]],e,!0));return r},j.prototype.getUniqueIndex=function(e,t){var n=this.constraints.unique[e];return!n&&t?this.ensureUniqueIndex(e):n},j.prototype.ensureUniqueIndex=function(e){var t=this.constraints.unique[e];return t||-1==this.uniqueNames.indexOf(e)&&this.uniqueNames.push(e),this.constraints.unique[e]=t=new M(e),this.data.forEach((function(e){t.set(e)})),t},j.prototype.ensureAllIndexes=function(t){var n,r=this.binaryIndices;for(n in r)e.call(r,n)&&this.ensureIndex(n,t)},j.prototype.flagBinaryIndexesDirty=function(){var t,n=this.binaryIndices;for(t in n)e.call(n,t)&&(n[t].dirty=!0)},j.prototype.flagBinaryIndexDirty=function(e){this.binaryIndices[e]&&(this.binaryIndices[e].dirty=!0)},j.prototype.count=function(e){return e?this.chain().find(e).filteredrows.length:this.data.length},j.prototype.ensureId=function(){if(!this.idIndex){for(var e=this.data,t=0,n=e.length,r=new Array(n);t<n;t++)r[t]=e[t].$loki;this.idIndex=r}},j.prototype.ensureIdAsync=function(e){this.async((function(){this.ensureId()}),e)},j.prototype.addDynamicView=function(e,t){var n=new S(this,e,t);return this.DynamicViews.push(n),n},j.prototype.removeDynamicView=function(e){this.DynamicViews=this.DynamicViews.filter((function(t){return t.name!==e}))},j.prototype.getDynamicView=function(e){for(var t=0;t<this.DynamicViews.length;t++)if(this.DynamicViews[t].name===e)return this.DynamicViews[t];return null},j.prototype.findAndUpdate=function(e,t){"function"==typeof e?this.updateWhere(e,t):this.chain().find(e).update(t)},j.prototype.findAndRemove=function(e){this.chain().find(e).remove()},j.prototype.insert=function(e,t){if(!Array.isArray(e))return this.insertOne(e);var n,r=[],i=t&&!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0;i&&(this.adaptiveBinaryIndices=!1);try{this.emit("pre-insert",e);for(var a=0,o=e.length;a<o;a++){if(!(n=this.insertOne(e[a],!0)))return;r.push(n)}}finally{i&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}return this.emit("insert",r),1===(r=this.cloneObjects?v(r,this.cloneMethod):r).length?r[0]:r},j.prototype.insertOne=function(e,n){var r,a=null;if("object"!=typeof e?a=new TypeError("Document needs to be an object"):null===e&&(a=new TypeError("Object cannot be null")),null!==a)throw this.emit("error",a),a;var o=this.cloneObjects?v(e,this.cloneMethod):e;if(this.disableFreeze||(o=i(o)),this.disableMeta||(void 0===o.meta?o.meta={revision:0,created:0}:this.disableFreeze||(o.meta=i(o.meta))),n||this.emit("pre-insert",o),this.add(o))return this.disableChangesApi?this.insertMeta(o):this.insertMetaWithChange(o),this.disableFreeze||t(o),r=this.cloneObjects?v(o,this.cloneMethod):o,n||this.emit("insert",r),this.addAutoUpdateObserver(r),r},j.prototype.clear=function(e){var t=this;e=e||{},this.data=[],this.idIndex=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null,this.maxId=0,this.DynamicViews=[],this.dirty=!0,this.constraints={unique:{},exact:{}},!0===e.removeIndices?(this.binaryIndices={},this.uniqueNames=[]):Object.keys(this.binaryIndices).forEach((function(e){t.binaryIndices[e].dirty=!1,t.binaryIndices[e].values=[]}))},j.prototype.update=function(n){var r,i,a;if(Array.isArray(n)){a=n.length,(r=!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0)&&(this.adaptiveBinaryIndices=!1);try{for(i=0;i<a;i+=1)this.update(n[i])}finally{r&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}}else{if(!e.call(n,"$loki"))throw new Error("Trying to update unsynced document. Please save the document first by using insert() or addMany()");try{this.startTransaction();var o,s,p,c,u,l=this.get(n.$loki,!0),d=this;if(!l)throw new Error("Trying to update a document not in collection.");o=l[0],p=l[1],s=this.cloneObjects||!this.disableDeltaChangesApi&&this.disableFreeze?v(n,this.cloneMethod):n,this.emit("pre-update",n),this.uniqueNames.forEach((function(e){d.getUniqueIndex(e,!0).update(o,s)})),this.data[p]=s,s!==n&&this.addAutoUpdateObserver(n);for(var f=0;f<this.DynamicViews.length;f++)this.DynamicViews[f].evaluateDocument(p,!1);if(this.adaptiveBinaryIndices){var h=this.binaryIndices;for(c in h)this.adaptiveBinaryIndexUpdate(p,c)}else this.flagBinaryIndexesDirty();return this.idIndex[p]=s.$loki,this.isIncremental&&this.dirtyIds.push(s.$loki),this.commit(),this.dirty=!0,s=this.disableChangesApi?this.updateMeta(s):this.updateMetaWithChange(s,o),this.disableFreeze||t(s),u=this.cloneObjects?v(s,this.cloneMethod):s,this.emit("update",u,o),u}catch(e){throw this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),e}}},j.prototype.add=function(e){if("object"!=typeof e)throw new TypeError("Object being added needs to be an object");if(void 0!==e.$loki)throw new Error("Document is already in collection, please use update()");try{this.startTransaction(),this.maxId++,isNaN(this.maxId)&&(this.maxId=this.data[this.data.length-1].$loki+1);var t=this.maxId;e.$loki=t,this.disableMeta||(e.meta.version=0);for(var n=0,r=this.uniqueNames.length;n<r;n++)this.getUniqueIndex(this.uniqueNames[n],!0).set(e);this.idIndex&&this.idIndex.push(t),this.isIncremental&&this.dirtyIds.push(t),this.data.push(e);var i=this.data.length-1,a=this.DynamicViews.length;for(n=0;n<a;n++)this.DynamicViews[n].evaluateDocument(i,!0);if(this.adaptiveBinaryIndices){var o=this.binaryIndices;for(var s in o)this.adaptiveBinaryIndexInsert(i,s)}else this.flagBinaryIndexesDirty();return this.commit(),this.dirty=!0,this.cloneObjects?v(e,this.cloneMethod):e}catch(e){throw this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),e}},j.prototype.updateWhere=function(e,t){var n,r=this.where(e),i=0;try{for(;i<r.length;i++)n=t(r[i]),this.update(n)}catch(e){this.rollback(),this.lokiConsoleWrapper.error(e.message)}},j.prototype.removeWhere=function(e){var t;"function"==typeof e?(t=this.data.filter(e),this.remove(t)):this.chain().find(e).remove()},j.prototype.removeDataOnly=function(){this.remove(this.data.slice())},j.prototype.removeBatchByPositions=function(e){var t,n,r,i,a=e.length,o={},s=Object.keys(this.binaryIndices).length,p=Object.keys(this.constraints.unique).length,c=this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0,u=this;try{for(this.startTransaction(),this.ensureId(),r=0;r<a;r++)o[this.idIndex[e[r]]]=!0;if((t=this.DynamicViews.length)>0||s>0||p>0){if(t>0)for(n=0;n<t;n++)this.DynamicViews[n].removeDocument(e);if(this.adaptiveBinaryIndices&&!c){var l,d=this.binaryIndices;for(l in d)this.adaptiveBinaryIndexRemove(e,l)}else this.flagBinaryIndexesDirty();p&&this.uniqueNames.forEach((function(t){var n=u.getUniqueIndex(t);if(n)for(r=0;r<a;r++)null!==(i=u.data[e[r]])[t]&&void 0!==i[t]&&n.remove(i[t])}))}if(!this.disableChangesApi||this.events.delete.length>1)for(r=0;r<a;r++)this.emit("delete",this.data[e[r]]);if(this.data=this.data.filter((function(e){return!o[e.$loki]})),this.isIncremental)for(r=0;r<a;r++)this.dirtyIds.push(this.idIndex[e[r]]);this.idIndex=this.idIndex.filter((function(e){return!o[e]})),this.adaptiveBinaryIndices&&c&&(this.adaptiveBinaryIndices=!1,this.ensureAllIndexes(!0),this.adaptiveBinaryIndices=!0),this.commit(),this.dirty=!0}catch(e){return this.rollback(),c&&(this.adaptiveBinaryIndices=!0),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),null}},j.prototype.removeBatch=function(e){var t,n=e.length,r=this.data.length,i={},a=[];for(t=0;t<r;t++)i[this.data[t].$loki]=t;for(t=0;t<n;t++)"object"==typeof e[t]?a.push(i[e[t].$loki]):a.push(i[e[t]]);this.removeBatchByPositions(a)},j.prototype.remove=function(t){if("number"==typeof t&&(t=this.get(t)),"object"!=typeof t)throw new Error("Parameter is not an object");if(Array.isArray(t))this.removeBatch(t);else{if(!e.call(t,"$loki"))throw new Error("Object is not a document stored in the collection");try{this.startTransaction();var n=this.get(t.$loki,!0),a=n[1],o=this;this.uniqueNames.forEach((function(e){if(null!==t[e]&&void 0!==t[e]){var n=o.getUniqueIndex(e);n&&n.remove(t[e])}}));for(var s=0;s<this.DynamicViews.length;s++)this.DynamicViews[s].removeDocument(a);if(this.adaptiveBinaryIndices){var p,c=this.binaryIndices;for(p in c)this.adaptiveBinaryIndexRemove(a,p)}else this.flagBinaryIndexesDirty();return this.data.splice(a,1),this.removeAutoUpdateObserver(t),this.idIndex.splice(a,1),this.isIncremental&&this.dirtyIds.push(t.$loki),this.commit(),this.dirty=!0,this.emit("delete",n[0]),this.disableFreeze||(t=i(t)),delete t.$loki,delete t.meta,this.disableFreeze||r(t),t}catch(e){return this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),null}}},j.prototype.get=function(e,t){this.idIndex||this.ensureId();var n=t||!1,r=this.idIndex,i=r.length-1,a=0,o=a+i>>1;if(e="number"==typeof e?e:parseInt(e,10),isNaN(e))throw new TypeError("Passed id is not an integer");for(;r[a]<r[i];)r[o=a+i>>1]<e?a=o+1:i=o;return i===a&&r[a]===e?n?[this.data[a],a]:this.data[a]:null},j.prototype.getBinaryIndexPosition=function(e,t){var n=a.getIn(this.data[e],t,!0),r=this.binaryIndices[t].values,i=this.calculateRange("$eq",t,n);if(0===i[0]&&-1===i[1])return null;for(var o=i[0],s=i[1],p=o;p<=s;p++)if(r[p]===e)return p;return null},j.prototype.adaptiveBinaryIndexInsert=function(e,t){var n=-1!==t.indexOf("."),r=this.binaryIndices[t].values,i=a.getIn(this.data[e],t,n);!0===this.serializableIndices&&i instanceof Date&&(this.data[e][t]=i.getTime(),i=a.getIn(this.data[e],t));var o=0===r.length?0:this.calculateRangeStart(t,i,!0,n);this.binaryIndices[t].values.splice(o,0,e)},j.prototype.adaptiveBinaryIndexUpdate=function(e,t){var n,r=this.binaryIndices[t].values,i=r.length;for(n=0;n<i&&r[n]!==e;n++);this.binaryIndices[t].values.splice(n,1),this.adaptiveBinaryIndexInsert(e,t)},j.prototype.adaptiveBinaryIndexRemove=function(e,t,n){var r,i,a,o,s,p,c,u=this.binaryIndices[t],l={};if(Array.isArray(e)){if(1!==(o=e.length)){for(a=0;a<o;a++)l[e[a]]=!0;if(u.values=u.values.filter((function(e){return!l[e]})),!0===n)return;var d=e.slice();for(d.sort((function(e,t){return e-t})),r=u.values.length,i=0;i<r;i++){for(s=u.values[i],p=0,a=0;a<o&&s>d[a];a++)p++;u.values[i]-=p}return}e=e[0]}if(null===(c=this.getBinaryIndexPosition(e,t)))return null;if(u.values.splice(c,1),!0!==n)for(r=u.values.length,i=0;i<r;i++)u.values[i]>e&&u.values[i]--},j.prototype.calculateRangeStart=function(e,t,n,r){var i=this.data,s=this.binaryIndices[e].values,p=0,c=s.length-1,u=0;if(0===s.length)return-1;for(a.getIn(i[s[p]],e,r),a.getIn(i[s[c]],e,r);p<c;)u=p+c>>1,o.lt(a.getIn(i[s[u]],e,r),t,!1)?p=u+1:c=u;var l=p;return o.aeq(t,a.getIn(i[s[l]],e,r))?l:o.lt(t,a.getIn(i[s[l]],e,r),!1)?n?l:l-1:n?l+1:l},j.prototype.calculateRangeEnd=function(e,t,n){var r=this.data,i=this.binaryIndices[e].values,s=0,p=i.length-1,c=0;if(0===i.length)return-1;for(a.getIn(r[i[s]],e,n),a.getIn(r[i[p]],e,n);s<p;)c=s+p>>1,o.lt(t,a.getIn(r[i[c]],e,n),!1)?p=c:s=c+1;var u=p;return o.aeq(t,a.getIn(r[i[u]],e,n))?u:o.gt(t,a.getIn(r[i[u]],e,n),!1)?u+1:o.aeq(t,a.getIn(r[i[u-1]],e,n))?u-1:u},j.prototype.calculateRange=function(e,t,n){var r,i,s,p=this.data,c=this.binaryIndices[t].values,u=c.length-1;if(0===p.length)return[0,-1];var l=-1!==t.indexOf("."),d=a.getIn(p[c[0]],t,l),f=a.getIn(p[c[u]],t,l);switch(e){case"$eq":case"$aeq":case"$dteq":if(o.lt(n,d,!1)||o.gt(n,f,!1))return[0,-1];break;case"$gt":if(o.gt(n,f,!0))return[0,-1];if(o.gt(d,n,!1))return[0,u];break;case"$gte":if(o.gt(n,f,!1))return[0,-1];if(o.gt(d,n,!0))return[0,u];break;case"$lt":if(o.lt(n,d,!0))return[0,-1];if(o.lt(f,n,!1))return[0,u];break;case"$lte":if(o.lt(n,d,!1))return[0,-1];if(o.lt(f,n,!0))return[0,u];break;case"$between":return o.gt(n[0],f,!1)||o.lt(n[1],d,!1)?[0,-1]:((r=this.calculateRangeStart(t,n[0],!1,l))<0&&r++,(s=this.calculateRangeEnd(t,n[1],l))>u&&s--,o.gt(a.getIn(p[c[r]],t,l),n[0],!0)||r++,o.lt(a.getIn(p[c[s]],t,l),n[1],!0)||s--,s<r?[0,-1]:[r,s]);case"$in":for(var h=[],m=[],v=0,y=n.length;v<y;v++)for(var b=this.calculateRange("$eq",t,n[v]),g=b[0];g<=b[1];g++)void 0===h[g]&&(h[g]=!0,m.push(g));return m}switch(e){case"$eq":case"$aeq":case"$dteq":case"$gte":case"$lt":r=this.calculateRangeStart(t,n,!1,l),i=a.getIn(p[c[r]],t,l)}switch(e){case"$eq":case"$aeq":case"$dteq":case"$lte":case"$gt":s=this.calculateRangeEnd(t,n,l),a.getIn(p[c[s]],t,l)}switch(e){case"$eq":case"$aeq":case"$dteq":return o.aeq(i,n)?[r,s]:[0,-1];case"$gt":return o.aeq(a.getIn(p[c[s]],t,l),n)?[s+1,u]:[s,u];case"$gte":return o.aeq(a.getIn(p[c[r]],t,l),n)?[r,u]:[r+1,u];case"$lt":return o.aeq(a.getIn(p[c[r]],t,l),n)?[0,r-1]:[0,r];case"$lte":return o.aeq(a.getIn(p[c[s]],t,l),n)?[0,s]:[0,s-1];default:return[0,p.length-1]}},j.prototype.by=function(e,t){var n;if(void 0===t)return n=this,function(t){return n.by(e,t)};var r=this.getUniqueIndex(e,!0).get(t);return this.cloneObjects?v(r,this.cloneMethod):r},j.prototype.findOne=function(e){e=e||{};var t=this.chain().find(e,!0).data();return Array.isArray(t)&&0===t.length?null:this.cloneObjects?v(t[0],this.cloneMethod):t[0]},j.prototype.chain=function(e,t){var n=new O(this);return void 0===e?n:n.transform(e,t)},j.prototype.find=function(e){return this.chain().find(e).data()},j.prototype.findOneUnindexed=function(e,t){for(var n=this.data.length;n--;)if(a.getIn(this.data[n],e,!0)===t)return this.data[n];return null},j.prototype.startTransaction=function(){if(this.transactional){this.cachedData=v(this.data,this.cloneMethod),this.cachedIndex=this.idIndex,this.cachedBinaryIndex=this.binaryIndices,this.cachedDirtyIds=this.dirtyIds;for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].startTransaction()}},j.prototype.commit=function(){if(this.transactional){this.cachedData=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedDirtyIds=null;for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].commit()}},j.prototype.rollback=function(){if(this.transactional){null!==this.cachedData&&null!==this.cachedIndex&&(this.data=this.cachedData,this.idIndex=this.cachedIndex,this.binaryIndices=this.cachedBinaryIndex,this.dirtyIds=this.cachedDirtyIds);for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].rollback()}},j.prototype.async=function(e,t){setTimeout((function(){if("function"!=typeof e)throw new TypeError("Argument passed for async execution is not a function");e(),t()}),0)},j.prototype.where=function(e){return this.chain().where(e).data()},j.prototype.mapReduce=function(e,t){try{return t(this.data.map(e))}catch(e){throw e}},j.prototype.eqJoin=function(e,t,n,r,i){return new O(this).eqJoin(e,t,n,r,i)},j.prototype.stages={},j.prototype.getStage=function(e){return this.stages[e]||(this.stages[e]={}),this.stages[e]},j.prototype.commitLog=[],j.prototype.stage=function(e,t){var n=JSON.parse(JSON.stringify(t));return this.getStage(e)[t.$loki]=n,n},j.prototype.commitStage=function(e,t){var n,r=this.getStage(e),i=(new Date).getTime();for(n in r)this.update(r[n]),this.commitLog.push({timestamp:i,message:t,data:JSON.parse(JSON.stringify(r[n]))});this.stages[e]={}},j.prototype.no_op=function(){},j.prototype.extract=function(e){for(var t=0,n=this.data.length,r=k(e),i=[];t<n;t+=1)i.push(A(this.data[t],e,r));return i},j.prototype.max=function(e){return Math.max.apply(null,this.extract(e))},j.prototype.min=function(e){return Math.min.apply(null,this.extract(e))},j.prototype.maxRecord=function(e){for(var t,n=0,r=this.data.length,i=k(e),a={index:0,value:void 0};n<r;n+=1)void 0!==t?t<A(this.data[n],e,i)&&(t=A(this.data[n],e,i),a.index=this.data[n].$loki):(t=A(this.data[n],e,i),a.index=this.data[n].$loki);return a.value=t,a},j.prototype.minRecord=function(e){for(var t,n=0,r=this.data.length,i=k(e),a={index:0,value:void 0};n<r;n+=1)void 0!==t?t>A(this.data[n],e,i)&&(t=A(this.data[n],e,i),a.index=this.data[n].$loki):(t=A(this.data[n],e,i),a.index=this.data[n].$loki);return a.value=t,a},j.prototype.extractNumerical=function(e){return this.extract(e).map(T).filter(Number).filter((function(e){return!isNaN(e)}))},j.prototype.avg=function(e){return C(this.extractNumerical(e))},j.prototype.stdDev=function(e){return t=this.extractNumerical(e),n=C(t),r=C(t.map((function(e){var t=e-n;return t*t}))),Math.sqrt(r);var t,n,r},j.prototype.mode=function(e){var t,n,r,i={},a=this.extract(e);for(n in a.forEach((function(e){i[e]?i[e]+=1:i[e]=1})),i)t?t<i[n]&&(r=n):(r=n,t=i[n]);return r},j.prototype.median=function(e){var t=this.extractNumerical(e);t.sort(P);var n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2},R.prototype={keys:[],values:[],sort:function(e,t){return e<t?-1:e>t?1:0},setSort:function(e){this.bs=new F(e)},bs:function(){return new F(this.sort)},set:function(e,t){var n=this.bs(this.keys,e);n.found?this.values[n.index]=t:(this.keys.splice(n.index,0,e),this.values.splice(n.index,0,t))},get:function(e){return this.values[I(this.keys,e,this.sort).index]}},M.prototype.keyMap={},M.prototype.lokiMap={},M.prototype.set=function(e){var t=e[this.field];if(null!=t){if(this.keyMap[t])throw new Error("Duplicate key for property "+this.field+": "+t);this.keyMap[t]=e,this.lokiMap[e.$loki]=t}},M.prototype.get=function(e){return this.keyMap[e]},M.prototype.byId=function(e){return this.keyMap[this.lokiMap[e]]},M.prototype.update=function(e,t){if(this.lokiMap[e.$loki]!==t[this.field]){var n=this.lokiMap[e.$loki];this.set(t),this.keyMap[n]=void 0}else this.keyMap[e[this.field]]=t},M.prototype.remove=function(e){var t=this.keyMap[e];if(null==t)throw new Error("Key is not in unique index: "+this.field);this.keyMap[e]=void 0,this.lokiMap[t.$loki]=void 0},M.prototype.clear=function(){this.keyMap=Object.create(null),this.lokiMap=Object.create(null)},$.prototype={set:function(e,t){this.index[e]?this.index[e].push(t):this.index[e]=[t]},remove:function(e,t){var n=this.index[e];for(var r in n)n[r]==t&&n.splice(r,1);n.length<1&&(this.index[e]=void 0)},get:function(e){return this.index[e]},clear:function(e){this.index={}}},g.deepFreeze=t,g.freeze=r,g.unFreeze=i,g.LokiOps=h,g.Collection=j,g.DynamicView=S,g.Resultset=O,g.KeyValueStore=R,g.LokiMemoryAdapter=w,g.LokiPartitioningAdapter=_,g.LokiLocalStorageAdapter=D,g.LokiFsAdapter=x,g.persistenceAdapters={fs:x,localStorage:D},g.aeq=s,g.lt=p,g.gt=c,g.Comparators=o,g}()},void 0===(i=r.apply(t,[]))||(e.exports=i)},15955:(e,t,n)=>{e.exports=n(37392)},72839:(e,t,n)=>{"use strict";var r,i,a,o=n(15955),s=n(71017).extname,p=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=p.exec(e),n=t&&o[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}t.charset=u,t.charsets={lookup:u},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=p.exec(e),r=n&&t.extensions[n[1].toLowerCase()];return!(!r||!r.length)&&r[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=s("x."+e).toLowerCase().substr(1);return n&&t.types[n]||!1},t.types=Object.create(null),r=t.extensions,i=t.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var t=o[e],n=t.extensions;if(n&&n.length){r[e]=n;for(var s=0;s<n.length;s++){var p=n[s];if(i[p]){var c=a.indexOf(o[i[p]].source),u=a.indexOf(t.source);if("application/octet-stream"!==i[p]&&(c>u||c===u&&"application/"===i[p].substr(0,12)))continue}i[p]=e}}}))},48628:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,o){o=o||{};var s,p,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===c&&isFinite(e))return o.long?(s=e,(p=Math.abs(s))>=i?a(s,p,i,"day"):p>=r?a(s,p,r,"hour"):p>=n?a(s,p,n,"minute"):p>=t?a(s,p,t,"second"):s+" ms"):function(e){var a=Math.abs(e);return a>=i?Math.round(e/i)+"d":a>=r?Math.round(e/r)+"h":a>=n?Math.round(e/n)+"m":a>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},51104:(e,t,n)=>{"use strict";var r=n(57310).parse,i={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},a=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function o(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?r(e):e||{},n=t.protocol,s=t.host,p=t.port;if("string"!=typeof s||!s||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(o("npm_config_no_proxy")||o("no_proxy")).toLowerCase();return!n||"*"!==n&&n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,o=r?parseInt(r[2]):0;return!(!o||o===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!a.call(e,i)):e!==i)}))}(s=s.replace(/:\d*$/,""),p=parseInt(p)||i[n]||0))return"";var c=o("npm_config_"+n+"_proxy")||o(n+"_proxy")||o("npm_config_proxy")||o("all_proxy");return c&&-1===c.indexOf("://")&&(c=n+"://"+c),c}},61547:(e,t,n)=>{"use strict";var r=n(57147),i=n(71017).join,a=n(71017).resolve,o=n(71017).dirname,s={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};e.exports=function e(t,n,p){var c={};for(var u in n&&!p&&"string"!=typeof n&&(p=n,n=null),p=p||{},s)void 0===p[u]&&(p[u]=s[u]);return n=n?a(o(t.filename),n):o(t.filename),r.readdirSync(n).forEach((function(a){var o,s,u,l=i(n,a);r.statSync(l).isDirectory()&&p.recurse?(o=e(t,l,p),Object.keys(o).length&&(c[p.rename(a,l,a)]=o)):l!==t.filename&&function(e,t,n){return new RegExp("\\.("+n.extensions.join("|")+")$","i").test(t)&&!(n.include&&n.include instanceof RegExp&&!n.include.test(e))&&!(n.include&&"function"==typeof n.include&&!n.include(e,t))&&!(n.exclude&&n.exclude instanceof RegExp&&n.exclude.test(e))&&!(n.exclude&&"function"==typeof n.exclude&&n.exclude(e,t))}(l,a,p)&&(s=a.substring(0,a.lastIndexOf(".")),u=t.require(l),c[p.rename(s,l,a)]=p.visit(u,l,a)||u)})),c},e.exports.defaults=s},32937:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var a=n(75271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return a.Observable}});var o=n(93739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var s=n(52138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.observable}});var p=n(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return p.animationFrames}});var c=n(59520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var u=n(58042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return u.BehaviorSubject}});var l=n(30216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return l.ReplaySubject}});var d=n(67257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var f=n(64502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return f.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return f.asapScheduler}});var h=n(34617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var m=n(60326);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return m.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return m.queueScheduler}});var v=n(86192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var y=n(88847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var b=n(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=n(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var w=n(11403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return w.Subscriber}});var _=n(93868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return _.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return _.NotificationKind}});var x=n(25966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return x.pipe}});var D=n(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return D.noop}});var O=n(69144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var E=n(31211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return E.isObservable}});var S=n(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return S.lastValueFrom}});var j=n(17447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var k=n(56809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return k.ArgumentOutOfRangeError}});var T=n(68032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return T.EmptyError}});var N=n(91137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return N.NotFoundError}});var P=n(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return P.ObjectUnsubscribedError}});var C=n(56228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var A=n(26279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return A.TimeoutError}});var I=n(35463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return I.UnsubscriptionError}});var F=n(31253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return F.bindCallback}});var R=n(61009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return R.bindNodeCallback}});var M=n(21047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return M.combineLatest}});var $=n(60079);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return $.concat}});var B=n(31663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return B.connectable}});var L=n(65401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var V=n(51727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return V.empty}});var q=n(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return q.forkJoin}});var U=n(76216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return U.from}});var z=n(96767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var W=n(94366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return W.fromEventPattern}});var Q=n(76103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Q.generate}});var H=n(84468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return H.iif}});var K=n(24449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return K.interval}});var G=n(35847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return G.merge}});var J=n(57423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return J.never}});var Y=n(77443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return Y.of}});var Z=n(91282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=n(6741);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=n(91945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=n(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var ne=n(46971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return ne.range}});var re=n(10859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return re.throwError}});var ie=n(55710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var ae=n(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ae.using}});var oe=n(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return oe.zip}});var se=n(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.scheduled}});var pe=n(51727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return pe.EMPTY}});var ce=n(57423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(n(89251),t);var ue=n(83782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return ue.config}});var le=n(53533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return le.audit}});var de=n(75188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return de.auditTime}});var fe=n(14514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return fe.buffer}});var he=n(22537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var me=n(88720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return me.bufferTime}});var ve=n(67932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var ye=n(41445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var be=n(64418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=n(84163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var we=n(79893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return we.combineLatestAll}});var _e=n(27230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return _e.combineLatestWith}});var xe=n(44554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return xe.concatAll}});var De=n(21048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return De.concatMap}});var Oe=n(50381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Ee=n(84724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ee.concatWith}});var Se=n(64347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Se.connect}});var je=n(56944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var ke=n(40440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return ke.debounce}});var Te=n(58157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Te.debounceTime}});var Ne=n(11714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ne.defaultIfEmpty}});var Pe=n(31030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Pe.delay}});var Ce=n(16405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Ce.delayWhen}});var Ae=n(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ae.dematerialize}});var Ie=n(42307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Ie.distinct}});var Fe=n(49131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Fe.distinctUntilChanged}});var Re=n(76659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Re.distinctUntilKeyChanged}});var Me=n(54217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Me.elementAt}});var $e=n(24707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return $e.endWith}});var Be=n(89276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Be.every}});var Le=n(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Ve=n(93977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Ve.exhaustAll}});var qe=n(40368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return qe.exhaustMap}});var Ue=n(47829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ue.expand}});var ze=n(72763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var We=n(44106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return We.finalize}});var Qe=n(68759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Qe.find}});var He=n(23999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return He.findIndex}});var Ke=n(55194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Ke.first}});var Ge=n(21664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ge.groupBy}});var Je=n(13470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Je.ignoreElements}});var Ye=n(49549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Ye.isEmpty}});var Ze=n(79582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=n(14338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=n(24791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=n(49318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var nt=n(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return nt.max}});var rt=n(64594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var it=n(92735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var at=n(99010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return at.mergeMap}});var ot=n(38983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var st=n(72170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.mergeScan}});var pt=n(43674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return pt.mergeWith}});var ct=n(91446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var ut=n(72318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ut.multicast}});var lt=n(23165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return lt.observeOn}});var dt=n(10402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var ft=n(85658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ft.pluck}});var ht=n(23881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var mt=n(41755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return mt.publishBehavior}});var vt=n(99801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var yt=n(65021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return yt.publishReplay}});var bt=n(39925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=n(61386);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var wt=n(51194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return wt.repeat}});var _t=n(47085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return _t.repeatWhen}});var xt=n(67524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return xt.retry}});var Dt=n(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Dt.retryWhen}});var Ot=n(72711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ot.refCount}});var Et=n(76577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Et.sample}});var St=n(43815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return St.sampleTime}});var jt=n(97250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var kt=n(20842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return kt.sequenceEqual}});var Tt=n(69728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Tt.share}});var Nt=n(97234);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Nt.shareReplay}});var Pt=n(22445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Pt.single}});var Ct=n(56262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ct.skip}});var At=n(17397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return At.skipLast}});var It=n(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return It.skipUntil}});var Ft=n(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ft.skipWhile}});var Rt=n(13424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Rt.startWith}});var Mt=n(80831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Mt.subscribeOn}});var $t=n(90411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return $t.switchAll}});var Bt=n(97222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Bt.switchMap}});var Lt=n(46464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Vt=n(74434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var qt=n(17138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return qt.take}});var Ut=n(24288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ut.takeLast}});var zt=n(97341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Wt=n(60653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Qt=n(38668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Qt.tap}});var Ht=n(69466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ht.throttle}});var Kt=n(99705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Gt=n(48062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Gt.throwIfEmpty}});var Jt=n(76610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Jt.timeInterval}});var Yt=n(26279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Yt.timeout}});var Zt=n(28132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=n(74553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var en=n(12378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return en.toArray}});var tn=n(24768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tn.window}});var nn=n(10131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nn.windowCount}});var rn=n(29579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return rn.windowTime}});var an=n(10752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return an.windowToggle}});var on=n(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return on.windowWhen}});var sn=n(44255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sn.withLatestFrom}});var pn=n(87220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return pn.zipAll}});var cn=n(39287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cn.zipWith}})},67257:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t}(n(59520).Subject);t.AsyncSubject=a},58042:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var a=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(n(59520).Subject);t.BehaviorSubject=a},93868:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var r,i=n(51727),a=n(77443),o=n(10859),s=n(64432);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var p=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return"N"===i?null==e?void 0:e(a):"E"===i?null==t?void 0:t(o):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return s.isFunction(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,s="N"===t?a.of(n):"E"===t?o.throwError((function(){return r})):"C"===t?i.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var n,r,i,a=e,o=a.kind,s=a.value,p=a.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(n=t.next)||void 0===n||n.call(t,s):"E"===o?null===(r=t.error)||void 0===r||r.call(t,p):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=p,t.observeNotification=c},33380:(e,t)=>{"use strict";function n(e,t,n){return{kind:e,value:t,error:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=n("C",void 0,void 0),t.errorNotification=function(e){return n("E",void 0,e)},t.nextNotification=function(e){return n("N",e,void 0)},t.createNotification=n},75271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var r=n(11403),i=n(7215),a=n(52138),o=n(25966),s=n(83782),p=n(64432),c=n(34770),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var a,o=this,s=(a=e)&&a instanceof r.Subscriber||function(e){return e&&p.isFunction(e.next)&&p.isFunction(e.error)&&p.isFunction(e.complete)}(a)&&i.isSubscription(a)?e:new r.SafeSubscriber(e,t,n);return c.errorContext((function(){var e=o,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?o._subscribe(s):o._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))((function(t,i){var a=new r.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),a.unsubscribe()}},error:i,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[a.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function l(e){var t;return null!==(t=null!=e?e:s.config.Promise)&&void 0!==t?t:Promise}t.Observable=u},30216:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var a=n(59520),o=n(11713),s=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=o.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return i(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,p=1;p<r.length&&r[p]<=o;p+=2)s=p;s&&r.splice(0,s+1)}},t}(a.Subject);t.ReplaySubject=s},3980:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var r=n(11713),i=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=r.dateTimestampProvider.now,e}();t.Scheduler=i},59520:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var o=n(75271),s=n(7215),p=n(7392),c=n(32447),u=n(34770),l=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new p.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;u.errorContext((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=a(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;u.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;u.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?s.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(e),new s.Subscription((function(){t.currentObservers=null,c.arrRemove(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new o.Observable;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(o.Observable);t.Subject=l;var d=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return i(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:s.EMPTY_SUBSCRIPTION},t}(l);t.AnonymousSubject=d},11403:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var a=n(64432),o=n(7215),s=n(83782),p=n(57234),c=n(5729),u=n(33380),l=n(68972),d=n(34770),f=function(e){function n(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,o.isSubscription(n)&&n.add(r)):r.destination=t.EMPTY_OBSERVER,r}return i(n,e),n.create=function(e,t,n){return new y(e,t,n)},n.prototype.next=function(e){this.isStopped?g(u.nextNotification(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?g(u.errorNotification(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?g(u.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(o.Subscription);t.Subscriber=f;var h=Function.prototype.bind;function m(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),y=function(e){function t(t,n,r){var i,o,p=e.call(this)||this;return a.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:p&&s.config.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return p.unsubscribe()},i={next:t.next&&m(t.next,o),error:t.error&&m(t.error,o),complete:t.complete&&m(t.complete,o)}):i=t,p.destination=new v(i),p}return i(t,e),t}(f);function b(e){s.config.useDeprecatedSynchronousErrorHandling?d.captureError(e):p.reportUnhandledError(e)}function g(e,t){var n=s.config.onStoppedNotification;n&&l.timeoutProvider.setTimeout((function(){return n(e,t)}))}t.SafeSubscriber=y,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var o=n(64432),s=n(35463),p=n(32447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,p,c;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var d=r(l),f=d.next();!f.done;f=d.next())f.value.remove(this)}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if(o.isFunction(h))try{h()}catch(e){c=e instanceof s.UnsubscriptionError?e.errors:[e]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var v=r(m),y=v.next();!y.done;y=v.next()){var b=y.value;try{u(b)}catch(e){c=null!=c?c:[],e instanceof s.UnsubscriptionError?c=a(a([],i(c)),i(e.errors)):c.push(e)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(p=v.return)&&p.call(v)}finally{if(n)throw n.error}}}if(c)throw new s.UnsubscriptionError(c)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&p.arrRemove(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&p.arrRemove(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){o.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&o.isFunction(e.remove)&&o.isFunction(e.add)&&o.isFunction(e.unsubscribe)}},83782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},17447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var r=n(68032),i=n(11403);t.firstValueFrom=function(e,t){var n="object"==typeof t;return new Promise((function(a,o){var s=new i.SafeSubscriber({next:function(e){a(e),s.unsubscribe()},error:o,complete:function(){n?a(t.defaultValue):o(new r.EmptyError)}});e.subscribe(s)}))}},1263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var r=n(68032);t.lastValueFrom=function(e,t){var n="object"==typeof t;return new Promise((function(i,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?i(o):n?i(t.defaultValue):a(new r.EmptyError)}})}))}},93739:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var a=n(75271),o=n(7215),s=n(72711),p=n(35079),c=n(64024),u=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,c.hasLift(t)&&(r.lift=t.lift),r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new o.Subscription;var n=this.getSubject();t.add(this.source.subscribe(p.createOperatorSubscriber(n,void 0,(function(){e._teardown(),n.complete()}),(function(t){e._teardown(),n.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=o.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return s.refCount()(this)},t}(a.Observable);t.ConnectableObservable=u},31253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var r=n(46414);t.bindCallback=function(e,t,n){return r.bindCallbackInternals(!1,e,t,n)}},46414:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var a=n(76551),o=n(75271),s=n(80831),p=n(74666),c=n(23165),u=n(67257);t.bindCallbackInternals=function e(t,n,l,d){if(l){if(!a.isScheduler(l))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e(t,n,d).apply(this,r).pipe(p.mapOneOrManyArgs(l))};d=l}return d?function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e(t,n).apply(this,r).pipe(s.subscribeOn(d),c.observeOn(d))}:function(){for(var e=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var p=new u.AsyncSubject,c=!0;return new o.Observable((function(o){var s=p.subscribe(o);if(c){c=!1;var u=!1,l=!1;n.apply(e,i(i([],r(a)),[function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t){var r=e.shift();if(null!=r)return void p.error(r)}p.next(1<e.length?e:e[0]),l=!0,u&&p.complete()}])),l&&p.complete(),u=!0}return s}))}}},61009:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var r=n(46414);t.bindNodeCallback=function(e,t,n){return r.bindCallbackInternals(!0,e,t,n)}},21047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var r=n(75271),i=n(14744),a=n(76216),o=n(69144),s=n(74666),p=n(92619),c=n(51589),u=n(35079),l=n(35421);function d(e,t,n){return void 0===n&&(n=o.identity),function(r){f(t,(function(){for(var i=e.length,o=new Array(i),s=i,p=i,c=function(i){f(t,(function(){var c=a.from(e[i],t),l=!1;c.subscribe(u.createOperatorSubscriber(r,(function(e){o[i]=e,l||(l=!0,p--),p||r.next(n(o.slice()))}),(function(){--s||r.complete()})))}),r)},l=0;l<i;l++)c(l)}),r)}}function f(e,t,n){e?l.executeSchedule(n,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=p.popScheduler(e),u=p.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,h=l.keys;if(0===f.length)return a.from([],n);var m=new r.Observable(d(f,n,h?function(e){return c.createObject(h,e)}:o.identity));return u?m.pipe(s.mapOneOrManyArgs(u)):m},t.combineLatestInit=d},60079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var r=n(44554),i=n(92619),a=n(76216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.concatAll()(a.from(e,i.popScheduler(e)))}},31663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var r=n(59520),i=n(75271),a=n(65401),o={connector:function(){return new r.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=o);var n=null,r=t.connector,s=t.resetOnDisconnect,p=void 0===s||s,c=r(),u=new i.Observable((function(e){return c.subscribe(e)}));return u.connect=function(){return n&&!n.closed||(n=a.defer((function(){return e})).subscribe(c),p&&n.add((function(){return c=r()}))),n},u}},65401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var r=n(75271),i=n(9451);t.defer=function(e){return new r.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var r=n(75271),i=n(81241),a=n(76741);function o(e){return new r.Observable((function(t){var n=e||i.performanceTimestampProvider,r=n.now(),o=0,s=function(){t.closed||(o=a.animationFrameProvider.requestAnimationFrame((function(i){o=0;var a=n.now();t.next({timestamp:e?a:i,elapsed:a-r}),s()})))};return s(),function(){o&&a.animationFrameProvider.cancelAnimationFrame(o)}}))}t.animationFrames=function(e){return e?o(e):s};var s=o()},51727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var r=n(75271);t.EMPTY=new r.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new r.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var r=n(75271),i=n(14744),a=n(9451),o=n(92619),s=n(35079),p=n(74666),c=n(51589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.popResultSelector(e),u=i.argsArgArrayOrObject(e),l=u.args,d=u.keys,f=new r.Observable((function(e){var t=l.length;if(t)for(var n=new Array(t),r=t,i=t,o=function(t){var o=!1;a.innerFrom(l[t]).subscribe(s.createOperatorSubscriber(e,(function(e){o||(o=!0,i--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&o||(i||e.next(d?c.createObject(d,n):n),e.complete())})))},p=0;p<t;p++)o(p);else e.complete()}));return n?f.pipe(p.mapOneOrManyArgs(n)):f}},76216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var r=n(3200),i=n(9451);t.from=function(e,t){return t?r.scheduled(e,t):i.innerFrom(e)}},96767:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=n(9451),a=n(75271),o=n(99010),s=n(38219),p=n(64432),c=n(74666),u=["addListener","removeListener"],l=["addEventListener","removeEventListener"],d=["on","off"];function f(e,t){return function(n){return function(r){return e[n](t,r)}}}t.fromEvent=function e(t,n,h,m){if(p.isFunction(h)&&(m=h,h=void 0),m)return e(t,n,h).pipe(c.mapOneOrManyArgs(m));var v=r(function(e){return p.isFunction(e.addEventListener)&&p.isFunction(e.removeEventListener)}(t)?l.map((function(e){return function(r){return t[e](n,r,h)}})):function(e){return p.isFunction(e.addListener)&&p.isFunction(e.removeListener)}(t)?u.map(f(t,n)):function(e){return p.isFunction(e.on)&&p.isFunction(e.off)}(t)?d.map(f(t,n)):[],2),y=v[0],b=v[1];if(!y&&s.isArrayLike(t))return o.mergeMap((function(t){return e(t,n,h)}))(i.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new a.Observable((function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return y(t),function(){return b(t)}}))}},94366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var r=n(75271),i=n(64432),a=n(74666);t.fromEventPattern=function e(t,n,o){return o?e(t,n).pipe(a.mapOneOrManyArgs(o)):new r.Observable((function(e){var r=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1===t.length?t[0]:t)},a=t(r);return i.isFunction(n)?function(){return n(r,a)}:void 0}))}},52160:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var r=n(75271);t.fromSubscribable=function(e){return new r.Observable((function(t){return e.subscribe(t)}))}},76103:function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=n(69144),a=n(76551),o=n(65401),s=n(78840);t.generate=function(e,t,n,p,c){var u,l,d,f;function h(){var e;return r(this,(function(r){switch(r.label){case 0:e=f,r.label=1;case 1:return t&&!t(e)?[3,4]:[4,d(e)];case 2:r.sent(),r.label=3;case 3:return e=n(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(f=(u=e).initialState,t=u.condition,n=u.iterate,l=u.resultSelector,d=void 0===l?i.identity:l,c=u.scheduler):(f=e,!p||a.isScheduler(p)?(d=i.identity,c=p):d=p),o.defer(c?function(){return s.scheduleIterable(h(),c)}:h)}},84468:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var r=n(65401);t.iif=function(e,t,n){return r.defer((function(){return e()?t:n}))}},9451:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},a=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof o?o(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var s=n(38219),p=n(52644),c=n(75271),u=n(3292),l=n(57707),d=n(54883),f=n(6380),h=n(49266),m=n(64432),v=n(57234),y=n(52138);function b(e){return new c.Observable((function(t){var n=e[y.observable]();if(m.isFunction(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()}))}function w(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function _(e){return new c.Observable((function(t){var n,r;try{for(var i=o(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()}))}function x(e){return new c.Observable((function(t){(function(e,t){var n,o,s,p;return r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),n=a(e),i.label=1;case 1:return[4,n.next()];case 2:if((o=i.sent()).done)return[3,4];if(r=o.value,t.next(r),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),s={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),o&&!o.done&&(p=n.return)?[4,p.call(n)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function D(e){return x(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(u.isInteropObservable(e))return b(e);if(s.isArrayLike(e))return g(e);if(p.isPromise(e))return w(e);if(l.isAsyncIterable(e))return x(e);if(f.isIterable(e))return _(e);if(h.isReadableStreamLike(e))return D(e)}throw d.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=w,t.fromIterable=_,t.fromAsyncIterable=x,t.fromReadableStreamLike=D},24449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var r=n(34617),i=n(55710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=r.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},35847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var r=n(64594),i=n(9451),a=n(51727),o=n(92619),s=n(76216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.popScheduler(e),p=o.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):r.mergeAll(p)(s.from(c,n)):a.EMPTY}},57423:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var r=n(75271),i=n(5729);t.NEVER=new r.Observable(i.noop),t.never=function(){return t.NEVER}},77443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var r=n(92619),i=n(76216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.popScheduler(e);return i.from(e,n)}},91282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var r=n(51727),i=n(64764),a=n(64475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(a.argsOrArgArray(e))(r.EMPTY)}},6741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var r=n(76216);t.pairs=function(e,t){return r.from(Object.entries(e),t)}},91945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(91574),i=n(72763),a=n(9451);t.partition=function(e,t,n){return[i.filter(t,n)(a.innerFrom(e)),i.filter(r.not(t,n))(a.innerFrom(e))]}},7779:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var r=n(75271),i=n(9451),a=n(64475),o=n(35079);function s(e){return function(t){for(var n=[],r=function(r){n.push(i.innerFrom(e[r]).subscribe(o.createOperatorSubscriber(t,(function(e){if(n){for(var i=0;i<n.length;i++)i!==r&&n[i].unsubscribe();n=null}t.next(e)}))))},a=0;n&&!t.closed&&a<e.length;a++)r(a)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=a.argsOrArgArray(e)).length?i.innerFrom(e[0]):new r.Observable(s(e))},t.raceInit=s},46971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var r=n(75271),i=n(51727);t.range=function(e,t,n){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var a=t+e;return new r.Observable(n?function(t){var r=e;return n.schedule((function(){r<a?(t.next(r++),this.schedule()):t.complete()}))}:function(t){for(var n=e;n<a&&!t.closed;)t.next(n++);t.complete()})}},10859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var r=n(75271),i=n(64432);t.throwError=function(e,t){var n=i.isFunction(e)?e:function(){return e},a=function(e){return e.error(n())};return new r.Observable(t?function(e){return t.schedule(a,0,e)}:a)}},55710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var r=n(75271),i=n(34617),a=n(76551),o=n(47761);t.timer=function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=i.async);var s=-1;return null!=t&&(a.isScheduler(t)?n=t:s=t),new r.Observable((function(t){var r=o.isValidDate(e)?+e-n.now():e;r<0&&(r=0);var i=0;return n.schedule((function(){t.closed||(t.next(i++),0<=s?this.schedule(void 0,s):t.complete())}),r)}))}},3687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var r=n(75271),i=n(9451),a=n(51727);t.using=function(e,t){return new r.Observable((function(n){var r=e(),o=t(r);return(o?i.innerFrom(o):a.EMPTY).subscribe(n),function(){r&&r.unsubscribe()}}))}},2042:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var a=n(75271),o=n(9451),s=n(64475),p=n(51727),c=n(35079),u=n(92619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u.popResultSelector(e),l=s.argsOrArgArray(e);return l.length?new a.Observable((function(e){var t=l.map((function(){return[]})),a=l.map((function(){return!1}));e.add((function(){t=a=null}));for(var s=function(s){o.innerFrom(l[s]).subscribe(c.createOperatorSubscriber(e,(function(o){if(t[s].push(o),t.every((function(e){return e.length}))){var p=t.map((function(e){return e.shift()}));e.next(n?n.apply(void 0,i([],r(p))):p),t.some((function(e,t){return!e.length&&a[t]}))&&e.complete()}}),(function(){a[s]=!0,!t[s].length&&e.complete()})))},p=0;!e.closed&&p<l.length;p++)s(p);return function(){t=a=null}})):p.EMPTY}},35079:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var a=n(11403);t.createOperatorSubscriber=function(e,t,n,r,i){return new o(e,t,n,r,i)};var o=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(a.Subscriber);t.OperatorSubscriber=o},53533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var r=n(64024),i=n(9451),a=n(35079);t.audit=function(e){return r.operate((function(t,n){var r=!1,o=null,s=null,p=!1,c=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=o;o=null,n.next(e)}p&&n.complete()},u=function(){s=null,p&&n.complete()};t.subscribe(a.createOperatorSubscriber(n,(function(t){r=!0,o=t,s||i.innerFrom(e(t)).subscribe(s=a.createOperatorSubscriber(n,c,u))}),(function(){p=!0,(!r||!s||s.closed)&&n.complete()})))}))}},75188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var r=n(34617),i=n(53533),a=n(55710);t.auditTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.audit((function(){return a.timer(e,t)}))}},14514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var r=n(64024),i=n(5729),a=n(35079);t.buffer=function(e){return r.operate((function(t,n){var r=[];return t.subscribe(a.createOperatorSubscriber(n,(function(e){return r.push(e)}),(function(){n.next(r),n.complete()}))),e.subscribe(a.createOperatorSubscriber(n,(function(){var e=r;r=[],n.next(e)}),i.noop)),function(){r=null}}))}},22537:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=n(64024),a=n(35079),o=n(32447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(n,i){var s=[],p=0;n.subscribe(a.createOperatorSubscriber(i,(function(n){var a,c,u,l,d=null;p++%t==0&&s.push([]);try{for(var f=r(s),h=f.next();!h.done;h=f.next())(y=h.value).push(n),e<=y.length&&(d=null!=d?d:[]).push(y)}catch(e){a={error:e}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}if(d)try{for(var m=r(d),v=m.next();!v.done;v=m.next()){var y=v.value;o.arrRemove(s,y),i.next(y)}}catch(e){u={error:e}}finally{try{v&&!v.done&&(l=m.return)&&l.call(m)}finally{if(u)throw u.error}}}),(function(){var e,t;try{for(var n=r(s),a=n.next();!a.done;a=n.next()){var o=a.value;i.next(o)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){s=null})))}))}},88720:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=n(7215),a=n(64024),o=n(35079),s=n(32447),p=n(34617),c=n(92619),u=n(35421);t.bufferTime=function(e){for(var t,n,l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];var f=null!==(t=c.popScheduler(l))&&void 0!==t?t:p.asyncScheduler,h=null!==(n=l[0])&&void 0!==n?n:null,m=l[1]||1/0;return a.operate((function(t,n){var a=[],p=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),s.arrRemove(a,e),n.next(t),p&&l()},l=function(){if(a){var t=new i.Subscription;n.add(t);var r={buffer:[],subs:t};a.push(r),u.executeSchedule(t,f,(function(){return c(r)}),e)}};null!==h&&h>=0?u.executeSchedule(n,f,l,h,!0):p=!0,l();var d=o.createOperatorSubscriber(n,(function(e){var t,n,i=a.slice();try{for(var o=r(i),s=o.next();!s.done;s=o.next()){var p=s.value,u=p.buffer;u.push(e),m<=u.length&&c(p)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}),(function(){for(;null==a?void 0:a.length;)n.next(a.shift().buffer);null==d||d.unsubscribe(),n.complete(),n.unsubscribe()}),void 0,(function(){return a=null}));t.subscribe(d)}))}},67932:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=n(7215),a=n(64024),o=n(9451),s=n(35079),p=n(5729),c=n(32447);t.bufferToggle=function(e,t){return a.operate((function(n,a){var u=[];o.innerFrom(e).subscribe(s.createOperatorSubscriber(a,(function(e){var n=[];u.push(n);var r=new i.Subscription;r.add(o.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(a,(function(){c.arrRemove(u,n),a.next(n),r.unsubscribe()}),p.noop)))}),p.noop)),n.subscribe(s.createOperatorSubscriber(a,(function(e){var t,n;try{for(var i=r(u),a=i.next();!a.done;a=i.next())a.value.push(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),(function(){for(;u.length>0;)a.next(u.shift());a.complete()})))}))}},41445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var r=n(64024),i=n(5729),a=n(35079),o=n(9451);t.bufferWhen=function(e){return r.operate((function(t,n){var r=null,s=null,p=function(){null==s||s.unsubscribe();var t=r;r=[],t&&n.next(t),o.innerFrom(e()).subscribe(s=a.createOperatorSubscriber(n,p,i.noop))};p(),t.subscribe(a.createOperatorSubscriber(n,(function(e){return null==r?void 0:r.push(e)}),(function(){r&&n.next(r),n.complete()}),void 0,(function(){return r=s=null})))}))}},64418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var r=n(9451),i=n(35079),a=n(64024);t.catchError=function e(t){return a.operate((function(n,a){var o,s=null,p=!1;s=n.subscribe(i.createOperatorSubscriber(a,void 0,void 0,(function(i){o=r.innerFrom(t(i,e(t)(n))),s?(s.unsubscribe(),s=null,o.subscribe(a)):p=!0}))),p&&(s.unsubscribe(),s=null,o.subscribe(a))}))}},84163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var r=n(79893);t.combineAll=r.combineLatestAll},48169:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var a=n(21047),o=n(64024),s=n(64475),p=n(74666),c=n(25966),u=n(92619);t.combineLatest=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var l=u.popResultSelector(t);return l?c.pipe(e.apply(void 0,i([],r(t))),p.mapOneOrManyArgs(l)):o.operate((function(e,n){a.combineLatestInit(i([e],r(s.argsOrArgArray(t))))(n)}))}},79893:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var r=n(21047),i=n(87534);t.combineLatestAll=function(e){return i.joinAllInternals(r.combineLatest,e)}},27230:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var a=n(48169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.combineLatest.apply(void 0,i([],r(e)))}},84098:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var a=n(64024),o=n(44554),s=n(92619),p=n(76216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=s.popScheduler(e);return a.operate((function(t,a){o.concatAll()(p.from(i([t],r(e)),n)).subscribe(a)}))}},44554:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var r=n(64594);t.concatAll=function(){return r.mergeAll(1)}},21048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var r=n(99010),i=n(64432);t.concatMap=function(e,t){return i.isFunction(t)?r.mergeMap(e,t,1):r.mergeMap(e,1)}},50381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var r=n(21048),i=n(64432);t.concatMapTo=function(e,t){return i.isFunction(t)?r.concatMap((function(){return e}),t):r.concatMap((function(){return e}))}},84724:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var a=n(84098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.concat.apply(void 0,i([],r(e)))}},64347:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var r=n(59520),i=n(9451),a=n(64024),o=n(52160),s={connector:function(){return new r.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var n=t.connector;return a.operate((function(t,r){var a=n();i.innerFrom(e(o.fromSubscribable(a))).subscribe(r),r.add(t.subscribe(a))}))}},56944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var r=n(61386);t.count=function(e){return r.reduce((function(t,n,r){return!e||e(n,r)?t+1:t}),0)}},40440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var r=n(64024),i=n(5729),a=n(35079),o=n(9451);t.debounce=function(e){return r.operate((function(t,n){var r=!1,s=null,p=null,c=function(){if(null==p||p.unsubscribe(),p=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(a.createOperatorSubscriber(n,(function(t){null==p||p.unsubscribe(),r=!0,s=t,p=a.createOperatorSubscriber(n,c,i.noop),o.innerFrom(e(t)).subscribe(p)}),(function(){c(),n.complete()}),void 0,(function(){s=p=null})))}))}},58157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var r=n(34617),i=n(64024),a=n(35079);t.debounceTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.operate((function(n,r){var i=null,o=null,s=null,p=function(){if(i){i.unsubscribe(),i=null;var e=o;o=null,r.next(e)}};function c(){var n=s+e,a=t.now();if(a<n)return i=this.schedule(void 0,n-a),void r.add(i);p()}n.subscribe(a.createOperatorSubscriber(r,(function(n){o=n,s=t.now(),i||(i=t.schedule(c,e),r.add(i))}),(function(){p(),r.complete()}),void 0,(function(){o=i=null})))}))}},11714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var r=n(64024),i=n(35079);t.defaultIfEmpty=function(e){return r.operate((function(t,n){var r=!1;t.subscribe(i.createOperatorSubscriber(n,(function(e){r=!0,n.next(e)}),(function(){r||n.next(e),n.complete()})))}))}},31030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var r=n(34617),i=n(16405),a=n(55710);t.delay=function(e,t){void 0===t&&(t=r.asyncScheduler);var n=a.timer(e,t);return i.delayWhen((function(){return n}))}},16405:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var r=n(60079),i=n(17138),a=n(13470),o=n(24791),s=n(99010);t.delayWhen=function e(t,n){return n?function(o){return r.concat(n.pipe(i.take(1),a.ignoreElements()),o.pipe(e(t)))}:s.mergeMap((function(e,n){return t(e,n).pipe(i.take(1),o.mapTo(e))}))}},9142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var r=n(93868),i=n(64024),a=n(35079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(a.createOperatorSubscriber(t,(function(e){return r.observeNotification(e,t)})))}))}},42307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var r=n(64024),i=n(35079),a=n(5729);t.distinct=function(e,t){return r.operate((function(n,r){var o=new Set;n.subscribe(i.createOperatorSubscriber(r,(function(t){var n=e?e(t):t;o.has(n)||(o.add(n),r.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(r,(function(){return o.clear()}),a.noop))}))}},49131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var r=n(69144),i=n(64024),a=n(35079);function o(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=r.identity),e=null!=e?e:o,i.operate((function(n,r){var i,o=!0;n.subscribe(a.createOperatorSubscriber(r,(function(n){var a=t(n);!o&&e(i,a)||(o=!1,i=a,r.next(n))})))}))}},76659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var r=n(49131);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}},54217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var r=n(56809),i=n(72763),a=n(48062),o=n(11714),s=n(17138);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(p){return p.pipe(i.filter((function(t,n){return n===e})),s.take(1),n?o.defaultIfEmpty(t):a.throwIfEmpty((function(){return new r.ArgumentOutOfRangeError})))}}},24707:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var a=n(60079),o=n(77443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return a.concat(t,o.of.apply(void 0,i([],r(e))))}}},89276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var r=n(64024),i=n(35079);t.every=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(i){e.call(t,i,a++,n)||(r.next(!1),r.complete())}),(function(){r.next(!0),r.complete()})))}))}},337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var r=n(93977);t.exhaust=r.exhaustAll},93977:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var r=n(40368),i=n(69144);t.exhaustAll=function(){return r.exhaustMap(i.identity)}},40368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var r=n(14338),i=n(9451),a=n(64024),o=n(35079);t.exhaustMap=function e(t,n){return n?function(a){return a.pipe(e((function(e,a){return i.innerFrom(t(e,a)).pipe(r.map((function(t,r){return n(e,t,a,r)})))})))}:a.operate((function(e,n){var r=0,a=null,s=!1;e.subscribe(o.createOperatorSubscriber(n,(function(e){a||(a=o.createOperatorSubscriber(n,void 0,(function(){a=null,s&&n.complete()})),i.innerFrom(t(e,r++)).subscribe(a))}),(function(){s=!0,!a&&n.complete()})))}))}},47829:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var r=n(64024),i=n(67163);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,r.operate((function(r,a){return i.mergeInternals(r,a,e,t,void 0,!0,n)}))}},72763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var r=n(64024),i=n(35079);t.filter=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){return e.call(t,n,a++)&&r.next(n)})))}))}},44106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var r=n(64024);t.finalize=function(e){return r.operate((function(t,n){try{t.subscribe(n)}finally{n.add(e)}}))}},68759:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var r=n(64024),i=n(35079);function a(e,t,n){var r="index"===n;return function(n,a){var o=0;n.subscribe(i.createOperatorSubscriber(a,(function(i){var s=o++;e.call(t,i,s,n)&&(a.next(r?s:i),a.complete())}),(function(){a.next(r?-1:void 0),a.complete()})))}}t.find=function(e,t){return r.operate(a(e,t,"value"))},t.createFind=a},23999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var r=n(64024),i=n(68759);t.findIndex=function(e,t){return r.operate(i.createFind(e,t,"index"))}},55194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var r=n(68032),i=n(72763),a=n(17138),o=n(11714),s=n(48062),p=n(69144);t.first=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,n){return e(t,n,c)})):p.identity,a.take(1),n?o.defaultIfEmpty(t):s.throwIfEmpty((function(){return new r.EmptyError})))}}},92735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var r=n(99010);t.flatMap=r.mergeMap},21664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var r=n(75271),i=n(9451),a=n(59520),o=n(64024),s=n(35079);t.groupBy=function(e,t,n,p){return o.operate((function(o,c){var u;t&&"function"!=typeof t?(n=t.duration,u=t.element,p=t.connector):u=t;var l=new Map,d=function(e){l.forEach(e),e(c)},f=function(e){return d((function(t){return t.error(e)}))},h=0,m=!1,v=new s.OperatorSubscriber(c,(function(t){try{var o=e(t),d=l.get(o);if(!d){l.set(o,d=p?p():new a.Subject);var y=(g=o,w=d,(_=new r.Observable((function(e){h++;var t=w.subscribe(e);return function(){t.unsubscribe(),0==--h&&m&&v.unsubscribe()}}))).key=g,_);if(c.next(y),n){var b=s.createOperatorSubscriber(d,(function(){d.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return l.delete(o)}));v.add(i.innerFrom(n(y)).subscribe(b))}}d.next(u?u(t):t)}catch(e){f(e)}var g,w,_}),(function(){return d((function(e){return e.complete()}))}),f,(function(){return l.clear()}),(function(){return m=!0,0===h}));o.subscribe(v)}))}},13470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var r=n(64024),i=n(35079),a=n(5729);t.ignoreElements=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,a.noop))}))}},49549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var r=n(64024),i=n(35079);t.isEmpty=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},87534:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var r=n(69144),i=n(74666),a=n(25966),o=n(99010),s=n(12378);t.joinAllInternals=function(e,t){return a.pipe(s.toArray(),o.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):r.identity)}},79582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var r=n(68032),i=n(72763),a=n(24288),o=n(48062),s=n(11714),p=n(69144);t.last=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,n){return e(t,n,c)})):p.identity,a.takeLast(1),n?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new r.EmptyError})))}}},14338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var r=n(64024),i=n(35079);t.map=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){r.next(e.call(t,n,a++))})))}))}},24791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var r=n(14338);t.mapTo=function(e){return r.map((function(){return e}))}},49318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var r=n(93868),i=n(64024),a=n(35079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(a.createOperatorSubscriber(t,(function(e){t.next(r.Notification.createNext(e))}),(function(){t.next(r.Notification.createComplete()),t.complete()}),(function(e){t.next(r.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var r=n(61386),i=n(64432);t.max=function(e){return r.reduce(i.isFunction(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},86094:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var a=n(64024),o=n(64475),s=n(64594),p=n(92619),c=n(76216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=p.popScheduler(e),u=p.popNumber(e,1/0);return e=o.argsOrArgArray(e),a.operate((function(t,a){s.mergeAll(u)(c.from(i([t],r(e)),n)).subscribe(a)}))}},64594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var r=n(99010),i=n(69144);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(i.identity,e)}},67163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var r=n(9451),i=n(35421),a=n(35079);t.mergeInternals=function(e,t,n,o,s,p,c,u){var l=[],d=0,f=0,h=!1,m=function(){!h||l.length||d||t.complete()},v=function(e){return d<o?y(e):l.push(e)},y=function(e){p&&t.next(e),d++;var u=!1;r.innerFrom(n(e,f++)).subscribe(a.createOperatorSubscriber(t,(function(e){null==s||s(e),p?v(e):t.next(e)}),(function(){u=!0}),void 0,(function(){if(u)try{d--;for(var e=function(){var e=l.shift();c?i.executeSchedule(t,c,(function(){return y(e)})):y(e)};l.length&&d<o;)e();m()}catch(e){t.error(e)}})))};return e.subscribe(a.createOperatorSubscriber(t,v,(function(){h=!0,m()}))),function(){null==u||u()}}},99010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var r=n(14338),i=n(9451),a=n(64024),o=n(67163),s=n(64432);t.mergeMap=function e(t,n,p){return void 0===p&&(p=1/0),s.isFunction(n)?e((function(e,a){return r.map((function(t,r){return n(e,t,a,r)}))(i.innerFrom(t(e,a)))}),p):("number"==typeof n&&(p=n),a.operate((function(e,n){return o.mergeInternals(e,n,t,p)})))}},38983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var r=n(99010),i=n(64432);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=1/0),i.isFunction(t)?r.mergeMap((function(){return e}),t,n):("number"==typeof t&&(n=t),r.mergeMap((function(){return e}),n))}},72170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var r=n(64024),i=n(67163);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),r.operate((function(r,a){var o=t;return i.mergeInternals(r,a,(function(t,n){return e(o,t,n)}),n,(function(e){o=e}),!1,void 0,(function(){return o=null}))}))}},43674:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var a=n(86094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.merge.apply(void 0,i([],r(e)))}},91446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var r=n(61386),i=n(64432);t.min=function(e){return r.reduce(i.isFunction(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}},72318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var r=n(93739),i=n(64432),a=n(64347);t.multicast=function(e,t){var n=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?a.connect(t,{connector:n}):function(e){return new r.ConnectableObservable(e,n)}}},23165:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var r=n(35421),i=n(64024),a=n(35079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(n,i){n.subscribe(a.createOperatorSubscriber(i,(function(n){return r.executeSchedule(i,e,(function(){return i.next(n)}),t)}),(function(){return r.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(n){return r.executeSchedule(i,e,(function(){return i.error(n)}),t)})))}))}},64764:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var a=n(64024),o=n(9451),s=n(64475),p=n(35079),c=n(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=s.argsOrArgArray(e);return a.operate((function(e,t){var a=i([e],r(n)),s=function(){if(!t.closed)if(a.length>0){var e=void 0;try{e=o.innerFrom(a.shift())}catch(e){return void s()}var n=p.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(n),n.add(s)}else t.complete()};s()}))}},10402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var r=n(64024),i=n(35079);t.pairwise=function(){return r.operate((function(e,t){var n,r=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=n;n=e,r&&t.next([i,e]),r=!0})))}))}},85960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(91574),i=n(72763);t.partition=function(e,t){return function(n){return[i.filter(e,t)(n),i.filter(r.not(e,t))(n)]}}},85658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var r=n(14338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return r.map((function(t){for(var r=t,i=0;i<n;i++){var a=null==r?void 0:r[e[i]];if(void 0===a)return;r=a}return r}))}},23881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var r=n(59520),i=n(72318),a=n(64347);t.publish=function(e){return e?function(t){return a.connect(e)(t)}:function(e){return i.multicast(new r.Subject)(e)}}},41755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var r=n(58042),i=n(93739);t.publishBehavior=function(e){return function(t){var n=new r.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return n}))}}},99801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var r=n(67257),i=n(93739);t.publishLast=function(){return function(e){var t=new r.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},65021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var r=n(30216),i=n(72318),a=n(64432);t.publishReplay=function(e,t,n,o){n&&!a.isFunction(n)&&(o=n);var s=a.isFunction(n)?n:void 0;return function(n){return i.multicast(new r.ReplaySubject(e,t,o),s)(n)}}},62749:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var a=n(64475),o=n(39925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.raceWith.apply(void 0,i([],r(a.argsOrArgArray(e))))}},39925:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var a=n(7779),o=n(64024),s=n(69144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?o.operate((function(t,n){a.raceInit(i([t],r(e)))(n)})):s.identity}},61386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var r=n(42181),i=n(64024);t.reduce=function(e,t){return i.operate(r.scanInternals(e,t,arguments.length>=2,!1,!0))}},72711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var r=n(64024),i=n(35079);t.refCount=function(){return r.operate((function(e,t){var n=null;e._refCount++;var r=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var r=e._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),t.unsubscribe()}}));e.subscribe(r),r.closed||(n=e.connect())}))}},51194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var r=n(51727),i=n(64024),a=n(35079),o=n(9451),s=n(55710);t.repeat=function(e){var t,n,p=1/0;return null!=e&&("object"==typeof e?(t=e.count,p=void 0===t?1/0:t,n=e.delay):p=e),p<=0?function(){return r.EMPTY}:i.operate((function(e,t){var r,i=0,c=function(){if(null==r||r.unsubscribe(),r=null,null!=n){var e="number"==typeof n?s.timer(n):o.innerFrom(n(i)),p=a.createOperatorSubscriber(t,(function(){p.unsubscribe(),u()}));e.subscribe(p)}else u()},u=function(){var n=!1;r=e.subscribe(a.createOperatorSubscriber(t,void 0,(function(){++i<p?r?c():n=!0:t.complete()}))),n&&c()};u()}))}},47085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var r=n(59520),i=n(64024),a=n(35079);t.repeatWhen=function(e){return i.operate((function(t,n){var i,o,s=!1,p=!1,c=!1,u=function(){return c&&p&&(n.complete(),!0)},l=function(){c=!1,i=t.subscribe(a.createOperatorSubscriber(n,void 0,(function(){c=!0,!u()&&(o||(o=new r.Subject,e(o).subscribe(a.createOperatorSubscriber(n,(function(){i?l():s=!0}),(function(){p=!0,u()})))),o).next()}))),s&&(i.unsubscribe(),i=null,s=!1,l())};l()}))}},67524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var r=n(64024),i=n(35079),a=n(69144),o=n(55710),s=n(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var n=(t=e&&"object"==typeof e?e:{count:e}).count,p=void 0===n?1/0:n,c=t.delay,u=t.resetOnSuccess,l=void 0!==u&&u;return p<=0?a.identity:r.operate((function(e,t){var n,r=0,a=function(){var u=!1;n=e.subscribe(i.createOperatorSubscriber(t,(function(e){l&&(r=0),t.next(e)}),void 0,(function(e){if(r++<p){var l=function(){n?(n.unsubscribe(),n=null,a()):u=!0};if(null!=c){var d="number"==typeof c?o.timer(c):s.innerFrom(c(e,r)),f=i.createOperatorSubscriber(t,(function(){f.unsubscribe(),l()}),(function(){t.complete()}));d.subscribe(f)}else l()}else t.error(e)}))),u&&(n.unsubscribe(),n=null,a())};a()}))}},548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var r=n(59520),i=n(64024),a=n(35079);t.retryWhen=function(e){return i.operate((function(t,n){var i,o,s=!1,p=function(){i=t.subscribe(a.createOperatorSubscriber(n,void 0,void 0,(function(t){o||(o=new r.Subject,e(o).subscribe(a.createOperatorSubscriber(n,(function(){return i?p():s=!0})))),o&&o.next(t)}))),s&&(i.unsubscribe(),i=null,s=!1,p())};p()}))}},76577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var r=n(64024),i=n(5729),a=n(35079);t.sample=function(e){return r.operate((function(t,n){var r=!1,o=null;t.subscribe(a.createOperatorSubscriber(n,(function(e){r=!0,o=e}))),e.subscribe(a.createOperatorSubscriber(n,(function(){if(r){r=!1;var e=o;o=null,n.next(e)}}),i.noop))}))}},43815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var r=n(34617),i=n(76577),a=n(24449);t.sampleTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.sample(a.interval(e,t))}},97250:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var r=n(64024),i=n(42181);t.scan=function(e,t){return r.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},42181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var r=n(35079);t.scanInternals=function(e,t,n,i,a){return function(o,s){var p=n,c=t,u=0;o.subscribe(r.createOperatorSubscriber(s,(function(t){var n=u++;c=p?e(c,t,n):(p=!0,t),i&&s.next(c)}),a&&function(){p&&s.next(c),s.complete()}))}}},20842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var r=n(64024),i=n(35079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),r.operate((function(n,r){var a={buffer:[],complete:!1},o={buffer:[],complete:!1},s=function(e){r.next(e),r.complete()},p=function(e,n){var a=i.createOperatorSubscriber(r,(function(r){var i=n.buffer,a=n.complete;0===i.length?a?s(!1):e.buffer.push(r):!t(r,i.shift())&&s(!1)}),(function(){e.complete=!0;var t=n.complete,r=n.buffer;t&&s(0===r.length),null==a||a.unsubscribe()}));return a};n.subscribe(p(a,o)),e.subscribe(p(o,a))}))}},69728:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var a=n(9451),o=n(59520),s=n(11403),p=n(64024);function c(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];if(!0!==t){if(!1!==t){var o=new s.SafeSubscriber({next:function(){o.unsubscribe(),e()}});return t.apply(void 0,i([],r(n))).subscribe(o)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new o.Subject}:t,r=e.resetOnError,i=void 0===r||r,u=e.resetOnComplete,l=void 0===u||u,d=e.resetOnRefCountZero,f=void 0===d||d;return function(e){var t,r,o,u=0,d=!1,h=!1,m=function(){null==r||r.unsubscribe(),r=void 0},v=function(){m(),t=o=void 0,d=h=!1},y=function(){var e=t;v(),null==e||e.unsubscribe()};return p.operate((function(e,p){u++,h||d||m();var b=o=null!=o?o:n();p.add((function(){0!=--u||h||d||(r=c(y,f))})),b.subscribe(p),!t&&u>0&&(t=new s.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,m(),r=c(v,i,e),b.error(e)},complete:function(){d=!0,m(),r=c(v,l),b.complete()}}),a.innerFrom(e).subscribe(t))}))(e)}}},97234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var r=n(30216),i=n(69728);t.shareReplay=function(e,t,n){var a,o,s,p,c=!1;return e&&"object"==typeof e?(a=e.bufferSize,p=void 0===a?1/0:a,o=e.windowTime,t=void 0===o?1/0:o,c=void 0!==(s=e.refCount)&&s,n=e.scheduler):p=null!=e?e:1/0,i.share({connector:function(){return new r.ReplaySubject(p,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},22445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var r=n(68032),i=n(56228),a=n(91137),o=n(64024),s=n(35079);t.single=function(e){return o.operate((function(t,n){var o,p=!1,c=!1,u=0;t.subscribe(s.createOperatorSubscriber(n,(function(r){c=!0,e&&!e(r,u++,t)||(p&&n.error(new i.SequenceError("Too many matching values")),p=!0,o=r)}),(function(){p?(n.next(o),n.complete()):n.error(c?new a.NotFoundError("No matching values"):new r.EmptyError)})))}))}},56262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var r=n(72763);t.skip=function(e){return r.filter((function(t,n){return e<=n}))}},17397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var r=n(69144),i=n(64024),a=n(35079);t.skipLast=function(e){return e<=0?r.identity:i.operate((function(t,n){var r=new Array(e),i=0;return t.subscribe(a.createOperatorSubscriber(n,(function(t){var a=i++;if(a<e)r[a]=t;else{var o=a%e,s=r[o];r[o]=t,n.next(s)}}))),function(){r=null}}))}},9900:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var r=n(64024),i=n(35079),a=n(9451),o=n(5729);t.skipUntil=function(e){return r.operate((function(t,n){var r=!1,s=i.createOperatorSubscriber(n,(function(){null==s||s.unsubscribe(),r=!0}),o.noop);a.innerFrom(e).subscribe(s),t.subscribe(i.createOperatorSubscriber(n,(function(e){return r&&n.next(e)})))}))}},1620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var r=n(64024),i=n(35079);t.skipWhile=function(e){return r.operate((function(t,n){var r=!1,a=0;t.subscribe(i.createOperatorSubscriber(n,(function(t){return(r||(r=!e(t,a++)))&&n.next(t)})))}))}},13424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var r=n(60079),i=n(92619),a=n(64024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=i.popScheduler(e);return a.operate((function(t,i){(n?r.concat(e,t,n):r.concat(e,t)).subscribe(i)}))}},80831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var r=n(64024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),r.operate((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}},90411:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var r=n(97222),i=n(69144);t.switchAll=function(){return r.switchMap(i.identity)}},97222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var r=n(9451),i=n(64024),a=n(35079);t.switchMap=function(e,t){return i.operate((function(n,i){var o=null,s=0,p=!1,c=function(){return p&&!o&&i.complete()};n.subscribe(a.createOperatorSubscriber(i,(function(n){null==o||o.unsubscribe();var p=0,u=s++;r.innerFrom(e(n,u)).subscribe(o=a.createOperatorSubscriber(i,(function(e){return i.next(t?t(n,e,u,p++):e)}),(function(){o=null,c()})))}),(function(){p=!0,c()})))}))}},46464:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var r=n(97222),i=n(64432);t.switchMapTo=function(e,t){return i.isFunction(t)?r.switchMap((function(){return e}),t):r.switchMap((function(){return e}))}},74434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var r=n(97222),i=n(64024);t.switchScan=function(e,t){return i.operate((function(n,i){var a=t;return r.switchMap((function(t,n){return e(a,t,n)}),(function(e,t){return a=t,t}))(n).subscribe(i),function(){a=null}}))}},17138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var r=n(51727),i=n(64024),a=n(35079);t.take=function(e){return e<=0?function(){return r.EMPTY}:i.operate((function(t,n){var r=0;t.subscribe(a.createOperatorSubscriber(n,(function(t){++r<=e&&(n.next(t),e<=r&&n.complete())})))}))}},24288:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=n(51727),a=n(64024),o=n(35079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:a.operate((function(t,n){var i=[];t.subscribe(o.createOperatorSubscriber(n,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var a=r(i),o=a.next();!o.done;o=a.next()){var s=o.value;n.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}n.complete()}),void 0,(function(){i=null})))}))}},97341:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var r=n(64024),i=n(35079),a=n(9451),o=n(5729);t.takeUntil=function(e){return r.operate((function(t,n){a.innerFrom(e).subscribe(i.createOperatorSubscriber(n,(function(){return n.complete()}),o.noop)),!n.closed&&t.subscribe(n)}))}},60653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var r=n(64024),i=n(35079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){var i=e(n,a++);(i||t)&&r.next(n),!i&&r.complete()})))}))}},38668:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var r=n(64432),i=n(64024),a=n(35079),o=n(69144);t.tap=function(e,t,n){var s=r.isFunction(e)||t||n?{next:e,error:t,complete:n}:e;return s?i.operate((function(e,t){var n;null===(n=s.subscribe)||void 0===n||n.call(s);var r=!0;e.subscribe(a.createOperatorSubscriber(t,(function(e){var n;null===(n=s.next)||void 0===n||n.call(s,e),t.next(e)}),(function(){var e;r=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()}),(function(e){var n;r=!1,null===(n=s.error)||void 0===n||n.call(s,e),t.error(e)}),(function(){var e,t;r&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)})))})):o.identity}},69466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var r=n(64024),i=n(35079),a=n(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),r.operate((function(t,r){var o=n.leading,s=n.trailing,p=!1,c=null,u=null,l=!1,d=function(){null==u||u.unsubscribe(),u=null,s&&(m(),l&&r.complete())},f=function(){u=null,l&&r.complete()},h=function(t){return u=a.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(r,d,f))},m=function(){if(p){p=!1;var e=c;c=null,r.next(e),!l&&h(e)}};t.subscribe(i.createOperatorSubscriber(r,(function(e){p=!0,c=e,(!u||u.closed)&&(o?m():h(e))}),(function(){l=!0,(!(s&&p&&u)||u.closed)&&r.complete()})))}))}},99705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var r=n(34617),i=n(69466),a=n(55710);t.throttleTime=function(e,t,n){void 0===t&&(t=r.asyncScheduler),void 0===n&&(n=i.defaultThrottleConfig);var o=a.timer(e,t);return i.throttle((function(){return o}),n)}},48062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var r=n(68032),i=n(64024),a=n(35079);function o(){return new r.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=o),i.operate((function(t,n){var r=!1;t.subscribe(a.createOperatorSubscriber(n,(function(e){r=!0,n.next(e)}),(function(){return r?n.complete():n.error(e())})))}))}},76610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var r=n(34617),i=n(64024),a=n(35079);t.timeInterval=function(e){return void 0===e&&(e=r.asyncScheduler),i.operate((function(t,n){var r=e.now();t.subscribe(a.createOperatorSubscriber(n,(function(t){var i=e.now(),a=i-r;r=i,n.next(new o(t,a))})))}))};var o=function(e,t){this.value=e,this.interval=t};t.TimeInterval=o},26279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var r=n(34617),i=n(47761),a=n(64024),o=n(9451),s=n(49876),p=n(35079),c=n(35421);function u(e){throw new t.TimeoutError(e)}t.TimeoutError=s.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var n=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,s=n.first,l=n.each,d=n.with,f=void 0===d?u:d,h=n.scheduler,m=void 0===h?null!=t?t:r.asyncScheduler:h,v=n.meta,y=void 0===v?null:v;if(null==s&&null==l)throw new TypeError("No timeout provided.");return a.operate((function(e,t){var n,r,i=null,a=0,u=function(e){r=c.executeSchedule(t,m,(function(){try{n.unsubscribe(),o.innerFrom(f({meta:y,lastValue:i,seen:a})).subscribe(t)}catch(e){t.error(e)}}),e)};n=e.subscribe(p.createOperatorSubscriber(t,(function(e){null==r||r.unsubscribe(),a++,t.next(i=e),l>0&&u(l)}),void 0,void 0,(function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),i=null}))),!a&&u(null!=s?"number"==typeof s?s:+s-m.now():l)}))}},28132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var r=n(34617),i=n(47761),a=n(26279);t.timeoutWith=function(e,t,n){var o,s,p;if(n=null!=n?n:r.async,i.isValidDate(e)?o=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(p=function(){return t},null==o&&null==s)throw new TypeError("No timeout provided.");return a.timeout({first:o,each:s,scheduler:n,with:p})}},74553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var r=n(11713),i=n(14338);t.timestamp=function(e){return void 0===e&&(e=r.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},12378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var r=n(61386),i=n(64024),a=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){r.reduce(a,[])(e).subscribe(t)}))}},24768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var r=n(59520),i=n(64024),a=n(35079),o=n(5729);t.window=function(e){return i.operate((function(t,n){var i=new r.Subject;n.next(i.asObservable());var s=function(e){i.error(e),n.error(e)};return t.subscribe(a.createOperatorSubscriber(n,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),n.complete()}),s)),e.subscribe(a.createOperatorSubscriber(n,(function(){i.complete(),n.next(i=new r.Subject)}),o.noop,s)),function(){null==i||i.unsubscribe(),i=null}}))}},10131:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=n(59520),a=n(64024),o=n(35079);t.windowCount=function(e,t){void 0===t&&(t=0);var n=t>0?t:e;return a.operate((function(t,a){var s=[new i.Subject],p=0;a.next(s[0].asObservable()),t.subscribe(o.createOperatorSubscriber(a,(function(t){var o,c;try{for(var u=r(s),l=u.next();!l.done;l=u.next())l.value.next(t)}catch(e){o={error:e}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(o)throw o.error}}var d=p-e+1;if(d>=0&&d%n==0&&s.shift().complete(),++p%n==0){var f=new i.Subject;s.push(f),a.next(f.asObservable())}}),(function(){for(;s.length>0;)s.shift().complete();a.complete()}),(function(e){for(;s.length>0;)s.shift().error(e);a.error(e)}),(function(){s=null})))}))}},29579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var r=n(59520),i=n(34617),a=n(7215),o=n(64024),s=n(35079),p=n(32447),c=n(92619),u=n(35421);t.windowTime=function(e){for(var t,n,l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];var f=null!==(t=c.popScheduler(l))&&void 0!==t?t:i.asyncScheduler,h=null!==(n=l[0])&&void 0!==n?n:null,m=l[1]||1/0;return o.operate((function(t,n){var i=[],o=!1,c=function(e){var t=e.window,n=e.subs;t.complete(),n.unsubscribe(),p.arrRemove(i,e),o&&l()},l=function(){if(i){var t=new a.Subscription;n.add(t);var o=new r.Subject,s={window:o,subs:t,seen:0};i.push(s),n.next(o.asObservable()),u.executeSchedule(t,f,(function(){return c(s)}),e)}};null!==h&&h>=0?u.executeSchedule(n,f,l,h,!0):o=!0,l();var d=function(e){return i.slice().forEach(e)},v=function(e){d((function(t){var n=t.window;return e(n)})),e(n),n.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(n,(function(e){d((function(t){t.window.next(e),m<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},10752:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=n(59520),a=n(7215),o=n(64024),s=n(9451),p=n(35079),c=n(5729),u=n(32447);t.windowToggle=function(e,t){return o.operate((function(n,o){var l=[],d=function(e){for(;0<l.length;)l.shift().error(e);o.error(e)};s.innerFrom(e).subscribe(p.createOperatorSubscriber(o,(function(e){var n=new i.Subject;l.push(n);var r,f=new a.Subscription;try{r=s.innerFrom(t(e))}catch(e){return void d(e)}o.next(n.asObservable()),f.add(r.subscribe(p.createOperatorSubscriber(o,(function(){u.arrRemove(l,n),n.complete(),f.unsubscribe()}),c.noop,d)))}),c.noop)),n.subscribe(p.createOperatorSubscriber(o,(function(e){var t,n,i=l.slice();try{for(var a=r(i),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}),(function(){for(;0<l.length;)l.shift().complete();o.complete()}),d,(function(){for(;0<l.length;)l.shift().unsubscribe()})))}))}},582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var r=n(59520),i=n(64024),a=n(35079),o=n(9451);t.windowWhen=function(e){return i.operate((function(t,n){var i,s,p=function(e){i.error(e),n.error(e)},c=function(){var t;null==s||s.unsubscribe(),null==i||i.complete(),i=new r.Subject,n.next(i.asObservable());try{t=o.innerFrom(e())}catch(e){return void p(e)}t.subscribe(s=a.createOperatorSubscriber(n,c,c,p))};c(),t.subscribe(a.createOperatorSubscriber(n,(function(e){return i.next(e)}),(function(){i.complete(),n.complete()}),p,(function(){null==s||s.unsubscribe(),i=null})))}))}},44255:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var a=n(64024),o=n(35079),s=n(9451),p=n(69144),c=n(5729),u=n(92619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u.popResultSelector(e);return a.operate((function(t,a){for(var u=e.length,l=new Array(u),d=e.map((function(){return!1})),f=!1,h=function(t){s.innerFrom(e[t]).subscribe(o.createOperatorSubscriber(a,(function(e){l[t]=e,f||d[t]||(d[t]=!0,(f=d.every(p.identity))&&(d=null))}),c.noop))},m=0;m<u;m++)h(m);t.subscribe(o.createOperatorSubscriber(a,(function(e){if(f){var t=i([e],r(l));a.next(n?n.apply(void 0,i([],r(t))):t)}})))}))}},63253:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var a=n(2042),o=n(64024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.operate((function(t,n){a.zip.apply(void 0,i([t],r(e))).subscribe(n)}))}},87220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var r=n(2042),i=n(87534);t.zipAll=function(e){return i.joinAllInternals(r.zip,e)}},39287:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var a=n(63253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.zip.apply(void 0,i([],r(e)))}},13584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var r=n(75271);t.scheduleArray=function(e,t){return new r.Observable((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}},11659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var r=n(75271),i=n(35421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable((function(n){i.executeSchedule(n,t,(function(){var r=e[Symbol.asyncIterator]();i.executeSchedule(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}},78840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var r=n(75271),i=n(15686),a=n(64432),o=n(35421);t.scheduleIterable=function(e,t){return new r.Observable((function(n){var r;return o.executeSchedule(n,t,(function(){r=e[i.iterator](),o.executeSchedule(n,t,(function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){return void n.error(e)}i?n.complete():n.next(t)}),0,!0)})),function(){return a.isFunction(null==r?void 0:r.return)&&r.return()}}))}},45704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var r=n(9451),i=n(23165),a=n(80831);t.scheduleObservable=function(e,t){return r.innerFrom(e).pipe(a.subscribeOn(t),i.observeOn(t))}},34644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var r=n(9451),i=n(23165),a=n(80831);t.schedulePromise=function(e,t){return r.innerFrom(e).pipe(a.subscribeOn(t),i.observeOn(t))}},73035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var r=n(11659),i=n(49266);t.scheduleReadableStreamLike=function(e,t){return r.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var r=n(45704),i=n(34644),a=n(13584),o=n(78840),s=n(11659),p=n(3292),c=n(52644),u=n(38219),l=n(6380),d=n(57707),f=n(54883),h=n(49266),m=n(73035);t.scheduled=function(e,t){if(null!=e){if(p.isInteropObservable(e))return r.scheduleObservable(e,t);if(u.isArrayLike(e))return a.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(d.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(l.isIterable(e))return o.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return m.scheduleReadableStreamLike(e,t)}throw f.createInvalidObservableTypeError(e)}},4756:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var a=function(e){function t(t,n){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(7215).Subscription);t.Action=a},45364:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var a=n(41172),o=n(76741),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=o.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,n,r){var i;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==n&&(o.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},t}(a.AsyncAction);t.AnimationFrameAction=s},1834:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(96759).AsyncScheduler);t.AnimationFrameScheduler=a},53761:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var a=n(41172),o=n(6703),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=o.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var i;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==n&&(o.immediateProvider.clearImmediate(n),t._scheduled=void 0)},t}(a.AsyncAction);t.AsapAction=s},81386:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(96759).AsyncScheduler);t.AsapScheduler=a},41172:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var a=n(4756),o=n(79678),s=n(32447),p=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return i(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),o.intervalProvider.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&o.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,s.arrRemove(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(a.Action);t.AsyncAction=p},96759:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var a=n(3980),o=function(e){function t(t,n){void 0===n&&(n=a.Scheduler.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(a.Scheduler);t.AsyncScheduler=o},66354:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var a=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(n(41172).AsyncAction);t.QueueAction=a},13144:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(96759).AsyncScheduler);t.QueueScheduler=a},88847:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var a=n(41172),o=n(7215),s=function(e){function t(t,n){void 0===t&&(t=p),void 0===n&&(n=1/0);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return i(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n(96759).AsyncScheduler);t.VirtualTimeScheduler=s;var p=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return i(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return o.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(a.AsyncAction);t.VirtualAction=p},86192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var r=n(45364),i=n(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(r.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},76741:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var a=n(7215);t.animationFrameProvider={schedule:function(e){var n=requestAnimationFrame,r=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(n=i.requestAnimationFrame,r=i.cancelAnimationFrame);var o=n((function(t){r=void 0,e(t)}));return new a.Subscription((function(){return null==r?void 0:r(o)}))},requestAnimationFrame:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.animationFrameProvider.delegate;return((null==a?void 0:a.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],r(e)))},cancelAnimationFrame:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.animationFrameProvider.delegate;return((null==a?void 0:a.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],r(e)))},delegate:void 0}},64502:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var r=n(53761),i=n(81386);t.asapScheduler=new i.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},34617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var r=n(41172),i=n(96759);t.asyncScheduler=new i.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},11713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var a=n(72534),o=a.Immediate.setImmediate,s=a.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.immediateProvider.delegate;return((null==a?void 0:a.setImmediate)||o).apply(void 0,i([],r(e)))},clearImmediate:function(e){var n=t.immediateProvider.delegate;return((null==n?void 0:n.clearImmediate)||s)(e)},delegate:void 0}},79678:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var s=t.intervalProvider.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,r([e,i],n(a))):setInterval.apply(void 0,r([e,i],n(a)))},clearInterval:function(e){var n=t.intervalProvider.delegate;return((null==n?void 0:n.clearInterval)||clearInterval)(e)},delegate:void 0}},81241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},60326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var r=n(66354),i=n(13144);t.queueScheduler=new i.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},68972:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var s=t.timeoutProvider.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,r([e,i],n(a))):setTimeout.apply(void 0,r([e,i],n(a)))},clearTimeout:function(e){var n=t.timeoutProvider.delegate;return((null==n?void 0:n.clearTimeout)||clearTimeout)(e)},delegate:void 0}},15686:(e,t)=>{"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=n,t.iterator=n()},52138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},89251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var r=n(49876);t.ArgumentOutOfRangeError=r.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},68032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var r=n(49876);t.EmptyError=r.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},72534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var n,r=1,i={};function a(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return i[t]=!0,n||(n=Promise.resolve()),n.then((function(){return a(t)&&e()})),t},clearImmediate:function(e){a(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},91137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var r=n(49876);t.NotFoundError=r.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var r=n(49876);t.ObjectUnsubscribedError=r.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},56228:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var r=n(49876);t.SequenceError=r.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},35463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var r=n(49876);t.UnsubscriptionError=r.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},92619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var r=n(64432),i=n(76551);function a(e){return e[e.length-1]}t.popResultSelector=function(e){return r.isFunction(a(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(a(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof a(e)?e.pop():t}},14744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var n=Array.isArray,r=Object.getPrototypeOf,i=Object.prototype,a=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(n(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&r(s)===i){var o=a(t);return{args:o.map((function(e){return t[e]})),keys:o}}}var s;return{args:e,keys:null}}},64475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var n=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&n(e[0])?e[0]:e}},32447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}},49876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},51589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}},34770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var r=n(83782),i=null;t.errorContext=function(e){if(r.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,a=n.errorThrown,o=n.error;if(i=null,a)throw o}}else e()},t.captureError=function(e){r.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},35421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule((function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!i)return a}},69144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},38219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},57707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var r=n(64432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&r.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},47761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},64432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var r=n(52138),i=n(64432);t.isInteropObservable=function(e){return i.isFunction(e[r.observable])}},6380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var r=n(15686),i=n(64432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[r.iterator])}},31211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var r=n(75271),i=n(64432);t.isObservable=function(e){return!!e&&(e instanceof r.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},52644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var r=n(64432);t.isPromise=function(e){return r.isFunction(null==e?void 0:e.then)}},49266:function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},a=this&&this.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||p(e,t)}))})}function p(e,t){try{(n=a[e](t)).value instanceof i?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function c(e){p("next",e)}function u(e){p("throw",e)}function l(e,t){e(t),o.shift(),o.length&&p(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var o=n(64432);t.readableStreamLikeToAsyncGenerator=function(e){return a(this,arguments,(function(){var t,n,a;return r(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,i(t.read())];case 3:return n=r.sent(),a=n.value,n.done?[4,i(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,i(a)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return o.isFunction(null==e?void 0:e.getReader)}},76551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var r=n(64432);t.isScheduler=function(e){return e&&r.isFunction(e.schedule)}},64024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var r=n(64432);function i(e){return r.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},74666:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var a=n(14338),o=Array.isArray;t.mapOneOrManyArgs=function(e){return a.map((function(t){return function(e,t){return o(t)?e.apply(void 0,i([],r(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},91574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(n,r){return!e.call(t,n,r)}}},25966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var r=n(69144);function i(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},57234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var r=n(83782),i=n(68972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=r.config.onUnhandledError;if(!t)throw e;t(e)}))}},54883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},19978:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var r=n(53533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return r.audit}});var i=n(75188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var a=n(14514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return a.buffer}});var o=n(22537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var s=n(88720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var p=n(67932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return p.bufferToggle}});var c=n(41445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var u=n(64418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return u.catchError}});var l=n(84163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return l.combineAll}});var d=n(79893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var f=n(48169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return f.combineLatest}});var h=n(27230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var m=n(84098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return m.concat}});var v=n(44554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var y=n(21048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var b=n(50381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=n(84724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var w=n(64347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return w.connect}});var _=n(56944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return _.count}});var x=n(40440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return x.debounce}});var D=n(58157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return D.debounceTime}});var O=n(11714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var E=n(31030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return E.delay}});var S=n(16405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return S.delayWhen}});var j=n(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var k=n(42307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return k.distinct}});var T=n(49131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return T.distinctUntilChanged}});var N=n(76659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return N.distinctUntilKeyChanged}});var P=n(54217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return P.elementAt}});var C=n(24707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return C.endWith}});var A=n(89276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return A.every}});var I=n(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return I.exhaust}});var F=n(93977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return F.exhaustAll}});var R=n(40368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return R.exhaustMap}});var M=n(47829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return M.expand}});var $=n(72763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return $.filter}});var B=n(44106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return B.finalize}});var L=n(68759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var V=n(23999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return V.findIndex}});var q=n(55194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return q.first}});var U=n(21664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return U.groupBy}});var z=n(13470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var W=n(49549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return W.isEmpty}});var Q=n(79582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Q.last}});var H=n(14338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return H.map}});var K=n(24791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return K.mapTo}});var G=n(49318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return G.materialize}});var J=n(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return J.max}});var Y=n(86094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Y.merge}});var Z=n(64594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=n(92735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=n(99010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=n(38983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var ne=n(72170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ne.mergeScan}});var re=n(43674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return re.mergeWith}});var ie=n(91446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var ae=n(72318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ae.multicast}});var oe=n(23165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return oe.observeOn}});var se=n(64764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.onErrorResumeNext}});var pe=n(10402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pe.pairwise}});var ce=n(85960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var ue=n(85658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ue.pluck}});var le=n(23881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return le.publish}});var de=n(41755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return de.publishBehavior}});var fe=n(99801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return fe.publishLast}});var he=n(65021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var me=n(62749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return me.race}});var ve=n(39925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var ye=n(61386);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var be=n(51194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=n(47085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var we=n(67524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return we.retry}});var _e=n(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return _e.retryWhen}});var xe=n(72711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return xe.refCount}});var De=n(76577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return De.sample}});var Oe=n(43815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Ee=n(97250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ee.scan}});var Se=n(20842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Se.sequenceEqual}});var je=n(69728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var ke=n(97234);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return ke.shareReplay}});var Te=n(22445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Te.single}});var Ne=n(56262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ne.skip}});var Pe=n(17397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Pe.skipLast}});var Ce=n(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ce.skipUntil}});var Ae=n(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ae.skipWhile}});var Ie=n(13424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ie.startWith}});var Fe=n(80831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Fe.subscribeOn}});var Re=n(90411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Re.switchAll}});var Me=n(97222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Me.switchMap}});var $e=n(46464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return $e.switchMapTo}});var Be=n(74434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Be.switchScan}});var Le=n(17138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Ve=n(24288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ve.takeLast}});var qe=n(97341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return qe.takeUntil}});var Ue=n(60653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ue.takeWhile}});var ze=n(38668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var We=n(69466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return We.throttle}});var Qe=n(99705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Qe.throttleTime}});var He=n(48062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return He.throwIfEmpty}});var Ke=n(76610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Ke.timeInterval}});var Ge=n(26279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ge.timeout}});var Je=n(28132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Je.timeoutWith}});var Ye=n(74553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Ye.timestamp}});var Ze=n(12378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=n(24768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=n(10131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=n(29579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var nt=n(10752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return nt.windowToggle}});var rt=n(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return rt.windowWhen}});var it=n(44255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var at=n(63253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return at.zip}});var ot=n(87220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ot.zipAll}});var st=n(39287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.zipWith}})},73389:(e,t,n)=>{"use strict";const r=n(93267),i=n(6385),a=n(58242),o=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=r(e)).length)return 0;e=e.replace(a()," ");let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=i(r)?2:1)}return t};e.exports=o,e.exports.default=o},93267:(e,t,n)=>{"use strict";const r=n(21865);e.exports=e=>"string"==typeof e?e.replace(r(),""):e},56974:(e,t,n)=>{"use strict";const r=n(22037),i=n(76224),a=n(41875),{env:o}=process;let s;function p(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3;if(a("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const n=s||0;if("dumb"===o.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:n;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:n}a("no-color")||a("no-colors")||a("color=false")||a("color=never")?s=0:(a("color")||a("colors")||a("color=true")||a("color=always"))&&(s=1),"FORCE_COLOR"in o&&(s="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return p(c(e,e&&e.isTTY))},stdout:p(c(!0,i.isatty(1))),stderr:p(c(!0,i.isatty(2)))}},42437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.environment=void 0,t.environment={controlPlaneAppId:"controlplane",defaultBaseUrl:"http://local.squidcloud.io:8000"}},31114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6113),i=n(46239),a=n(97469),o=n(98626),s=n(74587),p=n(60173),c=n(72354),u=n(76995),l=n(42437);global.crypto||(global.crypto=r),(0,i.default)((0,a.hideBin)(process.argv.slice(2))).command("snapshot <appId> <collection>","",(e=>{e.positional("appId",{type:"string"}).positional("collection",{type:"string"})}),(e=>{(0,s.default)(e.baseUrl,e.appId,e.collection).then()})).command("upload <appId> [path]","",(e=>{e.positional("appId",{type:"string"}).positional("path",{type:"string",default:"dist/bundle.zip"}).count("direct").alias("d","direct")}),(e=>{var t;(0,c.default)(null!==(t=e.baseUrl)&&void 0!==t?t:l.environment.defaultBaseUrl,e.appId,e.path,{direct:!!e.direct}).then()})).command("metadata [path]","",(e=>{e.positional("path",{type:"string",default:"dist/index.js"})}),(e=>{(0,o.default)(e.path).then()})).command("init [path]","Creates a new Squid application template project",(e=>{e.positional("path",{type:"string"})}),(e=>{(0,u.default)(e.path).then()})).command("update <appId>","",(e=>{e.positional("path",{type:"string"})}),(e=>{(0,p.default)(e.baseUrl,e.appId).then()})).demandCommand(1).parse()},76995:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(71529),a=n(31511),o=n(65122);t.default=function(e){return r(this,void 0,void 0,(function*(){const t=[new a.SchematicOption("name",e)];yield i.SchematicRunner.execute("application",t),yield(0,o.runInShell)("npm install",e)}))}},98626:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n(this,void 0,void 0,(function*(){}))}},74587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(8731);t.default=function(e,t,n){return r(this,void 0,void 0,(function*(){const r=new i.Squid({appId:t,baseUrl:e});try{const e=yield r.collection(n).query().snapshot();console.log(e.map((e=>e.data()))),process.exit(0)}catch(e){console.log(e),process.exit(1)}}))}},60173:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(70575),a=n(53315);t.default=function(e,t){var n;return r(this,void 0,void 0,(function*(){try{const n=yield a.default.post(`${(0,i.getApplicationUrl)(e,t)}application/updateBundleData`);console.log(n.status,n.data)}catch(e){if(!(e instanceof a.AxiosError))throw e;console.error(null===(n=e.response)||void 0===n?void 0:n.data)}}))}},72354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(70575),a=n(53315),o=n(54347),s=n(57147),p=n(42437);t.default=function(e,t,n,c){var u;return r(this,void 0,void 0,(function*(){const r=new o.default;r.append("appId",t),r.append("file",(0,s.createReadStream)(n));const l=c.direct?`${(0,i.getApplicationUrl)(e,t)}application/updateApplicationCode`:`${(0,i.getApplicationUrl)(e,p.environment.controlPlaneAppId)}webhooks/updateApplicationCode`;try{console.log("Uploading code to: ",l);const e=yield a.default.post(l,r,{headers:r.getHeaders()});console.log("Response: ",e.status,e.data)}catch(e){if(!(e instanceof a.AxiosError))throw e;console.error(null===(u=e.response)||void 0===u?void 0:u.data)}}))}},18675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeToKebabOrSnakeCase=void 0,t.normalizeToKebabOrSnakeCase=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase().replace(/\s/g,"-")}},31511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchematicOption=void 0;const r=n(18675);t.SchematicOption=class{constructor(e,t){this.name=e,this.value=t}get normalizedName(){return(0,r.normalizeToKebabOrSnakeCase)(this.name)}toCommandString(){if("string"==typeof this.value)return"name"===this.name?`--${this.normalizedName}=${this.format()}`:"version"===this.name||"path"===this.name?`--${this.normalizedName}=${this.value}`:`--${this.normalizedName}="${this.value}"`;{const e=this.normalizedName;return this.value?`--${e}`:`--no-${e}`}}format(){return(0,r.normalizeToKebabOrSnakeCase)(this.value).split("").reduce(((e,t)=>"("===t||")"===t||"["===t||"]"===t?`${e}\\${t}`:`${e}${t}`),"")}}},71529:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SchematicRunner=void 0;const i=n(32081),a=n(70575),o=n(57147),s=n(71017),p=n(77282);class c{static findClosestSchematicsBinary(){return r(this,void 0,void 0,(function*(){const e=[s.resolve(__dirname.replace(/dist$/g,"node_modules"),"@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(__dirname,"../../node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(__dirname,"../../../node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(p.cwd(),"node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(p.cwd(),"../node_modules/@angular-devkit/schematics-cli/bin/schematics.js")];for(const t of e)if(yield c.checkIfFileExists(t))return t;throw new Error("'schematics' binary path could not be found!")}))}static checkIfFileExists(e){return r(this,void 0,void 0,(function*(){try{return yield o.promises.stat(e),!0}catch(e){if("ENOENT"===(null==e?void 0:e.code))return!1;throw e}}))}static execute(e,t,n){return r(this,void 0,void 0,(function*(){let r=this.buildCommandLine(e,t);r=n?r.concat(` ${n}`):r,yield this.run(r)}))}static run(e,t=!1,n=p.cwd()){return r(this,void 0,void 0,(function*(){const o=[e],s={cwd:n,stdio:t?"pipe":"inherit",shell:!0};return new Promise(((n,p)=>r(this,void 0,void 0,(function*(){const r=(0,i.spawn)("node",[`"${yield c.findClosestSchematicsBinary()}"`,...o],s);t&&(0,a.truthy)(r.stdout).on("data",(e=>n(e.toString().replace(/\r\n|\n/,"")))),r.on("close",(t=>{0===t?n(null):(console.error(`node ${e} failed`),p())}))}))))}))}static buildCommandLine(e,t){return`@squidcloud/schematics:${e}${this.buildOptions(t)}`}static buildOptions(e){return e.reduce(((e,t)=>e.concat(` ${t.toCommandString()}`)),"")}}t.SchematicRunner=c},65122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runInShell=void 0;const r=n(32081);t.runInShell=function(e,t=process.cwd()){return new Promise(((n,i)=>{const a=(0,r.spawn)(e,{cwd:t,shell:!0,stdio:"inherit"});a.on("error",(e=>i(e))),a.on("exit",(e=>{0===e?n({stdout:"",stderr:""}):i(new Error(`The command exited with code ${e}`))}))}))}},65218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiEndpointsRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const r=n(1186);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},a={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},p={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},secured:{type:"boolean",nullable:!0},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:r.IntegrationType.internal}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.cockroach},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["baseUrl","endpoints"],properties:{type:{const:r.IntegrationType.api},baseUrl:{type:"string",nullable:!1,format:"uri"},endpoints:{type:"object",patternProperties:{"^\\S+$":{type:"object",required:["relativePath","method"],properties:{relativePath:{type:"string"},method:{type:"string",enum:["POST","GET","DELETE","PATCH","PUT"]},requestSchema:{type:"object",patternProperties:{"^\\S+$":{type:"object",properties:{paramLocation:{type:"string",enum:["QUERY","BODY","HEADER"]},fieldNameInRequest:{type:"string"}}}}},responseSchema:{type:"object",patternProperties:{"^\\S+$":{type:"object",required:["paramLocation"],properties:{paramLocation:{type:"string",enum:["BODY","HEADER"]},fieldPathInResponse:{type:"string"}}}}}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:p}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:p}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mssql},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.postgres},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.cockroach},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mongo},connectionOptions:s}},{type:"object",properties:{integrationType:{const:r.IntegrationType.internal}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:r.IntegrationType.graphql},connectionOptions:p}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiEndpointsRequestSchema={type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}},48030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},17545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},49235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},14385:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFullDocIdStr=t.parseFullDocId=void 0;const r=n(24684);t.parseFullDocId=function(e){return(0,r.deserializeObj)(e)},t.getFullDocIdStr=function(...e){const[t,n,i]=e,a="object"==typeof t?t:{docId:t,collectionName:n,integrationId:i};return a.integrationId||(a.integrationId=void 0),(0,r.normalizeJsonAsString)(a)}},59231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},37008:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(n=t.HttpStatus||(t.HttpStatus={}))[n.CONTINUE=100]="CONTINUE",n[n.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",n[n.PROCESSING=102]="PROCESSING",n[n.EARLYHINTS=103]="EARLYHINTS",n[n.OK=200]="OK",n[n.CREATED=201]="CREATED",n[n.ACCEPTED=202]="ACCEPTED",n[n.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",n[n.NO_CONTENT=204]="NO_CONTENT",n[n.RESET_CONTENT=205]="RESET_CONTENT",n[n.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",n[n.AMBIGUOUS=300]="AMBIGUOUS",n[n.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",n[n.FOUND=302]="FOUND",n[n.SEE_OTHER=303]="SEE_OTHER",n[n.NOT_MODIFIED=304]="NOT_MODIFIED",n[n.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",n[n.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.UNAUTHORIZED=401]="UNAUTHORIZED",n[n.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",n[n.FORBIDDEN=403]="FORBIDDEN",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",n[n.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",n[n.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",n[n.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",n[n.CONFLICT=409]="CONFLICT",n[n.GONE=410]="GONE",n[n.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",n[n.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",n[n.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",n[n.URI_TOO_LONG=414]="URI_TOO_LONG",n[n.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",n[n.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",n[n.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",n[n.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",n[n.MISDIRECTED=421]="MISDIRECTED",n[n.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",n[n.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",n[n.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",n[n.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n[n.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",n[n.BAD_GATEWAY=502]="BAD_GATEWAY",n[n.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",n[n.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",n[n.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},70575:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(65218),t),i(n(94125),t),i(n(48030),t),i(n(17545),t),i(n(49235),t),i(n(77581),t),i(n(91012),t),i(n(31277),t),i(n(23889),t),i(n(10720),t),i(n(93085),t),i(n(14385),t),i(n(59231),t),i(n(37008),t),i(n(1186),t),i(n(16778),t),i(n(55263),t),i(n(2792),t),i(n(2251),t),i(n(13858),t),i(n(90914),t),i(n(82574),t),i(n(32972),t),i(n(791),t),i(n(76504),t),i(n(75098),t),i(n(81391),t),i(n(15791),t),i(n(17104),t),i(n(99132),t),i(n(37682),t),i(n(23185),t),i(n(4825),t),i(n(27850),t),i(n(93589),t),i(n(11834),t),i(n(24684),t),i(n(48315),t),i(n(58255),t),i(n(22608),t)},1186:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.isDataIntegration=t.IntegrationType=void 0,(n=t.IntegrationType||(t.IntegrationType={})).internal="internal",n.mongo="mongo",n.mysql="mysql",n.mssql="mssql",n.postgres="postgres",n.cockroach="cockroach",n.api="api",n.graphql="graphql",t.isDataIntegration=function(e){return["internal","mongo","mysql","mssql","postgres","cockroach"].includes(e.type)}},16778:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=t.LogLevel||(t.LogLevel={})).TRACE="trace",n.DEBUG="debug",n.INFO="info",n.WARN="warn",n.ERROR="error"},90914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetMetricDataRequestSchema=void 0,t.GetMetricDataRequestSchema={type:"object",required:["metricNames"],properties:{metricNames:{type:"array",minItems:1,items:{type:"string",enum:["backendBootstrapLatencySum","backendFailureCount","backendFailureFunctionCallCount","backendSuccessFunctionCallCount","backendFunctionCallCount","backendFunctionCallLatencySum"]},nullable:!1},timeWindow:{type:"object",properties:{startTime:{type:"number",nullable:!0},endTime:{type:"number",nullable:!0}},nullable:!0},aggregation:{nullable:!0,type:["string","object"],oneOf:[{type:"string",const:"none"},{type:"object",required:["functionName","groupByFields"],properties:{functionName:{type:"string",enum:["sum","avg"],nullable:!1},groupByFields:{type:"array",items:{type:"string"},nullable:!1}}}]},rate:{type:"string",enum:["1m","5m","1h","3h","1d"],nullable:!0},step:{type:"string",nullable:!0}}}},13858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const r=n(98784);t.MutationContext=class{constructor(e,t,n,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=n,this.auth=r}getUserAuth(){return this.auth}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?r.get(this.beforeAndAfterDocs.before,e):void 0,n=this.beforeAndAfterDocs.after?r.get(this.beforeAndAfterDocs.after,e):void 0;return!r.isEqual(t,n)}}},55263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const n={type:"string"},r={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:n,integrationId:n,collectionName:n}},i={oneOf:[{type:"object",required:["type","properties","fullDocId"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},fullDocId:r}},{type:"object",required:["type","fullDocId"],properties:{type:{type:"string",const:"delete"},fullDocId:r}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},fullDocId:r,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:n}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:n,integrationId:n,mutations:{type:"array",items:i}}}},2792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const r=n(98784),i=n(32937),a=n(27850),o=n(11834);function s(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?r.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function p(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,a.assertTruthy)("update"===t.type),"update"===e.type)return function(e,t){const n=r.cloneDeep(e);t=r.cloneDeep(t);for(const[e]of p(n)){const r=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&r>t.split(".").length))&&delete n.properties[e]}for(const[e,r]of p(t))n.properties[e]=[...n.properties[e]||[],...r];return n}(e,t);const n=r.cloneDeep(e);for(const[e,r]of p(t)){const t=r;for(const r of t){const t=s((0,o.getInPath)(n.properties,e),r);void 0===t?(0,o.deleteInPath)(n.properties,e):(0,o.setInPath)(n.properties,e,t)}}return n}t.sortUpdateMutationProperties=p,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const n=Object.assign({},e),r=p(t);for(const[e,t]of r){const r=t;for(const t of r){const r=s((0,o.getInPath)(n,e),t);void 0===r?(0,o.deleteInPath)(n,e):(0,o.setInPath)(n,e,r)}}return n},t.convertInsertToUpdate=function(e){const t={type:"update",fullDocId:e.fullDocId,properties:{}};for(const[n,r]of Object.entries(e.properties))t.properties[n]=[{type:"update",value:r}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.fullDocId.integrationId}${e.fullDocId.collectionName}/${e.fullDocId.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},77581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},91012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!="]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const i=n(11834),a=n(24684);class o{}function s(e,t){var n;const r=e.unconditional||[],o=new Set,s=new Map;for(const[r,c]of Object.entries(e.conditional||{})){const e=(0,a.decodeValueForMapping)(r);for(const[r,u]of Object.entries(c)){const c=[],l=null!==(n=(0,i.getInPath)(t,e))&&void 0!==n?n:null,d=(0,a.encodeValueForMapping)(l);switch(r){case"==":l&&!["string","boolean","number"].includes(typeof l)||c.push(...u[d]||[]);break;case"!=":{(u[d]||[]).forEach((e=>o.add(e)));const e=Object.entries(u).filter((([e])=>e!==d));for(const[t,n]of e)c.push(...n);break}case"<":case"<=":case">":case">=":["string","boolean","number"].includes(typeof l)&&c.push(...Object.entries(u).filter((([e])=>p((0,a.decodeValueForMapping)(e),l,r))).reduce(((e,[t,n])=>(e.push(...n),e)),[]));break;default:throw new Error("Unsupported operator: "+r)}for(const e of c)s.set(e,(s.get(e)||0)+1)}}for(const[t,n]of s.entries())o.has(t)||n>=e.queriesMetadata[t].condCount&&r.push(t);return r}function p(e,t,n){if(null===e||null===t)return!1;switch(n){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;default:throw new Error(`Unsupported operator comparison: ${n}`)}}t.QueryMappingManager=o,t.SimpleQueryMappingManager=class extends o{findQueriesForDocument(e,t,n,i){return r(this,void 0,void 0,(function*(){const r=yield this.getMapping(e,n,i);return r?s(r,t):[]}))}},t.findQueriesForDocumentSync=s,t.compareOperator=p,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},82574:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(88556),t),i(n(51515),t)},88556:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const r=n(98784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e,t){this.query=e,this.auth=t,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}getUserAuth(){return this.auth}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}includesSorts(e){return!e.find(((e,t)=>!(0,r.isEqual)(this.query.sortOrder[t],e)))}matchesSorts(e){return e.length===this.query.sortOrder.length&&this.includesSorts(e)}includes(e,t,n){return this.includesCondition({fieldName:e,operator:t,value:n})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),n=this.matchesSorts(e.sortOrder),r=this.limit===e.limit;return t&&n&&r}isSubsetOf(e,t,n){return this.isSubsetOfCondition({fieldName:e,operator:t,value:n})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),n=this.includesSorts(e.sortOrder),r=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&n&&r}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:n,value:r}=e,{operator:a,value:o}=this.parseConditions([t])[0],s=i[`${n}:${a}`];return!!s&&s(r,o)}evaluateIncludes(e,t){const{operator:n,value:i}=e,{operator:a,value:o}=this.parseConditions([t])[0],s=Array.isArray(i)?i.sort():i,p=Array.isArray(o)?o.sort():o;return a===n&&(0,r.isEqual)(p,s)}parseConditions(e){const t=[],n=new Map,r=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),n.forEach(((e,n)=>{t.push({fieldName:n,operator:"in",value:e})})),r.forEach(((e,n)=>{t.push({fieldName:n,operator:"not in",value:e})})),t}}},51515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const r=n(98784),i=n(27850),a=n(48315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,n){if("in"===t||"not in"===t){const r=n instanceof Array?[...n]:[n];for(const n of r)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:n});return this}return this.query.conditions.push({fieldName:e,operator:t,value:n}),this}limit(e){return(0,a.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const n={asc:t,fieldName:e};return(0,a.validateFieldSort)(n),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(n),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=r.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const n of Object.values(t)){const t=r.groupBy(n,(e=>e.operator));for(const[n,i]of Object.entries(t)){if("=="===n||"!="===n){e.push(...i);continue}const t=r.sortBy(i,(e=>e.value));if(">"===n||">="===n)e.push(t[t.length-1]);else{if("<"!==n&&"<="!==n)throw new Error(`Unsupported operator ${n}`);e.push(t[0])}}}return e}}},76504:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const r=n(37008),i=n(86236),a=n(38414),o=n(27850),s=n(48315),p=n(22091),c=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function u(e){return c.compile(e)}function l(e,t){const n={exactMatch:[],parentsMatch:[]};if(!e.length)return n.exactMatch.push(t),n;n.parentsMatch.push(t);const r=[...e];for(;r.length;){const e=d(t,(0,o.truthy)(r.shift()));for(const t of e){const e=l(r,t);n.parentsMatch.push(...e.parentsMatch),n.exactMatch.push(...e.exactMatch)}}return n}function d(e,t){var n,r;const i=(null===(n=e.properties)||void 0===n?void 0:n[t])?[null===(r=e.properties)||void 0===r?void 0:r[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,a.default)(c),c.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),c.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=u,t.validateSchema=function(e,t,n=[],i={}){const a=u(e),c=a(t);if(!n.length&&!c)throw new s.ValidationError("The data does not conform with the collection schema.",r.HttpStatus.BAD_REQUEST);if(!c&&n.length)for(const e of(0,o.truthy)(a.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",n.some((e=>t.startsWith(e+"."))))throw new s.ValidationError(`${t} does not conform with the collection schema.`,r.HttpStatus.BAD_REQUEST)}!function(e,t,n){if(n&&t.readOnly||!1===t.insertable&&!n)throw new s.ValidationError("The schema does not allow this action",r.HttpStatus.BAD_REQUEST);for(const i of e){const e=(0,o.truthy)(i.path).join("."),a=l((0,o.truthy)(i.path),t);for(const t of a.exactMatch){if(t.readOnly&&"E"===i.kind)throw new s.ValidationError(`${e} is readonly`,r.HttpStatus.BAD_REQUEST);if(n&&!1===t.deletable&&"D"===i.kind)throw new s.ValidationError(`${e} is not deletable`,r.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===i.kind)throw new s.ValidationError(`${e} is not insertable`,r.HttpStatus.BAD_REQUEST)}for(const t of a.parentsMatch)if(n&&t.readOnly)throw new s.ValidationError(`${e} is readonly`,r.HttpStatus.BAD_REQUEST)}}((0,o.truthy)((0,p.default)(i,t)),e,!!n.length)},t.findMatchingPropertiesForKey=d},75098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},81391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}}]}},17104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},99132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},37682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};function r(e,t,n=((e,t)=>e>t?1:e<t?-1:0),i=0,a=e.length-1){if(a<i)return-1;const o=Math.trunc((i+a)/2);return 0===n(t,e[o])?o:n(t,e[o])>0?r(e,t,n,o+1,a):r(e,t,n,i,o-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0,t.binarySearch=r,t.insertSorted=function(e,t,n=((e,t)=>e>t?1:e<t?-1:0)){let r;for(r=e.length-1;r>=0&&n(e[r],t)>0;r--)e[r+1]=e[r];e[r+1]=t},t.removeSorted=function(e,t,n=((e,t)=>e>t?1:e<t?-1:0)){const i=r(e,t,n);i>-1&&e.splice(i,1)},t.asyncGroupBy=function(e,t){return n(this,void 0,void 0,(function*(){const n={};for(const r of e){const e=yield t(r);n[e]||(n[e]=[]),n[e].push(r)}return n}))}},27850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.truthy=t.assertValidateTruthy=t.assertTruthy=void 0;const r=n(37008),i=n(48315);function a(e,t){if(e)return;const n="function"==typeof t?t():t;throw n instanceof Error?n:new Error(null!=n?n:"Assertion error")}function o(e,t){return a(e,t),e}t.assertTruthy=a,t.assertValidateTruthy=function(e,t,n=r.HttpStatus.BAD_REQUEST,o){a(e,(()=>new i.ValidationError(t,n,o)))},t.truthy=o,t.validateTruthy=function(e,t,n=r.HttpStatus.BAD_REQUEST,a){return o(e,(()=>new i.ValidationError(t,n,a)))}},58255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class n extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=n},93589:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const i=n(32937),a=n(27850);t.LockManager=class{constructor(){this.locks={}}lock(...e){return r(this,void 0,void 0,(function*(){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));yield(0,i.lastValueFrom)((0,i.combineLatest)(t).pipe((0,i.filter)((e=>!e.includes(!0))),(0,i.take)(1))),yield this.lock(...e)}))}release(...e){for(const t of e){const e=(0,a.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,a.assertTruthy)(this.canGetLock(...e));for(const t of e)this.locks[t]=new i.BehaviorSubject(!0)}}},11834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const r=n(98784),i=n(27850);function a(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t){const n=t.split(".");let r,a=e;for(;a&&n.length;){const e=(0,i.truthy)(n.shift());if(!(a instanceof Object&&e in a))return;r=a[e],a=r}return r},t.setInPath=function(e,t,n){var o;const s=t.split(".");let p=e;for(;s.length;){const e=(0,i.truthy)(s.shift());if(s.length){const t=a(p[e])&&null!==(o=r.clone(p[e]))&&void 0!==o?o:{};p[e]=t,p=t}else p[e]=n}},t.deleteInPath=function(e,t){var n;const o=t.split(".");let s=e;for(;o.length;){const e=(0,i.truthy)(o.shift());if(o.length){const t=a(s[e])&&null!==(n=r.clone(s[e]))&&void 0!==n?n:{};s[e]=t,s=t}else delete s[e]}},t.deepReplace=function e(t,n,r){for(const i in t)i===n?t[i]=r(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,n,r))):"object"==typeof t[i]&&e(t[i],n,r)}},24684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const r=n(11137);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),n={};return t.sort().forEach((t=>{n[t]=i(e[t])})),n}function a(e){try{return r.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}t.normalizeJsonAsString=function(e){return a(i(e))},t.serializeObj=a,t.deserializeObj=function(e){return r.EJSON.parse(e)},t.encodeValueForMapping=function(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(JSON.stringify(e))},t.decodeValueForMapping=function(e){return JSON.parse(atob(e))}},22608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL(e);n.host=`${t}.${n.host}`;const r=n.toString();return r.endsWith("/")?r:r+"/"}},48315:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const r=n(27850);class i extends Error{constructor(e,t,n){super(e),this.statusCode=t,this.details=n}}function a(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function o(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function s(e){(0,r.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function p(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");a(e)}(e.fullDocId.collectionName),a(e.fullDocId.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))o(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,n]of t){o(e);for(const e of n)p(e)}}(e)}}function u(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function l(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,r.assertTruthy)(l(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,r.assertTruthy)(u(e.asc,"boolean")),o(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,r.assertTruthy)(e,"INVALID_PROVIDER"),s(e.providerType),(0,r.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,r.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,r.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=s,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,r.assertTruthy)(u(e,"number")),-1!==e&&((0,r.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,r.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,r.assertTruthy)(e<=1e3,"Limit can be maximum 1000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=u,t.hasOnlyKeys=l},50539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const i=n(70575),a=n(98784),o=n(32937),s=n(19978);t.ApiManager=class{constructor(e,t,n,r={}){this.clientId=e,this.rpcManager=t,this.socketManager=n,this.apiServerUrlOverrideMapping=r,this.ongoingApiExecutions={},n.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,n){const r=crypto.randomUUID(),i=new o.Subject;this.ongoingApiExecutions[r]=i;const a={integrationId:e,endpointId:t,request:n,clientId:this.clientId,clientRequestId:r,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",a).catch((r=>{console.error("Got error while calling API",e,t,n,r),i.error(r),i.complete()})),i.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[r]})),(0,o.share)())}handleApiResponse(e,t){return r(this,void 0,void 0,(function*(){const n=this.ongoingApiExecutions[e];n&&(t.success?n.next((0,i.deserializeObj)(t.payload)):n.error((0,a.pick)(t,"httpStatus","payload")),n.complete())}))}}},51724:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const r=n(70575),i=n(32937),a=n(19978);t.BackendFunctionManager=class{constructor(e,t,n){this.clientId=e,this.rpcManager=t,this.socketManager=n,this.ongoingFunctionExecutions={},n.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,a.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const n=crypto.randomUUID(),a=new i.Subject;this.ongoingFunctionExecutions[n]=a;const o={functionName:e,paramsArrayStr:(0,r.serializeObj)(t),clientId:this.clientId,clientRequestId:n};return this.rpcManager.post("backend-function/execute",o).catch((t=>{console.error("Got error while executing function",e,t),a.error(t),a.complete()})),a.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[n]})),(0,i.share)())}handleFunctionResponse(e,t){const n=this.ongoingFunctionExecutions[e];if(!n)return;const i=(0,r.deserializeObj)(t);i.success?n.next(i.response):(n.error(new Error(i.response)),n.complete())}}},4e3:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const r=n(96447);t.CollectionReferenceFactory=class{constructor(e,t){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.collections=new Map}get(e,t){let n=this.collections.get(t);n||(n=new Map,this.collections.set(t,n));let i=n.get(e);return i||(i=new r.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory),n.set(e,i),i)}}},96447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const r=n(70575);t.CollectionReference=class{constructor(e,t,n,r){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=n,this.queryBuilderFactory=r,this.documents=new Map}doc(e){(0,r.truthy)("string"==typeof e&&"internal"===this.integrationId||"object"==typeof e,"Invalid doc id"),"string"==typeof e&&(e={__id:e});const t=(0,r.normalizeJsonAsString)(e),n=(0,r.getFullDocIdStr)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(n,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.queryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}}},52223:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const i=n(70575),a=n(33910),o=n(32937),s=n(19978),p="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,n,r,i,a,s){this.dbDao=e,this.mutationSender=t,this.socketManager=n,this.querySubscriptionManager=r,this.queryBuilderFactory=i,this.lockManager=a,this.destructManager=s,this.fullDocIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docToTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.docsToResync=[],this.handleIncomingMessages=!0,this.destructManager.registerDestructor((()=>{this.destruct()})),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.dbDao.getDocumentPropertiesOrUndefined(e)}isDirty(e){var t;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const n=this.docToTimestamp.get(e),r=this.fullDocIdToLocalTimestamp.has(e),i=this.fullDocIdToLocalTimestamp.get(e);return!(!r||(null==n?void 0:n.timestamp))||!!this.dbDao.isDbDifferentThanInMemory(e)||r&&i!==(null==n?void 0:n.timestamp)}runInTransaction(e,t){return r(this,void 0,void 0,(function*(){return t?((0,i.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(p)?this.lockManager.lockSync(p):yield this.lockManager.lock(p),new Promise(((t,n)=>r(this,void 0,void 0,(function*(){try{this.currentTransactionId=crypto.randomUUID();try{return yield e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:n})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(p)}})))))}))}applyOutgoingMutation(e,t){var n;return r(this,void 0,void 0,(function*(){const a=e.fullDocId,o=(0,i.getFullDocIdStr)(a),s=null===(n=this.pendingOutgoingMutations.get(o))||void 0===n?void 0:n.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,i.reduceMutations)([s.mutation,e])[0];else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},n=this.pendingOutgoingMutations.get(o)||[];n.push(t),this.pendingOutgoingMutations.set(o,n)}return this.outgoingMutationsEmpty.next(!1),this.runInTransaction((()=>r(this,void 0,void 0,(function*(){const t=this.dbDao.getDocumentPropertiesOrUndefined(o),n="delete"===e.type?void 0:"update"===e.type?(0,i.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.applyLocalDbUpdateFromSnapshot(o,n)&&("insert"===e.type&&this.fullDocIdToLocalTimestamp.set(o,void 0),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,n).forEach((e=>this.batchClientRequestIds.add(e))))}))),t)}))}runInTransactionSync(e,t){return r(this,void 0,void 0,(function*(){if(t)return(0,i.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);yield this.lockManager.lock(p);try{this.currentTransactionId=crypto.randomUUID();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(p)}}))}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.__docId__,delete t.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessages)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.fullDocIdStr]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessages)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),n={};for(const r of e.docs){const e=(0,i.getFullDocIdStr)(r.__docId__,t.collectionName,t.integrationId);n[e]={properties:r,timestamp:r.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(n,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let n=!1;return this.runInTransactionSync((()=>{for(const[t,r]of Object.entries(e))this.addPendingIncomingUpdate(t,r),this.pendingIncomingUpdates.get(t)||(n=!0),this.maybeApplyIncomingUpdate(t)}),t).then(),n}addPendingIncomingUpdate(e,t){const n=this.pendingIncomingUpdates.get(e);if(n&&n.timestamp>t.timestamp)return;const r=this.docToTimestamp.get(e);r&&r.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const n=this.pendingOutgoingMutations.get(e);n&&n.length||(this.applyLocalDbUpdateFromSnapshot(e,t.properties),this.docToTimestamp.set(e,{timestamp:t.timestamp,expireTimestamp:t.properties?void 0:Date.now()+2e4}),this.fullDocIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.removeDocumentLocally(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docToTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now())&&this.isDocumentSafeForDelete(e)));for(const[t]of e)this.docToTimestamp.delete(t),this.removeDocumentLocally(t)}),1e4)}isDocumentSafeForDelete(e){if(this.pendingIncomingUpdates.get(e))return!1;const t=this.pendingOutgoingMutations.get(e);return!(t&&t.length||this.querySubscriptionManager.hasOngoingQueryForDocId(e))}applyLocalDbUpdateFromSnapshot(e,t){const n=this.dbDao.getDocumentPropertiesOrUndefined(e);return!(!n&&!t||n===t)&&((!n||!t||(0,i.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,i.normalizeJsonAsString)(n))&&(this.dbDao.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}sendAllUnsentOutgoingMutations(e){return r(this,void 0,void 0,(function*(){const t=this.groupOutgoingMutationsByIntegrationId();try{yield a.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((([e,t])=>r(this,void 0,void 0,(function*(){yield this.sendMutationsForIntegration([...t],e),this.outgoingMutationsEmpty.next(!0)})))),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),yield this.resyncFailedUpdates()),null==e||e.reject(t)}}))}sendMutationsForIntegration(e,t){return r(this,void 0,void 0,(function*(){try{const n=yield this.mutationSender.sendMutations(e.map((e=>e.mutation)),t),r=Date.now();for(const t of e){const e=this.removeOutgoingMutation(t);this.isDocumentSafeForDelete(e)?(this.docToTimestamp.set(e,{timestamp:n,expireTimestamp:r+2e4}),this.removeDocumentLocally(e)):this.docToTimestamp.set(e,{timestamp:n,expireTimestamp:void 0})}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.removeDocumentLocally(e),this.docsToResync.push(e)}throw t}}))}removeOutgoingMutation(e){const t=(0,i.getFullDocIdStr)(e.mutation.fullDocId),n=(0,i.truthy)(this.pendingOutgoingMutations.get(t));return n.splice(n.indexOf(e),1),n.length||this.pendingOutgoingMutations.delete(t),t}resyncFailedUpdates(){var e,t;return r(this,void 0,void 0,(function*(){const n=[...this.docsToResync];this.docsToResync.splice(0);for(const r of n){this.docToTimestamp.set(r,{timestamp:null!==(t=null===(e=this.docToTimestamp.get(r))||void 0===e?void 0:e.timestamp)&&void 0!==t?t:0,expireTimestamp:Date.now()+2e4});try{const e=yield this.queryBuilderFactory.getForDocument(r).snapshot();(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+r)}catch(e){this.querySubscriptionManager.errorOutAllQueries(r,e)}}}))}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,n]of[...this.pendingOutgoingMutations.entries()]){const t=n[n.length-1];if(t&&!t.sentToServer){const n=t.mutation.fullDocId.integrationId;(e[n]||(e[n]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isDocumentSafeForDelete(t)&&this.removeDocumentLocally(t)}))}removeDocumentLocally(e){this.dbDao.removeDocumentFromDb(e),this.fullDocIdToLocalTimestamp.delete(e);const t=this.docToTimestamp.get(e);t&&(t.expireTimestamp=Date.now()+2e4)}}},83039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DbDao=void 0;const r=n(70575),i=n(98784),a=n(57979);t.DbDao=class{constructor(){this.dbIdToDoc=new Map,this.fullDocIdToDbId=new Map,this.db=new a.default("SquidData",{persistenceMethod:"memory"})}saveDocument(e,t){let n=this.fullDocIdToDbId.get(e);const a=(0,r.parseFullDocId)(e),o=this.getDbIdToDocForCollection(a.collectionName,a.integrationId),s=this.getDbCollection(a.collectionName,a.integrationId);if((void 0!==n?s.get(n):void 0)||(n=void 0),void 0===n&&!t)return;if(void 0!==n){if(t){const e=s.get(n).meta,r=s.update(Object.assign({$loki:n,meta:e},(0,i.cloneDeep)(t)));return o[n]=this.convertToDocType(r),n}return s.remove(s.get(n)),this.fullDocIdToDbId.delete(e),void delete o[n]}const p=s.insertOne(t);return n=p.$loki,o[n]=this.convertToDocType(p),this.fullDocIdToDbId.set(e,n),n}removeDocumentFromDb(e){const t=this.fullDocIdToDbId.get(e);if(void 0===t)return;const n=(0,r.parseFullDocId)(e),i=this.getDbCollection(n.collectionName,n.integrationId),a=i.get(t);a&&i.remove(a)}isDbDifferentThanInMemory(e){const t=this.fullDocIdToDbId.get(e);if(void 0===t)return!1;const n=(0,r.parseFullDocId)(e);return!this.getDbCollection(n.collectionName,n.integrationId).get(t)}getDocumentProperties(e){return(0,r.truthy)(this.getDocumentPropertiesOrUndefined(e))}getDocumentPropertiesOrUndefined(e){const{collectionName:t,integrationId:n}=(0,r.parseFullDocId)(e),i=`${t}_${n}`,a=this.fullDocIdToDbId.get(e);if(void 0!==a)return(0,r.truthy)(this.dbIdToDoc.get(i))[a]}executeQuery(e){var t;const n=e.collectionName,i=e.integrationId,a={},o=[],s=[];for(const t of e.conditions)(["==","!="].includes(t.operator)?o:s).push(t);this.applyEqualityConditions(o,a);for(const e of s)Object.assign(a,this.convertToLokiCondition(e));let p=this.getDbCollection(n,i).chain().find(a);(null===(t=e.sortOrder)||void 0===t?void 0:t.length)&&(p=p.compoundsort(e.sortOrder.map((e=>[e.fieldName,!e.asc]))));const c=e.limit>0?e.limit:1e3;return p=p.limit(c),p.data().map((e=>(0,r.truthy)(this.getDbIdToDocForCollection(n,i)[e.$loki],"Document not in local db")))}convertToDocType(e){const t=Object.assign({},e);return delete t.$loki,delete t.meta,delete t.__ts__,t}convertToLokiCondition(e){const t={};switch(e.operator){case"==":t[e.fieldName]=e.value;break;case"<":t[e.fieldName]={$lt:e.value};break;case"<=":t[e.fieldName]={$lte:e.value};break;case">":t[e.fieldName]={$gt:e.value};break;case">=":t[e.fieldName]={$gte:e.value};break;case"!=":t[e.fieldName]={$ne:e.value};break;default:throw new Error(`Unknown operator ${e.operator}`)}return t}getDbCollection(e,t){var n;const r=`${t}_${e}`;return null!==(n=this.db.getCollection(r))&&void 0!==n?n:this.db.addCollection(r)}getDbIdToDocForCollection(e,t){const n=`${e}_${t}`;return this.dbIdToDoc.get(n)||(0,r.truthy)(this.dbIdToDoc.set(n,{}).get(n))}applyEqualityConditions(e,t){const n={};for(const t of e){n[t.operator]||(n[t.operator]={});const e=n[t.operator][t.fieldName]||[];e.push(t.value),n[t.operator][t.fieldName]=e}for(const[e,r]of Object.entries(n))for(const[n,i]of Object.entries(r)){const r=[{["=="===e?"$in":"$nin"]:i}];void 0!==i.find((e=>null===e))&&r.push({$exists:"!="===e}),t[n]={$or:r}}}}},99930:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0,t.DestructManager=class{constructor(){this.destructors=[],this.isDestructed=!1}registerDestructor(e){this.destructors.push(e)}destruct(){return n(this,void 0,void 0,(function*(){if(this.isDestructed)return;this.isDestructed=!0;let e=this.destructors.shift();for(;e;){try{yield e()}catch(e){console.error("Error while destructing Squid",e)}e=this.destructors.shift()}}))}}},65801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const r=n(70575),i=n(75264);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,r.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},75264:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const i=n(70575),a=n(98784);t.DocumentReference=class{constructor(e,t,n){this.fullDocId=e,this.dataManager=t,this.queryBuilderFactory=n}data(){return(0,i.truthy)(this.dataManager.getProperties(this.fullDocId),"CANNOT_FIND_DOCUMENT_DATA")}get(){return r(this,void 0,void 0,(function*(){try{if(this.data())return this}catch(e){}const e=yield this.queryBuilderFactory.getForDocument(this.fullDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.fullDocId),e.length?this:void 0}))}isDirty(){return this.dataManager.isDirty(this.fullDocId)}update(e,t){return r(this,void 0,void 0,(function*(){const n={};Object.entries(e).forEach((([e,t])=>{const r=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};n[e]=[r]}));const r={type:"update",fullDocId:(0,i.parseFullDocId)(this.fullDocId),properties:n};return this.dataManager.applyOutgoingMutation(r,t)}))}setInPath(e,t,n){return r(this,void 0,void 0,(function*(){return this.update({[e]:a.cloneDeep(t)},n)}))}deleteInPath(e,t){return r(this,void 0,void 0,(function*(){return this.update({[e]:void 0},t)}))}insert(e,t){return r(this,void 0,void 0,(function*(){const n=(0,i.parseFullDocId)(this.fullDocId),r={type:"insert",fullDocId:n,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:n.docId}),(0,i.deserializeObj)(n.docId))};return this.dataManager.applyOutgoingMutation(r,t)}))}delete(e){return r(this,void 0,void 0,(function*(){const t={type:"delete",fullDocId:(0,i.parseFullDocId)(this.fullDocId)};return this.dataManager.applyOutgoingMutation(t,e)}))}}},43010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const r=n(46245);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new r.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},46245:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const i=n(71103),a=n(15699);t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const n=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${n}`,headers:this.rpcManager.getStaticHeaders(),fetch:a.default}),cache:new i.InMemoryCache})}query(e){return r(this,void 0,void 0,(function*(){return(yield this.client.query({query:i.gql`
|
|
9
|
+
deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);s(e,t),p(e,n)}};function s(e,t=e.schema){const{gen:n,data:i,it:o}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const p in t){const c=t[p];if(0===c.length)continue;const u=(0,a.propertyInData)(n,i,p,o.opts.ownProperties);e.setParams({property:p,depsCount:c.length,deps:c.join(", ")}),o.allErrors?n.if(u,(()=>{for(const t of c)(0,a.checkReportMissingProp)(e,t)})):(n.if(r._`${u} && (${(0,a.checkMissingProp)(e,c,s)})`),(0,a.reportMissingProp)(e,s),n.else())}}function p(e,t=e.schema){const{gen:n,data:r,keyword:o,it:s}=e,p=n.name("valid");for(const c in t)(0,i.alwaysValidSchema)(s,t[c])||(n.if((0,a.propertyInData)(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:c},p);e.mergeValidEvaluated(t,p)}),(()=>n.var(p,!0))),e.ok(p))}t.validatePropertyDeps=s,t.validateSchemaDeps=p,t.default=o},50076:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:a}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(a,'"if" without "then" and "else" is ignored');const s=o(a,"then"),p=o(a,"else");if(!s&&!p)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&p){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,l("then",n),l("else",n))}else s?t.if(u,l("then")):t.if((0,r.not)(u),l("else"));function l(n,i){return()=>{const a=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(a,c),i?t.assign(i,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function o(e,t){const n=e.schema[t];return void 0!==n&&!(0,i.alwaysValidSchema)(e,n)}t.default=a},46951:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(78891),i=n(21162),a=n(98634),o=n(65151),s=n(95609),p=n(5463),c=n(53021),u=n(24943),l=n(34243),d=n(98103),f=n(72869),h=n(54279),m=n(14880),v=n(22609),y=n(50076),b=n(25316);t.default=function(e=!1){const t=[f.default,h.default,m.default,v.default,y.default,b.default,c.default,u.default,p.default,l.default,d.default];return e?t.push(i.default,o.default):t.push(r.default,a.default),t.push(s.default),t}},98634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(15669),i=n(88936),a=n(3499),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,(0,i.alwaysValidSchema)(n,t)||e.ok((0,a.validateArray)(e))}};function s(e,t,n=e.schema){const{gen:a,parentSchema:o,data:s,keyword:p,it:c}=e;!function(e){const{opts:r,errSchemaPath:a}=c,o=n.length,s=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${p}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,i.checkStrictMode)(c,e,r.strictTuples)}}(o),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(a,n.length,c.items));const u=a.name("valid"),l=a.const("len",r._`${s}.length`);n.forEach(((t,n)=>{(0,i.alwaysValidSchema)(c,t)||(a.if(r._`${l} > ${n}`,(()=>e.subschema({keyword:p,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=o},65151:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(3499),o=n(78891),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:s}=n;r.items=!0,(0,i.alwaysValidSchema)(r,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,a.validateArray)(e)))}};t.default=s},72869:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(88936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:i}=e;if((0,r.alwaysValidSchema)(i,n))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},14880:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>r._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:a,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const s=n,p=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((n,a)=>{let s;(0,i.alwaysValidSchema)(o,n)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if(r._`${u} && ${p}`).assign(p,!1).assign(c,r._`[${c}, ${a}]`).else(),t.if(u,(()=>{t.assign(p,!0),t.assign(c,a),s&&e.mergeEvaluated(s,r.Name)}))}))})),e.result(p,(()=>e.reset()),(()=>e.error(!0)))}};t.default=a},98103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a=n(88936),o=n(88936),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:s,parentSchema:p,it:c}=e,{opts:u}=c,l=(0,r.allSchemaProperties)(n),d=l.filter((e=>(0,a.alwaysValidSchema)(c,n[e])));if(0===l.length||d.length===l.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&p.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,o.evaluatedPropsToName)(t,c.props));const{props:m}=c;function v(e){for(const t in f)new RegExp(e).test(t)&&(0,a.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(n){t.forIn("key",s,(a=>{t.if(i._`${(0,r.usePattern)(e,n)}.test(${a})`,(()=>{const r=d.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:a,dataPropType:o.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${a}]`,!0):r||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of l)f&&v(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},21162:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(98634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")};t.default=i},34243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91686),i=n(3499),a=n(88936),o=n(24943),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:s,data:p,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new r.KeywordCxt(c,o.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(n);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=a.mergeEvaluated.props(t,(0,a.toHash)(u),c.props));const l=u.filter((e=>!(0,a.alwaysValidSchema)(c,n[e])));if(0===l.length)return;const d=t.name("valid");for(const n of l)f(n)?h(n):(t.if((0,i.propertyInData)(t,p,n,c.opts.ownProperties)),h(n),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(d);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=s},53021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>r._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:a,it:o}=e;if((0,i.alwaysValidSchema)(o,n))return;const s=t.name("valid");t.forIn("key",a,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},s),t.if((0,r.not)(s),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(s)}};t.default=a},25316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(88936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(15669),i=n(88936),a=n(17250),o=n(88936);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function p(e,t,n){return r._`${s(e)}.call(${t}, ${n})`}function c(e,t,n,i){const a=r._`${t}${(0,r.getProperty)(n)} === undefined`;return i?(0,r.or)(a,(0,r.not)(p(e,t,n))):a}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:i,it:a}=e;n.if(c(n,i,t,a.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},i,a){return(0,r.or)(...i.map((i=>(0,r.and)(c(e,t,i,n.ownProperties),r._`${a} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=p,t.propertyInData=function(e,t,n,i){const a=r._`${t}${(0,r.getProperty)(n)} !== undefined`;return i?r._`${a} && ${p(e,t,n)}`:a},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((n=>!(0,i.alwaysValidSchema)(e,t[n])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:o,errorPath:s},it:p},c,u,l){const d=l?r._`${e}, ${t}, ${i}${o}`:t,f=[[a.default.instancePath,(0,r.strConcat)(a.default.instancePath,s)],[a.default.parentData,p.parentData],[a.default.parentDataProperty,p.parentDataProperty],[a.default.rootData,a.default.rootData]];p.opts.dynamicRef&&f.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);const h=r._`${d}, ${n.object(...f)}`;return u!==r.nil?r._`${c}.call(${u}, ${h})`:r._`${c}(${h})`};const l=r._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},n){const i=t.unicodeRegExp?"u":"",{regExp:a}=t.code,s=a(n,i);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:r._`${"new RegExp"===a.code?l:(0,o.useFunc)(e,a)}(${n}, ${i})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:a,it:o}=e,s=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return p((()=>t.assign(e,!1))),e}return t.var(s,!0),p((()=>t.break())),s;function p(o){const p=t.const("len",r._`${n}.length`);t.forRange("i",0,p,(n=>{e.subschema({keyword:a,dataProp:n,dataPropType:i.Type.Num},s),t.if((0,r.not)(s),o)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:a,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>(0,i.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),p=t.name("_valid");t.block((()=>n.forEach(((n,i)=>{const o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},p);t.assign(s,r._`${s} || ${p}`),e.mergeValidEvaluated(o,p)||t.if((0,r.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},71018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},32101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(71018),i=n(41939),a=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default];t.default=a},41939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(91578),i=n(3499),a=n(15669),o=n(17250),s=n(87382),p=n(88936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:i}=e,{baseId:o,schemaEnv:p,validateName:c,opts:d,self:f}=i,{root:h}=p;if(("#"===n||"#/"===n)&&o===h.baseId)return function(){if(p===h)return l(e,c,p,p.$async);const n=t.scopeValue("root",{ref:h});return l(e,a._`${n}.validate`,h,h.$async)}();const m=s.resolveRef.call(f,h,o,n);if(void 0===m)throw new r.default(i.opts.uriResolver,o,n);return m instanceof s.SchemaEnv?function(t){const n=u(e,t);l(e,n,t,t.$async)}(m):function(r){const i=t.scopeValue("schema",!0===d.code.source?{ref:r,code:(0,a.stringify)(r)}:{ref:r}),o=t.name("valid"),s=e.subschema({schema:r,dataTypes:[],schemaPath:a.nil,topSchemaRef:i,errSchemaPath:n},o);e.mergeEvaluated(s),e.ok(o)}(m)}};function u(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):a._`${n.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,n,r){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:l,opts:d}=c,f=d.passContext?o.default.this:a.nil;function h(e){const t=a._`${e}.errors`;s.assign(o.default.vErrors,a._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),s.assign(o.default.errors,a._`${o.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=p.mergeEvaluated.props(s,r.props,c.props));else{const t=s.var("props",a._`${e}.evaluated.props`);c.props=p.mergeEvaluated.props(s,t,c.props,a.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=p.mergeEvaluated.items(s,r.items,c.items));else{const t=s.var("items",a._`${e}.evaluated.items`);c.items=p.mergeEvaluated.items(s,t,c.items,a.Name)}}r?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const n=s.let("valid");s.try((()=>{s.code(a._`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),u||s.assign(n,!0)}),(e=>{s.if(a._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(n,!1)})),e.ok(n)}():e.result((0,i.callValidateCode)(e,t,f),(()=>m(t)),(()=>h(t)))}t.getValidate=u,t.callRef=l,t.default=c},30002:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(77421),a=n(87382),o=n(88936),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>r._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:s,parentSchema:p,it:c}=e,{oneOf:u}=p;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=s.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),f=t.const("tag",r._`${n}${(0,r.getProperty)(l)}`);function h(n){const i=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:n},i);return e.mergeEvaluated(a,r.Name),i}t.if(r._`typeof ${f} == "string"`,(()=>function(){const n=function(){var e;const t={},n=i(p);let r=!0;for(let t=0;t<u.length;t++){let p=u[t];(null==p?void 0:p.$ref)&&!(0,o.schemaHasRulesButRef)(p,c.self.RULES)&&(p=a.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==p?void 0:p.$ref),p instanceof a.SchemaEnv&&(p=p.schema));const d=null===(e=null==p?void 0:p.properties)||void 0===e?void 0:e[l];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);r=r&&(n||i(p)),s(d,t)}if(!r)throw new Error(`discriminator: "${l}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(l)}function s(e,t){if(e.const)d(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const n of e.enum)d(n,t)}}function d(e,n){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${l}" values must be unique strings`);t[e]=n}}();t.if(!1);for(const e in n)t.elseIf(r._`${f} === ${e}`),t.assign(d,h(n[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:f,tagName:l}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:f,tagName:l}))),e.ok(d)}};t.default=s},77421:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"},35671:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(32101),i=n(37499),a=n(46951),o=n(4480),s=n(32480),p=[r.default,i.default,(0,a.default)(),o.default,s.metadataVocabulary,s.contentVocabulary];t.default=p},73599:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match format "${e}"`,params:({schemaCode:e})=>r._`{format: ${e}}`},code(e,t){const{gen:n,data:i,$data:a,schema:o,schemaCode:s,it:p}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=p;c.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),o=n.const("fDef",r._`${a}[${s}]`),p=n.let("fType"),u=n.let("format");n.if(r._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>n.assign(p,r._`${o}.type || "string"`).assign(u,r._`${o}.validate`)),(()=>n.assign(p,r._`"string"`).assign(u,o))),e.fail$data((0,r.or)(!1===c.strictSchema?r.nil:r._`${s} && !${u}`,function(){const e=l.$async?r._`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:r._`${u}(${i})`,n=r._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return r._`${u} && ${u} !== true && ${p} === ${t} && !${n}`}()))}():function(){const a=d.formats[o];if(!a)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}d.logger.warn(e())}();if(!0===a)return;const[s,p,f]=function(e){const t=e instanceof RegExp?(0,r.regexpCode)(e):c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(o)}`:void 0,i=n.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,r._`${i}.validate`]}(a);s===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!l.$async)throw new Error("async format in sync schema");return r._`await ${f}(${i})`}return"function"==typeof p?r._`${f}(${i})`:r._`${f}.test(${i})`}())}())}};t.default=i},4480:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(73599).default];t.default=r},32480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},36577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(94285),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>r._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:o,schemaCode:s,schema:p}=e;o||p&&"object"==typeof p?e.fail$data(r._`!${(0,i.useFunc)(t,a.default)}(${n}, ${s})`):e.fail(r._`${p} !== ${n}`)}};t.default=o},59450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(94285),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>r._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:o,schema:s,schemaCode:p,it:c}=e;if(!o&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let l;const d=()=>null!=l?l:l=(0,i.useFunc)(t,a.default);let f;if(u||o)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",p,(e=>t.if(r._`${d()}(${n}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",p);f=(0,r.or)(...s.map(((t,i)=>function(e,t){const i=s[t];return"object"==typeof i&&null!==i?r._`${d()}(${n}, ${e}[${t}])`:r._`${n} === ${i}`}(e,i))))}e.pass(f)}};t.default=o},37499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(31337),i=n(59706),a=n(99507),o=n(51216),s=n(70034),p=n(96962),c=n(61135),u=n(10194),l=n(36577),d=n(59450),f=[r.default,i.default,a.default,o.default,s.default,p.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];t.default=f},61135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxItems"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,a="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${a} ${i}`)}};t.default=i},99507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=n(88936),a=n(49161),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxLength"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:o,it:s}=e,p="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===s.opts.unicode?r._`${n}.length`:r._`${(0,i.useFunc)(e.gen,a.default)}(${n})`;e.fail$data(r._`${c} ${p} ${o}`)}};t.default=o},31337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i=r.operators,a={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:e,schemaCode:t})=>r.str`must be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${a[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:n,schemaCode:i}=e;e.fail$data(r._`${n} ${a[t].fail} ${i} || isNaN(${n})`)}};t.default=s},70034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,a="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${a} ${i}`)}};t.default=i},59706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>r.str`must be multiple of ${e}`,params:({schemaCode:e})=>r._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),p=o?r._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:r._`${s} !== parseInt(${s})`;e.fail$data(r._`(${i} === 0 || (${s} = ${n}/${i}, ${p}))`)}};t.default=i},51216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:a,schemaCode:o,it:s}=e,p=s.opts.unicodeRegExp?"u":"",c=n?i._`(new RegExp(${o}, ${p}))`:(0,r.usePattern)(e,a);e.fail$data(i._`!${c}.test(${t})`)}};t.default=a},96962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3499),i=n(15669),a=n(88936),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:o,data:s,$data:p,it:c}=e,{opts:u}=c;if(!p&&0===n.length)return;const l=n.length>=u.loopRequired;if(c.allErrors?function(){if(l||p)e.block$data(i.nil,d);else for(const t of n)(0,r.checkReportMissingProp)(e,t)}():function(){const a=t.let("missing");if(l||p){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,a){e.setParams({missingProperty:n}),t.forOf(n,o,(()=>{t.assign(a,(0,r.propertyInData)(t,s,n,u.ownProperties)),t.if((0,i.not)(a),(()=>{e.error(),t.break()}))}),i.nil)}(a,n))),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,a)),(0,r.reportMissingProp)(e,a),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,a.checkStrictMode)(c,t,c.opts.strictRequired)}}function d(){t.forOf("prop",o,(n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,s,n,u.ownProperties),(()=>e.error()))}))}}};t.default=o},10194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(97332),i=n(15669),a=n(88936),o=n(94285),s={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},p={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s,code(e){const{gen:t,data:n,$data:s,schema:p,parentSchema:c,schemaCode:u,it:l}=e;if(!s&&!p)return;const d=t.let("valid"),f=c.items?(0,r.getSchemaTypes)(c.items):[];function h(a,o){const s=t.name("item"),p=(0,r.checkDataTypes)(f,s,l.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${a}--;`,(()=>{t.let(s,i._`${n}[${a}]`),t.if(p,i._`continue`),f.length>1&&t.if(i._`typeof ${s} == "string"`,i._`${s} += "_"`),t.if(i._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(o,i._`${c}[${s}]`),e.error(),t.assign(d,!1).break()})).code(i._`${c}[${s}] = ${a}`)}))}function m(r,s){const p=(0,a.useFunc)(t,o.default),c=t.name("outer");t.label(c).for(i._`;${r}--;`,(()=>t.for(i._`${s} = ${r}; ${s}--;`,(()=>t.if(i._`${p}(${n}[${r}], ${n}[${s}])`,(()=>{e.error(),t.assign(d,!1).break(c)}))))))}e.block$data(d,(function(){const r=t.let("i",i._`${n}.length`),a=t.let("j");e.setParams({i:r,j:a}),t.assign(d,!0),t.if(i._`${r} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(r,a)))}),i._`${u} === false`),e.ok(d)}};t.default=p},22943:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,i,a,o,s,p,c,u,l){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var d in r(a,o,s,p,c,u,l),a){var f=a[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var h=0;h<f.length;h++)n(e,r,i,f[h],o+"/"+d+"/"+h,s,o,d,a,h)}else if(d in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)n(e,r,i,f[m],o+"/"+d+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,d,a,m)}else(d in t.keywords||e.allKeys&&!(d in t.skipKeywords))&&n(e,r,i,f,o+"/"+d,s,o,d,a)}i(a,o,s,p,c,u,l)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},21865:e=>{"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},84878:(e,t,n)=>{e.exports={parallel:n(79050),serial:n(32451),serialOrdered:n(86709)}},88813:e=>{function t(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(t.bind(e)),e.jobs={}}},9127:(e,t,n)=>{var r=n(4701);e.exports=function(e){var t=!1;return r((function(){t=!0})),function(n,i){t?e(n,i):r((function(){e(n,i)}))}}},4701:e=>{e.exports=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}},72751:(e,t,n)=>{var r=n(9127),i=n(88813);e.exports=function(e,t,n,a){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=function(e,t,n,i){return 2==e.length?e(n,r(i)):e(n,t,r(i))}(t,o,e[o],(function(e,t){o in n.jobs&&(delete n.jobs[o],e?i(n):n.results[o]=t,a(e,n.results))}))}},37178:e=>{e.exports=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])}),r}},78694:(e,t,n)=>{var r=n(88813),i=n(9127);e.exports=function(e){Object.keys(this.jobs).length&&(this.index=this.size,r(this),i(e)(null,this.results))}},79050:(e,t,n)=>{var r=n(72751),i=n(37178),a=n(78694);e.exports=function(e,t,n){for(var o=i(e);o.index<(o.keyedList||e).length;)r(e,t,o,(function(e,t){e?n(e,t):0!==Object.keys(o.jobs).length||n(null,o.results)})),o.index++;return a.bind(o,n)}},32451:(e,t,n)=>{var r=n(86709);e.exports=function(e,t,n){return r(e,t,null,n)}},86709:(e,t,n)=>{var r=n(72751),i=n(37178),a=n(78694);function o(e,t){return e<t?-1:e>t?1:0}e.exports=function(e,t,n,o){var s=i(e,n);return r(e,t,s,(function n(i,a){i?o(i,a):(s.index++,s.index<(s.keyedList||e).length?r(e,t,s,n):o(null,s.results))})),a.bind(s,o)},e.exports.ascending=o,e.exports.descending=function(e,t){return-1*o(e,t)}},11137:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BSONError:()=>s,BSONRegExp:()=>qe,BSONSymbol:()=>Ue,BSONTypeError:()=>p,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>ne,BSON_BINARY_SUBTYPE_COLUMN:()=>se,BSON_BINARY_SUBTYPE_DEFAULT:()=>ee,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>oe,BSON_BINARY_SUBTYPE_FUNCTION:()=>te,BSON_BINARY_SUBTYPE_MD5:()=>ae,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>pe,BSON_BINARY_SUBTYPE_UUID:()=>re,BSON_BINARY_SUBTYPE_UUID_NEW:()=>ie,BSON_DATA_ARRAY:()=>R,BSON_DATA_BINARY:()=>M,BSON_DATA_BOOLEAN:()=>L,BSON_DATA_CODE:()=>W,BSON_DATA_CODE_W_SCOPE:()=>H,BSON_DATA_DATE:()=>V,BSON_DATA_DBPOINTER:()=>z,BSON_DATA_DECIMAL128:()=>Y,BSON_DATA_INT:()=>K,BSON_DATA_LONG:()=>J,BSON_DATA_MAX_KEY:()=>X,BSON_DATA_MIN_KEY:()=>Z,BSON_DATA_NULL:()=>q,BSON_DATA_NUMBER:()=>A,BSON_DATA_OBJECT:()=>F,BSON_DATA_OID:()=>B,BSON_DATA_REGEXP:()=>U,BSON_DATA_STRING:()=>I,BSON_DATA_SYMBOL:()=>Q,BSON_DATA_TIMESTAMP:()=>G,BSON_DATA_UNDEFINED:()=>$,BSON_INT32_MAX:()=>j,BSON_INT32_MIN:()=>k,BSON_INT64_MAX:()=>T,BSON_INT64_MIN:()=>N,Binary:()=>ce,Code:()=>le,DBRef:()=>fe,Decimal128:()=>Ae,Double:()=>Ie,EJSON:()=>tt,Int32:()=>Fe,Long:()=>we,LongWithoutOverridesClass:()=>ze,Map:()=>nt,MaxKey:()=>Re,MinKey:()=>Me,ObjectID:()=>Ve,ObjectId:()=>Ve,Timestamp:()=>We,UUID:()=>ue,calculateObjectSize:()=>Ht,default:()=>Gt,deserialize:()=>Qt,deserializeStream:()=>Kt,serialize:()=>zt,serializeWithBufferAndIndex:()=>Wt,setInternalBufferSize:()=>Ut});const r=require("buffer");var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)};function a(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},s=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return a(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),p=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return a(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function c(e){return e&&e.Math==Math&&e}function u(){return c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof global&&global)||Function("return this")()}function l(e){return e.toString().replace("function(","function (")}var d=function(e){var t,n="object"==typeof(t=u()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var i=r.Buffer.alloc(e),a=0;a<e;++a)i[a]=Math.floor(256*Math.random());return i},f=function(){var e=void 0;try{e=n(6113).randomBytes}catch(e){}return e||d}();function h(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function m(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function v(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function y(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function g(e){return w(e)&&"[object Date]"===Object.prototype.toString.call(e)}function w(e){return"object"==typeof e&&null!==e}function _(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n||(console.warn(t),n=!0),e.apply(this,r)}}function x(e){if(ArrayBuffer.isView(e))return r.Buffer.from(e.buffer,e.byteOffset,e.byteLength);if(h(e))return r.Buffer.from(e);throw new p("Must use either Buffer or TypedArray")}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,O=function(e){return"string"==typeof e&&D.test(e)},E=function(e){if(!O(e))throw new p('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return r.Buffer.from(t,"hex")},S=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},j=2147483647,k=-2147483648,T=Math.pow(2,63)-1,N=-Math.pow(2,63),P=Math.pow(2,53),C=-Math.pow(2,53),A=1,I=2,F=3,R=4,M=5,$=6,B=7,L=8,V=9,q=10,U=11,z=12,W=13,Q=14,H=15,K=16,G=17,J=18,Y=19,Z=255,X=127,ee=0,te=1,ne=2,re=3,ie=4,ae=5,oe=6,se=7,pe=128,ce=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new p("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=n?n:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=r.Buffer.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=r.Buffer.from(t,"binary"):Array.isArray(t)?this.buffer=r.Buffer.from(t):this.buffer=x(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new p("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new p("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||n>255)throw new p("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var i=r.Buffer.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(i,0,0,this.buffer.length),this.buffer=i,this.buffer[this.position++]=n}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var n=r.Buffer.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(x(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===n.length?"0"+n:n}:{$binary:{base64:t,subType:1===n.length?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new ue(this.buffer.slice(0,this.position));throw new s('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){var i,a;if(n=n||{},"$binary"in t?n.legacy&&"string"==typeof t.$binary&&"$type"in t?(a=t.$type?parseInt(t.$type,16):0,i=r.Buffer.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(a=t.$binary.subType?parseInt(t.$binary.subType,16):0,i=r.Buffer.from(t.$binary.base64,"base64")):"$uuid"in t&&(a=4,i=E(t.$uuid)),!i)throw new p("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return a===ie?new ue(i):new e(i,a)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(ce.prototype,"_bsontype",{value:"Binary"});var ue=function(e){function t(n){var i,a,o=this;if(null==n)i=t.generate();else if(n instanceof t)i=r.Buffer.from(n.buffer),a=n.__id;else if(ArrayBuffer.isView(n)&&16===n.byteLength)i=x(n);else{if("string"!=typeof n)throw new p("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");i=E(n)}return(o=e.call(this,i,ie)||this).__id=a,o}return a(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=S(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var n=S(this.id,e);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new ce(this.id,ce.SUBTYPE_UUID)},t.generate=function(){var e=f(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,r.Buffer.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?O(e):!!m(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(E(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(ce),le=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function de(e){return w(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(le.prototype,"_bsontype",{value:"Code"});var fe=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var a=t.split(".");2===a.length&&(r=a.shift(),t=a.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(fe.prototype,"_bsontype",{value:"DBRef"});var he=void 0;try{he=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var me=4294967296,ve=0x10000000000000000,ye=ve/2,be={},ge={},we=function(){function e(t,n,r){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,n,r);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!n)):"string"==typeof t?Object.assign(this,e.fromString(t,!!n)):(this.low=0|t,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,a;return n?(a=0<=(t>>>=0)&&t<256)&&(i=ge[t])?i:(r=e.fromBits(t,(0|t)<0?-1:0,!0),a&&(ge[t]=r),r):(a=-128<=(t|=0)&&t<128)&&(i=be[t])?i:(r=e.fromBits(t,t<0?-1:0,!1),a&&(be[t]=r),r)},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=ve)return e.MAX_UNSIGNED_VALUE}else{if(t<=-ye)return e.MIN_VALUE;if(t+1>=ye)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%me|0,t/me|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),n,r).neg();for(var a=e.fromNumber(Math.pow(r,8)),o=e.ZERO,s=0;s<t.length;s+=8){var p=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+p),r);if(p<8){var u=e.fromNumber(Math.pow(r,p));o=o.mul(u).add(e.fromNumber(c))}else o=(o=o.mul(a)).add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(e){return w(e)&&!0===e.__isLong__},e.fromValue=function(t,n){return"number"==typeof t?e.fromNumber(t,n):"string"==typeof t?e.fromString(t,n):e.fromBits(t.low,t.high,"boolean"==typeof n?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,o=t.high>>>16,s=65535&t.high,p=t.low>>>16,c=0,u=0,l=0,d=0;return l+=(d+=a+(65535&t.low))>>>16,d&=65535,u+=(l+=i+p)>>>16,l&=65535,c+=(u+=r+s)>>>16,u&=65535,c+=n+o,c&=65535,e.fromBits(l<<16|d,c<<16|u,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(he){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var n=(this.unsigned?he.div_u:he.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;a=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(r=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),a=r.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),s=o<=48?1:Math.pow(2,o-48),p=e.fromNumber(r),c=p.mul(t);c.isNegative()||c.gt(i);)r-=s,c=(p=e.fromNumber(r,this.unsigned)).mul(t);p.isZero()&&(p=e.ONE),a=a.add(p),i=i.sub(c)}return a},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,n=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(n&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),he){var n=(this.unsigned?he.rem_u:he.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),he){var n=he.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,he.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,a=this.low>>>16,o=65535&this.low,s=t.high>>>16,p=65535&t.high,c=t.low>>>16,u=65535&t.low,l=0,d=0,f=0,h=0;return f+=(h+=o*u)>>>16,h&=65535,d+=(f+=a*u)>>>16,f&=65535,d+=(f+=o*c)>>>16,f&=65535,l+=(d+=i*u)>>>16,d&=65535,l+=(d+=a*c)>>>16,d&=65535,l+=(d+=o*p)>>>16,d&=65535,l+=r*u+i*c+a*p+o*s,l&=65535,e.fromBits(f<<16|h,l<<16|d,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*me+(this.low>>>0):this.high*me+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var a=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,s="";;){var p=o.div(a),c=(o.sub(p.mul(a)).toInt()>>>0).toString(t);if((o=p).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(we.prototype,"__isLong__",{value:!0}),Object.defineProperty(we.prototype,"_bsontype",{value:"Long"});var _e=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,xe=/^(\+|-)?(Infinity|inf)$/i,De=/^(\+|-)?NaN$/i,Oe=6111,Ee=-6176,Se=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),je=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ke=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Te=/^([-+])?(\d+)?$/;function Ne(e){return!isNaN(parseInt(e,10))}function Pe(e){var t=we.fromNumber(1e9),n=we.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new we(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function Ce(e,t){throw new p('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var Ae=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!m(t))throw new p("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new p("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var n,i=!1,a=!1,o=!1,s=0,c=0,u=0,l=0,d=0,f=[0],h=0,m=0,v=0,y=0,b=0,g=0,w=new we(0,0),_=new we(0,0),x=0;if(t.length>=7e3)throw new p(t+" not a valid Decimal128 string");var D=t.match(_e),O=t.match(xe),E=t.match(De);if(!D&&!O&&!E||0===t.length)throw new p(t+" not a valid Decimal128 string");if(D){var S=D[2],j=D[4],k=D[5],T=D[6];j&&void 0===T&&Ce(t,"missing exponent power"),j&&void 0===S&&Ce(t,"missing exponent base"),void 0===j&&(k||T)&&Ce(t,"missing e before exponent")}if("+"!==t[x]&&"-"!==t[x]||(i="-"===t[x++]),!Ne(t[x])&&"."!==t[x]){if("i"===t[x]||"I"===t[x])return new e(r.Buffer.from(i?je:ke));if("N"===t[x])return new e(r.Buffer.from(Se))}for(;Ne(t[x])||"."===t[x];)"."!==t[x]?(h<34&&("0"!==t[x]||o)&&(o||(d=c),o=!0,f[m++]=parseInt(t[x],10),h+=1),o&&(u+=1),a&&(l+=1),c+=1,x+=1):(a&&Ce(t,"contains multiple periods"),a=!0,x+=1);if(a&&!c)throw new p(t+" not a valid Decimal128 string");if("e"===t[x]||"E"===t[x]){var N=t.substr(++x).match(Te);if(!N||!N[2])return new e(r.Buffer.from(Se));b=parseInt(N[0],10),x+=N[0].length}if(t[x])return new e(r.Buffer.from(Se));if(v=0,h){if(y=h-1,1!==(s=u))for(;0===f[d+s-1];)s-=1}else v=0,y=0,f[0]=0,u=1,h=1,s=0;for(b<=l&&l-b>16384?b=Ee:b-=l;b>Oe;){if((y+=1)-v>34){if(f.join("").match(/^0+$/)){b=Oe;break}Ce(t,"overflow")}b-=1}for(;b<Ee||h<u;){if(0===y&&s<h){b=Ee,s=0;break}if(h<u?u-=1:y-=1,b<Oe)b+=1;else{if(f.join("").match(/^0+$/)){b=Oe;break}Ce(t,"overflow")}}if(y-v+1<s){var P=c;a&&(d+=1,P+=1),i&&(d+=1,P+=1);var C=parseInt(t[d+y+1],10),A=0;if(C>=5&&(A=1,5===C))for(A=f[y]%2==1?1:0,g=d+y+2;g<P;g++)if(parseInt(t[g],10)){A=1;break}if(A)for(var I=y;I>=0;I--)if(++f[I]>9&&(f[I]=0,0===I)){if(!(b<Oe))return new e(r.Buffer.from(i?je:ke));b+=1,f[I]=1}}if(w=we.fromNumber(0),_=we.fromNumber(0),0===s)w=we.fromNumber(0),_=we.fromNumber(0);else if(y-v<17)for(I=v,_=we.fromNumber(f[I++]),w=new we(0,0);I<=y;I++)_=(_=_.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]));else{for(I=v,w=we.fromNumber(f[I++]);I<=y-17;I++)w=(w=w.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]));for(_=we.fromNumber(f[I++]);I<=y;I++)_=(_=_.multiply(we.fromNumber(10))).add(we.fromNumber(f[I]))}var F,R,M,$,B=function(e,t){if(!e&&!t)return{high:we.fromNumber(0),low:we.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new we(e.getLowBits(),0),i=t.shiftRightUnsigned(32),a=new we(t.getLowBits(),0),o=n.multiply(i),s=n.multiply(a),p=r.multiply(i),c=r.multiply(a);return o=o.add(s.shiftRightUnsigned(32)),s=new we(s.getLowBits(),0).add(p).add(c.shiftRightUnsigned(32)),{high:o=o.add(s.shiftRightUnsigned(32)),low:c=s.shiftLeft(32).add(new we(c.getLowBits(),0))}}(w,we.fromString("100000000000000000"));B.low=B.low.add(_),R=_,((M=(F=B.low).high>>>0)<($=R.high>>>0)||M===$&&F.low>>>0<R.low>>>0)&&(B.high=B.high.add(we.fromNumber(1))),n=b+6176;var L={low:we.fromNumber(0),high:we.fromNumber(0)};B.high.shiftRightUnsigned(49).and(we.fromNumber(1)).equals(we.fromNumber(1))?(L.high=L.high.or(we.fromNumber(3).shiftLeft(61)),L.high=L.high.or(we.fromNumber(n).and(we.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(B.high.and(we.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(we.fromNumber(16383&n).shiftLeft(49)),L.high=L.high.or(B.high.and(we.fromNumber(562949953421311)))),L.low=B.low,i&&(L.high=L.high.or(we.fromString("9223372036854775808")));var V=r.Buffer.alloc(16);return x=0,V[x++]=255&L.low.low,V[x++]=L.low.low>>8&255,V[x++]=L.low.low>>16&255,V[x++]=L.low.low>>24&255,V[x++]=255&L.low.high,V[x++]=L.low.high>>8&255,V[x++]=L.low.high>>16&255,V[x++]=L.low.high>>24&255,V[x++]=255&L.high.low,V[x++]=L.high.low>>8&255,V[x++]=L.high.low>>16&255,V[x++]=L.high.low>>24&255,V[x++]=255&L.high.high,V[x++]=L.high.high>>8&255,V[x++]=L.high.high>>16&255,V[x++]=L.high.high>>24&255,new e(V)},e.prototype.toString=function(){for(var e,t=0,n=new Array(36),r=0;r<n.length;r++)n[r]=0;var i,a,o,s=0,p=!1,c={parts:[0,0,0,0]},u=[];s=0;var l=this.bytes,d=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,f=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,h=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24,m=l[s++]|l[s++]<<8|l[s++]<<16|l[s++]<<24;s=0,(new we(d,f),new we(h,m)).lessThan(we.ZERO)&&u.push("-");var v=m>>26&31;if(v>>3==3){if(30===v)return u.join("")+"Infinity";if(31===v)return"NaN";e=m>>15&16383,i=8+(m>>14&1)}else i=m>>14&7,e=m>>17&16383;var y=e-6176;if(c.parts[0]=(16383&m)+((15&i)<<14),c.parts[1]=h,c.parts[2]=f,c.parts[3]=d,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])p=!0;else for(o=3;o>=0;o--){var b=0,g=Pe(c);if(c=g.quotient,b=g.rem.low)for(a=8;a>=0;a--)n[9*o+a]=b%10,b=Math.floor(b/10)}if(p)t=1,n[s]=0;else for(t=36;!n[s];)t-=1,s+=1;var w=t-1+y;if(w>=34||w<=-7||y>0){if(t>34)return u.push("".concat(0)),y>0?u.push("E+".concat(y)):y<0&&u.push("E".concat(y)),u.join("");for(u.push("".concat(n[s++])),(t-=1)&&u.push("."),r=0;r<t;r++)u.push("".concat(n[s++]));u.push("E"),w>0?u.push("+".concat(w)):u.push("".concat(w))}else if(y>=0)for(r=0;r<t;r++)u.push("".concat(n[s++]));else{var _=t+y;if(_>0)for(r=0;r<_;r++)u.push("".concat(n[s++]));else u.push("0");for(u.push(".");_++<0;)u.push("0");for(r=0;r<t-Math.max(_-1,0);r++)u.push("".concat(n[s++]))}return u.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(Ae.prototype,"_bsontype",{value:"Decimal128"});var Ie=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(Ie.prototype,"_bsontype",{value:"Double"});var Fe=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Fe.prototype,"_bsontype",{value:"Int32"});var Re=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Re.prototype,"_bsontype",{value:"MaxKey"});var Me=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Me.prototype,"_bsontype",{value:"MinKey"});var $e=new RegExp("^[0-9a-fA-F]{24}$"),Be=null,Le=Symbol("id"),Ve=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new p("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in t&&"function"==typeof t.toHexString?r.Buffer.from(t.toHexString(),"hex"):t.id}else n=t;if(null==n||"number"==typeof n)this[Le]=e.generate("number"==typeof n?n:void 0);else if(ArrayBuffer.isView(n)&&12===n.byteLength)this[Le]=n instanceof r.Buffer?n:x(n);else{if("string"!=typeof n)throw new p("Argument passed in does not match the accepted types");if(12===n.length){var i=r.Buffer.from(n);if(12!==i.byteLength)throw new p("Argument passed in must be a string of 12 bytes");this[Le]=i}else{if(24!==n.length||!$e.test(n))throw new p("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[Le]=r.Buffer.from(n,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[Le]},set:function(t){this[Le]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),i=r.Buffer.alloc(12);return i.writeUInt32BE(t,0),null===Be&&(Be=f(5)),i[4]=Be[0],i[5]=Be[1],i[6]=Be[2],i[7]=Be[3],i[8]=Be[4],i[11]=255&n,i[10]=n>>8&255,i[9]=n>>16&255,i},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[Le][11]===t[Le][11]&&this[Le].equals(t[Le]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&m(this.id))return t===r.Buffer.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return r.Buffer.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var n=t.toHexString(),i=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===i}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var n=r.Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new p("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(r.Buffer.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(Ve.prototype,"generate",{value:_((function(e){return Ve.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(Ve.prototype,"getInc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve.prototype,"get_inc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve,"get_inc",{value:_((function(){return Ve.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(Ve.prototype,"_bsontype",{value:"ObjectID"});var qe=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new s("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new s("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if("i"!==this.options[r]&&"m"!==this.options[r]&&"x"!==this.options[r]&&"l"!==this.options[r]&&"s"!==this.options[r]&&"u"!==this.options[r])throw new s("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new p("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(qe.prototype,"_bsontype",{value:"BSONRegExp"});var Ue=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(Ue.prototype,"_bsontype",{value:"Symbol"});var ze=we,We=function(e){function t(n,r){var i=this;return i instanceof t?(i=we.isLong(n)?e.call(this,n.low,n.high,!0)||this:w(n)&&void 0!==n.t&&void 0!==n.i?e.call(this,n.i,n.t,!0)||this:e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return a(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(we.fromInt(e,!0))},t.fromNumber=function(e){return new t(we.fromNumber(e,!0))},t.fromBits=function(e,n){return new t(e,n)},t.fromString=function(e,n){return new t(we.fromString(e,!0,n))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=we.MAX_UNSIGNED_VALUE,t}(ze);function Qe(e){return w(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var He=2147483647,Ke=-2147483648,Ge=0x8000000000000000,Je=-0x8000000000000000,Ye={$oid:Ve,$binary:ce,$uuid:ce,$symbol:Ue,$numberInt:Fe,$numberDecimal:Ae,$numberDouble:Ie,$numberLong:we,$minKey:Me,$maxKey:Re,$regex:qe,$regularExpression:qe,$timestamp:We};function Ze(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=Ke&&e<=He)return new Fe(e);if(e>=Je&&e<=Ge)return we.fromNumber(e)}return new Ie(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),r=0;r<n.length;r++){var i=Ye[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var a=e.$date,o=new Date;return t.legacy?"number"==typeof a?o.setTime(a):"string"==typeof a&&o.setTime(Date.parse(a)):"string"==typeof a?o.setTime(Date.parse(a)):we.isLong(a)?o.setTime(a.toNumber()):"number"==typeof a&&t.relaxed&&o.setTime(a),o}if(null!=e.$code){var s=Object.assign({},e);return e.$scope&&(s.$scope=Ze(e.$scope)),le.fromExtendedJSON(e)}if(de(e)||e.$dbPointer){var p=e.$ref?e:e.$dbPointer;if(p instanceof fe)return p;var c=Object.keys(p).filter((function(e){return e.startsWith("$")})),u=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(u=!1)})),u)return fe.fromExtendedJSON(p)}return e}function Xe(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function et(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var n=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==n){var r=t.seenObjects.map((function(e){return e.propertyName})),i=r.slice(0,n).map((function(e){return"".concat(e," -> ")})).join(""),a=r[n],o=" -> "+r.slice(n+1,r.length-1).map((function(e){return"".concat(e," -> ")})).join(""),c=r[r.length-1],u=" ".repeat(i.length+a.length/2),l="-".repeat(o.length+(a.length+c.length)/2-1);throw new p("Converting circular structure to EJSON:\n"+" ".concat(i).concat(a).concat(o).concat(c,"\n")+" ".concat(u,"\\").concat(l,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return et(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||g(e)){var d=e.getTime(),f=d>-1&&d<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:Xe(e)}:t.relaxed&&f?{$date:Xe(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var h=e>=Je&&e<=Ge;if(e>=Ke&&e<=He)return{$numberInt:e.toString()};if(h)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||b(e)){var m=e.flags;if(void 0===m){var v=e.toString().match(/[gimuy]*$/);v&&(m=v[0])}return new qe(e.source,m).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new s("not an object instance");var n=e._bsontype;if(void 0===n){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var a=et(e[i],t);"__proto__"===i?Object.defineProperty(r,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):r[i]=a}finally{t.seenObjects.pop()}}return r}if(Qe(e)){var o=e;if("function"!=typeof o.toExtendedJSON){var c=rt[e._bsontype];if(!c)throw new p("Unrecognized or invalid _bsontype: "+e._bsontype);o=c(o)}return"Code"===n&&o.scope?o=new le(o.code,et(o.scope,t)):"DBRef"===n&&o.oid&&(o=new fe(et(o.collection,t),et(o.oid,t),et(o.db,t),et(o.fields,t))),o.toExtendedJSON(t)}throw new s("_bsontype must be a string, but was: "+typeof n)}(e,t):e}var tt,nt,rt={Binary:function(e){return new ce(e.value(),e.sub_type)},Code:function(e){return new le(e.code,e.scope)},DBRef:function(e){return new fe(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new Ae(e.bytes)},Double:function(e){return new Ie(e.value)},Int32:function(e){return new Fe(e.value)},Long:function(e){return we.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Re},MinKey:function(){return new Me},ObjectID:function(e){return new Ve(e)},ObjectId:function(e){return new Ve(e)},BSONRegExp:function(e){return new qe(e.pattern,e.options)},Symbol:function(e){return new Ue(e.value)},Timestamp:function(e){return We.fromBits(e.low,e.high)}};!function(e){function t(e,t){var n=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new s("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return Ze(t,n)}))}function n(e,t,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==t||"object"!=typeof t||Array.isArray(t)||(r=t,t=void 0,n=0);var i=et(e,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,n)}e.parse=t,e.stringify=n,e.serialize=function(e,t){return t=t||{},JSON.parse(n(e,t))},e.deserialize=function(e,n){return n=n||{},t(JSON.stringify(e),n)}}(tt||(tt={}));var it=u();function at(e,t,n){var r=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)r+=ot(i.toString(),e[i],t,!0,n);else for(var a in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)r+=ot(a,e[a],t,!1,n);return r}function ot(e,t,n,i,a){switch(void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===a&&(a=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+r.Buffer.byteLength(e,"utf8")+1+4+r.Buffer.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=C&&t<=P&&t>=k&&t<=j?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+5:(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;case"undefined":return i||!a?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||g(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||h(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+4+r.Buffer.byteLength(t.code.toString(),"utf8")+1+at(t.scope,n,a):(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+r.Buffer.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===ce.SUBTYPE_BYTE_ARRAY?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+r.Buffer.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+at(s,n,a)}return t instanceof RegExp||b(t)?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.pattern,"utf8")+1+r.Buffer.byteLength(t.options,"utf8")+1:(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+at(t,n,a)+1;case"function":if(t instanceof RegExp||b(t)||"[object RegExp]"===String.call(t))return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+r.Buffer.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(n&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+4+r.Buffer.byteLength(l(t),"utf8")+1+at(t.scope,n,a);if(n)return(null!=e?r.Buffer.byteLength(e,"utf8")+1:0)+1+4+r.Buffer.byteLength(l(t),"utf8")+1}return 0}function st(e,t,n){for(var r=0,i=t;i<n;i+=1){var a=e[i];if(r){if(128!=(192&a))return!1;r-=1}else if(128&a)if(192==(224&a))r=1;else if(224==(240&a))r=2;else{if(240!=(248&a))return!1;r=3}}return!r}nt=it.Map?it.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var n=e[t],r=n[0],i=n[1];this._keys.push(r),this._values[r]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?[n,e._values[n].v]:void 0,done:void 0===n}}}},e.prototype.forEach=function(e,t){t=t||this;for(var n=0;n<this._keys.length;n++){var r=this._keys[n];e.call(t,this._values[r].v,r,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?n:void 0,done:void 0===n}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var n=e._keys[t++];return{value:void 0!==n?e._values[n].v:void 0,done:void 0===n}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var pt=we.fromNumber(P),ct=we.fromNumber(C),ut={};function lt(e,t,n){var r=(t=null==t?{}:t)&&t.index?t.index:0,i=e[r]|e[r+1]<<8|e[r+2]<<16|e[r+3]<<24;if(i<5)throw new s("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new s("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new s("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+r>e.byteLength)throw new s("(bson size ".concat(i," + options.index ").concat(r," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[r+i-1])throw new s("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return ft(e,r,t,n)}var dt=/^\$ref$|^\$id$|^\$db$/;function ft(e,t,n,i){void 0===i&&(i=!1);var a,p=null!=n.evalFunctions&&n.evalFunctions,c=null!=n.cacheFunctions&&n.cacheFunctions,u=null==n.fieldsAsRaw?null:n.fieldsAsRaw,l=null!=n.raw&&n.raw,d="boolean"==typeof n.bsonRegExp&&n.bsonRegExp,f=null!=n.promoteBuffers&&n.promoteBuffers,h=null==n.promoteLongs||n.promoteLongs,m=null==n.promoteValues||n.promoteValues,v=null==n.validation?{utf8:!0}:n.validation,y=!0,b=new Set,g=v.utf8;if("boolean"==typeof g)a=g;else{y=!1;var w=Object.keys(g).map((function(e){return g[e]}));if(0===w.length)throw new s("UTF-8 validation setting cannot be empty");if("boolean"!=typeof w[0])throw new s("Invalid UTF-8 validation option, must specify boolean values");if(a=w[0],!w.every((function(e){return e===a})))throw new s("Invalid UTF-8 validation option - keys must be all true or all false")}if(!y)for(var _=0,x=Object.keys(g);_<x.length;_++){var D=x[_];b.add(D)}var O=t;if(e.length<5)throw new s("corrupt bson message < 5 bytes long");var E=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(E<5||E>e.length)throw new s("corrupt bson message");for(var S=i?[]:{},j=0,k=!i&&null,T=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var N=e[t++];if(0===N)break;for(var P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.byteLength)throw new s("Bad BSON Document: illegal CString");var C,ee=i?j++:e.toString("utf8",t,P);C=y||b.has(ee)?a:!a,!1!==k&&"$"===ee[0]&&(k=dt.test(ee));var te=void 0;if(t=P+1,N===I){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");te=mt(e,t,t+Pe-1,C),t+=Pe}else if(N===B){var ne=r.Buffer.alloc(12);e.copy(ne,0,t,t+12),te=new Ve(ne),t+=12}else if(N===K&&!1===m)te=new Fe(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(N===K)te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(N===A&&!1===m)te=new Ie(T.getFloat64(t,!0)),t+=8;else if(N===A)te=T.getFloat64(t,!0),t+=8;else if(N===V){var re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;te=new Date(new we(re,ae).toNumber())}else if(N===L){if(0!==e[t]&&1!==e[t])throw new s("illegal boolean type value");te=1===e[t++]}else if(N===F){var oe=t;if((Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Te>e.length-t)throw new s("bad embedded document length in bson");if(l)te=e.slice(t,t+Te);else{var se=n;y||(se=o(o({},n),{validation:{utf8:C}})),te=ft(e,oe,se,!1)}t+=Te}else if(N===R){oe=t;var pe=n,ue=t+(Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(u&&u[ee]){for(var he in pe={},n)pe[he]=n[he];pe.raw=!0}if(y||(pe=o(o({},pe),{validation:{utf8:C}})),te=ft(e,oe,pe,!0),0!==e[(t+=Te)-1])throw new s("invalid array terminator byte");if(t!==ue)throw new s("corrupted array bson")}else if(N===$)te=void 0;else if(N===q)te=null;else if(N===J){re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var me=new we(re,ae);te=h&&!0===m&&me.lessThanOrEqual(pt)&&me.greaterThanOrEqual(ct)?me.toNumber():me}else if(N===Y){var ve=r.Buffer.alloc(16);e.copy(ve,0,t,t+16),t+=16;var ye=new Ae(ve);te="toObject"in ye&&"function"==typeof ye.toObject?ye.toObject():ye}else if(N===M){var be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ge=be,_e=e[t++];if(be<0)throw new s("Negative binary type element size found");if(be>e.byteLength)throw new s("Binary type size larger than document size");if(null!=e.slice){if(_e===ce.SUBTYPE_BYTE_ARRAY){if((be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new s("Negative binary type element size found for subtype 0x02");if(be>ge-4)throw new s("Binary type with subtype 0x02 contains too long binary size");if(be<ge-4)throw new s("Binary type with subtype 0x02 contains too short binary size")}f&&m?te=e.slice(t,t+be):(te=new ce(e.slice(t,t+be),_e),_e===ie&&(te=te.toUUID()))}else{var xe=r.Buffer.alloc(be);if(_e===ce.SUBTYPE_BYTE_ARRAY){if((be=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new s("Negative binary type element size found for subtype 0x02");if(be>ge-4)throw new s("Binary type with subtype 0x02 contains too long binary size");if(be<ge-4)throw new s("Binary type with subtype 0x02 contains too short binary size")}for(P=0;P<be;P++)xe[P]=e[t+P];te=f&&m?xe:_e===ie?new ce(e.slice(t,t+be),_e).toUUID():new ce(e.slice(t,t+be),_e)}t+=be}else if(N===U&&!1===d){for(P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");var De=e.toString("utf8",t,P);for(P=t=P+1;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");var Oe=e.toString("utf8",t,P);t=P+1;var Ee=new Array(Oe.length);for(P=0;P<Oe.length;P++)switch(Oe[P]){case"m":Ee[P]="m";break;case"s":Ee[P]="g";break;case"i":Ee[P]="i"}te=new RegExp(De,Ee.join(""))}else if(N===U&&!0===d){for(P=t;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");for(De=e.toString("utf8",t,P),P=t=P+1;0!==e[P]&&P<e.length;)P++;if(P>=e.length)throw new s("Bad BSON Document: illegal CString");Oe=e.toString("utf8",t,P),t=P+1,te=new qe(De,Oe)}else if(N===Q){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");var Se=mt(e,t,t+Pe-1,C);te=m?Se:new Ue(Se),t+=Pe}else if(N===G)re=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,te=new We(re,ae);else if(N===Z)te=new Me;else if(N===X)te=new Re;else if(N===W){if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");var je=mt(e,t,t+Pe-1,C);te=p?c?ht(je,ut,S):ht(je):new le(je),t+=Pe}else if(N===H){var ke=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(ke<13)throw new s("code_w_scope total size shorter minimum expected length");if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");je=mt(e,t,t+Pe-1,C),oe=t+=Pe;var Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,Ne=ft(e,oe,n,!1);if(t+=Te,ke<8+Te+Pe)throw new s("code_w_scope total size is too short, truncating scope");if(ke>8+Te+Pe)throw new s("code_w_scope total size is too long, clips outer document");p?(te=c?ht(je,ut,S):ht(je)).scope=Ne:te=new le(je,Ne)}else{if(N!==z)throw new s("Detected unknown BSON type ".concat(N.toString(16),' for fieldname "').concat(ee,'"'));var Pe;if((Pe=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Pe>e.length-t||0!==e[t+Pe-1])throw new s("bad string length in bson");if(null!=v&&v.utf8&&!st(e,t,t+Pe-1))throw new s("Invalid UTF-8 string in BSON document");var Ce=e.toString("utf8",t,t+Pe-1);t+=Pe;var $e=r.Buffer.alloc(12);e.copy($e,0,t,t+12),ne=new Ve($e),t+=12,te=new fe(Ce,ne)}"__proto__"===ee?Object.defineProperty(S,ee,{value:te,writable:!0,enumerable:!0,configurable:!0}):S[ee]=te}if(E!==t-O){if(i)throw new s("corrupt array bson");throw new s("corrupt object bson")}if(!k)return S;if(de(S)){var Be=Object.assign({},S);return delete Be.$ref,delete Be.$id,delete Be.$db,new fe(S.$ref,S.$id,S.$db,Be)}return S}function ht(e,t,n){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(n)):new Function(e)}function mt(e,t,n,r){var i=e.toString("utf8",t,n);if(r)for(var a=0;a<i.length;a++)if(65533===i.charCodeAt(a)){if(!st(e,t,n))throw new s("Invalid UTF-8 string in BSON document");break}return i}var vt=/\x00/,yt=new Set(["$db","$ref","$id","$clusterTime"]);function bt(e,t,n,r,i){e[r++]=I;var a=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8");e[(r=r+a+1)-1]=0;var o=e.write(n,r+4,void 0,"utf8");return e[r+3]=o+1>>24&255,e[r+2]=o+1>>16&255,e[r+1]=o+1>>8&255,e[r]=o+1&255,r=r+4+o,e[r++]=0,r}var gt=new Uint8Array(8),wt=new DataView(gt.buffer,gt.byteOffset,gt.byteLength);function _t(e,t,n,r,i){return Number.isInteger(n)&&n>=k&&n<=j?(e[r++]=K,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255):(e[r++]=A,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,wt.setFloat64(0,n,!0),e.set(gt,r),r+=8),r}function xt(e,t,n,r,i){return e[r++]=q,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function Dt(e,t,n,r,i){return e[r++]=L,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=n?1:0,r}function Ot(e,t,n,r,i){e[r++]=V,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=we.fromNumber(n.getTime()),o=a.getLowBits(),s=a.getHighBits();return e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=255&s,e[r++]=s>>8&255,e[r++]=s>>16&255,e[r++]=s>>24&255,r}function Et(e,t,n,r,i){if(e[r++]=U,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,n.source&&null!=n.source.match(vt))throw Error("value "+n.source+" must not contain null bytes");return r+=e.write(n.source,r,void 0,"utf8"),e[r++]=0,n.ignoreCase&&(e[r++]=105),n.global&&(e[r++]=115),n.multiline&&(e[r++]=109),e[r++]=0,r}function St(e,t,n,r,i){if(e[r++]=U,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,null!=n.pattern.match(vt))throw Error("pattern "+n.pattern+" must not contain null bytes");return r+=e.write(n.pattern,r,void 0,"utf8"),e[r++]=0,r+=e.write(n.options.split("").sort().join(""),r,void 0,"utf8"),e[r++]=0,r}function jt(e,t,n,r,i){return null===n?e[r++]=q:"MinKey"===n._bsontype?e[r++]=Z:e[r++]=X,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,r}function kt(e,t,n,r,i){if(e[r++]=B,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,"string"==typeof n.id)e.write(n.id,r,void 0,"binary");else{if(!m(n.id))throw new p("object ["+JSON.stringify(n)+"] is not a valid ObjectId");e.set(n.id.subarray(0,12),r)}return r+12}function Tt(e,t,n,r,i){e[r++]=M,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.length;return e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,e[r++]=ee,e.set(x(n),r),r+a}function Nt(e,t,n,r,i,a,o,p,c,u){void 0===i&&(i=!1),void 0===a&&(a=0),void 0===o&&(o=!1),void 0===p&&(p=!0),void 0===c&&(c=!1),void 0===u&&(u=[]);for(var l=0;l<u.length;l++)if(u[l]===n)throw new s("cyclic dependency detected");u.push(n),e[r++]=Array.isArray(n)?R:F,r+=c?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var d=Lt(e,n,i,r,a+1,o,p,u);return u.pop(),d}function Pt(e,t,n,r,i){return e[r++]=Y,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e.set(n.bytes.subarray(0,16),r),r+16}function Ct(e,t,n,r,i){e[r++]="Long"===n._bsontype?J:G,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.getLowBits(),o=n.getHighBits();return e[r++]=255&a,e[r++]=a>>8&255,e[r++]=a>>16&255,e[r++]=a>>24&255,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,r}function At(e,t,n,r,i){return n=n.valueOf(),e[r++]=K,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,e[r++]=255&n,e[r++]=n>>8&255,e[r++]=n>>16&255,e[r++]=n>>24&255,r}function It(e,t,n,r,i){return e[r++]=A,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,wt.setFloat64(0,n.value,!0),e.set(gt,r),r+8}function Ft(e,t,n,r,i,a,o){e[r++]=W,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=l(n),p=e.write(s,r+4,void 0,"utf8")+1;return e[r]=255&p,e[r+1]=p>>8&255,e[r+2]=p>>16&255,e[r+3]=p>>24&255,r=r+4+p-1,e[r++]=0,r}function Rt(e,t,n,r,i,a,o,s,p){if(void 0===i&&(i=!1),void 0===a&&(a=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===p&&(p=!1),n.scope&&"object"==typeof n.scope){e[r++]=H,r+=p?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var c=r,u="string"==typeof n.code?n.code:n.code.toString();r+=4;var l=e.write(u,r+4,void 0,"utf8")+1;e[r]=255&l,e[r+1]=l>>8&255,e[r+2]=l>>16&255,e[r+3]=l>>24&255,e[r+4+l-1]=0,r=r+l+4;var d=Lt(e,n.scope,i,r,a+1,o,s);r=d-1;var f=d-c;e[c++]=255&f,e[c++]=f>>8&255,e[c++]=f>>16&255,e[c++]=f>>24&255,e[r++]=0}else{e[r++]=W,r+=p?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0,u=n.code.toString();var h=e.write(u,r+4,void 0,"utf8")+1;e[r]=255&h,e[r+1]=h>>8&255,e[r+2]=h>>16&255,e[r+3]=h>>24&255,r=r+4+h-1,e[r++]=0}return r}function Mt(e,t,n,r,i){e[r++]=M,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=n.value(!0),o=n.position;return n.sub_type===ce.SUBTYPE_BYTE_ARRAY&&(o+=4),e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255,e[r++]=n.sub_type,n.sub_type===ce.SUBTYPE_BYTE_ARRAY&&(o-=4,e[r++]=255&o,e[r++]=o>>8&255,e[r++]=o>>16&255,e[r++]=o>>24&255),e.set(a,r),r+n.position}function $t(e,t,n,r,i){e[r++]=Q,r+=i?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var a=e.write(n.value,r+4,void 0,"utf8")+1;return e[r]=255&a,e[r+1]=a>>8&255,e[r+2]=a>>16&255,e[r+3]=a>>24&255,r=r+4+a-1,e[r++]=0,r}function Bt(e,t,n,r,i,a,o){e[r++]=F,r+=o?e.write(t,r,void 0,"ascii"):e.write(t,r,void 0,"utf8"),e[r++]=0;var s=r,p={$ref:n.collection||n.namespace,$id:n.oid};null!=n.db&&(p.$db=n.db);var c=Lt(e,p=Object.assign(p,n.fields),!1,r,i+1,a),u=c-s;return e[s++]=255&u,e[s++]=u>>8&255,e[s++]=u>>16&255,e[s++]=u>>24&255,c}function Lt(e,t,n,r,i,a,o,s){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===s&&(s=[]),r=r||0,(s=s||[]).push(t);var c,u=r+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var d="".concat(l);if("function"==typeof(null==(x=t[l])?void 0:x.toBSON)&&(x=x.toBSON()),"string"==typeof x)u=bt(e,d,x,u,!0);else if("number"==typeof x)u=_t(e,d,x,u,!0);else{if("bigint"==typeof x)throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof x)u=Dt(e,d,x,u,!0);else if(x instanceof Date||g(x))u=Ot(e,d,x,u,!0);else if(void 0===x)u=xt(e,d,0,u,!0);else if(null===x)u=xt(e,d,0,u,!0);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u,!0);else if(m(x))u=Tt(e,d,x,u,!0);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u,!0);else if("object"==typeof x&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!0,s);else if("object"==typeof x&&Qe(x)&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u,!0);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u,!0);else if("Double"===x._bsontype)u=It(e,d,x,u,!0);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,!0);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o,!0);else if("Binary"===x._bsontype)u=Mt(e,d,x,u,!0);else if("Symbol"===x._bsontype)u=$t(e,d,x,u,!0);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a,!0);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u,!0);else if("Int32"===x._bsontype)u=At(e,d,x,u,!0);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u,!0);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}else if(t instanceof nt||(c=t,"[object Map]"===Object.prototype.toString.call(c)))for(var f=t.entries(),h=!1;!h;){var w=f.next();if(!(h=!!w.done)){d=w.value[0];var _=typeof(x=w.value[1]);if("string"==typeof d&&!yt.has(d)){if(null!=d.match(vt))throw Error("key "+d+" must not contain null bytes");if(n){if("$"===d[0])throw Error("key "+d+" must not start with '$'");if(~d.indexOf("."))throw Error("key "+d+" must not contain '.'")}}if("string"===_)u=bt(e,d,x,u);else if("number"===_)u=_t(e,d,x,u);else{if("bigint"===_||v(x)||y(x))throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"===_)u=Dt(e,d,x,u);else if(x instanceof Date||g(x))u=Ot(e,d,x,u);else if(null===x||void 0===x&&!1===o)u=xt(e,d,0,u);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u);else if(m(x))u=Tt(e,d,x,u);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u);else if("object"===_&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!1,s);else if("object"===_&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u);else if("Double"===x._bsontype)u=It(e,d,x,u);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,a);else if("Binary"===x._bsontype)u=Mt(e,d,x,u);else if("Symbol"===x._bsontype)u=$t(e,d,x,u);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u);else if("Int32"===x._bsontype)u=At(e,d,x,u);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new p("toBSON function did not return an object");for(var d in t){var x;if("function"==typeof(null==(x=t[d])?void 0:x.toBSON)&&(x=x.toBSON()),_=typeof x,"string"==typeof d&&!yt.has(d)){if(null!=d.match(vt))throw Error("key "+d+" must not contain null bytes");if(n){if("$"===d[0])throw Error("key "+d+" must not start with '$'");if(~d.indexOf("."))throw Error("key "+d+" must not contain '.'")}}if("string"===_)u=bt(e,d,x,u);else if("number"===_)u=_t(e,d,x,u);else{if("bigint"===_)throw new p("Unsupported type BigInt, please use Decimal128");if("boolean"===_)u=Dt(e,d,x,u);else if(x instanceof Date||g(x))u=Ot(e,d,x,u);else if(void 0===x)!1===o&&(u=xt(e,d,0,u));else if(null===x)u=xt(e,d,0,u);else if("ObjectId"===x._bsontype||"ObjectID"===x._bsontype)u=kt(e,d,x,u);else if(m(x))u=Tt(e,d,x,u);else if(x instanceof RegExp||b(x))u=Et(e,d,x,u);else if("object"===_&&null==x._bsontype)u=Nt(e,d,x,u,n,i,a,o,!1,s);else if("object"===_&&"Decimal128"===x._bsontype)u=Pt(e,d,x,u);else if("Long"===x._bsontype||"Timestamp"===x._bsontype)u=Ct(e,d,x,u);else if("Double"===x._bsontype)u=It(e,d,x,u);else if("Code"===x._bsontype)u=Rt(e,d,x,u,n,i,a,o);else if("function"==typeof x&&a)u=Ft(e,d,x,u,0,0,a);else if("Binary"===x._bsontype)u=Mt(e,d,x,u);else if("Symbol"===x._bsontype)u=$t(e,d,x,u);else if("DBRef"===x._bsontype)u=Bt(e,d,x,u,i,a);else if("BSONRegExp"===x._bsontype)u=St(e,d,x,u);else if("Int32"===x._bsontype)u=At(e,d,x,u);else if("MinKey"===x._bsontype||"MaxKey"===x._bsontype)u=jt(e,d,x,u);else if(void 0!==x._bsontype)throw new p("Unrecognized or invalid _bsontype: ".concat(String(x._bsontype)))}}}s.pop(),e[u++]=0;var D=u-r;return e[r++]=255&D,e[r++]=D>>8&255,e[r++]=D>>16&255,e[r++]=D>>24&255,u}var Vt=17825792,qt=r.Buffer.alloc(Vt);function Ut(e){qt.length<e&&(qt=r.Buffer.alloc(e))}function zt(e,t){void 0===t&&(t={});var n="boolean"==typeof t.checkKeys&&t.checkKeys,i="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,a="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:Vt;qt.length<o&&(qt=r.Buffer.alloc(o));var s=Lt(qt,e,n,0,0,i,a,[]),p=r.Buffer.alloc(s);return qt.copy(p,0,0,p.length),p}function Wt(e,t,n){void 0===n&&(n={});var r="boolean"==typeof n.checkKeys&&n.checkKeys,i="boolean"==typeof n.serializeFunctions&&n.serializeFunctions,a="boolean"!=typeof n.ignoreUndefined||n.ignoreUndefined,o="number"==typeof n.index?n.index:0,s=Lt(qt,e,r,0,0,i,a);return qt.copy(t,o,0,s),o+s-1}function Qt(e,t){return void 0===t&&(t={}),lt(e instanceof r.Buffer?e:x(e),t)}function Ht(e,t){return void 0===t&&(t={}),at(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function Kt(e,t,n,r,i,a){for(var o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},a),s=x(e),p=t,c=0;c<n;c++){var u=s[p]|s[p+1]<<8|s[p+2]<<16|s[p+3]<<24;o.index=p,r[i+c]=lt(s,o),p+=u}return p}const Gt={Binary:ce,Code:le,DBRef:fe,Decimal128:Ae,Double:Ie,Int32:Fe,Long:we,UUID:ue,Map:nt,MaxKey:Re,MinKey:Me,ObjectId:Ve,ObjectID:Ve,BSONRegExp:qe,BSONSymbol:Ue,Timestamp:We,EJSON:tt,setInternalBufferSize:Ut,serialize:zt,serializeWithBufferAndIndex:Wt,deserialize:Qt,calculateObjectSize:Ht,deserializeStream:Kt,BSONError:s,BSONTypeError:p}},74464:(e,t,n)=>{var r=n(73837),i=n(12781).Stream,a=n(59444);function o(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=o,r.inherits(o,i),o.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},o.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},o.prototype.append=function(e){if(o.isStreamLike(e)){if(!(e instanceof a)){var t=a.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},o.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},o.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},o.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){o.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},o.prototype._pipeNext=function(e){if(this._currentStream=e,o.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},o.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},o.prototype.write=function(e){this.emit("data",e)},o.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},o.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},o.prototype.end=function(){this._reset(),this.emit("end")},o.prototype.destroy=function(){this._reset(),this.emit("close")},o.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},o.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},o.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},o.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},15699:(e,t,n)=>{const r=n(32889),i=r.default||r,a=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),i.call(this,e,t)};a.ponyfill=!0,e.exports=t=a,t.fetch=a,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,t.default=a},36926:(e,t,n)=>{"use strict";var r=n(85477),i=n(64847),a={TRANSITIONAL:0,NONTRANSITIONAL:1};function o(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function s(e){for(var t=0,n=i.length-1;t<=n;){var r=Math.floor((t+n)/2),a=i[r];if(a[0][0]<=e&&a[0][1]>=e)return a;a[0][0]>e?n=r-1:t=r+1}return null}var p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function c(e){return e.replace(p,"_").length}var u=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function l(e,t){"xn--"===e.substr(0,4)&&(e=r.toUnicode(e));var n=!1;(o(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(u))&&(n=!0);for(var i=c(e),p=0;p<i;++p){var l=s(e.codePointAt(p));if(d===a.TRANSITIONAL&&"valid"!==l[1]||d===a.NONTRANSITIONAL&&"valid"!==l[1]&&"deviation"!==l[1]){n=!0;break}}return{label:e,error:n}}function d(e,t,n){var r=function(e,t,n){for(var r=!1,i="",o=c(e),p=0;p<o;++p){var u=e.codePointAt(p),l=s(u);switch(l[1]){case"disallowed":r=!0,i+=String.fromCodePoint(u);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,l[2]);break;case"deviation":i+=n===a.TRANSITIONAL?String.fromCodePoint.apply(String,l[2]):String.fromCodePoint(u);break;case"valid":i+=String.fromCodePoint(u);break;case"disallowed_STD3_mapped":t?(r=!0,i+=String.fromCodePoint(u)):i+=String.fromCodePoint.apply(String,l[2]);break;case"disallowed_STD3_valid":t&&(r=!0),i+=String.fromCodePoint(u)}}return{string:i,error:r}}(e,t,n);r.string=o(r.string);for(var i=r.string.split("."),p=0;p<i.length;++p)try{var u=l(i[p]);i[p]=u.label,r.error=r.error||u.error}catch(e){r.error=!0}return{string:i.join("."),error:r.error}}e.exports.toASCII=function(e,t,n,i){var a=d(e,t,n),o=a.string.split(".");if(o=o.map((function(e){try{return r.toASCII(e)}catch(t){return a.error=!0,e}})),i){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(a.error=!0);for(var p=0;p<o.length;++p)if(o.length>63||0===o.length){a.error=!0;break}}return a.error?null:o.join(".")},e.exports.toUnicode=function(e,t){var n=d(e,t,a.NONTRANSITIONAL);return{domain:n.string,error:n.error}},e.exports.PROCESSING_OPTIONS=a},71396:e=>{"use strict";var t={};function n(e){return e<0?-1:1}function r(e,t){t.unsigned||--e;const r=t.unsigned?0:-Math.pow(2,e),i=Math.pow(2,e)-1,a=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),o=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let p=+e;if(s.enforceRange){if(!Number.isFinite(p))throw new TypeError("Argument is not a finite number");if(p=n(p)*Math.floor(Math.abs(p)),p<r||p>i)throw new TypeError("Argument is not in byte range");return p}if(!isNaN(p)&&s.clamp)return p=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(p),p<r&&(p=r),p>i&&(p=i),p;if(!Number.isFinite(p)||0===p)return 0;if(p=n(p)*Math.floor(Math.abs(p)),p%=a,!t.unsigned&&p>=o)return p-a;if(t.unsigned)if(p<0)p+=a;else if(-0===p)return 0;return p}}e.exports=t,t.void=function(){},t.boolean=function(e){return!!e},t.byte=r(8,{unsigned:!1}),t.octet=r(8,{unsigned:!0}),t.short=r(16,{unsigned:!1}),t["unsigned short"]=r(16,{unsigned:!0}),t.long=r(32,{unsigned:!1}),t["unsigned long"]=r(32,{unsigned:!0}),t["long long"]=r(32,{unsigned:!1,moduloBitLength:64}),t["unsigned long long"]=r(32,{unsigned:!0,moduloBitLength:64}),t.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},t["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},t.float=t.double,t["unrestricted float"]=t["unrestricted double"],t.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},t.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},t.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const i=t.charCodeAt(e);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&i,a=1023&n;r.push(String.fromCodePoint(65536+1024*t+a)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},t.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},t.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e}},98911:(e,t,n)=>{"use strict";const r=n(19715);t.implementation=class{constructor(e){const t=e[0],n=e[1];let i=null;if(void 0!==n&&(i=r.basicURLParse(n),"failure"===i))throw new TypeError("Invalid base URL");const a=r.basicURLParse(t,{baseURL:i});if("failure"===a)throw new TypeError("Invalid URL");this._url=a}get href(){return r.serializeURL(this._url)}set href(e){const t=r.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return r.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){r.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){r.cannotHaveAUsernamePasswordPort(this._url)||r.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){r.cannotHaveAUsernamePasswordPort(this._url)||r.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?r.serializeHost(e.host):r.serializeHost(e.host)+":"+r.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||r.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":r.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||r.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":r.serializeInteger(this._url.port)}set port(e){r.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:r.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],r.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",r.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",r.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},46700:(e,t,n)=>{"use strict";const r=n(71396),i=n(22689),a=n(98911),o=i.implSymbol;function s(t){if(!this||this[o]||!(this instanceof s))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const n=[];for(let e=0;e<arguments.length&&e<2;++e)n[e]=arguments[e];n[0]=r.USVString(n[0]),void 0!==n[1]&&(n[1]=r.USVString(n[1])),e.exports.setup(this,n)}s.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const t=[];for(let e=0;e<arguments.length&&e<0;++e)t[e]=arguments[e];return this[o].toJSON.apply(this[o],t)},Object.defineProperty(s.prototype,"href",{get(){return this[o].href},set(e){e=r.USVString(e),this[o].href=e},enumerable:!0,configurable:!0}),s.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(s.prototype,"origin",{get(){return this[o].origin},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"protocol",{get(){return this[o].protocol},set(e){e=r.USVString(e),this[o].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"username",{get(){return this[o].username},set(e){e=r.USVString(e),this[o].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"password",{get(){return this[o].password},set(e){e=r.USVString(e),this[o].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"host",{get(){return this[o].host},set(e){e=r.USVString(e),this[o].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hostname",{get(){return this[o].hostname},set(e){e=r.USVString(e),this[o].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"port",{get(){return this[o].port},set(e){e=r.USVString(e),this[o].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pathname",{get(){return this[o].pathname},set(e){e=r.USVString(e),this[o].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"search",{get(){return this[o].search},set(e){e=r.USVString(e),this[o].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hash",{get(){return this[o].hash},set(e){e=r.USVString(e),this[o].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[o]instanceof a.implementation,create(e,t){let n=Object.create(s.prototype);return this.setup(n,e,t),n},setup(e,t,n){n||(n={}),n.wrapper=e,e[o]=new a.implementation(t,n),e[o][i.wrapperSymbol]=e},interface:s,expose:{Window:{URL:s},Worker:{URL:s}}}},74851:(e,t,n)=>{"use strict";t.URL=n(46700).interface,n(19715).serializeURL,n(19715).serializeURLOrigin,n(19715).basicURLParse,n(19715).setTheUsername,n(19715).setThePassword,n(19715).serializeHost,n(19715).serializeInteger,n(19715).parseURL},19715:(e,t,n)=>{"use strict";const r=n(85477),i=n(36926),a={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},o=Symbol("failure");function s(e){return r.ucs2.decode(e).length}function p(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function c(e){return e>=48&&e<=57}function u(e){return e>=65&&e<=90||e>=97&&e<=122}function l(e){return c(e)||e>=65&&e<=70||e>=97&&e<=102}function d(e){return"."===e||"%2e"===e.toLowerCase()}function f(e){return 2===e.length&&u(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function h(e){return void 0!==a[e]}function m(e){return h(e.scheme)}function v(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function y(e){return e<=31||e>126}const b=new Set([32,34,35,60,62,63,96,123,125]);function g(e){return y(e)||b.has(e)}const w=new Set([47,58,59,61,64,91,92,93,94,124]);function _(e){return g(e)||w.has(e)}function x(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=v(t[e]);return n}(n):n}function D(e){let t=10;return e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e?0:(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?o:parseInt(e,t)}function O(e,t){if("["===e[0])return"]"!==e[e.length-1]?o:function(e){const t=[0,0,0,0,0,0,0,0];let n=0,i=null,a=0;if(58===(e=r.ucs2.decode(e))[a]){if(58!==e[a+1])return o;a+=2,++n,i=n}for(;a<e.length;){if(8===n)return o;if(58===e[a]){if(null!==i)return o;++a,++n,i=n;continue}let r=0,s=0;for(;s<4&&l(e[a]);)r=16*r+parseInt(p(e,a),16),++a,++s;if(46===e[a]){if(0===s)return o;if(a-=s,n>6)return o;let r=0;for(;void 0!==e[a];){let i=null;if(r>0){if(!(46===e[a]&&r<4))return o;++a}if(!c(e[a]))return o;for(;c(e[a]);){const t=parseInt(p(e,a));if(null===i)i=t;else{if(0===i)return o;i=10*i+t}if(i>255)return o;++a}t[n]=256*t[n]+i,++r,2!==r&&4!==r||++n}if(4!==r)return o;break}if(58===e[a]){if(++a,void 0===e[a])return o}else if(void 0!==e[a])return o;t[n]=r,++n}if(null!==i){let e=n-i;for(n=7;0!==n&&e>0;){const r=t[i+e-1];t[i+e-1]=t[n],t[n]=r,--n,--e}}else if(null===i&&8!==n)return o;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return o;let t="";const n=r.ucs2.decode(e);for(let e=0;e<n.length;++e)t+=x(n[e],y);return t}(e);const n=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&l(t[e+1])&&l(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),a=i.toASCII(n,!1,i.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===a)return o;if(-1!==a.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return o;const s=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const n=[];for(const r of t){if(""===r)return e;const t=D(r);if(t===o)return e;n.push(t)}for(let e=0;e<n.length-1;++e)if(n[e]>255)return o;if(n[n.length-1]>=Math.pow(256,5-n.length))return o;let r=n.pop(),i=0;for(const e of n)r+=e*Math.pow(256,3-i),++i;return r}(a);return"number"==typeof s||s===o?s:a}function E(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,i=0;for(let a=0;a<e.length;++a)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),{idx:t,len:n}}(e),r=n.idx;let i=!1;for(let n=0;n<=7;++n)i&&0===e[n]||(i&&(i=!1),r!==n?(t+=e[n].toString(16),7!==n&&(t+=":")):(t+=0===n?"::":":",i=!0));return t}(e)+"]":e}function S(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function j(e){return""!==e.username||""!==e.password}function k(e,t,n,i,a){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=n||"utf-8",this.stateOverride=a,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=a||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=r.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),n=this["parse "+this.state](e,t);if(!n)break;if(n===o){this.failure=!0;break}}}k.prototype["parse scheme start"]=function(e,t){if(u(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,o;this.state="no scheme",--this.pointer}return!0},k.prototype["parse scheme"]=function(e,t){if(function(e){return u(e)||c(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(m(this.url)&&!h(this.buffer))return!1;if(!m(this.url)&&h(this.buffer))return!1;if((j(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):m(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":m(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,o;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},k.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?o:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},k.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},k.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},k.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):m(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},k.prototype["parse relative slash"]=function(e){return!m(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},k.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},k.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},k.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=s(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=x(e,_);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,o;this.pointer-=s(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},k.prototype["parse hostname"]=k.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e){if(--this.pointer,m(this.url)&&""===this.buffer)return this.parseError=!0,o;if(this.stateOverride&&""===this.buffer&&(j(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=O(this.buffer,m(this.url));if(e===o)return o;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,o;const e=O(this.buffer,m(this.url));if(e===o)return o;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},k.prototype["parse port"]=function(e,t){if(c(e))this.buffer+=t;else{if(!(isNaN(e)||47===e||63===e||35===e||m(this.url)&&92===e||this.stateOverride))return this.parseError=!0,o;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,o;this.url.port=e===(n=this.url.scheme,a[n])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var n;return!0};const T=new Set([47,92,63,35]);k.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!u(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!T.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},k.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&u(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},k.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&f(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=O(this.buffer,m(this.url));if(e===o)return o;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},k.prototype["parse path start"]=function(e){return m(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},k.prototype["parse path"]=function(e){if(isNaN(e)||47===e||m(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(m(this.url)&&92===e&&(this.parseError=!0),".."===(t=(t=this.buffer).toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t?(S(this.url),47===e||m(this.url)&&92===e||this.url.path.push("")):!d(this.buffer)||47===e||m(this.url)&&92===e?d(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&f(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=x(e,g);var t;return!0},k.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+x(e,y))),!0},k.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){m(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=v(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},k.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||l(this.input[this.pointer+1])&&l(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=x(e,y))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=E(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=E(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new k(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=r.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=x(n[t],_)},e.exports.setThePassword=function(e,t){e.password="";const n=r.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=x(n[t],_)},e.exports.serializeHost=E,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}},22689:e=>{"use strict";e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}},96292:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(29374)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},29374:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,a,o=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),a=i-(n||i);r.diff=a,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];n=a.call(r,t),e.splice(o,1),o--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(48628),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},41241:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(96292):e.exports=n(4428)},4428:(e,t,n)=>{const r=n(76224),i=n(73837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${r} [0m`;n[0]=a+n[0].split("\n").join("\n"+a),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(56974);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(29374)(t);const{formatters:a}=e.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},22091:function(e,t,n){var r,i;i=function(e){var t=["N","E","A","D"];function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,n){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function a(e,t){a.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function o(e,t){o.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function p(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function u(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}function l(e){var t=0,n=c(e);if("array"===n)return e.forEach((function(e){t+=l(e)})),t+u("[type: array, hash: "+t+"]");if("object"===n){for(var r in e)if(e.hasOwnProperty(r)){var i="[ type: object, key: "+r+", value hash: "+l(e[r])+"]";t+=u(i)}return t}return t+u("[ type: "+n+" ; value: "+e+"]")}function d(e,t,n,r,p,u,f,h){n=n||[],f=f||[];var m=(p=p||[]).slice(0);if(null!=u){if(r){if("function"==typeof r&&r(m,u))return;if("object"==typeof r){if(r.prefilter&&r.prefilter(m,u))return;if(r.normalize){var v=r.normalize(m,u,e,t);v&&(e=v[0],t=v[1])}}}m.push(u)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var y,b,g,w,_=typeof e,x=typeof t,D="undefined"!==_||f&&f.length>0&&f[f.length-1].lhs&&Object.getOwnPropertyDescriptor(f[f.length-1].lhs,u),O="undefined"!==x||f&&f.length>0&&f[f.length-1].rhs&&Object.getOwnPropertyDescriptor(f[f.length-1].rhs,u);if(!D&&O)n.push(new a(m,t));else if(!O&&D)n.push(new o(m,e));else if(c(e)!==c(t))n.push(new i(m,e,t));else if("date"===c(e)&&e-t!=0)n.push(new i(m,e,t));else if("object"===_&&null!==e&&null!==t){for(y=f.length-1;y>-1;--y)if(f[y].lhs===e){w=!0;break}if(w)e!==t&&n.push(new i(m,e,t));else{if(f.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return l(e)-l(t)})),t.sort((function(e,t){return l(e)-l(t)}))),y=t.length-1,b=e.length-1;y>b;)n.push(new s(m,y,new a(void 0,t[y--])));for(;b>y;)n.push(new s(m,b,new o(void 0,e[b--])));for(;y>=0;--y)d(e[y],t[y],n,r,m,y,f,h)}else{var E=Object.keys(e),S=Object.keys(t);for(y=0;y<E.length;++y)g=E[y],(w=S.indexOf(g))>=0?(d(e[g],t[g],n,r,m,g,f,h),S[w]=null):d(e[g],void 0,n,r,m,g,f,h);for(y=0;y<S.length;++y)(g=S[y])&&d(void 0,t[g],n,r,m,g,f,h)}f.length=f.length-1}}else e!==t&&("number"===_&&isNaN(e)&&isNaN(t)||n.push(new i(m,e,t)))}function f(e,t,n,r,i){var a=[];if(d(e,t,a,r,null,null,null,i),n)for(var o=0;o<a.length;++o)n(a[o]);return a}function h(e,t,n,r){var i=f(e,t,r?function(e){e&&r.push(e)}:void 0,n);return r||(i.length?i:void 0)}function m(e,t,n){if(n.path&&n.path.length){var r,i=e[t],a=n.path.length-1;for(r=0;r<a;r++)i=i[n.path[r]];switch(n.kind){case"A":m(i[n.path[r]],n.index,n.item);break;case"D":delete i[n.path[r]];break;case"E":case"N":i[n.path[r]]=n.rhs}}else switch(n.kind){case"A":m(e[t],n.index,n.item);break;case"D":e=p(e,t);break;case"E":case"N":e[t]=n.rhs}return e}function v(e,n,r){if(void 0===r&&n&&~t.indexOf(n.kind)&&(r=n),e&&r&&r.kind){for(var i=e,a=-1,o=r.path?r.path.length-1:0;++a<o;)void 0===i[r.path[a]]&&(i[r.path[a]]=void 0!==r.path[a+1]&&"number"==typeof r.path[a+1]?[]:{}),i=i[r.path[a]];switch(r.kind){case"A":r.path&&void 0===i[r.path[a]]&&(i[r.path[a]]=[]),m(r.path?i[r.path[a]]:i,r.index,r.item);break;case"D":delete i[r.path[a]];break;case"E":case"N":i[r.path[a]]=r.rhs}}}function y(e,t,n){if(n.path&&n.path.length){var r,i=e[t],a=n.path.length-1;for(r=0;r<a;r++)i=i[n.path[r]];switch(n.kind){case"A":y(i[n.path[r]],n.index,n.item);break;case"D":case"E":i[n.path[r]]=n.lhs;break;case"N":delete i[n.path[r]]}}else switch(n.kind){case"A":y(e[t],n.index,n.item);break;case"D":case"E":e[t]=n.lhs;break;case"N":e=p(e,t)}return e}return n(i,r),n(a,r),n(o,r),n(s,r),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,n,r){var i=f(e,t,r?function(e){e&&r.push(e)}:void 0,n,!0);return r||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:f,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,n,r,i,a,o){return d(e,t,n,r,i,a,o,!0)},enumerable:!0},orderIndepHash:{value:l,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&f(e,t,(function(r){n&&!n(e,t,r)||v(e,t,r)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var r,i,a=e;for(i=n.path.length-1,r=0;r<i;r++)void 0===a[n.path[r]]&&(a[n.path[r]]={}),a=a[n.path[r]];switch(n.kind){case"A":y(a[n.path[r]],n.index,n.item);break;case"D":case"E":a[n.path[r]]=n.lhs;break;case"N":delete a[n.path[r]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)},59444:(e,t,n)=>{var r=n(12781).Stream,i=n(73837);function a(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=a,i.inherits(a,r),a.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(a.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),a.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},a.prototype.resume=function(){this._released||this.release(),this.source.resume()},a.prototype.pause=function(){this.source.pause()},a.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},a.prototype.pipe=function(){var e=r.prototype.pipe.apply(this,arguments);return this.resume(),e},a.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},a.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},58242:e=>{"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},35814:(e,t,n)=>{"use strict";const r=n(34965);r.createWebSocketStream=n(24291),r.Server=n(46574),r.Receiver=n(41938),r.Sender=n(17204),r.WebSocket=r,r.WebSocketServer=r.Server,e.exports=r},35510:(e,t,n)=>{"use strict";const{EMPTY_BUFFER:r}=n(44543);function i(e,t){if(0===e.length)return r;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const r=e[t];n.set(r,i),i+=r.length}return i<t?n.slice(0,i):n}function a(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[3&a]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}function s(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function p(e){if(p.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),p.readOnly=!1),t}try{const t=n(Object(function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()));e.exports={concat:i,mask(e,n,r,i,o){o<48?a(e,n,r,i,o):t.mask(e,n,r,i,o)},toArrayBuffer:s,toBuffer:p,unmask(e,n){e.length<32?o(e,n):t.unmask(e,n)}}}catch(t){e.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:p,unmask:o}}},44543:e=>{"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},28143:(e,t,n)=>{"use strict";const{kForOnEventAttribute:r,kListener:i}=n(44543),a=Symbol("kCode"),o=Symbol("kData"),s=Symbol("kError"),p=Symbol("kMessage"),c=Symbol("kReason"),u=Symbol("kTarget"),l=Symbol("kType"),d=Symbol("kWasClean");class f{constructor(e){this[u]=null,this[l]=e}get target(){return this[u]}get type(){return this[l]}}Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});class h extends f{constructor(e,t={}){super(e),this[a]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[d]=void 0!==t.wasClean&&t.wasClean}get code(){return this[a]}get reason(){return this[c]}get wasClean(){return this[d]}}Object.defineProperty(h.prototype,"code",{enumerable:!0}),Object.defineProperty(h.prototype,"reason",{enumerable:!0}),Object.defineProperty(h.prototype,"wasClean",{enumerable:!0});class m extends f{constructor(e,t={}){super(e),this[s]=void 0===t.error?null:t.error,this[p]=void 0===t.message?"":t.message}get error(){return this[s]}get message(){return this[p]}}Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});class v extends f{constructor(e,t={}){super(e),this[o]=void 0===t.data?null:t.data}get data(){return this[o]}}Object.defineProperty(v.prototype,"data",{enumerable:!0});const y={addEventListener(e,t,n={}){let a;if("message"===e)a=function(e,n){const r=new v("message",{data:n?e:e.toString()});r[u]=this,t.call(this,r)};else if("close"===e)a=function(e,n){const r=new h("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[u]=this,t.call(this,r)};else if("error"===e)a=function(e){const n=new m("error",{error:e,message:e.message});n[u]=this,t.call(this,n)};else{if("open"!==e)return;a=function(){const e=new f("open");e[u]=this,t.call(this,e)}}a[r]=!!n[r],a[i]=t,n.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[i]===t&&!n[r]){this.removeListener(e,n);break}}};e.exports={CloseEvent:h,ErrorEvent:m,Event:f,EventTarget:y,MessageEvent:v}},71161:(e,t,n)=>{"use strict";const{tokenChars:r}=n(42845);function i(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}e.exports={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,a,o=Object.create(null),s=!1,p=!1,c=!1,u=-1,l=-1,d=-1,f=0;for(;f<e.length;f++)if(l=e.charCodeAt(f),void 0===n)if(-1===d&&1===r[l])-1===u&&(u=f);else if(0===f||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${f}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);const r=e.slice(u,d);44===l?(i(t,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=f);else if(void 0===a)if(-1===d&&1===r[l])-1===u&&(u=f);else if(32===l||9===l)-1===d&&-1!==u&&(d=f);else if(59===l||44===l){if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f),i(o,e.slice(u,d),!0),44===l&&(i(t,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==l||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${f}`);a=e.slice(u,f),u=d=-1}else if(p){if(1!==r[l])throw new SyntaxError(`Unexpected character at index ${f}`);-1===u?u=f:s||(s=!0),p=!1}else if(c)if(1===r[l])-1===u&&(u=f);else if(34===l&&-1!==u)c=!1,d=f;else{if(92!==l)throw new SyntaxError(`Unexpected character at index ${f}`);p=!0}else if(34===l&&61===e.charCodeAt(f-1))c=!0;else if(-1===d&&1===r[l])-1===u&&(u=f);else if(-1===u||32!==l&&9!==l){if(59!==l&&44!==l)throw new SyntaxError(`Unexpected character at index ${f}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let r=e.slice(u,d);s&&(r=r.replace(/\\/g,""),s=!1),i(o,a,r),44===l&&(i(t,n,o),o=Object.create(null),n=void 0),a=void 0,u=d=-1}}else-1===d&&(d=f);if(-1===u||c||32===l||9===l)throw new SyntaxError("Unexpected end of input");-1===d&&(d=f);const h=e.slice(u,d);return void 0===n?i(t,h,o):(void 0===a?i(o,h,!0):i(o,a,s?h.replace(/\\/g,""):h),i(t,n,o)),t}}},22553:e=>{"use strict";const t=Symbol("kDone"),n=Symbol("kRun");e.exports=class{constructor(e){this[t]=()=>{this.pending--,this[n]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[n]()}[n](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[t])}}}},57404:(e,t,n)=>{"use strict";const r=n(59796),i=n(35510),a=n(22553),{kStatusCode:o}=n(44543),s=Buffer.from([0,0,255,255]),p=Symbol("permessage-deflate"),c=Symbol("total-length"),u=Symbol("callback"),l=Symbol("buffers"),d=Symbol("error");let f;function h(e){this[l].push(e),this[c]+=e.length}function m(e){this[c]+=e.length,this[p]._maxPayload<1||this[c]<=this[p]._maxPayload?this[l].push(e):(this[d]=new RangeError("Max payload size exceeded"),this[d].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[d][o]=1009,this.removeListener("data",m),this.reset())}function v(e){this[p]._inflate=null,e[o]=1007,this[u](e)}e.exports=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!f){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;f=new a(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[u];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){f.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){f.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const a=this._isServer?"client":"server";if(!this._inflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[p]=this,this._inflate[c]=0,this._inflate[l]=[],this._inflate.on("error",v),this._inflate.on("data",m)}this._inflate[u]=n,this._inflate.write(e),t&&this._inflate.write(s),this._inflate.flush((()=>{const e=this._inflate[d];if(e)return this._inflate.close(),this._inflate=null,void n(e);const r=i.concat(this._inflate[l],this._inflate[c]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[c]=0,this._inflate[l]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)}))}_compress(e,t,n){const a=this._isServer?"server":"client";if(!this._deflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[c]=0,this._deflate[l]=[],this._deflate.on("data",h)}this._deflate[u]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=i.concat(this._deflate[l],this._deflate[c]);t&&(e=e.slice(0,e.length-4)),this._deflate[u]=null,this._deflate[c]=0,this._deflate[l]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}}},41938:(e,t,n)=>{"use strict";const{Writable:r}=n(12781),i=n(57404),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:p}=n(44543),{concat:c,toArrayBuffer:u,unmask:l}=n(35510),{isValidStatusCode:d,isValidUTF8:f}=n(42845);function h(e,t,n,r,i){const a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,h),a.code=i,a[s]=r,a}e.exports=class extends r{constructor(e={}){super(),this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[p]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=t.slice(e),t.slice(0,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=n.slice(e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,h(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[i.extensionName])return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,h(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,h(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,h(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,h(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,h(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,h(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,h(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,h(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,h(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,h(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&l(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(h(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?c(t,e):"arraybuffer"===this._binaryType?u(c(t,e)):t,this.emit("message",n,!0)}else{const n=c(t,e);if(!this._skipUTF8Validation&&!f(n))return this._loop=!1,h(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,o),this.end();else{if(1===e.length)return h(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const t=e.readUInt16BE(0);if(!d(t))return h(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=e.slice(2);if(!this._skipUTF8Validation&&!f(n))return h(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}}},17204:(e,t,n)=>{"use strict";n(41808),n(24404);const{randomFillSync:r}=n(6113),i=n(57404),{EMPTY_BUFFER:a}=n(44543),{isValidStatusCode:o}=n(42845),{mask:s,toBuffer:p}=n(35510),c=Buffer.alloc(4);class u{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){const n=t.mask&&t.readOnly;let i=t.mask?6:2,a=e.length;e.length>=65536?(i+=8,a=127):e.length>125&&(i+=2,a=126);const o=Buffer.allocUnsafe(n?e.length+i:i);return o[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(o[0]|=64),o[1]=a,126===a?o.writeUInt16BE(e.length,2):127===a&&(o.writeUInt32BE(0,2),o.writeUInt32BE(e.length,6)),t.mask?(r(c,0,4),o[1]|=128,o[i-4]=c[0],o[i-3]=c[1],o[i-2]=c[2],o[i-1]=c[3],n?(s(e,c,o,i,e.length),[o]):(s(e,c,e,0,e.length),[o,e])):[o,e]}close(e,t,n,r){let i;if(void 0===e)i=a;else{if("number"!=typeof e||!o(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(e,0),"string"==typeof t?i.write(t,2):i.set(t,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0)}this._deflating?this.enqueue([this.doClose,i,n,r]):this.doClose(i,n,r)}doClose(e,t,n){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),n)}ping(e,t,n){const r=p(e);if(r.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,r,t,p.readOnly,n]):this.doPing(r,t,p.readOnly,n)}doPing(e,t,n,r){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:n}),r)}pong(e,t,n){const r=p(e);if(r.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,r,t,p.readOnly,n]):this.doPong(r,t,p.readOnly,n)}doPong(e,t,n,r){this.sendFrame(u.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:n}),r)}send(e,t,n){const r=p(e),a=this._extensions[i.extensionName];let o=t.binary?2:1,s=t.compress;if(this._firstFragment?(this._firstFragment=!1,s&&a&&a.params[a._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=r.length>=a._threshold),this._compress=s):(s=!1,o=0),t.fin&&(this._firstFragment=!0),a){const e={fin:t.fin,rsv1:s,opcode:o,mask:t.mask,readOnly:p.readOnly};this._deflating?this.enqueue([this.dispatch,r,this._compress,e,n]):this.dispatch(r,this._compress,e,n)}else this.sendFrame(u.frame(r,{fin:t.fin,rsv1:!1,opcode:o,mask:t.mask,readOnly:p.readOnly}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(u.frame(e,n),r);const a=this._extensions[i.extensionName];this._bufferedBytes+=e.length,this._deflating=!0,a.compress(e,n.fin,((t,i)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t][4];"function"==typeof n&&n(e)}}else this._bufferedBytes-=e.length,this._deflating=!1,n.readOnly=!1,this.sendFrame(u.frame(i,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}e.exports=u},24291:(e,t,n)=>{"use strict";const{Duplex:r}=n(12781);function i(e){e.emit("close")}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener("error",o),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}e.exports=function(e,t){let n=!0,s=!0;function p(){n&&e._socket.resume()}e.readyState===e.CONNECTING?e.once("open",(function(){e._receiver.removeAllListeners("drain"),e._receiver.on("drain",p)})):(e._receiver.removeAllListeners("drain"),e._receiver.on("drain",p));const c=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,r){const i=!r&&c._readableState.objectMode?t.toString():t;c.push(i)||(n=!1,e._socket.pause())})),e.once("error",(function(e){c.destroyed||(s=!1,c.destroy(e))})),e.once("close",(function(){c.destroyed||c.push(null)})),c._destroy=function(t,n){if(e.readyState===e.CLOSED)return n(t),void process.nextTick(i,c);let r=!1;e.once("error",(function(e){r=!0,n(e)})),e.once("close",(function(){r||n(t),process.nextTick(i,c)})),s&&e.terminate()},c._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),c._readableState.endEmitted&&c.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){c._final(t)}))},c._read=function(){e.readyState!==e.OPEN||n||(n=!0,e._receiver._writableState.needDrain||e._socket.resume())},c._write=function(t,n,r){e.readyState!==e.CONNECTING?e.send(t,r):e.once("open",(function(){c._write(t,n,r)}))},c.on("end",a),c.on("error",o),c}},1863:(e,t,n)=>{"use strict";const{tokenChars:r}=n(42845);e.exports={parse:function(e){const t=new Set;let n=-1,i=-1,a=0;for(;a<e.length;a++){const o=e.charCodeAt(a);if(-1===i&&1===r[o])-1===n&&(n=a);else if(0===a||32!==o&&9!==o){if(44!==o)throw new SyntaxError(`Unexpected character at index ${a}`);{if(-1===n)throw new SyntaxError(`Unexpected character at index ${a}`);-1===i&&(i=a);const r=e.slice(n,i);if(t.has(r))throw new SyntaxError(`The "${r}" subprotocol is duplicated`);t.add(r),n=i=-1}}else-1===i&&-1!==n&&(i=a)}if(-1===n||-1!==i)throw new SyntaxError("Unexpected end of input");const o=e.slice(n,a);if(t.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}}},42845:(e,t,n)=>{"use strict";const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function i(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999}function a(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}try{const t=n(Object(function(){var e=new Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e}()));e.exports={isValidStatusCode:i,isValidUTF8:e=>e.length<150?a(e):t(e),tokenChars:r}}catch(t){e.exports={isValidStatusCode:i,isValidUTF8:a,tokenChars:r}}},46574:(e,t,n)=>{"use strict";const r=n(82361),i=n(13685),{createHash:a}=(n(95687),n(41808),n(24404),n(6113)),o=n(71161),s=n(57404),p=n(1863),c=n(34965),{GUID:u,kWebSocket:l}=n(44543),d=/^[+/0-9A-Za-z]{22}==$/;function f(e){e._state=2,e.emit("close")}function h(){this.destroy()}function m(e,t,n,r){e.writable&&(n=n||i.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},e.write(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map((e=>`${e}: ${r[e]}`)).join("\r\n")+"\r\n\r\n"+n)),e.removeListener("error",h),e.destroy()}e.exports=class extends r{constructor(e,t){if(super(),null==(e={maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer(((e,t)=>{const n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),t.end(n)})),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(const n of Object.keys(t))e.on(n,t[n]);return function(){for(const n of Object.keys(t))e.removeListener(n,t[n])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state)return e&&this.once("close",(()=>{e(new Error("The server is not running"))})),void process.nextTick(f,this);if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(f,this);else{const e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close((()=>{f(this)}))}}shouldHandle(e){if(this.options.path){const t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on("error",h);const i=void 0!==e.headers["sec-websocket-key"]&&e.headers["sec-websocket-key"],a=+e.headers["sec-websocket-version"];if("GET"!==e.method||"websocket"!==e.headers.upgrade.toLowerCase()||!i||!d.test(i)||8!==a&&13!==a||!this.shouldHandle(e))return m(t,400);const c=e.headers["sec-websocket-protocol"];let u=new Set;if(void 0!==c)try{u=p.parse(c)}catch(e){return m(t,400)}const l=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&void 0!==l){const e=new s(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const t=o.parse(l);t[s.extensionName]&&(e.accept(t[s.extensionName]),f[s.extensionName]=e)}catch(e){return m(t,400)}}if(this.options.verifyClient){const o={origin:e.headers[8===a?"sec-websocket-origin":"origin"],secure:!(!e.socket.authorized&&!e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(o,((a,o,s,p)=>{if(!a)return m(t,o||401,s,p);this.completeUpgrade(f,i,u,e,t,n,r)}));if(!this.options.verifyClient(o))return m(t,401)}this.completeUpgrade(f,i,u,e,t,n,r)}completeUpgrade(e,t,n,r,i,p,d){if(!i.readable||!i.writable)return i.destroy();if(i[l])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return m(i,503);const v=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${a("sha1").update(t+u).digest("base64")}`],y=new c(null);if(n.size){const e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(v.push(`Sec-WebSocket-Protocol: ${e}`),y._protocol=e)}if(e[s.extensionName]){const t=e[s.extensionName].params,n=o.format({[s.extensionName]:[t]});v.push(`Sec-WebSocket-Extensions: ${n}`),y._extensions=e}this.emit("headers",v,r),i.write(v.concat("\r\n").join("\r\n")),i.removeListener("error",h),y.setSocket(i,p,{maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(y),y.on("close",(()=>{this.clients.delete(y),this._shouldEmitClose&&!this.clients.size&&process.nextTick(f,this)}))),d(y,r)}}},34965:(e,t,n)=>{"use strict";const r=n(82361),i=n(95687),a=n(13685),o=n(41808),s=n(24404),{randomBytes:p,createHash:c}=n(6113),{Readable:u}=n(12781),{URL:l}=n(57310),d=n(57404),f=n(41938),h=n(17204),{BINARY_TYPES:m,EMPTY_BUFFER:v,GUID:y,kForOnEventAttribute:b,kListener:g,kStatusCode:w,kWebSocket:_,NOOP:x}=n(44543),{EventTarget:{addEventListener:D,removeEventListener:O}}=n(28143),{format:E,parse:S}=n(71161),{toBuffer:j}=n(35510),k=["CONNECTING","OPEN","CLOSING","CLOSED"],T=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,N=[8,13];class P extends r{constructor(e,t,n){super(),this._binaryType=m[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=v,this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=P.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),C(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){m.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){const r=new f({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new h(e,this._extensions),this._receiver=r,this._socket=e,r[_]=this,e[_]=this,r.on("conclude",M),r.on("drain",$),r.on("error",B),r.on("message",V),r.on("ping",q),r.on("pong",U),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",W),e.on("data",Q),e.on("end",H),e.on("error",K),this._readyState=P.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=P.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[d.extensionName]&&this._extensions[d.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=P.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return F(this,this._req,e)}this.readyState!==P.CLOSING?(this._readyState=P.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}ping(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||v,t,n)):R(this,e,n)}pong(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===P.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||v,t,n)):R(this,e,n)}send(e,t,n){if(this.readyState===P.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(n=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)return void R(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[d.extensionName]||(r.compress=!1),this._sender.send(e||v,r,n)}terminate(){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING){const e="WebSocket was closed before the connection was established";return F(this,this._req,e)}this._socket&&(this._readyState=P.CLOSING,this._socket.destroy())}}}function C(e,t,n,r){const o={protocolVersion:N[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!N.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${N.join(", ")})`);let s;if(t instanceof l)s=t,e._url=t.href;else{try{s=new l(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const u="wss:"===s.protocol,f="ws+unix:"===s.protocol;if("ws:"!==s.protocol&&!u&&!f)throw new SyntaxError('The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"');if(f&&!s.pathname)throw new SyntaxError("The URL's pathname is empty");if(s.hash)throw new SyntaxError("The URL contains a fragment identifier");const h=u?443:80,m=p(16).toString("base64"),v=u?i.get:a.get,b=new Set;let g;if(o.createConnection=u?I:A,o.defaultPort=o.defaultPort||h,o.port=s.port||h,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":m,Connection:"Upgrade",Upgrade:"websocket",...o.headers},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(g=new d(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=E({[d.extensionName]:g.offer()})),n.length){for(const e of n){if("string"!=typeof e||!T.test(e)||b.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");b.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),f){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}let w=e._req=v(o);o.timeout&&w.on("timeout",(()=>{F(e,w,"Opening handshake has timed out")})),w.on("error",(t=>{null===w||w.aborted||(w=e._req=null,e._readyState=P.CLOSING,e.emit("error",t),e.emitClose())})),w.on("response",(i=>{const a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects)return void F(e,w,"Maximum redirects exceeded");w.abort();const i=new l(a,t);C(e,i,n,r)}else e.emit("unexpected-response",w,i)||F(e,w,`Unexpected server response: ${i.statusCode}`)})),w.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==P.CONNECTING)return;w=e._req=null;const i=c("sha1").update(m+y).digest("base64");if(t.headers["sec-websocket-accept"]!==i)return void F(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let s;if(void 0!==a?b.size?b.has(a)||(s="Server sent an invalid subprotocol"):s="Server sent a subprotocol but none was requested":b.size&&(s="Server sent no subprotocol"),s)return void F(e,n,s);a&&(e._protocol=a);const p=t.headers["sec-websocket-extensions"];if(void 0!==p){if(!g)return void F(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");let t;try{t=S(p)}catch(t){return void F(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==d.extensionName)return void F(e,n,"Server indicated an extension that was not requested");try{g.accept(t[d.extensionName])}catch(t){return void F(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[d.extensionName]=g}e.setSocket(n,r,{maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}))}function A(e){return e.path=e.socketPath,o.connect(e)}function I(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=o.isIP(e.host)?"":e.host),s.connect(e)}function F(e,t,n){e._readyState=P.CLOSING;const r=new Error(n);Error.captureStackTrace(r,F),t.setHeader?(t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),t.once("abort",e.emitClose.bind(e)),e.emit("error",r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function R(e,t,n){if(t){const n=j(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}n&&n(new Error(`WebSocket is not open: readyState ${e.readyState} (${k[e.readyState]})`))}function M(e,t){const n=this[_];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[_]&&(n._socket.removeListener("data",Q),process.nextTick(z,n._socket),1005===e?n.close():n.close(e,t))}function $(){this[_]._socket.resume()}function B(e){const t=this[_];void 0!==t._socket[_]&&(t._socket.removeListener("data",Q),process.nextTick(z,t._socket),t.close(e[w])),t.emit("error",e)}function L(){this[_].emitClose()}function V(e,t){this[_].emit("message",e,t)}function q(e){const t=this[_];t.pong(e,!t._isServer,x),t.emit("ping",e)}function U(e){this[_].emit("pong",e)}function z(e){e.resume()}function W(){const e=this[_];let t;this.removeListener("close",W),this.removeListener("data",Q),this.removeListener("end",H),e._readyState=P.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[_]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",L),e._receiver.on("finish",L))}function Q(e){this[_]._receiver.write(e)||this.pause()}function H(){const e=this[_];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function K(){const e=this[_];this.removeListener("error",K),this.on("error",x),e&&(e._readyState=P.CLOSING,this.destroy())}Object.defineProperty(P,"CONNECTING",{enumerable:!0,value:k.indexOf("CONNECTING")}),Object.defineProperty(P.prototype,"CONNECTING",{enumerable:!0,value:k.indexOf("CONNECTING")}),Object.defineProperty(P,"OPEN",{enumerable:!0,value:k.indexOf("OPEN")}),Object.defineProperty(P.prototype,"OPEN",{enumerable:!0,value:k.indexOf("OPEN")}),Object.defineProperty(P,"CLOSING",{enumerable:!0,value:k.indexOf("CLOSING")}),Object.defineProperty(P.prototype,"CLOSING",{enumerable:!0,value:k.indexOf("CLOSING")}),Object.defineProperty(P,"CLOSED",{enumerable:!0,value:k.indexOf("CLOSED")}),Object.defineProperty(P.prototype,"CLOSED",{enumerable:!0,value:k.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach((e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(P.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[b])return t[g];return null},set(t){for(const t of this.listeners(e))if(t[b]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[b]:!0})}})})),P.prototype.addEventListener=D,P.prototype.removeEventListener=O,e.exports=P},32409:(e,t,n)=>{const{dirname:r,resolve:i}=n(71017),{readdirSync:a,statSync:o}=n(57147);e.exports=function(e,t){let n,s=i(".",e);for(o(s).isDirectory()||(s=r(s));;){if(n=t(s,a(s)),n)return i(s,n);if(s=r(n=s),n===s)break}}},66471:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},36276:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(41241)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},64095:(e,t,n)=>{var r=n(57310),i=r.URL,a=n(13685),o=n(95687),s=n(12781).Writable,p=n(39491),c=n(36276),u=["abort","aborted","connect","error","socket","timeout"],l=Object.create(null);u.forEach((function(e){l[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var d=x("ERR_INVALID_URL","Invalid URL",TypeError),f=x("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),h=x("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),m=x("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=x("ERR_STREAM_WRITE_AFTER_END","write after end");function y(e,t){s.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(a){var o=a+":",s=n[o]=e[a],u=t[a]=Object.create(s);Object.defineProperties(u,{request:{value:function(e,a,s){if(O(e)){var u;try{u=w(new i(e))}catch(t){u=r.parse(e)}if(!O(u.protocol))throw new d({input:e});e=u}else i&&e instanceof i?e=w(e):(s=a,a=e,e={protocol:o});return E(a)&&(s=a,a=null),(a=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,a)).nativeProtocols=n,O(a.host)||O(a.hostname)||(a.hostname="::1"),p.equal(a.protocol,o,"protocol mismatch"),c("options",a),new y(a,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=u.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function g(){}function w(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function _(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function x(e,t,n){function r(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r}function D(e){for(var t of u)e.removeListener(t,l[t]);e.on("error",g),e.abort()}function O(e){return"string"==typeof e||e instanceof String}function E(e){return"function"==typeof e}y.prototype=Object.create(s.prototype),y.prototype.abort=function(){D(this._currentRequest),this.emit("abort")},y.prototype.write=function(e,t,n){if(this._ending)throw new v;if(!(O(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;E(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new m),this.abort()):n&&n()},y.prototype.end=function(e,t,n){if(E(e)?(n=e,e=t=null):E(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},y.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},y.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},y.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),a()}),e),r(t)}function a(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",a),n.removeListener("error",a),n.removeListener("response",a),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){y.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(y.prototype,e,{get:function(){return this._currentRequest[e]}})})),y.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},y.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var a of(i._redirectable=this,u))i.on(a,l[a]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,p=this._requestBodyBuffers;!function e(t){if(i===s._currentRequest)if(t)s.emit("error",t);else if(o<p.length){var n=p[o++];i.finished||i.write(n.data,n.encoding,e)}else s._ended&&i.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},y.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(!n||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(D(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new h);else{var i,a=this._options.beforeRedirect;a&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_(/^content-/i,this._options.headers));var s,u=_(/^host$/i,this._options.headers),l=r.parse(this._currentUrl),d=u||l.host,m=/^\w+:/.test(n)?this._currentUrl:r.format(Object.assign(l,{host:d}));try{s=r.resolve(m,n)}catch(e){return void this.emit("error",new f({cause:e}))}c("redirecting to",s),this._isRedirect=!0;var v=r.parse(s);if(Object.assign(this._options,v),(v.protocol!==l.protocol&&"https:"!==v.protocol||v.host!==d&&!function(e,t){p(O(e)&&O(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(v.host,d))&&_(/^(?:authorization|cookie)$/i,this._options.headers),E(a)){var y={headers:e.headers,statusCode:t},b={url:m,method:o,headers:i};try{a(this._options,y,b)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new f({cause:e}))}}},e.exports=b({http:a,https:o}),e.exports.wrap=b},54347:(e,t,n)=>{var r=n(74464),i=n(73837),a=n(71017),o=n(13685),s=n(95687),p=n(57310).parse,c=n(57147),u=n(12781).Stream,l=n(72839),d=n(84878),f=n(4071);function h(e){if(!(this instanceof h))return new h(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],r.call(this),e=e||{})this[t]=e[t]}e.exports=h,i.inherits(h,r),h.LINE_BREAK="\r\n",h.DEFAULT_CONTENT_TYPE="application/octet-stream",h.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var a=r.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),i.isArray(t))this._error(new Error("Arrays are not supported."));else{var o=this._multiPartHeader(e,t,n),s=this._multiPartFooter();a(o),a(t),a(s),this._trackLength(o,t,n)}},h.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+h.LINE_BREAK.length,t&&(t.path||t.readable&&t.hasOwnProperty("httpVersion")||t instanceof u)&&(n.knownLength||this._valuesToMeasure.push(t))},h.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):c.stat(e.path,(function(n,r){var i;n?t(n):(i=r.size-(e.start?e.start:0),t(null,i))})):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},h.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),o="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var p in"object"==typeof n.header&&f(s,n.header),s)s.hasOwnProperty(p)&&null!=(r=s[p])&&(Array.isArray(r)||(r=[r]),r.length&&(o+=p+": "+r.join("; ")+h.LINE_BREAK));return"--"+this.getBoundary()+h.LINE_BREAK+o+h.LINE_BREAK},h.prototype._getContentDisposition=function(e,t){var n,r;return"string"==typeof t.filepath?n=a.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=a.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=a.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r},h.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=l.lookup(e.name)),!n&&e.path&&(n=l.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=l.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=h.DEFAULT_CONTENT_TYPE),n},h.prototype._multiPartFooter=function(){return function(e){var t=h.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},h.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+h.LINE_BREAK},h.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n},h.prototype.setBoundary=function(e){this._boundary=e},h.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},h.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(h.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},h.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},h.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},h.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},h.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?d.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,r){n?e(n):(r.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},h.prototype.submit=function(e,t){var n,r,i={method:"post"};return"string"==typeof e?(e=p(e),r=f({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=f(e,i)).port||(r.port="https:"==r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"==r.protocol?s.request(r):o.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,r)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},h.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},h.prototype.toString=function(){return"[object FormData]"}},4071:e=>{e.exports=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}},35184:e=>{"use strict";e.exports=function(e){if(void 0===e&&(e=2),e>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+e+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var n=(new Error).stack;if(Error.prepareStackTrace=t,null!==n&&"object"==typeof n)return n[e]?n[e].getFileName():void 0}},41875:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}},6385:e=>{"use strict";const t=e=>!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);e.exports=t,e.exports.default=t},98784:function(e,t,n){var r;e=n.nmd(e),function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",p=32,c=128,u=1/0,l=9007199254740991,d=NaN,f=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",p],["partialRight",64],["rearg",256]],m="[object Arguments]",v="[object Array]",y="[object Boolean]",b="[object Date]",g="[object Error]",w="[object Function]",_="[object GeneratorFunction]",x="[object Map]",D="[object Number]",O="[object Object]",E="[object Promise]",S="[object RegExp]",j="[object Set]",k="[object String]",T="[object Symbol]",N="[object WeakMap]",P="[object ArrayBuffer]",C="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",R="[object Int16Array]",M="[object Int32Array]",$="[object Uint8Array]",B="[object Uint8ClampedArray]",L="[object Uint16Array]",V="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,H=RegExp(W.source),K=RegExp(Q.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",De="\\u2700-\\u27bf",Oe="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="["+_e+"]",Te="["+je+"]",Ne="["+xe+"]",Pe="\\d+",Ce="["+De+"]",Ae="["+Oe+"]",Ie="[^"+_e+je+Pe+De+Oe+Ee+"]",Fe="\\ud83c[\\udffb-\\udfff]",Re="[^"+_e+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Ee+"]",Le="\\u200d",Ve="(?:"+Ae+"|"+Ie+")",qe="(?:"+Be+"|"+Ie+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Ne+"|"+Fe+")?",Qe="["+Se+"]?",He=Qe+We+"(?:"+Le+"(?:"+[Re,Me,$e].join("|")+")"+Qe+We+")*",Ke="(?:"+[Ce,Me,$e].join("|")+")"+He,Ge="(?:"+[Re+Ne+"?",Ne,Me,$e,ke].join("|")+")",Je=RegExp("['’]","g"),Ye=RegExp(Ne,"g"),Ze=RegExp(Fe+"(?="+Fe+")|"+Ge+He,"g"),Xe=RegExp([Be+"?"+Ae+"+"+Ue+"(?="+[Te,Be,"$"].join("|")+")",qe+"+"+ze+"(?="+[Te,Be+Ve,"$"].join("|")+")",Be+"?"+Ve+"+"+Ue,Be+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ke].join("|"),"g"),et=RegExp("["+Le+_e+xe+Se+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[A]=it[I]=it[F]=it[R]=it[M]=it[$]=it[B]=it[L]=it[V]=!0,it[m]=it[v]=it[P]=it[y]=it[C]=it[b]=it[g]=it[w]=it[x]=it[D]=it[O]=it[S]=it[j]=it[k]=it[N]=!1;var at={};at[m]=at[v]=at[P]=at[C]=at[y]=at[b]=at[A]=at[I]=at[F]=at[R]=at[M]=at[x]=at[D]=at[O]=at[S]=at[j]=at[k]=at[T]=at[$]=at[B]=at[L]=at[V]=!0,at[g]=at[w]=at[N]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,pt=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,ut="object"==typeof self&&self&&self.Object===Object&&self,lt=ct||ut||Function("return this")(),dt=t&&!t.nodeType&&t,ft=dt&&e&&!e.nodeType&&e,ht=ft&&ft.exports===dt,mt=ht&&ct.process,vt=function(){try{return ft&&ft.require&&ft.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,wt=vt&&vt.isRegExp,_t=vt&&vt.isSet,xt=vt&&vt.isTypedArray;function Dt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ot(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function kt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function Nt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ct(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function At(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function It(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Ft(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Ut("length");function Mt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function $t(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):$t(e,Vt,n)}function Lt(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function qt(e,t){var n=null==e?0:e.length;return n?Qt(e,t)/n:d}function Ut(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,r,i){return i(e,(function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)})),n}function Qt(e,t){for(var n,r=-1,a=e.length;++r<a;){var o=t(e[r]);o!==i&&(n=n===i?o:n+o)}return n}function Ht(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,fn(e)+1).replace(re,""):e}function Gt(e){return function(t){return e(t)}}function Jt(e,t){return Pt(t,(function(t){return e[t]}))}function Yt(e,t){return e.has(t)}function Zt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function Xt(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var tn=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nn=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+ot[e]}function an(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function pn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==s||(e[n]=s,a[i++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function ln(e){return an(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function dn(e){return an(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var hn=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),mn=function e(t){var n,r=(t=null==t?lt:mn.defaults(lt.Object(),t,mn.pick(lt,nt))).Array,ie=t.Date,_e=t.Error,xe=t.Function,De=t.Math,Oe=t.Object,Ee=t.RegExp,Se=t.String,je=t.TypeError,ke=r.prototype,Te=xe.prototype,Ne=Oe.prototype,Pe=t["__core-js_shared__"],Ce=Te.toString,Ae=Ne.hasOwnProperty,Ie=0,Fe=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Re=Ne.toString,Me=Ce.call(Oe),$e=lt._,Be=Ee("^"+Ce.call(Ae).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Ve=t.Symbol,qe=t.Uint8Array,Ue=Le?Le.allocUnsafe:i,ze=sn(Oe.getPrototypeOf,Oe),We=Oe.create,Qe=Ne.propertyIsEnumerable,He=ke.splice,Ke=Ve?Ve.isConcatSpreadable:i,Ge=Ve?Ve.iterator:i,Ze=Ve?Ve.toStringTag:i,et=function(){try{var e=ca(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==lt.Date.now&&ie.now,ut=t.setTimeout!==lt.setTimeout&&t.setTimeout,dt=De.ceil,ft=De.floor,mt=Oe.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Rt=t.isFinite,zt=ke.join,vn=sn(Oe.keys,Oe),yn=De.max,bn=De.min,gn=ie.now,wn=t.parseInt,_n=De.random,xn=ke.reverse,Dn=ca(t,"DataView"),On=ca(t,"Map"),En=ca(t,"Promise"),Sn=ca(t,"Set"),jn=ca(t,"WeakMap"),kn=ca(Oe,"create"),Tn=jn&&new jn,Nn={},Pn=$a(Dn),Cn=$a(On),An=$a(En),In=$a(Sn),Fn=$a(jn),Rn=Ve?Ve.prototype:i,Mn=Rn?Rn.valueOf:i,$n=Rn?Rn.toString:i;function Bn(e){if(ns(e)&&!Wo(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Ae.call(e,"__wrapped__"))return Ba(e)}return new qn(e)}var Ln=function(){function e(){}return function(t){if(!ts(t))return{};if(We)return We(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Qn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Gn(e,t){var n=Wo(e),r=!n&&zo(e),i=!n&&!r&&Go(e),a=!n&&!r&&!i&&us(e),o=n||r||i||a,s=o?Ht(e.length,Se):[],p=s.length;for(var c in e)!t&&!Ae.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||va(c,p))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Qr(0,t-1)]:i}function Yn(e,t){return Aa(ji(e),or(t,0,e.length))}function Zn(e){return Aa(ji(e))}function Xn(e,t,n){(n!==i&&!Vo(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Ae.call(e,t)&&Vo(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Vo(e[n][0],t))return n;return-1}function nr(e,t,n,r){return lr(e,(function(e,i,a){t(r,e,n(e),a)})),r}function rr(e,t){return e&&ki(t,Cs(t),e)}function ir(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var n=-1,a=t.length,o=r(a),s=null==e;++n<a;)o[n]=s?i:js(e,t[n]);return o}function or(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,a,o){var s,p=1&t,c=2&t,u=4&t;if(n&&(s=a?n(e,r,a,o):n(e)),s!==i)return s;if(!ts(e))return e;var l=Wo(e);if(l){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!p)return ji(e,s)}else{var d=da(e),f=d==w||d==_;if(Go(e))return _i(e,p);if(d==O||d==m||f&&!a){if(s=c||f?{}:ha(e),!p)return c?function(e,t){return ki(e,la(e),t)}(e,function(e,t){return e&&ki(t,As(t),e)}(s,e)):function(e,t){return ki(e,ua(e),t)}(e,rr(s,e))}else{if(!at[d])return a?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case P:return xi(e);case y:case b:return new i(+e);case C:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case I:case F:case R:case M:case $:case B:case L:case V:return Di(e,n);case x:return new i;case D:case k:return new i(e);case S:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new i;case T:return r=e,Mn?Oe(Mn.call(r)):{}}}(e,d,p)}}o||(o=new Kn);var h=o.get(e);if(h)return h;o.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,o))})):rs(e)&&e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,o))}));var v=l?i:(u?c?na:ta:c?As:Cs)(e);return Et(v||e,(function(r,i){v&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,o))})),s}function pr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Oe(e);r--;){var a=n[r],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new je(a);return Ta((function(){e.apply(i,n)}),t)}function ur(e,t,n,r){var i=-1,a=Tt,o=!0,s=e.length,p=[],c=t.length;if(!s)return p;n&&(t=Pt(t,Gt(n))),r?(a=Nt,o=!1):t.length>=200&&(a=Yt,o=!1,t=new Hn(t));e:for(;++i<s;){var u=e[i],l=null==n?u:n(u);if(u=r||0!==u?u:0,o&&l==l){for(var d=c;d--;)if(t[d]===l)continue e;p.push(u)}else a(t,l,r)||p.push(u)}return p}Bn.templateSettings={escape:G,evaluate:J,interpolate:Y,variable:"",imports:{_:Bn}},Bn.prototype=Vn.prototype,Bn.prototype.constructor=Bn,qn.prototype=Ln(Vn.prototype),qn.prototype.constructor=qn,Un.prototype=Ln(Vn.prototype),Un.prototype.constructor=Un,zn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===o?i:n}return Ae.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==i:Ae.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===i?o:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():He.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Wn.prototype.has=function(e){return tr(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Qn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(On||Wn),string:new zn}},Qn.prototype.delete=function(e){var t=sa(this,e).delete(e);return this.size-=t?1:0,t},Qn.prototype.get=function(e){return sa(this,e).get(e)},Qn.prototype.has=function(e){return sa(this,e).has(e)},Qn.prototype.set=function(e,t){var n=sa(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,o),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qn(r)}return n.set(e,t),this.size=n.size,this};var lr=Pi(gr),dr=Pi(wr,!0);function fr(e,t){var n=!0;return lr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function hr(e,t,n){for(var r=-1,a=e.length;++r<a;){var o=e[r],s=t(o);if(null!=s&&(p===i?s==s&&!cs(s):n(s,p)))var p=s,c=o}return c}function mr(e,t){var n=[];return lr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function vr(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=ma),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?vr(s,t-1,n,r,i):Ct(i,s):r||(i[i.length]=s)}return i}var yr=Ci(),br=Ci(!0);function gr(e,t){return e&&yr(e,t,Cs)}function wr(e,t){return e&&br(e,t,Cs)}function _r(e,t){return kt(t,(function(t){return Zo(e[t])}))}function xr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Ma(t[n++])];return n&&n==r?e:i}function Dr(e,t,n){var r=t(e);return Wo(e)?r:Ct(r,n(e))}function Or(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Oe(e)?function(e){var t=Ae.call(e,Ze),n=e[Ze];try{e[Ze]=i;var r=!0}catch(e){}var a=Re.call(e);return r&&(t?e[Ze]=n:delete e[Ze]),a}(e):function(e){return Re.call(e)}(e)}function Er(e,t){return e>t}function Sr(e,t){return null!=e&&Ae.call(e,t)}function jr(e,t){return null!=e&&t in Oe(e)}function kr(e,t,n){for(var a=n?Nt:Tt,o=e[0].length,s=e.length,p=s,c=r(s),u=1/0,l=[];p--;){var d=e[p];p&&t&&(d=Pt(d,Gt(t))),u=bn(d.length,u),c[p]=!n&&(t||o>=120&&d.length>=120)?new Hn(p&&d):i}d=e[0];var f=-1,h=c[0];e:for(;++f<o&&l.length<u;){var m=d[f],v=t?t(m):m;if(m=n||0!==m?m:0,!(h?Yt(h,v):a(l,v,n))){for(p=s;--p;){var y=c[p];if(!(y?Yt(y,v):a(e[p],v,n)))continue e}h&&h.push(v),l.push(m)}}return l}function Tr(e,t,n){var r=null==(e=Ea(e,t=yi(t,e)))?e:e[Ma(Ja(t))];return null==r?i:Dt(r,e,n)}function Nr(e){return ns(e)&&Or(e)==m}function Pr(e,t,n,r,a){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,a,o){var s=Wo(e),p=Wo(t),c=s?v:da(e),u=p?v:da(t),l=(c=c==m?O:c)==O,d=(u=u==m?O:u)==O,f=c==u;if(f&&Go(e)){if(!Go(t))return!1;s=!0,l=!1}if(f&&!l)return o||(o=new Kn),s||us(e)?Xi(e,t,n,r,a,o):function(e,t,n,r,i,a,o){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!a(new qe(e),new qe(t)));case y:case b:case D:return Vo(+e,+t);case g:return e.name==t.name&&e.message==t.message;case S:case k:return e==t+"";case x:var s=on;case j:var p=1&r;if(s||(s=cn),e.size!=t.size&&!p)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var u=Xi(s(e),s(t),r,i,a,o);return o.delete(e),u;case T:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,c,n,r,a,o);if(!(1&n)){var h=l&&Ae.call(e,"__wrapped__"),w=d&&Ae.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,E=w?t.value():t;return o||(o=new Kn),a(_,E,n,r,o)}}return!!f&&(o||(o=new Kn),function(e,t,n,r,a,o){var s=1&n,p=ta(e),c=p.length;if(c!=ta(t).length&&!s)return!1;for(var u=c;u--;){var l=p[u];if(!(s?l in t:Ae.call(t,l)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var h=!0;o.set(e,t),o.set(t,e);for(var m=s;++u<c;){var v=e[l=p[u]],y=t[l];if(r)var b=s?r(y,v,l,t,e,o):r(v,y,l,e,t,o);if(!(b===i?v===y||a(v,y,n,r,o):b)){h=!1;break}m||(m="constructor"==l)}if(h&&!m){var g=e.constructor,w=t.constructor;g==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,a,o))}(e,t,n,r,Pr,a))}function Cr(e,t,n,r){var a=n.length,o=a,s=!r;if(null==e)return!o;for(e=Oe(e);a--;){var p=n[a];if(s&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++a<o;){var c=(p=n[a])[0],u=e[c],l=p[1];if(s&&p[2]){if(u===i&&!(c in e))return!1}else{var d=new Kn;if(r)var f=r(u,l,c,e,t,d);if(!(f===i?Pr(l,u,3,r,d):f))return!1}}return!0}function Ar(e){return!(!ts(e)||(t=e,Fe&&Fe in t))&&(Zo(e)?Be:me).test($a(e));var t}function Ir(e){return"function"==typeof e?e:null==e?ip:"object"==typeof e?Wo(e)?Br(e[0],e[1]):$r(e):fp(e)}function Fr(e){if(!_a(e))return vn(e);var t=[];for(var n in Oe(e))Ae.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Mr(e,t){var n=-1,i=Ho(e)?r(e.length):[];return lr(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}function $r(e){var t=pa(e);return 1==t.length&&t[0][2]?Da(t[0][0],t[0][1]):function(n){return n===e||Cr(n,e,t)}}function Br(e,t){return ba(e)&&xa(t)?Da(Ma(e),t):function(n){var r=js(n,e);return r===i&&r===t?ks(n,e):Pr(t,r,3)}}function Lr(e,t,n,r,a){e!==t&&yr(t,(function(o,s){if(a||(a=new Kn),ts(o))!function(e,t,n,r,a,o,s){var p=ja(e,n),c=ja(t,n),u=s.get(c);if(u)Xn(e,n,u);else{var l=o?o(p,c,n+"",e,t,s):i,d=l===i;if(d){var f=Wo(c),h=!f&&Go(c),m=!f&&!h&&us(c);l=c,f||h||m?Wo(p)?l=p:Ko(p)?l=ji(p):h?(d=!1,l=_i(c,!0)):m?(d=!1,l=Di(c,!0)):l=[]:as(c)||zo(c)?(l=p,zo(p)?l=bs(p):ts(p)&&!Zo(p)||(l=ha(c))):d=!1}d&&(s.set(c,l),a(l,c,r,o,s),s.delete(c)),Xn(e,n,l)}}(e,t,s,n,Lr,r,a);else{var p=r?r(ja(e,s),o,s+"",e,t,a):i;p===i&&(p=o),Xn(e,s,p)}}),As)}function Vr(e,t){var n=e.length;if(n)return va(t+=t<0?n:0,n)?e[t]:i}function qr(e,t,n){t=t.length?Pt(t,(function(e){return Wo(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[ip];var r=-1;t=Pt(t,Gt(oa()));var i=Mr(e,(function(e,n,i){var a=Pt(t,(function(t){return t(e)}));return{criteria:a,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var p=Oi(i[r],a[r]);if(p)return r>=s?p:p*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Ur(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=xr(e,o);n(s,o)&&Yr(a,yi(o,e),s)}return a}function zr(e,t,n,r){var i=r?Lt:Bt,a=-1,o=t.length,s=e;for(e===t&&(t=ji(t)),n&&(s=Pt(e,Gt(n)));++a<o;)for(var p=0,c=t[a],u=n?n(c):c;(p=i(s,u,p,r))>-1;)s!==e&&He.call(s,p,1),He.call(e,p,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;va(i)?He.call(e,i,1):ci(e,i)}}return e}function Qr(e,t){return e+ft(_n()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>l)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Na(Oa(e,t,ip),e+"")}function Gr(e){return Jn(Vs(e))}function Jr(e,t){var n=Vs(e);return Aa(n,or(t,0,n.length))}function Yr(e,t,n,r){if(!ts(e))return e;for(var a=-1,o=(t=yi(t,e)).length,s=o-1,p=e;null!=p&&++a<o;){var c=Ma(t[a]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=s){var l=p[c];(u=r?r(l,c,p):i)===i&&(u=ts(l)?l:va(t[a+1])?[]:{})}er(p,c,u),p=p[c]}return e}var Zr=Tn?function(e,t){return Tn.set(e,t),e}:ip,Xr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:tp(t),writable:!0})}:ip;function ei(e){return Aa(Vs(e))}function ti(e,t,n){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i<a;)o[i]=e[i+t];return o}function ni(e,t){var n;return lr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!cs(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return ii(e,t,ip,n)}function ii(e,t,n,r){var a=0,o=null==e?0:e.length;if(0===o)return 0;for(var s=(t=n(t))!=t,p=null===t,c=cs(t),u=t===i;a<o;){var l=ft((a+o)/2),d=n(e[l]),f=d!==i,h=null===d,m=d==d,v=cs(d);if(s)var y=r||m;else y=u?m&&(r||f):p?m&&f&&(r||!h):c?m&&f&&!h&&(r||!v):!h&&!v&&(r?d<=t:d<t);y?a=l+1:o=l}return bn(o,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!Vo(s,p)){var p=s;a[i++]=0===o?0:o}}return a}function oi(e){return"number"==typeof e?e:cs(e)?d:+e}function si(e){if("string"==typeof e)return e;if(Wo(e))return Pt(e,si)+"";if(cs(e))return $n?$n.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pi(e,t,n){var r=-1,i=Tt,a=e.length,o=!0,s=[],p=s;if(n)o=!1,i=Nt;else if(a>=200){var c=t?null:Hi(e);if(c)return cn(c);o=!1,i=Yt,p=new Hn}else p=t?[]:s;e:for(;++r<a;){var u=e[r],l=t?t(u):u;if(u=n||0!==u?u:0,o&&l==l){for(var d=p.length;d--;)if(p[d]===l)continue e;t&&p.push(l),s.push(u)}else i(p,l,n)||(p!==s&&p.push(l),s.push(u))}return s}function ci(e,t){return null==(e=Ea(e,t=yi(t,e)))||delete e[Ma(Ja(t))]}function ui(e,t,n,r){return Yr(e,t,n(xr(e,t)),r)}function li(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?ti(e,r?0:a,r?a+1:i):ti(e,r?a+1:0,r?i:a)}function di(e,t){var n=e;return n instanceof Un&&(n=n.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,Ct([e],t.args))}),n)}function fi(e,t,n){var i=e.length;if(i<2)return i?pi(e[0]):[];for(var a=-1,o=r(i);++a<i;)for(var s=e[a],p=-1;++p<i;)p!=a&&(o[a]=ur(o[a]||s,e[p],t,n));return pi(vr(o,1),t,n)}function hi(e,t,n){for(var r=-1,a=e.length,o=t.length,s={};++r<a;){var p=r<o?t[r]:i;n(s,e[r],p)}return s}function mi(e){return Ko(e)?e:[]}function vi(e){return"function"==typeof e?e:ip}function yi(e,t){return Wo(e)?e:ba(e,t)?[e]:Ra(gs(e))}var bi=Kr;function gi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var wi=ot||function(e){return lt.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Di(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oi(e,t){if(e!==t){var n=e!==i,r=null===e,a=e==e,o=cs(e),s=t!==i,p=null===t,c=t==t,u=cs(t);if(!p&&!u&&!o&&e>t||o&&s&&c&&!p&&!u||r&&s&&c||!n&&c||!a)return 1;if(!r&&!o&&!u&&e<t||u&&n&&a&&!r&&!o||p&&n&&a||!s&&a||!c)return-1}return 0}function Ei(e,t,n,i){for(var a=-1,o=e.length,s=n.length,p=-1,c=t.length,u=yn(o-s,0),l=r(c+u),d=!i;++p<c;)l[p]=t[p];for(;++a<s;)(d||a<o)&&(l[n[a]]=e[a]);for(;u--;)l[p++]=e[a++];return l}function Si(e,t,n,i){for(var a=-1,o=e.length,s=-1,p=n.length,c=-1,u=t.length,l=yn(o-p,0),d=r(l+u),f=!i;++a<l;)d[a]=e[a];for(var h=a;++c<u;)d[h+c]=t[c];for(;++s<p;)(f||a<o)&&(d[h+n[s]]=e[a++]);return d}function ji(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function ki(e,t,n,r){var a=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var p=t[o],c=r?r(n[p],e[p],p,n,e):i;c===i&&(c=e[p]),a?ir(n,p,c):er(n,p,c)}return n}function Ti(e,t){return function(n,r){var i=Wo(n)?Ot:nr,a=t?t():{};return i(n,e,oa(r,2),a)}}function Ni(e){return Kr((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:i,s=a>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&ya(n[0],n[1],s)&&(o=a<3?i:o,a=1),t=Oe(t);++r<a;){var p=n[r];p&&e(t,p,r,o)}return t}))}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ho(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Oe(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function Ci(e){return function(t,n,r){for(var i=-1,a=Oe(t),o=r(t),s=o.length;s--;){var p=o[e?s:++i];if(!1===n(a[p],p,a))break}return t}}function Ai(e){return function(t){var n=an(t=gs(t))?dn(t):i,r=n?n[0]:t.charAt(0),a=n?gi(n,1).join(""):t.slice(1);return r[e]()+a}}function Ii(e){return function(t){return At(Zs(zs(t).replace(Je,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ln(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Ri(e){return function(t,n,r){var a=Oe(t);if(!Ho(t)){var o=oa(n,3);t=Cs(t),n=function(e){return o(a[e],e,a)}}var s=e(t,n,r);return s>-1?a[o?t[s]:s]:i}}function Mi(e){return ea((function(t){var n=t.length,r=n,o=qn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new je(a);if(o&&!p&&"wrapper"==ia(s))var p=new qn([],!0)}for(r=p?r:n;++r<n;){var c=ia(s=t[r]),u="wrapper"==c?ra(s):i;p=u&&ga(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?p[ia(u[0])].apply(p,u[3]):1==s.length&&ga(s)?p[c]():p.thru(s)}return function(){var e=arguments,r=e[0];if(p&&1==e.length&&Wo(r))return p.plant(r).value();for(var i=0,a=n?t[i].apply(this,e):r;++i<n;)a=t[i].call(this,a);return a}}))}function $i(e,t,n,a,o,s,p,u,l,d){var f=t&c,h=1&t,m=2&t,v=24&t,y=512&t,b=m?i:Fi(e);return function i(){for(var c=arguments.length,g=r(c),w=c;w--;)g[w]=arguments[w];if(v)var _=aa(i),x=en(g,_);if(a&&(g=Ei(g,a,o,v)),s&&(g=Si(g,s,p,v)),c-=x,v&&c<d){var D=pn(g,_);return Wi(e,t,$i,i.placeholder,n,g,D,u,l,d-c)}var O=h?n:this,E=m?O[e]:e;return c=g.length,u?g=Sa(g,u):y&&c>1&&g.reverse(),f&&l<c&&(g.length=l),this&&this!==lt&&this instanceof i&&(E=b||Fi(E)),E.apply(O,g)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return gr(e,(function(e,i,a){t(r,n(e),i,a)})),r}(n,e,t(r),{})}}function Li(e,t){return function(n,r){var a;if(n===i&&r===i)return t;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),a=e(n,r)}return a}}function Vi(e){return ea((function(t){return t=Pt(t,Gt(oa())),Kr((function(n){var r=this;return e(t,(function(e){return Dt(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?Hr(t,e):t;var r=Hr(t,dt(e/ln(t)));return an(t)?gi(dn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,n,a){return a&&"number"!=typeof a&&ya(t,n,a)&&(n=a=i),t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n,i){for(var a=-1,o=yn(dt((t-e)/(n||1)),0),s=r(o);o--;)s[i?o:++a]=e,e+=n;return s}(t,n,a=a===i?t<n?1:-1:hs(a),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Wi(e,t,n,r,a,o,s,c,u,l){var d=8&t;t|=d?p:64,4&(t&=~(d?64:p))||(t&=-4);var f=[e,t,a,d?o:i,d?s:i,d?i:o,d?i:s,c,u,l],h=n.apply(i,f);return ga(e)&&ka(h,f),h.placeholder=r,Pa(h,e,t)}function Qi(e){var t=De[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(ms(n),292))&&Rt(e)){var r=(gs(e)+"e").split("e");return+((r=(gs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Hi=Sn&&1/cn(new Sn([,-0]))[1]==u?function(e){return new Sn(e)}:cp;function Ki(e){return function(t){var n=da(t);return n==x?on(t):n==j?un(t):function(e,t){return Pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gi(e,t,n,o,u,l,d,f){var h=2&t;if(!h&&"function"!=typeof e)throw new je(a);var m=o?o.length:0;if(m||(t&=-97,o=u=i),d=d===i?d:yn(ms(d),0),f=f===i?f:ms(f),m-=u?u.length:0,64&t){var v=o,y=u;o=u=i}var b=h?i:ra(e),g=[e,t,n,o,u,v,y,l,d,f];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var p=t[3];if(p){var u=e[3];e[3]=u?Ei(u,p,t[4]):p,e[4]=u?pn(e[3],s):t[4]}(p=t[5])&&(u=e[5],e[5]=u?Si(u,p,t[6]):p,e[6]=u?pn(e[5],s):t[6]),(p=t[7])&&(e[7]=p),r&c&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],n=g[2],o=g[3],u=g[4],!(f=g[9]=g[9]===i?h?0:e.length:yn(g[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var a=Fi(e);return function o(){for(var s=arguments.length,p=r(s),c=s,u=aa(o);c--;)p[c]=arguments[c];var l=s<3&&p[0]!==u&&p[s-1]!==u?[]:pn(p,u);return(s-=l.length)<n?Wi(e,t,$i,o.placeholder,i,p,l,i,i,n-s):Dt(this&&this!==lt&&this instanceof o?a:e,this,p)}}(e,t,f):t!=p&&33!=t||u.length?$i.apply(i,g):function(e,t,n,i){var a=1&t,o=Fi(e);return function t(){for(var s=-1,p=arguments.length,c=-1,u=i.length,l=r(u+p),d=this&&this!==lt&&this instanceof t?o:e;++c<u;)l[c]=i[c];for(;p--;)l[c++]=arguments[++s];return Dt(d,a?n:this,l)}}(e,t,n,o);else var w=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==lt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Pa((b?Zr:ka)(w,g),e,t)}function Ji(e,t,n,r){return e===i||Vo(e,Ne[n])&&!Ae.call(r,n)?t:e}function Yi(e,t,n,r,a,o){return ts(e)&&ts(t)&&(o.set(t,e),Lr(e,t,i,Yi,o),o.delete(t)),e}function Zi(e){return as(e)?i:e}function Xi(e,t,n,r,a,o){var s=1&n,p=e.length,c=t.length;if(p!=c&&!(s&&c>p))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,h=2&n?new Hn:i;for(o.set(e,t),o.set(t,e);++d<p;){var m=e[d],v=t[d];if(r)var y=s?r(v,m,d,t,e,o):r(m,v,d,e,t,o);if(y!==i){if(y)continue;f=!1;break}if(h){if(!Ft(t,(function(e,t){if(!Yt(h,t)&&(m===e||a(m,e,n,r,o)))return h.push(t)}))){f=!1;break}}else if(m!==v&&!a(m,v,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function ea(e){return Na(Oa(e,i,Wa),e+"")}function ta(e){return Dr(e,Cs,ua)}function na(e){return Dr(e,As,la)}var ra=Tn?function(e){return Tn.get(e)}:cp;function ia(e){for(var t=e.name+"",n=Nn[t],r=Ae.call(Nn,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function aa(e){return(Ae.call(Bn,"placeholder")?Bn:e).placeholder}function oa(){var e=Bn.iteratee||ap;return e=e===ap?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function sa(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function pa(e){for(var t=Cs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xa(i)]}return t}function ca(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Ar(n)?n:i}var ua=mt?function(e){return null==e?[]:(e=Oe(e),kt(mt(e),(function(t){return Qe.call(e,t)})))}:vp,la=mt?function(e){for(var t=[];e;)Ct(t,ua(e)),e=ze(e);return t}:vp,da=Or;function fa(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,a=!1;++r<i;){var o=Ma(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&es(i)&&va(o,i)&&(Wo(e)||zo(e))}function ha(e){return"function"!=typeof e.constructor||_a(e)?{}:Ln(ze(e))}function ma(e){return Wo(e)||zo(e)||!!(Ke&&e&&e[Ke])}function va(e,t){var n=typeof e;return!!(t=null==t?l:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ya(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Ho(n)&&va(t,n.length):"string"==r&&t in n)&&Vo(n[t],e)}function ba(e,t){if(Wo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||X.test(e)||!Z.test(e)||null!=t&&e in Oe(t)}function ga(e){var t=ia(e),n=Bn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ra(n);return!!r&&e===r[0]}(Dn&&da(new Dn(new ArrayBuffer(1)))!=C||On&&da(new On)!=x||En&&da(En.resolve())!=E||Sn&&da(new Sn)!=j||jn&&da(new jn)!=N)&&(da=function(e){var t=Or(e),n=t==O?e.constructor:i,r=n?$a(n):"";if(r)switch(r){case Pn:return C;case Cn:return x;case An:return E;case In:return j;case Fn:return N}return t});var wa=Pe?Zo:yp;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function xa(e){return e==e&&!ts(e)}function Da(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Oe(n))}}function Oa(e,t,n){return t=yn(t===i?e.length-1:t,0),function(){for(var i=arguments,a=-1,o=yn(i.length-t,0),s=r(o);++a<o;)s[a]=i[t+a];a=-1;for(var p=r(t+1);++a<t;)p[a]=i[a];return p[t]=n(s),Dt(e,this,p)}}function Ea(e,t){return t.length<2?e:xr(e,ti(t,0,-1))}function Sa(e,t){for(var n=e.length,r=bn(t.length,n),a=ji(e);r--;){var o=t[r];e[r]=va(o,n)?a[o]:i}return e}function ja(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Ca(Zr),Ta=ut||function(e,t){return lt.setTimeout(e,t)},Na=Ca(Xr);function Pa(e,t,n){var r=t+"";return Na(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(h,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(se):[]}(r),n)))}function Ca(e){var t=0,n=0;return function(){var r=gn(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Aa(e,t){var n=-1,r=e.length,a=r-1;for(t=t===i?r:t;++n<t;){var o=Qr(n,a),s=e[o];e[o]=e[n],e[n]=s}return e.length=t,e}var Ia,Fa,Ra=(Ia=Fo((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Fa.size&&Fa.clear(),e})),Fa=Ia.cache,Ia);function Ma(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $a(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ba(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=ji(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var La=Kr((function(e,t){return Ko(e)?ur(e,vr(t,1,Ko,!0)):[]})),Va=Kr((function(e,t){var n=Ja(t);return Ko(n)&&(n=i),Ko(e)?ur(e,vr(t,1,Ko,!0),oa(n,2)):[]})),qa=Kr((function(e,t){var n=Ja(t);return Ko(n)&&(n=i),Ko(e)?ur(e,vr(t,1,Ko,!0),i,n):[]}));function Ua(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=yn(r+i,0)),$t(e,oa(t,3),i)}function za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r-1;return n!==i&&(a=ms(n),a=n<0?yn(r+a,0):bn(a,r-1)),$t(e,oa(t,3),a,!0)}function Wa(e){return null!=e&&e.length?vr(e,1):[]}function Qa(e){return e&&e.length?e[0]:i}var Ha=Kr((function(e){var t=Pt(e,mi);return t.length&&t[0]===e[0]?kr(t):[]})),Ka=Kr((function(e){var t=Ja(e),n=Pt(e,mi);return t===Ja(n)?t=i:n.pop(),n.length&&n[0]===e[0]?kr(n,oa(t,2)):[]})),Ga=Kr((function(e){var t=Ja(e),n=Pt(e,mi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?kr(n,i,t):[]}));function Ja(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Kr(Za);function Za(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var Xa=ea((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Wr(e,Pt(t,(function(e){return va(e,n)?+e:e})).sort(Oi)),r}));function eo(e){return null==e?e:xn.call(e)}var to=Kr((function(e){return pi(vr(e,1,Ko,!0))})),no=Kr((function(e){var t=Ja(e);return Ko(t)&&(t=i),pi(vr(e,1,Ko,!0),oa(t,2))})),ro=Kr((function(e){var t=Ja(e);return t="function"==typeof t?t:i,pi(vr(e,1,Ko,!0),i,t)}));function io(e){if(!e||!e.length)return[];var t=0;return e=kt(e,(function(e){if(Ko(e))return t=yn(e.length,t),!0})),Ht(t,(function(t){return Pt(e,Ut(t))}))}function ao(e,t){if(!e||!e.length)return[];var n=io(e);return null==t?n:Pt(n,(function(e){return Dt(t,i,e)}))}var oo=Kr((function(e,t){return Ko(e)?ur(e,t):[]})),so=Kr((function(e){return fi(kt(e,Ko))})),po=Kr((function(e){var t=Ja(e);return Ko(t)&&(t=i),fi(kt(e,Ko),oa(t,2))})),co=Kr((function(e){var t=Ja(e);return t="function"==typeof t?t:i,fi(kt(e,Ko),i,t)})),uo=Kr(io),lo=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ao(e,n)}));function fo(e){var t=Bn(e);return t.__chain__=!0,t}function ho(e,t){return t(e)}var mo=ea((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&va(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[a],thisArg:i}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)})),vo=Ti((function(e,t,n){Ae.call(e,n)?++e[n]:ir(e,n,1)})),yo=Ri(Ua),bo=Ri(za);function go(e,t){return(Wo(e)?Et:lr)(e,oa(t,3))}function wo(e,t){return(Wo(e)?St:dr)(e,oa(t,3))}var _o=Ti((function(e,t,n){Ae.call(e,n)?e[n].push(t):ir(e,n,[t])})),xo=Kr((function(e,t,n){var i=-1,a="function"==typeof t,o=Ho(e)?r(e.length):[];return lr(e,(function(e){o[++i]=a?Dt(t,e,n):Tr(e,t,n)})),o})),Do=Ti((function(e,t,n){ir(e,n,t)}));function Oo(e,t){return(Wo(e)?Pt:Mr)(e,oa(t,3))}var Eo=Ti((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),So=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ya(e,t[0],t[1])?t=[]:n>2&&ya(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,vr(t,1),[])})),jo=ct||function(){return lt.Date.now()};function ko(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Gi(e,c,i,i,i,i,t)}function To(e,t){var n;if("function"!=typeof t)throw new je(a);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var No=Kr((function(e,t,n){var r=1;if(n.length){var i=pn(n,aa(No));r|=p}return Gi(e,r,t,n,i)})),Po=Kr((function(e,t,n){var r=3;if(n.length){var i=pn(n,aa(Po));r|=p}return Gi(t,r,e,n,i)}));function Co(e,t,n){var r,o,s,p,c,u,l=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new je(a);function m(t){var n=r,a=o;return r=o=i,l=t,p=e.apply(a,n)}function v(e){return l=e,c=Ta(b,t),d?m(e):p}function y(e){var n=e-u;return u===i||n>=t||n<0||f&&e-l>=s}function b(){var e=jo();if(y(e))return g(e);c=Ta(b,function(e){var n=t-(e-u);return f?bn(n,s-(e-l)):n}(e))}function g(e){return c=i,h&&r?m(e):(r=o=i,p)}function w(){var e=jo(),n=y(e);if(r=arguments,o=this,u=e,n){if(c===i)return v(u);if(f)return wi(c),c=Ta(b,t),m(u)}return c===i&&(c=Ta(b,t)),p}return t=ys(t)||0,ts(n)&&(d=!!n.leading,s=(f="maxWait"in n)?yn(ys(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==i&&wi(c),l=0,r=u=o=c=i},w.flush=function(){return c===i?p:g(jo())},w}var Ao=Kr((function(e,t){return cr(e,1,t)})),Io=Kr((function(e,t,n){return cr(e,ys(t)||0,n)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Fo.Cache||Qn),n}function Ro(e){if("function"!=typeof e)throw new je(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fo.Cache=Qn;var Mo=bi((function(e,t){var n=(t=1==t.length&&Wo(t[0])?Pt(t[0],Gt(oa())):Pt(vr(t,1),Gt(oa()))).length;return Kr((function(r){for(var i=-1,a=bn(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return Dt(e,this,r)}))})),$o=Kr((function(e,t){var n=pn(t,aa($o));return Gi(e,p,i,t,n)})),Bo=Kr((function(e,t){var n=pn(t,aa(Bo));return Gi(e,64,i,t,n)})),Lo=ea((function(e,t){return Gi(e,256,i,i,i,t)}));function Vo(e,t){return e===t||e!=e&&t!=t}var qo=zi(Er),Uo=zi((function(e,t){return e>=t})),zo=Nr(function(){return arguments}())?Nr:function(e){return ns(e)&&Ae.call(e,"callee")&&!Qe.call(e,"callee")},Wo=r.isArray,Qo=yt?Gt(yt):function(e){return ns(e)&&Or(e)==P};function Ho(e){return null!=e&&es(e.length)&&!Zo(e)}function Ko(e){return ns(e)&&Ho(e)}var Go=vt||yp,Jo=bt?Gt(bt):function(e){return ns(e)&&Or(e)==b};function Yo(e){if(!ns(e))return!1;var t=Or(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Zo(e){if(!ts(e))return!1;var t=Or(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xo(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=gt?Gt(gt):function(e){return ns(e)&&da(e)==x};function is(e){return"number"==typeof e||ns(e)&&Or(e)==D}function as(e){if(!ns(e)||Or(e)!=O)return!1;var t=ze(e);if(null===t)return!0;var n=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ce.call(n)==Me}var os=wt?Gt(wt):function(e){return ns(e)&&Or(e)==S},ss=_t?Gt(_t):function(e){return ns(e)&&da(e)==j};function ps(e){return"string"==typeof e||!Wo(e)&&ns(e)&&Or(e)==k}function cs(e){return"symbol"==typeof e||ns(e)&&Or(e)==T}var us=xt?Gt(xt):function(e){return ns(e)&&es(e.length)&&!!it[Or(e)]},ls=zi(Rr),ds=zi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Ho(e))return ps(e)?dn(e):ji(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=da(e);return(t==x?on:t==j?cn:Vs)(e)}function hs(e){return e?(e=ys(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function vs(e){return e?or(ms(e),0,f):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return d;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=he.test(e);return n||ve.test(e)?pt(e.slice(2),n?2:8):fe.test(e)?d:+e}function bs(e){return ki(e,As(e))}function gs(e){return null==e?"":si(e)}var ws=Ni((function(e,t){if(_a(t)||Ho(t))ki(t,Cs(t),e);else for(var n in t)Ae.call(t,n)&&er(e,n,t[n])})),_s=Ni((function(e,t){ki(t,As(t),e)})),xs=Ni((function(e,t,n,r){ki(t,As(t),e,r)})),Ds=Ni((function(e,t,n,r){ki(t,Cs(t),e,r)})),Os=ea(ar),Es=Kr((function(e,t){e=Oe(e);var n=-1,r=t.length,a=r>2?t[2]:i;for(a&&ya(t[0],t[1],a)&&(r=1);++n<r;)for(var o=t[n],s=As(o),p=-1,c=s.length;++p<c;){var u=s[p],l=e[u];(l===i||Vo(l,Ne[u])&&!Ae.call(e,u))&&(e[u]=o[u])}return e})),Ss=Kr((function(e){return e.push(i,Yi),Dt(Fs,i,e)}));function js(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function ks(e,t){return null!=e&&fa(e,t,jr)}var Ts=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=n}),tp(ip)),Ns=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ae.call(e,t)?e[t].push(n):e[t]=[n]}),oa),Ps=Kr(Tr);function Cs(e){return Ho(e)?Gn(e):Fr(e)}function As(e){return Ho(e)?Gn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Oe(e))t.push(n);return t}(e);var t=_a(e),n=[];for(var r in e)("constructor"!=r||!t&&Ae.call(e,r))&&n.push(r);return n}(e)}var Is=Ni((function(e,t,n){Lr(e,t,n)})),Fs=Ni((function(e,t,n,r){Lr(e,t,n,r)})),Rs=ea((function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,(function(t){return t=yi(t,e),r||(r=t.length>1),t})),ki(e,na(e),n),r&&(n=sr(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Ms=ea((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return ks(e,n)}))}(e,t)}));function $s(e,t){if(null==e)return{};var n=Pt(na(e),(function(e){return[e]}));return t=oa(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Bs=Ki(Cs),Ls=Ki(As);function Vs(e){return null==e?[]:Jt(e,Cs(e))}var qs=Ii((function(e,t,n){return t=t.toLowerCase(),e+(n?Us(t):t)}));function Us(e){return Ys(gs(e).toLowerCase())}function zs(e){return(e=gs(e))&&e.replace(be,tn).replace(Ye,"")}var Ws=Ii((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Qs=Ii((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Hs=Ai("toLowerCase"),Ks=Ii((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gs=Ii((function(e,t,n){return e+(n?" ":"")+Ys(t)})),Js=Ii((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ys=Ai("toUpperCase");function Zs(e,t,n){return e=gs(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(pe)||[]}(e):e.match(t)||[]}var Xs=Kr((function(e,t){try{return Dt(e,i,t)}catch(e){return Yo(e)?e:new _e(e)}})),ep=ea((function(e,t){return Et(t,(function(t){t=Ma(t),ir(e,t,No(e[t],e))})),e}));function tp(e){return function(){return e}}var np=Mi(),rp=Mi(!0);function ip(e){return e}function ap(e){return Ir("function"==typeof e?e:sr(e,1))}var op=Kr((function(e,t){return function(n){return Tr(n,e,t)}})),sp=Kr((function(e,t){return function(n){return Tr(e,n,t)}}));function pp(e,t,n){var r=Cs(t),i=_r(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Cs(t)));var a=!(ts(n)&&"chain"in n&&!n.chain),o=Zo(e);return Et(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=ji(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ct([this.value()],arguments))})})),e}function cp(){}var up=Vi(Pt),lp=Vi(jt),dp=Vi(Ft);function fp(e){return ba(e)?Ut(Ma(e)):function(e){return function(t){return xr(t,e)}}(e)}var hp=Ui(),mp=Ui(!0);function vp(){return[]}function yp(){return!1}var bp,gp=Li((function(e,t){return e+t}),0),wp=Qi("ceil"),_p=Li((function(e,t){return e/t}),1),xp=Qi("floor"),Dp=Li((function(e,t){return e*t}),1),Op=Qi("round"),Ep=Li((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new je(a);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=ko,Bn.assign=ws,Bn.assignIn=_s,Bn.assignInWith=xs,Bn.assignWith=Ds,Bn.at=Os,Bn.before=To,Bn.bind=No,Bn.bindAll=ep,Bn.bindKey=Po,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wo(e)?e:[e]},Bn.chain=fo,Bn.chunk=function(e,t,n){t=(n?ya(e,t,n):t===i)?1:yn(ms(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,p=r(dt(a/t));o<a;)p[s++]=ti(e,o,o+=t);return p},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ct(Wo(n)?ji(n):[n],vr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=oa();return e=t?Pt(e,(function(e){if("function"!=typeof e[1])throw new je(a);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Dt(i[0],this,n))return Dt(i[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=Cs(e);return function(n){return pr(n,e,t)}}(sr(e,1))},Bn.constant=tp,Bn.countBy=vo,Bn.create=function(e,t){var n=Ln(e);return null==t?n:rr(n,t)},Bn.curry=function e(t,n,r){var a=Gi(t,8,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bn.curryRight=function e(t,n,r){var a=Gi(t,16,i,i,i,i,i,n=r?i:n);return a.placeholder=e.placeholder,a},Bn.debounce=Co,Bn.defaults=Es,Bn.defaultsDeep=Ss,Bn.defer=Ao,Bn.delay=Io,Bn.difference=La,Bn.differenceBy=Va,Bn.differenceWith=qa,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ms(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ms(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!0):[]},Bn.fill=function(e,t,n,r){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&ya(e,t,n)&&(n=0,r=a),function(e,t,n,r){var a=e.length;for((n=ms(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:ms(r))<0&&(r+=a),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Wo(e)?kt:mr)(e,oa(t,3))},Bn.flatMap=function(e,t){return vr(Oo(e,t),1)},Bn.flatMapDeep=function(e,t){return vr(Oo(e,t),u)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:ms(n),vr(Oo(e,t),n)},Bn.flatten=Wa,Bn.flattenDeep=function(e){return null!=e&&e.length?vr(e,u):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?vr(e,t=t===i?1:ms(t)):[]},Bn.flip=function(e){return Gi(e,512)},Bn.flow=np,Bn.flowRight=rp,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:_r(e,Cs(e))},Bn.functionsIn=function(e){return null==e?[]:_r(e,As(e))},Bn.groupBy=_o,Bn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Bn.intersection=Ha,Bn.intersectionBy=Ka,Bn.intersectionWith=Ga,Bn.invert=Ts,Bn.invertBy=Ns,Bn.invokeMap=xo,Bn.iteratee=ap,Bn.keyBy=Do,Bn.keys=Cs,Bn.keysIn=As,Bn.map=Oo,Bn.mapKeys=function(e,t){var n={};return t=oa(t,3),gr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Bn.mapValues=function(e,t){var n={};return t=oa(t,3),gr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Bn.matches=function(e){return $r(sr(e,1))},Bn.matchesProperty=function(e,t){return Br(e,sr(t,1))},Bn.memoize=Fo,Bn.merge=Is,Bn.mergeWith=Fs,Bn.method=op,Bn.methodOf=sp,Bn.mixin=pp,Bn.negate=Ro,Bn.nthArg=function(e){return e=ms(e),Kr((function(t){return Vr(t,e)}))},Bn.omit=Rs,Bn.omitBy=function(e,t){return $s(e,Ro(oa(t)))},Bn.once=function(e){return To(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Wo(t)||(t=null==t?[]:[t]),Wo(n=r?i:n)||(n=null==n?[]:[n]),qr(e,t,n))},Bn.over=up,Bn.overArgs=Mo,Bn.overEvery=lp,Bn.overSome=dp,Bn.partial=$o,Bn.partialRight=Bo,Bn.partition=Eo,Bn.pick=Ms,Bn.pickBy=$s,Bn.property=fp,Bn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Bn.pull=Ya,Bn.pullAll=Za,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,oa(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Bn.pullAt=Xa,Bn.range=hp,Bn.rangeRight=mp,Bn.rearg=Lo,Bn.reject=function(e,t){return(Wo(e)?kt:mr)(e,Ro(oa(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=oa(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Wr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new je(a);return Kr(e,t=t===i?t:ms(t))},Bn.reverse=eo,Bn.sampleSize=function(e,t,n){return t=(n?ya(e,t,n):t===i)?1:ms(t),(Wo(e)?Yn:Jr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Yr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Yr(e,t,n,r)},Bn.shuffle=function(e){return(Wo(e)?Zn:ei)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ya(e,t,n)?(t=0,n=r):(t=null==t?0:ms(t),n=n===i?r:ms(n)),ti(e,t,n)):[]},Bn.sortBy=So,Bn.sortedUniq=function(e){return e&&e.length?ai(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,oa(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&ya(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=si(t))&&an(e)?gi(dn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new je(a);return t=null==t?0:yn(ms(t),0),Kr((function(n){var r=n[t],i=gi(n,0,t);return r&&Ct(i,r),Dt(e,this,i)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ms(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?li(e,oa(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?li(e,oa(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new je(a);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Co(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ho,Bn.toArray=fs,Bn.toPairs=Bs,Bn.toPairsIn=Ls,Bn.toPath=function(e){return Wo(e)?Pt(e,Ma):cs(e)?[e]:ji(Ra(gs(e)))},Bn.toPlainObject=bs,Bn.transform=function(e,t,n){var r=Wo(e),i=r||Go(e)||us(e);if(t=oa(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:ts(e)&&Zo(a)?Ln(ze(e)):{}}return(i?Et:gr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Bn.unary=function(e){return ko(e,1)},Bn.union=to,Bn.unionBy=no,Bn.unionWith=ro,Bn.uniq=function(e){return e&&e.length?pi(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?pi(e,oa(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?pi(e,i,t):[]},Bn.unset=function(e,t){return null==e||ci(e,t)},Bn.unzip=io,Bn.unzipWith=ao,Bn.update=function(e,t,n){return null==e?e:ui(e,t,vi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ui(e,t,vi(n),r)},Bn.values=Vs,Bn.valuesIn=function(e){return null==e?[]:Jt(e,As(e))},Bn.without=oo,Bn.words=Zs,Bn.wrap=function(e,t){return $o(vi(t),e)},Bn.xor=so,Bn.xorBy=po,Bn.xorWith=co,Bn.zip=uo,Bn.zipObject=function(e,t){return hi(e||[],t||[],er)},Bn.zipObjectDeep=function(e,t){return hi(e||[],t||[],Yr)},Bn.zipWith=lo,Bn.entries=Bs,Bn.entriesIn=Ls,Bn.extend=_s,Bn.extendWith=xs,pp(Bn,Bn),Bn.add=gp,Bn.attempt=Xs,Bn.camelCase=qs,Bn.capitalize=Us,Bn.ceil=wp,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ys(n))==n?n:0),t!==i&&(t=(t=ys(t))==t?t:0),or(ys(e),t,n)},Bn.clone=function(e){return sr(e,4)},Bn.cloneDeep=function(e){return sr(e,5)},Bn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||pr(e,t,Cs(t))},Bn.deburr=zs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=_p,Bn.endsWith=function(e,t,n){e=gs(e),t=si(t);var r=e.length,a=n=n===i?r:or(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,a)==t},Bn.eq=Vo,Bn.escape=function(e){return(e=gs(e))&&K.test(e)?e.replace(Q,nn):e},Bn.escapeRegExp=function(e){return(e=gs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Bn.every=function(e,t,n){var r=Wo(e)?jt:fr;return n&&ya(e,t,n)&&(t=i),r(e,oa(t,3))},Bn.find=yo,Bn.findIndex=Ua,Bn.findKey=function(e,t){return Mt(e,oa(t,3),gr)},Bn.findLast=bo,Bn.findLastIndex=za,Bn.findLastKey=function(e,t){return Mt(e,oa(t,3),wr)},Bn.floor=xp,Bn.forEach=go,Bn.forEachRight=wo,Bn.forIn=function(e,t){return null==e?e:yr(e,oa(t,3),As)},Bn.forInRight=function(e,t){return null==e?e:br(e,oa(t,3),As)},Bn.forOwn=function(e,t){return e&&gr(e,oa(t,3))},Bn.forOwnRight=function(e,t){return e&&wr(e,oa(t,3))},Bn.get=js,Bn.gt=qo,Bn.gte=Uo,Bn.has=function(e,t){return null!=e&&fa(e,t,Sr)},Bn.hasIn=ks,Bn.head=Qa,Bn.identity=ip,Bn.includes=function(e,t,n,r){e=Ho(e)?e:Vs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ps(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Bt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=yn(r+i,0)),Bt(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<yn(t,n)}(e=ys(e),t,n)},Bn.invoke=Ps,Bn.isArguments=zo,Bn.isArray=Wo,Bn.isArrayBuffer=Qo,Bn.isArrayLike=Ho,Bn.isArrayLikeObject=Ko,Bn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Or(e)==y},Bn.isBuffer=Go,Bn.isDate=Jo,Bn.isElement=function(e){return ns(e)&&1===e.nodeType&&!as(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(Ho(e)&&(Wo(e)||"string"==typeof e||"function"==typeof e.splice||Go(e)||us(e)||zo(e)))return!e.length;var t=da(e);if(t==x||t==j)return!e.size;if(_a(e))return!Fr(e).length;for(var n in e)if(Ae.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Pr(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Pr(e,t,i,n):!!r},Bn.isError=Yo,Bn.isFinite=function(e){return"number"==typeof e&&Rt(e)},Bn.isFunction=Zo,Bn.isInteger=Xo,Bn.isLength=es,Bn.isMap=rs,Bn.isMatch=function(e,t){return e===t||Cr(e,t,pa(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Cr(e,t,pa(t),n)},Bn.isNaN=function(e){return is(e)&&e!=+e},Bn.isNative=function(e){if(wa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ar(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=is,Bn.isObject=ts,Bn.isObjectLike=ns,Bn.isPlainObject=as,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Xo(e)&&e>=-9007199254740991&&e<=l},Bn.isSet=ss,Bn.isString=ps,Bn.isSymbol=cs,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ns(e)&&da(e)==N},Bn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Or(e)},Bn.join=function(e,t){return null==e?"":zt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Ja,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=ms(n))<0?yn(r+a,0):bn(a,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):$t(e,Vt,a,!0)},Bn.lowerCase=Qs,Bn.lowerFirst=Hs,Bn.lt=ls,Bn.lte=ds,Bn.max=function(e){return e&&e.length?hr(e,ip,Er):i},Bn.maxBy=function(e,t){return e&&e.length?hr(e,oa(t,2),Er):i},Bn.mean=function(e){return qt(e,ip)},Bn.meanBy=function(e,t){return qt(e,oa(t,2))},Bn.min=function(e){return e&&e.length?hr(e,ip,Rr):i},Bn.minBy=function(e,t){return e&&e.length?hr(e,oa(t,2),Rr):i},Bn.stubArray=vp,Bn.stubFalse=yp,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Dp,Bn.nth=function(e,t){return e&&e.length?Vr(e,ms(t)):i},Bn.noConflict=function(){return lt._===this&&(lt._=$e),this},Bn.noop=cp,Bn.now=jo,Bn.pad=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(ft(i),n)+e+qi(dt(i),n)},Bn.padEnd=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;return t&&r<t?e+qi(t-r,n):e},Bn.padStart=function(e,t,n){e=gs(e);var r=(t=ms(t))?ln(e):0;return t&&r<t?qi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(gs(e).replace(re,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ya(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var a=_n();return bn(e+a*(t-e+st("1e-"+((a+"").length-1))),t)}return Qr(e,t)},Bn.reduce=function(e,t,n){var r=Wo(e)?At:Wt,i=arguments.length<3;return r(e,oa(t,4),n,i,lr)},Bn.reduceRight=function(e,t,n){var r=Wo(e)?It:Wt,i=arguments.length<3;return r(e,oa(t,4),n,i,dr)},Bn.repeat=function(e,t,n){return t=(n?ya(e,t,n):t===i)?1:ms(t),Hr(gs(e),t)},Bn.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,a=(t=yi(t,e)).length;for(a||(a=1,e=i);++r<a;){var o=null==e?i:e[Ma(t[r])];o===i&&(r=a,o=n),e=Zo(o)?o.call(e):o}return e},Bn.round=Op,Bn.runInContext=e,Bn.sample=function(e){return(Wo(e)?Jn:Gr)(e)},Bn.size=function(e){if(null==e)return 0;if(Ho(e))return ps(e)?ln(e):e.length;var t=da(e);return t==x||t==j?e.size:Fr(e).length},Bn.snakeCase=Ks,Bn.some=function(e,t,n){var r=Wo(e)?Ft:ni;return n&&ya(e,t,n)&&(t=i),r(e,oa(t,3))},Bn.sortedIndex=function(e,t){return ri(e,t)},Bn.sortedIndexBy=function(e,t,n){return ii(e,t,oa(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Vo(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ii(e,t,oa(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Vo(e[n],t))return n}return-1},Bn.startCase=Gs,Bn.startsWith=function(e,t,n){return e=gs(e),n=null==n?0:or(ms(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Bn.subtract=Ep,Bn.sum=function(e){return e&&e.length?Qt(e,ip):0},Bn.sumBy=function(e,t){return e&&e.length?Qt(e,oa(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&ya(e,t,n)&&(t=i),e=gs(e),t=xs({},t,r,Ji);var a,o,s=xs({},t.imports,r.imports,Ji),p=Cs(s),c=Jt(s,p),u=0,l=t.interpolate||ge,d="__p += '",f=Ee((t.escape||ge).source+"|"+l.source+"|"+(l===Y?le:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(Ae.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,(function(t,n,r,i,s,p){return r||(r=i),d+=e.slice(u,p).replace(we,rn),n&&(a=!0,d+="' +\n__e("+n+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=p+t.length,t})),d+="';\n";var m=Ae.call(t,"variable")&&t.variable;if(m){if(ce.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(q,""):d).replace(U,"$1").replace(z,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Xs((function(){return xe(p,h+"return "+d).apply(i,c)}));if(v.source=d,Yo(v))throw v;return v},Bn.times=function(e,t){if((e=ms(e))<1||e>l)return[];var n=f,r=bn(e,f);t=oa(t),e-=f;for(var i=Ht(r,t);++n<e;)t(n);return i},Bn.toFinite=hs,Bn.toInteger=ms,Bn.toLength=vs,Bn.toLower=function(e){return gs(e).toLowerCase()},Bn.toNumber=ys,Bn.toSafeInteger=function(e){return e?or(ms(e),-9007199254740991,l):0===e?e:0},Bn.toString=gs,Bn.toUpper=function(e){return gs(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=gs(e))&&(n||t===i))return Kt(e);if(!e||!(t=si(t)))return e;var r=dn(e),a=dn(t);return gi(r,Zt(r,a),Xt(r,a)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=si(t)))return e;var r=dn(e);return gi(r,0,Xt(r,dn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=gs(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=dn(e);return gi(r,Zt(r,dn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(ts(t)){var a="separator"in t?t.separator:a;n="length"in t?ms(t.length):n,r="omission"in t?si(t.omission):r}var o=(e=gs(e)).length;if(an(e)){var s=dn(e);o=s.length}if(n>=o)return e;var p=n-ln(r);if(p<1)return r;var c=s?gi(s,0,p).join(""):e.slice(0,p);if(a===i)return c+r;if(s&&(p+=c.length-p),os(a)){if(e.slice(p).search(a)){var u,l=c;for(a.global||(a=Ee(a.source,gs(de.exec(a))+"g")),a.lastIndex=0;u=a.exec(l);)var d=u.index;c=c.slice(0,d===i?p:d)}}else if(e.indexOf(si(a),p)!=p){var f=c.lastIndexOf(a);f>-1&&(c=c.slice(0,f))}return c+r},Bn.unescape=function(e){return(e=gs(e))&&H.test(e)?e.replace(W,hn):e},Bn.uniqueId=function(e){var t=++Ie;return gs(e)+t},Bn.upperCase=Js,Bn.upperFirst=Ys,Bn.each=go,Bn.eachRight=wo,Bn.first=Qa,pp(Bn,(bp={},gr(Bn,(function(e,t){Ae.call(Bn.prototype,t)||(bp[t]=e)})),bp),{chain:!1}),Bn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Et(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:yn(ms(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oa(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Et(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ip)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Tr(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Ro(oa(e)))},Un.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(f)},gr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),a=Bn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);a&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,p=t instanceof Un,c=s[0],u=p||Wo(t),l=function(e){var t=a.apply(Bn,Ct([e],s));return r&&d?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(p=u=!1);var d=this.__chain__,f=!!this.__actions__.length,h=o&&!d,m=p&&!f;if(!o&&u){t=m?t:new Un(this);var v=e.apply(t,s);return v.__actions__.push({func:ho,args:[l],thisArg:i}),new qn(v,d)}return h&&m?e.apply(this,s):(v=this.thru(l),h?r?v.value()[0]:v.value():v)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ke[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wo(i)?i:[],e)}return this[n]((function(n){return t.apply(Wo(n)?n:[],e)}))}})),gr(Un.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ae.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[$i(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=ji(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ji(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ji(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wo(e),r=t<0,i=n?e.length:0,a=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=bn(t,e+o);break;case"takeRight":e=yn(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,p=s-o,c=r?s:o-1,u=this.__iteratees__,l=u.length,d=0,f=bn(p,this.__takeCount__);if(!n||!r&&i==p&&f==p)return di(e,this.__actions__);var h=[];e:for(;p--&&d<f;){for(var m=-1,v=e[c+=t];++m<l;){var y=u[m],b=y.iteratee,g=y.type,w=b(v);if(2==g)v=w;else if(!w){if(1==g)continue e;break e}}h[d++]=v}return h},Bn.prototype.at=mo,Bn.prototype.chain=function(){return fo(this)},Bn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Ba(n);r.__index__=0,r.__values__=i,t?a.__wrapped__=r:t=r;var a=r;n=n.__wrapped__}return a.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ho,args:[eo],thisArg:i}),new qn(t,this.__chain__)}return this.thru(eo)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Ge&&(Bn.prototype[Ge]=function(){return this}),Bn}();lt._=mn,(r=function(){return mn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},94349:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){return function(){function e(e,t){if(this.app="loki",this.options=t||{},void 0!==e&&(this.app=e),this.catalog=null,!this.checkAvailability())throw new Error("indexedDB does not seem to be supported for your environment")}function t(e){this.db=null,this.initializeLokiCatalog(e)}return e.prototype.closeDatabase=function(){this.catalog&&this.catalog.db&&(this.catalog.db.close(),this.catalog.db=null)},e.prototype.checkAvailability=function(){return!("undefined"==typeof indexedDB||!indexedDB)},e.prototype.loadDatabase=function(e,n){var r=this.app,i=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,e,(function(e){if("function"==typeof n){if(0===e.id)return void n(null);n(e.val)}else console.log(e.val)})):this.catalog=new t((function(t){i.catalog=t,i.loadDatabase(e,n)}))},e.prototype.loadKey=e.prototype.loadDatabase,e.prototype.saveDatabase=function(e,n,r){var i=this.app,a=this;function o(e){e&&!0===e.success?r(null):r(new Error("Error saving database")),a.options.closeAfterSave&&a.closeDatabase()}null!==this.catalog&&null!==this.catalog.db?this.catalog.setAppKey(i,e,n,o):this.catalog=new t((function(t){a.saveDatabase(e,n,o)}))},e.prototype.saveKey=e.prototype.saveDatabase,e.prototype.deleteDatabase=function(e,n){var r=this.app,i=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,e,(function(e){var t=e.id;0!==t?i.catalog.deleteAppKey(t,n):"function"==typeof n&&n({success:!0})})):this.catalog=new t((function(t){i.catalog=t,i.deleteDatabase(e,n)}))},e.prototype.deleteKey=e.prototype.deleteDatabase,e.prototype.deleteDatabasePartitions=function(e){var t=this;this.getDatabaseList((function(n){n.forEach((function(n){n.startsWith(e)&&t.deleteDatabase(n)}))}))},e.prototype.getDatabaseList=function(e){var n=this.app,r=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKeys(n,(function(t){for(var n=[],r=0;r<t.length;r++)n.push(t[r].key);"function"==typeof e?e(n):n.forEach((function(e){console.log(e)}))})):this.catalog=new t((function(t){r.catalog=t,r.getDatabaseList(e)}))},e.prototype.getKeyList=e.prototype.getDatabaseList,e.prototype.getCatalogSummary=function(e){this.app;var n=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAllKeys((function(t){for(var n,r,i,a,o,s=[],p=0;p<t.length;p++)i=(n=t[p]).app||"",a=n.key||"",o=n.val||"",r=2*i.length+2*a.length+o.length+1,s.push({app:n.app,key:n.key,size:r});"function"==typeof e?e(s):s.forEach((function(e){console.log(e)}))})):this.catalog=new t((function(t){n.catalog=t,n.getCatalogSummary(e)}))},t.prototype.initializeLokiCatalog=function(e){var t=indexedDB.open("LokiCatalog",1),n=this;t.onupgradeneeded=function(e){var t=e.target.result;if(t.objectStoreNames.contains("LokiAKV")&&t.deleteObjectStore("LokiAKV"),!t.objectStoreNames.contains("LokiAKV")){var n=t.createObjectStore("LokiAKV",{keyPath:"id",autoIncrement:!0});n.createIndex("app","app",{unique:!1}),n.createIndex("key","key",{unique:!1}),n.createIndex("appkey","appkey",{unique:!0})}},t.onsuccess=function(t){n.db=t.target.result,"function"==typeof e&&e(n)},t.onerror=function(e){throw e}},t.prototype.getAppKey=function(e,t,n){var r,i=e+","+t,a=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("appkey").get(i);a.onsuccess=(r=n,function(e){var t=e.target.result;null==t&&(t={id:0,success:!1}),"function"==typeof r?r(t):console.log(t)}),a.onerror=function(e){return function(t){if("function"!=typeof e)throw t;e({id:0,success:!1})}}(n)},t.prototype.getAppKeyById=function(e,t,n){this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").get(e).onsuccess=function(e,t){return function(n){"function"==typeof t?t(n.target.result,e):console.log(n.target.result)}}(n,t)},t.prototype.setAppKey=function(e,t,n,r){var i,a=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV"),o=a.index("appkey"),s=e+","+t,p=o.get(s);p.onsuccess=function(i){var o=i.target.result;null==o?o={app:e,key:t,appkey:e+","+t,val:n}:o.val=n;var s,c=a.put(o);c.onerror=(s=r,function(e){"function"==typeof s?s({success:!1}):(console.error("LokiCatalog.setAppKey (set) onerror"),console.error(p.error))}),c.onsuccess=function(e){return function(t){"function"==typeof e&&e({success:!0})}}(r)},p.onerror=(i=r,function(e){"function"==typeof i?i({success:!1}):(console.error("LokiCatalog.setAppKey (get) onerror"),console.error(p.error))})},t.prototype.deleteAppKey=function(e,t){var n,r=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV").delete(e);r.onsuccess=(n=t,function(e){"function"==typeof n&&n({success:!0})}),r.onerror=function(e){return function(t){"function"==typeof e?e({success:!1}):(console.error("LokiCatalog.deleteAppKey raised onerror"),console.error(r.error))}}(t)},t.prototype.getAppKeys=function(e,t){var n,r=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("app"),i=IDBKeyRange.only(e),a=r.openCursor(i);a.onsuccess=function(e,t){return function(n){var r=n.target.result;if(r){var i=r.value;e.push(i),r.continue()}else"function"==typeof t?t(e):console.log(e)}}([],t),a.onerror=(n=t,function(e){"function"==typeof n?n(null):(console.error("LokiCatalog.getAppKeys raised onerror"),console.error(e))})},t.prototype.getAllKeys=function(e){var t,n=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").openCursor();n.onsuccess=function(e,t){return function(n){var r=n.target.result;if(r){var i=r.value;e.push(i),r.continue()}else"function"==typeof t?t(e):console.log(e)}}([],e),n.onerror=(t=e,function(e){"function"==typeof t&&t(null)})},e}()})?n.apply(t,[]):n)||(e.exports=r)},57979:function(e,t,n){var r,i;r=function(){return function(){"use strict";var e=Object.prototype.hasOwnProperty;function t(e){var n,i;if(Array.isArray(e)){for(i=0;i<e.length;i++)t(e[i]);r(e)}else if(null!==e&&"object"==typeof e){for(n in e)e.hasOwnProperty(n)&&t(e[n]);r(e)}}function r(e){Object.isFrozen(e)||Object.freeze(e)}function i(e){return Object.isFrozen(e)?v(e,"shallow"):e}var a={copyProperties:function(e,t){var n;for(n in e)t[n]=e[n]},resolveTransformObject:function(e,t,n){var r,i;if("number"!=typeof n&&(n=0),++n>=10)return e;for(r in e)"string"==typeof e[r]&&0===e[r].indexOf("[%lktxp]")?(i=e[r].substring(8),t.hasOwnProperty(i)&&(e[r]=t[i])):"object"==typeof e[r]&&(e[r]=a.resolveTransformObject(e[r],t,n));return e},resolveTransformParams:function(e,t){var n,r,i=[];if(void 0===t)return e;for(n=0;n<e.length;n++)r=v(e[n],"shallow-recurse-objects"),i.push(a.resolveTransformObject(r,t));return i},getIn:function(e,t,n){if(null!=e){if(!n)return e[t];if("string"==typeof t&&(t=t.split(".")),!Array.isArray(t))throw new Error("path must be a string or array. Found "+typeof t);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:void 0}}},o={aeq:s,lt:p,gt:c};function s(e,t){var n,r,i,a;if(e===t)return!0;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:i=1;break;case!1:i=3;break;case!0:i=4;break;case"":i=5;break;default:i=e==e?9:0}switch(t){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=t==t?9:0}if(9!==i||9!==a)return i===a}return n=Number(e),r=Number(t),n==n||r==r?n===r:(n=e.toString())==(r=t.toString())}function p(e,t,n){var r,i,a,o;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t==t?9:0}if(9!==a||9!==o)return a===o?n:a<o}return r=Number(e),i=Number(t),r==r&&i==i?r<i||!(r>i)&&n:r==r&&i!=i||(i!=i||r==r)&&(e<t||!(e>t)&&(e==t?n:(r=e.toString())<(i=t.toString())||r==i&&n))}function c(e,t,n){var r,i,a,o;if(!e||!t||!0===e||!0===t||e!=e||t!=t){switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t==t?9:0}if(9!==a||9!==o)return a===o?n:a>o}return r=Number(e),i=Number(t),r==r&&i==i?r>i||!(r<i)&&n:(r!=r||i==i)&&(i==i&&r!=r||e>t||!(e<t)&&(e==t?n:(r=e.toString())>(i=t.toString())||r==i&&n))}function u(e,t,n){return o.aeq(e,t)?0:o.lt(e,t,!1)?n?1:-1:o.gt(e,t,!1)?n?-1:1:0}function l(e,t,n,r,i,a){var o,s=a||0,p=t[s],c=!1;if("object"==typeof e&&p in e&&(o=e[p]),s+1>=t.length)c=n(o,r,i);else if(Array.isArray(o))for(var u=0,d=o.length;u<d&&!0!==(c=l(o[u],t,n,r,i,s+1));u+=1);else c=l(o,t,n,r,i,s+1);return c}function d(t){return"string"==typeof t||Array.isArray(t)?function(e){return-1!==t.indexOf(e)}:"object"==typeof t&&null!==t?function(n){return e.call(t,n)}:null}function f(t,n,r){for(var i in n)if(e.call(n,i))return h[i](t,n[i],r);return!1}var h={$eq:function(e,t){return e===t},$aeq:function(e,t){return e==t},$ne:function(e,t){return t!=t?e==e:e!==t},$dteq:function(e,t){return o.aeq(e,t)},$gt:function(e,t){return o.gt(e,t,!1)},$gte:function(e,t){return o.gt(e,t,!0)},$lt:function(e,t){return o.lt(e,t,!1)},$lte:function(e,t){return o.lt(e,t,!0)},$jgt:function(e,t){return e>t},$jgte:function(e,t){return e>=t},$jlt:function(e,t){return e<t},$jlte:function(e,t){return e<=t},$between:function(e,t){return null!=e&&o.gt(e,t[0],!0)&&o.lt(e,t[1],!0)},$jbetween:function(e,t){return null!=e&&e>=t[0]&&e<=t[1]},$in:function(e,t){return-1!==t.indexOf(e)},$inSet:function(e,t){return t.has(e)},$nin:function(e,t){return-1===t.indexOf(e)},$keyin:function(e,t){return e in t},$nkeyin:function(e,t){return!(e in t)},$definedin:function(e,t){return void 0!==t[e]},$undefinedin:function(e,t){return void 0===t[e]},$regex:function(e,t){return t.test(e)},$containsString:function(e,t){return"string"==typeof e&&-1!==e.indexOf(t)},$containsNone:function(e,t){return!h.$containsAny(e,t)},$containsAny:function(e,t){var n=d(e);return null!==n&&(Array.isArray(t)?t.some(n):n(t))},$contains:function(e,t){var n=d(e);return null!==n&&(Array.isArray(t)?t.every(n):n(t))},$elemMatch:function(e,t){return!!Array.isArray(e)&&e.some((function(e){return Object.keys(t).every((function(n){var r=t[n];return"object"==typeof r&&r||(r={$eq:r}),-1!==n.indexOf(".")?l(e,n.split("."),f,t[n],e):f(e[n],r,e)}))}))},$type:function(e,t,n){var r=typeof e;return"object"===r&&(Array.isArray(e)?r="array":e instanceof Date&&(r="date")),"object"!=typeof t?r===t:f(r,t,n)},$finite:function(e,t){return t===isFinite(e)},$size:function(e,t,n){return!!Array.isArray(e)&&("object"!=typeof t?e.length===t:f(e.length,t,n))},$len:function(e,t,n){return"string"==typeof e&&("object"!=typeof t?e.length===t:f(e.length,t,n))},$where:function(e,t){return!0===t(e)},$not:function(e,t,n){return!f(e,t,n)},$and:function(e,t,n){for(var r=0,i=t.length;r<i;r+=1)if(!f(e,t[r],n))return!1;return!0},$or:function(e,t,n){for(var r=0,i=t.length;r<i;r+=1)if(f(e,t[r],n))return!0;return!1},$exists:function(e,t){return t?void 0!==e:void 0===e}};["$eq","$aeq","$ne","$dteq","$gt","$gte","$lt","$lte","$jgt","$jgte","$jlt","$jlte","$type"].forEach((function(e){var t=h[e];h["$"+e]=function(e,n,r){if("string"==typeof n)return t(e,r[n]);if("function"==typeof n)return t(e,n(r));throw new Error("Invalid argument to $$ matcher")}}));var m={$eq:h.$eq,$aeq:!0,$dteq:!0,$gt:!0,$gte:!0,$lt:!0,$lte:!0,$in:!0,$between:!0};function v(e,t){if(null==e)return null;var n;switch(t||"parse-stringify"){case"parse-stringify":n=JSON.parse(JSON.stringify(e));break;case"jquery-extend-deep":n=jQuery.extend(!0,{},e);break;case"shallow":n=Object.create(e.constructor.prototype),Object.keys(e).map((function(t){n[t]=e[t]}));break;case"shallow-assign":n=Object.create(e.constructor.prototype),Object.assign(n,e);break;case"shallow-recurse-objects":n=v(e,"shallow"),Object.keys(e).forEach((function(t){"object"==typeof e[t]&&"Object"===e[t].constructor.name?n[t]=v(e[t],"shallow-recurse-objects"):Array.isArray(e[t])&&(n[t]=function(e,t){if("parse-stringify"==t)return v(e,t);for(var n=[],r=0,i=e.length;r<i;r++)n[r]=v(e[r],t);return n}(e[t],"shallow-recurse-objects"))}))}return n}function y(){try{return window&&void 0!==window.localStorage&&null!==window.localStorage}catch(e){return!1}}function b(){}function g(e,t){this.filename=e||"loki.db",this.collections=[],this.databaseVersion=1.5,this.engineVersion=1.5,this.autosave=!1,this.autosaveInterval=5e3,this.autosaveHandle=null,this.throttledSaves=!0,this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,this.throttledSavePending=!1,this.throttledCallbacks=[],this.verbose=!(!t||!t.hasOwnProperty("verbose"))&&t.verbose,this.events={init:[],loaded:[],flushChanges:[],close:[],changes:[],warning:[]};t&&t.hasOwnProperty("env")?this.ENV=t.env:this.ENV="undefined"!=typeof global&&(global.android||global.NSObject)?"NATIVESCRIPT":"undefined"==typeof window||"undefined"!=typeof global&&global.window&&"undefined"!=typeof process?"NODEJS":"undefined"!=typeof document?-1===document.URL.indexOf("http://")&&-1===document.URL.indexOf("https://")?"CORDOVA":"BROWSER":"CORDOVA","undefined"===this.ENV&&(this.ENV="NODEJS"),this.configureOptions(t,!0),this.on("init",this.clearChanges)}function w(e){this.hashStore={},this.options=e||{},this.options.hasOwnProperty("asyncResponses")||(this.options.asyncResponses=!1),this.options.hasOwnProperty("asyncTimeout")||(this.options.asyncTimeout=50)}function _(e,t){if(this.mode="reference",this.adapter=null,this.options=t||{},this.dbref=null,this.dbname="",this.pageIterator={},!e)throw new Error("LokiPartitioningAdapter requires a (non-reference mode) adapter on construction");if("reference"===e.mode)throw new Error("LokiPartitioningAdapter cannot be instantiated with a reference mode adapter");this.adapter=e,this.options.hasOwnProperty("paging")||(this.options.paging=!1),this.options.hasOwnProperty("pageSize")||(this.options.pageSize=26214400),this.options.hasOwnProperty("delimiter")||(this.options.delimiter="$<\n")}function x(){try{this.fs=n(57147)}catch(e){this.fs=null}}function D(){}function O(e,t){return t=t||{},this.collection=e,this.filteredrows=[],this.filterInitialized=!1,this}function E(e,t){if("$regex"===e)Array.isArray(t)?t=new RegExp(t[0],t[1]):t instanceof RegExp||(t=new RegExp(t));else if("object"==typeof t)for(var n in t)"$regex"!==n&&"object"!=typeof t[n]||(t[n]=E(n,t[n]));return t}function S(e,t,n){this.collection=e,this.name=t,this.rebuildPending=!1,this.options=n||{},this.options.hasOwnProperty("persistent")||(this.options.persistent=!1),this.options.hasOwnProperty("sortPriority")||(this.options.sortPriority="passive"),this.options.hasOwnProperty("minRebuildInterval")||(this.options.minRebuildInterval=1),this.resultset=new O(e),this.resultdata=[],this.resultsdirty=!1,this.cachedresultset=null,this.filterPipeline=[],this.collection.disableFreeze||Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,this.events={rebuild:[],filter:[],sort:[]}}function j(t,n){this.name=t,this.data=[],this.idIndex=null,this.binaryIndices={},this.constraints={unique:{},exact:{}},this.uniqueNames=[],this.transforms={},this.objType=t,this.dirty=!0,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null;var r=this;(n=n||{}).hasOwnProperty("unique")&&(Array.isArray(n.unique)||(n.unique=[n.unique]),n.unique.forEach((function(e){r.uniqueNames.push(e)}))),n.hasOwnProperty("exact")&&n.exact.forEach((function(e){r.constraints.exact[e]=new $(e)})),this.adaptiveBinaryIndices=!n.hasOwnProperty("adaptiveBinaryIndices")||n.adaptiveBinaryIndices,this.transactional=!!n.hasOwnProperty("transactional")&&n.transactional,this.cloneObjects=!!n.hasOwnProperty("clone")&&n.clone,this.cloneMethod=n.hasOwnProperty("cloneMethod")?n.cloneMethod:"parse-stringify",this.asyncListeners=!!n.hasOwnProperty("asyncListeners")&&n.asyncListeners,this.disableMeta=!!n.hasOwnProperty("disableMeta")&&n.disableMeta,this.disableChangesApi=!n.hasOwnProperty("disableChangesApi")||n.disableChangesApi,this.disableDeltaChangesApi=!n.hasOwnProperty("disableDeltaChangesApi")||n.disableDeltaChangesApi,this.disableChangesApi&&(this.disableDeltaChangesApi=!0),this.autoupdate=!!n.hasOwnProperty("autoupdate")&&n.autoupdate,this.serializableIndices=!n.hasOwnProperty("serializableIndices")||n.serializableIndices,this.disableFreeze=!n.hasOwnProperty("disableFreeze")||n.disableFreeze,this.ttl={age:null,ttlInterval:null,daemon:null},this.setTTL(n.ttl||-1,n.ttlInterval),this.maxId=0,this.DynamicViews=[],this.events={insert:[],update:[],"pre-insert":[],"pre-update":[],close:[],flushbuffer:[],error:[],delete:[],warning:[]},this.changes=[],this.dirtyIds=[];var i=[];if(n&&n.indices)if("[object Array]"===Object.prototype.toString.call(n.indices))i=n.indices;else{if("string"!=typeof n.indices)throw new TypeError("Indices needs to be a string or an array of strings");i=[n.indices]}for(var a=0;a<i.length;a++)this.ensureIndex(i[a]);function o(e,t){var n=null!==t&&"object"==typeof t?Object.keys(t):null;if(n&&n.length&&["string","boolean","number"].indexOf(typeof t)<0){for(var i={},a=0;a<n.length;a++){var s=n[a];if(t.hasOwnProperty(s))if(!e.hasOwnProperty(s)||r.uniqueNames.indexOf(s)>=0||"$loki"==s||"meta"==s)i[s]=t[s];else{var p=o(e[s],t[s]);void 0!==p&&p!={}&&(i[s]=p)}}return 0===Object.keys(i).length?void 0:i}return e===t?void 0:t}function s(){r.changes=[]}this.observerCallback=function(t){var n="function"==typeof Set?new Set:[];n.add||(n.add=function(e){return-1===this.indexOf(e)&&this.push(e),this}),t.forEach((function(e){n.add(e.object)})),n.forEach((function(t){if(!e.call(t,"$loki"))return r.removeAutoUpdateObserver(t);try{r.update(t)}catch(e){}}))},this.getChangeDelta=function(e,t){return t?o(t,e):JSON.parse(JSON.stringify(e))},this.getObjectDelta=o,this.getChanges=function(){return r.changes},this.flushChanges=s,this.setChangesApi=function(e){r.disableChangesApi=!e,e||(r.disableDeltaChangesApi=!1)},this.on("delete",(function(e){r.disableChangesApi||r.createChange(r.name,"R",e)})),this.on("warning",(function(e){r.lokiConsoleWrapper.warn(e)})),s()}function k(e){return-1!==e.indexOf(".")}function T(e){return parseFloat(e,10)}function N(e,t){return e+t}function P(e,t){return e-t}function C(e){return e.reduce(N,0)/e.length}function A(e,t,n){if(!1===n)return e[t];for(var r=t.split("."),i=e;r.length>0;)i=i[r.shift()];return i}function I(e,t,n){for(var r,i,a=0,o=e.length;a<o;){if(i=a+o>>1,0===(r=n.apply(null,[t,e[i]])))return{found:!0,index:i};r<0?o=i:a=i+1}return{found:!1,index:o}}function F(e){return function(t,n){return I(t,n,e)}}function R(){}function M(e){this.field=e,this.keyMap=Object.create(null),this.lokiMap=Object.create(null)}function $(e){this.index=Object.create(null),this.field=e}return b.prototype.events={},b.prototype.asyncListeners=!1,b.prototype.on=function(e,t){var n,r=this;return Array.isArray(e)?(e.forEach((function(e){r.on(e,t)})),t):((n=this.events[e])||(n=this.events[e]=[]),n.push(t),t)},b.prototype.emit=function(e){var t,n=this;if(!e||!this.events[e])throw new Error("No event "+e+" defined");this.events[e].length&&(t=Array.prototype.slice.call(arguments,1),this.events[e].forEach((function(e){n.asyncListeners?setTimeout((function(){e.apply(n,t)}),1):e.apply(n,t)})))},b.prototype.addListener=b.prototype.on,b.prototype.removeListener=function(e,t){var n=this;if(Array.isArray(e))e.forEach((function(e){n.removeListener(e,t)}));else if(this.events[e]){var r=this.events[e];r.splice(r.indexOf(t),1)}},g.prototype=new b,g.prototype.constructor=g,g.prototype.getIndexedAdapter=function(){return n(94349)},g.prototype.configureOptions=function(e,t){var n={fs:x,localStorage:D,memory:w};if(this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,void 0!==e){if(this.options=e,this.options.hasOwnProperty("persistenceMethod")&&"function"==typeof n[e.persistenceMethod]&&(this.persistenceMethod=e.persistenceMethod,this.persistenceAdapter=new n[e.persistenceMethod]),this.options.hasOwnProperty("adapter")&&(this.persistenceMethod="adapter",this.persistenceAdapter=e.adapter,this.options.adapter=null,this.isIncremental="incremental"===this.persistenceAdapter.mode),e.autoload&&t){var r=this;setTimeout((function(){r.loadDatabase(e,e.autoloadCallback)}),1)}this.options.hasOwnProperty("autosaveInterval")&&(this.autosaveDisable(),this.autosaveInterval=parseInt(this.options.autosaveInterval,10)),this.options.hasOwnProperty("autosave")&&this.options.autosave&&(this.autosaveDisable(),this.autosave=!0,this.options.hasOwnProperty("autosaveCallback")?this.autosaveEnable(e,e.autosaveCallback):this.autosaveEnable()),this.options.hasOwnProperty("throttledSaves")&&(this.throttledSaves=this.options.throttledSaves)}this.options.hasOwnProperty("serializationMethod")||(this.options.serializationMethod="normal"),this.options.hasOwnProperty("destructureDelimiter")||(this.options.destructureDelimiter="$<\n"),null===this.persistenceAdapter&&(this.persistenceMethod={NODEJS:"fs",BROWSER:"localStorage",CORDOVA:"localStorage",MEMORY:"memory"}[this.ENV],this.persistenceMethod&&(this.persistenceAdapter=new n[this.persistenceMethod]))},g.prototype.copy=function(e){var t,n,r=new g(this.filename,{env:"NA"});if(e=e||{},r.loadJSONObject(this,{retainDirtyFlags:!0}),e.hasOwnProperty("removeNonSerializable")&&!0===e.removeNonSerializable)for(r.autosaveHandle=null,r.persistenceAdapter=null,t=r.collections.length,n=0;n<t;n++)r.collections[n].constraints=null,r.collections[n].ttl=null;return r},g.prototype.addCollection=function(e,t){var n,r=this.collections.length;if(t&&!0===t.disableMeta){if(!1===t.disableChangesApi)throw new Error("disableMeta option cannot be passed as true when disableChangesApi is passed as false");if(!1===t.disableDeltaChangesApi)throw new Error("disableMeta option cannot be passed as true when disableDeltaChangesApi is passed as false");if("number"==typeof t.ttl&&t.ttl>0)throw new Error("disableMeta option cannot be passed as true when ttl is enabled")}for(n=0;n<r;n+=1)if(this.collections[n].name===e)return this.collections[n];var i=new j(e,t);return i.isIncremental=this.isIncremental,this.collections.push(i),this.verbose&&(i.lokiConsoleWrapper=console),i},g.prototype.loadCollection=function(e){if(!e.name)throw new Error("Collection must have a name property to be loaded");this.collections.push(e)},g.prototype.getCollection=function(e){var t,n=this.collections.length;for(t=0;t<n;t+=1)if(this.collections[t].name===e)return this.collections[t];return this.emit("warning","collection "+e+" not found"),null},g.prototype.renameCollection=function(e,t){var n=this.getCollection(e);return n&&(n.name=t),n},g.prototype.listCollections=function(){for(var e=this.collections.length,t=[];e--;)t.push({name:this.collections[e].name,type:this.collections[e].objType,count:this.collections[e].data.length});return t},g.prototype.removeCollection=function(e){var t,n=this.collections.length;for(t=0;t<n;t+=1)if(this.collections[t].name===e){var r=new j(e,{}),i=this.collections[t];for(var a in i)i.hasOwnProperty(a)&&r.hasOwnProperty(a)&&(i[a]=r[a]);return void this.collections.splice(t,1)}},g.prototype.getName=function(){return this.name},g.prototype.serializeReplacer=function(e,t){switch(e){case"autosaveHandle":case"persistenceAdapter":case"constraints":case"ttl":case"lokiConsoleWrapper":return null;case"throttledSavePending":case"throttledCallbacks":return;default:return t}},g.prototype.serialize=function(e){switch((e=e||{}).hasOwnProperty("serializationMethod")||(e.serializationMethod=this.options.serializationMethod),e.serializationMethod){case"normal":default:return JSON.stringify(this,this.serializeReplacer);case"pretty":return JSON.stringify(this,this.serializeReplacer,2);case"destructured":return this.serializeDestructured()}},g.prototype.toJson=g.prototype.serialize,g.prototype.serializeDestructured=function(e){var t,n,r,i,a,o=[];if((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),!0===e.partitioned&&e.hasOwnProperty("partition")&&e.partition>=0)return this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:e.partition});for((a=new g(this.filename)).loadJSONObject(this),t=0;t<a.collections.length;t++)a.collections[t].data=[];if(!0===e.partitioned&&-1===e.partition)return a.serialize({serializationMethod:"normal"});for(o.push(a.serialize({serializationMethod:"normal"})),a=null,t=0;t<this.collections.length;t++)if(r=this.serializeCollection({delimited:e.delimited,delimiter:e.delimiter,collectionIndex:t}),!1===e.partitioned&&!1===e.delimited){if(!Array.isArray(r))throw new Error("a nondelimited, non partitioned collection serialization did not return an expected array");for(i=r.length,n=0;n<i;n++)o.push(r[n]),r[n]=null;o.push("")}else o.push(r);return e.partitioned?(e.delimited,o):e.delimited?(o.push(""),o.join(e.delimiter)):(o.push(""),o)},g.prototype.serializeCollection=function(e){var t,n,r=[];if((e=e||{}).hasOwnProperty("delimited")||(e.delimited=!0),!e.hasOwnProperty("collectionIndex"))throw new Error("serializeCollection called without 'collectionIndex' option");for(t=this.collections[e.collectionIndex].data.length,r=[],n=0;n<t;n++)r.push(JSON.stringify(this.collections[e.collectionIndex].data[n]));return e.delimited?(r.push(""),r.join(e.delimiter)):r},g.prototype.deserializeDestructured=function(e,t){var n,r,i,a=[],o=0,s=1,p=!1;if((t=t||{}).hasOwnProperty("partitioned")||(t.partitioned=!1),t.hasOwnProperty("delimited")||(t.delimited=!0),t.hasOwnProperty("delimiter")||(t.delimiter=this.options.destructureDelimiter),t.partitioned){if(t.hasOwnProperty("partition"))return-1===t.partition?n=JSON.parse(e[0]):this.deserializeCollection(e[t.partition+1],t);for(r=(n=JSON.parse(e[0])).collections.length,o=0;o<r;o++)n.collections[o].data=this.deserializeCollection(e[o+1],t);return n}if(t.delimited){if(a=e.split(t.delimiter),e=null,0===a.length)return null}else a=e;for(r=(n=JSON.parse(a[0])).collections.length,a[0]=null;!p;)a[s],""===a[s]?++o>r&&(p=!0):(i=JSON.parse(a[s]),n.collections[o].data.push(i)),a[s++]=null;return n},g.prototype.deserializeCollection=function(e,t){var n,r,i=[];for((t=t||{}).hasOwnProperty("partitioned")||(t.partitioned=!1),t.hasOwnProperty("delimited")||(t.delimited=!0),t.hasOwnProperty("delimiter")||(t.delimiter=this.options.destructureDelimiter),t.delimited?(i=e.split(t.delimiter)).pop():i=e,r=i.length,n=0;n<r;n++)i[n]=JSON.parse(i[n]);return i},g.prototype.loadJSON=function(e,t){var n;if(0===e.length)n={};else switch(this.options.serializationMethod){case"normal":case"pretty":default:n=JSON.parse(e);break;case"destructured":n=this.deserializeDestructured(e)}this.loadJSONObject(n,t)},g.prototype.loadJSONObject=function(e,n){var r,i,o,s,p,c,u=0,l=e.collections?e.collections.length:0;function d(e){var t,r=n[e.name];return r.proto?(t=r.inflate||a.copyProperties,function(e){var n=new r.proto;return t(e,n),n}):r.inflate}for(this.name=e.name,e.hasOwnProperty("throttledSaves")&&n&&!n.hasOwnProperty("throttledSaves")&&(this.throttledSaves=e.throttledSaves),this.collections=[];u<l;u+=1){if(r=e.collections[u],(i=this.addCollection(r.name,{disableChangesApi:r.disableChangesApi,disableDeltaChangesApi:r.disableDeltaChangesApi,disableMeta:r.disableMeta,disableFreeze:!r.hasOwnProperty("disableFreeze")||r.disableFreeze})).adaptiveBinaryIndices=!!r.hasOwnProperty("adaptiveBinaryIndices")&&!0===r.adaptiveBinaryIndices,i.transactional=r.transactional,i.asyncListeners=r.asyncListeners,i.cloneObjects=r.cloneObjects,i.cloneMethod=r.cloneMethod||"parse-stringify",i.autoupdate=r.autoupdate,i.changes=r.changes,i.dirtyIds=r.dirtyIds||[],n&&!0===n.retainDirtyFlags?i.dirty=r.dirty:i.dirty=!1,o=r.data.length,s=0,n&&n.hasOwnProperty(r.name))for(p=d(r);s<o;s++)c=p(r.data[s]),i.data[s]=c,i.addAutoUpdateObserver(c),i.disableFreeze||t(i.data[s]);else for(;s<o;s++)i.data[s]=r.data[s],i.addAutoUpdateObserver(i.data[s]),i.disableFreeze||t(i.data[s]);if(i.maxId=void 0===r.maxId?0:r.maxId,void 0!==r.binaryIndices&&(i.binaryIndices=r.binaryIndices),void 0!==r.transforms&&(i.transforms=r.transforms),i.uniqueNames=[],r.hasOwnProperty("uniqueNames")&&(i.uniqueNames=r.uniqueNames),void 0!==r.DynamicViews){for(var f=0;f<r.DynamicViews.length;f++){var h=r.DynamicViews[f],m=i.addDynamicView(h.name,h.options);m.resultdata=h.resultdata,m.resultsdirty=h.resultsdirty,m.filterPipeline=h.filterPipeline,m.sortCriteriaSimple=h.sortCriteriaSimple,m.sortCriteria=h.sortCriteria,m.sortFunction=null,m.sortDirty=h.sortDirty,i.disableFreeze||(t(m.filterPipeline),m.sortCriteriaSimple?t(m.sortCriteriaSimple):m.sortCriteria&&t(m.sortCriteria)),m.resultset.filteredrows=h.resultset.filteredrows,m.resultset.filterInitialized=h.resultset.filterInitialized,m.rematerialize({removeWhereFilters:!0})}e.databaseVersion<1.5&&(i.ensureAllIndexes(!0),i.dirty=!0)}}},g.prototype.close=function(e){this.autosave&&(this.autosaveDisable(),this.autosaveDirty()&&(this.saveDatabase(e),e=void 0)),e&&this.on("close",e),this.emit("close")},g.prototype.generateChangesNotification=function(e){function t(e){return e.name}var n=[],r=e||this.collections.map(t);return this.collections.forEach((function(e){-1!==r.indexOf(t(e))&&(n=n.concat(e.getChanges()))})),n},g.prototype.serializeChanges=function(e){return JSON.stringify(this.generateChangesNotification(e))},g.prototype.clearChanges=function(){this.collections.forEach((function(e){e.flushChanges&&e.flushChanges()}))},w.prototype.loadDatabase=function(e,t){var n=this;this.options.asyncResponses?setTimeout((function(){n.hashStore.hasOwnProperty(e)?t(n.hashStore[e].value):t(null)}),this.options.asyncTimeout):this.hashStore.hasOwnProperty(e)?t(this.hashStore[e].value):t(null)},w.prototype.saveDatabase=function(e,t,n){var r,i=this;this.options.asyncResponses?setTimeout((function(){r=i.hashStore.hasOwnProperty(e)?i.hashStore[e].savecount:0,i.hashStore[e]={savecount:r+1,lastsave:new Date,value:t},n()}),this.options.asyncTimeout):(r=this.hashStore.hasOwnProperty(e)?this.hashStore[e].savecount:0,this.hashStore[e]={savecount:r+1,lastsave:new Date,value:t},n())},w.prototype.deleteDatabase=function(e,t){this.hashStore.hasOwnProperty(e)&&delete this.hashStore[e],"function"==typeof t&&t()},_.prototype.loadDatabase=function(e,t){var n=this;this.dbname=e,this.dbref=new g(e),this.adapter.loadDatabase(e,(function(e){if(e){"string"!=typeof e&&t(new Error("LokiPartitioningAdapter received an unexpected response from inner adapter loadDatabase()"));var r=JSON.parse(e);n.dbref.loadJSONObject(r),r=null,n.dbref.collections.length,0!==n.dbref.collections.length?(n.pageIterator={collection:0,pageIndex:0},n.loadNextPartition(0,(function(){t(n.dbref)}))):t(n.dbref)}else t(e)}))},_.prototype.loadNextPartition=function(e,t){var n=this.dbname+"."+e,r=this;if(!0===this.options.paging)return this.pageIterator.pageIndex=0,void this.loadNextPage(t);this.adapter.loadDatabase(n,(function(n){var i=r.dbref.deserializeCollection(n,{delimited:!0,collectionIndex:e});r.dbref.collections[e].data=i,++e<r.dbref.collections.length?r.loadNextPartition(e,t):t()}))},_.prototype.loadNextPage=function(e){var t=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,n=this;this.adapter.loadDatabase(t,(function(t){var r=t.split(n.options.delimiter);t="";var i,a=r.length,o=""===r[a-1];for(o&&(r.pop(),""===r[(a=r.length)-1]&&1===a&&(r.pop(),a=r.length)),i=0;i<a;i++)n.dbref.collections[n.pageIterator.collection].data.push(JSON.parse(r[i])),r[i]=null;r=[],o?++n.pageIterator.collection<n.dbref.collections.length?n.loadNextPartition(n.pageIterator.collection,e):e():(n.pageIterator.pageIndex++,n.loadNextPage(e))}))},_.prototype.exportDatabase=function(e,t,n){var r,i=t.collections.length;for(this.dbref=t,this.dbname=e,this.dirtyPartitions=[-1],r=0;r<i;r++)t.collections[r].dirty&&this.dirtyPartitions.push(r);this.saveNextPartition((function(e){n(e)}))},_.prototype.saveNextPartition=function(e){var t=this,n=this.dirtyPartitions.shift(),r=this.dbname+(-1===n?"":"."+n);if(this.options.paging&&-1!==n)return this.pageIterator={collection:n,docIndex:0,pageIndex:0},void this.saveNextPage((function(n){0===t.dirtyPartitions.length?e(n):t.saveNextPartition(e)}));var i=this.dbref.serializeDestructured({partitioned:!0,delimited:!0,partition:n});this.adapter.saveDatabase(r,i,(function(n){n?e(n):0===t.dirtyPartitions.length?e(null):t.saveNextPartition(e)}))},_.prototype.saveNextPage=function(e){var t=this,n=this.dbref.collections[this.pageIterator.collection],r=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,i=0,a=n.data.length,o=this.options.delimiter.length,s="",p="",c=!1,u=!1,l=function(n){p="",n&&e(n),c?e(null):(t.pageIterator.pageIndex++,t.saveNextPage(e))};for(0===n.data.length&&(c=!0);;)if(c||(s=JSON.stringify(n.data[this.pageIterator.docIndex]),p+=s,i+=s.length,++this.pageIterator.docIndex>=a&&(c=!0)),i>=this.options.pageSize&&(u=!0),u&&!c||(p+=this.options.delimiter,i+=o),c||u)return void this.adapter.saveDatabase(r,p,l)},x.prototype.loadDatabase=function(e,t){var n=this;this.fs.stat(e,(function(r,i){!r&&i.isFile()?n.fs.readFile(e,{encoding:"utf8"},(function(e,n){t(e?new Error(e):n)})):t(null)}))},x.prototype.saveDatabase=function(e,t,n){var r=this,i=e+"~";this.fs.writeFile(i,t,(function(t){t?n(new Error(t)):r.fs.rename(i,e,n)}))},x.prototype.deleteDatabase=function(e,t){this.fs.unlink(e,(function(e){e?t(new Error(e)):t()}))},D.prototype.loadDatabase=function(e,t){y()?t(localStorage.getItem(e)):t(new Error("localStorage is not available"))},D.prototype.saveDatabase=function(e,t,n){y()?(localStorage.setItem(e,t),n(null)):n(new Error("localStorage is not available"))},D.prototype.deleteDatabase=function(e,t){y()?(localStorage.removeItem(e),t(null)):t(new Error("localStorage is not available"))},g.prototype.throttledSaveDrain=function(e,t){var n=this,r=(new Date).getTime();if(this.throttledSaves||e(!0),(t=t||{}).hasOwnProperty("recursiveWait")||(t.recursiveWait=!0),t.hasOwnProperty("recursiveWaitLimit")||(t.recursiveWaitLimit=!1),t.hasOwnProperty("recursiveWaitLimitDuration")||(t.recursiveWaitLimitDuration=2e3),t.hasOwnProperty("started")||(t.started=(new Date).getTime()),this.throttledSaves&&this.throttledSavePending){if(!t.recursiveWait)return void this.throttledCallbacks.push(e);this.throttledCallbacks.push((function(){return n.throttledSavePending?t.recursiveWaitLimit&&r-t.started>t.recursiveWaitLimitDuration?void e(!1):void n.throttledSaveDrain(e,t):void e(!0)}))}else e(!0)},g.prototype.loadDatabaseInternal=function(e,t){var n=t||function(e,t){if(e)throw e},r=this;null!==this.persistenceAdapter?this.persistenceAdapter.loadDatabase(this.filename,(function(t){if("string"==typeof t){var i=!1;try{r.loadJSON(t,e||{}),i=!0}catch(e){n(e)}i&&(n(null),r.emit("loaded","database "+r.filename+" loaded"))}else{if(!t)return n(null),void r.emit("loaded","empty database "+r.filename+" loaded");if(t instanceof Error)return void n(t);if("object"==typeof t)return r.loadJSONObject(t,e||{}),n(null),void r.emit("loaded","database "+r.filename+" loaded");n("unexpected adapter response : "+t)}})):n(new Error("persistenceAdapter not configured"))},g.prototype.loadDatabase=function(e,t){var n=this;this.throttledSaves?this.throttledSaveDrain((function(r){if(r)return n.throttledSavePending=!0,void n.loadDatabaseInternal(e,(function(e){0===n.throttledCallbacks.length?n.throttledSavePending=!1:n.saveDatabase(),"function"==typeof t&&t(e)}));"function"==typeof t&&t(new Error("Unable to pause save throttling long enough to read database"))}),e):this.loadDatabaseInternal(e,t)},g.prototype.saveDatabaseInternal=function(e){var t,n=e||function(e){if(e)throw e},r=this;this.persistenceAdapter?"incremental"===this.persistenceAdapter.mode?(this.ignoreAutosave=!0,this.persistenceAdapter.saveDatabase(this.filename,(function(){if(r.ignoreAutosave=!1,!t){var e=r.copy({removeNonSerializable:!0});return t=r.collections.map((function(e){return[e.dirty,e.dirtyIds]})),r.collections.forEach((function(e){e.dirty=!1,e.dirtyIds=[]})),e}n(new Error("adapter error - getLokiCopy called more than once"))}),(function(e){r.ignoreAutosave=!1,e&&t&&r.collections.forEach((function(e,n){var r=t[n];e.dirty=e.dirty||r[0],e.dirtyIds=e.dirtyIds.concat(r[1])})),n(e)}))):"reference"===this.persistenceAdapter.mode&&"function"==typeof this.persistenceAdapter.exportDatabase?this.persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}),(function(e){r.autosaveClearFlags(),n(e)})):(this.autosaveClearFlags(),this.persistenceAdapter.saveDatabase(this.filename,this.serialize(),(function(e){n(e)}))):n(new Error("persistenceAdapter not configured"))},g.prototype.saveDatabase=function(e){if(this.throttledSaves)if(this.throttledSavePending)this.throttledCallbacks.push(e);else{var t=this.throttledCallbacks;this.throttledCallbacks=[],t.unshift(e),this.throttledSavePending=!0;var n=this;this.saveDatabaseInternal((function(e){n.throttledSavePending=!1,t.forEach((function(t){"function"==typeof t&&setTimeout((function(){t(e)}),1)})),n.throttledCallbacks.length>0&&n.saveDatabase()}))}else this.saveDatabaseInternal(e)},g.prototype.save=g.prototype.saveDatabase,g.prototype.deleteDatabase=function(e,t){var n=t||function(e,t){if(e)throw e};"function"!=typeof e||t||(n=e),null!==this.persistenceAdapter?this.persistenceAdapter.deleteDatabase(this.filename,(function(e){n(e)})):n(new Error("persistenceAdapter not configured"))},g.prototype.autosaveDirty=function(){for(var e=0;e<this.collections.length;e++)if(this.collections[e].dirty)return!0;return!1},g.prototype.autosaveClearFlags=function(){for(var e=0;e<this.collections.length;e++)this.collections[e].dirty=!1},g.prototype.autosaveEnable=function(e,t){this.autosave=!0;var n=5e3,r=this;void 0!==this.autosaveInterval&&null!==this.autosaveInterval&&(n=this.autosaveInterval),this.autosaveHandle=setInterval((function(){r.autosaveDirty()&&!r.ignoreAutosave&&r.saveDatabase(t)}),n)},g.prototype.autosaveDisable=function(){void 0!==this.autosaveHandle&&null!==this.autosaveHandle&&(clearInterval(this.autosaveHandle),this.autosaveHandle=null)},O.prototype.reset=function(){return this.filteredrows.length>0&&(this.filteredrows=[]),this.filterInitialized=!1,this},O.prototype.toJSON=function(){var e=this.copy();return e.collection=null,e},O.prototype.limit=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t=new O(this.collection);return t.filteredrows=this.filteredrows.slice(0,e),t.filterInitialized=!0,t},O.prototype.offset=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t=new O(this.collection);return t.filteredrows=this.filteredrows.slice(e),t.filterInitialized=!0,t},O.prototype.copy=function(){var e=new O(this.collection);return this.filteredrows.length>0&&(e.filteredrows=this.filteredrows.slice()),e.filterInitialized=this.filterInitialized,e},O.prototype.branch=O.prototype.copy,O.prototype.transform=function(e,t){var n,r,i=this;if("string"==typeof e&&this.collection.transforms.hasOwnProperty(e)&&(e=this.collection.transforms[e]),"object"!=typeof e||!Array.isArray(e))throw new Error("Invalid transform");for(void 0!==t&&(e=a.resolveTransformParams(e,t)),n=0;n<e.length;n++)switch((r=e[n]).type){case"find":i.find(r.value);break;case"where":i.where(r.value);break;case"simplesort":i.simplesort(r.property,r.desc||r.options);break;case"compoundsort":i.compoundsort(r.value);break;case"sort":i.sort(r.value);break;case"limit":i=i.limit(r.value);break;case"offset":i=i.offset(r.value);break;case"map":i=i.map(r.value,r.dataOptions);break;case"eqJoin":i=i.eqJoin(r.joinData,r.leftJoinKey,r.rightJoinKey,r.mapFun,r.dataOptions);break;case"mapReduce":i=i.mapReduce(r.mapFunction,r.reduceFunction);break;case"update":i.update(r.value);break;case"remove":i.remove()}return i},O.prototype.sort=function(e){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var t,n,r=(t=e,n=this.collection.data,function(e,r){return t(n[e],n[r])});return this.filteredrows.sort(r),this},O.prototype.simplesort=function(e,t){var n,r=10,i=this.collection.data.length,o=this.filteredrows.length,s=this.collection.binaryIndices.hasOwnProperty(e);if(void 0!==t&&!1!==t||(t={desc:!1}),!0===t&&(t={desc:!0}),0===o){if(this.filterInitialized)return this;if(this.collection.binaryIndices.hasOwnProperty(e))return this.collection.ensureIndex(e),this.filteredrows=this.collection.binaryIndices[e].values.slice(0),t.desc&&this.filteredrows.reverse(),this;this.filteredrows=this.collection.prepareFullDocIndex()}else if(!t.disableIndexIntersect&&s&&(n=i/o,t.useJavascriptSorting&&(r=6),n<=r||t.forceIndexIntersect)){var p,c=this.filteredrows,l={};for(p=0;p<o;p++)l[c[p]]=!0;var d=this.collection.binaryIndices[e].values;return this.filteredrows=d.filter((function(e){return l[e]})),t.desc&&this.filteredrows.reverse(),this}if(t.useJavascriptSorting)return this.sort((function(t,n){return t[e]===n[e]?0:t[e]>n[e]?1:t[e]<n[e]?-1:void 0}));var f,h,m,v,y,b,g=(f=e,h=t.desc,m=this.collection.data,function(e,t){return~f.indexOf(".")?(b=f.split("."),v=a.getIn(m[e],b,!0),y=a.getIn(m[t],b,!0)):(v=m[e][f],y=m[t][f]),u(v,y,h)});return this.filteredrows.sort(g),this},O.prototype.compoundsort=function(e){if(0===e.length)throw new Error("Invalid call to compoundsort, need at least one property");var t;if(1===e.length)return t=e[0],Array.isArray(t)?this.simplesort(t[0],t[1]):this.simplesort(t,!1);for(var n=0,r=e.length;n<r;n+=1)t=e[n],Array.isArray(t)||(e[n]=[t,!1]);this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var i,o,s=(i=e,o=this.collection.data,function(e,t){return function(e,t,n){for(var r,i,o,s,p,c=0,l=0,d=e.length;l<d;l++)if(~(i=(r=e[l])[0]).indexOf(".")?(p=i.split("."),o=a.getIn(t,p,!0),s=a.getIn(n,p,!0)):(o=t[i],s=n[i]),0!==(c=u(o,s,r[1])))return c;return 0}(i,o[e],o[t])});return this.filteredrows.sort(s),this},O.prototype.findOr=function(e){for(var t=null,n=0,r=0,i=[],a=[],o=0,s=(this.count(),0),p=e.length;s<p;s++)for(r=(t=this.branch().find(e[s]).filteredrows).length,n=0;n<r;n++)void 0===a[o=t[n]]&&(a[o]=!0,i.push(o));return this.filteredrows=i,this.filterInitialized=!0,this},O.prototype.$or=O.prototype.findOr,O.prototype.findAnd=function(e){for(var t=0,n=e.length;t<n;t++){if(0===this.count())return this;this.find(e[t])}return this},O.prototype.$and=O.prototype.findAnd,O.prototype.find=function(t,n){if(0===this.collection.data.length)return this.filteredrows=[],this.filterInitialized=!0,this;var r,i,o,s,p,c,u,d=t||"getAll",f=!1,v=[],y=[],b=null;if(n=n||!1,"object"==typeof d){for(r in d)(s={})[r]=d[r],y.push(s),e.call(d,r)&&(i=r,o=d[r]);if(y.length>1)return this.find({$and:y},n)}if(!i||"getAll"===d)return n&&(this.filterInitialized?this.filteredrows=this.filteredrows.slice(0,1):(this.filteredrows=this.collection.data.length>0?[0]:[],this.filterInitialized=!0)),this;if("$and"===i||"$or"===i)return this[i](o),n&&this.filteredrows.length>1&&(this.filteredrows=this.filteredrows.slice(0,1)),this;if(null===o||"object"!=typeof o||o instanceof Date)p="$eq",c=o;else{if("object"!=typeof o)throw new Error("Do not know what you want to do.");for(u in o)if(e.call(o,u)){p=u,c=o[u];break}}"$regex"!==p&&"object"!=typeof c||(c=E(p,c));var g=-1!==i.indexOf(".");!this.filterInitialized&&this.collection.binaryIndices[i]&&m[p]&&(!0!==this.collection.adaptiveBinaryIndices&&this.collection.ensureIndex(i),f=!0,b=this.collection.binaryIndices[i]),!f&&"$in"===p&&Array.isArray(c)&&"undefined"!=typeof Set&&(c=new Set(c),p="$inSet");var w,_,x=h[p],D=this.collection.data,O=0,S=0,j=0;if(this.filterInitialized){if(S=(w=this.filteredrows).length,g){for(i=i.split("."),O=0;O<S;O++)if(l(_=D[j=w[O]],i,x,c,_)&&(v.push(j),n))return this.filteredrows=v,this}else for(O=0;O<S;O++)if(x((_=D[j=w[O]])[i],c,_)&&(v.push(j),n))return this.filteredrows=v,this}else if(f){var k=this.collection.calculateRange(p,i,c);if("$in"!==p){for(O=k[0];O<=k[1];O++)if(!0!==m[p]){if(m[p](a.getIn(D[b.values[O]],i,g),c)&&(v.push(b.values[O]),n))return this.filteredrows=v,this.filterInitialized=!0,this}else if(v.push(b.values[O]),n)return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0,S=k.length;O<S;O++)if(v.push(b.values[k[O]]),n)return this.filteredrows=v,this.filterInitialized=!0,this}else if(S=D.length,g){for(i=i.split("."),O=0;O<S;O++)if(l(_=D[O],i,x,c,_)&&(v.push(O),n))return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0;O<S;O++)if(x((_=D[O])[i],c,_)&&(v.push(O),n))return this.filteredrows=v,this.filterInitialized=!0,this;return this.filteredrows=v,this.filterInitialized=!0,this},O.prototype.where=function(e){var t,n=[];if("function"!=typeof e)throw new TypeError("Argument is not a stored view or a function");t=e;try{if(this.filterInitialized){for(var r=this.filteredrows.length;r--;)!0===t(this.collection.data[this.filteredrows[r]])&&n.push(this.filteredrows[r]);return this.filteredrows=n,this}for(var i=this.collection.data.length;i--;)!0===t(this.collection.data[i])&&n.push(i);return this.filteredrows=n,this.filterInitialized=!0,this}catch(e){throw e}},O.prototype.count=function(){return this.filterInitialized?this.filteredrows.length:this.collection.count()},O.prototype.data=function(e){var t,n,r,i,a=[],o=this.collection.data;if((e=e||{}).removeMeta&&!e.forceClones&&(e.forceClones=!0,e.forceCloneMethod=e.forceCloneMethod||"shallow"),!this.collection.disableDeltaChangesApi&&this.collection.disableFreeze&&(e.forceClones=!0,e.forceCloneMethod="parse-stringify"),!this.filterInitialized){if(0===this.filteredrows.length){if(this.collection.cloneObjects||e.forceClones){for(n=o.length,i=e.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)t=v(o[r],i),e.removeMeta&&(delete t.$loki,delete t.meta),a.push(t);return a}return o.slice()}this.filterInitialized=!0}var s=this.filteredrows;if(n=s.length,this.collection.cloneObjects||e.forceClones)for(i=e.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)t=v(o[s[r]],i),e.removeMeta&&(delete t.$loki,delete t.meta),a.push(t);else for(r=0;r<n;r++)a.push(o[s[r]]);return a},O.prototype.update=function(e){if("function"!=typeof e)throw new TypeError("Argument is not a function");this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());for(var t,n=this.filteredrows.length,r=this.collection.data,i=0;i<n;i++)this.disableFreeze&&!this.collection.cloneObjects&&this.collection.disableDeltaChangesApi?(e(r[this.filteredrows[i]]),this.collection.update(r[this.filteredrows[i]])):(e(t=v(r[this.filteredrows[i]],this.collection.cloneMethod)),this.collection.update(t));return this},O.prototype.remove=function(){return this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex()),this.collection.removeBatchByPositions(this.filteredrows),this.filteredrows=[],this},O.prototype.mapReduce=function(e,t){try{return t(this.data().map(e))}catch(e){throw e}},O.prototype.eqJoin=function(e,t,n,r,i){var a,o,s,p,c=[],u=[],l="function"==typeof t,d="function"==typeof n,f={};if(a=(p=this.data(i)).length,e instanceof j)c=e.chain().data(i);else if(e instanceof O)c=e.data(i);else{if(!Array.isArray(e))throw new TypeError("joinData needs to be an array or result set");c=e}o=c.length;for(var h=0;h<o;h++)f[s=d?n(c[h]):c[h][n]]=c[h];r||(r=function(e,t){return{left:e,right:t}});for(var m=0;m<a;m++)s=l?t(p[m]):p[m][t],u.push(r(p[m],f[s]||{}));return this.collection=new j("joinData"),this.collection.insert(u),this.filteredrows=[],this.filterInitialized=!1,this},O.prototype.map=function(e,t){var n=this.data(t).map(e);return this.collection=new j("mappedData"),this.collection.insert(n),this.filteredrows=[],this.filterInitialized=!1,this},S.prototype=new b,S.prototype.constructor=S,S.prototype.getSort=function(){return this.sortFunction||this.sortCriteria||this.sortCriteriaSimple},S.prototype.rematerialize=function(e){var t,n,r;e=e||{},this.resultdata=[],this.resultsdirty=!0,this.resultset=new O(this.collection),(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple)&&(this.sortDirty=!0);var i=Object.isFrozen(this.filterPipeline);if(e.hasOwnProperty("removeWhereFilters"))for(i&&(this.filterPipeline=this.filterPipeline.slice()),n=t=this.filterPipeline.length;n--;)"where"===this.filterPipeline[n].type&&(n!==this.filterPipeline.length-1&&(this.filterPipeline[n]=this.filterPipeline[this.filterPipeline.length-1]),this.filterPipeline.length--);var a=this.filterPipeline;for(this.filterPipeline=[],t=a.length,r=0;r<t;r++)this.applyFind(a[r].val,a[r].uid);return i&&Object.freeze(this.filterPipeline),this.data(),this.emit("rebuild",this),this},S.prototype.branchResultset=function(e,t){var n=this.resultset.branch();return void 0===e?n:n.transform(e,t)},S.prototype.toJSON=function(){var e=new S(this.collection,this.name,this.options);return e.resultset=this.resultset,e.resultdata=[],e.resultsdirty=!0,e.filterPipeline=this.filterPipeline,e.sortFunction=this.sortFunction,e.sortCriteria=this.sortCriteria,e.sortCriteriaSimple=this.sortCriteriaSimple||null,e.sortDirty=this.sortDirty,e.collection=null,e},S.prototype.removeFilters=function(e){e=e||{},this.rebuildPending=!1,this.resultset.reset(),this.resultdata=[],this.resultsdirty=!0,this.cachedresultset=null;var t=Object.isFrozen(this.filterPipeline),n=this.filterPipeline.length>0;this.filterPipeline=[],t&&Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,!0===e.queueSortPhase&&this.queueSortPhase(),n&&this.emit("filter")},S.prototype.applySort=function(e){return this.sortFunction=e,this.sortCriteria=null,this.sortCriteriaSimple=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.applySimpleSort=function(e,n){return this.sortCriteriaSimple={propname:e,options:n||!1},this.collection.disableFreeze||t(this.sortCriteriaSimple),this.sortCriteria=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.applySortCriteria=function(e){return this.sortCriteria=e,this.collection.disableFreeze||t(this.sortCriteria),this.sortCriteriaSimple=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},S.prototype.startTransaction=function(){return this.cachedresultset=this.resultset.copy(),this},S.prototype.commit=function(){return this.cachedresultset=null,this},S.prototype.rollback=function(){return this.resultset=this.cachedresultset,this.options.persistent&&(this.resultdata=this.resultset.data(),this.emit("rebuild",this)),this},S.prototype._indexOfFilterWithId=function(e){if("string"==typeof e||"number"==typeof e)for(var t=0,n=this.filterPipeline.length;t<n;t+=1)if(e===this.filterPipeline[t].uid)return t;return-1},S.prototype._addFilter=function(e){var n=Object.isFrozen(this.filterPipeline);n&&(this.filterPipeline=this.filterPipeline.slice()),this.collection.disableFreeze||t(e),this.filterPipeline.push(e),n&&Object.freeze(this.filterPipeline),this.resultset[e.type](e.val)},S.prototype.reapplyFilters=function(){this.resultset.reset(),this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0);var e=this.filterPipeline,t=Object.isFrozen(e);this.filterPipeline=[];for(var n=0,r=e.length;n<r;n+=1)this._addFilter(e[n]);return t&&Object.freeze(this.filterPipeline),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this.emit("filter"),this},S.prototype.applyFilter=function(e){var t=this._indexOfFilterWithId(e.uid);if(t>=0){var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline[t]=e,n&&(r(e),Object.freeze(this.filterPipeline)),this.reapplyFilters()}return this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0),this._addFilter(e),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this.emit("filter"),this},S.prototype.applyFind=function(e,t){return this.applyFilter({type:"find",val:e,uid:t}),this},S.prototype.applyWhere=function(e,t){return this.applyFilter({type:"where",val:e,uid:t}),this},S.prototype.removeFilter=function(e){var t=this._indexOfFilterWithId(e);if(t<0)throw new Error("Dynamic view does not contain a filter with ID: "+e);var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline.splice(t,1),n&&Object.freeze(this.filterPipeline),this.reapplyFilters(),this},S.prototype.count=function(){return this.resultsdirty&&(this.resultdata=this.resultset.data()),this.resultset.count()},S.prototype.data=function(e){return(this.sortDirty||this.resultsdirty)&&this.performSortPhase({suppressRebuildEvent:!0}),this.options.persistent?this.resultdata:this.resultset.data(e)},S.prototype.queueRebuildEvent=function(){if(!this.rebuildPending){this.rebuildPending=!0;var e=this;setTimeout((function(){e.rebuildPending&&(e.rebuildPending=!1,e.emit("rebuild",e))}),this.options.minRebuildInterval)}},S.prototype.queueSortPhase=function(){if(!this.sortDirty){this.sortDirty=!0;var e=this;"active"===this.options.sortPriority?setTimeout((function(){e.performSortPhase()}),this.options.minRebuildInterval):this.queueRebuildEvent()}},S.prototype.performSortPhase=function(e){(this.sortDirty||this.resultsdirty)&&(e=e||{},this.sortDirty&&(this.sortFunction?this.resultset.sort(this.sortFunction):this.sortCriteria?this.resultset.compoundsort(this.sortCriteria):this.sortCriteriaSimple&&this.resultset.simplesort(this.sortCriteriaSimple.propname,this.sortCriteriaSimple.options),this.sortDirty=!1),this.options.persistent&&(this.resultdata=this.resultset.data(),this.resultsdirty=!1),e.suppressRebuildEvent||this.emit("rebuild",this))},S.prototype.evaluateDocument=function(e,t){if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var n,r=this.resultset.filteredrows,i=t?-1:r.indexOf(+e),a=r.length,o=new O(this.collection);o.filteredrows=[e],o.filterInitialized=!0;for(var s=0,p=this.filterPipeline.length;s<p;s++)o[(n=this.filterPipeline[s]).type](n.val);var c=0===o.filteredrows.length?-1:0;return-1!==i||-1!==c?-1===i&&-1!==c?(r.push(e),this.options.persistent&&this.resultdata.push(this.collection.data[e]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==i&&-1===c?(i<a-1?(r.splice(i,1),this.options.persistent&&this.resultdata.splice(i,1)):(r.length=a-1,this.options.persistent&&(this.resultdata.length=a-1)),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==i&&-1!==c?(this.options.persistent&&(this.resultdata[i]=this.collection.data[e]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):void 0:void 0},S.prototype.removeDocument=function(e){var t,n,r,i={},a={},o=[],s=this.resultset,p=this.resultset.filteredrows,c=p.length;if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());for(Array.isArray(e)||(e=[e]),r=e.length,n=0;n<r;n++)i[e[n]]=!0;for(t=0;t<c;t++)i[p[t]]&&(a[t]=!0);Object.keys(a).length>0&&(this.resultset.filteredrows=this.resultset.filteredrows.filter((function(e,t){return!a[t]})),this.options.persistent&&(this.resultdata=this.resultdata.filter((function(e,t){return!a[t]}))),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var u=function(e){return function(t){return t<s.filteredrows[e]}};for(c=s.filteredrows.length,t=0;t<c;t++)o=e.filter(u(t)),s.filteredrows[t]-=o.length},S.prototype.mapReduce=function(e,t){try{return t(this.data().map(e))}catch(e){throw e}},j.prototype=new b,j.prototype.contructor=j,j.prototype.createChange=function(e,t,n,r){this.changes.push({name:e,operation:t,obj:"U"!=t||this.disableDeltaChangesApi?JSON.parse(JSON.stringify(n)):this.getChangeDelta(n,r)})},j.prototype.insertMeta=function(e){var t,n;if(!this.disableMeta&&e)if(Array.isArray(e))for(t=e.length,n=0;n<t;n++)e[n].hasOwnProperty("meta")||(e[n].meta={}),e[n].meta.created=(new Date).getTime(),e[n].meta.revision=0;else e.meta||(e.meta={}),e.meta.created=(new Date).getTime(),e.meta.revision=0},j.prototype.updateMeta=function(e){return this.disableMeta||!e||(this.disableFreeze||((e=i(e)).meta=i(e.meta)),e.meta.updated=(new Date).getTime(),e.meta.revision+=1),e},j.prototype.createInsertChange=function(e){this.createChange(this.name,"I",e)},j.prototype.createUpdateChange=function(e,t){this.createChange(this.name,"U",e,t)},j.prototype.insertMetaWithChange=function(e){this.insertMeta(e),this.createInsertChange(e)},j.prototype.updateMetaWithChange=function(e,t,n){return e=this.updateMeta(e,n),this.createUpdateChange(e,t),e},j.prototype.lokiConsoleWrapper={log:function(){},warn:function(){},error:function(){}},j.prototype.addAutoUpdateObserver=function(e){this.autoupdate&&"function"==typeof Object.observe&&Object.observe(e,this.observerCallback,["add","update","delete","reconfigure","setPrototype"])},j.prototype.removeAutoUpdateObserver=function(e){this.autoupdate&&"function"==typeof Object.observe&&Object.unobserve(e,this.observerCallback)},j.prototype.addTransform=function(e,t){if(this.transforms.hasOwnProperty(e))throw new Error("a transform by that name already exists");this.transforms[e]=t},j.prototype.getTransform=function(e){return this.transforms[e]},j.prototype.setTransform=function(e,t){this.transforms[e]=t},j.prototype.removeTransform=function(e){delete this.transforms[e]},j.prototype.byExample=function(e){var t,n,r;for(t in r=[],e)e.hasOwnProperty(t)&&r.push(((n={})[t]=e[t],n));return{$and:r}},j.prototype.findObject=function(e){return this.findOne(this.byExample(e))},j.prototype.findObjects=function(e){return this.find(this.byExample(e))},j.prototype.ttlDaemonFuncGen=function(){var e=this,t=this.ttl.age;return function(){var n=Date.now();e.chain().where((function(e){var r=e.meta.updated||e.meta.created;return t<n-r})).remove()}},j.prototype.setTTL=function(e,t){e<0?clearInterval(this.ttl.daemon):(this.ttl.age=e,this.ttl.ttlInterval=t,this.ttl.daemon=setInterval(this.ttlDaemonFuncGen(),t))},j.prototype.prepareFullDocIndex=function(){for(var e=this.data.length,t=new Array(e),n=0;n<e;n+=1)t[n]=n;return t},j.prototype.configureOptions=function(e){(e=e||{}).hasOwnProperty("adaptiveBinaryIndices")&&(this.adaptiveBinaryIndices=e.adaptiveBinaryIndices,this.adaptiveBinaryIndices&&this.ensureAllIndexes())},j.prototype.ensureIndex=function(e,t){if(void 0===t&&(t=!1),null==e)throw new Error("Attempting to set index without an associated property");if((!this.binaryIndices[e]||t||this.binaryIndices[e].dirty)&&(!0!==this.adaptiveBinaryIndices||!this.binaryIndices.hasOwnProperty(e)||t)){var n={name:e,dirty:!0,values:this.prepareFullDocIndex()};this.binaryIndices[e]=n;var r,i,s,p,c,u=(r=e,i=this.data,c=!!~r.indexOf(".")&&r.split("."),function(e,t){if(c?(s=a.getIn(i[e],c,!0),p=a.getIn(i[t],c,!0)):(s=i[e][r],p=i[t][r]),s!==p){if(o.lt(s,p,!1))return-1;if(o.gt(s,p,!1))return 1}return 0});n.values.sort(u),n.dirty=!1,this.dirty=!0}},j.prototype.checkAllIndexes=function(t){var n,r=this.binaryIndices,i=[];for(n in r)e.call(r,n)&&(this.checkIndex(n,t)||i.push(n));return i},j.prototype.checkIndex=function(e,t){(t=t||{}).randomSamplingFactor&&!1!==t.randomSampling&&(t.randomSampling=!0),t.randomSamplingFactor=t.randomSamplingFactor||.1,(t.randomSamplingFactor<0||t.randomSamplingFactor>1)&&(t.randomSamplingFactor=.1);var n,r,i,o,s,p=!0;if(!this.binaryIndices.hasOwnProperty(e))throw new Error("called checkIndex on property without an index: "+e);if(this.adaptiveBinaryIndices||this.ensureIndex(e),(o=(s=this.binaryIndices[e].values).length)!==this.data.length)return t.repair&&this.ensureIndex(e,!0),!1;if(0===o)return!0;var c=-1!==e.indexOf(".");if(1===o)p=0===s[0];else if(t.randomSampling){if(h.$lte(a.getIn(this.data[s[0]],e,c),a.getIn(this.data[s[1]],e,c))||(p=!1),h.$lte(a.getIn(this.data[s[o-2]],e,c),a.getIn(this.data[s[o-1]],e,c))||(p=!1),p)for(r=Math.floor((o-1)*t.randomSamplingFactor),n=0;n<r-1;n++)if(i=Math.floor(Math.random()*(o-1)),!h.$lte(a.getIn(this.data[s[i]],e,c),a.getIn(this.data[s[i+1]],e,c))){p=!1;break}}else for(n=0;n<o-1;n++)if(!h.$lte(a.getIn(this.data[s[n]],e,c),a.getIn(this.data[s[n+1]],e,c))){p=!1;break}return!p&&t.repair&&this.ensureIndex(e,!0),p},j.prototype.getBinaryIndexValues=function(e){var t,n=this.binaryIndices[e].values,r=[];for(t=0;t<n.length;t++)r.push(a.getIn(this.data[n[t]],e,!0));return r},j.prototype.getUniqueIndex=function(e,t){var n=this.constraints.unique[e];return!n&&t?this.ensureUniqueIndex(e):n},j.prototype.ensureUniqueIndex=function(e){var t=this.constraints.unique[e];return t||-1==this.uniqueNames.indexOf(e)&&this.uniqueNames.push(e),this.constraints.unique[e]=t=new M(e),this.data.forEach((function(e){t.set(e)})),t},j.prototype.ensureAllIndexes=function(t){var n,r=this.binaryIndices;for(n in r)e.call(r,n)&&this.ensureIndex(n,t)},j.prototype.flagBinaryIndexesDirty=function(){var t,n=this.binaryIndices;for(t in n)e.call(n,t)&&(n[t].dirty=!0)},j.prototype.flagBinaryIndexDirty=function(e){this.binaryIndices[e]&&(this.binaryIndices[e].dirty=!0)},j.prototype.count=function(e){return e?this.chain().find(e).filteredrows.length:this.data.length},j.prototype.ensureId=function(){if(!this.idIndex){for(var e=this.data,t=0,n=e.length,r=new Array(n);t<n;t++)r[t]=e[t].$loki;this.idIndex=r}},j.prototype.ensureIdAsync=function(e){this.async((function(){this.ensureId()}),e)},j.prototype.addDynamicView=function(e,t){var n=new S(this,e,t);return this.DynamicViews.push(n),n},j.prototype.removeDynamicView=function(e){this.DynamicViews=this.DynamicViews.filter((function(t){return t.name!==e}))},j.prototype.getDynamicView=function(e){for(var t=0;t<this.DynamicViews.length;t++)if(this.DynamicViews[t].name===e)return this.DynamicViews[t];return null},j.prototype.findAndUpdate=function(e,t){"function"==typeof e?this.updateWhere(e,t):this.chain().find(e).update(t)},j.prototype.findAndRemove=function(e){this.chain().find(e).remove()},j.prototype.insert=function(e,t){if(!Array.isArray(e))return this.insertOne(e);var n,r=[],i=t&&!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0;i&&(this.adaptiveBinaryIndices=!1);try{this.emit("pre-insert",e);for(var a=0,o=e.length;a<o;a++){if(!(n=this.insertOne(e[a],!0)))return;r.push(n)}}finally{i&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}return this.emit("insert",r),1===(r=this.cloneObjects?v(r,this.cloneMethod):r).length?r[0]:r},j.prototype.insertOne=function(e,n){var r,a=null;if("object"!=typeof e?a=new TypeError("Document needs to be an object"):null===e&&(a=new TypeError("Object cannot be null")),null!==a)throw this.emit("error",a),a;var o=this.cloneObjects?v(e,this.cloneMethod):e;if(this.disableFreeze||(o=i(o)),this.disableMeta||(void 0===o.meta?o.meta={revision:0,created:0}:this.disableFreeze||(o.meta=i(o.meta))),n||this.emit("pre-insert",o),this.add(o))return this.disableChangesApi?this.insertMeta(o):this.insertMetaWithChange(o),this.disableFreeze||t(o),r=this.cloneObjects?v(o,this.cloneMethod):o,n||this.emit("insert",r),this.addAutoUpdateObserver(r),r},j.prototype.clear=function(e){var t=this;e=e||{},this.data=[],this.idIndex=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null,this.maxId=0,this.DynamicViews=[],this.dirty=!0,this.constraints={unique:{},exact:{}},!0===e.removeIndices?(this.binaryIndices={},this.uniqueNames=[]):Object.keys(this.binaryIndices).forEach((function(e){t.binaryIndices[e].dirty=!1,t.binaryIndices[e].values=[]}))},j.prototype.update=function(n){var r,i,a;if(Array.isArray(n)){a=n.length,(r=!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0)&&(this.adaptiveBinaryIndices=!1);try{for(i=0;i<a;i+=1)this.update(n[i])}finally{r&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}}else{if(!e.call(n,"$loki"))throw new Error("Trying to update unsynced document. Please save the document first by using insert() or addMany()");try{this.startTransaction();var o,s,p,c,u,l=this.get(n.$loki,!0),d=this;if(!l)throw new Error("Trying to update a document not in collection.");o=l[0],p=l[1],s=this.cloneObjects||!this.disableDeltaChangesApi&&this.disableFreeze?v(n,this.cloneMethod):n,this.emit("pre-update",n),this.uniqueNames.forEach((function(e){d.getUniqueIndex(e,!0).update(o,s)})),this.data[p]=s,s!==n&&this.addAutoUpdateObserver(n);for(var f=0;f<this.DynamicViews.length;f++)this.DynamicViews[f].evaluateDocument(p,!1);if(this.adaptiveBinaryIndices){var h=this.binaryIndices;for(c in h)this.adaptiveBinaryIndexUpdate(p,c)}else this.flagBinaryIndexesDirty();return this.idIndex[p]=s.$loki,this.isIncremental&&this.dirtyIds.push(s.$loki),this.commit(),this.dirty=!0,s=this.disableChangesApi?this.updateMeta(s):this.updateMetaWithChange(s,o),this.disableFreeze||t(s),u=this.cloneObjects?v(s,this.cloneMethod):s,this.emit("update",u,o),u}catch(e){throw this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),e}}},j.prototype.add=function(e){if("object"!=typeof e)throw new TypeError("Object being added needs to be an object");if(void 0!==e.$loki)throw new Error("Document is already in collection, please use update()");try{this.startTransaction(),this.maxId++,isNaN(this.maxId)&&(this.maxId=this.data[this.data.length-1].$loki+1);var t=this.maxId;e.$loki=t,this.disableMeta||(e.meta.version=0);for(var n=0,r=this.uniqueNames.length;n<r;n++)this.getUniqueIndex(this.uniqueNames[n],!0).set(e);this.idIndex&&this.idIndex.push(t),this.isIncremental&&this.dirtyIds.push(t),this.data.push(e);var i=this.data.length-1,a=this.DynamicViews.length;for(n=0;n<a;n++)this.DynamicViews[n].evaluateDocument(i,!0);if(this.adaptiveBinaryIndices){var o=this.binaryIndices;for(var s in o)this.adaptiveBinaryIndexInsert(i,s)}else this.flagBinaryIndexesDirty();return this.commit(),this.dirty=!0,this.cloneObjects?v(e,this.cloneMethod):e}catch(e){throw this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),e}},j.prototype.updateWhere=function(e,t){var n,r=this.where(e),i=0;try{for(;i<r.length;i++)n=t(r[i]),this.update(n)}catch(e){this.rollback(),this.lokiConsoleWrapper.error(e.message)}},j.prototype.removeWhere=function(e){var t;"function"==typeof e?(t=this.data.filter(e),this.remove(t)):this.chain().find(e).remove()},j.prototype.removeDataOnly=function(){this.remove(this.data.slice())},j.prototype.removeBatchByPositions=function(e){var t,n,r,i,a=e.length,o={},s=Object.keys(this.binaryIndices).length,p=Object.keys(this.constraints.unique).length,c=this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0,u=this;try{for(this.startTransaction(),this.ensureId(),r=0;r<a;r++)o[this.idIndex[e[r]]]=!0;if((t=this.DynamicViews.length)>0||s>0||p>0){if(t>0)for(n=0;n<t;n++)this.DynamicViews[n].removeDocument(e);if(this.adaptiveBinaryIndices&&!c){var l,d=this.binaryIndices;for(l in d)this.adaptiveBinaryIndexRemove(e,l)}else this.flagBinaryIndexesDirty();p&&this.uniqueNames.forEach((function(t){var n=u.getUniqueIndex(t);if(n)for(r=0;r<a;r++)null!==(i=u.data[e[r]])[t]&&void 0!==i[t]&&n.remove(i[t])}))}if(!this.disableChangesApi||this.events.delete.length>1)for(r=0;r<a;r++)this.emit("delete",this.data[e[r]]);if(this.data=this.data.filter((function(e){return!o[e.$loki]})),this.isIncremental)for(r=0;r<a;r++)this.dirtyIds.push(this.idIndex[e[r]]);this.idIndex=this.idIndex.filter((function(e){return!o[e]})),this.adaptiveBinaryIndices&&c&&(this.adaptiveBinaryIndices=!1,this.ensureAllIndexes(!0),this.adaptiveBinaryIndices=!0),this.commit(),this.dirty=!0}catch(e){return this.rollback(),c&&(this.adaptiveBinaryIndices=!0),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),null}},j.prototype.removeBatch=function(e){var t,n=e.length,r=this.data.length,i={},a=[];for(t=0;t<r;t++)i[this.data[t].$loki]=t;for(t=0;t<n;t++)"object"==typeof e[t]?a.push(i[e[t].$loki]):a.push(i[e[t]]);this.removeBatchByPositions(a)},j.prototype.remove=function(t){if("number"==typeof t&&(t=this.get(t)),"object"!=typeof t)throw new Error("Parameter is not an object");if(Array.isArray(t))this.removeBatch(t);else{if(!e.call(t,"$loki"))throw new Error("Object is not a document stored in the collection");try{this.startTransaction();var n=this.get(t.$loki,!0),a=n[1],o=this;this.uniqueNames.forEach((function(e){if(null!==t[e]&&void 0!==t[e]){var n=o.getUniqueIndex(e);n&&n.remove(t[e])}}));for(var s=0;s<this.DynamicViews.length;s++)this.DynamicViews[s].removeDocument(a);if(this.adaptiveBinaryIndices){var p,c=this.binaryIndices;for(p in c)this.adaptiveBinaryIndexRemove(a,p)}else this.flagBinaryIndexesDirty();return this.data.splice(a,1),this.removeAutoUpdateObserver(t),this.idIndex.splice(a,1),this.isIncremental&&this.dirtyIds.push(t.$loki),this.commit(),this.dirty=!0,this.emit("delete",n[0]),this.disableFreeze||(t=i(t)),delete t.$loki,delete t.meta,this.disableFreeze||r(t),t}catch(e){return this.rollback(),this.lokiConsoleWrapper.error(e.message),this.emit("error",e),null}}},j.prototype.get=function(e,t){this.idIndex||this.ensureId();var n=t||!1,r=this.idIndex,i=r.length-1,a=0,o=a+i>>1;if(e="number"==typeof e?e:parseInt(e,10),isNaN(e))throw new TypeError("Passed id is not an integer");for(;r[a]<r[i];)r[o=a+i>>1]<e?a=o+1:i=o;return i===a&&r[a]===e?n?[this.data[a],a]:this.data[a]:null},j.prototype.getBinaryIndexPosition=function(e,t){var n=a.getIn(this.data[e],t,!0),r=this.binaryIndices[t].values,i=this.calculateRange("$eq",t,n);if(0===i[0]&&-1===i[1])return null;for(var o=i[0],s=i[1],p=o;p<=s;p++)if(r[p]===e)return p;return null},j.prototype.adaptiveBinaryIndexInsert=function(e,t){var n=-1!==t.indexOf("."),r=this.binaryIndices[t].values,i=a.getIn(this.data[e],t,n);!0===this.serializableIndices&&i instanceof Date&&(this.data[e][t]=i.getTime(),i=a.getIn(this.data[e],t));var o=0===r.length?0:this.calculateRangeStart(t,i,!0,n);this.binaryIndices[t].values.splice(o,0,e)},j.prototype.adaptiveBinaryIndexUpdate=function(e,t){var n,r=this.binaryIndices[t].values,i=r.length;for(n=0;n<i&&r[n]!==e;n++);this.binaryIndices[t].values.splice(n,1),this.adaptiveBinaryIndexInsert(e,t)},j.prototype.adaptiveBinaryIndexRemove=function(e,t,n){var r,i,a,o,s,p,c,u=this.binaryIndices[t],l={};if(Array.isArray(e)){if(1!==(o=e.length)){for(a=0;a<o;a++)l[e[a]]=!0;if(u.values=u.values.filter((function(e){return!l[e]})),!0===n)return;var d=e.slice();for(d.sort((function(e,t){return e-t})),r=u.values.length,i=0;i<r;i++){for(s=u.values[i],p=0,a=0;a<o&&s>d[a];a++)p++;u.values[i]-=p}return}e=e[0]}if(null===(c=this.getBinaryIndexPosition(e,t)))return null;if(u.values.splice(c,1),!0!==n)for(r=u.values.length,i=0;i<r;i++)u.values[i]>e&&u.values[i]--},j.prototype.calculateRangeStart=function(e,t,n,r){var i=this.data,s=this.binaryIndices[e].values,p=0,c=s.length-1,u=0;if(0===s.length)return-1;for(a.getIn(i[s[p]],e,r),a.getIn(i[s[c]],e,r);p<c;)u=p+c>>1,o.lt(a.getIn(i[s[u]],e,r),t,!1)?p=u+1:c=u;var l=p;return o.aeq(t,a.getIn(i[s[l]],e,r))?l:o.lt(t,a.getIn(i[s[l]],e,r),!1)?n?l:l-1:n?l+1:l},j.prototype.calculateRangeEnd=function(e,t,n){var r=this.data,i=this.binaryIndices[e].values,s=0,p=i.length-1,c=0;if(0===i.length)return-1;for(a.getIn(r[i[s]],e,n),a.getIn(r[i[p]],e,n);s<p;)c=s+p>>1,o.lt(t,a.getIn(r[i[c]],e,n),!1)?p=c:s=c+1;var u=p;return o.aeq(t,a.getIn(r[i[u]],e,n))?u:o.gt(t,a.getIn(r[i[u]],e,n),!1)?u+1:o.aeq(t,a.getIn(r[i[u-1]],e,n))?u-1:u},j.prototype.calculateRange=function(e,t,n){var r,i,s,p=this.data,c=this.binaryIndices[t].values,u=c.length-1;if(0===p.length)return[0,-1];var l=-1!==t.indexOf("."),d=a.getIn(p[c[0]],t,l),f=a.getIn(p[c[u]],t,l);switch(e){case"$eq":case"$aeq":case"$dteq":if(o.lt(n,d,!1)||o.gt(n,f,!1))return[0,-1];break;case"$gt":if(o.gt(n,f,!0))return[0,-1];if(o.gt(d,n,!1))return[0,u];break;case"$gte":if(o.gt(n,f,!1))return[0,-1];if(o.gt(d,n,!0))return[0,u];break;case"$lt":if(o.lt(n,d,!0))return[0,-1];if(o.lt(f,n,!1))return[0,u];break;case"$lte":if(o.lt(n,d,!1))return[0,-1];if(o.lt(f,n,!0))return[0,u];break;case"$between":return o.gt(n[0],f,!1)||o.lt(n[1],d,!1)?[0,-1]:((r=this.calculateRangeStart(t,n[0],!1,l))<0&&r++,(s=this.calculateRangeEnd(t,n[1],l))>u&&s--,o.gt(a.getIn(p[c[r]],t,l),n[0],!0)||r++,o.lt(a.getIn(p[c[s]],t,l),n[1],!0)||s--,s<r?[0,-1]:[r,s]);case"$in":for(var h=[],m=[],v=0,y=n.length;v<y;v++)for(var b=this.calculateRange("$eq",t,n[v]),g=b[0];g<=b[1];g++)void 0===h[g]&&(h[g]=!0,m.push(g));return m}switch(e){case"$eq":case"$aeq":case"$dteq":case"$gte":case"$lt":r=this.calculateRangeStart(t,n,!1,l),i=a.getIn(p[c[r]],t,l)}switch(e){case"$eq":case"$aeq":case"$dteq":case"$lte":case"$gt":s=this.calculateRangeEnd(t,n,l),a.getIn(p[c[s]],t,l)}switch(e){case"$eq":case"$aeq":case"$dteq":return o.aeq(i,n)?[r,s]:[0,-1];case"$gt":return o.aeq(a.getIn(p[c[s]],t,l),n)?[s+1,u]:[s,u];case"$gte":return o.aeq(a.getIn(p[c[r]],t,l),n)?[r,u]:[r+1,u];case"$lt":return o.aeq(a.getIn(p[c[r]],t,l),n)?[0,r-1]:[0,r];case"$lte":return o.aeq(a.getIn(p[c[s]],t,l),n)?[0,s]:[0,s-1];default:return[0,p.length-1]}},j.prototype.by=function(e,t){var n;if(void 0===t)return n=this,function(t){return n.by(e,t)};var r=this.getUniqueIndex(e,!0).get(t);return this.cloneObjects?v(r,this.cloneMethod):r},j.prototype.findOne=function(e){e=e||{};var t=this.chain().find(e,!0).data();return Array.isArray(t)&&0===t.length?null:this.cloneObjects?v(t[0],this.cloneMethod):t[0]},j.prototype.chain=function(e,t){var n=new O(this);return void 0===e?n:n.transform(e,t)},j.prototype.find=function(e){return this.chain().find(e).data()},j.prototype.findOneUnindexed=function(e,t){for(var n=this.data.length;n--;)if(a.getIn(this.data[n],e,!0)===t)return this.data[n];return null},j.prototype.startTransaction=function(){if(this.transactional){this.cachedData=v(this.data,this.cloneMethod),this.cachedIndex=this.idIndex,this.cachedBinaryIndex=this.binaryIndices,this.cachedDirtyIds=this.dirtyIds;for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].startTransaction()}},j.prototype.commit=function(){if(this.transactional){this.cachedData=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedDirtyIds=null;for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].commit()}},j.prototype.rollback=function(){if(this.transactional){null!==this.cachedData&&null!==this.cachedIndex&&(this.data=this.cachedData,this.idIndex=this.cachedIndex,this.binaryIndices=this.cachedBinaryIndex,this.dirtyIds=this.cachedDirtyIds);for(var e=0;e<this.DynamicViews.length;e++)this.DynamicViews[e].rollback()}},j.prototype.async=function(e,t){setTimeout((function(){if("function"!=typeof e)throw new TypeError("Argument passed for async execution is not a function");e(),t()}),0)},j.prototype.where=function(e){return this.chain().where(e).data()},j.prototype.mapReduce=function(e,t){try{return t(this.data.map(e))}catch(e){throw e}},j.prototype.eqJoin=function(e,t,n,r,i){return new O(this).eqJoin(e,t,n,r,i)},j.prototype.stages={},j.prototype.getStage=function(e){return this.stages[e]||(this.stages[e]={}),this.stages[e]},j.prototype.commitLog=[],j.prototype.stage=function(e,t){var n=JSON.parse(JSON.stringify(t));return this.getStage(e)[t.$loki]=n,n},j.prototype.commitStage=function(e,t){var n,r=this.getStage(e),i=(new Date).getTime();for(n in r)this.update(r[n]),this.commitLog.push({timestamp:i,message:t,data:JSON.parse(JSON.stringify(r[n]))});this.stages[e]={}},j.prototype.no_op=function(){},j.prototype.extract=function(e){for(var t=0,n=this.data.length,r=k(e),i=[];t<n;t+=1)i.push(A(this.data[t],e,r));return i},j.prototype.max=function(e){return Math.max.apply(null,this.extract(e))},j.prototype.min=function(e){return Math.min.apply(null,this.extract(e))},j.prototype.maxRecord=function(e){for(var t,n=0,r=this.data.length,i=k(e),a={index:0,value:void 0};n<r;n+=1)void 0!==t?t<A(this.data[n],e,i)&&(t=A(this.data[n],e,i),a.index=this.data[n].$loki):(t=A(this.data[n],e,i),a.index=this.data[n].$loki);return a.value=t,a},j.prototype.minRecord=function(e){for(var t,n=0,r=this.data.length,i=k(e),a={index:0,value:void 0};n<r;n+=1)void 0!==t?t>A(this.data[n],e,i)&&(t=A(this.data[n],e,i),a.index=this.data[n].$loki):(t=A(this.data[n],e,i),a.index=this.data[n].$loki);return a.value=t,a},j.prototype.extractNumerical=function(e){return this.extract(e).map(T).filter(Number).filter((function(e){return!isNaN(e)}))},j.prototype.avg=function(e){return C(this.extractNumerical(e))},j.prototype.stdDev=function(e){return t=this.extractNumerical(e),n=C(t),r=C(t.map((function(e){var t=e-n;return t*t}))),Math.sqrt(r);var t,n,r},j.prototype.mode=function(e){var t,n,r,i={},a=this.extract(e);for(n in a.forEach((function(e){i[e]?i[e]+=1:i[e]=1})),i)t?t<i[n]&&(r=n):(r=n,t=i[n]);return r},j.prototype.median=function(e){var t=this.extractNumerical(e);t.sort(P);var n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2},R.prototype={keys:[],values:[],sort:function(e,t){return e<t?-1:e>t?1:0},setSort:function(e){this.bs=new F(e)},bs:function(){return new F(this.sort)},set:function(e,t){var n=this.bs(this.keys,e);n.found?this.values[n.index]=t:(this.keys.splice(n.index,0,e),this.values.splice(n.index,0,t))},get:function(e){return this.values[I(this.keys,e,this.sort).index]}},M.prototype.keyMap={},M.prototype.lokiMap={},M.prototype.set=function(e){var t=e[this.field];if(null!=t){if(this.keyMap[t])throw new Error("Duplicate key for property "+this.field+": "+t);this.keyMap[t]=e,this.lokiMap[e.$loki]=t}},M.prototype.get=function(e){return this.keyMap[e]},M.prototype.byId=function(e){return this.keyMap[this.lokiMap[e]]},M.prototype.update=function(e,t){if(this.lokiMap[e.$loki]!==t[this.field]){var n=this.lokiMap[e.$loki];this.set(t),this.keyMap[n]=void 0}else this.keyMap[e[this.field]]=t},M.prototype.remove=function(e){var t=this.keyMap[e];if(null==t)throw new Error("Key is not in unique index: "+this.field);this.keyMap[e]=void 0,this.lokiMap[t.$loki]=void 0},M.prototype.clear=function(){this.keyMap=Object.create(null),this.lokiMap=Object.create(null)},$.prototype={set:function(e,t){this.index[e]?this.index[e].push(t):this.index[e]=[t]},remove:function(e,t){var n=this.index[e];for(var r in n)n[r]==t&&n.splice(r,1);n.length<1&&(this.index[e]=void 0)},get:function(e){return this.index[e]},clear:function(e){this.index={}}},g.deepFreeze=t,g.freeze=r,g.unFreeze=i,g.LokiOps=h,g.Collection=j,g.DynamicView=S,g.Resultset=O,g.KeyValueStore=R,g.LokiMemoryAdapter=w,g.LokiPartitioningAdapter=_,g.LokiLocalStorageAdapter=D,g.LokiFsAdapter=x,g.persistenceAdapters={fs:x,localStorage:D},g.aeq=s,g.lt=p,g.gt=c,g.Comparators=o,g}()},void 0===(i=r.apply(t,[]))||(e.exports=i)},15955:(e,t,n)=>{e.exports=n(37392)},72839:(e,t,n)=>{"use strict";var r,i,a,o=n(15955),s=n(71017).extname,p=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=p.exec(e),n=t&&o[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}t.charset=u,t.charsets={lookup:u},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=p.exec(e),r=n&&t.extensions[n[1].toLowerCase()];return!(!r||!r.length)&&r[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=s("x."+e).toLowerCase().substr(1);return n&&t.types[n]||!1},t.types=Object.create(null),r=t.extensions,i=t.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var t=o[e],n=t.extensions;if(n&&n.length){r[e]=n;for(var s=0;s<n.length;s++){var p=n[s];if(i[p]){var c=a.indexOf(o[i[p]].source),u=a.indexOf(t.source);if("application/octet-stream"!==i[p]&&(c>u||c===u&&"application/"===i[p].substr(0,12)))continue}i[p]=e}}}))},48628:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,o){o=o||{};var s,p,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===c&&isFinite(e))return o.long?(s=e,(p=Math.abs(s))>=i?a(s,p,i,"day"):p>=r?a(s,p,r,"hour"):p>=n?a(s,p,n,"minute"):p>=t?a(s,p,t,"second"):s+" ms"):function(e){var a=Math.abs(e);return a>=i?Math.round(e/i)+"d":a>=r?Math.round(e/r)+"h":a>=n?Math.round(e/n)+"m":a>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},51104:(e,t,n)=>{"use strict";var r=n(57310).parse,i={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},a=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function o(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?r(e):e||{},n=t.protocol,s=t.host,p=t.port;if("string"!=typeof s||!s||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(o("npm_config_no_proxy")||o("no_proxy")).toLowerCase();return!n||"*"!==n&&n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,o=r?parseInt(r[2]):0;return!(!o||o===t)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!a.call(e,i)):e!==i)}))}(s=s.replace(/:\d*$/,""),p=parseInt(p)||i[n]||0))return"";var c=o("npm_config_"+n+"_proxy")||o(n+"_proxy")||o("npm_config_proxy")||o("all_proxy");return c&&-1===c.indexOf("://")&&(c=n+"://"+c),c}},61547:(e,t,n)=>{"use strict";var r=n(57147),i=n(71017).join,a=n(71017).resolve,o=n(71017).dirname,s={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};e.exports=function e(t,n,p){var c={};for(var u in n&&!p&&"string"!=typeof n&&(p=n,n=null),p=p||{},s)void 0===p[u]&&(p[u]=s[u]);return n=n?a(o(t.filename),n):o(t.filename),r.readdirSync(n).forEach((function(a){var o,s,u,l=i(n,a);r.statSync(l).isDirectory()&&p.recurse?(o=e(t,l,p),Object.keys(o).length&&(c[p.rename(a,l,a)]=o)):l!==t.filename&&function(e,t,n){return new RegExp("\\.("+n.extensions.join("|")+")$","i").test(t)&&!(n.include&&n.include instanceof RegExp&&!n.include.test(e))&&!(n.include&&"function"==typeof n.include&&!n.include(e,t))&&!(n.exclude&&n.exclude instanceof RegExp&&n.exclude.test(e))&&!(n.exclude&&"function"==typeof n.exclude&&n.exclude(e,t))}(l,a,p)&&(s=a.substring(0,a.lastIndexOf(".")),u=t.require(l),c[p.rename(s,l,a)]=p.visit(u,l,a)||u)})),c},e.exports.defaults=s},32937:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var a=n(75271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return a.Observable}});var o=n(93739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var s=n(52138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.observable}});var p=n(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return p.animationFrames}});var c=n(59520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var u=n(58042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return u.BehaviorSubject}});var l=n(30216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return l.ReplaySubject}});var d=n(67257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var f=n(64502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return f.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return f.asapScheduler}});var h=n(34617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var m=n(60326);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return m.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return m.queueScheduler}});var v=n(86192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var y=n(88847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var b=n(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=n(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var w=n(11403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return w.Subscriber}});var _=n(93868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return _.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return _.NotificationKind}});var x=n(25966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return x.pipe}});var D=n(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return D.noop}});var O=n(69144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var E=n(31211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return E.isObservable}});var S=n(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return S.lastValueFrom}});var j=n(17447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return j.firstValueFrom}});var k=n(56809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return k.ArgumentOutOfRangeError}});var T=n(68032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return T.EmptyError}});var N=n(91137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return N.NotFoundError}});var P=n(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return P.ObjectUnsubscribedError}});var C=n(56228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var A=n(26279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return A.TimeoutError}});var I=n(35463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return I.UnsubscriptionError}});var F=n(31253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return F.bindCallback}});var R=n(61009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return R.bindNodeCallback}});var M=n(21047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return M.combineLatest}});var $=n(60079);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return $.concat}});var B=n(31663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return B.connectable}});var L=n(65401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var V=n(51727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return V.empty}});var q=n(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return q.forkJoin}});var U=n(76216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return U.from}});var z=n(96767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var W=n(94366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return W.fromEventPattern}});var Q=n(76103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Q.generate}});var H=n(84468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return H.iif}});var K=n(24449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return K.interval}});var G=n(35847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return G.merge}});var J=n(57423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return J.never}});var Y=n(77443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return Y.of}});var Z=n(91282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=n(6741);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=n(91945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=n(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var ne=n(46971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return ne.range}});var re=n(10859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return re.throwError}});var ie=n(55710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var ae=n(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return ae.using}});var oe=n(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return oe.zip}});var se=n(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.scheduled}});var pe=n(51727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return pe.EMPTY}});var ce=n(57423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(n(89251),t);var ue=n(83782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return ue.config}});var le=n(53533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return le.audit}});var de=n(75188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return de.auditTime}});var fe=n(14514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return fe.buffer}});var he=n(22537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var me=n(88720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return me.bufferTime}});var ve=n(67932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var ye=n(41445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var be=n(64418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=n(84163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var we=n(79893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return we.combineLatestAll}});var _e=n(27230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return _e.combineLatestWith}});var xe=n(44554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return xe.concatAll}});var De=n(21048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return De.concatMap}});var Oe=n(50381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Ee=n(84724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Ee.concatWith}});var Se=n(64347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return Se.connect}});var je=n(56944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return je.count}});var ke=n(40440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return ke.debounce}});var Te=n(58157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Te.debounceTime}});var Ne=n(11714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ne.defaultIfEmpty}});var Pe=n(31030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Pe.delay}});var Ce=n(16405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Ce.delayWhen}});var Ae=n(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ae.dematerialize}});var Ie=n(42307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Ie.distinct}});var Fe=n(49131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Fe.distinctUntilChanged}});var Re=n(76659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Re.distinctUntilKeyChanged}});var Me=n(54217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Me.elementAt}});var $e=n(24707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return $e.endWith}});var Be=n(89276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Be.every}});var Le=n(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Ve=n(93977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Ve.exhaustAll}});var qe=n(40368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return qe.exhaustMap}});var Ue=n(47829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ue.expand}});var ze=n(72763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var We=n(44106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return We.finalize}});var Qe=n(68759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Qe.find}});var He=n(23999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return He.findIndex}});var Ke=n(55194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Ke.first}});var Ge=n(21664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ge.groupBy}});var Je=n(13470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Je.ignoreElements}});var Ye=n(49549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Ye.isEmpty}});var Ze=n(79582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=n(14338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=n(24791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=n(49318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var nt=n(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return nt.max}});var rt=n(64594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return rt.mergeAll}});var it=n(92735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var at=n(99010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return at.mergeMap}});var ot=n(38983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return ot.mergeMapTo}});var st=n(72170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.mergeScan}});var pt=n(43674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return pt.mergeWith}});var ct=n(91446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var ut=n(72318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ut.multicast}});var lt=n(23165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return lt.observeOn}});var dt=n(10402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var ft=n(85658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ft.pluck}});var ht=n(23881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var mt=n(41755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return mt.publishBehavior}});var vt=n(99801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var yt=n(65021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return yt.publishReplay}});var bt=n(39925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=n(61386);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var wt=n(51194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return wt.repeat}});var _t=n(47085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return _t.repeatWhen}});var xt=n(67524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return xt.retry}});var Dt=n(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Dt.retryWhen}});var Ot=n(72711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ot.refCount}});var Et=n(76577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Et.sample}});var St=n(43815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return St.sampleTime}});var jt=n(97250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return jt.scan}});var kt=n(20842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return kt.sequenceEqual}});var Tt=n(69728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Tt.share}});var Nt=n(97234);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Nt.shareReplay}});var Pt=n(22445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Pt.single}});var Ct=n(56262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ct.skip}});var At=n(17397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return At.skipLast}});var It=n(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return It.skipUntil}});var Ft=n(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ft.skipWhile}});var Rt=n(13424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Rt.startWith}});var Mt=n(80831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Mt.subscribeOn}});var $t=n(90411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return $t.switchAll}});var Bt=n(97222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Bt.switchMap}});var Lt=n(46464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Vt=n(74434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Vt.switchScan}});var qt=n(17138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return qt.take}});var Ut=n(24288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ut.takeLast}});var zt=n(97341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Wt=n(60653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Wt.takeWhile}});var Qt=n(38668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Qt.tap}});var Ht=n(69466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ht.throttle}});var Kt=n(99705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Kt.throttleTime}});var Gt=n(48062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Gt.throwIfEmpty}});var Jt=n(76610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Jt.timeInterval}});var Yt=n(26279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Yt.timeout}});var Zt=n(28132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=n(74553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var en=n(12378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return en.toArray}});var tn=n(24768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tn.window}});var nn=n(10131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nn.windowCount}});var rn=n(29579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return rn.windowTime}});var an=n(10752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return an.windowToggle}});var on=n(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return on.windowWhen}});var sn=n(44255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sn.withLatestFrom}});var pn=n(87220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return pn.zipAll}});var cn=n(39287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cn.zipWith}})},67257:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t}(n(59520).Subject);t.AsyncSubject=a},58042:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var a=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(n(59520).Subject);t.BehaviorSubject=a},93868:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var r,i=n(51727),a=n(77443),o=n(10859),s=n(64432);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var p=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return"N"===i?null==e?void 0:e(a):"E"===i?null==t?void 0:t(o):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return s.isFunction(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,s="N"===t?a.of(n):"E"===t?o.throwError((function(){return r})):"C"===t?i.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var n,r,i,a=e,o=a.kind,s=a.value,p=a.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(n=t.next)||void 0===n||n.call(t,s):"E"===o?null===(r=t.error)||void 0===r||r.call(t,p):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=p,t.observeNotification=c},33380:(e,t)=>{"use strict";function n(e,t,n){return{kind:e,value:t,error:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=n("C",void 0,void 0),t.errorNotification=function(e){return n("E",void 0,e)},t.nextNotification=function(e){return n("N",e,void 0)},t.createNotification=n},75271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var r=n(11403),i=n(7215),a=n(52138),o=n(25966),s=n(83782),p=n(64432),c=n(34770),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var a,o=this,s=(a=e)&&a instanceof r.Subscriber||function(e){return e&&p.isFunction(e.next)&&p.isFunction(e.error)&&p.isFunction(e.complete)}(a)&&i.isSubscription(a)?e:new r.SafeSubscriber(e,t,n);return c.errorContext((function(){var e=o,t=e.operator,n=e.source;s.add(t?t.call(s,n):n?o._subscribe(s):o._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))((function(t,i){var a=new r.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),a.unsubscribe()}},error:i,complete:t});n.subscribe(a)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[a.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function l(e){var t;return null!==(t=null!=e?e:s.config.Promise)&&void 0!==t?t:Promise}t.Observable=u},30216:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var a=n(59520),o=n(11713),s=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=o.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return i(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,p=1;p<r.length&&r[p]<=o;p+=2)s=p;s&&r.splice(0,s+1)}},t}(a.Subject);t.ReplaySubject=s},3980:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var r=n(11713),i=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=r.dateTimestampProvider.now,e}();t.Scheduler=i},59520:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var o=n(75271),s=n(7215),p=n(7392),c=n(32447),u=n(34770),l=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new p.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;u.errorContext((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=a(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;u.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;u.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?s.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(e),new s.Subscription((function(){t.currentObservers=null,c.arrRemove(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new o.Observable;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(o.Observable);t.Subject=l;var d=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return i(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:s.EMPTY_SUBSCRIPTION},t}(l);t.AnonymousSubject=d},11403:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var a=n(64432),o=n(7215),s=n(83782),p=n(57234),c=n(5729),u=n(33380),l=n(68972),d=n(34770),f=function(e){function n(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,o.isSubscription(n)&&n.add(r)):r.destination=t.EMPTY_OBSERVER,r}return i(n,e),n.create=function(e,t,n){return new y(e,t,n)},n.prototype.next=function(e){this.isStopped?g(u.nextNotification(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?g(u.errorNotification(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?g(u.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(o.Subscription);t.Subscriber=f;var h=Function.prototype.bind;function m(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),y=function(e){function t(t,n,r){var i,o,p=e.call(this)||this;return a.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:p&&s.config.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return p.unsubscribe()},i={next:t.next&&m(t.next,o),error:t.error&&m(t.error,o),complete:t.complete&&m(t.complete,o)}):i=t,p.destination=new v(i),p}return i(t,e),t}(f);function b(e){s.config.useDeprecatedSynchronousErrorHandling?d.captureError(e):p.reportUnhandledError(e)}function g(e,t){var n=s.config.onStoppedNotification;n&&l.timeoutProvider.setTimeout((function(){return n(e,t)}))}t.SafeSubscriber=y,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var o=n(64432),s=n(35463),p=n(32447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,p,c;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var d=r(l),f=d.next();!f.done;f=d.next())f.value.remove(this)}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if(o.isFunction(h))try{h()}catch(e){c=e instanceof s.UnsubscriptionError?e.errors:[e]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var v=r(m),y=v.next();!y.done;y=v.next()){var b=y.value;try{u(b)}catch(e){c=null!=c?c:[],e instanceof s.UnsubscriptionError?c=a(a([],i(c)),i(e.errors)):c.push(e)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(p=v.return)&&p.call(v)}finally{if(n)throw n.error}}}if(c)throw new s.UnsubscriptionError(c)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&p.arrRemove(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&p.arrRemove(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function u(e){o.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&o.isFunction(e.remove)&&o.isFunction(e.add)&&o.isFunction(e.unsubscribe)}},83782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},17447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var r=n(68032),i=n(11403);t.firstValueFrom=function(e,t){var n="object"==typeof t;return new Promise((function(a,o){var s=new i.SafeSubscriber({next:function(e){a(e),s.unsubscribe()},error:o,complete:function(){n?a(t.defaultValue):o(new r.EmptyError)}});e.subscribe(s)}))}},1263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var r=n(68032);t.lastValueFrom=function(e,t){var n="object"==typeof t;return new Promise((function(i,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?i(o):n?i(t.defaultValue):a(new r.EmptyError)}})}))}},93739:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var a=n(75271),o=n(7215),s=n(72711),p=n(35079),c=n(64024),u=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,c.hasLift(t)&&(r.lift=t.lift),r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new o.Subscription;var n=this.getSubject();t.add(this.source.subscribe(p.createOperatorSubscriber(n,void 0,(function(){e._teardown(),n.complete()}),(function(t){e._teardown(),n.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=o.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return s.refCount()(this)},t}(a.Observable);t.ConnectableObservable=u},31253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var r=n(46414);t.bindCallback=function(e,t,n){return r.bindCallbackInternals(!1,e,t,n)}},46414:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var a=n(76551),o=n(75271),s=n(80831),p=n(74666),c=n(23165),u=n(67257);t.bindCallbackInternals=function e(t,n,l,d){if(l){if(!a.isScheduler(l))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e(t,n,d).apply(this,r).pipe(p.mapOneOrManyArgs(l))};d=l}return d?function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e(t,n).apply(this,r).pipe(s.subscribeOn(d),c.observeOn(d))}:function(){for(var e=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var p=new u.AsyncSubject,c=!0;return new o.Observable((function(o){var s=p.subscribe(o);if(c){c=!1;var u=!1,l=!1;n.apply(e,i(i([],r(a)),[function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t){var r=e.shift();if(null!=r)return void p.error(r)}p.next(1<e.length?e:e[0]),l=!0,u&&p.complete()}])),l&&p.complete(),u=!0}return s}))}}},61009:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var r=n(46414);t.bindNodeCallback=function(e,t,n){return r.bindCallbackInternals(!0,e,t,n)}},21047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var r=n(75271),i=n(14744),a=n(76216),o=n(69144),s=n(74666),p=n(92619),c=n(51589),u=n(35079),l=n(35421);function d(e,t,n){return void 0===n&&(n=o.identity),function(r){f(t,(function(){for(var i=e.length,o=new Array(i),s=i,p=i,c=function(i){f(t,(function(){var c=a.from(e[i],t),l=!1;c.subscribe(u.createOperatorSubscriber(r,(function(e){o[i]=e,l||(l=!0,p--),p||r.next(n(o.slice()))}),(function(){--s||r.complete()})))}),r)},l=0;l<i;l++)c(l)}),r)}}function f(e,t,n){e?l.executeSchedule(n,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=p.popScheduler(e),u=p.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,h=l.keys;if(0===f.length)return a.from([],n);var m=new r.Observable(d(f,n,h?function(e){return c.createObject(h,e)}:o.identity));return u?m.pipe(s.mapOneOrManyArgs(u)):m},t.combineLatestInit=d},60079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var r=n(44554),i=n(92619),a=n(76216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.concatAll()(a.from(e,i.popScheduler(e)))}},31663:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var r=n(59520),i=n(75271),a=n(65401),o={connector:function(){return new r.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=o);var n=null,r=t.connector,s=t.resetOnDisconnect,p=void 0===s||s,c=r(),u=new i.Observable((function(e){return c.subscribe(e)}));return u.connect=function(){return n&&!n.closed||(n=a.defer((function(){return e})).subscribe(c),p&&n.add((function(){return c=r()}))),n},u}},65401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var r=n(75271),i=n(9451);t.defer=function(e){return new r.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var r=n(75271),i=n(81241),a=n(76741);function o(e){return new r.Observable((function(t){var n=e||i.performanceTimestampProvider,r=n.now(),o=0,s=function(){t.closed||(o=a.animationFrameProvider.requestAnimationFrame((function(i){o=0;var a=n.now();t.next({timestamp:e?a:i,elapsed:a-r}),s()})))};return s(),function(){o&&a.animationFrameProvider.cancelAnimationFrame(o)}}))}t.animationFrames=function(e){return e?o(e):s};var s=o()},51727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var r=n(75271);t.EMPTY=new r.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new r.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var r=n(75271),i=n(14744),a=n(9451),o=n(92619),s=n(35079),p=n(74666),c=n(51589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.popResultSelector(e),u=i.argsArgArrayOrObject(e),l=u.args,d=u.keys,f=new r.Observable((function(e){var t=l.length;if(t)for(var n=new Array(t),r=t,i=t,o=function(t){var o=!1;a.innerFrom(l[t]).subscribe(s.createOperatorSubscriber(e,(function(e){o||(o=!0,i--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&o||(i||e.next(d?c.createObject(d,n):n),e.complete())})))},p=0;p<t;p++)o(p);else e.complete()}));return n?f.pipe(p.mapOneOrManyArgs(n)):f}},76216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var r=n(3200),i=n(9451);t.from=function(e,t){return t?r.scheduled(e,t):i.innerFrom(e)}},96767:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=n(9451),a=n(75271),o=n(99010),s=n(38219),p=n(64432),c=n(74666),u=["addListener","removeListener"],l=["addEventListener","removeEventListener"],d=["on","off"];function f(e,t){return function(n){return function(r){return e[n](t,r)}}}t.fromEvent=function e(t,n,h,m){if(p.isFunction(h)&&(m=h,h=void 0),m)return e(t,n,h).pipe(c.mapOneOrManyArgs(m));var v=r(function(e){return p.isFunction(e.addEventListener)&&p.isFunction(e.removeEventListener)}(t)?l.map((function(e){return function(r){return t[e](n,r,h)}})):function(e){return p.isFunction(e.addListener)&&p.isFunction(e.removeListener)}(t)?u.map(f(t,n)):function(e){return p.isFunction(e.on)&&p.isFunction(e.off)}(t)?d.map(f(t,n)):[],2),y=v[0],b=v[1];if(!y&&s.isArrayLike(t))return o.mergeMap((function(t){return e(t,n,h)}))(i.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new a.Observable((function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return y(t),function(){return b(t)}}))}},94366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var r=n(75271),i=n(64432),a=n(74666);t.fromEventPattern=function e(t,n,o){return o?e(t,n).pipe(a.mapOneOrManyArgs(o)):new r.Observable((function(e){var r=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1===t.length?t[0]:t)},a=t(r);return i.isFunction(n)?function(){return n(r,a)}:void 0}))}},52160:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var r=n(75271);t.fromSubscribable=function(e){return new r.Observable((function(t){return e.subscribe(t)}))}},76103:function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=n(69144),a=n(76551),o=n(65401),s=n(78840);t.generate=function(e,t,n,p,c){var u,l,d,f;function h(){var e;return r(this,(function(r){switch(r.label){case 0:e=f,r.label=1;case 1:return t&&!t(e)?[3,4]:[4,d(e)];case 2:r.sent(),r.label=3;case 3:return e=n(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(f=(u=e).initialState,t=u.condition,n=u.iterate,l=u.resultSelector,d=void 0===l?i.identity:l,c=u.scheduler):(f=e,!p||a.isScheduler(p)?(d=i.identity,c=p):d=p),o.defer(c?function(){return s.scheduleIterable(h(),c)}:h)}},84468:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var r=n(65401);t.iif=function(e,t,n){return r.defer((function(){return e()?t:n}))}},9451:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},a=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof o?o(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var s=n(38219),p=n(52644),c=n(75271),u=n(3292),l=n(57707),d=n(54883),f=n(6380),h=n(49266),m=n(64432),v=n(57234),y=n(52138);function b(e){return new c.Observable((function(t){var n=e[y.observable]();if(m.isFunction(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()}))}function w(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function _(e){return new c.Observable((function(t){var n,r;try{for(var i=o(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.next(s),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()}))}function x(e){return new c.Observable((function(t){(function(e,t){var n,o,s,p;return r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),n=a(e),i.label=1;case 1:return[4,n.next()];case 2:if((o=i.sent()).done)return[3,4];if(r=o.value,t.next(r),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),s={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),o&&!o.done&&(p=n.return)?[4,p.call(n)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function D(e){return x(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(u.isInteropObservable(e))return b(e);if(s.isArrayLike(e))return g(e);if(p.isPromise(e))return w(e);if(l.isAsyncIterable(e))return x(e);if(f.isIterable(e))return _(e);if(h.isReadableStreamLike(e))return D(e)}throw d.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=w,t.fromIterable=_,t.fromAsyncIterable=x,t.fromReadableStreamLike=D},24449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var r=n(34617),i=n(55710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=r.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},35847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var r=n(64594),i=n(9451),a=n(51727),o=n(92619),s=n(76216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.popScheduler(e),p=o.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):r.mergeAll(p)(s.from(c,n)):a.EMPTY}},57423:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var r=n(75271),i=n(5729);t.NEVER=new r.Observable(i.noop),t.never=function(){return t.NEVER}},77443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var r=n(92619),i=n(76216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.popScheduler(e);return i.from(e,n)}},91282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var r=n(51727),i=n(64764),a=n(64475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(a.argsOrArgArray(e))(r.EMPTY)}},6741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var r=n(76216);t.pairs=function(e,t){return r.from(Object.entries(e),t)}},91945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(91574),i=n(72763),a=n(9451);t.partition=function(e,t,n){return[i.filter(t,n)(a.innerFrom(e)),i.filter(r.not(t,n))(a.innerFrom(e))]}},7779:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var r=n(75271),i=n(9451),a=n(64475),o=n(35079);function s(e){return function(t){for(var n=[],r=function(r){n.push(i.innerFrom(e[r]).subscribe(o.createOperatorSubscriber(t,(function(e){if(n){for(var i=0;i<n.length;i++)i!==r&&n[i].unsubscribe();n=null}t.next(e)}))))},a=0;n&&!t.closed&&a<e.length;a++)r(a)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=a.argsOrArgArray(e)).length?i.innerFrom(e[0]):new r.Observable(s(e))},t.raceInit=s},46971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var r=n(75271),i=n(51727);t.range=function(e,t,n){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var a=t+e;return new r.Observable(n?function(t){var r=e;return n.schedule((function(){r<a?(t.next(r++),this.schedule()):t.complete()}))}:function(t){for(var n=e;n<a&&!t.closed;)t.next(n++);t.complete()})}},10859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var r=n(75271),i=n(64432);t.throwError=function(e,t){var n=i.isFunction(e)?e:function(){return e},a=function(e){return e.error(n())};return new r.Observable(t?function(e){return t.schedule(a,0,e)}:a)}},55710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var r=n(75271),i=n(34617),a=n(76551),o=n(47761);t.timer=function(e,t,n){void 0===e&&(e=0),void 0===n&&(n=i.async);var s=-1;return null!=t&&(a.isScheduler(t)?n=t:s=t),new r.Observable((function(t){var r=o.isValidDate(e)?+e-n.now():e;r<0&&(r=0);var i=0;return n.schedule((function(){t.closed||(t.next(i++),0<=s?this.schedule(void 0,s):t.complete())}),r)}))}},3687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var r=n(75271),i=n(9451),a=n(51727);t.using=function(e,t){return new r.Observable((function(n){var r=e(),o=t(r);return(o?i.innerFrom(o):a.EMPTY).subscribe(n),function(){r&&r.unsubscribe()}}))}},2042:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var a=n(75271),o=n(9451),s=n(64475),p=n(51727),c=n(35079),u=n(92619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u.popResultSelector(e),l=s.argsOrArgArray(e);return l.length?new a.Observable((function(e){var t=l.map((function(){return[]})),a=l.map((function(){return!1}));e.add((function(){t=a=null}));for(var s=function(s){o.innerFrom(l[s]).subscribe(c.createOperatorSubscriber(e,(function(o){if(t[s].push(o),t.every((function(e){return e.length}))){var p=t.map((function(e){return e.shift()}));e.next(n?n.apply(void 0,i([],r(p))):p),t.some((function(e,t){return!e.length&&a[t]}))&&e.complete()}}),(function(){a[s]=!0,!t[s].length&&e.complete()})))},p=0;!e.closed&&p<l.length;p++)s(p);return function(){t=a=null}})):p.EMPTY}},35079:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var a=n(11403);t.createOperatorSubscriber=function(e,t,n,r,i){return new o(e,t,n,r,i)};var o=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(a.Subscriber);t.OperatorSubscriber=o},53533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var r=n(64024),i=n(9451),a=n(35079);t.audit=function(e){return r.operate((function(t,n){var r=!1,o=null,s=null,p=!1,c=function(){if(null==s||s.unsubscribe(),s=null,r){r=!1;var e=o;o=null,n.next(e)}p&&n.complete()},u=function(){s=null,p&&n.complete()};t.subscribe(a.createOperatorSubscriber(n,(function(t){r=!0,o=t,s||i.innerFrom(e(t)).subscribe(s=a.createOperatorSubscriber(n,c,u))}),(function(){p=!0,(!r||!s||s.closed)&&n.complete()})))}))}},75188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var r=n(34617),i=n(53533),a=n(55710);t.auditTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.audit((function(){return a.timer(e,t)}))}},14514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var r=n(64024),i=n(5729),a=n(35079);t.buffer=function(e){return r.operate((function(t,n){var r=[];return t.subscribe(a.createOperatorSubscriber(n,(function(e){return r.push(e)}),(function(){n.next(r),n.complete()}))),e.subscribe(a.createOperatorSubscriber(n,(function(){var e=r;r=[],n.next(e)}),i.noop)),function(){r=null}}))}},22537:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=n(64024),a=n(35079),o=n(32447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(n,i){var s=[],p=0;n.subscribe(a.createOperatorSubscriber(i,(function(n){var a,c,u,l,d=null;p++%t==0&&s.push([]);try{for(var f=r(s),h=f.next();!h.done;h=f.next())(y=h.value).push(n),e<=y.length&&(d=null!=d?d:[]).push(y)}catch(e){a={error:e}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}if(d)try{for(var m=r(d),v=m.next();!v.done;v=m.next()){var y=v.value;o.arrRemove(s,y),i.next(y)}}catch(e){u={error:e}}finally{try{v&&!v.done&&(l=m.return)&&l.call(m)}finally{if(u)throw u.error}}}),(function(){var e,t;try{for(var n=r(s),a=n.next();!a.done;a=n.next()){var o=a.value;i.next(o)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){s=null})))}))}},88720:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=n(7215),a=n(64024),o=n(35079),s=n(32447),p=n(34617),c=n(92619),u=n(35421);t.bufferTime=function(e){for(var t,n,l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];var f=null!==(t=c.popScheduler(l))&&void 0!==t?t:p.asyncScheduler,h=null!==(n=l[0])&&void 0!==n?n:null,m=l[1]||1/0;return a.operate((function(t,n){var a=[],p=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),s.arrRemove(a,e),n.next(t),p&&l()},l=function(){if(a){var t=new i.Subscription;n.add(t);var r={buffer:[],subs:t};a.push(r),u.executeSchedule(t,f,(function(){return c(r)}),e)}};null!==h&&h>=0?u.executeSchedule(n,f,l,h,!0):p=!0,l();var d=o.createOperatorSubscriber(n,(function(e){var t,n,i=a.slice();try{for(var o=r(i),s=o.next();!s.done;s=o.next()){var p=s.value,u=p.buffer;u.push(e),m<=u.length&&c(p)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}),(function(){for(;null==a?void 0:a.length;)n.next(a.shift().buffer);null==d||d.unsubscribe(),n.complete(),n.unsubscribe()}),void 0,(function(){return a=null}));t.subscribe(d)}))}},67932:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=n(7215),a=n(64024),o=n(9451),s=n(35079),p=n(5729),c=n(32447);t.bufferToggle=function(e,t){return a.operate((function(n,a){var u=[];o.innerFrom(e).subscribe(s.createOperatorSubscriber(a,(function(e){var n=[];u.push(n);var r=new i.Subscription;r.add(o.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(a,(function(){c.arrRemove(u,n),a.next(n),r.unsubscribe()}),p.noop)))}),p.noop)),n.subscribe(s.createOperatorSubscriber(a,(function(e){var t,n;try{for(var i=r(u),a=i.next();!a.done;a=i.next())a.value.push(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),(function(){for(;u.length>0;)a.next(u.shift());a.complete()})))}))}},41445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var r=n(64024),i=n(5729),a=n(35079),o=n(9451);t.bufferWhen=function(e){return r.operate((function(t,n){var r=null,s=null,p=function(){null==s||s.unsubscribe();var t=r;r=[],t&&n.next(t),o.innerFrom(e()).subscribe(s=a.createOperatorSubscriber(n,p,i.noop))};p(),t.subscribe(a.createOperatorSubscriber(n,(function(e){return null==r?void 0:r.push(e)}),(function(){r&&n.next(r),n.complete()}),void 0,(function(){return r=s=null})))}))}},64418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var r=n(9451),i=n(35079),a=n(64024);t.catchError=function e(t){return a.operate((function(n,a){var o,s=null,p=!1;s=n.subscribe(i.createOperatorSubscriber(a,void 0,void 0,(function(i){o=r.innerFrom(t(i,e(t)(n))),s?(s.unsubscribe(),s=null,o.subscribe(a)):p=!0}))),p&&(s.unsubscribe(),s=null,o.subscribe(a))}))}},84163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var r=n(79893);t.combineAll=r.combineLatestAll},48169:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var a=n(21047),o=n(64024),s=n(64475),p=n(74666),c=n(25966),u=n(92619);t.combineLatest=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var l=u.popResultSelector(t);return l?c.pipe(e.apply(void 0,i([],r(t))),p.mapOneOrManyArgs(l)):o.operate((function(e,n){a.combineLatestInit(i([e],r(s.argsOrArgArray(t))))(n)}))}},79893:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var r=n(21047),i=n(87534);t.combineLatestAll=function(e){return i.joinAllInternals(r.combineLatest,e)}},27230:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var a=n(48169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.combineLatest.apply(void 0,i([],r(e)))}},84098:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var a=n(64024),o=n(44554),s=n(92619),p=n(76216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=s.popScheduler(e);return a.operate((function(t,a){o.concatAll()(p.from(i([t],r(e)),n)).subscribe(a)}))}},44554:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var r=n(64594);t.concatAll=function(){return r.mergeAll(1)}},21048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var r=n(99010),i=n(64432);t.concatMap=function(e,t){return i.isFunction(t)?r.mergeMap(e,t,1):r.mergeMap(e,1)}},50381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var r=n(21048),i=n(64432);t.concatMapTo=function(e,t){return i.isFunction(t)?r.concatMap((function(){return e}),t):r.concatMap((function(){return e}))}},84724:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var a=n(84098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.concat.apply(void 0,i([],r(e)))}},64347:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var r=n(59520),i=n(9451),a=n(64024),o=n(52160),s={connector:function(){return new r.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var n=t.connector;return a.operate((function(t,r){var a=n();i.innerFrom(e(o.fromSubscribable(a))).subscribe(r),r.add(t.subscribe(a))}))}},56944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var r=n(61386);t.count=function(e){return r.reduce((function(t,n,r){return!e||e(n,r)?t+1:t}),0)}},40440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var r=n(64024),i=n(5729),a=n(35079),o=n(9451);t.debounce=function(e){return r.operate((function(t,n){var r=!1,s=null,p=null,c=function(){if(null==p||p.unsubscribe(),p=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(a.createOperatorSubscriber(n,(function(t){null==p||p.unsubscribe(),r=!0,s=t,p=a.createOperatorSubscriber(n,c,i.noop),o.innerFrom(e(t)).subscribe(p)}),(function(){c(),n.complete()}),void 0,(function(){s=p=null})))}))}},58157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var r=n(34617),i=n(64024),a=n(35079);t.debounceTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.operate((function(n,r){var i=null,o=null,s=null,p=function(){if(i){i.unsubscribe(),i=null;var e=o;o=null,r.next(e)}};function c(){var n=s+e,a=t.now();if(a<n)return i=this.schedule(void 0,n-a),void r.add(i);p()}n.subscribe(a.createOperatorSubscriber(r,(function(n){o=n,s=t.now(),i||(i=t.schedule(c,e),r.add(i))}),(function(){p(),r.complete()}),void 0,(function(){o=i=null})))}))}},11714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var r=n(64024),i=n(35079);t.defaultIfEmpty=function(e){return r.operate((function(t,n){var r=!1;t.subscribe(i.createOperatorSubscriber(n,(function(e){r=!0,n.next(e)}),(function(){r||n.next(e),n.complete()})))}))}},31030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var r=n(34617),i=n(16405),a=n(55710);t.delay=function(e,t){void 0===t&&(t=r.asyncScheduler);var n=a.timer(e,t);return i.delayWhen((function(){return n}))}},16405:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var r=n(60079),i=n(17138),a=n(13470),o=n(24791),s=n(99010);t.delayWhen=function e(t,n){return n?function(o){return r.concat(n.pipe(i.take(1),a.ignoreElements()),o.pipe(e(t)))}:s.mergeMap((function(e,n){return t(e,n).pipe(i.take(1),o.mapTo(e))}))}},9142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var r=n(93868),i=n(64024),a=n(35079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(a.createOperatorSubscriber(t,(function(e){return r.observeNotification(e,t)})))}))}},42307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var r=n(64024),i=n(35079),a=n(5729);t.distinct=function(e,t){return r.operate((function(n,r){var o=new Set;n.subscribe(i.createOperatorSubscriber(r,(function(t){var n=e?e(t):t;o.has(n)||(o.add(n),r.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(r,(function(){return o.clear()}),a.noop))}))}},49131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var r=n(69144),i=n(64024),a=n(35079);function o(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=r.identity),e=null!=e?e:o,i.operate((function(n,r){var i,o=!0;n.subscribe(a.createOperatorSubscriber(r,(function(n){var a=t(n);!o&&e(i,a)||(o=!1,i=a,r.next(n))})))}))}},76659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var r=n(49131);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}},54217:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var r=n(56809),i=n(72763),a=n(48062),o=n(11714),s=n(17138);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(p){return p.pipe(i.filter((function(t,n){return n===e})),s.take(1),n?o.defaultIfEmpty(t):a.throwIfEmpty((function(){return new r.ArgumentOutOfRangeError})))}}},24707:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var a=n(60079),o=n(77443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return a.concat(t,o.of.apply(void 0,i([],r(e))))}}},89276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var r=n(64024),i=n(35079);t.every=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(i){e.call(t,i,a++,n)||(r.next(!1),r.complete())}),(function(){r.next(!0),r.complete()})))}))}},337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var r=n(93977);t.exhaust=r.exhaustAll},93977:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var r=n(40368),i=n(69144);t.exhaustAll=function(){return r.exhaustMap(i.identity)}},40368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var r=n(14338),i=n(9451),a=n(64024),o=n(35079);t.exhaustMap=function e(t,n){return n?function(a){return a.pipe(e((function(e,a){return i.innerFrom(t(e,a)).pipe(r.map((function(t,r){return n(e,t,a,r)})))})))}:a.operate((function(e,n){var r=0,a=null,s=!1;e.subscribe(o.createOperatorSubscriber(n,(function(e){a||(a=o.createOperatorSubscriber(n,void 0,(function(){a=null,s&&n.complete()})),i.innerFrom(t(e,r++)).subscribe(a))}),(function(){s=!0,!a&&n.complete()})))}))}},47829:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var r=n(64024),i=n(67163);t.expand=function(e,t,n){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,r.operate((function(r,a){return i.mergeInternals(r,a,e,t,void 0,!0,n)}))}},72763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var r=n(64024),i=n(35079);t.filter=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){return e.call(t,n,a++)&&r.next(n)})))}))}},44106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var r=n(64024);t.finalize=function(e){return r.operate((function(t,n){try{t.subscribe(n)}finally{n.add(e)}}))}},68759:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var r=n(64024),i=n(35079);function a(e,t,n){var r="index"===n;return function(n,a){var o=0;n.subscribe(i.createOperatorSubscriber(a,(function(i){var s=o++;e.call(t,i,s,n)&&(a.next(r?s:i),a.complete())}),(function(){a.next(r?-1:void 0),a.complete()})))}}t.find=function(e,t){return r.operate(a(e,t,"value"))},t.createFind=a},23999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var r=n(64024),i=n(68759);t.findIndex=function(e,t){return r.operate(i.createFind(e,t,"index"))}},55194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var r=n(68032),i=n(72763),a=n(17138),o=n(11714),s=n(48062),p=n(69144);t.first=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,n){return e(t,n,c)})):p.identity,a.take(1),n?o.defaultIfEmpty(t):s.throwIfEmpty((function(){return new r.EmptyError})))}}},92735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var r=n(99010);t.flatMap=r.mergeMap},21664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var r=n(75271),i=n(9451),a=n(59520),o=n(64024),s=n(35079);t.groupBy=function(e,t,n,p){return o.operate((function(o,c){var u;t&&"function"!=typeof t?(n=t.duration,u=t.element,p=t.connector):u=t;var l=new Map,d=function(e){l.forEach(e),e(c)},f=function(e){return d((function(t){return t.error(e)}))},h=0,m=!1,v=new s.OperatorSubscriber(c,(function(t){try{var o=e(t),d=l.get(o);if(!d){l.set(o,d=p?p():new a.Subject);var y=(g=o,w=d,(_=new r.Observable((function(e){h++;var t=w.subscribe(e);return function(){t.unsubscribe(),0==--h&&m&&v.unsubscribe()}}))).key=g,_);if(c.next(y),n){var b=s.createOperatorSubscriber(d,(function(){d.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return l.delete(o)}));v.add(i.innerFrom(n(y)).subscribe(b))}}d.next(u?u(t):t)}catch(e){f(e)}var g,w,_}),(function(){return d((function(e){return e.complete()}))}),f,(function(){return l.clear()}),(function(){return m=!0,0===h}));o.subscribe(v)}))}},13470:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var r=n(64024),i=n(35079),a=n(5729);t.ignoreElements=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,a.noop))}))}},49549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var r=n(64024),i=n(35079);t.isEmpty=function(){return r.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},87534:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var r=n(69144),i=n(74666),a=n(25966),o=n(99010),s=n(12378);t.joinAllInternals=function(e,t){return a.pipe(s.toArray(),o.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):r.identity)}},79582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var r=n(68032),i=n(72763),a=n(24288),o=n(48062),s=n(11714),p=n(69144);t.last=function(e,t){var n=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,n){return e(t,n,c)})):p.identity,a.takeLast(1),n?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new r.EmptyError})))}}},14338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var r=n(64024),i=n(35079);t.map=function(e,t){return r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){r.next(e.call(t,n,a++))})))}))}},24791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var r=n(14338);t.mapTo=function(e){return r.map((function(){return e}))}},49318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var r=n(93868),i=n(64024),a=n(35079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(a.createOperatorSubscriber(t,(function(e){t.next(r.Notification.createNext(e))}),(function(){t.next(r.Notification.createComplete()),t.complete()}),(function(e){t.next(r.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var r=n(61386),i=n(64432);t.max=function(e){return r.reduce(i.isFunction(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}},86094:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var a=n(64024),o=n(64475),s=n(64594),p=n(92619),c=n(76216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=p.popScheduler(e),u=p.popNumber(e,1/0);return e=o.argsOrArgArray(e),a.operate((function(t,a){s.mergeAll(u)(c.from(i([t],r(e)),n)).subscribe(a)}))}},64594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var r=n(99010),i=n(69144);t.mergeAll=function(e){return void 0===e&&(e=1/0),r.mergeMap(i.identity,e)}},67163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var r=n(9451),i=n(35421),a=n(35079);t.mergeInternals=function(e,t,n,o,s,p,c,u){var l=[],d=0,f=0,h=!1,m=function(){!h||l.length||d||t.complete()},v=function(e){return d<o?y(e):l.push(e)},y=function(e){p&&t.next(e),d++;var u=!1;r.innerFrom(n(e,f++)).subscribe(a.createOperatorSubscriber(t,(function(e){null==s||s(e),p?v(e):t.next(e)}),(function(){u=!0}),void 0,(function(){if(u)try{d--;for(var e=function(){var e=l.shift();c?i.executeSchedule(t,c,(function(){return y(e)})):y(e)};l.length&&d<o;)e();m()}catch(e){t.error(e)}})))};return e.subscribe(a.createOperatorSubscriber(t,v,(function(){h=!0,m()}))),function(){null==u||u()}}},99010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var r=n(14338),i=n(9451),a=n(64024),o=n(67163),s=n(64432);t.mergeMap=function e(t,n,p){return void 0===p&&(p=1/0),s.isFunction(n)?e((function(e,a){return r.map((function(t,r){return n(e,t,a,r)}))(i.innerFrom(t(e,a)))}),p):("number"==typeof n&&(p=n),a.operate((function(e,n){return o.mergeInternals(e,n,t,p)})))}},38983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var r=n(99010),i=n(64432);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=1/0),i.isFunction(t)?r.mergeMap((function(){return e}),t,n):("number"==typeof t&&(n=t),r.mergeMap((function(){return e}),n))}},72170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var r=n(64024),i=n(67163);t.mergeScan=function(e,t,n){return void 0===n&&(n=1/0),r.operate((function(r,a){var o=t;return i.mergeInternals(r,a,(function(t,n){return e(o,t,n)}),n,(function(e){o=e}),!1,void 0,(function(){return o=null}))}))}},43674:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var a=n(86094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.merge.apply(void 0,i([],r(e)))}},91446:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var r=n(61386),i=n(64432);t.min=function(e){return r.reduce(i.isFunction(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}},72318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var r=n(93739),i=n(64432),a=n(64347);t.multicast=function(e,t){var n=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?a.connect(t,{connector:n}):function(e){return new r.ConnectableObservable(e,n)}}},23165:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var r=n(35421),i=n(64024),a=n(35079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(n,i){n.subscribe(a.createOperatorSubscriber(i,(function(n){return r.executeSchedule(i,e,(function(){return i.next(n)}),t)}),(function(){return r.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(n){return r.executeSchedule(i,e,(function(){return i.error(n)}),t)})))}))}},64764:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var a=n(64024),o=n(9451),s=n(64475),p=n(35079),c=n(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=s.argsOrArgArray(e);return a.operate((function(e,t){var a=i([e],r(n)),s=function(){if(!t.closed)if(a.length>0){var e=void 0;try{e=o.innerFrom(a.shift())}catch(e){return void s()}var n=p.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(n),n.add(s)}else t.complete()};s()}))}},10402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var r=n(64024),i=n(35079);t.pairwise=function(){return r.operate((function(e,t){var n,r=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=n;n=e,r&&t.next([i,e]),r=!0})))}))}},85960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var r=n(91574),i=n(72763);t.partition=function(e,t){return function(n){return[i.filter(e,t)(n),i.filter(r.not(e,t))(n)]}}},85658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var r=n(14338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return r.map((function(t){for(var r=t,i=0;i<n;i++){var a=null==r?void 0:r[e[i]];if(void 0===a)return;r=a}return r}))}},23881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var r=n(59520),i=n(72318),a=n(64347);t.publish=function(e){return e?function(t){return a.connect(e)(t)}:function(e){return i.multicast(new r.Subject)(e)}}},41755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var r=n(58042),i=n(93739);t.publishBehavior=function(e){return function(t){var n=new r.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return n}))}}},99801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var r=n(67257),i=n(93739);t.publishLast=function(){return function(e){var t=new r.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},65021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var r=n(30216),i=n(72318),a=n(64432);t.publishReplay=function(e,t,n,o){n&&!a.isFunction(n)&&(o=n);var s=a.isFunction(n)?n:void 0;return function(n){return i.multicast(new r.ReplaySubject(e,t,o),s)(n)}}},62749:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var a=n(64475),o=n(39925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.raceWith.apply(void 0,i([],r(a.argsOrArgArray(e))))}},39925:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var a=n(7779),o=n(64024),s=n(69144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?o.operate((function(t,n){a.raceInit(i([t],r(e)))(n)})):s.identity}},61386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var r=n(42181),i=n(64024);t.reduce=function(e,t){return i.operate(r.scanInternals(e,t,arguments.length>=2,!1,!0))}},72711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var r=n(64024),i=n(35079);t.refCount=function(){return r.operate((function(e,t){var n=null;e._refCount++;var r=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var r=e._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),t.unsubscribe()}}));e.subscribe(r),r.closed||(n=e.connect())}))}},51194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var r=n(51727),i=n(64024),a=n(35079),o=n(9451),s=n(55710);t.repeat=function(e){var t,n,p=1/0;return null!=e&&("object"==typeof e?(t=e.count,p=void 0===t?1/0:t,n=e.delay):p=e),p<=0?function(){return r.EMPTY}:i.operate((function(e,t){var r,i=0,c=function(){if(null==r||r.unsubscribe(),r=null,null!=n){var e="number"==typeof n?s.timer(n):o.innerFrom(n(i)),p=a.createOperatorSubscriber(t,(function(){p.unsubscribe(),u()}));e.subscribe(p)}else u()},u=function(){var n=!1;r=e.subscribe(a.createOperatorSubscriber(t,void 0,(function(){++i<p?r?c():n=!0:t.complete()}))),n&&c()};u()}))}},47085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var r=n(59520),i=n(64024),a=n(35079);t.repeatWhen=function(e){return i.operate((function(t,n){var i,o,s=!1,p=!1,c=!1,u=function(){return c&&p&&(n.complete(),!0)},l=function(){c=!1,i=t.subscribe(a.createOperatorSubscriber(n,void 0,(function(){c=!0,!u()&&(o||(o=new r.Subject,e(o).subscribe(a.createOperatorSubscriber(n,(function(){i?l():s=!0}),(function(){p=!0,u()})))),o).next()}))),s&&(i.unsubscribe(),i=null,s=!1,l())};l()}))}},67524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var r=n(64024),i=n(35079),a=n(69144),o=n(55710),s=n(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var n=(t=e&&"object"==typeof e?e:{count:e}).count,p=void 0===n?1/0:n,c=t.delay,u=t.resetOnSuccess,l=void 0!==u&&u;return p<=0?a.identity:r.operate((function(e,t){var n,r=0,a=function(){var u=!1;n=e.subscribe(i.createOperatorSubscriber(t,(function(e){l&&(r=0),t.next(e)}),void 0,(function(e){if(r++<p){var l=function(){n?(n.unsubscribe(),n=null,a()):u=!0};if(null!=c){var d="number"==typeof c?o.timer(c):s.innerFrom(c(e,r)),f=i.createOperatorSubscriber(t,(function(){f.unsubscribe(),l()}),(function(){t.complete()}));d.subscribe(f)}else l()}else t.error(e)}))),u&&(n.unsubscribe(),n=null,a())};a()}))}},548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var r=n(59520),i=n(64024),a=n(35079);t.retryWhen=function(e){return i.operate((function(t,n){var i,o,s=!1,p=function(){i=t.subscribe(a.createOperatorSubscriber(n,void 0,void 0,(function(t){o||(o=new r.Subject,e(o).subscribe(a.createOperatorSubscriber(n,(function(){return i?p():s=!0})))),o&&o.next(t)}))),s&&(i.unsubscribe(),i=null,s=!1,p())};p()}))}},76577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var r=n(64024),i=n(5729),a=n(35079);t.sample=function(e){return r.operate((function(t,n){var r=!1,o=null;t.subscribe(a.createOperatorSubscriber(n,(function(e){r=!0,o=e}))),e.subscribe(a.createOperatorSubscriber(n,(function(){if(r){r=!1;var e=o;o=null,n.next(e)}}),i.noop))}))}},43815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var r=n(34617),i=n(76577),a=n(24449);t.sampleTime=function(e,t){return void 0===t&&(t=r.asyncScheduler),i.sample(a.interval(e,t))}},97250:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var r=n(64024),i=n(42181);t.scan=function(e,t){return r.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},42181:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var r=n(35079);t.scanInternals=function(e,t,n,i,a){return function(o,s){var p=n,c=t,u=0;o.subscribe(r.createOperatorSubscriber(s,(function(t){var n=u++;c=p?e(c,t,n):(p=!0,t),i&&s.next(c)}),a&&function(){p&&s.next(c),s.complete()}))}}},20842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var r=n(64024),i=n(35079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),r.operate((function(n,r){var a={buffer:[],complete:!1},o={buffer:[],complete:!1},s=function(e){r.next(e),r.complete()},p=function(e,n){var a=i.createOperatorSubscriber(r,(function(r){var i=n.buffer,a=n.complete;0===i.length?a?s(!1):e.buffer.push(r):!t(r,i.shift())&&s(!1)}),(function(){e.complete=!0;var t=n.complete,r=n.buffer;t&&s(0===r.length),null==a||a.unsubscribe()}));return a};n.subscribe(p(a,o)),e.subscribe(p(o,a))}))}},69728:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var a=n(9451),o=n(59520),s=n(11403),p=n(64024);function c(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];if(!0!==t){if(!1!==t){var o=new s.SafeSubscriber({next:function(){o.unsubscribe(),e()}});return t.apply(void 0,i([],r(n))).subscribe(o)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new o.Subject}:t,r=e.resetOnError,i=void 0===r||r,u=e.resetOnComplete,l=void 0===u||u,d=e.resetOnRefCountZero,f=void 0===d||d;return function(e){var t,r,o,u=0,d=!1,h=!1,m=function(){null==r||r.unsubscribe(),r=void 0},v=function(){m(),t=o=void 0,d=h=!1},y=function(){var e=t;v(),null==e||e.unsubscribe()};return p.operate((function(e,p){u++,h||d||m();var b=o=null!=o?o:n();p.add((function(){0!=--u||h||d||(r=c(y,f))})),b.subscribe(p),!t&&u>0&&(t=new s.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,m(),r=c(v,i,e),b.error(e)},complete:function(){d=!0,m(),r=c(v,l),b.complete()}}),a.innerFrom(e).subscribe(t))}))(e)}}},97234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var r=n(30216),i=n(69728);t.shareReplay=function(e,t,n){var a,o,s,p,c=!1;return e&&"object"==typeof e?(a=e.bufferSize,p=void 0===a?1/0:a,o=e.windowTime,t=void 0===o?1/0:o,c=void 0!==(s=e.refCount)&&s,n=e.scheduler):p=null!=e?e:1/0,i.share({connector:function(){return new r.ReplaySubject(p,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},22445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var r=n(68032),i=n(56228),a=n(91137),o=n(64024),s=n(35079);t.single=function(e){return o.operate((function(t,n){var o,p=!1,c=!1,u=0;t.subscribe(s.createOperatorSubscriber(n,(function(r){c=!0,e&&!e(r,u++,t)||(p&&n.error(new i.SequenceError("Too many matching values")),p=!0,o=r)}),(function(){p?(n.next(o),n.complete()):n.error(c?new a.NotFoundError("No matching values"):new r.EmptyError)})))}))}},56262:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var r=n(72763);t.skip=function(e){return r.filter((function(t,n){return e<=n}))}},17397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var r=n(69144),i=n(64024),a=n(35079);t.skipLast=function(e){return e<=0?r.identity:i.operate((function(t,n){var r=new Array(e),i=0;return t.subscribe(a.createOperatorSubscriber(n,(function(t){var a=i++;if(a<e)r[a]=t;else{var o=a%e,s=r[o];r[o]=t,n.next(s)}}))),function(){r=null}}))}},9900:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var r=n(64024),i=n(35079),a=n(9451),o=n(5729);t.skipUntil=function(e){return r.operate((function(t,n){var r=!1,s=i.createOperatorSubscriber(n,(function(){null==s||s.unsubscribe(),r=!0}),o.noop);a.innerFrom(e).subscribe(s),t.subscribe(i.createOperatorSubscriber(n,(function(e){return r&&n.next(e)})))}))}},1620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var r=n(64024),i=n(35079);t.skipWhile=function(e){return r.operate((function(t,n){var r=!1,a=0;t.subscribe(i.createOperatorSubscriber(n,(function(t){return(r||(r=!e(t,a++)))&&n.next(t)})))}))}},13424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var r=n(60079),i=n(92619),a=n(64024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=i.popScheduler(e);return a.operate((function(t,i){(n?r.concat(e,t,n):r.concat(e,t)).subscribe(i)}))}},80831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var r=n(64024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),r.operate((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}},90411:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var r=n(97222),i=n(69144);t.switchAll=function(){return r.switchMap(i.identity)}},97222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var r=n(9451),i=n(64024),a=n(35079);t.switchMap=function(e,t){return i.operate((function(n,i){var o=null,s=0,p=!1,c=function(){return p&&!o&&i.complete()};n.subscribe(a.createOperatorSubscriber(i,(function(n){null==o||o.unsubscribe();var p=0,u=s++;r.innerFrom(e(n,u)).subscribe(o=a.createOperatorSubscriber(i,(function(e){return i.next(t?t(n,e,u,p++):e)}),(function(){o=null,c()})))}),(function(){p=!0,c()})))}))}},46464:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var r=n(97222),i=n(64432);t.switchMapTo=function(e,t){return i.isFunction(t)?r.switchMap((function(){return e}),t):r.switchMap((function(){return e}))}},74434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var r=n(97222),i=n(64024);t.switchScan=function(e,t){return i.operate((function(n,i){var a=t;return r.switchMap((function(t,n){return e(a,t,n)}),(function(e,t){return a=t,t}))(n).subscribe(i),function(){a=null}}))}},17138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var r=n(51727),i=n(64024),a=n(35079);t.take=function(e){return e<=0?function(){return r.EMPTY}:i.operate((function(t,n){var r=0;t.subscribe(a.createOperatorSubscriber(n,(function(t){++r<=e&&(n.next(t),e<=r&&n.complete())})))}))}},24288:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=n(51727),a=n(64024),o=n(35079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:a.operate((function(t,n){var i=[];t.subscribe(o.createOperatorSubscriber(n,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var a=r(i),o=a.next();!o.done;o=a.next()){var s=o.value;n.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}n.complete()}),void 0,(function(){i=null})))}))}},97341:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var r=n(64024),i=n(35079),a=n(9451),o=n(5729);t.takeUntil=function(e){return r.operate((function(t,n){a.innerFrom(e).subscribe(i.createOperatorSubscriber(n,(function(){return n.complete()}),o.noop)),!n.closed&&t.subscribe(n)}))}},60653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var r=n(64024),i=n(35079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),r.operate((function(n,r){var a=0;n.subscribe(i.createOperatorSubscriber(r,(function(n){var i=e(n,a++);(i||t)&&r.next(n),!i&&r.complete()})))}))}},38668:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var r=n(64432),i=n(64024),a=n(35079),o=n(69144);t.tap=function(e,t,n){var s=r.isFunction(e)||t||n?{next:e,error:t,complete:n}:e;return s?i.operate((function(e,t){var n;null===(n=s.subscribe)||void 0===n||n.call(s);var r=!0;e.subscribe(a.createOperatorSubscriber(t,(function(e){var n;null===(n=s.next)||void 0===n||n.call(s,e),t.next(e)}),(function(){var e;r=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()}),(function(e){var n;r=!1,null===(n=s.error)||void 0===n||n.call(s,e),t.error(e)}),(function(){var e,t;r&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)})))})):o.identity}},69466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var r=n(64024),i=n(35079),a=n(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),r.operate((function(t,r){var o=n.leading,s=n.trailing,p=!1,c=null,u=null,l=!1,d=function(){null==u||u.unsubscribe(),u=null,s&&(m(),l&&r.complete())},f=function(){u=null,l&&r.complete()},h=function(t){return u=a.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(r,d,f))},m=function(){if(p){p=!1;var e=c;c=null,r.next(e),!l&&h(e)}};t.subscribe(i.createOperatorSubscriber(r,(function(e){p=!0,c=e,(!u||u.closed)&&(o?m():h(e))}),(function(){l=!0,(!(s&&p&&u)||u.closed)&&r.complete()})))}))}},99705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var r=n(34617),i=n(69466),a=n(55710);t.throttleTime=function(e,t,n){void 0===t&&(t=r.asyncScheduler),void 0===n&&(n=i.defaultThrottleConfig);var o=a.timer(e,t);return i.throttle((function(){return o}),n)}},48062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var r=n(68032),i=n(64024),a=n(35079);function o(){return new r.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=o),i.operate((function(t,n){var r=!1;t.subscribe(a.createOperatorSubscriber(n,(function(e){r=!0,n.next(e)}),(function(){return r?n.complete():n.error(e())})))}))}},76610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var r=n(34617),i=n(64024),a=n(35079);t.timeInterval=function(e){return void 0===e&&(e=r.asyncScheduler),i.operate((function(t,n){var r=e.now();t.subscribe(a.createOperatorSubscriber(n,(function(t){var i=e.now(),a=i-r;r=i,n.next(new o(t,a))})))}))};var o=function(e,t){this.value=e,this.interval=t};t.TimeInterval=o},26279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var r=n(34617),i=n(47761),a=n(64024),o=n(9451),s=n(49876),p=n(35079),c=n(35421);function u(e){throw new t.TimeoutError(e)}t.TimeoutError=s.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var n=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,s=n.first,l=n.each,d=n.with,f=void 0===d?u:d,h=n.scheduler,m=void 0===h?null!=t?t:r.asyncScheduler:h,v=n.meta,y=void 0===v?null:v;if(null==s&&null==l)throw new TypeError("No timeout provided.");return a.operate((function(e,t){var n,r,i=null,a=0,u=function(e){r=c.executeSchedule(t,m,(function(){try{n.unsubscribe(),o.innerFrom(f({meta:y,lastValue:i,seen:a})).subscribe(t)}catch(e){t.error(e)}}),e)};n=e.subscribe(p.createOperatorSubscriber(t,(function(e){null==r||r.unsubscribe(),a++,t.next(i=e),l>0&&u(l)}),void 0,void 0,(function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),i=null}))),!a&&u(null!=s?"number"==typeof s?s:+s-m.now():l)}))}},28132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var r=n(34617),i=n(47761),a=n(26279);t.timeoutWith=function(e,t,n){var o,s,p;if(n=null!=n?n:r.async,i.isValidDate(e)?o=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(p=function(){return t},null==o&&null==s)throw new TypeError("No timeout provided.");return a.timeout({first:o,each:s,scheduler:n,with:p})}},74553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var r=n(11713),i=n(14338);t.timestamp=function(e){return void 0===e&&(e=r.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},12378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var r=n(61386),i=n(64024),a=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){r.reduce(a,[])(e).subscribe(t)}))}},24768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var r=n(59520),i=n(64024),a=n(35079),o=n(5729);t.window=function(e){return i.operate((function(t,n){var i=new r.Subject;n.next(i.asObservable());var s=function(e){i.error(e),n.error(e)};return t.subscribe(a.createOperatorSubscriber(n,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),n.complete()}),s)),e.subscribe(a.createOperatorSubscriber(n,(function(){i.complete(),n.next(i=new r.Subject)}),o.noop,s)),function(){null==i||i.unsubscribe(),i=null}}))}},10131:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=n(59520),a=n(64024),o=n(35079);t.windowCount=function(e,t){void 0===t&&(t=0);var n=t>0?t:e;return a.operate((function(t,a){var s=[new i.Subject],p=0;a.next(s[0].asObservable()),t.subscribe(o.createOperatorSubscriber(a,(function(t){var o,c;try{for(var u=r(s),l=u.next();!l.done;l=u.next())l.value.next(t)}catch(e){o={error:e}}finally{try{l&&!l.done&&(c=u.return)&&c.call(u)}finally{if(o)throw o.error}}var d=p-e+1;if(d>=0&&d%n==0&&s.shift().complete(),++p%n==0){var f=new i.Subject;s.push(f),a.next(f.asObservable())}}),(function(){for(;s.length>0;)s.shift().complete();a.complete()}),(function(e){for(;s.length>0;)s.shift().error(e);a.error(e)}),(function(){s=null})))}))}},29579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var r=n(59520),i=n(34617),a=n(7215),o=n(64024),s=n(35079),p=n(32447),c=n(92619),u=n(35421);t.windowTime=function(e){for(var t,n,l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];var f=null!==(t=c.popScheduler(l))&&void 0!==t?t:i.asyncScheduler,h=null!==(n=l[0])&&void 0!==n?n:null,m=l[1]||1/0;return o.operate((function(t,n){var i=[],o=!1,c=function(e){var t=e.window,n=e.subs;t.complete(),n.unsubscribe(),p.arrRemove(i,e),o&&l()},l=function(){if(i){var t=new a.Subscription;n.add(t);var o=new r.Subject,s={window:o,subs:t,seen:0};i.push(s),n.next(o.asObservable()),u.executeSchedule(t,f,(function(){return c(s)}),e)}};null!==h&&h>=0?u.executeSchedule(n,f,l,h,!0):o=!0,l();var d=function(e){return i.slice().forEach(e)},v=function(e){d((function(t){var n=t.window;return e(n)})),e(n),n.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(n,(function(e){d((function(t){t.window.next(e),m<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},10752:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=n(59520),a=n(7215),o=n(64024),s=n(9451),p=n(35079),c=n(5729),u=n(32447);t.windowToggle=function(e,t){return o.operate((function(n,o){var l=[],d=function(e){for(;0<l.length;)l.shift().error(e);o.error(e)};s.innerFrom(e).subscribe(p.createOperatorSubscriber(o,(function(e){var n=new i.Subject;l.push(n);var r,f=new a.Subscription;try{r=s.innerFrom(t(e))}catch(e){return void d(e)}o.next(n.asObservable()),f.add(r.subscribe(p.createOperatorSubscriber(o,(function(){u.arrRemove(l,n),n.complete(),f.unsubscribe()}),c.noop,d)))}),c.noop)),n.subscribe(p.createOperatorSubscriber(o,(function(e){var t,n,i=l.slice();try{for(var a=r(i),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}),(function(){for(;0<l.length;)l.shift().complete();o.complete()}),d,(function(){for(;0<l.length;)l.shift().unsubscribe()})))}))}},582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var r=n(59520),i=n(64024),a=n(35079),o=n(9451);t.windowWhen=function(e){return i.operate((function(t,n){var i,s,p=function(e){i.error(e),n.error(e)},c=function(){var t;null==s||s.unsubscribe(),null==i||i.complete(),i=new r.Subject,n.next(i.asObservable());try{t=o.innerFrom(e())}catch(e){return void p(e)}t.subscribe(s=a.createOperatorSubscriber(n,c,c,p))};c(),t.subscribe(a.createOperatorSubscriber(n,(function(e){return i.next(e)}),(function(){i.complete(),n.complete()}),p,(function(){null==s||s.unsubscribe(),i=null})))}))}},44255:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var a=n(64024),o=n(35079),s=n(9451),p=n(69144),c=n(5729),u=n(92619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=u.popResultSelector(e);return a.operate((function(t,a){for(var u=e.length,l=new Array(u),d=e.map((function(){return!1})),f=!1,h=function(t){s.innerFrom(e[t]).subscribe(o.createOperatorSubscriber(a,(function(e){l[t]=e,f||d[t]||(d[t]=!0,(f=d.every(p.identity))&&(d=null))}),c.noop))},m=0;m<u;m++)h(m);t.subscribe(o.createOperatorSubscriber(a,(function(e){if(f){var t=i([e],r(l));a.next(n?n.apply(void 0,i([],r(t))):t)}})))}))}},63253:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var a=n(2042),o=n(64024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.operate((function(t,n){a.zip.apply(void 0,i([t],r(e))).subscribe(n)}))}},87220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var r=n(2042),i=n(87534);t.zipAll=function(e){return i.joinAllInternals(r.zip,e)}},39287:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var a=n(63253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.zip.apply(void 0,i([],r(e)))}},13584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var r=n(75271);t.scheduleArray=function(e,t){return new r.Observable((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}},11659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var r=n(75271),i=n(35421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable((function(n){i.executeSchedule(n,t,(function(){var r=e[Symbol.asyncIterator]();i.executeSchedule(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}},78840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var r=n(75271),i=n(15686),a=n(64432),o=n(35421);t.scheduleIterable=function(e,t){return new r.Observable((function(n){var r;return o.executeSchedule(n,t,(function(){r=e[i.iterator](),o.executeSchedule(n,t,(function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){return void n.error(e)}i?n.complete():n.next(t)}),0,!0)})),function(){return a.isFunction(null==r?void 0:r.return)&&r.return()}}))}},45704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var r=n(9451),i=n(23165),a=n(80831);t.scheduleObservable=function(e,t){return r.innerFrom(e).pipe(a.subscribeOn(t),i.observeOn(t))}},34644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var r=n(9451),i=n(23165),a=n(80831);t.schedulePromise=function(e,t){return r.innerFrom(e).pipe(a.subscribeOn(t),i.observeOn(t))}},73035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var r=n(11659),i=n(49266);t.scheduleReadableStreamLike=function(e,t){return r.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var r=n(45704),i=n(34644),a=n(13584),o=n(78840),s=n(11659),p=n(3292),c=n(52644),u=n(38219),l=n(6380),d=n(57707),f=n(54883),h=n(49266),m=n(73035);t.scheduled=function(e,t){if(null!=e){if(p.isInteropObservable(e))return r.scheduleObservable(e,t);if(u.isArrayLike(e))return a.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(d.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(l.isIterable(e))return o.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return m.scheduleReadableStreamLike(e,t)}throw f.createInvalidObservableTypeError(e)}},4756:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var a=function(e){function t(t,n){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(7215).Subscription);t.Action=a},45364:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var a=n(41172),o=n(76741),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=o.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,n,r){var i;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==n&&(o.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},t}(a.AsyncAction);t.AnimationFrameAction=s},1834:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(96759).AsyncScheduler);t.AnimationFrameScheduler=a},53761:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var a=n(41172),o=n(6703),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=o.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){var i;if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var a=t.actions;null!=n&&(null===(i=a[a.length-1])||void 0===i?void 0:i.id)!==n&&(o.immediateProvider.clearImmediate(n),t._scheduled=void 0)},t}(a.AsyncAction);t.AsapAction=s},81386:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n,r=this.actions;e=e||r.shift();do{if(n=e.execute(e.state,e.delay))break}while((e=r[0])&&e.id===t&&r.shift());if(this._active=!1,n){for(;(e=r[0])&&e.id===t&&r.shift();)e.unsubscribe();throw n}},t}(n(96759).AsyncScheduler);t.AsapScheduler=a},41172:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var a=n(4756),o=n(79678),s=n(32447),p=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return i(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),o.intervalProvider.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&o.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,s.arrRemove(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(a.Action);t.AsyncAction=p},96759:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var a=n(3980),o=function(e){function t(t,n){void 0===n&&(n=a.Scheduler.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(a.Scheduler);t.AsyncScheduler=o},66354:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var a=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return i(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(n(41172).AsyncAction);t.QueueAction=a},13144:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(96759).AsyncScheduler);t.QueueScheduler=a},88847:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var a=n(41172),o=n(7215),s=function(e){function t(t,n){void 0===t&&(t=p),void 0===n&&(n=1/0);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return i(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(n(96759).AsyncScheduler);t.VirtualTimeScheduler=s;var p=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return i(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return o.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(a.AsyncAction);t.VirtualAction=p},86192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var r=n(45364),i=n(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(r.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},76741:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var a=n(7215);t.animationFrameProvider={schedule:function(e){var n=requestAnimationFrame,r=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(n=i.requestAnimationFrame,r=i.cancelAnimationFrame);var o=n((function(t){r=void 0,e(t)}));return new a.Subscription((function(){return null==r?void 0:r(o)}))},requestAnimationFrame:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.animationFrameProvider.delegate;return((null==a?void 0:a.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],r(e)))},cancelAnimationFrame:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.animationFrameProvider.delegate;return((null==a?void 0:a.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],r(e)))},delegate:void 0}},64502:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var r=n(53761),i=n(81386);t.asapScheduler=new i.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},34617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var r=n(41172),i=n(96759);t.asyncScheduler=new i.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},11713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var a=n(72534),o=a.Immediate.setImmediate,s=a.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=t.immediateProvider.delegate;return((null==a?void 0:a.setImmediate)||o).apply(void 0,i([],r(e)))},clearImmediate:function(e){var n=t.immediateProvider.delegate;return((null==n?void 0:n.clearImmediate)||s)(e)},delegate:void 0}},79678:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var s=t.intervalProvider.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,r([e,i],n(a))):setInterval.apply(void 0,r([e,i],n(a)))},clearInterval:function(e){var n=t.intervalProvider.delegate;return((null==n?void 0:n.clearInterval)||clearInterval)(e)},delegate:void 0}},81241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},60326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var r=n(66354),i=n(13144);t.queueScheduler=new i.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},68972:function(e,t){"use strict";var n=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var s=t.timeoutProvider.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,r([e,i],n(a))):setTimeout.apply(void 0,r([e,i],n(a)))},clearTimeout:function(e){var n=t.timeoutProvider.delegate;return((null==n?void 0:n.clearTimeout)||clearTimeout)(e)},delegate:void 0}},15686:(e,t)=>{"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=n,t.iterator=n()},52138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},89251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},56809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var r=n(49876);t.ArgumentOutOfRangeError=r.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},68032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var r=n(49876);t.EmptyError=r.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},72534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var n,r=1,i={};function a(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=r++;return i[t]=!0,n||(n=Promise.resolve()),n.then((function(){return a(t)&&e()})),t},clearImmediate:function(e){a(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},91137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var r=n(49876);t.NotFoundError=r.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var r=n(49876);t.ObjectUnsubscribedError=r.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},56228:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var r=n(49876);t.SequenceError=r.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},35463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var r=n(49876);t.UnsubscriptionError=r.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},92619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var r=n(64432),i=n(76551);function a(e){return e[e.length-1]}t.popResultSelector=function(e){return r.isFunction(a(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(a(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof a(e)?e.pop():t}},14744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var n=Array.isArray,r=Object.getPrototypeOf,i=Object.prototype,a=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(n(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&r(s)===i){var o=a(t);return{args:o.map((function(e){return t[e]})),keys:o}}}var s;return{args:e,keys:null}}},64475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var n=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&n(e[0])?e[0]:e}},32447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}},49876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},51589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}},34770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var r=n(83782),i=null;t.errorContext=function(e){if(r.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,a=n.errorThrown,o=n.error;if(i=null,a)throw o}}else e()},t.captureError=function(e){r.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},35421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule((function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!i)return a}},69144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},38219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},57707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var r=n(64432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&r.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},47761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},64432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var r=n(52138),i=n(64432);t.isInteropObservable=function(e){return i.isFunction(e[r.observable])}},6380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var r=n(15686),i=n(64432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[r.iterator])}},31211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var r=n(75271),i=n(64432);t.isObservable=function(e){return!!e&&(e instanceof r.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},52644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var r=n(64432);t.isPromise=function(e){return r.isFunction(null==e?void 0:e.then)}},49266:function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},a=this&&this.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||p(e,t)}))})}function p(e,t){try{(n=a[e](t)).value instanceof i?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function c(e){p("next",e)}function u(e){p("throw",e)}function l(e,t){e(t),o.shift(),o.length&&p(o[0][0],o[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var o=n(64432);t.readableStreamLikeToAsyncGenerator=function(e){return a(this,arguments,(function(){var t,n,a;return r(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,i(t.read())];case 3:return n=r.sent(),a=n.value,n.done?[4,i(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,i(a)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return o.isFunction(null==e?void 0:e.getReader)}},76551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var r=n(64432);t.isScheduler=function(e){return e&&r.isFunction(e.schedule)}},64024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var r=n(64432);function i(e){return r.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},74666:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var a=n(14338),o=Array.isArray;t.mapOneOrManyArgs=function(e){return a.map((function(t){return function(e,t){return o(t)?e.apply(void 0,i([],r(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},91574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(n,r){return!e.call(t,n,r)}}},25966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var r=n(69144);function i(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},57234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var r=n(83782),i=n(68972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=r.config.onUnhandledError;if(!t)throw e;t(e)}))}},54883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},19978:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var r=n(53533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return r.audit}});var i=n(75188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var a=n(14514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return a.buffer}});var o=n(22537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var s=n(88720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var p=n(67932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return p.bufferToggle}});var c=n(41445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var u=n(64418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return u.catchError}});var l=n(84163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return l.combineAll}});var d=n(79893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var f=n(48169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return f.combineLatest}});var h=n(27230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var m=n(84098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return m.concat}});var v=n(44554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var y=n(21048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var b=n(50381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=n(84724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var w=n(64347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return w.connect}});var _=n(56944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return _.count}});var x=n(40440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return x.debounce}});var D=n(58157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return D.debounceTime}});var O=n(11714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var E=n(31030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return E.delay}});var S=n(16405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return S.delayWhen}});var j=n(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return j.dematerialize}});var k=n(42307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return k.distinct}});var T=n(49131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return T.distinctUntilChanged}});var N=n(76659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return N.distinctUntilKeyChanged}});var P=n(54217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return P.elementAt}});var C=n(24707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return C.endWith}});var A=n(89276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return A.every}});var I=n(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return I.exhaust}});var F=n(93977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return F.exhaustAll}});var R=n(40368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return R.exhaustMap}});var M=n(47829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return M.expand}});var $=n(72763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return $.filter}});var B=n(44106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return B.finalize}});var L=n(68759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var V=n(23999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return V.findIndex}});var q=n(55194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return q.first}});var U=n(21664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return U.groupBy}});var z=n(13470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var W=n(49549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return W.isEmpty}});var Q=n(79582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Q.last}});var H=n(14338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return H.map}});var K=n(24791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return K.mapTo}});var G=n(49318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return G.materialize}});var J=n(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return J.max}});var Y=n(86094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Y.merge}});var Z=n(64594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=n(92735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=n(99010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=n(38983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var ne=n(72170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return ne.mergeScan}});var re=n(43674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return re.mergeWith}});var ie=n(91446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var ae=n(72318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return ae.multicast}});var oe=n(23165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return oe.observeOn}});var se=n(64764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.onErrorResumeNext}});var pe=n(10402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pe.pairwise}});var ce=n(85960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var ue=n(85658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return ue.pluck}});var le=n(23881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return le.publish}});var de=n(41755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return de.publishBehavior}});var fe=n(99801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return fe.publishLast}});var he=n(65021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var me=n(62749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return me.race}});var ve=n(39925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var ye=n(61386);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var be=n(51194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=n(47085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var we=n(67524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return we.retry}});var _e=n(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return _e.retryWhen}});var xe=n(72711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return xe.refCount}});var De=n(76577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return De.sample}});var Oe=n(43815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Ee=n(97250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Ee.scan}});var Se=n(20842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Se.sequenceEqual}});var je=n(69728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return je.share}});var ke=n(97234);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return ke.shareReplay}});var Te=n(22445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Te.single}});var Ne=n(56262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ne.skip}});var Pe=n(17397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Pe.skipLast}});var Ce=n(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ce.skipUntil}});var Ae=n(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ae.skipWhile}});var Ie=n(13424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ie.startWith}});var Fe=n(80831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Fe.subscribeOn}});var Re=n(90411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Re.switchAll}});var Me=n(97222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Me.switchMap}});var $e=n(46464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return $e.switchMapTo}});var Be=n(74434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Be.switchScan}});var Le=n(17138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Ve=n(24288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ve.takeLast}});var qe=n(97341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return qe.takeUntil}});var Ue=n(60653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ue.takeWhile}});var ze=n(38668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var We=n(69466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return We.throttle}});var Qe=n(99705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Qe.throttleTime}});var He=n(48062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return He.throwIfEmpty}});var Ke=n(76610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Ke.timeInterval}});var Ge=n(26279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ge.timeout}});var Je=n(28132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Je.timeoutWith}});var Ye=n(74553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Ye.timestamp}});var Ze=n(12378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=n(24768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=n(10131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=n(29579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var nt=n(10752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return nt.windowToggle}});var rt=n(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return rt.windowWhen}});var it=n(44255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var at=n(63253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return at.zip}});var ot=n(87220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ot.zipAll}});var st=n(39287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.zipWith}})},73389:(e,t,n)=>{"use strict";const r=n(93267),i=n(6385),a=n(58242),o=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=r(e)).length)return 0;e=e.replace(a()," ");let t=0;for(let n=0;n<e.length;n++){const r=e.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=i(r)?2:1)}return t};e.exports=o,e.exports.default=o},93267:(e,t,n)=>{"use strict";const r=n(21865);e.exports=e=>"string"==typeof e?e.replace(r(),""):e},56974:(e,t,n)=>{"use strict";const r=n(22037),i=n(76224),a=n(41875),{env:o}=process;let s;function p(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3;if(a("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const n=s||0;if("dumb"===o.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:n;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:n}a("no-color")||a("no-colors")||a("color=false")||a("color=never")?s=0:(a("color")||a("colors")||a("color=true")||a("color=always"))&&(s=1),"FORCE_COLOR"in o&&(s="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return p(c(e,e&&e.isTTY))},stdout:p(c(!0,i.isatty(1))),stderr:p(c(!0,i.isatty(2)))}},42437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.environment=void 0,t.environment={controlPlaneAppId:"controlplane",defaultBaseUrl:"http://local.squidcloud.io:8000"}},31114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6113),i=n(46239),a=n(97469),o=n(98626),s=n(74587),p=n(60173),c=n(72354),u=n(76995),l=n(42437);global.crypto||(global.crypto=r),(0,i.default)((0,a.hideBin)(process.argv.slice(2))).command("snapshot <appId> <collection>","",(e=>{e.positional("appId",{type:"string"}).positional("collection",{type:"string"})}),(e=>{(0,s.default)(e.baseUrl,e.appId,e.collection).then()})).command("upload <appId> [path]","",(e=>{e.positional("appId",{type:"string"}).positional("path",{type:"string",default:"dist/bundle.zip"}).count("direct").alias("d","direct")}),(e=>{var t;(0,c.default)(null!==(t=e.baseUrl)&&void 0!==t?t:l.environment.defaultBaseUrl,e.appId,e.path,{direct:!!e.direct}).then()})).command("metadata [path]","",(e=>{e.positional("path",{type:"string",default:"dist/index.js"})}),(e=>{(0,o.default)(e.path).then()})).command("init [path]","Creates a new Squid application template project",(e=>{e.positional("path",{type:"string"})}),(e=>{(0,u.default)(e.path).then()})).command("update <appId>","",(e=>{e.positional("path",{type:"string"})}),(e=>{(0,p.default)(e.baseUrl,e.appId).then()})).demandCommand(1).parse()},76995:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(71529),a=n(31511),o=n(65122);t.default=function(e){return r(this,void 0,void 0,(function*(){const t=[new a.SchematicOption("name",e)];yield i.SchematicRunner.execute("application",t),yield(0,o.runInShell)("npm install",e)}))}},98626:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n(this,void 0,void 0,(function*(){}))}},74587:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(8731);t.default=function(e,t,n){return r(this,void 0,void 0,(function*(){const r=new i.Squid({appId:t,baseUrl:e});try{const e=yield r.collection(n).query().snapshot();console.log(e.map((e=>e.data()))),process.exit(0)}catch(e){console.log(e),process.exit(1)}}))}},60173:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(70575),a=n(53315);t.default=function(e,t){var n;return r(this,void 0,void 0,(function*(){try{const n=yield a.default.post(`${(0,i.getApplicationUrl)(e,t)}application/updateBundleData`);console.log(n.status,n.data)}catch(e){if(!(e instanceof a.AxiosError))throw e;console.error(null===(n=e.response)||void 0===n?void 0:n.data)}}))}},72354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(70575),a=n(53315),o=n(54347),s=n(57147),p=n(42437);t.default=function(e,t,n,c){var u;return r(this,void 0,void 0,(function*(){const r=new o;r.append("appId",t),r.append("file",(0,s.createReadStream)(n));const l=c.direct?`${(0,i.getApplicationUrl)(e,t)}application/updateApplicationCode`:`${(0,i.getApplicationUrl)(e,p.environment.controlPlaneAppId)}webhooks/updateApplicationCode`;try{console.log("Uploading code to: ",l);const e=yield a.default.post(l,r,{headers:r.getHeaders()});console.log("Response: ",e.status,e.data)}catch(e){if(!(e instanceof a.AxiosError))throw e;console.error(null===(u=e.response)||void 0===u?void 0:u.data)}}))}},18675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeToKebabOrSnakeCase=void 0,t.normalizeToKebabOrSnakeCase=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase().replace(/\s/g,"-")}},31511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchematicOption=void 0;const r=n(18675);t.SchematicOption=class{constructor(e,t){this.name=e,this.value=t}get normalizedName(){return(0,r.normalizeToKebabOrSnakeCase)(this.name)}toCommandString(){if("string"==typeof this.value)return"name"===this.name?`--${this.normalizedName}=${this.format()}`:"version"===this.name||"path"===this.name?`--${this.normalizedName}=${this.value}`:`--${this.normalizedName}="${this.value}"`;{const e=this.normalizedName;return this.value?`--${e}`:`--no-${e}`}}format(){return(0,r.normalizeToKebabOrSnakeCase)(this.value).split("").reduce(((e,t)=>"("===t||")"===t||"["===t||"]"===t?`${e}\\${t}`:`${e}${t}`),"")}}},71529:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SchematicRunner=void 0;const i=n(32081),a=n(70575),o=n(57147),s=n(71017),p=n(77282);class c{static findClosestSchematicsBinary(){return r(this,void 0,void 0,(function*(){const e=[s.resolve(__dirname.replace(/dist$/g,"node_modules"),"@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(__dirname,"../../node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(__dirname,"../../../node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(p.cwd(),"node_modules/@angular-devkit/schematics-cli/bin/schematics.js"),s.resolve(p.cwd(),"../node_modules/@angular-devkit/schematics-cli/bin/schematics.js")];for(const t of e)if(yield c.checkIfFileExists(t))return t;throw new Error("'schematics' binary path could not be found!")}))}static checkIfFileExists(e){return r(this,void 0,void 0,(function*(){try{return yield o.promises.stat(e),!0}catch(e){if("ENOENT"===(null==e?void 0:e.code))return!1;throw e}}))}static execute(e,t,n){return r(this,void 0,void 0,(function*(){let r=this.buildCommandLine(e,t);r=n?r.concat(` ${n}`):r,yield this.run(r)}))}static run(e,t=!1,n=p.cwd()){return r(this,void 0,void 0,(function*(){const o=[e],s={cwd:n,stdio:t?"pipe":"inherit",shell:!0};return new Promise(((n,p)=>r(this,void 0,void 0,(function*(){const r=(0,i.spawn)("node",[`"${yield c.findClosestSchematicsBinary()}"`,...o],s);t&&(0,a.truthy)(r.stdout).on("data",(e=>n(e.toString().replace(/\r\n|\n/,"")))),r.on("close",(t=>{0===t?n(null):(console.error(`node ${e} failed`),p())}))}))))}))}static buildCommandLine(e,t){return`@squidcloud/schematics:${e}${this.buildOptions(t)}`}static buildOptions(e){return e.reduce(((e,t)=>e.concat(` ${t.toCommandString()}`)),"")}}t.SchematicRunner=c},65122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runInShell=void 0;const r=n(32081);t.runInShell=function(e,t=process.cwd()){return new Promise(((n,i)=>{const a=(0,r.spawn)(e,{cwd:t,shell:!0,stdio:"inherit"});a.on("error",(e=>i(e))),a.on("exit",(e=>{0===e?n({stdout:"",stderr:""}):i(new Error(`The command exited with code ${e}`))}))}))}},65218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},94125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiEndpointsRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const r=n(1186);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},a={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},p={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},secured:{type:"boolean",nullable:!0},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:r.IntegrationType.internal}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.cockroach},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["baseUrl","endpoints"],properties:{type:{const:r.IntegrationType.api},baseUrl:{type:"string",nullable:!1,format:"uri"},endpoints:{type:"object",patternProperties:{"^\\S+$":{type:"object",required:["relativePath","method"],properties:{relativePath:{type:"string"},method:{type:"string",enum:["POST","GET","DELETE","PATCH","PUT"]},requestSchema:{type:"object",patternProperties:{"^\\S+$":{type:"object",properties:{paramLocation:{type:"string",enum:["QUERY","BODY","HEADER"]},fieldNameInRequest:{type:"string"}}}}},responseSchema:{type:"object",patternProperties:{"^\\S+$":{type:"object",required:["paramLocation"],properties:{paramLocation:{type:"string",enum:["BODY","HEADER"]},fieldPathInResponse:{type:"string"}}}}}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:p}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:r.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:p}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mssql},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.postgres},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.cockroach},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:r.IntegrationType.mongo},connectionOptions:s}},{type:"object",properties:{integrationType:{const:r.IntegrationType.internal}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:r.IntegrationType.graphql},connectionOptions:p}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiEndpointsRequestSchema={type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}},48030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},17545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},49235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},31277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},93085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},14385:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFullDocIdStr=t.parseFullDocId=void 0;const r=n(24684);t.parseFullDocId=function(e){return(0,r.deserializeObj)(e)},t.getFullDocIdStr=function(...e){const[t,n,i]=e,a="object"==typeof t?t:{docId:t,collectionName:n,integrationId:i};return a.integrationId||(a.integrationId=void 0),(0,r.normalizeJsonAsString)(a)}},59231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},37008:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(n=t.HttpStatus||(t.HttpStatus={}))[n.CONTINUE=100]="CONTINUE",n[n.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",n[n.PROCESSING=102]="PROCESSING",n[n.EARLYHINTS=103]="EARLYHINTS",n[n.OK=200]="OK",n[n.CREATED=201]="CREATED",n[n.ACCEPTED=202]="ACCEPTED",n[n.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",n[n.NO_CONTENT=204]="NO_CONTENT",n[n.RESET_CONTENT=205]="RESET_CONTENT",n[n.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",n[n.AMBIGUOUS=300]="AMBIGUOUS",n[n.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",n[n.FOUND=302]="FOUND",n[n.SEE_OTHER=303]="SEE_OTHER",n[n.NOT_MODIFIED=304]="NOT_MODIFIED",n[n.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",n[n.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",n[n.BAD_REQUEST=400]="BAD_REQUEST",n[n.UNAUTHORIZED=401]="UNAUTHORIZED",n[n.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",n[n.FORBIDDEN=403]="FORBIDDEN",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",n[n.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",n[n.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",n[n.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",n[n.CONFLICT=409]="CONFLICT",n[n.GONE=410]="GONE",n[n.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",n[n.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",n[n.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",n[n.URI_TOO_LONG=414]="URI_TOO_LONG",n[n.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",n[n.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",n[n.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",n[n.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",n[n.MISDIRECTED=421]="MISDIRECTED",n[n.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",n[n.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",n[n.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",n[n.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",n[n.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",n[n.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",n[n.BAD_GATEWAY=502]="BAD_GATEWAY",n[n.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",n[n.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",n[n.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},70575:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(65218),t),i(n(94125),t),i(n(48030),t),i(n(17545),t),i(n(49235),t),i(n(77581),t),i(n(91012),t),i(n(31277),t),i(n(23889),t),i(n(10720),t),i(n(93085),t),i(n(14385),t),i(n(59231),t),i(n(37008),t),i(n(1186),t),i(n(16778),t),i(n(55263),t),i(n(2792),t),i(n(2251),t),i(n(13858),t),i(n(90914),t),i(n(82574),t),i(n(32972),t),i(n(791),t),i(n(76504),t),i(n(75098),t),i(n(81391),t),i(n(15791),t),i(n(17104),t),i(n(99132),t),i(n(37682),t),i(n(23185),t),i(n(4825),t),i(n(27850),t),i(n(93589),t),i(n(11834),t),i(n(24684),t),i(n(48315),t),i(n(58255),t),i(n(22608),t)},1186:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.isDataIntegration=t.IntegrationType=void 0,(n=t.IntegrationType||(t.IntegrationType={})).internal="internal",n.mongo="mongo",n.mysql="mysql",n.mssql="mssql",n.postgres="postgres",n.cockroach="cockroach",n.api="api",n.graphql="graphql",t.isDataIntegration=function(e){return["internal","mongo","mysql","mssql","postgres","cockroach"].includes(e.type)}},16778:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=t.LogLevel||(t.LogLevel={})).TRACE="trace",n.DEBUG="debug",n.INFO="info",n.WARN="warn",n.ERROR="error"},90914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetMetricDataRequestSchema=void 0,t.GetMetricDataRequestSchema={type:"object",required:["metricNames"],properties:{metricNames:{type:"array",minItems:1,items:{type:"string",enum:["backendBootstrapLatencySum","backendFailureCount","backendFailureFunctionCallCount","backendSuccessFunctionCallCount","backendFunctionCallCount","backendFunctionCallLatencySum"]},nullable:!1},timeWindow:{type:"object",properties:{startTime:{type:"number",nullable:!0},endTime:{type:"number",nullable:!0}},nullable:!0},aggregation:{nullable:!0,type:["string","object"],oneOf:[{type:"string",const:"none"},{type:"object",required:["functionName","groupByFields"],properties:{functionName:{type:"string",enum:["sum","avg"],nullable:!1},groupByFields:{type:"array",items:{type:"string"},nullable:!1}}}]},rate:{type:"string",enum:["1m","5m","1h","3h","1d"],nullable:!0},step:{type:"string",nullable:!0}}}},13858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const r=n(98784);t.MutationContext=class{constructor(e,t,n,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=n,this.auth=r}getUserAuth(){return this.auth}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?r.get(this.beforeAndAfterDocs.before,e):void 0,n=this.beforeAndAfterDocs.after?r.get(this.beforeAndAfterDocs.after,e):void 0;return!r.isEqual(t,n)}}},55263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const n={type:"string"},r={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:n,integrationId:n,collectionName:n}},i={oneOf:[{type:"object",required:["type","properties","fullDocId"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},fullDocId:r}},{type:"object",required:["type","fullDocId"],properties:{type:{type:"string",const:"delete"},fullDocId:r}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},fullDocId:r,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:n}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:n,integrationId:n,mutations:{type:"array",items:i}}}},2792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const r=n(98784),i=n(32937),a=n(27850),o=n(11834);function s(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?r.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function p(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,a.assertTruthy)("update"===t.type),"update"===e.type)return function(e,t){const n=r.cloneDeep(e);t=r.cloneDeep(t);for(const[e]of p(n)){const r=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&r>t.split(".").length))&&delete n.properties[e]}for(const[e,r]of p(t))n.properties[e]=[...n.properties[e]||[],...r];return n}(e,t);const n=r.cloneDeep(e);for(const[e,r]of p(t)){const t=r;for(const r of t){const t=s((0,o.getInPath)(n.properties,e),r);void 0===t?(0,o.deleteInPath)(n.properties,e):(0,o.setInPath)(n.properties,e,t)}}return n}t.sortUpdateMutationProperties=p,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const n=Object.assign({},e),r=p(t);for(const[e,t]of r){const r=t;for(const t of r){const r=s((0,o.getInPath)(n,e),t);void 0===r?(0,o.deleteInPath)(n,e):(0,o.setInPath)(n,e,r)}}return n},t.convertInsertToUpdate=function(e){const t={type:"update",fullDocId:e.fullDocId,properties:{}};for(const[n,r]of Object.entries(e.properties))t.properties[n]=[{type:"update",value:r}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.fullDocId.integrationId}${e.fullDocId.collectionName}/${e.fullDocId.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},77581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},91012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!="]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const i=n(11834),a=n(24684);class o{}function s(e,t){var n;const r=e.unconditional||[],o=new Set,s=new Map;for(const[r,c]of Object.entries(e.conditional||{})){const e=(0,a.decodeValueForMapping)(r);for(const[r,u]of Object.entries(c)){const c=[],l=null!==(n=(0,i.getInPath)(t,e))&&void 0!==n?n:null,d=(0,a.encodeValueForMapping)(l);switch(r){case"==":l&&!["string","boolean","number"].includes(typeof l)||c.push(...u[d]||[]);break;case"!=":{(u[d]||[]).forEach((e=>o.add(e)));const e=Object.entries(u).filter((([e])=>e!==d));for(const[t,n]of e)c.push(...n);break}case"<":case"<=":case">":case">=":["string","boolean","number"].includes(typeof l)&&c.push(...Object.entries(u).filter((([e])=>p((0,a.decodeValueForMapping)(e),l,r))).reduce(((e,[t,n])=>(e.push(...n),e)),[]));break;default:throw new Error("Unsupported operator: "+r)}for(const e of c)s.set(e,(s.get(e)||0)+1)}}for(const[t,n]of s.entries())o.has(t)||n>=e.queriesMetadata[t].condCount&&r.push(t);return r}function p(e,t,n){if(null===e||null===t)return!1;switch(n){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;default:throw new Error(`Unsupported operator comparison: ${n}`)}}t.QueryMappingManager=o,t.SimpleQueryMappingManager=class extends o{findQueriesForDocument(e,t,n,i){return r(this,void 0,void 0,(function*(){const r=yield this.getMapping(e,n,i);return r?s(r,t):[]}))}},t.findQueriesForDocumentSync=s,t.compareOperator=p,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},82574:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(88556),t),i(n(51515),t)},88556:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const r=n(98784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e,t){this.query=e,this.auth=t,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}getUserAuth(){return this.auth}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}includesSorts(e){return!e.find(((e,t)=>!(0,r.isEqual)(this.query.sortOrder[t],e)))}matchesSorts(e){return e.length===this.query.sortOrder.length&&this.includesSorts(e)}includes(e,t,n){return this.includesCondition({fieldName:e,operator:t,value:n})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),n=this.matchesSorts(e.sortOrder),r=this.limit===e.limit;return t&&n&&r}isSubsetOf(e,t,n){return this.isSubsetOfCondition({fieldName:e,operator:t,value:n})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),n=this.includesSorts(e.sortOrder),r=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&n&&r}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:n,value:r}=e,{operator:a,value:o}=this.parseConditions([t])[0],s=i[`${n}:${a}`];return!!s&&s(r,o)}evaluateIncludes(e,t){const{operator:n,value:i}=e,{operator:a,value:o}=this.parseConditions([t])[0],s=Array.isArray(i)?i.sort():i,p=Array.isArray(o)?o.sort():o;return a===n&&(0,r.isEqual)(p,s)}parseConditions(e){const t=[],n=new Map,r=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),n.forEach(((e,n)=>{t.push({fieldName:n,operator:"in",value:e})})),r.forEach(((e,n)=>{t.push({fieldName:n,operator:"not in",value:e})})),t}}},51515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const r=n(98784),i=n(27850),a=n(48315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,n){if("in"===t||"not in"===t){const r=n instanceof Array?[...n]:[n];for(const n of r)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:n});return this}return this.query.conditions.push({fieldName:e,operator:t,value:n}),this}limit(e){return(0,a.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const n={asc:t,fieldName:e};return(0,a.validateFieldSort)(n),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(n),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=r.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const n of Object.values(t)){const t=r.groupBy(n,(e=>e.operator));for(const[n,i]of Object.entries(t)){if("=="===n||"!="===n){e.push(...i);continue}const t=r.sortBy(i,(e=>e.value));if(">"===n||">="===n)e.push(t[t.length-1]);else{if("<"!==n&&"<="!==n)throw new Error(`Unsupported operator ${n}`);e.push(t[0])}}}return e}}},76504:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const r=n(37008),i=n(86236),a=n(38414),o=n(27850),s=n(48315),p=n(22091),c=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function u(e){return c.compile(e)}function l(e,t){const n={exactMatch:[],parentsMatch:[]};if(!e.length)return n.exactMatch.push(t),n;n.parentsMatch.push(t);const r=[...e];for(;r.length;){const e=d(t,(0,o.truthy)(r.shift()));for(const t of e){const e=l(r,t);n.parentsMatch.push(...e.parentsMatch),n.exactMatch.push(...e.exactMatch)}}return n}function d(e,t){var n,r;const i=(null===(n=e.properties)||void 0===n?void 0:n[t])?[null===(r=e.properties)||void 0===r?void 0:r[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,a.default)(c),c.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),c.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),c.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=u,t.validateSchema=function(e,t,n=[],i={}){const a=u(e),c=a(t);if(!n.length&&!c)throw new s.ValidationError("The data does not conform with the collection schema.",r.HttpStatus.BAD_REQUEST);if(!c&&n.length)for(const e of(0,o.truthy)(a.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",n.some((e=>t.startsWith(e+"."))))throw new s.ValidationError(`${t} does not conform with the collection schema.`,r.HttpStatus.BAD_REQUEST)}!function(e,t,n){if(n&&t.readOnly||!1===t.insertable&&!n)throw new s.ValidationError("The schema does not allow this action",r.HttpStatus.BAD_REQUEST);for(const i of e){const e=(0,o.truthy)(i.path).join("."),a=l((0,o.truthy)(i.path),t);for(const t of a.exactMatch){if(t.readOnly&&"E"===i.kind)throw new s.ValidationError(`${e} is readonly`,r.HttpStatus.BAD_REQUEST);if(n&&!1===t.deletable&&"D"===i.kind)throw new s.ValidationError(`${e} is not deletable`,r.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===i.kind)throw new s.ValidationError(`${e} is not insertable`,r.HttpStatus.BAD_REQUEST)}for(const t of a.parentsMatch)if(n&&t.readOnly)throw new s.ValidationError(`${e} is readonly`,r.HttpStatus.BAD_REQUEST)}}((0,o.truthy)((0,p.default)(i,t)),e,!!n.length)},t.findMatchingPropertiesForKey=d},75098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},81391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}}]}},17104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},99132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},37682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};function r(e,t,n=((e,t)=>e>t?1:e<t?-1:0),i=0,a=e.length-1){if(a<i)return-1;const o=Math.trunc((i+a)/2);return 0===n(t,e[o])?o:n(t,e[o])>0?r(e,t,n,o+1,a):r(e,t,n,i,o-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0,t.binarySearch=r,t.insertSorted=function(e,t,n=((e,t)=>e>t?1:e<t?-1:0)){let r;for(r=e.length-1;r>=0&&n(e[r],t)>0;r--)e[r+1]=e[r];e[r+1]=t},t.removeSorted=function(e,t,n=((e,t)=>e>t?1:e<t?-1:0)){const i=r(e,t,n);i>-1&&e.splice(i,1)},t.asyncGroupBy=function(e,t){return n(this,void 0,void 0,(function*(){const n={};for(const r of e){const e=yield t(r);n[e]||(n[e]=[]),n[e].push(r)}return n}))}},27850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.truthy=t.assertValidateTruthy=t.assertTruthy=void 0;const r=n(37008),i=n(48315);function a(e,t){if(e)return;const n="function"==typeof t?t():t;throw n instanceof Error?n:new Error(null!=n?n:"Assertion error")}function o(e,t){return a(e,t),e}t.assertTruthy=a,t.assertValidateTruthy=function(e,t,n=r.HttpStatus.BAD_REQUEST,o){a(e,(()=>new i.ValidationError(t,n,o)))},t.truthy=o,t.validateTruthy=function(e,t,n=r.HttpStatus.BAD_REQUEST,a){return o(e,(()=>new i.ValidationError(t,n,a)))}},58255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class n extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=n},93589:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const i=n(32937),a=n(27850);t.LockManager=class{constructor(){this.locks={}}lock(...e){return r(this,void 0,void 0,(function*(){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));yield(0,i.lastValueFrom)((0,i.combineLatest)(t).pipe((0,i.filter)((e=>!e.includes(!0))),(0,i.take)(1))),yield this.lock(...e)}))}release(...e){for(const t of e){const e=(0,a.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,a.assertTruthy)(this.canGetLock(...e));for(const t of e)this.locks[t]=new i.BehaviorSubject(!0)}}},11834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const r=n(98784),i=n(27850);function a(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t){const n=t.split(".");let r,a=e;for(;a&&n.length;){const e=(0,i.truthy)(n.shift());if(!(a instanceof Object&&e in a))return;r=a[e],a=r}return r},t.setInPath=function(e,t,n){var o;const s=t.split(".");let p=e;for(;s.length;){const e=(0,i.truthy)(s.shift());if(s.length){const t=a(p[e])&&null!==(o=r.clone(p[e]))&&void 0!==o?o:{};p[e]=t,p=t}else p[e]=n}},t.deleteInPath=function(e,t){var n;const o=t.split(".");let s=e;for(;o.length;){const e=(0,i.truthy)(o.shift());if(o.length){const t=a(s[e])&&null!==(n=r.clone(s[e]))&&void 0!==n?n:{};s[e]=t,s=t}else delete s[e]}},t.deepReplace=function e(t,n,r){for(const i in t)i===n?t[i]=r(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,n,r))):"object"==typeof t[i]&&e(t[i],n,r)}},24684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const r=n(11137);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),n={};return t.sort().forEach((t=>{n[t]=i(e[t])})),n}function a(e){try{return r.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}t.normalizeJsonAsString=function(e){return a(i(e))},t.serializeObj=a,t.deserializeObj=function(e){return r.EJSON.parse(e)},t.encodeValueForMapping=function(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(JSON.stringify(e))},t.decodeValueForMapping=function(e){return JSON.parse(atob(e))}},22608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL(e);n.host=`${t}.${n.host}`;const r=n.toString();return r.endsWith("/")?r:r+"/"}},48315:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const r=n(27850);class i extends Error{constructor(e,t,n){super(e),this.statusCode=t,this.details=n}}function a(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function o(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function s(e){(0,r.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function p(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");a(e)}(e.fullDocId.collectionName),a(e.fullDocId.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))o(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,n]of t){o(e);for(const e of n)p(e)}}(e)}}function u(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function l(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,r.assertTruthy)(l(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,r.assertTruthy)(u(e.asc,"boolean")),o(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,r.assertTruthy)(e,"INVALID_PROVIDER"),s(e.providerType),(0,r.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,r.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,r.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=s,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,r.assertTruthy)(u(e,"number")),-1!==e&&((0,r.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,r.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,r.assertTruthy)(e<=1e3,"Limit can be maximum 1000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=u,t.hasOnlyKeys=l},50539:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const i=n(70575),a=n(98784),o=n(32937),s=n(19978);t.ApiManager=class{constructor(e,t,n,r={}){this.clientId=e,this.rpcManager=t,this.socketManager=n,this.apiServerUrlOverrideMapping=r,this.ongoingApiExecutions={},n.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,n){const r=crypto.randomUUID(),i=new o.Subject;this.ongoingApiExecutions[r]=i;const a={integrationId:e,endpointId:t,request:n,clientId:this.clientId,clientRequestId:r,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",a).catch((r=>{console.error("Got error while calling API",e,t,n,r),i.error(r),i.complete()})),i.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[r]})),(0,o.share)())}handleApiResponse(e,t){return r(this,void 0,void 0,(function*(){const n=this.ongoingApiExecutions[e];n&&(t.success?n.next((0,i.deserializeObj)(t.payload)):n.error((0,a.pick)(t,"httpStatus","payload")),n.complete())}))}}},51724:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const r=n(70575),i=n(32937),a=n(19978);t.BackendFunctionManager=class{constructor(e,t,n){this.clientId=e,this.rpcManager=t,this.socketManager=n,this.ongoingFunctionExecutions={},n.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,a.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const n=crypto.randomUUID(),a=new i.Subject;this.ongoingFunctionExecutions[n]=a;const o={functionName:e,paramsArrayStr:(0,r.serializeObj)(t),clientId:this.clientId,clientRequestId:n};return this.rpcManager.post("backend-function/execute",o).catch((t=>{console.error("Got error while executing function",e,t),a.error(t),a.complete()})),a.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[n]})),(0,i.share)())}handleFunctionResponse(e,t){const n=this.ongoingFunctionExecutions[e];if(!n)return;const i=(0,r.deserializeObj)(t);i.success?n.next(i.response):(n.error(new Error(i.response)),n.complete())}}},4e3:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const r=n(96447);t.CollectionReferenceFactory=class{constructor(e,t){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.collections=new Map}get(e,t){let n=this.collections.get(t);n||(n=new Map,this.collections.set(t,n));let i=n.get(e);return i||(i=new r.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory),n.set(e,i),i)}}},96447:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const r=n(70575);t.CollectionReference=class{constructor(e,t,n,r){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=n,this.queryBuilderFactory=r,this.documents=new Map}doc(e){(0,r.truthy)("string"==typeof e&&"internal"===this.integrationId||"object"==typeof e,"Invalid doc id"),"string"==typeof e&&(e={__id:e});const t=(0,r.normalizeJsonAsString)(e),n=(0,r.getFullDocIdStr)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(n,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.queryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}}},52223:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const i=n(70575),a=n(33910),o=n(32937),s=n(19978),p="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,n,r,i,a,s){this.dbDao=e,this.mutationSender=t,this.socketManager=n,this.querySubscriptionManager=r,this.queryBuilderFactory=i,this.lockManager=a,this.destructManager=s,this.fullDocIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docToTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.docsToResync=[],this.handleIncomingMessages=!0,this.destructManager.registerDestructor((()=>{this.destruct()})),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.dbDao.getDocumentPropertiesOrUndefined(e)}isDirty(e){var t;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const n=this.docToTimestamp.get(e),r=this.fullDocIdToLocalTimestamp.has(e),i=this.fullDocIdToLocalTimestamp.get(e);return!(!r||(null==n?void 0:n.timestamp))||!!this.dbDao.isDbDifferentThanInMemory(e)||r&&i!==(null==n?void 0:n.timestamp)}runInTransaction(e,t){return r(this,void 0,void 0,(function*(){return t?((0,i.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(p)?this.lockManager.lockSync(p):yield this.lockManager.lock(p),new Promise(((t,n)=>r(this,void 0,void 0,(function*(){try{this.currentTransactionId=crypto.randomUUID();try{return yield e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:n})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(p)}})))))}))}applyOutgoingMutation(e,t){var n;return r(this,void 0,void 0,(function*(){const a=e.fullDocId,o=(0,i.getFullDocIdStr)(a),s=null===(n=this.pendingOutgoingMutations.get(o))||void 0===n?void 0:n.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,i.reduceMutations)([s.mutation,e])[0];else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},n=this.pendingOutgoingMutations.get(o)||[];n.push(t),this.pendingOutgoingMutations.set(o,n)}return this.outgoingMutationsEmpty.next(!1),this.runInTransaction((()=>r(this,void 0,void 0,(function*(){const t=this.dbDao.getDocumentPropertiesOrUndefined(o),n="delete"===e.type?void 0:"update"===e.type?(0,i.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.applyLocalDbUpdateFromSnapshot(o,n)&&("insert"===e.type&&this.fullDocIdToLocalTimestamp.set(o,void 0),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,n).forEach((e=>this.batchClientRequestIds.add(e))))}))),t)}))}runInTransactionSync(e,t){return r(this,void 0,void 0,(function*(){if(t)return(0,i.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);yield this.lockManager.lock(p);try{this.currentTransactionId=crypto.randomUUID();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(p)}}))}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.__docId__,delete t.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessages)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.fullDocIdStr]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessages)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),n={};for(const r of e.docs){const e=(0,i.getFullDocIdStr)(r.__docId__,t.collectionName,t.integrationId);n[e]={properties:r,timestamp:r.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(n,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let n=!1;return this.runInTransactionSync((()=>{for(const[t,r]of Object.entries(e))this.addPendingIncomingUpdate(t,r),this.pendingIncomingUpdates.get(t)||(n=!0),this.maybeApplyIncomingUpdate(t)}),t).then(),n}addPendingIncomingUpdate(e,t){const n=this.pendingIncomingUpdates.get(e);if(n&&n.timestamp>t.timestamp)return;const r=this.docToTimestamp.get(e);r&&r.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const n=this.pendingOutgoingMutations.get(e);n&&n.length||(this.applyLocalDbUpdateFromSnapshot(e,t.properties),this.docToTimestamp.set(e,{timestamp:t.timestamp,expireTimestamp:t.properties?void 0:Date.now()+2e4}),this.fullDocIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.removeDocumentLocally(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docToTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now())&&this.isDocumentSafeForDelete(e)));for(const[t]of e)this.docToTimestamp.delete(t),this.removeDocumentLocally(t)}),1e4)}isDocumentSafeForDelete(e){if(this.pendingIncomingUpdates.get(e))return!1;const t=this.pendingOutgoingMutations.get(e);return!(t&&t.length||this.querySubscriptionManager.hasOngoingQueryForDocId(e))}applyLocalDbUpdateFromSnapshot(e,t){const n=this.dbDao.getDocumentPropertiesOrUndefined(e);return!(!n&&!t||n===t)&&((!n||!t||(0,i.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,i.normalizeJsonAsString)(n))&&(this.dbDao.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}sendAllUnsentOutgoingMutations(e){return r(this,void 0,void 0,(function*(){const t=this.groupOutgoingMutationsByIntegrationId();try{yield a.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((([e,t])=>r(this,void 0,void 0,(function*(){yield this.sendMutationsForIntegration([...t],e),this.outgoingMutationsEmpty.next(!0)})))),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),yield this.resyncFailedUpdates()),null==e||e.reject(t)}}))}sendMutationsForIntegration(e,t){return r(this,void 0,void 0,(function*(){try{const n=yield this.mutationSender.sendMutations(e.map((e=>e.mutation)),t),r=Date.now();for(const t of e){const e=this.removeOutgoingMutation(t);this.isDocumentSafeForDelete(e)?(this.docToTimestamp.set(e,{timestamp:n,expireTimestamp:r+2e4}),this.removeDocumentLocally(e)):this.docToTimestamp.set(e,{timestamp:n,expireTimestamp:void 0})}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.removeDocumentLocally(e),this.docsToResync.push(e)}throw t}}))}removeOutgoingMutation(e){const t=(0,i.getFullDocIdStr)(e.mutation.fullDocId),n=(0,i.truthy)(this.pendingOutgoingMutations.get(t));return n.splice(n.indexOf(e),1),n.length||this.pendingOutgoingMutations.delete(t),t}resyncFailedUpdates(){var e,t;return r(this,void 0,void 0,(function*(){const n=[...this.docsToResync];this.docsToResync.splice(0);for(const r of n){this.docToTimestamp.set(r,{timestamp:null!==(t=null===(e=this.docToTimestamp.get(r))||void 0===e?void 0:e.timestamp)&&void 0!==t?t:0,expireTimestamp:Date.now()+2e4});try{const e=yield this.queryBuilderFactory.getForDocument(r).snapshot();(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+r)}catch(e){this.querySubscriptionManager.errorOutAllQueries(r,e)}}}))}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,n]of[...this.pendingOutgoingMutations.entries()]){const t=n[n.length-1];if(t&&!t.sentToServer){const n=t.mutation.fullDocId.integrationId;(e[n]||(e[n]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isDocumentSafeForDelete(t)&&this.removeDocumentLocally(t)}))}removeDocumentLocally(e){this.dbDao.removeDocumentFromDb(e),this.fullDocIdToLocalTimestamp.delete(e);const t=this.docToTimestamp.get(e);t&&(t.expireTimestamp=Date.now()+2e4)}}},83039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DbDao=void 0;const r=n(70575),i=n(98784),a=n(57979);t.DbDao=class{constructor(){this.dbIdToDoc=new Map,this.fullDocIdToDbId=new Map,this.db=new a.default("SquidData",{persistenceMethod:"memory"})}saveDocument(e,t){let n=this.fullDocIdToDbId.get(e);const a=(0,r.parseFullDocId)(e),o=this.getDbIdToDocForCollection(a.collectionName,a.integrationId),s=this.getDbCollection(a.collectionName,a.integrationId);if((void 0!==n?s.get(n):void 0)||(n=void 0),void 0===n&&!t)return;if(void 0!==n){if(t){const e=s.get(n).meta,r=s.update(Object.assign({$loki:n,meta:e},(0,i.cloneDeep)(t)));return o[n]=this.convertToDocType(r),n}return s.remove(s.get(n)),this.fullDocIdToDbId.delete(e),void delete o[n]}const p=s.insertOne(t);return n=p.$loki,o[n]=this.convertToDocType(p),this.fullDocIdToDbId.set(e,n),n}removeDocumentFromDb(e){const t=this.fullDocIdToDbId.get(e);if(void 0===t)return;const n=(0,r.parseFullDocId)(e),i=this.getDbCollection(n.collectionName,n.integrationId),a=i.get(t);a&&i.remove(a)}isDbDifferentThanInMemory(e){const t=this.fullDocIdToDbId.get(e);if(void 0===t)return!1;const n=(0,r.parseFullDocId)(e);return!this.getDbCollection(n.collectionName,n.integrationId).get(t)}getDocumentProperties(e){return(0,r.truthy)(this.getDocumentPropertiesOrUndefined(e))}getDocumentPropertiesOrUndefined(e){const{collectionName:t,integrationId:n}=(0,r.parseFullDocId)(e),i=`${t}_${n}`,a=this.fullDocIdToDbId.get(e);if(void 0!==a)return(0,r.truthy)(this.dbIdToDoc.get(i))[a]}executeQuery(e){var t;const n=e.collectionName,i=e.integrationId,a={},o=[],s=[];for(const t of e.conditions)(["==","!="].includes(t.operator)?o:s).push(t);this.applyEqualityConditions(o,a);for(const e of s)Object.assign(a,this.convertToLokiCondition(e));let p=this.getDbCollection(n,i).chain().find(a);(null===(t=e.sortOrder)||void 0===t?void 0:t.length)&&(p=p.compoundsort(e.sortOrder.map((e=>[e.fieldName,!e.asc]))));const c=e.limit>0?e.limit:1e3;return p=p.limit(c),p.data().map((e=>(0,r.truthy)(this.getDbIdToDocForCollection(n,i)[e.$loki],"Document not in local db")))}convertToDocType(e){const t=Object.assign({},e);return delete t.$loki,delete t.meta,delete t.__ts__,t}convertToLokiCondition(e){const t={};switch(e.operator){case"==":t[e.fieldName]=e.value;break;case"<":t[e.fieldName]={$lt:e.value};break;case"<=":t[e.fieldName]={$lte:e.value};break;case">":t[e.fieldName]={$gt:e.value};break;case">=":t[e.fieldName]={$gte:e.value};break;case"!=":t[e.fieldName]={$ne:e.value};break;default:throw new Error(`Unknown operator ${e.operator}`)}return t}getDbCollection(e,t){var n;const r=`${t}_${e}`;return null!==(n=this.db.getCollection(r))&&void 0!==n?n:this.db.addCollection(r)}getDbIdToDocForCollection(e,t){const n=`${e}_${t}`;return this.dbIdToDoc.get(n)||(0,r.truthy)(this.dbIdToDoc.set(n,{}).get(n))}applyEqualityConditions(e,t){const n={};for(const t of e){n[t.operator]||(n[t.operator]={});const e=n[t.operator][t.fieldName]||[];e.push(t.value),n[t.operator][t.fieldName]=e}for(const[e,r]of Object.entries(n))for(const[n,i]of Object.entries(r)){const r=[{["=="===e?"$in":"$nin"]:i}];void 0!==i.find((e=>null===e))&&r.push({$exists:"!="===e}),t[n]={$or:r}}}}},99930:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0,t.DestructManager=class{constructor(){this.destructors=[],this.isDestructed=!1}registerDestructor(e){this.destructors.push(e)}destruct(){return n(this,void 0,void 0,(function*(){if(this.isDestructed)return;this.isDestructed=!0;let e=this.destructors.shift();for(;e;){try{yield e()}catch(e){console.error("Error while destructing Squid",e)}e=this.destructors.shift()}}))}}},65801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const r=n(70575),i=n(75264);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,r.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},75264:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const i=n(70575),a=n(98784);t.DocumentReference=class{constructor(e,t,n){this.fullDocId=e,this.dataManager=t,this.queryBuilderFactory=n}data(){return(0,i.truthy)(this.dataManager.getProperties(this.fullDocId),"CANNOT_FIND_DOCUMENT_DATA")}get(){return r(this,void 0,void 0,(function*(){try{if(this.data())return this}catch(e){}const e=yield this.queryBuilderFactory.getForDocument(this.fullDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.fullDocId),e.length?this:void 0}))}isDirty(){return this.dataManager.isDirty(this.fullDocId)}update(e,t){return r(this,void 0,void 0,(function*(){const n={};Object.entries(e).forEach((([e,t])=>{const r=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};n[e]=[r]}));const r={type:"update",fullDocId:(0,i.parseFullDocId)(this.fullDocId),properties:n};return this.dataManager.applyOutgoingMutation(r,t)}))}setInPath(e,t,n){return r(this,void 0,void 0,(function*(){return this.update({[e]:a.cloneDeep(t)},n)}))}deleteInPath(e,t){return r(this,void 0,void 0,(function*(){return this.update({[e]:void 0},t)}))}insert(e,t){return r(this,void 0,void 0,(function*(){const n=(0,i.parseFullDocId)(this.fullDocId),r={type:"insert",fullDocId:n,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:n.docId}),(0,i.deserializeObj)(n.docId))};return this.dataManager.applyOutgoingMutation(r,t)}))}delete(e){return r(this,void 0,void 0,(function*(){const t={type:"delete",fullDocId:(0,i.parseFullDocId)(this.fullDocId)};return this.dataManager.applyOutgoingMutation(t,e)}))}}},43010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const r=n(46245);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new r.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},46245:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{p(r.next(e))}catch(e){a(e)}}function s(e){try{p(r.throw(e))}catch(e){a(e)}}function p(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}p((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const i=n(71103),a=n(15699);t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const n=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${n}`,headers:this.rpcManager.getStaticHeaders(),fetch:a.default}),cache:new i.InMemoryCache})}query(e){return r(this,void 0,void 0,(function*(){return(yield this.client.query({query:i.gql`
|
|
10
10
|
${e.query}
|
|
11
11
|
`,variables:e.variables})).data}))}mutate(e){return r(this,void 0,void 0,(function*(){return(yield this.client.mutate({mutation:i.gql`
|
|
12
12
|
${e.query}
|